Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

One Page Checkout for osCommerce 2.3.1


  • You cannot reply to this topic
180 replies to this topic

#41 John W

  • Community Member
  • 127 posts
  • Real Name:John Wisdom
  • Gender:Male
  • Location:Orlando, Fl

Posted 05 June 2011, 06:56

Well, your file didn't work for me but it got me but it kinda got me on the right track and I have it working so I appreciate your help. See process_button below
FYI, you have an error around line 20, it should be
      if ((int)MODULE_PAYMENT_AUTHORIZENET_CC_AIM_ORDER_STATUS_ID > 0) {
        $this->order_status = MODULE_PAYMENT_AUTHORIZENET_CC_AIM_ORDER_STATUS_ID;
      }

Here is what needs to be in the stock authorizenet_cc_aim module
    function process_button() {
      // Hidden fields on the checkout confirmation page
      $process_button_string = tep_draw_hidden_field('cc_expires_month', $_POST['cc_expires_month']) .
                               tep_draw_hidden_field('cc_expires_year', $_POST['cc_expires_year'], -2) .
                               tep_draw_hidden_field('cc_number_nh-dns', $this->cc_number_nh-dns) .
                               tep_draw_hidden_field('cc_cvc_nh-dns', $_POST['cc_cvc_nh-dns']);


      return $process_button_string;
    }

John

#42 www.crossroads-music.org

  • Community Member
  • 11 posts
  • Real Name:David Robbins Jr
  • Gender:Male

Posted 06 June 2011, 20:10

Getting this error message:

Cannot redeclare class ot_shipping in /home/content/e/x/t/extramusical/html/catalog/includes/modules/order_total/ot_shipping.php on line 13

Here's the code the last line is 13

$Id$

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright © 2007 osCommerce

Released under the GNU General Public License
*/

class ot_shipping {
var $title, $output;

function ot_shipping() {

#43 John W

  • Community Member
  • 127 posts
  • Real Name:John Wisdom
  • Gender:Male
  • Location:Orlando, Fl

Posted 06 June 2011, 20:39

opps

Edited by John W, 06 June 2011, 20:40.

John

#44 El_Heso

  • Community Member
  • 151 posts
  • Real Name:Tony Jansson

Posted 10 June 2011, 16:51

Hi all!
Has anyone got this Contrib working on V2.3.1????
or is it only me who got problem?

Im having swedish language so you know if thats the problem or not.

The problem is that ajax is messed up and email warning and shipping even if i fill out everything etc etc..

Regards
Tony

#45 fulluvscents

  • Community Member
  • 305 posts
  • Real Name:Jetta
  • Gender:Female
  • Location:Fort Wayne, Indiana

Posted 10 June 2011, 21:11

I've got it working fine. Pupstar, I believe, also has a working version, probably a little different than the contribution here.

@ www.crossroads-music.org - It's hard to say where the ot_shipping problem lies. The script is declaring the class shipping twice. The code in ot_shipping is what it should be. The problem is wherever else it is being declared, when it shouldn't be. It could be in the OPC contrib, or in any number of other contributions you might have installed, if any. It's one of those things that is easier to debug from within the particular script than guessing at it with no actual knowledge of what you have or don't have. A lot of debugging (at least the way I do it) comes from sitewide searches of particular codes or phrases, and tweaking them until it's pinned down. If the problem isn't replicated on this end, it's hard to find it or fix it. At what point are you getting the error? When OPC loads, during the checkout process itself? What shipping modules are you using, do you have coupons or discounts, etc... Does it happen all the time, or only when certain things happen? See what I mean? Too many factors to point in any direction unless it can be pinned down.

@ El_Haso : This isn't a problem that I have personally run into on any sites. I do know that the original contributions had a problem with getting a "password does not match" error when there was no password error. I don't know if this is what you're getting or not. It could also be that you replaced the js codes when you shouldn't have, or you're calling on the wrong code (1.4.2 instead of 1.4.3), or something along those lines. In template_top, make sure the js file "includes" match the actual file names that you have in your site. The difficulty with this contribution is that 2.3.1 comes with js scripts. The contribution also includes it. Some need to be added some need to be replaced, but only if working with stock osc, and the code in template top need to call the correct js scripts.

#46 torgrima

  • Community Member
  • 12 posts
  • Real Name:Torgrim

Posted 13 June 2011, 09:15

Hi fulluvscents

I tried to install your two contrubutions on a clean version of 2.3.1.
First, I wrote over the files with the Credit Class & Gift Voucher (CCGV 6.0_1.zip) but it looked like the basket hanging if I entered a discount code.

I was hoping that by installing One Page Checkout (OPC for 2.3.1 (2) (1)) that the coupon bug would be fixed. But after having installed the OPC then I get a 500 error from the server. In IE it stops at /checkout_shipping.php and in Google Chrome it stops on /checkout.php

Do you have any idea where the error might be or the reason for a 500 error?

Thanks for your contributions :thumbsup::)

Torgrim
Norway

#47 John W

