Zen Cart Logo
Forums / All Other Contributions/Addons / One-Page Checkout [Support Thread]

One-Page Checkout [Support Thread]

Views: 629,260

Results 421 to 440 of 3,073
5 May 2017, 5:18 PM
#421
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

One-Page Checkout [Support Thread]

Davis, it sounds like you're missing the tpl_modules_checkout_one_shipping.php file from either your template_default/templates directory or it's been damaged in some way.

6 May 2017, 11:10 AM
#422
y051313 avatar

y051313

New Zenner

Join Date:
Mar 2010
Posts:
54
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

lat9:

Davis, it sounds like you're missing the tpl_modules_checkout_one_shipping.php file from either your template_default/templates directory or it's been damaged in some way.

Hi lat9

I've upload tpl_modules_checkout_one_shipping.php file again, but still doesn't work.

Is it necessary to add ob_flush (); line? If I remove this line, then the plugin works well.

require ($template->get_template_dir ('tpl_modules_checkout_one_shipping.php', DIR_WS_TEMPLATE, $current_page_base, 'templates'). '/tpl_modules_checkout_one_shipping.php');
                    $shipping_html = ob_get_clean ();
return $shipping_html;
ob_flush ();
6 May 2017, 12:11 PM
#423
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: One-Page Checkout [Support Thread]

Dave, your version of /includes/classes/ajax/zcAjaxOnePageCheckout.php is the one that's apparently damaged. In the as-shipped version there is no "return $shipping_html;" statement at that point of the code.

7 May 2017, 10:20 AM
#424
y051313 avatar

y051313

New Zenner

Join Date:
Mar 2010
Posts:
54
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

lat9:

Dave, your version of /includes/classes/ajax/zcAjaxOnePageCheckout.php is the one that's apparently damaged. In the as-shipped version there is no "return $shipping_html;" statement at that point of the code.

sorry, my mistake, return $shipping_html is added for debug purpose. After removing this line, I still got the messy code in the response.

7 May 2017, 12:12 PM
#425
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

y051313:

Is it necessary to add ob_flush (); line? If I remove this line, then the plugin works well.

require ($template->get_template_dir ('tpl_modules_checkout_one_shipping.php', DIR_WS_TEMPLATE, $current_page_base, 'templates'). '/tpl_modules_checkout_one_shipping.php');
$shipping_html = ob_get_clean ();
return $shipping_html;
ob_flush ();


Although I'm not familiar with this module and only have the small piece of code posted to go by, I too, wonder about the ob_flush (); 
Usually, if used, it is at the beginning of the code and not the end.

lat9 can give more details on it but I would say if it corrects your problem and doesn't create any new ones, then remove it.
7 May 2017, 12:36 PM
#426
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: One-Page Checkout [Support Thread]

@Website Rob, the as-shipped code fragment reads:

                    ob_start ();
                    require ($template->get_template_dir ('tpl_modules_checkout_one_shipping.php', DIR_WS_TEMPLATE, $current_page_base, 'templates'). '/tpl_modules_checkout_one_shipping.php');
                    $shipping_html = ob_get_clean ();
                    ob_flush ();

@y051313, I used the credentials you sent on April 15 to login and went to checkout. It looks to me like the AJAX request/response information is correctly flowing properly on your beta .net site. I didn't click through to completion, since there was a product in the test-user's cart when I got there. Please advise.

8 May 2017, 12:53 PM
#427
y051313 avatar

y051313

New Zenner

Join Date:
Mar 2010
Posts:
54
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

lat9:

@Website Rob, the as-shipped code fragment reads:

                ob_start ();
                require ($template->get_template_dir ('tpl_modules_checkout_one_shipping.php', DIR_WS_TEMPLATE, $current_page_base, 'templates'). '/tpl_modules_checkout_one_shipping.php');
                $shipping_html = ob_get_clean ();
                ob_flush ();
> @y051313, I used the credentials you sent on April 15 to login and went to checkout.  It looks to me like the AJAX request/response information is correctly flowing properly on your beta .net site.  I didn't click through to completion, since there was a product in the test-user's cart when I got there.  Please advise.

Hi lay9

I've removed the ob_flush (); line on the test site, that's why you didn't see any error.

I've added ob_flush(); back, now when you check/uncheck the "Shipping Address, Same as Billing?" checkbox, you will see error msg.

error: status=parsererror, errorThrown = SyntaxError: Unexpected end of JSON input, override: [object Object]

Best
Davis
8 May 2017, 1:42 PM
#428
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: One-Page Checkout [Support Thread]

There's a bunch of other AJAX-related handling on that site, @y051313. Have you checked that the version of /jscript/jscript_framework.php in your lite_red template's folder is the version shipped with OPC?

10 May 2017, 11:55 AM
#429
y051313 avatar

y051313

New Zenner

Join Date:
Mar 2010
Posts:
54
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

lat9:

