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

Quantity change -> price change

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-30-2007, 07:59 AM
  Warwick's Avatar 
Warwick Warwick is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Somewhere on the web through European connection
Posts: 868
 

Question Quantity change -> price change

I always found this a bit strange:
why isn't the price changing as well when you change the quantity on the product page?

Now when you select 100 as quantity for a product that costs let's say 10 dollars a piece, the product price shown still remains 10 dollars while it should be 10 x 100 = 1000 dollars.

You might say this is because that's the way X-Cart functions, but that isn't correct; when a product has options/price modifiers and you select one of those options, you see the price changing.

Is there anybody who knows how to get this done?
__________________
Installs: X-Cart 4.1.x - 4.4.x ∙∙ MySQL version: 5.0.45 ∙∙ Apache version: 2.2.8 (Unix) ∙∙ PHP version: 5.25
X-Cart add-ons: all ∙∙ Mods: A lot; too many ∙∙ Skin templates: Many
∙∙ Experience: Somewhere beyond newbie
-----------------------------------
------------------------------------------------------------------------------------------------------
Looking for the best dutch language pack? 4.1.x - 4.6.x compatibel, native speaker translation! More info
Reply With Quote
  #2  
Old 08-30-2007, 08:13 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: Quantity change -> price change

But the price per item doesn't change! Some people only want to know price per item, and they expect the cart to do the math for them at checkout. You could always add a display variable - that does the math. Edit product.tpl and add a smarty equation for the item price * quantity -- hold on -- that won't work without some ajax or js, since how will smarty know what the qty is? Sounds like a late-night project for someone (not me).
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #3  
Old 08-30-2007, 08:27 AM
  Warwick's Avatar 
Warwick Warwick is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Somewhere on the web through European connection
Posts: 868
 

Default Re: Quantity change -> price change



Thanks for the reply; I understand what you're saying with 'But the price per item doesn't change! Some people only want to know price per item ...' that crossed my mind as well but it somehow doesn't 'feel' right that the price stays the same; customers will understand that when they change quantity a changed price is the consequence/result. Heck, it's also viewable in the cart and on the invoice.
Makes no sense imo that this quantity price is only shown in the cart and further on ...

When you're at a gas station you're also used that the price changes with the gallons rising right? Would be 'interesting' when you'd only see the total price when paying at the pay-desk

I'll ask X-Cart, I think this is a typical task for js
__________________
Installs: X-Cart 4.1.x - 4.4.x ∙∙ MySQL version: 5.0.45 ∙∙ Apache version: 2.2.8 (Unix) ∙∙ PHP version: 5.25
X-Cart add-ons: all ∙∙ Mods: A lot; too many ∙∙ Skin templates: Many
∙∙ Experience: Somewhere beyond newbie
-----------------------------------
------------------------------------------------------------------------------------------------------
Looking for the best dutch language pack? 4.1.x - 4.6.x compatibel, native speaker translation! More info
Reply With Quote
  #4  
Old 08-30-2007, 08:33 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: Quantity change -> price change

Quote:
Originally Posted by Warwick
hen you're at a gas station you're also used that the price changes with the gallons rising right?
Not exactly -- the price per gallon/liter is a fixed constant and always displayed. The gas pump is doing the math for you as it dispenses.

I've never seen any shopping cart, anywhere, that calculates the total cost of an item until an item is added to the cart. Show me an example! It sounds like youa re looking for a real-time method of applying qty from the pulldown into a displayed item price... I thik you may be able to accomplish that with js.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #5  
Old 08-30-2007, 08:38 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Quantity change -> price change

This gets even more complex if you have price breaks - say the price goes down after 10 items...displaying the price on the page becomes a VERY complex piece of code.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #6  
Old 08-30-2007, 02:27 PM
 
inebriate inebriate is offline
 

eXpert
  
Join Date: May 2006
Posts: 301
 

Default Re: Quantity change -> price change

the quantity dropdown doesnt trigger the check_options function, so you would have to add it to the onchange and also edit check_options in the price update section to multiply by the quantity, which you would need to pass to it (either as a parameter or use DOM)

but i'd agree with everyone else that i prefer the price per product rather than the total
__________________
x-cart pro 4.0.18
linux
www.fabric8d.com (currently undergoing construction)
Reply With Quote
  #7  
Old 08-30-2007, 02:47 PM
  Warwick's Avatar 
Warwick Warwick is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Somewhere on the web through European connection
Posts: 868
 

Question Re: Quantity change -> price change

Quote:
Originally Posted by carpeperdiem
... and always displayed ...
Exactly what I mean ... let's say the quantity represents gallons ... 1 gallon, 2 gallons like 1 product, 2 products etc. At the X-Cart gas station you don't see the price going up, see what I mean?

I'm not sure if I have seen this in another shop, I think I did but where ... haven't got a clue. But I somehow find it strange that when you have product options the price is displayed/changed accordingly ... what's the difference then?

Quote:
Originally Posted by balinor
This gets even more complex if you have price breaks ...
I can imagine this isn't an easy one ... I've meanwhile contacted X-Cart to see what this may cost.

Quote:
Originally Posted by inebriate
... but i'd agree with everyone else that i prefer the price per product rather than the total
OK, I must admit I am in doubt and maybe I'm way off track but I wonder what a customer would think ..?

Is this just me having problems with the correct mind setting if there is any?
__________________
Installs: X-Cart 4.1.x - 4.4.x ∙∙ MySQL version: 5.0.45 ∙∙ Apache version: 2.2.8 (Unix) ∙∙ PHP version: 5.25
X-Cart add-ons: all ∙∙ Mods: A lot; too many ∙∙ Skin templates: Many
∙∙ Experience: Somewhere beyond newbie
-----------------------------------
------------------------------------------------------------------------------------------------------
Looking for the best dutch language pack? 4.1.x - 4.6.x compatibel, native speaker translation! More info
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 11:35 AM.

   

 
X-Cart forums © 2001-2020