Is there any way to know what products are assigned with a specific option without having to look at every product individually? Ideally look at the Options list and find out what products are assigned to the option. We've 100s of options and have some duplicates over the years
Thanks in advance
Try this (obviously adjust "option name"):
Code: Select all
select pd.name, po.value from oc_product_description pd
join oc_product p on p.product_id = pd.product_id
join oc_product_option po on po.product_id = p.product_id
where po.value like '%option name%'
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Thanks. I tried that but it returned Zero values and the message below?
Code: Select all
select pd.name, po.value from oc_product_description pd join oc_product p on p.product_id = pd.product_id join oc_product_option po on po.product_id = p.product_id where po.value like '%Preferred Print Colour%'
Ah I see what you're trying to do, try this:
Code: Select all
select pd.name from oc_product_description pd
join oc_product p on p.product_id = pd.product_id
join oc_product_option po on po.product_id = p.product_id
join oc_option_description od on od.option_id = po.option_id
where od.name like '%Preferred Print Colour%'
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
You're welcome
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Who is online
Users browsing this forum: Semrush [Bot] and 328 guests