Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Upsell Link Prices

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-21-2009, 06:21 PM
 
Total Supply Total Supply is offline
 

Member
  
Join Date: Jan 2009
Posts: 11
 

Default Upsell Link Prices

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 -->
&nbsp;&nbsp;
{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
Reply With Quote
  #2  
Old 05-23-2009, 12:13 PM
  gb2world's Avatar 
gb2world gb2world is offline
 

X-Wizard
  
Join Date: May 2006
Location: Austin, TX
Posts: 1,970
 

Default Re: Upsell Link Prices

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)
Reply With Quote
  #3  
Old 06-08-2009, 10:16 PM
 
Total Supply Total Supply is offline
 

Member
  
Join Date: Jan 2009
Posts: 11
 

Default Re: Upsell Link Prices

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
Reply With Quote
  #4  
Old 06-08-2009, 10:35 PM
 
Total Supply Total Supply is offline
 

Member
  
Join Date: Jan 2009
Posts: 11
 

Default Re: Upsell Link Prices

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
Reply With Quote
  #5  
Old 06-09-2009, 02:27 AM
 
Total Supply Total Supply is offline
 

Member
  
Join Date: Jan 2009
Posts: 11
 

Default Re: Upsell Link Prices

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
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:59 PM.

   

 
X-Cart forums © 2001-2020