OPC breaks customfields (inherited custom_param values)

If you are runnig Joomla 3.x and Virtuemart 3.x please post to this forum your questions or support tickets about One Page Checkout

OPC breaks customfields (inherited custom_param values)

Postby opentools » Mon Jan 05, 2015 2:53 am

Hi Stan,
I'm trying to upgrade opentools from vm2.6 on j2.5 to vm3 on j2.5. Apparently, your OPC plugin overrides some core VM functionality, which breaks custom field param inheritance from the custom. See my posts to the VM dev chat. In particular:

[22:19:28] Reinhold Kainhofer: Probably a stupid / trivial question, but I'm currently fighting with custom field plugins and how a param from the custom is inherited (or not) by the custom field attached to a product.
[22:25:19] Reinhold Kainhofer: In particular, I have a custom with a param "directory", which is then used by the customfield to let the admin select files from that directory. Now, the customfield in plgVmOnProductEdit has:
Code: Select all
   [custom_params] => compatibility=[]|directory="plugins\/vmcustom\/versioncompat\/versioncompat\/images\/Joomla"|
   [customfield_params] => compatibility=["j15.png","j25.png","j30.png"]|directory=""|
   [directory] => plugins/vmcustom/versioncompat/versioncompat/images/Joomla

So in the backend's product edit page, the customfield inherits the directory from the custom_params.

However, in plgVmOnDisplayProductFEVM3 (i.e. on the product page in the FE), the customfield does NOT inherit the value from the custom:
Code: Select all
    [custom_params] => compatibility=[]|directory="plugins\/vmcustom\/versioncompat\/versioncompat\/images\/Joomla"|
    [customfield_params] => compatibility=["j15.png","j25.png","j30.png"]|directory=""|
    [directory] =>


If you want, I can send you a custom field plugin (which I'm currently developing), where I run into this very problem.

Best regards,
Reinhold
opentools
 
Posts: 2
Joined: Mon Jan 05, 2015 2:46 am

Re: OPC breaks customfields (inherited custom_param values)

Postby admin » Wed Jan 14, 2015 12:01 pm

hello reinold, there should be absolutely no difference when running opc versus vm core in this functionality because the overrided opc vmplugin.php file uses the code merge of both vm2 and vm3 with lot's of added features to it (such as get plugin's object with callable functions), filtering orderConfirmed per plugin type so it's called in a proper order and muh more, a few caching code.

yes, i think it would be easiest if i check your plugin on my demos and either do a change in core opc, or suggest you a change in your plugin.

best regards, stan
admin
Site Admin
 
Posts: 2708
Joined: Wed Jan 06, 2010 11:43 pm


Return to One Page Checkout for Virtuemart 3 on Joomla 3.x