How to import product_layout in csv file?

  • Posts: 12
  • Thank you received: 0
11 years 6 months ago #100670

There is an option on the product page named 'Layout on product page'. The option is 'inherit' by default but I want to change it to my custom layout. I made this custom layout in 'views' and everything is OK when I change it manually but it seems it doesn't work when I try to import csv file.

I made a column named 'product_layout' in csv file and placed a value in the column, let's say 'show_default_000'. I imported the file without any problems but the layout didn't change at all, it's still 'inherit' on the product page although in the phpmyadmin it's 'show_default_000'.

What I did wrong? Why doesn't import work?

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

  • Posts: 82760
  • Thank you received: 13347
  • MODERATOR
11 years 6 months ago #100674

if it shows the correct value in phpmyadmin then you will have the correct value in HikaShop since hikashop displays the value from the database...
I'm guessing that you're not looking at the correct place.

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

  • Posts: 12
  • Thank you received: 0
11 years 6 months ago #100681

I'm looking at the table 'hikashop_product' in the database and at the column 'product_layout'. If it's not the correct place, please, tell me where the correct place is.

Also, when I change manually, for example, to 'show_tabular' I can see how it also changes in phpmyadmin, from 'show_default_000' to 'show_tabular'. After that I import my csv file, in phpmyadmin it's 'show_default_000' again but on the product page it's 'inherit'.

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

  • Posts: 82760
  • Thank you received: 13347
  • MODERATOR
11 years 6 months ago #100686

That means that the system couldn't find any view file called show_default_000 and thus discarded your value to use the default one.

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

  • Posts: 12
  • Thank you received: 0
11 years 6 months ago #100706

Well, I do understand that the system couldn't find any view file called show_default_000, I do not understand why. I can change change the view on the product page but can't import it via csv. And I'm absolutely sure that there is no mistake in the name - it's show_default_000, I checked like 10000 times. By the way, I tried to import default Hikashop views, like show_tabular, and it works. But my custom view does not. Can it be somehow connected to a template because on the product page the custom view is under 'from --- template override'? It seems, import works with default views but doesn't with template.

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

  • Posts: 82760
  • Thank you received: 13347
  • MODERATOR
11 years 6 months ago #101170

I'm sorry but everything is working fine for us.
I tried on our end an import of that CSV:

product_name,product_layout
my_prod_test,show_default_000
and I got the product created with the show_default_000 custom view file attached to it.

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

  • Posts: 12
  • Thank you received: 0
11 years 6 months ago #101252

Well, in fact, I solved the problem. I made a new csv file with only 2 columns: product_code and product_layout. And it worked. So, it seems that the problem was with the big csv file that had like 15 or more columns. Something somewhere in the file was the cause of the problem. But what was it I have no idea, need to recreate the file step by step now to find out what information is 'bad'.

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

  • Posts: 14
  • Thank you received: 2
11 years 6 months ago #101412

I'm not sure if this will help, but I've created a Microsoft Excel spreadsheet with probably over 70 columns containing every field possible for a particular product. It comes complete with comments if you hover over many of the column headers and even a visual tutorial to demonstrate how to export the file as CSV and import into HikaShop 2.x+.

The spreadsheet mentions (via comments) that you can either leave the product_layout field blank to set as Inherit, or set as any of the following:

  • show_default
  • show_reversed
  • show_tabular

I hope this is helpful to somebody out there needing to import multiple products quickly and efficiently.

The following user(s) said Thank You: nicolas

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

Time to create page: 0.076 seconds
Powered by Kunena Forum