1,325 Discount Codes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
2 years ago
I need to add 1,325 discount codes to a nopcommerce 3.9 site. I can paste the information into the discount table of the database. My problem is the requirements, I need 1,250 codes to require certain products in the cart (example: products 19, 4, 18) and 75 of the codes to require a separate product (example: product 20). I see a table in the database called DiscountRequirement but it doesn't show the data from the Discount Details / Requirements page in the administration. Where is this data stored? I can't find it in any of the tables. I don't want to add the requirements to all 1,325 discount codes one at a time. Any suggestions? Is there a way to bulk import the codes and requirements?
2 years ago
If you are using Discount Type "Assigned to products", then those products are in table
[Discount_AppliedToProducts]
2 years ago
That's odd. The table is empty but I am using assigned to products.  I cannot upload an image since I don't have a url of my screen shots.
2 years ago
You can upload your images to a free image hosting site (like imgbb.com), and then put the link here.
2 years ago
Thank you everyone's help. I was able to find where the product relations is stored. It's in the settings table as DiscountRequirement.RestrictedProductIds ... Imagine that. It ended up being way to complicated to add the data directly into the database. I ended up having to enter the info in the discount requirements page in admin one at a time.
2 years ago
RE:  DiscountRequirement.RestrictedProductIds

That's used by the Discount Rule (Requirement) plugin HasAllProducts.  It's not the same as Discount Type "Assigned to products"
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.