Google products plugin

  • Posts: 75
  • Thank you received: 4
8 months 2 weeks ago #360158

-- HikaShop version -- : 5.0.3
-- Joomla version -- : 4.4.3
-- PHP version -- : 8.1

Is there any way to make an additional restriction on the google products plugin based on a custom field value (true-false checkbox)?
There are some products which is not permitted to be in an advert (medicines) but no exact category for them so i cannot use the category filter.

Even a shipping methot would be a good filter as there products are not available with home delivery so I could filter all the product with home delivery and would be fine.

Thanks

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

  • Posts: 83022
  • Thank you received: 13403
  • MODERATOR
8 months 2 weeks ago #360162

Hi,

While there is no option for that, you could add a line like this:
if(!empty($product->skip_google_products)) continue;
after the line:
foreach($products as $product) {
in the file plugins/hikashop/google_products/google_products.php

Then, create a custom field of the table "product" and of the type "checkbox" with one value and with the column name "skip_google_products" so that when the checkbox of that custom filed is checked in the product, the product will be skipped by the Google products plugin.
Note however that this modification will be lost when you update HikaShop. So you'll have to reapply it after updates.

We'll look at doing something for this in a future release.

The following user(s) said Thank You: Ketshweb

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

  • Posts: 1
  • Thank you received: 1
8 months 2 weeks ago #360168

Works great.
Would be a great feature in the future
Thanks

The following user(s) said Thank You: nicolas

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

Time to create page: 0.065 seconds
Powered by Kunena Forum