i use convead service (https://convead.com/)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?
Update VM.
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.
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.
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.
To be fair, they've been using this hack for 2 years now https://github.com/Convead/joomla_convead/blob/master/README.md.
hohoo, even more fun. I had no clue about. I just added it with the same name, luck, or?
Or sensible naming convention.