Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

One Page Checkout for osCommerce 2.3.1


PupStar

Recommended Posts

Hi Again Guys,

 

I am in the process of converting the 'One Page Checkout' contribution to work with 2.3.1, so far so good, the checkout works and the orders are logged :)

 

However these lines are breaking the checkout success page and then any other page that you try to navigate to with this error

 

<b>Fatal error</b>: Call to undefined function fixSeoLink() in <b>C:\wamp\www\vanilla\includes\template_top.php</b> on line <b>83</b><br />

 

  onePage.pageLinks = {
  checkout: '<?php echo fixSeoLink(tep_href_link(FILENAME_CHECKOUT, session_name() . '=' . session_id() . '&rType=ajax', $request_type));?>',
  shoppingCart: '<?php echo fixSeoLink(tep_href_link(FILENAME_SHOPPING_CART));?>'
 }

 

my question is this, does anyone know where this function is/should be defined.

 

I have scanned through the files and still can not find it >_<

 

I have posted this in general support because the OPC thread is becoming a little unfollowable (if that is a word lol)

 

Mark

Link to comment
Share on other sites

  • Replies 180
  • Created
  • Last Reply

Just to add to this, what is output to the browser is this

 

onePage.pageLinks = {

checkout: 'http://localhost/vanilla/checkout.php?osCsid=6igf3jfv6bndg5a5b2012dien4&rType=ajax',

shoppingCart: 'http://localhost/vanilla/shopping_cart.php'

}

Link to comment
Share on other sites

In the 1.5 version it's defined at the top of checkout.php

 

  function fixSeoLink($url){
  return str_replace('&', '&', $url);
 }

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Good luck in getting this to work. I hope once done you will release it as a contribution.

 

I have it working 99% with just a few minor glitches to clear up.

 

Once I am done I will release it into the contributions so that others can hopefully improve it further.

 

I am also reworking the layout as IMHO it never looked appealing to the eye.

 

While I am posting can anyone offer a solution to converting this code to the new style submit button, my eyes are getting weary now :blink:

 

<div id="checkoutButtonContainer"><?php echo '<input type="submit" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only ui-state-focus" style="padding:5px;" id="checkoutButton" formUrl="' . tep_href_link(FILENAME_CHECKOUT_PROCESS, '', $request_type) . '" value="'.IMAGE_BUTTON_CONTINUE. '" />'; ?><input type="hidden" name="formUrl" id="formUrl" value=""></div><div id="paymentHiddenFields" style="display:none;"></div>

 

Mark

Link to comment
Share on other sites

ok I am making ok progress, it is working well. I also tried it with the discount code contribution for 2.3.1 and that works as well (apart from passing the discount to PayPal urgh)

 

Also trying to workout how to update the discount using ajax (not very good with ajax)

 

Anyway here is a screenshot:

 

Mark

 

onepagecheckoutscreensh.gif

Link to comment
Share on other sites

Hi Guys,

 

I could do with a little help on the current issue.

 

I am trying to configure the code so that the left and right columns can be turned on/off for just the checkout page.

 

I have the code so it removes the left/right columns but unfortunately they are also removed from the rest of the store as well :'(

 

I have this code in catalog/includes/template_bottom.php

 

