X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Newest Products (https://forum.x-cart.com/showthread.php?t=1084)

jriggins911 10-31-2008 09:23 PM

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?

JWait 11-01-2008 04:54 PM

Re: Newest Products
 
I tried making a new product with a higher market price and as you said the market price did not display. The selling price did however. I think no one has experienced this problem because the items included are new items and not usually on sale lower than the initial price set when they were added.

jriggins911 11-02-2008 12:38 PM

Re: Newest Products
 
Well that is a good confirmation that the "problem" extends beyond just our setup. I still have not made any break throughs as to why $products[product].list_price doesn't return its value...

aimeea 11-07-2008 07:38 AM

Re: Newest Products
 
Is it possible to have this run in a column on a page ouside of xcart?

I would like to have column in our community that shows our new products.

Thank you in advance

chrisdurnan 12-05-2008 01:03 PM

Re: Newest Products
 
Is there somewhere that sells this modification that I could have it installed. I am not experienced enough to tinker around with coding etc and would be more interested in paying someone. I looked through a few online stores and couldn't find anything. Any thoughts or direction are appreciated.

Thanks
Chris

Lingerieblowout 12-05-2008 01:06 PM

Re: Newest Products
 
I PM you Chris

robertswww 12-05-2008 01:47 PM

Re: Newest Products
 
Quote:

Originally Posted by chrisdurnan
Is there somewhere that sells this modification that I could have it installed.Thanks
Chris

Hi Chris,

I use the Firetank Sofware version of this MOD and have been very pleased with it. It is fairly simple to install by oneself, but if you want, they can install it for you for an additional $19.95.

Check it out here:
Newest Added products list for x-cart
http://www.firetanksoftware.com/fts/customer/Newest-Added-products-list-for-x-cart-pid-79.html

Robert

chrisdurnan 12-05-2008 01:52 PM

Re: Newest Products
 
Such a quick forum I love it. Thank you. I am preparing my budget for site development in the beginning of next year. This has been helpful.
Thanks
Chris

JWait 12-09-2008 07:44 AM

Re: Newest Products
 
Robertswww, just out of curiosity, since you are you using the Firetank Sofware version of this MOD do you have any errors on the product pages if Recommended Products is enabled?

Lingerieblowout 12-09-2008 08:42 AM

Re: Newest Products
 
Firetank mod has no effect on product pages as his mod is for your home page


All times are GMT -8. The time now is 12:04 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.