News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Convead - how about "no hacking"?

Started by d0ublezer0, August 28, 2017, 11:28:19 AM

Previous topic - Next topic

d0ublezer0

i use convead service on my site.
there is instruction how to install plugin:
Quote
    If you run your store under VirtueMart, you have to make some additional changes in store's source code.:

    Open components/com_virtuemart/helpers/cart.php file.
    Find function public function add(...) {...}
    Insert the following code at the bottom of the function before if ($updateSession== false) return false; line:

/* Convead hack */
JPluginHelper::importPlugin('vmcustom');
$dispatcher = JEventDispatcher::getInstance();
$dispatcher->trigger('plgVmOnAddToCart',array($this));
/* End Convead hack */
how to do this without core hack?

Ghost


d0ublezer0

Quote from: Ghost on August 28, 2017, 11:34:18 AM
Update VM.
Haha, And after update, i lose this hack. ((
The question was, how to do the same, but without the hack? Is it possible? It's hard to remember always where the non-standard approach is used.

Ghost

No, really, update VM. This was just added in 3.2.4.

http://virtuemart.net/news/latest-news/481-virtuemart-3-2-4-released-with-new-payment-options

QuoteNew triggers increase the flexibility of VirtueMart. The triggers plgVmBeforeStoreProduct and plgVmAfterStoreProduct in the product model allows automatically set product properties. The triggers plgVmOnUpdateCart (in cart controller) and plgVmOnAddToCart (in cart helper function add) give programmers more control when a user is adding an item to the cart.

Milbo

That is nice, they saw that I added it in the svn and already used it and gave their users so long the advice how to add it.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Ghost


Milbo

hohoo, even more fun. I had no clue about. I just added it with the same name, luck, or?
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Ghost