If I wanted to create a URL directly to guest checkout page, what would it be? Any ideas?
http://localhost/index.php?route=checkout/checkout
v2.3.0.2
Well, sort of. But there is no URL that will force guest checkout. Will need a bit more work than that. And something in the cart as well....
-
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS
Yip, I use something like this to add to the cart, but I want a button to route directly to guest (Express) checkout.
My OC only has one product.
function myFunction() {
//ADDS PRODUCT TO CART
$.get( "index.php?route=checkout/cart/addToCart&product_id=30", function( data ) {
$( "#myForm" ).addClass( "product-added" );
});
My OC only has one product.
function myFunction() {
//ADDS PRODUCT TO CART
$.get( "index.php?route=checkout/cart/addToCart&product_id=30", function( data ) {
$( "#myForm" ).addClass( "product-added" );
});
You could just add a jquery click to the login template, something like:
And have the Guest as the default selection.
If you want some customers to be able to select a different option you could use a URL parameter and use an if statement.
Code: Select all
<script">
$(document).ready(function(){
$('#button-account').trigger('click');
});
</script>
If you want some customers to be able to select a different option you could use a URL parameter and use an if statement.
-
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS
So you would use a link something like:
I would use that in the controller as it is easier to do that then get the parameter with JS.
Then force it to guest. People can still get to it after by clicking on the heading, but you could always hide it also.
Code: Select all
http://localhost/index.php?route=checkout/checkout&guest=1
Then force it to guest. People can still get to it after by clicking on the heading, but you could always hide it also.
Code: Select all
<script>
$(document).ready(function(){
var value = 'guest';
$("input[name=account][value=" + value + "]").attr('checked', 'checked');
$('#button-account').trigger('click');
});
</script>
-
VIEW ALL EXTENSIONS * EXTENSION SUPPORT * WEBSITE * CUSTOM REQUESTS
Who is online
Users browsing this forum: No registered users and 298 guests