Just wondering - I noticed today that if I check, or uncheck, a shipping method under an item's Product > Shipping Rules section, the following store keys are incremented:
ProductDisplayOrder
Products
A row is also added (or removed) from the s01_ProductShippingMethods, but it doesn't reference the display order anywhere. Is there some other important DB task that also takes place when the Shipping Rules are changed?
The reason I ask is because I'd like to write a PHP script that will automatically add entries to the s01_ProductShippingMethods table for me. For example if I know all items in a certain category will always be permitted to use a certain shipping method that is otherwise not allowed, I'll grab all those item ID's and add a row to the s01_ProductShippingMethods table for them.
disclaimer: I know it's frowned upon to directly mess with the DB like this, but it just makes life so much easier. If there's a way to accomplish my goal while using Miva's built-in routines I'd do that instead. I suppose I can use PHP to:
A) log in to Miva as an Admin
B) trigger a cURL POST that simulates a user enabling the particular shipping method under a product's admin screen, and clicking update.
--- but, looking at the POST data that's sent when the user clicks that update button, I'm in no mood to replicate that.. Unless the system will allow me to only send the bare minimum (product ID, and the shipping method change info (four elements - module:code, code, name, permitted)).. I'll tinker with that on a test item..
ProductDisplayOrder
Products
A row is also added (or removed) from the s01_ProductShippingMethods, but it doesn't reference the display order anywhere. Is there some other important DB task that also takes place when the Shipping Rules are changed?
The reason I ask is because I'd like to write a PHP script that will automatically add entries to the s01_ProductShippingMethods table for me. For example if I know all items in a certain category will always be permitted to use a certain shipping method that is otherwise not allowed, I'll grab all those item ID's and add a row to the s01_ProductShippingMethods table for them.
disclaimer: I know it's frowned upon to directly mess with the DB like this, but it just makes life so much easier. If there's a way to accomplish my goal while using Miva's built-in routines I'd do that instead. I suppose I can use PHP to:
A) log in to Miva as an Admin
B) trigger a cURL POST that simulates a user enabling the particular shipping method under a product's admin screen, and clicking update.
--- but, looking at the POST data that's sent when the user clicks that update button, I'm in no mood to replicate that.. Unless the system will allow me to only send the bare minimum (product ID, and the shipping method change info (four elements - module:code, code, name, permitted)).. I'll tinker with that on a test item..
Comment