Skip to content
View in the app

A better way to browse. Learn more.

thirty bees forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Duplicating products

Featured Replies

There are a couple problems, at least these two, that happen when you duplicate a product. The specific prices and downloads(attachements) are not duplicated. They are supposed to be, if you look at the code in controllers/admin/AdminProductsController.php, via this block of code, and the associated functions in classes/Product.php.. if ($product->add() && Category::duplicateProductCategories($idProductOld, $product->id) && Product::duplicateSuppliers($idProductOld, $product->id) && ($combinationImages = Product::duplicateAttributes($idProductOld, $product->id)) !== false && GroupReduction::duplicateReduction($idProductOld, $product->id) && Product::duplicateAccessories($idProductOld, $product->id) && Product::duplicateFeatures($idProductOld, $product->id) && Product::duplicateSpecificPrices($idProductOld, $product->id) && Pack::duplicate($idProductOld, $product->id) && Product::duplicateCustomizationFields($idProductOld, $product->id) && Product::duplicateTags($idProductOld, $product->id) && Product::duplicateDownload($idProductOld, $product->id) ) { ...but they don't get duplicated.

  • Author

After looking into it a bit more, a 'download' is NOT an 'attachment'. Sorry for my confusion. So it's not duplicating that because it's not told to. I will add it to the above code and see if it does duplicate attachments or not.

edit: yes it does duplicate attachments if it's told to. Just put this in the code after.. && Product::duplicateDownload($idProductOld, $product->id) add.. && Product::duplicateAttachments($idProductOld, $product->id) So that can be done with an override, but I think it should be done to the core.

  • Author

Why duplicateSpecificPrices isn't working is beyond me. I can look at the function and tell it wont work, but as to making it work, is way above my paygrade.

  • Author

I think I fixed it...amazing no? At any rate, in /classes/Product.php, find.. foreach (SpecificPrice::getIdsByProductId((int) $oldProductId) as $data) { change to.. foreach (SpecificPrice::getByProductId((int) $oldProductId) as $data) { I'll keep testing to make sure it's working.. I'll get back to ya...

edit: seems to be working for me, try it yourself and let me know. I'm sure I'm not the only person who had issue with this not working. Again I could make this an override, but it needs to be fixed in the core instead.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.