Post by sopranodesign » Fri Jan 06, 2012 12:01 pm

In the shop I'm developing, users can only see prices and add products to cart only if they create an account. After the user signs up and logs in, the options Billing Details & Delivery Details are automatically filled in with the user's address. All he has to do is click "Continue". The delivery method is set to free and the payment method is set to "cash on delivery".

How can I automatically select these options and hide them so the only step left would be to Confirm the order?

I assume the template file I need to change is catalog/view/theme/default/template/checkout/checkout.tpl but it's almost a 1k lines long and uses ajax which I have very little knowledge of.

I've been trying to do this for a few hours so any help would be greatly appreciated! (question also posted on stackoverflow)

New member

Posts

Joined
Mon Dec 19, 2011 8:52 am

Post by billyggla » Fri Jan 06, 2012 12:07 pm

Search "skip checkout steps"
There is a way to auto click the buttons, then you can comment the code in the template file.

Active Member

Posts

Joined
Mon Sep 20, 2010 7:05 am

Post by sopranodesign » Fri Jan 06, 2012 9:15 pm

Thanks for the reply! I found my answer here. I managed to get it working for Step 3 (delivery method - shipping.tpl) and Step 4 (payment method - payment.tpl). However, if I add the same thing to address.tpl, it send the form into an infinite loop... apparently address.tpl is called upon multiple times.

Here's what I added to address.tpl:

Code: Select all

<script language="Javascript" type="text/javascript">
$(document).ready(function(){
  $('#button-address').trigger('click');
  alert('test'); // to see how many time it's called
});
</script>
Where should I put this code so it will only be called upon once for step 2 - billing details and once for step3 - delivery details?

Thanks again!

New member

Posts

Joined
Mon Dec 19, 2011 8:52 am
Who is online

Users browsing this forum: Semrush [Bot] and 41 guests