News:

Support the VirtueMart project and become a member

Main Menu

Changing link

Started by odbhaskaran, May 17, 2016, 02:24:55 AM

Previous topic - Next topic

odbhaskaran

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

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

odbhaskaran

Sorry I thought it was a simple method.  I am using VirtueMart 3.0.6.4

Ghost

You can try creating appropriate menu structure so that Cart is the child of My Cart, whatever that might be.

odbhaskaran

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?     





GJC Web Design

just hard code or str_replace it in an over ridden

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

$this->cart_link
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

odbhaskaran

#6
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.

odbhaskaran

#7
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.