Jump to content
thirty bees forum
  • 0

How to disable the underscore numerical increment when duplicating products?


Obi

Question

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!

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0
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.

 

Link to comment
Share on other sites

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...