M
M
Mitrandil2016-11-03 14:07:15
PHP
Mitrandil, 2016-11-03 14:07:15

Opencart2 not passing product option value to cart?

Added the "Color" option to the product, everything is displayed on the product card and the radio buttons are switched. But it does not get into the basket, respectively, and into the admin panel-orders too. It is written on the forums that when you add an option, it should automatically be displayed in the basket. This if does not work in the code:

<?php if ($product['option']) { ?>
<?php foreach ($product['option'] as $option) { ?>
<br />
<small><?php echo $option['name']; ?>: <?php echo $option['value']; ?></small>
<?php } ?>
<?php } ?>

In the buy.tpl file. As if the product does not have options, but they are!
What could be the problem? How to fix it? Opencart version 2.1.0.2

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Egor, 2016-11-03
@egormmm

Enable debugger and see if there are options. Or you can use the all time debugger called var_dump()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question