Extra link in the cart

Please post your issues and questions about One Page Checkout for Virtuemart 2 to this forum.

Extra link in the cart

Postby estiloss » Wed May 06, 2015 1:37 am

Is it possible to add an additional link in the cart?

Thank you.
Attachments
cart.png
cart.png (29.96 KiB) Viewed 18711 times
estiloss
 
Posts: 2
Joined: Tue Apr 21, 2015 11:06 am

Re: Extra link in the cart

Postby admin » Wed May 06, 2015 3:15 pm

hello, the simplest way to modify or add a new link here is to change your OPC template at:

\components\com_onepage\themes\band_box\onepage.unlogged.tpl.php
\components\com_onepage\themes\band_box\onepage.logged.tpl.php

or see if you are using other variant of band_box theme.


the original code looks like this:
Code: Select all
if ($tos_required)
{

?>
   <div id="agreed_div" class="formLabel " >
   

<input value="1" type="checkbox" id="agreed_field" name="tosAccepted" <?php if (!empty($agree_checked)) echo ' checked="checked" '; ?> class="terms-of-service"  required="required" autocomplete="off" />
               <label for="agreed_field"><?php echo OPCLang::_('COM_VIRTUEMART_I_AGREE_TO_TOS');
               if (!empty($tos_link))
               {
               JHTML::_('behavior.modal', 'a.opcmodal');
               
               ?><br /><a target="_blank" rel="{handler: 'iframe', size: {x: 500, y: 400}}" class="opcmodal" href="<?php echo $tos_link; ?>" onclick="javascript: return op_openlink(this); " >(<?php echo OPCLang::_('COM_VIRTUEMART_CART_TOS').' *'; ?>)</a><?php } ?></label>
            
      
   <?php
   
 
?>
   
   </div>



<?php
}


you only need to copy or add a new <a href tag element - BUT let me know if you need a modal, or just a link with pop-up.

if you'd like to have the popup you can use this:
Code: Select all
<a target="_blank" rel="{handler: 'iframe', size: {x: 500, y: 400}}" class="opcmodal" href="<?php echo JRoute(' YOUR NONSEF LINK COMES HERE');  ?>" onclick="javascript: return op_openlink(this); " >YOUR LINK DESCRIPTION COMES HERE</a>


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

Re: Extra link in the cart

Postby estiloss » Sat May 09, 2015 4:31 am

Thanks Stan,

I solved it. One last question, if I update the component, those changes will be lost?
estiloss
 
Posts: 2
Joined: Tue Apr 21, 2015 11:06 am

Re: Extra link in the cart

Postby admin » Mon May 11, 2015 3:24 pm

hello, all changes in your theme will remain as far as the theme directory is renamed:

/components/com_onepage/themes/YOUR CUSTOM NAME

once altered, you can rename it with opc's button at the display tab "rename theme before update" We try to keep as much backward compatiblity as possible within opc themes.

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


Return to One Page Checkout for Virtuemart 2

cron