hello, i created a function in OPC controller that is accessible with:
index.php?option=com_onepage&view=opc&task=clearcart
now you can use a button with :
- Code: Select all
<a href="<?php echo JRoute::_('index.php?option=com_onepage&view=opc&task=clearcart'); ?> >Clear Cart</a>
i can further add support for <button or <input type="button via javascript but they would still do a redirect to this URL.
let me know if this helps you.
To insert the button/link onto your site, you can edit /components/com_onepage/themes/YOUR OPC THEME/onepage.unlogged (and logged).tpl.php
OR
/overrides/basket.html.php
to use this with a button, you can do this:
- Code: Select all
<button onclick="javascript: return window.location='<?php echo JRoute::_('index.php?option=com_onepage&view=opc&task=clearcart'); ?>';">Clear Cart Button</button>
best regards, stan