Answer the question
In order to leave comments, you need to log in
How to set product options in Opencart 1.5 via SQL?
Guys: such a question: There is a site on opencart. It is necessary to put down the Option (Promotional product (option_id = 17))
and the value of this option (Contract price (option_value_id = 65)) for certain products in bulk.
Options are used in the product filter
. I do it like this (I add an option to products):
insert into ukr_product_option (product_id, option_id, option_value, required)
SELECT product_id,17,65,0
from ukr_product
where product_type_id = 4;
insert into ukr_product_option_value (product_option_id, product_id, option_id, option_value_id, quantity, subtract, price, price_prefix, points, points_prefix, weight, weight_prefix)
select product_option_id,
product_id,
17,
65,
0,
0,
0.0000,
'+',
0,
'+',
0.00000000,
'+'
from ukr_product_option
where option_id = 17;
Answer the question
In order to leave comments, you need to log in
create an option, add it to the product and see what has changed in the database tables, then export the records, here you will have an example
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question