Good day dear users of our website. Today I would like to describe one annoying bug in the engine opencart version 1.5.5.1,
namely, in this version when editing the goods are not stored marked checkboxes selected additional categories on the Communication tab,
for example you decide to change anything in the product description, price, attribute, or anything else, and click save, and just at that moment of connection categories flies, it is treated quickly and simply:
Open your FTP manager and find the file file admin\view\template\catalog\product_form.tpl open it in Notepad (Recommended notepad ++), and find the line that:
1 2 3 4 5 |
<?php foreach ($product_categories as $product_categories) { ?> <?php if ($product_categories['category_id'] == $main_category_id) { ?> <option value="<?php echo $product_categories['category_id']; ?>" selected="selected"><?php echo $product_categories['name']; ?></option> <?php } else { ?> <option value="<?php echo $product_categories['category_id']; ?>"><?php echo $product_categories['name']; ?></option> |
Change the code above to the following:
1 2 3 4 5 |
<?php foreach ($product_categories as $product_category) { ?> <?php if ($product_category['category_id'] == $main_category_id) { ?> <option value="<?php echo $product_category['category_id']; ?>" selected="selected"><?php echo $product_category['name']; ?></option> <?php } else { ?> <option value="<?php echo $product_category['category_id']; ?>"><?php echo $product_category['name']; ?></option> |
Just below we find the line:
1 |
<?php if (in_array($category['category_id'], $product_categories)) { ?> |
And replace it with the following line:
1 |
<?php if (in_array(array('category_id' => $category['category_id'], 'name' => $category['name']), $product_categories)) { ?> |
That's basically all that we needed to fix this problem now after saving checkbox will be marked.
No Comment
You can post first response comment.