You just trip over these things the more you work with databases and php ...
Knowing what the code expects for settings, you can do global updates on numerous conditions like this ...![]()
You just trip over these things the more you work with databases and php ...
Knowing what the code expects for settings, you can do global updates on numerous conditions like this ...![]()
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Well I thought this worked Linda however in practice it doesn't ... I issued the SQL query UPDATE products SET products_quantity_mixed=0; which should in theory stop people buying odd amounts . For example I need people to buy a product in lumps of 12 and other products in lumps of 25, and although I can set the amount that people can buy in the shop if someone adds say 13 items to the cart the cart lets them through to checkout, I don't want this. The buyer must buy either 12 or 24 or 36 or 48 etc, ie multiples of 12 I cannot see anyway to make the cart do this ? The same is true for items of 25 they must be sold in lumps of 25, ie 25, 50, 75, not 26, 27 or 35 etc.
So to sum up some items need to be sold in quantities of, and I would also like to be able to modify categories rather than individual items as this way of modifying items will take me days of tedious individual pricing. Please help if you can, thanks.
IF you set the Product Units to 12 then you have to buy in units of 12 on each product then they have to buy 12 of any given product but can combine mixed attributes when mixed is turned on ...
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Thank you yes, I have found out that is the case, is there a way to do this to categories via SQL though? So, change all the Product Units to 12 in one category, 6 in another category, and 25 in yet another .. other than how I am currently doing it, ie manually one at a time for 900+ products !
First you need to consider whether you are planning to update based on ALL the categories a given product is found in (ie: links), or only based on master-categories-id.
Then you'll have to consider whether this is supposed to happen for all products in all subcategories below the category you mention, or if it only happens for items at that one level.
Then, you'll have to write a SQL query with an appropriate combination of joins between the products table, the products_to_categories table, and the categories table, using the selection criteria for category/product selection resulting from those answers.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.