</div> <!-- bodyContent //-->
<?php
if (ONEPAGE_SHOW_OSC_COLUMNS == 'true'){

 if ($oscTemplate->hasBlocks('boxes_column_left')) {
?>
<div id="columnLeft" class="grid_<?php echo $oscTemplate->getGridColumnWidth(); ?> pull_<?php echo $oscTemplate->getGridContentWidth(); ?>">
 <?php echo $oscTemplate->getBlocks('boxes_column_left'); ?>
</div>

<?php
 }else{
}

if (ONEPAGE_SHOW_OSC_COLUMNS == 'true'){

 if ($oscTemplate->hasBlocks('boxes_column_right')) {
?>

<div id="columnRight" class="grid_<?php echo $oscTemplate->getGridColumnWidth(); ?>">
 <?php echo $oscTemplate->getBlocks('boxes_column_right'); ?>
</div>

<?php
 }
}

require(DIR_WS_INCLUDES . 'footer.php');

?>

</div> <!-- bodyWrapper //-->

<?php echo $oscTemplate->getBlocks('footer_scripts'); ?>

</body>
</html>

 

and also this code in catalog/includes/template_top.php

 

<body>

<div id="bodyWrapper" class="container_<?php echo $oscTemplate->getGridContainerWidth(); ?>">

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

<?php
if (ONEPAGE_SHOW_OSC_COLUMNS == 'true'){
?>
<div id="bodyContent" class="grid_<?php echo $oscTemplate->getGridContentWidth(); ?> <?php echo ($oscTemplate->hasBlocks('boxes_column_left') ? 'push_' . $oscTemplate->getGridColumnWidth() : ''); ?>">

<?php
}else{
?>

<div id="bodyContent">
<?php
}
?>

 

Any ideas please fellas :thumbsup:

 

Mark

Link to comment
Share on other sites

If you want to make the left and right columns disappear during the checkout process make these code changes in /catalog/includes/template_bottom.php

 

Change this:

 

  <?php echo $oscTemplate->getBlocks('boxes_column_left'); ?> 

To:

 

  <?php if ( strpos(basename($PHP_SELF), 'checkout') === false ) echo $oscTemplate->getBlocks('boxes_column_left'); ?>

And change this:

 

  <?php echo $oscTemplate->getBlocks('boxes_column_right'); ?> 

To:

 

  <?php if ( strpos(basename($PHP_SELF), 'checkout') === false ) echo $oscTemplate->getBlocks('boxes_column_right'); ?>

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

If you want to make the left and right columns disappear during the checkout process make these code changes in /catalog/includes/template_bottom.php

 

Change this:

 

  <?php echo $oscTemplate->getBlocks('boxes_column_left'); ?> 

To:

 

  <?php if ( strpos(basename($PHP_SELF), 'checkout') === false ) echo $oscTemplate->getBlocks('boxes_column_left'); ?>

And change this:

 

  <?php echo $oscTemplate->getBlocks('boxes_column_right'); ?> 

To:

 

  <?php if ( strpos(basename($PHP_SELF), 'checkout') === false ) echo $oscTemplate->getBlocks('boxes_column_right'); ?>

 

Hi Jim,

 

Yes that makes the columns content disappear but does not remove the actual grid so that the checkout content spans the width of where those columns used to be which is what I want to achieve to keep it inline with the way the contribution works.

 

There is an option in the admin to switch between both columns on or off both left and right columns off.

 

Mark

Link to comment
Share on other sites

ok after doing what Jim said got me thinking,

 

I made this change to the bottom of catalog/includes/template_top.php

 

<?php
 if ( strpos(basename($PHP_SELF), 'checkout') === false ) {
?>
<div id="bodyContent" class="grid_<?php echo $oscTemplate->getGridContentWidth(); ?> <?php echo ($oscTemplate->hasBlocks('boxes_column_left') ? 'push_' . $oscTemplate->getGridColumnWidth() : ''); ?>">
<?php
 }
?>

 

The footer has got a little screwed up so still have that to sort out and I am still not sure how to add in this code

 

<?php
if (ONEPAGE_SHOW_OSC_COLUMNS == 'true'){
?>

 

to make the columns switchable via the admin panel.

 

Mark

Link to comment
Share on other sites

ok after doing what Jim said got me thinking,

 

I made this change to the bottom of catalog/includes/template_top.php

 

<?php
 if ( strpos(basename($PHP_SELF), 'checkout') === false ) {
?>
<div id="bodyContent" class="grid_<?php echo $oscTemplate->getGridContentWidth(); ?> <?php echo ($oscTemplate->hasBlocks('boxes_column_left') ? 'push_' . $oscTemplate->getGridColumnWidth() : ''); ?>">
<?php
 }
?>

 

The footer has got a little screwed up so still have that to sort out and I am still not sure how to add in this code

 

<?php
if (ONEPAGE_SHOW_OSC_COLUMNS == 'true'){
?>

 

to make the columns switchable via the admin panel.

 

Mark

 

one cup of strong tea later and the footer is fixed :D

Link to comment
Share on other sites

I too have created a new onepagecheckout from scratch, have been using it on live site for over a month now, with no problems, tested with all osc stock payment/shipping modules. I know many like the discount coupon codes, so I just have that left to do. My version is way cleaner than the itwebexperts one IMO. I think I will be releasing it soon, we'll see, you can never have too many one page checkouts.

Link to comment
Share on other sites

Was searching for something else and ran across this thread. I've modified OPC for 2.3.1 replacing tables with divs and integrating osc2.3.1's jquery with OPC5.1 jquery, etc...

 

I have not tested any coupon modules with it. My personal version doesn't use coupons or shipping, or really anything much. I did find the authorize.net needed changes to work with OPC in 2.3.1. I've got all of the authorize.net AIM modules working for my personal site without one problem (credit cards, echecks, credit card ARB, and echeck ARB), although I'm not passing those out right now. Present modules may not work with the OPC module that I put together. It seems that many people have a problem with authorize.net not working with OPC in 2.3.1, without making some sort of mod to their payment modules.

 

I've uploaded a contribution with NO guarantees whatsoever. Nothing fancy, but it's a starting point.

 

I haven't touched a thing in admin. Didn't feel a need to do so for my particular uses. Just made sure to configure it to work properly.

 

The biggest changes I made outside the original contribution were moving a chunk of checkout.php over to template_top.php and changing the classes/boxes.php file to use divs that match the rest of the site's theme.

 

Contribution can be found here:

 

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

Link to comment
Share on other sites

  • 2 weeks later...

Pupstar,

would be good to get your contribution, too. I'm not sure I'm very happy with the fulluvscents one, although it seems like a good effort. Perhaps you could use a file-comparing tool to merge your two contribs, or just release your own variation.

 

Personally I'm extremely frustrated by this whole problem

- I think having to click on an "Update" button is poor form.

- I also think Shipping options should appear *before* payment options (in the case of COD delivery, your payment option may be "COD").

 

I also find having everything one page is a bit messy - my "perfect" checkout system is not 1 page, and not 7 pages either. Probably 2 or 3 pages.

Link to comment
Share on other sites

Pupstar,

would be good to get your contribution, too. I'm not sure I'm very happy with the fulluvscents one, although it seems like a good effort. Perhaps you could use a file-comparing tool to merge your two contribs, or just release your own variation.

 

I have already done this and it is working well although I am still testing and still have the discount code thing to work out. I know fulluvscents has reworked the CCGV but I think this contribution is bloated and the discount code contribution for 2.3.1 is much nicer. Also there is no documentation for installing it and I dont have the time at present to go through all the files and compare them to my store.

 

Personally I'm extremely frustrated by this whole problem

- I think having to click on an "Update" button is poor form.

 

I dont think there is much that can be done about that as the values need to be posted so that the shipping and payment methods are calculated.

 

- I also think Shipping options should appear *before* payment options (in the case of COD delivery, your payment option may be "COD").

 

Well that is easy to resolve just by jiggling the code around.

 

I also find having everything one page is a bit messy - my "perfect" checkout system is not 1 page, and not 7 pages either. Probably 2 or 3 pages.

 

I dont agree, anymore pages makes the checkout no better than it was originally IMHO.

 

Mark

Link to comment
Share on other sites

Unfortunately, the original CCGV never came with installation documentation. The only way to install is to do a file compare. It's the way the original contribution came and my goal wasn't to rewrite. It was merely to make it work with 2.3.1. I have not installed the discount coupon mod on any 2.3.1 sites yet (with or without OPC), so haven't had to deal with that. I have also not conjunctively installed OPC with CCGV on a 2.3.1 site. I have an OPC with no discounts, and I have a CCGV without OPC, but not both together.

 

There is an issue with PP not posting the cart contents to the PP login/payment page. But, that issue existed in the 1.4/1.5 OPC contributions. It is fine for standard checkout with a confirmation page, but doesn't properly serve the purpose for OPC since there is no confirmation page. However, my intent was not to fix existing bugs, particularly where I don't use PayPal to begin with. It was merely to make an existing mod work with the newer osc version. Really, the only true problem I ever ran into was inability to use existing authorize.net mods. I had to rewrite those for both osc2.2 and osc2.3.1 after installing OPC.

 

Regarding the expansion of the checkout to span the entire page, I've seen sites that do this and I feel like I've left the site. There is nothing smooth about the transition into a fully spanned checkout page. On the other hand, removing the contents of the left and right columns does make for a cleaner checkout, so long as the checkout itself stays within the main bodycontent div and doesn't span the entire width of the page. Just my personal opinion.

 

OSC comes default with a 3 page checkout (shipping, payment, confirmation). OPC is a ONE page checkout and to modify it to any more than one page would destroy the integrity of the module. If someone wants a 2-3 page checkout, then it's simple. Stick with stock osc and modify the individual pages for visual appeal.

 

I'm all for further enhancements of this module. What I put together works in 2.3.1 pretty much exactly like the contributions for 2.2. It could be better, but it is functional.

 

It's fairly frustrating to go to the effort of fixing something for yourself, then being NICE and contributing it for others, only to have them complain when there is NOTHING functionally wrong. If you don't like it, do it yourself. Otherwise, take heed not to bite the hand that feeds. It is extremely rude.

Link to comment
Share on other sites

Unfortunately, the original CCGV never came with installation documentation. The only way to install is to do a file compare. It's the way the original contribution came and my goal wasn't to rewrite. It was merely to make it work with 2.3.1. I have not installed the discount coupon mod on any 2.3.1 sites yet (with or without OPC), so haven't had to deal with that. I have also not conjunctively installed OPC with CCGV on a 2.3.1 site. I have an OPC with no discounts, and I have a CCGV without OPC, but not both together.

 

There is an issue with PP not posting the cart contents to the PP login/payment page. But, that issue existed in the 1.4/1.5 OPC contributions. It is fine for standard checkout with a confirmation page, but doesn't properly serve the purpose for OPC since there is no confirmation page. However, my intent was not to fix existing bugs, particularly where I don't use PayPal to begin with. It was merely to make an existing mod work with the newer osc version. Really, the only true problem I ever ran into was inability to use existing authorize.net mods. I had to rewrite those for both osc2.2 and osc2.3.1 after installing OPC.

 

Regarding the expansion of the checkout to span the entire page, I've seen sites that do this and I feel like I've left the site. There is nothing smooth about the transition into a fully spanned checkout page. On the other hand, removing the contents of the left and right columns does make for a cleaner checkout, so long as the checkout itself stays within the main bodycontent div and doesn't span the entire width of the page. Just my personal opinion.

 

OSC comes default with a 3 page checkout (shipping, payment, confirmation). OPC is a ONE page checkout and to modify it to any more than one page would destroy the integrity of the module. If someone wants a 2-3 page checkout, then it's simple. Stick with stock osc and modify the individual pages for visual appeal.

 

I'm all for further enhancements of this module. What I put together works in 2.3.1 pretty much exactly like the contributions for 2.2. It could be better, but it is functional.

 

I am pleased with it and you sorted out a couple of issues that were still existing in my version. :thumbsup:

 

It's fairly frustrating to go to the effort of fixing something for yourself, then being NICE and contributing it for others, only to have them complain when there is NOTHING functionally wrong. If you don't like it, do it yourself. Otherwise, take heed not to bite the hand that feeds. It is extremely rude.

 

I do hope that you were not referring to me with that last comment as nothing untoward was said.

 

Mark

Link to comment
Share on other sites

Nope, not you, of course. You are making efforts at contributing enhancements to this module, not merely jumping on a forum and complaining about the work that others do and freely contribute for your use.

 

Who in their right mind complains about a "one page" checkout system being ONE PAGE?

 

People just get my goat sometimes sitting back and complaining while others do their bidding for them with nothing in return. It's just rude.

Link to comment
Share on other sites

Nope, not you, of course. You are making efforts at contributing enhancements to this module, not merely jumping on a forum and complaining about the work that others do and freely contribute for your use.

 

Phew :blush:

 

Who in their right mind complains about a "one page" checkout system being ONE PAGE?

 

People just get my goat sometimes sitting back and complaining while others do their bidding for them with nothing in return. It's just rude.

 

:-"

 

Once I can be bothered to package it all up I will upload my *pimped version* with the updated boxes, icons etc. You know what its like after a hard day grafting you just wanna chill out B)

 

Mark

Link to comment
Share on other sites

Okay, so I looked at something. I don't know how the hell I did it, but I do have a 2.2 site with OPC and there is no update button in the checkout page. You simply change the number and it automatically updates the cart and YES, it is much smoother. For viewing, go to fulluvscents.com, create a test account, add something to the cart, and go to checkout. I'm sure that it was a separate existing contribution that I added to make it do this. Blah, off to find out what mod it was.

 

I'm back....

 

I think it was this one:

 

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

 

Of course, there was prolly some modification to make it work with OPC. But, hey, nice to know that it is possible if someone gets the time to make it a standard part of OPC.

Link to comment
Share on other sites

oh yeah. fulluvscents.com is a live site. So, don't enter credit card information or I'll take your money and run.

Link to comment
Share on other sites

oh yeah. fulluvscents.com is a live site. So, don't enter credit card information or I'll take your money and run.

 

I am having a look at the contrib above now. I forgot I had that installed on a few 2.2 sites a few years ago >_<

 

No promises though lol

 

Mark

 

p.s I did create a dummy account so feel free to delete it, I think you will guess which account it is.

Link to comment
Share on other sites

Another thing I'm noticing between the checkout I have on 2.2 and 2.3.1 is the change address button in the checkout.

 

In 2.2, I can change address ON the checkout page. In 2.3.1, on two different sites, the change address button opens the checkout_shipping_address (or checkout_billing_address) page. Hmmmm, big difference. Wonder what was missed.

 

It may also be that my 2.2 site is using OPC1.4, where the other two are using OPC1.5. Not sure, but may investigate later, as it will be my personal preference to make these changes to all the sites. Again, it's just cleaner that way.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...