News:

Looking for documentation? Take a look on our wiki

Main Menu

How to create plugin for VM

Started by psm, August 13, 2021, 19:36:38 PM

Previous topic - Next topic

psm

Hello, please do you have any good tutorials how to make plugin for VM? I would like just to modify VM checkout by adding jquery code but I cannot find no good articles. Thanks

psm

I just little bit specify my question. What is the best way how to add jquery code by joomla plugin?

Is this the best way? And how can I choose that these code should be applied just for chceckout page?

Thank you

<?php

// no direct access
defined('_JEXEC') or die;

class 
plgContentHelloworld extends JPlugin
{
    public function 
onAfterRender() {
        echo 
'<script>';
            echo 
'alert("Hello World!");';
        echo 
'</script>';
        }
}

?>

GJC Web Design

detect what page your on ..

e.g.

$jinput = JFactory::getApplication()->input;
$option = $jinput->get('option');
$view = $jinput->get('view');
$task = $jinput->get('task');
if ($option == 'com_virtuemart' && $view == 'cart') {
echo 'blah';

}


GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

psm

Thank you, now I am trying to collect and connect all information from web, so I do not know nothing about it.

I just have some intermediate knowldge from jquery, php and html.

When I will know result I will post it here.