Thread: Newest Products
View Single Post
  #261  
Old 10-31-2008, 09:23 PM
 
jriggins911 jriggins911 is offline
 

Advanced Member
  
Join Date: Apr 2008
Posts: 53
 

Default Re: Newest Products

Sidebar from the latest discussion.....

So I have this mod installed and is working fine with one exception.

If I have a product with market price (not the price we are actually selling it for) the market price and the discount (our price vs market price) is not displayed.

For example if on the home page I have a featured product we are selling for $10 dollars with a market price of $20 dollars the selling price of $10, the market price of $20 and a discount of 50% is displayed. However, if the same product is displayed using this mod on the new products page only the $10 price is displayed.

The newest product mod calls all the same templates the featured products and all other category pages call (products.tpl or products_t.tpl) but the output is not the same.

After having parsed through all of the nested template calls I have narrowed it down to a conditional evaluation in products_t.tpl.

Quote:
{if $products[product].list_price gt 0 and $products[product].taxed_price lt $products[product].list_price}
{math equation="100-(price/lprice)*100" price=$products[product].taxed_price lprice=$products[product].list_price format="%3.0f" assign=discount}
{if $discount gt 0 }
<font class="MarketPrice">{$lng.lbl_market_price}: <s>
{include file="currency.tpl" value=$products[product].list_price}
</s></font><br />
{/if}
{/if}

The problem here is the
Quote:
$products[product].taxed_price
returns the appropriate value while
Quote:
$products[product].list_price
returns nothing (as in not even zero). It seems as if the value isn't being passed or made available globally in this "function call".

Since the
Quote:
$products[product].list_price
has no value the entire conditional IF evaluates to false and the market price and discount are not caluculated or displayed.

Since this mod initates the page display from the same template path, customer/home.tpl, and some of the variables are available from the product object ... why does the particular ".list_price" variable (list / market price) not return its' value?

Any ideas? Anyone else have this problem?
__________________
Digital Embroidery

X-cart Version 4.1.9
Reply With Quote