- Posts: 637
- Thank you received: 26
mass action of all products in a given category
10 years 9 months ago - 10 years 9 months ago #223462
by Lumiga
Kind regards,
Lumiga
mass action of all products in a given category was created by Lumiga
-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.5
-- PHP version -- : 5.6
-- Browser(s) name and version -- : FF 42
Hi Supportteam,
Please help me!
I have the desire to complement the value of a field with additional data.
In this case it's the name of the product where I want to put some extra before the name.
"Old White" must be come "Chalk Paint Old White" ,
"Olive" must be come "Chalk Paint Olive" and so on.
I have 300+ product so I like to do it in a mass action.
But there are two things that I can't figure out.
1: I can't find a filter where you can select only products that belong to a specific category.
Also in the database I can't find a category field where the products belongs to.
2: There is no option to concatenate a field. (I know this would be too complicated, so this is no wish
So I want to know if I'm right that you can't filter products that belong to a specific category.
Maybe there is an SQL query to do this. But I come no further than this.
SELECT product_name
FROM xxx_hikashop_product
INNER JOIN jxxx_hikashop_product_category
ON xxx_hikashop_product.product_id = xxx_hikashop_product_category.product_id WHERE `category_id` =13;
But now I have to make an UPDATE and add extra value in the same field. This is an bridge to far for me
Maybe you can help me to put me in the right direction. Because I don't know if concatenate is the right search word for this.
Hope you can help me a little bit.
Kind regards,
Lumiga
-- Joomla version -- : 3.4.5
-- PHP version -- : 5.6
-- Browser(s) name and version -- : FF 42
Hi Supportteam,
Please help me!
I have the desire to complement the value of a field with additional data.
In this case it's the name of the product where I want to put some extra before the name.
"Old White" must be come "Chalk Paint Old White" ,
"Olive" must be come "Chalk Paint Olive" and so on.
I have 300+ product so I like to do it in a mass action.
But there are two things that I can't figure out.
1: I can't find a filter where you can select only products that belong to a specific category.
Also in the database I can't find a category field where the products belongs to.
2: There is no option to concatenate a field. (I know this would be too complicated, so this is no wish
So I want to know if I'm right that you can't filter products that belong to a specific category.
Maybe there is an SQL query to do this. But I come no further than this.
SELECT product_name
FROM xxx_hikashop_product
INNER JOIN jxxx_hikashop_product_category
ON xxx_hikashop_product.product_id = xxx_hikashop_product_category.product_id WHERE `category_id` =13;
But now I have to make an UPDATE and add extra value in the same field. This is an bridge to far for me
Maybe you can help me to put me in the right direction. Because I don't know if concatenate is the right search word for this.
Hope you can help me a little bit.
Kind regards,
Lumiga
Kind regards,
Lumiga
Last edit: 10 years 9 months ago by Lumiga.
Please Log in or Create an account to join the conversation.
10 years 9 months ago #223502
by Xavier
Replied by Xavier on topic mass action of all products in a given category
Hi,
You can use this MySQL request:
And simply replace 'The desired name' by the correct categoy name, or filter on another category column.
You can use this MySQL request:
Code:
UPDATE `#__hikashop_product` AS p
LEFT JOIN `#__hikashop_product_category` AS pc ON p.product_id = pc.product_id
LEFT JOIN `#__hikashop_category` AS c ON pc.category_id = c.category_id
SET p.product_name = CONCAT('Chalk Paint ',p.product_name) WHERE c.category_name = 'The desired name';
And simply replace 'The desired name' by the correct categoy name, or filter on another category column.
The following user(s) said Thank You: Lumiga
Please Log in or Create an account to join the conversation.
10 years 9 months ago #223705
by Lumiga
Kind regards,
Lumiga
Replied by Lumiga on topic mass action of all products in a given category
Hi Xavier,
Thank you very much!!!!
Kind regards,
Lumiga
Thank you very much!!!!
Kind regards,
Lumiga
Kind regards,
Lumiga
Please Log in or Create an account to join the conversation.
Time to create page: 0.178 seconds