Blank out product SKU when cloning a product

This was effectively being done before for the product's sku (stored on the master variant) via the #duplicate_variant method, but now it needs to be done explicitly on the product in #duplicate_product

(cherry picked from commit 0f253bb2a0)
This commit is contained in:
Matt-Yorkley
2023-06-09 11:43:43 +01:00
committed by David Cook
parent b1de64bf3e
commit 05d9646f3e
3 changed files with 3 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ module Spree
product.dup.tap do |new_product|
new_product.name = "COPY OF #{product.name}"
new_product.taxons = product.taxons
new_product.sku = ""
new_product.created_at = nil
new_product.deleted_at = nil
new_product.updated_at = nil