Jump to content
NimaP

One Page Checkout Support

Recommended Posts

Hiya

 

99.9% of our customers are from England, is there anyway to make the default state (zone) area default to england

 

The default country is set as the UK

 

so instead of having - please select on the drop down, have England there instead ?

 

Thanks

ron

 

 

Hi

I didn't mean the country as default (it already is) - I mean the State / Region / County.

 

it shows as please select - as the Default country is UK - can it not be set to england as default instead of "please select" ?

Edited by fernyburn

Share this post


Link to post
Share on other sites

I use that code on all my sites with sts over severaldomains and it appaesr to work on them all.

 

example code for complete file

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html $htmlparams>
<head>
<!--$headcontent-->
<link rel="stylesheet" type="text/css" href="$templatedir/stylesheet.css">
   <link rel="alternate" type="application/rss+xml" title="<?php echo STORE_NAME . ' - ' . BOX_INFORMATION_RSS; ?>" href="<?php echo FILENAME_RSS, '?language=' . $key;  ?>">
<link rel="stylesheet" type="text/css" href="ext/jQuery/themes/smoothness/ui.all.css">
</head>
<body>
<?php include("header.php.html"); ?>
<table width="800px" align="center"><tr><td>
<table border="0" width="100%" cellspacing="0" cellpadding="1">
   <tr class="headerNavigation">
       <td class="headerNavigation">
             
           $breadcrumbs
       </td>
       <td align="right" class="headerNavigation">
           $myaccountlogoff | $cartcontents | $checkout
             
       </td>
   </tr>
</table>

<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
   <td valign="top" align="left">
     <table border="0" width="125" cellspacing="0" cellpadding="2">
<tr><td>$rapidsslbox</td></tr>               
<tr><td>$categorybox</td></tr>
       <tr><td>$manufacturerbox</td></tr>
       <tr><td>$whatsnewbox</td></tr>
       <tr><td>$specialbox</td></tr>
       <tr><td>$searchbox</td></tr>
       <tr><td>$featuredbox</td></tr>
<tr><td>$informationbox</td></tr>
<tr><td>$paypallogobox</td></tr>
<tr><td>$affiliatebox</td></tr>
     </table>
   </td>
   <td valign="top" align="center">
           <p>$content

   </td>
   <td valign="top" align="right">
     <table border="0" width="125" cellspacing="0" cellpadding="2">
<tr><td>$safebuybox</td></tr>
       <tr><td>$cartbox</td></tr>
<tr><td>$competitionbox</td></tr>
             <tr><td>$orderhistorybox</td></tr>
       <tr><td>$bestsellersbox</td></tr>
       <tr><td>$reviewsbox</td></tr>
       <tr><td>$tellafriendbox</td></tr>
        <tr><td>$faqdeskbox</td></tr>
<tr><td>$newsdeskbox</td></tr>
     </table>
   </td>
 </tr>
</table>
</td>
 </tr>
</table>
<?php include("footer.php.html"); ?>

</body>
</html>


<!-- dialogs_bof //-->
<div id="loginBox" title="Log Into My Account" style="display:none;"><table cellpadding="2" cellspacing="0" border="0">
<tr>
 <td class="main">E-Mail Address:</td>
 <td><input type="text" name="email_address" id="email_address"></td>
</tr>
<tr>
 <td class="main">Password:</td>

 <td><input type="password" name="login_password" maxlength="40" id="login_password"></td>
</tr>
<tr>
 <td colspan="2" align="right"><img src="includes/languages/english/images/buttons/button_login.gif" border="0" alt="IMAGE_LOGIN" title=" IMAGE_LOGIN " width="100" height="22" id="loginWindowSubmit"></td>
</tr>
</table></div>
<div id="addressBook" title="Address Book" style="display:none"></div>
<div id="newAddress" title="New Address" style="display:none"></div>
<!-- dialogs_eof//-->

 

as you can see the site is heavily modified, if that doesn't work I dont know I could look at the site I guess, and it depends on what version of OPC you are using I guess (i am using a modified version 1.3 I belive)

 

 

