Select / exclude products for Google Shopping

  • Posts: 235
  • Thank you received: 4
9 years 7 months ago #196356

-- HikaShop version -- : 3.4.0
-- Joomla version -- : all
-- PHP version -- : all
-- Browser(s) name and version -- : all
-- Error-message(debug-mod must be tuned on) -- : Google Shopping

Is it possible to select or exclude products for the Google Shopping xml-file creation?

I don't want all the products to advertize on Google.

Jan

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

  • Posts: 13201
  • Thank you received: 2322
9 years 7 months ago #196382

Hi,

I think that this will require a small edition in the plugin "plugins/hikashop/google_products/google_products.php" function "generateXML()", here you can add:

$query .= ' AND google_product != '.$db->quote('hide');
Just before:
		$db->setQuery($query);
		$products = $db->loadObjectList();

And create a custom product field named google_product, then in the product edition page of the products which ust not appear in google shopping set the value "hide" for the google_product field.

The following user(s) said Thank You: janvankuijk

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

  • Posts: 235
  • Thank you received: 4
9 years 7 months ago #196758

Will this be part of the standard Hikashop?

Would be great!

Jan

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

  • Posts: 13201
  • Thank you received: 2322
9 years 7 months ago #196768

Hi,

We will discuss about it, but using the custom fields and this simple edition seems to be the best way for now.
Because we can't really add a column in the product table by default in HikaShop for that feature as it is not frequently asked (as I know you are the only one for now ;) ), and if I add the code for the check in the plugin directly, I will have to do a request to check if the column exist or not, so it will add a query for everybody even if a small percent use this feature.

At this time, it don't seem to be a good thing to add it directly in HikaShop, it is better to do this little modification.

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

  • Posts: 235
  • Thank you received: 4
9 years 7 months ago #196916

OK. Thanks!

Somebody has to be the first!
For now I will use the extra code.

Jan

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

Time to create page: 0.046 seconds
Powered by Kunena Forum