Update new brand in several product tables

  • Posts: 89
  • Thank you received: 2
  • Hikashop Business
3 weeks 1 day ago #343346

-- HikaShop version -- : 4.6.1
-- Joomla version -- : 3.10.10
-- PHP version -- : 7.4.30
-- Browser(s) name and version -- : FF 102.0.1

Hi Nicolas,

I searched the forum, but couldn't find a best practice for updating a changed brand name in several, but not all products.:
Name / Product Code / Page Title / Meta description / Alias (skip because created from product code?) / Image Name / Image

  • Export all products to CSV via export on products page
  • Delete all product and columns of products not being changed in CSV
  • Change the name in the right cells
  • Import CSV via mass action

Is the way described above right and which import action do I have to use?

Thanks in advance!!

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

  • Posts: 76113
  • Thank you received: 11910
  • MODERATOR
3 weeks 1 day ago #343348

Hi,

You can do it like that yes. You should use the filter "CSV products".

Note however that you can also easily do it through your PHPMyAdmin, and not just for products in HikaShop but for anything stored in the database:
bobcares.com/blog/find-and-replace-in-phpmyadmin/

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

  • Posts: 89
  • Thank you received: 2
  • Hikashop Business
3 weeks 1 day ago #343363

Thanks Nicolas,

Will the alias be changed automatically when changing the name of the product, change it in the CSV to be imported or does it have to be cleared like the canonical url with a mass action?

Thanks,
Remco

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

  • Posts: 76113
  • Thank you received: 11910
  • MODERATOR
3 weeks 22 hours ago #343366

Hi,

No, if you change the name of the product with the CSV import, it won't automatically change the alias. You need to also include the new alias in the CSV.
Also, note that you can't change the product_code of your products with that method. That's because the import system relies on the product_code to update the products you already have.
If that's necessary, then the only possible solution would be the one through PHPMyAdmin I was proposing as second solution in my previous message.

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

  • Posts: 89
  • Thank you received: 2
  • Hikashop Business
3 weeks 19 hours ago #343380

Hi Nicolas,

  • Just a question because I'm interested :-) Why does the import system relies on the product_code instead of the product_id?
  • Ooh and.....is changing the image title and alt possible via import? Can't find the cells in the product export.
  • And last, but not least ;-) What does the option "Save the products on Mass Action csv import" exactly mean?

Cheers,
Remco

Last edit: 3 weeks 17 hours ago by RustyHika.

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

  • Posts: 76113
  • Thank you received: 11910
  • MODERATOR
3 weeks 14 hours ago #343381

Hi,

1. Because the product_id is auto incremented and can change from one website to another. Like when people are migrating their shop from one joomla to another joomla and they do the import several times while modifying their CSV in between.

2. You can use the column images_name in your CSV to add the image name which will be used as title/alt

3. If you don't tick that option "Save the products on Mass Action csv import" it will just load the products data from the CSV and if you don't have any action in the mass action, nothing will happen. But with that option ticked, it will update/add the products in the database after loading the information from the CSV even without any action.

Last edit: 3 weeks 17 hours ago by nicolas.

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

  • Posts: 89
  • Thank you received: 2
  • Hikashop Business
2 weeks 6 days ago #343405

Hi Nicolas,

Thanks for all the info! Just a last question: Is there a difference between the mass action we discussed and the import function at the product page or are they different ways to the same result?

BTW column images_name didn't work to change the title and alt for the product images!

Cheers,
Remco

Last edit: 2 weeks 6 days ago by RustyHika.

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

  • Posts: 3741
  • Thank you received: 506
  • MODERATOR
2 weeks 6 days ago #343414

Hello,

Yes, MassAction and Import function are quite different process but can leads in some case (like yours) to the same results (create and update).

For your column images_name, in order to check, can you provide your used CSV file ?
Note : If required, you can use our Contact us form to provide your CSV file, just don't forget to add an Url link to this topic in order to keep the link.

Regards

Last edit: 2 weeks 6 days ago by Philip.

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

  • Posts: 3741
  • Thank you received: 506
  • MODERATOR
2 weeks 5 days ago #343448

From what you sent, we weren't able to see your image reference, see my screenshot as an example, and note that in your product listing you can create a CSV by clicking on the button "export" in your Backend product listing.

Hope this will help you to achieve your needs.
Regards

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

  • Posts: 89
  • Thank you received: 2
  • Hikashop Business
2 weeks 1 day ago #343507

Hi Philip,

The CSV file I've sent you was a stripped down version of an export from the product listing. The same as the CSV file you've sent me by mail. But also in your CSV I didn't find the column "images_name" what was suggested to me by Nicolas:
2. You can use the column images_name in your CSV to add the image name which will be used as title/alt.
Also I don't see a screenshot with your last response.
So what to do with an CSV import to add image title and alt?
Cheers, Remco

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

  • Posts: 76113
  • Thank you received: 11910
  • MODERATOR
2 weeks 1 day ago #343526

Hi,

As I said, you can just add a column images_name to your CSV with the value in it for the image you have in the images column.
The rest should be automatic during the import via the Products>Import menu.

Unfortunately, the CSV import from the mass action system doesn't support that capability.

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

  • Posts: 89
  • Thank you received: 2
  • Hikashop Business
2 weeks 18 hours ago #343539

Hi Nicolas,

I didn't use the import, but mass actions....and didn't use the "images" column, because I thought the import relies on the "product_code" column. Can this be the cause of the failing import of the "images_name" column?

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

  • Posts: 76113
  • Thank you received: 11910
  • MODERATOR
2 weeks 3 hours ago #343546

Hi,

Yes. As I said in my last message, the images_name column will only be taken into account for the import, it won't work with a mass action. And it also requires the "images" column to be present in the CSV (otherwise the system doesn't know which image name correspond to which image of the product (since a product can have several images))

So to update a brand name in the title/name of images of products, I think the best will be to do it via PHPMyAdmin.
It's actually quite easy. You can follow the instructions at bobcares.com/blog/find-and-replace-in-phpmyadmin/ for the column file_name of the table hikashop_file where the images data is stored.

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

Time to create page: 0.076 seconds
Powered by Kunena Forum