Clone products / categories / manufacturers when saving to OpenCart

0
2084

In OpenCart 3.x, a bug has recently occurred: when adding a product, category, article, manufacturer, etc., the content is duplicated. When you save, two copies are created. This problem is mainly in the Google Chrome browser. This is due to the form attribute, it does not work correctly in Google Chrome. How to solve the problem:

 

in products, file \admin\view\template\catalog\product_form.twig

change

<button type="submit" form="form-product" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-save"></i></button>

on

<button type="button" data-toggle="tooltip" onclick="$('#form-product').submit();" title="<?php echo $button_save; ?>" class="btn btn-primary"><i class="fa fa-save"></i></button>

 

in categiries, file \admin\view\template\catalog\category_form.twig

change

<button type="submit" form="form-category" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-save"></i></button>

on

<button type="button" data-toggle="tooltip" onclick="$('#form-category').submit();" title="<?php echo $button_save; ?>" class="btn btn-primary"><i class="fa fa-save"></i></button>

 

inmanufacturers file \admin\view\template\catalog\manufacturer_form.twig

change

<button type="submit" form="form-manufacturer" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-save"></i></button>

on

<button type="button" data-toggle="tooltip" onclick="$('#form-manufacturer').submit();" title="<?php echo $button_save; ?>" class="btn btn-primary"><i class="fa fa-save"></i></button>

 

in pages (articles), file \admin\view\template\catalog\information_form.twig

change

<button type="submit" form="form-information" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-save"></i></button>

on

<button type="button" data-toggle="tooltip" onclick="$('#form-information').submit();" title="<?php echo $button_save; ?>" class="btn btn-primary"><i class="fa fa-save"></i></button>

 

LEAVE A REPLY

Please enter your comment!
Please enter your name here


Notice: Function amp_has_paired_endpoint was called incorrectly. Function called while AMP is disabled via `amp_is_enabled` filter. The service ID "paired_routing" is not recognized and cannot be retrieved. Please see Debugging in WordPress for more information. (This message was added in version 2.1.1.) in /www/wwwroot/offgalaxy.com/wp-includes/functions.php on line 6085

Notice: Function amp_has_paired_endpoint was called incorrectly. Function called while AMP is disabled via `amp_is_enabled` filter. The service ID "paired_routing" is not recognized and cannot be retrieved. Please see Debugging in WordPress for more information. (This message was added in version 2.1.1.) in /www/wwwroot/offgalaxy.com/wp-includes/functions.php on line 6085