VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: odbhaskaran on May 17, 2016, 02:24:55 AM

Title: Changing link
Post by: odbhaskaran on May 17, 2016, 02:24:55 AM
In Virtuemart when I click on Add to Cart a popup comes where 'show cart' menu is displayed.  The link takes to ..../cart   I want to change the link to appear as ..../my-cart/cart   

Help me please
Title: Re: Changing link
Post by: jenkinhill on May 17, 2016, 11:40:17 AM
Why?

http://forum.virtuemart.net/index.php?topic=79799.0
Title: Re: Changing link
Post by: odbhaskaran on May 17, 2016, 11:53:48 AM
Sorry I thought it was a simple method.  I am using VirtueMart 3.0.6.4
Title: Re: Changing link
Post by: Ghost on May 17, 2016, 11:58:07 AM
You can try creating appropriate menu structure so that Cart is the child of My Cart, whatever that might be.
Title: Re: Changing link
Post by: odbhaskaran on May 17, 2016, 18:53:05 PM
That was a good idea creating menu and child menu but it does not work.   

To elaborate a bit further  I have made SEF to 'No' and the full url we get on clicking popup 'show cart' is as below....     

http://......./index.php?option=com_virtuemart&view=cart&Itemid=847     

The full url when I click 'my-cart'  menu is as below

http://....../index.php?option=com_virtuemart&view=cart&Itemid=743       

  I just want to change 847  to  743.   In firebug I am not getting to know where this function is or the path of the file at godaddy to edit.

Has anybody worked on this?     




Title: Re: Changing link
Post by: GJC Web Design on May 17, 2016, 19:26:43 PM
just hard code or str_replace it in an over ridden

components\com_virtuemart\views\cart\tmpl\padded.php

$this->cart_link
Title: Re: Changing link
Post by: odbhaskaran on May 18, 2016, 10:23:54 AM
That was a good lead to the file by GJC .   I tried much but being not a programmer could not get the lead to change the link at the popup menu  'show cart'   as  asked in my first post.

echo '<a class="continue_link" href="' . $this->continue_link . '" >' . vmText::_('COM_VIRTUEMART_CONTINUE_SHOPPING') . '</a>';
echo '<a class="showcart floatright" href="' . $this->cart_link . '">' . vmText::_('COM_VIRTUEMART_CART_SHOW') . '</a>';

Please guide me further.
Title: Re: Changing link
Post by: odbhaskaran on May 18, 2016, 18:27:36 PM
I copied the link as below and it worked.  Thanks GJC  -   

echo '<a class="showcart floatright" href="my-cart ' . $this->cart_link . '">' .

Thanks for the solution to GJC.