  • Community Member
  • 127 posts
  • Real Name:John Wisdom
  • Gender:Male
  • Location:Orlando, Fl

Posted 13 June 2011, 14:03

Torgrim,

If you are runing on a server using Mod_suphp, and you should be, check your permissions for the files and folders you uploaded. Suphp will error 500 if permissions are too high, so php files must be 600 or lower and folders must be 755 or lower. Just a thought.

You can also try setting only one simple payment like COD and a simple shipping.
John

#48 Tabula_Rasa

  • Community Member
  • 53 posts
  • Real Name:Sean Rice
  • Gender:Male
  • Location:Boston, MA

Posted 19 June 2011, 17:09

I've been experimenting with the OPC and just discovered the latest June 14 (v.10.4) version, which saved me a lot of work trying to fix it. Thank you, everyone for the hard work.

The biggest complaint I have is that the layout still uses a ton of nested tables, so I'm wondering if anybody would be interested in a complete rewrite that did away with tables altogether, used the <label> tag and allowed the whole form to be styled with an outside CSS file?

Definitely, it would reduce the bloated file size...

#49 Tabula_Rasa

  • Community Member
  • 53 posts
  • Real Name:Sean Rice
  • Gender:Male
  • Location:Boston, MA

Posted 19 June 2011, 19:19

I'd love to get some help getting the v10.4 to work... In return, I'd like to work with people to improve it.

I'm on Mac OS 10.5+ FireFox

I replicated a client site ( http://pbroadwayinc.org/store ) on my own server at http://rasadesign.com/catalog_2_3_1 and I'm not sure what's wrong, but it's not working. From my memory of earlier versions, it's the it's the JavaScript/Ajax, but several attempts at re-uploading from scratch have proved fruitless.

I'll go over it again on my own, but if anyone has an inspired answer, that would be great.

From a working version, I'll be happy to rework the code, strip the table tags, add label tags, develop a cross-browser CSS demo file, change the formatting so that country defaults to the country of origin for the store and shows up under the state and zip.

#50 PupStar

  • Community Member
  • 397 posts
  • Real Name:Mark
  • Gender:Male

Posted 19 June 2011, 19:23

View PostTabula_Rasa, on 19 June 2011, 19:19, said:

I'd love to get some help getting the v10.4 to work... In return, I'd like to work with people to improve it.

I'm on Mac OS 10.5+ FireFox

I replicated a client site ( http://pbroadwayinc.org/store ) on my own server at http://rasadesign.com/catalog_2_3_1 and I'm not sure what's wrong, but it's not working. From my memory of earlier versions, it's the it's the JavaScript/Ajax, but several attempts at re-uploading from scratch have proved fruitless.

I'll go over it again on my own, but if anyone has an inspired answer, that would be great.

From a working version, I'll be happy to rework the code, strip the table tags, add label tags, develop a cross-browser CSS demo file, change the formatting so that country defaults to the country of origin for the store and shows up under the state and zip.

At a quick glance it looks as though you have not installed it correctly as when going to the checkout it still takes me to the login page.

Mark
My Contributions (so far):

Join Us On Facebook & Twitter Infobox

Contributions currently installed into osCommerce 2.3.1

  • Ajax Attributes Manager
  • CKEditor
  • Column Listing with smart column (modified)
  • Documents Manager
  • Easy Map
  • EasyPopulate v2_76i_231
  • Mindsparx Specials
  • Mindsparx Admin
  • OTF Auto Thumbnailer v2.4
  • Star Product v1.6 + Mindsparx Pimped version
  • Ultimate SEO Urls
  • Who's Online Enhancement
  • Printer Filter V1.7 (modified)
  • Info Pages Unlimited v2.07
  • Google Feeder V2.6
  • Year Make Model

#51 Tabula_Rasa

  • Community Member
  • 53 posts
  • Real Name:Sean Rice
  • Gender:Male
  • Location:Boston, MA

Posted 20 June 2011, 00:56

View PostPupStar, on 19 June 2011, 19:23, said:

At a quick glance it looks as though you have not installed it correctly as when going to the checkout it still takes me to the login page.

Mark

:blink: If you go to http://rasadesign.com/catalog_2_3_1/index.php?cPath=22 and continue from there, you'll end up on OPC. If you clicked from the front page on an image, or "store" then you got sent to http://pbroadwayinc.org. Sorry. I didn't bother to change the hard links when I created the demo version on my site.

On the rasadesign version, you get to the OPC. In any case, there are various problems with the page and I may have been just staring at it, too long.

#52 PupStar

  • Community Member
  • 397 posts
  • Real Name:Mark
  • Gender:Male

Posted 20 June 2011, 18:12

View PostTabula_Rasa, on 20 June 2011, 00:56, said:

:blink: If you go to http://rasadesign.com/catalog_2_3_1/index.php?cPath=22 and continue from there, you'll end up on OPC. If you clicked from the front page on an image, or "store" then you got sent to http://pbroadwayinc.org. Sorry. I didn't bother to change the hard links when I created the demo version on my site.

On the rasadesign version, you get to the OPC. In any case, there are various problems with the page and I may have been just staring at it, too long.

Have you made the changes in all the files to modify because when I view your page source the javascript that should be in template_top.php seems to be missing.

Mark
My Contributions (so far):

Join Us On Facebook & Twitter Infobox

Contributions currently installed into osCommerce 2.3.1

  • Ajax Attributes Manager
  • CKEditor
  • Column Listing with smart column (modified)
  • Documents Manager
  • Easy Map
  • EasyPopulate v2_76i_231
  • Mindsparx Specials
  • Mindsparx Admin
  • OTF Auto Thumbnailer v2.4
  • Star Product v1.6 + Mindsparx Pimped version
  • Ultimate SEO Urls
  • Who's Online Enhancement
  • Printer Filter V1.7 (modified)
  • Info Pages Unlimited v2.07
  • Google Feeder V2.6
  • Year Make Model

#53 John W

  • Community Member
  • 127 posts
  • Real Name:John Wisdom
  • Gender:Male
  • Location:Orlando, Fl

Posted 20 June 2011, 19:32

One thing that is obvious is you don't have the jquery css linked. The jquery functions do not work correctly if a correct version of the css is not linked. On one page I know it was there but commented out.
John

#54 quanuz

  • Community Member
  • 2 posts
  • Real Name:Arjan
  • Gender:Male

Posted 23 June 2011, 14:18

First of all, thanks for all the hard work, by creating this contri!

I've got the same problems as Tabula_Rasa.
How can I get the zipcode above the city and the country menu at the bottom?

And how do I remove the change adres buttons?

Here's an example http://www.wiflex.nl/shop/catalog/

Arjan

Edited by quanuz, 23 June 2011, 14:19.


#55 PupStar

  • Community Member
  • 397 posts
  • Real Name:Mark
  • Gender:Male

Posted 23 June 2011, 18:10

View Postquanuz, on 23 June 2011, 14:18, said:

First of all, thanks for all the hard work, by creating this contri!

I've got the same problems as Tabula_Rasa.
How can I get the zipcode above the city and the country menu at the bottom?

And how do I remove the change adres buttons?

Here's an example http://www.wiflex.nl/shop/catalog/

Arjan

ok to change the layout open catalog/includes/checkout/billing_address_vertical.php (or billing_address_horizontal.php)

Find:

 <?php
if(ONEPAGE_ZIP_BELOW == 'True'){
?>
  <tr>
      <td class="main"><?php echo ENTRY_POST_CODE ?></td>
      <td class="main"><?php echo tep_draw_input_field('billing_zipcode', (isset($billingAddress) ? $billingAddress['postcode'] : ''), 'class="required" style="width:80%;float:left;"'); ?></td>
  </tr>
<?php
}
?>

you can then move this to where ever you need to place it.

Regards

Mark
My Contributions (so far):

Join Us On Facebook & Twitter Infobox

Contributions currently installed into osCommerce 2.3.1

  • Ajax Attributes Manager
  • CKEditor
  • Column Listing with smart column (modified)
  • Documents Manager
  • Easy Map
  • EasyPopulate v2_76i_231
  • Mindsparx Specials
  • Mindsparx Admin
  • OTF Auto Thumbnailer v2.4
  • Star Product v1.6 + Mindsparx Pimped version
  • Ultimate SEO Urls
  • Who's Online Enhancement
  • Printer Filter V1.7 (modified)
  • Info Pages Unlimited v2.07
  • Google Feeder V2.6
  • Year Make Model

#56 quanuz

  • Community Member
  • 2 posts
  • Real Name:Arjan
  • Gender:Male

Posted 24 June 2011, 13:31

The double change-adress button.

in checkout.php


<?php
  if ($onepage['shippingEnabled'] === true){
$header = TABLE_HEADING_SHIPPING_ADDRESS;
ob_start();
include(DIR_WS_INCLUDES . 'checkout/shipping_address.php');
$shippingAddress = ob_get_contents();
ob_end_clean();
		if (!tep_session_is_registered('customer_id')){
$shippingAddress .= '<div style="float:right">'. tep_draw_button(IMAGE_BUTTON_CHANGE_ADDRESS, 'home', tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL')).'</div>';
			$shippingAddress = '<table border="0" width="100%" cellspacing="0" cellpadding="2">
			 <tr>
			  <td class="main">' . TEXT_DIFFERENT_SHIPPING . ' <input type="checkbox" name="diffShipping" id="diffShipping" value="1"></td>
			 </tr>
			</table>' . $shippingAddress;
		}
$shippingAddress .= '<div style="float:right">'. tep_draw_button(IMAGE_BUTTON_CHANGE_ADDRESS, 'home', tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL')).'</div>';
buildInfobox($header, $shippingAddress);
  }
?>
</div>


replace with


<?php
  if ($onepage['shippingEnabled'] === true){
$header = TABLE_HEADING_SHIPPING_ADDRESS;
ob_start();
include(DIR_WS_INCLUDES . 'checkout/shipping_address.php');
$shippingAddress = ob_get_contents();
ob_end_clean();
			$shippingAddress = '<table border="0" width="100%" cellspacing="0" cellpadding="2">
			 <tr>
			  <td class="main">' . TEXT_DIFFERENT_SHIPPING . ' <input type="checkbox" name="diffShipping" id="diffShipping" value="1"></td>
			 </tr>
			</table>' . $shippingAddress;
$shippingAddress .= '<div style="float:right">'. tep_draw_button(IMAGE_BUTTON_CHANGE_ADDRESS, 'home', tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 

'SSL')).'</div>';
buildInfobox($header, $shippingAddress);
  }
?>
</div>



#57 Tabula_Rasa

  • Community Member
  • 53 posts
  • Real Name:Sean Rice
  • Gender:Male
  • Location:Boston, MA

Posted 26 June 2011, 03:13

John W and Pupstar: Thank you. That worked. I'm now rewriting the whole thing to avoid the infobox tables and limit the layout to label and form field tags. I'll post when I get it cleaned up.

#58 Tabula_Rasa

  • Community Member
  • 53 posts
  • Real Name:Sean Rice
  • Gender:Male
  • Location:Boston, MA

Posted 27 June 2011, 02:37

ok, it works. That said, there's a LOT of issues and I'd like to contribute. I would need help with a JavaScript issue to make a truly tableless version of this, but even if you're not cool with pure tableless, there's a lot of coding mistakes. For example, html rather than xhtml use of the BR tag, not putting the form ID in quotes, etc.

In making the contribution tableless, one issue is that the javascript targets the table after the DIV with the ID, "shippingAddress" .. and I don't know JS enough to untangle it. :D To merely eliminate the table destroys the layout.

If anyone is willing to work with me on this, I have a LOT of motivation to make this work...

#59 torgrima

  • Community Member
  • 12 posts
  • Real Name:Torgrim

Posted 28 June 2011, 11:10

View PostJohn W, on 13 June 2011, 14:03, said:

Torgrim,

If you are runing on a server using Mod_suphp, and you should be, check your permissions for the files and folders you uploaded. Suphp will error 500 if permissions are too high, so php files must be 600 or lower and folders must be 755 or lower. Just a thought.

You can also try setting only one simple payment like COD and a simple shipping.

Thanks, for your answer. But I still gets som problems, so there must be some thing more that is wrong.

Best regards
Torgrim Andersen

#60 torgrima

  • Community Member
  • 12 posts
  • Real Name:Torgrim

Posted 28 June 2011, 11:17

Hi

I run OsC 2.3.1 with “Credit Class & Gift Voucher” and “One Page Checkout”. My customers have problems with the checkout process.

If I am turning “One Page Checkout” off, then my customers gets stuck when they try to press the continue button on the page: checkout_payment.php that triggers the code:
<form name="checkout_payment" action="http://suncare.no/shop/checkout_confirmation.php" method="post" onsubmit="return check_form();"> 

I can manually run the file checkout_confirmation.php but when I then press the final button for open the file checkout_process I get a 500 error. (my fileattributes are 644)
The button in checkout_confirmation.php is trying to execute the code:

<form name="checkout_confirmation" action="http://suncare.no/shop/checkout_process.php" method="post"><input type="hidden" name="gv_redeem_code" />

If I turn on “One Page Checkout” I get an error on "invoice" payment method.

If I select "PayPal" I will get the following error message on the PayPal page: “The link that you used to go to the PayPal system includes an amount that is incorrectly formatted.”

Does any have an idea of how I can fix this problem or know of a working version of OsC 2.3.1 with Credit Class & Gift Voucher and One Page Checkout installed? :-"

Best regards
Torgrim Andersen
Norway