I have only 1 product and the checkout process is a little bit of an overkill. I have a button on the site that says buy it now. This takes you to the product details page. Is there a way to change the add to cart button to a direct link to the checkout cart instead of the popup that says to continue shopping or go to cart?
Thanks,
Doc
yes, change the form action to J;;_route to the cart
Thanks, but where is this option, I don't see it?
in the product page template
http://forum.virtuemart.net/index.php?topic=90935.0
Ok, my php knowledge is not that great, so if you could help, it would be appreciated. First, let me make sure I am looking at the correct file. Using Filezilla, I went to components/com_virtuemart/views/productdetails/tmpl. If this is the correct file, I then did a search on "action". One is in a section about reviews, so I the only other section is this:
<?php // Add To Cart Button
if (!VmConfig::get('use_as_catalog',0)) { ?>
<div class="addtocart-area">
<form method="post" class="product js-recalculate" action="index.php"
If this is correct, then I assume I need to change "index.php" to something that takes me to the cart? Could you tell me what to change it to?
If this is totally wrong, could you point me in the right direction?
Thanks.
Doc
add a product to the cart, and then go to the cart, then copy that url
Ok, that seemed easy enough, but it did not work. Here is what I did:
I copied default.php to myview.php and made the following change
Changed <form method="post" class="product js-recalculate" action="index.php" > to <form method="post" class="product js-recalculate" action="index.php/buy/virtuemart/cart" >
Went to the product page, and in the dropdown box Product Details Page, selected myview and saved.
Went back to the site, clicked add to cart, and no change. So I went back and changed index to pindex and even post to prost to try and throw an error, but all still worked the same. So I assume I must be working on the wrong file. Any ideas?
Thanks,
Doc
do a layout override
http://forum.virtuemart.net/index.php?topic=90935.0
put the default.php
in
YOUR_joomla-template/html/com_virtuemart/productdetails/default.php
Nope, still no change.
Went to the following:
.../templates/jt002_j16/html/com_virtuemart/productdetails
In product details folder put the default.php file and modified it. Went back, selected default, and tried again. Nothing. So went back to default.php in the above path and renamed it myview. Went back to VM and now see myview listed under Product details page dropdown. Select it and save. Still no change when click add to cart, still pops up and asks.
Doc
Still waiting to hear back... Any ideas?
Doc
I tried it and it did not work. It used to work like that.
I will have to look into it
Have you found anything? I am trying to get this finished so the site can go live.
Thanks,
Doc
I do not know
I will take it by your response that I will not find a solution to this. I guess I will have to look into a different shopping cart option if no one else can help with a solution. Thanks for your time.
Doc
Quote from: tthdoc on January 05, 2012, 19:34:05 PM
I will take it by your response that I will not find a solution to this. I guess I will have to look into a different shopping cart option if no one else can help with a solution. Thanks for your time.
Doc
turn off "virtuemart product scripts" in vmart administrator
then change the form action of the add to cart form to this index.php?option=com_virtuemart&view=cart
Almost... turning off the script and changing the form action does in fact allow it to go right to cart, with no popup, but the cart has no item or price in it, just an empty cart :( I did notice in the balloon popup that appears where you turn off the script that "these scripts are required for the dynamic operation of the basket and price!". So I guess this option will not work unfortunately.
Doc
$button_cls = 'addtocart-button'; //$button_cls = 'addtocart_button';
$button_name = 'addtocart'; //$button_cls = 'addtocart_button';
Banquet changing the button_cls and button_name in default.php here
$button_cls = 'addtocart-button'; //$button_cls = 'addtocart_button';
$button_name = 'addtocart'; //$button_cls = 'addtocart_button';
is only needed
Was this a discussion or solution? I went to default.php and what you have here is what is in that file. I thought you were suggesting to change something in the code, but now I am lost. Could you clarify?
Thanks,
Doc
$button_cls = 'addtocart-button';
$button_name = 'addtocart';
change the name , and the class
$button_cls = 'button-class';
$button_name = 'button-addtocart';
I changed it and still nothing shows up in the cart when I click add to cart.
Here is the section from components/com_virtuemart/views/productdetails/tmpl/default.php as it is now:
<?php // Add the button
$button_lbl = JText::_('COM_VIRTUEMART_CART_ADD_TO');
//$button_cls = 'addtocart-button'; //$button_cls = 'addtocart_button';
//$button_name = 'addtocart'; //$button_cls = 'addtocart_button';
$button_cls = 'button-class';
$button_name = 'button-addtocart';
turn back on product scrips
Turned product scripts back on and the popup is back again :(
I got it to work 1 time by doing something to the java file , but then it never added to cart again. But went straight to the cart
So are we back to square one with no solution, or is there a possibility of finding one still?
hi there!
any updates on this one? I also need to link my productpage directly to the cart or at least delete "continue shopping" button on popup...
thx in advance!
Yeap,
would be great to have a solution for this.
For VM 2.0.2 and J!2.5.x?
Cheers!
worked for me ! after clicking on "add to cart" takes me straight to the checkout page, also got rid of SKU column and Discount column to simpilfy things even more