Post by mminten » Tue Apr 29, 2014 5:47 am

I have a few products that have the base price set to $0.00. I add to that price by my options, so for example if they order a certain quantity of business cards the price gets added to (250 = $25, 500 = $35, etc.) these options are selected by a drop down menu.

I also have radio buttons for type of paper, rounded corners, etc. That have prices connected to them. There are other price additions through checkboxes as well.

All of these prices total correctly but the problem is when the user gets to the cart or the check out page. They will see that their business cards will total say $100.00. I'd like it to show them how the individual options add up to that total. Right now it just shows the options below the name of the product.

I found this code in the Cart.tpl:

Code: Select all

<?php foreach ($product['option'] as $option) { ?>
     - <small><?php echo $option['name']; ?>: <?php echo $option['value']; ?></small><br />
<?php } ?>
Is there a way to add price to this code?

In the product.tpl and the product.php (controller) we have $option_value['price'] but I don't see this in the cart.php or the cart.tpl. How can we pull this variable into the cart and the checkout page to add it?

Active Member

Posts

Joined
Tue Nov 20, 2012 9:33 am


Post by coolshop » Thu Oct 30, 2014 11:26 am

Hi

I'm also wondering how to do this. Can anyone help?

New member

Posts

Joined
Sun Sep 09, 2012 10:31 am

Post by coolshop » Thu Oct 30, 2014 11:34 am

I just found this, and am going to give it a try.

http://stackoverflow.com/questions/2555 ... e-opencart

New member

Posts

Joined
Sun Sep 09, 2012 10:31 am
Who is online

Users browsing this forum: Bing [Bot], Semrush [Bot] and 98 guests