Jump to content
thirty bees forum
  • 0

How to disable the underscore numerical increment when duplicating products?


Question

Posted

Ok, where can one remove the _NUM ("REF N_1", "REF N_2", "REF N_3", etc.) append "feature" in thirtybees to restore the ORIGINAL FUNCTIONALITY of Prestashop 1.6 when duplicating products in the back office?

I don't want to waste time tracking down such a ridiculous change in core functionality - TB 1.4.0.

Thanks in advance!

1 answer to this question

Recommended Posts

  • 0
Posted
3 hours ago, Obi said:

Ok, where can one remove the _NUM ("REF N_1", "REF N_2", "REF N_3", etc.) append "feature" in thirtybees to restore the ORIGINAL FUNCTIONALITY of Prestashop 1.6 when duplicating products in the back office?

I don't want to waste time tracking down such a ridiculous change in core functionality - TB 1.4.0.

Thanks in advance!

ANSWER:

1) Copy /controllers/admin/AdminProductsController.php to /overrides/controllers/admin/AdminProductsController.php

2) comment out lines 820 and 821 as shown (actual line may vary) contained in the public function processDuplicate()

            //$product->link_rewrite = static::getUniqueLinkRewrites($product->link_rewrite);
            //$product->reference = Tools::nextAvailableReference(static::getBaseIdentifier($product->reference));

3) Then ftp/copy /overrides/controllers/admin/AdminProductsController.php to your server.

4) go to your back office > Advanced Parameters - > Performance and click Clear cache in the upper right corner.

You can then duplicate products without the link-rewrite value or reference value of the duplicate products being affected.

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...