Clone products / categories / manufacturers when saving to OpenCart

0
609

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