VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: driver_wedge on July 28, 2016, 11:40:50 AM

Title: Creating menu item for cart
Post by: driver_wedge on July 28, 2016, 11:40:50 AM
Hi..

I want to control which modules display on the cart & checkout pages. To do this, I normally create a Hidden Menu item for the VM Shopping Cart with alias 'cart', so the URL www.mywebsite.com/cart/ displays the cart plus any modules assigned to the Hidden Menu item. When you click on View Cart from the cart module, it takes you to this page. Perfect outcome!

However, the pop-up modal with 'View Cart' and 'Continue Shopping' directs you to the www.mywebsite.com/index.php?option=com_virtuemart&view=cart URL, but I have no control over which modules display here. I would prefer not to turn the pop-up off. Rather than chase me tail for a few hours looking for a solution, can any of your guys suggest something?

Thanks for your time!
Title: Re: Creating menu item for cart
Post by: GJC Web Design on July 28, 2016, 11:51:07 AM
This has been discussed and answered by me quite a few times now!!!

Please use the search....

add the itemid or a fixed menu to the popup
Title: Re: Creating menu item for cart
Post by: driver_wedge on July 28, 2016, 12:21:01 PM
Sorry for not adhering to protocol GJC! I didn't even think about searching. Will take a look now.

On a separate note - do you know of the correct code to change in order to change the 'ADD TO CART' button a listing page to 'VIEW PRODUCT' and link to the individual product listing page? I'll make a search for this too, but just posting in here in advance. Feel free to ignore.

Many thanks for answering.
Title: Re: Creating menu item for cart
Post by: ravbrat on October 28, 2016, 23:22:00 PM
GJC - With all due respect, I have been searching google and this board for hours and hours and this is the only reference to the problem (of the cart showing on my site homepage) that I can find - that has any response.

Using the search feature just returns words from random articles that have not led me to a resolution.
Perhaps - the search function of this board could be appended, to allow 'phrases' instead of just 'words' as that would significantly reduce search times & difficulty and would return far more relevant results which would reduce your workload and multiple responses to individual queries.

If you have answered this/these problem(s):
   /cart showing on home page
   redirecting /cart to another page/position
   menu item for /cart

Then where are the answers because search is not helping me find them....

If this has been asked/answered so many times, why is it not in FAQ?

Why, (since this seems to be an issue) has VM not made this into a module item that can be assigned like any other menu/category item? 


Joomla:   3.6.4
VM:   3.0.18

Thus this is my problem also.  If you do not wish to 're-answer' the details of this, at least please copy/past the article ID's here or create his topic in FAQ with the article ID's.

I (we all) respect the time and effort you and others put forth into helping others here, who depend on you to help us get past these inconvenient issues without having to mortgage our kidneys to hire someone who may not be as good as you....

Respectfully...
Title: Re: Creating menu item for cart
Post by: kishoreonwork on October 29, 2016, 20:58:36 PM
Hello ,

Here is the solution. It can be done very easily with template override. Search for file

templates\your_theme\html\com_virtuemart\cart\padded.php  (Replace your_theme with your default joomla theme)

If it is not present than copy  the file components\com_virtuemart\views\cart\tmpl\padded.php to above specified folder.

Now look for the  below code mostly the 3rd line
echo '<a class="showcart floatright" href="' . $this->cart_link . '">' . vmText::_('COM_VIRTUEMART_CART_SHOW') . '</a>';


Replace  $this->cart_link with your url  see code below

echo '<a class="showcart floatright" href="http://www.mywebsite.com/cart/">' . vmText::_('COM_VIRTUEMART_CART_SHOW') . '</a>';


Thanks & have great day !
Kishore

Title: Re: Creating menu item for cart
Post by: GJC Web Design on October 30, 2016, 00:05:47 AM
http://forum.virtuemart.net/index.php?topic=132116.msg456615#msg456615
http://forum.virtuemart.net/index.php?topic=134252.msg466355#msg466355
http://forum.virtuemart.net/index.php?topic=132824.msg459960#msg459960

any of these work .. as well as above