Jump to content

How Do I add a Quantity Textbox?


arkanimus
 Share

Recommended Posts

HI, sorry for my english hehehe...:

 

I need help .. i have to add a textbox called quantity into shopping cart summary

and then multiply the quantity * Total

 

then... show the new Total 

 

please help me!! please :'(

 

2ykp.png

 

Share this post


Link to post
Share on other sites

you've got quantity fields above related to products, if you increase quantity of products, then total will be updated too.

The idea is that the products are stored in boxes, then the field Number refers to the number of boxes example:
 
1 Milk, 3 bread 2 eggs = 6
 
Package 1 = 6
 
Field "Number of Boxes" = 10
 
Total = 10 * 6
 
a picture says 1000 words:
 
 
Thanks!!
 
op6z.png
Edited by arkanimus (see edit history)

Share this post


Link to post
Share on other sites

Without core modification it will not be possible to acheive it easily. I can't help in this case because it's not as easy as it seems.

But I can give you tip.

what to do?

CartController modification, add there function which will multiply products and number that you provide in <input> field in shopping-cart.tpl file.

Share this post


Link to post
Share on other sites

Without core modification it will not be possible to acheive it easily. I can't help in this case because it's not as easy as it seems.

But I can give you tip.

what to do?

CartController modification, add there function which will multiply products and number that you provide in <input> field in shopping-cart.tpl file.

 

in the controller i have the variable $cantidad , but the view did no take the value:

 

the file is : shopping-cart.tpl

 

<span id="total_price">{displayPrice price=($total_price-$cantidad)}</span>

 

Notice: Undefined index: cantidad in /var/www/mayorista10/cache/smarty/compile/2f5c149962cab8fc9bc0c9e32fc32772758fbf56.file.shopping-cart.tpl.php on line 356 Notice: Trying to get property of non-object in /var/www/mayorista10/cache/smarty/compile/2f5c149962cab8fc9bc0c9e32fc32772758fbf56.file.shopping-cart.tpl.php on line 356 $ 854

 

how can i solve it??

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More