arkanimus Posted November 21, 2013 Share Posted November 21, 2013 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 :'( Link to comment Share on other sites More sharing options...
arkanimus Posted November 21, 2013 Author Share Posted November 21, 2013 Help Please Link to comment Share on other sites More sharing options...
vekia Posted November 21, 2013 Share Posted November 21, 2013 you've got quantity fields above related to products, if you increase quantity of products, then total will be updated too. Link to comment Share on other sites More sharing options...
arkanimus Posted November 21, 2013 Author Share Posted November 21, 2013 (edited) 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!! Edited November 21, 2013 by arkanimus (see edit history) Link to comment Share on other sites More sharing options...
arkanimus Posted November 21, 2013 Author Share Posted November 21, 2013 help me plss! Link to comment Share on other sites More sharing options...
vekia Posted November 22, 2013 Share Posted November 22, 2013 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. Link to comment Share on other sites More sharing options...
arkanimus Posted November 22, 2013 Author Share Posted November 22, 2013 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?? Link to comment Share on other sites More sharing options...
vekia Posted November 24, 2013 Share Posted November 24, 2013 {assign var="result" value=$total_price-$cantidad} then use {$result} variable Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now