VirtueMart

WooCommerce

Others

Docs

Support

Demo

Blog

About

Add Buyers to Joomla Groups for VirtueMart

We are currently unable to provide proper support!

For the last few months we have been very busy working on some huge, very time-consuming and time-sensitive projects, so our support was very limited and we were unable to provide proper support in our forums! We now have a huge backlog of requests from our customers, which we are trying to clear bit by bit. Unfortunately, this takes longer than we anticipated, so our response time is not yet up to par. We are trying our best to improve this situation as soon as possible.

Sorry for the inconvenience and thank you for your understanding!

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Plugin not working for child products, unless the Override flag is ticked

Plugin not working for child products, unless the Override flag is ticked 05 Jul 2018 23:19 #1

  • aftertaf
  • aftertaf's Avatar Topic Author
  • Offline
  • Posts: 4
Hi,
I've been going crazy trying to figure out why the plugin stopped working, and I just figured it out.
I wanted to let others know, and maybe also suggest an improvement (when you have time, the workaround is in the subject :) )
So, i've created some products and assigned the plugin to them.
I've then created child products and it is only the child products that can be purchased.
The children all inherit the plugin and the groups to add/remove to.
But clients don't get added.

I just tested by ticking the override box on one of the children, and with this it works.
I had 16 children products in all that are concerned by this, so was easy enough to tick the box on all of them.
If you could make this work without having to tick the override box, it might save some other person going nuts :)
Thank you for your very good and very simple to use products, and hope the Huge project is going well.
Like i said, no rush, workaround easy to do and in place :)
David

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

Plugin not working for child products, unless the Override flag is ticked 10 Sep 2018 17:35 #2

Dear David,
Sorry to hear about the trouble that you had with the plugin.

Your observation is entirely correct: The plugin will only work when you tick the override box.
Technically, the reason is that the core VM function to retrieve the custom field (VirtueMartModelCustomfields::getCustomEmbeddedProductCustomFields) uses a direct SQL query to the database, thuse ignoring all products that only inherit the custom field. If you tick that box, VM will save the custom field together with the child product and also properly retrieve it. If that box is not ticked, VM will store the custom field only together with the parent product. Those parts in VM where custom fields inherited from parent products are working, add explicit code to handle this situation.

For now, I don't have any plans to implement this. As a workaround, one has to tick the "override" box, which should not be too hard, once you know about the problem.

Best regards,
Reinhold

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

  • Page:
  • 1