There's a bunch of other AJAX-related handling on that site, @y051313. Have you checked that the version of /jscript/jscript_framework.php in your lite_red template's folder is the version shipped with OPC?

Yes, I'm sure. I've re-upload jscript_framework.php file in my own template and template_default folder

11 May 2017, 10:18 AM
#430
y051313 avatar

y051313

New Zenner

Join Date:
Mar 2010
Posts:
54
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

y051313:

Yes, I'm sure. I've re-upload jscript_framework.php file in my own template and template_default folder

Hi lat9

It turns out the issue is caused by the gzip setting in the zen cart admin page. If this option is set to off, then the plugin works.

ob_flush and gzip can't be used together.

Best
Davis

11 May 2017, 10:51 AM
#431
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: One-Page Checkout [Support Thread]

y051313:

Hi lat9

It turns out the issue is caused by the gzip setting in the zen cart admin page. If this option is set to off, then the plugin works.

ob_flush and gzip can't be used together.

Best
Davis
Nice detective work, Davis! That gives me something to (hopefully) reproduce ... and correct.

11 May 2017, 11:04 PM
#432
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: One-Page Checkout [Support Thread]

lat9:

Nice detective work, Davis! That gives me something to (hopefully) reproduce ... and correct.

Beg to differ: ob_flush() and Gzip (in admin) are working fine together, no issues at all.

11 May 2017, 11:16 PM
#433
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: One-Page Checkout [Support Thread]

lat9:

Nice detective work, Davis! That gives me something to (hopefully) reproduce ... and correct.

frank18:

Beg to differ: ob_flush() and Gzip (in admin) are working fine together, no issues at all.
Hmm, then something's different between the two installations. Would you both "remind" me of the Zen Cart and PHP versions and template that your stores are using?

11 May 2017, 11:22 PM
#434
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: One-Page Checkout [Support Thread]

lat9:

Hmm, then something's different between the two installations. Would you both "remind" me of the Zen Cart and PHP versions and template that your stores are using?

Thanks Cindy, my store runs ZC 1.5.5e with PHP 5.6.x, template is a cloned Responsive Classic (just different colors), so pretty much standard.

11 May 2017, 11:38 PM
#435
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: One-Page Checkout [Support Thread]

frank18:

Thanks Cindy, my store runs ZC 1.5.5e with PHP 5.6.x, template is a cloned Responsive Classic (just different colors), so pretty much standard.

Just swapped to** PHP Version:** 7.0.18 (Zend: 3.0.0), did a test order (direct bank deposit) and had no issues with Gzip switched on.

12 May 2017, 7:01 AM
#436
y051313 avatar

y051313

New Zenner

Join Date:
Mar 2010
Posts:
54
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

frank18:

Just swapped to** PHP Version:** 7.0.18 (Zend: 3.0.0), did a test order (direct bank deposit) and had no issues with Gzip switched on.

I'm using
PHP Version: 5.6.9 (Zend: 2.6.0)
ZC v1.5.5e

http://stackoverflow.com/questions/12089348/gzip-or-ob-flush-which-is-better

31 May 2017, 11:07 PM
#437
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: One-Page Checkout [Support Thread]

Has anyone tested OPC with the popular Ozpost shipping module (found here https://www.zen-cart.com/downloads.php?do=file&id=899 ) ??

Any feedback is much appreciated. Thanks

6 Jun 2017, 2:10 AM
#438
frank18 avatar

frank18

Deceased

Join Date:
Nov 2007
Location:
Sunny Coast, Australia
Posts:
3,427
Plugin Contributions:
2

Re: One-Page Checkout [Support Thread]

frank18:

Has anyone tested OPC with the popular Ozpost shipping module (found here https://www.zen-cart.com/downloads.php?do=file&id=899 ) ??

Any feedback is much appreciated. Thanks

Can answer my own question: The Ozpost shipping module works fine with OPC. I have it working on 2 local and 1 live installation. No issues, no code modifications needed.

6 Jun 2017, 2:30 PM
#439
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,065
Plugin Contributions:
56

Re: One-Page Checkout [Support Thread]

frank18:

Can answer my own question: The Ozpost shipping module works fine with OPC. I have it working on 2 local and 1 live installation. No issues, no code modifications needed.
Thanks, @frank18, for the follow-up. I'll update the OPC readme to reflect your interoperability report!

7 Jun 2017, 11:16 PM
#440
lightbrown avatar

lightbrown

New Zenner

Join Date:
Jun 2015
Location:
California
Posts:
54
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

This is a great add-on. The Best.

Anyway, I have been running OPC version 1.0.5, so I am trying to update to 1.2.0.

My problem comes when I try to modify the tpl_checkout_one_default.php for my template override to make it better match my template and preferred flow of checkout. If I move the shipping selection div at all it stops being able to update the total when you change the shipping method.

I'm pretty sure I'm missing something simple, so any help would be appreciated.