Your code is working. Thanks a lot.

Share this post


Link to post
Share on other sites

Hi this is the wrong thread, ajax one page checkout has its own support on another site http://forums.advancewebsoft.com/index.php?board=8.0

 

Steve

Thank you Steve!


I am currently just learning osCommerce and PHP, but am always willing to help out.

 

Have successfully installed the following: Discount Coupons, UPS shipping module, Ultimate SEO URL's, Easy Meta Tags for SEO 1.0, Google XML Sitemap SEO v1.3, HTML Editor for Email and Newsletters.

Share this post


Link to post
Share on other sites

Hi,

 

in checkout.php and includes/classes/onepage_checkout.php

 

search for <? and make sure all occurrences are the full tag <?php

 

Steve

 

Thank you Steve, but still not working.

I had this done, and I have double checked all is alright.

seriously, could you please post a checkout.php working file, as well as billing_address.php working file as an example, or send them by e-mail to me?

 

Thank you

Share this post


Link to post
Share on other sites

Thank you Steve, but still not working.

I had this done, and I have double checked all is alright.

seriously, could you please post a checkout.php working file, as well as billing_address.php working file as an example, or send them by e-mail to me?

 

Thank you

Hi

 

Sorry i cant, 1.2 wouldnt work for me ie login, shipping/billing addresses so i went back to 1.1

 

Steve

Share this post


Link to post
Share on other sites

Hi

I didn't mean the country as default (it already is) - I mean the State / Region / County.

 

it shows as please select - as the Default country is UK - can it not be set to england as default instead of "please select" ?

Hi

 

Mine says the country not please select by the country code in admin>configuration>one page checkout, unless they changed that in 1.2

 

Steve

Share this post


Link to post
Share on other sites

Hi

 

Mine says the country not please select by the country code in admin>configuration>one page checkout, unless they changed that in 1.2

 

Steve

 

 

it still does it the latest version....

I was wondering if any one knew how to change the code

Share this post


Link to post
Share on other sites

