Closed gl636474 closed 5 years ago
The margins (£s & %s) also need to be on the product admin page, not visible on frontend.
Add them as proper attributes and have an observer to calculate their values (watch for zeros) on product save. See:
Also add an observer ensure these attributes are locked on product edit (the edit product GET request) so admin cannot change them. See:
Code added in working tree on Mac mini, need to test.
Just need to test bulk import - margins and categories and then create bulk upload spreadsheet to add cost price to each product.
Bulk imports no longer work. Need to implement import_save_before on Margins and Categories observers. See this link for fast model saving: https://magento.stackexchange.com/questions/63764/set-product-category-without-loading-the-whole-product-model/64391 Presumably gets can be done the same way. If not: https://magento.stackexchange.com/questions/56301/how-to-get-product-category-ids-without-loading-the-whole-product
And for fast saving attributes: https://magento.stackexchange.com/questions/67242/set-product-attribute-without-loading-full-product
Export a CSV spreadsheet with the following columns:
Exported file called "costs_andmargins"