Mass action help

  • Posts: 324
  • Thank you received: 4
  • Hikamarket Multivendor Hikashop Business
1 year 5 months ago #352095

Hi there,

I've made a screencapture video showing what I need to do with a mass action if possible.

You can view it here: 1drv.ms/v/s!ApCULpUUmrCAjcp72p4EOhQxUTZmTQ?e=xqB0Hn

I just need to know what kind of mass action I can use to copy everything from the one branch I have done to all of the other branches, and possibly change the vendor on each product to the new category.

Thanks!

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
1 year 5 months ago #352100

Hi,

So, first to copy a product from one category to another, what you actually need to do is to add the new category to the list of categories of the product.
And when you create / edit a mass action of the type "product", you have an action "update the categories" which you can use with its mode set to "add" instead of "replace" and then the target category (or categories if you want to add the products to several categories at the same time) selected.
Since you have several categories from which you want to move the products, you'll have to do it one source category by one.

And to change the vendor, you can use the action "update the values" on the column "product_vendor_id" with the mode "int" and the value being the ID of the target vendor.

Please Log in or Create an account to join the conversation.

  • Posts: 324
  • Thank you received: 4
  • Hikamarket Multivendor Hikashop Business
1 year 5 months ago #352101

Sorry, I don't think you understand the question properly.

Each of the categories is a different branch, and each branch is a vendor. This has to be this way because different branches have different bank accounts etc.

So, since I can't add multiple vendors to each product, I don't think this solution will work.

I will need to copy the products to each of the branches and then set the vendor ID to match the branch vendor.

Hope that makes it easier to understand. How do I do this quickly and without manually copying everything?

Thanks.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
1 year 5 months ago #352102

Hi,

Ah yes, I missed that part.
In that case you could do like that :
- create a mass action with two actions: one to "replace" the category to a target category, one to update the product_vendor_id to the value you want, and activate its "Actions as a button". This will add a button to the products listing with the name of the mass action.
- go on your products listing, go into one category, increase the number of elements per pages to make sure you see all the products and sort them by product id descending.
- use the global checkbox at the top left of the listing to select all the products of the category, and click on the "copy" button. This will duplicate all the products
- the page will refresh and you'll have all the products twice in that category, with the new ones being listed first.
- select all the new products (you can see that their product code has a random number at the end) and click on the mass action button you created earlier and it will move this products to their new category and change the vendor.

Then, rince and repeat for each category. It's a bit more work than being able to do everything with one mass action (which would be difficult as it would require custom development), but it's a lot faster than having to edit each product one by one.

Last edit: 1 year 5 months ago by nicolas.

Please Log in or Create an account to join the conversation.

  • Posts: 324
  • Thank you received: 4
  • Hikamarket Multivendor Hikashop Business
1 year 5 months ago #352189

Hi,

Tried that. Also tried to do this manually, and I am getting an error saying that my NEWLY COPIED items already exist.

See video for more information.

Basically, I can't copy the items, because when I try to change the category and vendor, it tells me that it already exists. Same thing happens when I try to change the alias manually before saving.

1drv.ms/v/s!ApCULpUUmrCAjcti906Kf5Pk1fmQtA?e=hDY1A3

Please Log in or Create an account to join the conversation.

  • Posts: 324
  • Thank you received: 4
  • Hikamarket Multivendor Hikashop Business
1 year 5 months ago #352193

Hi again,

I also can't do this more than once, because I can't change the name of the copied files. They all have _copy in their name, so I can't use that as a trigger, and because I can't change the product codes and save them, I can't repeat any mass actions using that trigger.

REALLY need a solution to this ASAP. Thanks.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
1 year 5 months ago #352192

Hi,

In your first mass action, make sure the first action is "update the values" on the column "product_alias" and use the operation mode with the value:

{product.product_code}
That way, it will auto fill the product alias with the product_code so that it will allow you the saving.

The only have "_copy" in the product code, not in the name. Also, if you move the ones with the "_copy" in the code to the target category, you can then use again the original ones from the first category to duplicate them again in the original category, in order to move them to another target category. So it should not be a problem.

Last edit: 1 year 5 months ago by nicolas.

Please Log in or Create an account to join the conversation.

  • Posts: 324
  • Thank you received: 4
  • Hikamarket Multivendor Hikashop Business
1 year 5 months ago #352235

Rebuilt the site on J4, and this worked. However, none of the variations for any products that have them were copied.

Any ideas how to fix that? Also, see my other question. Still getting the error about a product with the same name when trying to manually add the variants to the copies that I created with the mass action.

REALLY frustrated now.

Please Log in or Create an account to join the conversation.

  • Posts: 324
  • Thank you received: 4
  • Hikamarket Multivendor Hikashop Business
1 year 5 months ago #352238

Update. Definitely a bug.

It SAYS there's an error saving, but it still saves... very weird.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
1 year 5 months ago #352237

Hi,

I'm sorry but I don't understand what you mean by "Rebuilt the site on J4, and this worked. However, none of the variations for any products that have them were copied."
Please provide more context.

Please Log in or Create an account to join the conversation.

Time to create page: 0.059 seconds
Powered by Kunena Forum