i have code like this to check if something was bought from a gift registry.

   if($cart->registry_customers_id == '0'){

 

this works fine the first time in the onepagecheckout, but not when the page is refreshed, it seems to get lost during the refresh.

 

Do you have any idea where I should look or how to fix this ?

 

 

Secondly, I'm trying to setup free shipping for giftregistry purchases, basically I want to force free shipping, or no shipping cost for these orders. What is the best way to go about this ?


KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Share this post


Link to post
Share on other sites

i have code like this to check if something was bought from a gift registry.

   if($cart->registry_customers_id == '0'){

 

this works fine the first time in the onepagecheckout, but not when the page is refreshed, it seems to get lost during the refresh.

 

Do you have any idea where I should look or how to fix this ?

 

 

Secondly, I'm trying to setup free shipping for giftregistry purchases, basically I want to force free shipping, or no shipping cost for these orders. What is the best way to go about this ?

What file did you add that to? i think it would be better in includes/classes/onepage_checkout.php

 

to have free shipping you need to add some code in the shipping module you are using

ie

find some code like this it might not have count at the end

// class methods
   function quote($method = '') {
     global $order, $total_count;

 

add after it something like this

// disable the module if  free shipping
     if ($this->enabled == true) {
       global $cart;
       if ($cart->registry_customers_id == '0') {
         $this->enabled = false;
       }
     }

 

Steve

Edited by steve_s

Share this post


Link to post
Share on other sites

My goodness this contribution is buggy

 

customers are phoning up saying that the page details aren't updating,

ie no billing or shipping information is being shown, even though every box has got a green tick against it.

 

is there any way to force this to load the shpping / billing so the customer can actually 'checkout'

Share this post


Link to post
Share on other sites

My goodness this contribution is buggy

 

customers are phoning up saying that the page details aren't updating,

ie no billing or shipping information is being shown, even though every box has got a green tick against it.

 

is there any way to force this to load the shpping / billing so the customer can actually 'checkout'

Hi, if its not updating, do they have javascript enabled in their browser, if its turned off ajax shouldnt work, i would say till you can get it fixed best to turn it off,

 

there is a setting in admin to allow loged in customers to have it auto filled in, or you could enable force login to true, combine login/create account from fast easy checkout, and use the add on account create success skip, now you have a 2 page checkout and it will/should work fine

 

Steve

Share this post


Link to post
Share on other sites

Hi

I just noticed a problem with my website, which i haven't had before as ive been using this contribution for a live few a months, everything works fine except for today.

 

Order process emails are missing shipping and billing addresses on customer emails and our confirmation emails.

we do have a copy in our admin of all the details of the purchases, this only happens when the customer does not create an account with us and using paypal standard, it works fine with Sage pay customers who have not created an account,

 

I noticed in earlier postings that a lot of people have had this problem but i can not find a solution.

 

I am using one page checkout 1.2 and havent changed the coding in a long while. It seems to knock off the stock levels and process the transaction smoothly, its just my customers are worried that have not received address confirmation in the emails.

 

I hope somebody can help me

 

Thanks in advance

 

Emma xx

Share this post


Link to post
Share on other sites

Hi

I just noticed a problem with my website, which i haven't had before as ive been using this contribution for a live few a months, everything works fine except for today.

 

Order process emails are missing shipping and billing addresses on customer emails and our confirmation emails.

we do have a copy in our admin of all the details of the purchases, this only happens when the customer does not create an account with us and using paypal standard, it works fine with Sage pay customers who have not created an account,

 

I noticed in earlier postings that a lot of people have had this problem but i can not find a solution.

 

I am using one page checkout 1.2 and havent changed the coding in a long while. It seems to knock off the stock levels and process the transaction smoothly, its just my customers are worried that have not received address confirmation in the emails.

 

I hope somebody can help me

 

Thanks in advance

 

Emma xx

 

I stand corrected it also happens on Sage Pay, just had an order with the same problem, no shipping or address on the confirmation email when customer does not create an account.

Share this post


Link to post
Share on other sites

What file did you add that to? i think it would be better in includes/classes/onepage_checkout.php

 

to have free shipping you need to add some code in the shipping module you are using

ie

find some code like this it might not have count at the end

// class methods
   function quote($method = '') {
     global $order, $total_count;

 

add after it something like this

// disable the module if  free shipping
     if ($this->enabled == true) {
       global $cart;
       if ($cart->registry_customers_id == '0') {
         $this->enabled = false;
       }
     }

 

Steve

excellent, that is the hint I needed, I tried in different places to disable the call to the shipping modules, but as you point out, it is better to approach it from the other end and disable the module if a registry purchase is being made.

 

Thanks !


KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Share this post


Link to post
Share on other sites

I've added the held orders code as per instructions on contribution page

http://www.oscommerce.com/community/contributions,1153

 

basically, one line added to the setPaymentMethod section, but I'm getting my order_totals twice, anyone seen this too ?

I have 2 languages, but I don't think it is because of that since it shows twice in the same language.

Could it be that order_total_process is called twice and thus generating duplicates ?


KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Share this post


Link to post
Share on other sites

I've added the held orders code as per instructions on contribution page

http://www.oscommerce.com/community/contributions,1153

 

basically, one line added to the setPaymentMethod section, but I'm getting my order_totals twice, anyone seen this too ?

I have 2 languages, but I don't think it is because of that since it shows twice in the same language.

Could it be that order_total_process is called twice and thus generating duplicates ?

 

Hi

 

See this post http://forums.oscommerce.com/topic/333292-one-page-checkout-support/page__view__findpost__p__1465358

 

Steve

Share this post


Link to post
Share on other sites

I've made the change as suggested in the above thread, but it didn't solve my problem. I found the issue and solution.

 

The double entry was caused by the $order_total_modules->process() being called twice, once in checkout.php and once in held_orders_process.php

 

I've changed checkout.php

 

from

 require(DIR_WS_CLASSES . 'order_total.php');
 $order_total_modules = new order_total;
 $order_total_modules->process();

 

to

 require(DIR_WS_CLASSES . 'order_total.php');
 $order_total_modules = new order_total;
 $order_totals = $order_total_modules->process();

 

and in held_orders_process.php added the check to see if $order_totals was already generated. This way the held orders functionality stays functional with and without one page checkout.

 

 $order_totals = $order_total_modules->process();

 

to

 if (!is_array($order_totals)) {
   $order_totals = $order_total_modules->process();
 }

 

Hope this is usefull for someone, as I've spent quite sometime on this trying to understand what was going on ;)


KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Share this post


Link to post
Share on other sites

Hello

I have 2 problems with this contribution

1. I'm using Cyrillic code page - windows-1251 and it don't show correctly characters.

I check every file from contribution and hard coded 'charset=1251', but without success

2. I'm not able to login with login button - I receive message Authorization failed

I'm using STS and check all instructions from previous posts.

Any ideas will be appriciate

Thank You

Share this post


Link to post
Share on other sites

Hello from Spain¡

 

Nice contrib¡ But when I try to create an account, when I put the country, I can't go ahead filling more fields because the Loading box it's always on the front.

 

it's only happen in Internet Explorer 8. In Mozilla doesn't happen.

 

Best regards,

Javier

Share this post


Link to post
Share on other sites

Hello from Spain¡

 

Nice contrib¡ But when I try to create an account, when I put the country, I can't go ahead filling more fields because the Loading box it's always on the front.

 

it's only happen in Internet Explorer 8. In Mozilla doesn't happen.

 

Best regards,

Javier

Hi,

 

Try moving all the javascript in checkout.php to inside the <head></head> tags

 

Steve

Share this post


Link to post
Share on other sites

Hello

I have 2 problems with this contribution

1. I'm using Cyrillic code page - windows-1251 and it don't show correctly characters.

I check every file from contribution and hard coded 'charset=1251', but without success

2. I'm not able to login with login button - I receive message Authorization failed

I'm using STS and check all instructions from previous posts.

Any ideas will be appriciate

Thank You

Hi

 

Ajax calls and passes can only handle utf8 code, either use utf8 code or try and find a php code converter if there is one

 

Steve

Share this post


Link to post
Share on other sites

Hello.

I need to do some thing:

I have only two allowed payment methods: Paypal or PayOnDelivery.

The main difference are that the first has no extra delivery costs, and the second has.

 

it is too ugly to say "select this to PayOnDelivery" as shipment fee.

 

How can I automatic select Delivery method based on Payment Method?

 

Thank you

Share this post


Link to post
Share on other sites

Hi

I just noticed a problem with my website, which i haven't had before as ive been using this contribution for a live few a months, everything works fine except for today.

 

Order process emails are missing shipping and billing addresses on customer emails and our confirmation emails.

we do have a copy in our admin of all the details of the purchases, this only happens when the customer does not create an account with us and using paypal standard, it works fine with Sage pay customers who have not created an account,

 

I noticed in earlier postings that a lot of people have had this problem but i can not find a solution.

 

I am using one page checkout 1.2 and havent changed the coding in a long while. It seems to knock off the stock levels and process the transaction smoothly, its just my customers are worried that have not received address confirmation in the emails.

 

I hope somebody can help me

 

Thanks in advance

 

Emma xx

 

Any help on this issue would be most welcome, i still cant find a solution

Share this post


Link to post
Share on other sites

Any help on this issue would be most welcome, i still cant find a solution

Hi Emma,

 

Im not sure what is happening maybe use 1.1 it seems less buggy to me can also try reporting that bug to email they give in install guide

 

Steve

Share this post


Link to post
Share on other sites

Hello.

I need to do some thing:

I have only two allowed payment methods: Paypal or PayOnDelivery.

The main difference are that the first has no extra delivery costs, and the second has.

 

it is too ugly to say "select this to PayOnDelivery" as shipment fee.

 

How can I automatic select Delivery method based on Payment Method?

 

Thank you

Hi

 

see if one of these can help you out

default shipping

http://addons.oscommerce.com/info/4396

or no default

http://addons.oscommerce.com/info/6269

 

Steve

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×