Shopping Basket

 x 

Cart empty


Log In

Find Us Elsewhere

SSL

Forum Search

Keyword

Custom Filecd for Google Product Categoories

  • 4FootyFans
  • 4FootyFans's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
More
2 months 2 weeks ago #8107 by 4FootyFans
Hello

Because category mapping is inadequate for our purposes, I decided to look at the custom field option.

So, I created a (customfieldsforall) custom field as a String, dropdown.

I then imported some categories from the taxonomy spreadsheet and applied the approppriate one to just one product.

All good, so far.

In GBXML->Product Options, I allocated the custom field to the Google Product Category section.

Still good.

When running the feed which contains the one product, the product is omitted from the output file.

Every other relevant product is there.

On the other hand, if I create a product variant for the product, the product IS included in the output file.

Ignoring 'use the product variant method, then', any idea(s) why the custom field method does not work?

TIA

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

More
2 months 2 weeks ago #8111 by boggler
Replied by boggler on topic Custom Filecd for Google Product Categoories
Adding a custom field to the product would not affect whether or not it appears in the feed. You seem to be connecting two entirely unconnected issues.

The fact that the product is not being displayed in the feed is apparently due to the variant options. If you have "Show Product Variants" set to yes, then when a product has child products, the child products will be shown in the feed, the parent products will not.

If you don't want this behaviour you can instead set the option to "Depending on custom field", and for "Variant Custom Field" select the field that Virtuemart uses to handle the child fields, eg the generic child variant field.

Then parent products that don't have a generic child variant field will be treated as normal products.

Turning to the Google category, looking at the code that handles this, if you are using category mapping then this will override any custom fields for the Google category. So you need to use either custom fields or category mapping.

We can change this though in the next release to make it a bit more flexible, so that you can still use category mapping, and just override this occasionally using a custom field.

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

  • 4FootyFans
  • 4FootyFans's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
More
2 months 2 weeks ago #8112 by 4FootyFans
Replied by 4FootyFans on topic Custom Filecd for Google Product Categoories
I already have variants set to depending on custom field.
See attached for current settings
Attachments:

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

More
2 months 2 weeks ago #8113 by boggler
Replied by boggler on topic Custom Filecd for Google Product Categoories
Yes, this is why it is not working, the settings are wrong. You should not be using the 'google_product_category' field for the 'Variant Custom Field' option. . Please see my explanation above.

For a feed of one product, just set 'show product variants' to no. For a feed where you want some products to be treated as variants, set the 'Variant Custom Field' option to select the field that Virtuemart uses to handle the child product variants, eg the generic child variant field.

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

  • 4FootyFans
  • 4FootyFans's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
More
2 months 2 weeks ago #8114 by 4FootyFans
Replied by 4FootyFans on topic Custom Filecd for Google Product Categoories
Sorry, I should have said that, before applying the custom field to variants, Variants was already set to NO.

I have switched Variants to No, again, and the product is still not included.

Here's the field in the particular product:

Attachments:

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

  • 4FootyFans
  • 4FootyFans's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
More
2 months 2 weeks ago #8117 by 4FootyFans
Replied by 4FootyFans on topic Custom Filecd for Google Product Categoories
Ok, not sure I understand this.

1. Removed the custom field from the product:
Product still omitted from feed
2. Removed the "google_category_product" custom field from the Product Options->Google Category Options:
Product still omitted from feed
3. Ensured Product Override still disabled then Advanced->Check for Product Overrides->YES
Product still omitted from feed
4. Ensured Product Override still disabled then Advanced->Check for Product Overrides->NO
Product still omitted from feed
5. Enabled Product Override then Advanced->Check for Product Overrides->YES
Product INcluded in the feed

???

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

More
2 months 1 week ago #8118 by boggler
Replied by boggler on topic Custom Filecd for Google Product Categoories
I don't understand why you are making this so complicated - it is really not. All that you need to do to display the Google category in a custom field is to add the custom field to the product, and select that custom field in Product Options->Google Category. You should not normally be using that custom field for any other product options. So:-

Don't remove the custom field from the product.
Don't Remove the "google_category_product" custom field from the Product Options->Google Category Options

Do remove the "google_category_product" custom field from the variant custom field option.

There is absolutely nothing in adding a custom field to a product that would prevent it from displaying, except that in your settings you are using it wrongly from the variant custom field option.

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

More
2 months 1 week ago #8120 by boggler
Replied by boggler on topic Custom Filecd for Google Product Categoories
Also it looks like you are using a plugin field for the Google product category, I don't think that is likely to display the correct value, because Virtuemart stores the values of plugin fields differently from other fields such as string fields and other fields. You would need to use a string field.

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

  • 4FootyFans
  • 4FootyFans's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
More
2 months 1 week ago #8121 by 4FootyFans
Replied by 4FootyFans on topic Custom Filecd for Google Product Categoories
Ah! That's more like the probable issue.

So, to use a string customfield for every Google (leaf) category would require 000s of customfields?

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

More
2 months 1 week ago #8122 by boggler
Replied by boggler on topic Custom Filecd for Google Product Categoories
No, that would be madness. You only need one custom field, you can attach the same field to each product, just supply the custom field value as a string when you attach it to the product.

It's probably easier to attach the category number rather than the category tree as a string, but it is up to you.

Out of interest, what is the plugin that you are using? I am wondering if there is a way of integrating with it.

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

  • 4FootyFans
  • 4FootyFans's Avatar Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
More
2 months 1 week ago #8123 by 4FootyFans
Replied by 4FootyFans on topic Custom Filecd for Google Product Categoories
The reason for using the plugin was that I could import the whole taxonomy into the plugin's db table and access it as a dropdown list.
That worked fine in the actual product but was unmanageable in the customfield itself due to the huge number of entries (+ 1 for EVERY different language!), Ouch!
Anyway, here's the link to the plugin. I've been using it for product variations for several years:
breakdesigns.net/extensions/joomla/custom-fields-for-all

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

More
2 months 1 week ago #8124 by boggler
Replied by boggler on topic Custom Filecd for Google Product Categoories
Yes I can see the problem. What might be more useful is a plugin that does an AJAX search of the product taxonomy. Even then you would probably get a lot of results. Still it is something to think about.

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

Moderators: boggler
Time to create page: 1.150 seconds

Donate to Us

If you like our extensions, consider making a donation to say thanks.