Contributions
One Page Checkout for 2.3.1
Credit goes to original authors. Just made some changes so that it works with 2.3.1.
Released with no guarantees whatsoever. Use at your own risk, and BACKUP FIRST.
This is a starting point for those wishing to use OPC with osc2.3.1. Others are also working on their versions and hopefully, we can get them merged for the best results possible.
I'm sure someone will come along with something better after a while, but for now, this is a good start.
Expand All / Collapse All
This contribution is being deprecated and will no longer be maintained.
A new, and MUCH better contribution has been released and can be found here:
http://addons.oscommerce.com/info/8338
For those wishing to switch from this contribution to the new one, simply remove all code from your template_top.php file that pertains to checkout.php and install the new contribution.
You may wish to remove all reference to the old contribution, but if not, then it will simply lie dormant and will not interfere with the new one.
Enjoy.
Now is formatted in modular method to better follow 2.3 methods. Thus the version change.
Many changes, and is stable under bog standard installation. Be sure to test first before using for live shop, does not work with all payment methods under all circumstances.
One change only applicable if using CCGV for 2.3.1
Replaces the coupon "redeem" button image with jquery button.
Moves "use credit voucher" to the cart box below the coupon redemption box instead of the payment options box.
Let's try that again. Order totals were doubling. The simple fix for those who already have 10.4 installed:
Find and DELETE two lines in classes/onepage_checkout.php around line 234:
$shown_price = tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'];
$order->info['subtotal'] += $shown_price;
Otherwise, this is a FULL PACKAGE
I do believe that this is fully functional now.
Removed unnecessary settings from admin panel.
When allowing checkout without login, the login button, and the checkbox for setting a different shipping address were missing. They are present now and working.
When logging in from checkout, billing and shipping addresses were not showing correctly. Page refreshes on login, so that sessions are set and all boxes are updated correctly. This also updates the buttonset at the top of the page to show customer is logged in.
Fixes the edit address buttons in checkout. They are fully functional.
Fixes the entire layout to match your store's jquery ui theme. Required a core change to the boxes class, which has no affect on a stock 2.3.1 shop.
Moved shipping options above payment options.
Will try to fix the admin settings soon as they are really quite an annoying mess.
FULL PACKAGE
I have found that IE9 doesnt seem to like OPC231, and also found that Chrome wont save address details. I have come up with a fix by combining the onepagecheckoutjsfix text file that was supplied with v10.3.
Remember BACKUP before using this file. If anyone with more experience can improve on this file, feel free to do so.
Not a complete package, only checkout.js, overwrite original file found in includes/checkout/
There is a bug in the change address section [ both billing and shipping ] such that it always show the primary address . After applying this you can change the billing and shipping address
******ALWAYS TAKE BACKUP OF FILE BEFORE YOU CHANGE******
Uploaded File
--------------
checkout.php
Replace with the old file only if you have fresh installation else follow these steps
1. Find
$billingAddress .= '<div style="float:right">'. tep_draw_button(IMAGE_BUTTON_CHANGE_ADDRESS, 'home', tep_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL')).'</div>'; - Line 361
Replace that with
//$billingAddress .= '<div style="float:right">'. tep_draw_button(IMAGE_BUTTON_CHANGE_ADDRESS, 'home', tep_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL')).'</div>';
$billingAddress .= '<div style="float:right;"><span class=""><a href="'.tep_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL').'" id="changeBillingAddress" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-primary ui-priority-secondary" role="button"><span class="ui-button-icon-primary ui-icon ui-icon-home"></span><span class="ui-button-text">'.IMAGE_BUTTON_CHANGE_ADDRESS.'</span></a></span></div>';
2. Find
$shippingAddress .= '<div style="float:right">'. tep_draw_button(IMAGE_BUTTON_CHANGE_ADDRESS, 'home', tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL')).'</div>'; - Line 382
Replace that with
//$shippingAddress .= '<div style="float:right">'. tep_draw_button(IMAGE_BUTTON_CHANGE_ADDRESS, 'home', tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL')).'</div>';
$shippingAddress .= '<div style="float:right;"><span class=""><a href="'.tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL').'" id="changeShippingAddress" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-primary ui-priority-secondary" role="button"><span class="ui-button-icon-primary ui-icon ui-icon-home"></span><span class="ui-button-text">'.IMAGE_BUTTON_CHANGE_ADDRESS.'</span></a></span></div>';
3. Find
$shippingAddress .= '<div style="float:right">'. tep_draw_button(IMAGE_BUTTON_CHANGE_ADDRESS, 'home', tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL')).'</div>'; - Line 390
Replace it with
//$shippingAddress .= '<div style="float:right">'. tep_draw_button(IMAGE_BUTTON_CHANGE_ADDRESS, 'home', tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL')).'</div>';
$shippingAddress .= '<div style="float:right;"><span class=""><a href="'.tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL').'" id="changeShippingAddress" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-primary ui-priority-secondary" role="button"><span class="ui-button-icon-primary ui-icon ui-icon-home"></span><span class="ui-button-text">'.IMAGE_BUTTON_CHANGE_ADDRESS.'</span></a></span></div>';
Hope this helps some
CHANGES FROM LAST VERSION:
CHECKOUT.PHP - fixed display of currency symbols in checkout. Credit for finding and fixing goes to PupStar.
CHANGES FROM LAST VERSION:
CHECKOUT.PHP - fixed layout of shipping/billing address divs
CHANGES FROM LAST VERSION:
SHOPPING_CART.PHP - AUTOMATIC QUANTITY UPDATE - REMOVED THE UPDATE BUTTON
INCLUDES/CHECKOUT/CART.PHP - AUTOMATIC QUANTITY UPDATE
CHECKOUT.PHP - REMOVED THE UPDATE BUTTON
Credit goes to original authors. Just made some changes so that it works with 2.3.1.
Released with no guarantees whatsoever. Use at your own risk, and BACKUP FIRST.
This is a starting point for those wishing to use OPC with osc2.3.1. Others are also working on their versions and hopefully, we can get them merged for the best results possible.
I'm sure someone will come along with something better after a while, but for now, this is a good start.
Note: Contributions are used at own risk.