X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Showing discounted price (https://forum.x-cart.com/showthread.php?t=28320)

neaisha 01-25-2007 01:29 PM

Re: Showing discounted price
 
hmm...i've tried but maybe it's not within this code. i can only find one line in product.tpl that differs from products.tpl and changing that line doesnt help. sowwy!

Alexander Whillas 01-25-2007 01:52 PM

Re: Showing discounted price
 
The 'discount' that its calculating here is the difference in 'price' (Market price) and list price (online price). I can't see where it pulls in the discount value and makes a calculation based on this.

I was talking about

1. flagging an item 'Available for global discount',
2. setting the global discount as a provider to a percentage value
3. then hoping to see it affect all the items price from step 1.

Maybe its not possible :(

JWait 01-25-2007 03:41 PM

Re: Showing discounted price
 
Quote:

Originally Posted by Alexander Whillas
So,

I've searched here and not found anything that addresses this issue: My client wants to have a sale to clear stock. 30% discount on selected items type thing. I can see the 'discount_avail' flag for a product, but I want to know how I can

a) get the discount value (i.e. 30%)
b) show the modified price when the user is browsing the products not just at the checkout

?

I'm figuring these must be something easy I'm missing here...?


I think (but not sure) that the 'discount_avail' applies to membership level, like if you sell wholesale to certain members (customers). That way "Wholesale" customers would see prices with the dicount applied to the products with the 'discount_avail' and normal pricing on items that it doesn't apply.

Perhaps someone that actually knows for sure will chime in.

JWait 01-25-2007 03:53 PM

Re: Showing discounted price
 
Quote:

Originally Posted by neaisha
nah nah nah....i didnt get it to come out correctly b/c the tables are nested.

the code from products.tpl should be somewhere here...

<snip>

this will display incorrectly but i THINK if you can resolve the table issue, it'll work out fine.


The areas that you are referencing ("Market Price" and "Product Price") are what I was referring to in the other thread ("Specials") http://forum.x-cart.com/showthread.php?t=1144&page=5

The has to be some way to query the database to find products that have a difference and display them, I just don't know how.

Alexander Whillas 01-26-2007 01:14 AM

Re: Showing discounted price
 
Actually, I think you could just hit the 'discounts' table yourself (inthe PHP) for the discount value and then add it to Smarty before calling the template THEN do a calculation. Actually, it would be better to loop over the $products array int he PHP and make a new column called 'discounted price' (or something) and then just reference this in the template.

Boring but it works I guess.


All times are GMT -8. The time now is 12:36 PM.

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