google product category is missing

  • Posts: 155
  • Thank you received: 4
11 years 5 months ago #108929

I cannot get it work

i get

<g:google_product_category> google_product_category </g:google_product_category>

in the xml file

Attachments:

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

  • Posts: 2334
  • Thank you received: 403
11 years 5 months ago #108931

This product probably don't have the custom field "google_product_category".

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

  • Posts: 155
  • Thank you received: 4
11 years 5 months ago #108935

sorry !

Yes you're right. This means i have to pass over each product now and i insert this ???

I gave for default value in the custom field configuration the value

Abbigliamento e accessori &gt; Gioielli &gt;

isn't it possibel to put out the default value given in the field or do you recommend to do it by database ??

Last edit: 11 years 5 months ago by Cattelan.

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

  • Posts: 2334
  • Thank you received: 403
11 years 5 months ago #108945

You execute this query:

UPDATE #_hikashop_product as p LEFT JOIN #_hikashop_product_category as pc
ON p.product_id=pc.product_id
SET google_product_category="whateveryouwant"
WHERE category_id="catID"

just replace the #_ by your tables prefix, whateveryouwant by the value of the custom field and catID by the ID of the category.
This query will then update every product for the category specified

The following user(s) said Thank You: Cattelan

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

  • Posts: 155
  • Thank you received: 4
11 years 5 months ago #108961

Thanks worked great !!

At this point i like to repeat my compliments for your support and remind you if you are planning to upgrade just do it. Great product and great team.

Last edit: 11 years 5 months ago by Cattelan.

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

  • Posts: 2334
  • Thank you received: 403
11 years 5 months ago #109026

Glad to see you're satisfied :), I hope you'll enjoy the coming features!

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

  • Posts: 44
  • Thank you received: 1
11 years 1 month ago #125912

Sorry to bring up an old thread, however this thread is the closest I've come to getting google_product_category to work.

Google has since updated what they require. Many of my products have different categories. Google has also made it so that there are ">" greater than signs IN the TEXT of the variable.

So when I attempt to use the provided code edited for our situation:

UPDATE #xxxx_hikashop_product as p LEFT JOIN #xxxx_hikashop_product_category as pc
ON p.product_id=pc.product_id
SET google_product_category='Vehicles & Parts > Vehicle Parts & Accessories > Motorcycle Accessories'
WHERE category_id="35"

I am provided this error:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ON p.product_id=pc.product_id SET google_product_category='Vehicles & Parts > V' at line 2

Basically this says that the ">" is being treated as a command instead of just text.

I have tried to use "& gt ;" and "& #62 ;" in place of the ">" (yes, I added a space before the ; so my post would show instead of creating a >), but I was provided the same error as above.

What am I doing wrong here? Is there a special character that is used so special characters like this can be used in the SET command?

Thanks! I'm so close I can taste the google_product_category...

Last edit: 11 years 1 month ago by daurwid.

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

  • Posts: 155
  • Thank you received: 4
11 years 1 month ago #125922

did you try the massaction feature?

The following user(s) said Thank You: Jerome, daurwid

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

  • Posts: 44
  • Thank you received: 1
11 years 1 month ago #125934

I attempted to use mass actions for this but all it does it create a "massaction" that never gets applied.

I selected create new under massactions.
I selected the radial button next to "Product" under "Data."
Under "Filters" I added a "Product columns" Filter with 2 rules:
product_published = 1
AND
category_id = 35
Under "Actions" I selected "Update the values"
google_product_category = "STRING" Vehicles & Parts > Vehicle Parts & Accessories > Motorcycle Accessories
I click on Process and it says that "This process will execute."
It then says that it's "Saved" but nothing happens to the database or the products.

Maybe I'm not understanding Massactions feature but it is very hard to use in comparison to just running a SQL command.

What am I missing?

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

  • Posts: 44
  • Thank you received: 1
11 years 1 month ago #125943

So after many attempts to process it, I found that I had to click the X next to the "Trigger" and then click "process"
It all seems good now!
Thanks!

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

Time to create page: 0.085 seconds
Powered by Kunena Forum