Answer the question
In order to leave comments, you need to log in
How to add weight in product editing?
Hello. I started working with opencart 2.3, I received a task, the price of the goods is indicated per kg (example 0.25 kg = 100 rubles), now I need to make sure that when editing the order in the admin panel, the manager can change the weight of the product and immediately that the final price would be recalculated (so that after changing the mass, the price would change depending on the price per kilo), I decided this with a big crutch), made an additional. table
-- ----------------------------
-- Table structure for oc_order_product_weight
-- ----------------------------
DROP TABLE IF EXISTS `oc_order_product_weight`;
CREATE TABLE `oc_order_product_weight` (
`order_custom_weight_id` int(11) NOT NULL AUTO_INCREMENT,
`order_id` int(11) NOT NULL,
`order_product_id` int(11) NOT NULL,
`weight` decimal(15,2) NOT NULL,
PRIMARY KEY (`order_custom_weight_id`)
) ENGINE=MyISAM AUTO_INCREMENT=27 DEFAULT CHARSET=utf8;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question