| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Upsell Link Prices | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Is there a way to include both List Price and Market Price in the upsell links?
I have List price displaying as in the RRP : $33.95 but have had no luck with Your price: This is the code: {* $Id: related_products.tpl,v 1.10.6.1 2004/12/06 svowl Exp $ *} {if $product_links ne ""} {capture name=dialog} {assign var="tmp" value="0"} {section name=cat_num loop=$product_links} {if $product_links[cat_num].productid}{assign var="tmp" value="1"}{/if} {/section} {section name=cat_num loop=$product_links} { if %cat_num.first% } <table border="0" cellspacing="2" width="100%"> {/if} {if $smarty.section.cat_num.index is div by 4} <tr valign="top" style="text-align:center"> {/if} <td align="center" valign="top"> <a href="product.php?productid={ $product_links[cat_num].productid }"{if $config.Modules.upselling_new_window eq 'Y'} target="_blank"{/if}> <font class="ProductTitle"> {$product_links[cat_num].product|escape}</font></a> <br /> {include file="product_thumbnail.tpl" productid=$product_links[cat_num].productid image_x=150 product=$product_links[cat_num].product tmbn_url=$product_links[cat_num].tmbn_url} <br /> <!--SOSCS --> {if $login ne ""} {include file="currency.tpl" value=$product_links[cat_num].price} <br /> <!--RRP Price --> {if $product_links[cat_num].list_price gt 0 and $product_links[cat_num].taxed_price lt $product_links[cat_num].list_price} {math equation="100-(price/lprice)*100" price=$product_links[cat_num].taxed_price lprice=$product_links[cat_num].list_price format="%3.0f" assign=discount} {if $discount gt 0} <font class="MarketPrice2">{$lng.lbl_market_price}: {include file="currency.tpl" value=$product_links[cat_num].list_price} </font><br /> {/if} {/if} <!--/RRP Price --> {/if} <br /> <br /> </td> { if %cat_num.last% } </tr></table> {/if} {/section} {/capture} {include file="dialog.tpl" title=$lng.lbl_related_products content=$smarty.capture.dialog extra="width=100%"} {/if} Any help would be greaty appreciated
__________________
Xcart Gold 4.3 |
|||||||
#2
|
|||||||||
|
|||||||||
![]() Hi -
Your best bet is to use this tip. You will see in the debug window all the smarty variables available to you and their values. If the you do not see the variable you want available to you, then you have to modify the query in the php file to get it.
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold (CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module) |
|||||||||
#3
|
|||||||
|
|||||||
![]() thanks for your help it does not seem to have a tax price
![]() How would I add the tax price to the $product_links array? it currently has: $product_links = func_search_products( array( "from_tbls" => array("product_links"), "query" => " AND $sql_tbl[products].productid = $sql_tbl[product_links].productid2 AND $sql_tbl[product_links].productid1 = '$productid'" ), $user_account['membershipid'], "$sql_tbl[product_links].orderby, product" );
__________________
Xcart Gold 4.3 |
|||||||
#4
|
|||||||
|
|||||||
![]() And i'm guessing the statement in related_products should be:
<font class="ProductPrice">{$lng.lbl_our_price}: {include file="currency.tpl" value=$product_links[cat_num].taxes}</font><font class="MarketPrice">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$product_links[cat_num].taxes}</font> At the moment I get "$Array"
__________________
Xcart Gold 4.3 |
|||||||
#5
|
|||||||
|
|||||||
![]() I just tried:
{include file="currency.tpl" value=$product_links[cat_num].taxed_price} but got the list price the same as if I had used: {$product_links[cat_num].product|escape} So basically what I need is the wholesale price
__________________
Xcart Gold 4.3 |
|||||||
|
|||
X-Cart forums © 2001-2020
|