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

One-Page Checkout [Support Thread]

Views: 629,366

Results 1,961 to 1,980 of 3,077
12 Apr 2021, 12:45 PM
#1961
lat9 avatar

lat9

Administrator

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

One-Page Checkout [Support Thread]

OK that came out fairly unreadable and vBulletin is having hissy fits editing the post

Here's what that definition should look like:

define('ERROR_NO_SHIPPING_SELECTED', 'Devi selezionare un metodo di spedizione per il tuo ordine prima che l[B]\\\[/B]'ordine possa essere confermato.');
12 Apr 2021, 1:38 PM
#1962
keneso avatar

keneso

Totally Zenned

Join Date:
May 2009
Posts:
1,273
Plugin Contributions:
3

Re: One-Page Checkout [Support Thread]

Thank you.

Actually I had many more ' ususally in the other defines files I used single backslash, and haven't encountered problems, at least that I am aware of, anyhow updated all occurances in OPC files.

I had noticed in your (English) defines the use of triple backslash, would you suggest me to do so fo all other standar Zen Cart define files as well, I mean is this best practice sort of.

12 Apr 2021, 1:44 PM
#1963
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

keneso:

Thank you.

Actually I had many more ' ususally in the other defines files I used single backslash, and haven't encountered problems, at least that I am aware of, anyhow updated all occurances in OPC files.

I had noticed in your (English) defines the use of triple backslash, would you suggest me to do so fo all other standar Zen Cart define files as well, I mean is this best practice sort of.
Those triple backslashes are required *only *for definitions that are used in the plugin's jQuery/javascript messages. FWIW, I'll be updating those language files to make sure that all of the js-based language constants are grouped together so that it will be easier to determine which ones need that \' instead of ' for the single quotes.

12 Apr 2021, 3:36 PM
#1964
keneso avatar

keneso

Totally Zenned

Join Date:
May 2009
Posts:
1,273
Plugin Contributions:
3

Re: One-Page Checkout [Support Thread]

Thank you.

Now I have another problem.

I have set in
configuration > my store the basis of product tax, and basis of shipping tax to "store", when adding product the cart shows the full price (tax included), when clicking to checkout, and selecting guest (haven't tested new or existing customer) the price is displayed without tax, and when going back to edit cart (shopping_cart.html) the price has changed and displays without tax.
The tax column is not displayed in the table

<?php
// display tax info if exists
if ($display_tax_column)  {
?>
<td class="cartTotalDisplay"><?php echo zen_display_tax_value($order->products[$i]['tax']); ?>%</td>
<?php
}  // endif tax info display
?>

What do you think I messed up?

12 Apr 2021, 5:50 PM
#1965
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

keneso:

Thank you.

Now I have another problem.

I have set in
configuration > my store the basis of product tax, and basis of shipping tax to "store", when adding product the cart shows the full price (tax included), when clicking to checkout, and selecting guest (haven't tested new or existing customer) the price is displayed without tax, and when going back to edit cart (shopping_cart.html) the price has changed and displays without tax.
The tax column is not displayed in the table

<?php // display tax info if exists if ($display_tax_column) { ?> <td class="cartTotalDisplay"><?php echo zen_display_tax_value($order->products[$i]['tax']); ?>%</td> <?php } // endif tax info display ?> ``` > > What do you think I messed up? Could you re-post the obfuscated link to your site?
13 Apr 2021, 11:29 AM
#1966
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

lat9:

Could you re-post the obfuscated link to your site?
Never mind, I found it! One thing that's not set right is the OPC setting Order Total, jQuery Selector, which is still set to its default value. For the BootStrap template, that needs to be set to #ottotal .ot_text.

I don't know if that has 'play' in the previous issue you posted, but it's a start.

14 Apr 2021, 12:34 PM
#1967
keneso avatar

keneso

Totally Zenned

Join Date:
May 2009
Posts:
1,273
Plugin Contributions:
3

Re: One-Page Checkout [Support Thread]

Thank you.
Sorry for late update.

I corrected the setting to #ottotal .ot_text, but it did not fix it.

14 Apr 2021, 1:06 PM
#1968
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

keneso:

Thank you.
Sorry for late update.

I corrected the setting to #ottotal .ot_text, but it did not fix it.
My bad, that should have been #ottotal .ot-text.

14 Apr 2021, 1:50 PM
#1969
keneso avatar

keneso

Totally Zenned

Join Date:
May 2009
Posts:
1,273
Plugin Contributions:
3

Re: One-Page Checkout [Support Thread]

Thanks, but same result.

14 Apr 2021, 2:21 PM
#1970
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

keneso:

Thanks, but same result.
Very strange, are there any logs generated?

14 Apr 2021, 10:21 PM
#1971
llemberg avatar

llemberg

New Zenner

Join Date:
Sep 2008
Posts:
22
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

I have upgraded my ZenCart 1.5.6 site to 1.5.7c by doing a clean install of 1.5.7c, manually upgrading my custom template files using the 1.5.7c core files, and reinstalling the OnePageCheckout PlugIn. I had ceon-manual-card pay module installed in 1.5.6, but I am not reinstalling that since it is out dated and no longer supported. I also had SalesReport plugin in 1.5.6 but it is not installed in 1.5.7c yet. I have OnePageCheckout working, and am now trying to add PayPal Express Checkout.

I have PayPal connected as a sandbox. If I Log In to Zen Cart I can successfully check out with PayPal. I can also check out with PayPal as Guest, but only if I fill in the billing Name, address etc. on the checkout page. If I try to check out with "PayPal" button from the cart, bypassing the billing info page, I receive this error:

#1  trigger_error() called at [/includes/classes/OnePageCheckout.php:2323]
#2  OnePageCheckout->getTaxLocations() called at [/includes/classes/observers/class.checkout_one_observer.php:640]
#3  checkout_one_observer->update() called at [/includes/classes/class.base.php:118]
#4  base->notify() called at [/includes/functions/functions_taxes.php:286]
#5  zen_get_tax_locations() called at [/includes/modules/order_total/ot_tax.php:31]
#6  ot_tax->process() called at [/includes/classes/order_total.php:178]
#7  order_total->pre_confirmation_check() called at [/includes/modules/payment/paypalwpp.php:1542]
#8  paypalwpp->ec_step1() called at [/ipn_main_handler.php:75]
--> [B]PHP Fatal error: Unknown/invalid billto address # for customer#. in /includes/classes/OnePageCheckout.php on line 2323[/B].

I read that as the error occurring before the call to PayPal, but I thought using the "Checkout With PayPal" button from the cart, skipping the Billing Info page, should retrieve the billing/shipping data from PayPal. The test site exhibiting this behavior is at https://test.chessieshop.com
Any ideas?
Thanks,
Lars

15 Apr 2021, 11:39 AM
#1972
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

llemberg:

I have upgraded my ZenCart 1.5.6 site to 1.5.7c by doing a clean install of 1.5.7c, manually upgrading my custom template files using the 1.5.7c core files, and reinstalling the OnePageCheckout PlugIn. I had ceon-manual-card pay module installed in 1.5.6, but I am not reinstalling that since it is out dated and no longer supported. I also had SalesReport plugin in 1.5.6 but it is not installed in 1.5.7c yet. I have OnePageCheckout working, and am now trying to add PayPal Express Checkout.

I have PayPal connected as a sandbox. If I Log In to Zen Cart I can successfully check out with PayPal. I can also check out with PayPal as Guest, but only if I fill in the billing Name, address etc. on the checkout page. If I try to check out with "PayPal" button from the cart, bypassing the billing info page, I receive this error:

#1 trigger_error() called at [/includes/classes/OnePageCheckout.php:2323]
#2 OnePageCheckout->getTaxLocations() called at [/includes/classes/observers/class.checkout_one_observer.php:640]
#3 checkout_one_observer->update() called at [/includes/classes/class.base.php:118]
#4 base->notify() called at [/includes/functions/functions_taxes.php:286]
#5 zen_get_tax_locations() called at [/includes/modules/order_total/ot_tax.php:31]
#6 ot_tax->process() called at [/includes/classes/order_total.php:178]
#7 order_total->pre_confirmation_check() called at [/includes/modules/payment/paypalwpp.php:1542]
#8 paypalwpp->ec_step1() called at [/ipn_main_handler.php:75]
--> [B]PHP Fatal error: Unknown/invalid billto address # for customer#. in /includes/classes/OnePageCheckout.php on line 2323[/B].

> I read that as the error occurring before the call to PayPal, but I thought using the "Checkout With PayPal" button from the cart, skipping the Billing Info page, should retrieve the billing/shipping data from PayPal. The test site exhibiting this behavior is at <https://test.chessieshop.com>
> Any ideas?
> Thanks,
> Lars
I see that error (the whitescreen, anyway) on your site if I add a product to the cart and, directly from the shopping-cart page, clicking the "Checkout with PayPal" button, but I'm unable to reproduce that issue running zc157c with OnePageCheckout v2.3.7.

Which version of OPC is in use?
15 Apr 2021, 1:13 PM
#1973
llemberg avatar

llemberg

New Zenner

Join Date:
Sep 2008
Posts:
22
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

Sorry I omitted the OnePage version. In the zen cart configuration it is reported as 2.3.7-beta2 (2021-01-17). I downloaded it from the "Download Latest" button at https://www.zen-cart.com/downloads.php?do=file&id=2095&styleid=2
Lars

15 Apr 2021, 2:26 PM
#1974
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

@llemberg, in that log you posted, what Request URI was included?

15 Apr 2021, 3:13 PM
#1975
llemberg avatar

llemberg

New Zenner

Join Date:
Sep 2008
Posts:
22
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

Here is the Request URI from the log
[14-Apr-2021 14:29:42 America/Los_Angeles] Request URI: /ipn_main_handler.php?type=ec, IP address: <my.ip.add.ress>

15 Apr 2021, 3:21 PM
#1976
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

When you inspect your database (via phpMyAdmin), you should have three configuration_key values:

  1. CHECKOUT_ONE_GUEST_BILLTO_ADDRESS_BOOK_ID
  2. CHECKOUT_ONE_GUEST_SENDTO_ADDRESS_BOOK_ID
  3. CHECKOUT_ONE_GUEST_CUSTOMER_ID

The CHECKOUT_ONE_GUEST_CUSTOMER_ID should be associated with the "Guest Customer"'s customers-table record and the two ADDRESS_BOOK_ID values should refer to a valid entry (associated with that Guest Customer) in the site's address_book table.

15 Apr 2021, 3:35 PM
#1977
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

Hmm, re-looking at that log posted:

--> PHP Fatal error: Unknown/invalid billto address # for customer#. in /includes/classes/OnePageCheckout.php on [B]line 2323[/B].

That highlighted line is not the line on which that trigger_error is thrown. Are you sure you have the most up-to-date version of that class-file?

15 Apr 2021, 4:05 PM
#1978
llemberg avatar

llemberg

New Zenner

Join Date:
Sep 2008
Posts:
22
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

lat9:

When you inspect your database (via phpMyAdmin), you should have three configuration_key values:

  1. CHECKOUT_ONE_GUEST_BILLTO_ADDRESS_BOOK_ID
  2. CHECKOUT_ONE_GUEST_SENDTO_ADDRESS_BOOK_ID
  3. CHECKOUT_ONE_GUEST_CUSTOMER_ID

The CHECKOUT_ONE_GUEST_CUSTOMER_ID should be associated with the "Guest Customer"'s customers-table record and the two ADDRESS_BOOK_ID values should refer to a valid entry (associated with that Guest Customer) in the site's address_book table.

@lat9,
The database entries you refer to look like they are lined up correctly. The three configuration key values:

mysql> select configuration_id,configuration_key,configuration_value from configuration where configuration_key like 'CHECKOUT_ONE_GUEST_%_ID';
+------------------+-------------------------------------------+---------------------+
| configuration_id | configuration_key                         | configuration_value |
+------------------+-------------------------------------------+---------------------+
|              719 | CHECKOUT_ONE_GUEST_BILLTO_ADDRESS_BOOK_ID | 11807               |
|              718 | CHECKOUT_ONE_GUEST_CUSTOMER_ID            | 9335                |
|              720 | CHECKOUT_ONE_GUEST_SENDTO_ADDRESS_BOOK_ID | 11808               |
+------------------+-------------------------------------------+---------------------+
3 rows in set (0.00 sec)

The GUEST_CUSTOMER_ID in the customers table:

mysql> select customers_id,customers_firstname,customers_lastname from customers where customers_firstname='Guest';
+--------------+---------------------+-----------------------------+
| customers_id | customers_firstname | customers_lastname          |
+--------------+---------------------+-----------------------------+
|         9335 | Guest               | Customer, **do not remove** |
+--------------+---------------------+-----------------------------+
1 row in set (0.00 sec)

and the two ADDRESS_BOOK_IDs in the address_book table:

mysql> select address_book_id,entry_firstname,entry_lastname from address_book where entry_firstname='Guest';
+-----------------+-----------------+-----------------------------+
| address_book_id | entry_firstname | entry_lastname              |
+-----------------+-----------------+-----------------------------+
|           11807 | Guest           | Customer, **do not remove** |
|           11808 | Guest           | Customer, **do not remove** |
+-----------------+-----------------+-----------------------------+
2 rows in set (0.00 sec)

I've experimented a bit more and discovered that if from the cart I use the Zen Cart buttons to get me to the Checkout page (index.php?main_page=checkout_one), fill in the Contact Info, click Shopping Cart at the top of the page to get back to the cart, THEN the "Pay With PayPal" button successfully takes me to the PayPal log in. It makes sense, since I've entered the missing data causing the error, but I can't determine why the checkout fails trying to use the "Checkout With PayPal" button alone.

15 Apr 2021, 4:31 PM
#1979
llemberg avatar

llemberg

New Zenner

Join Date:
Sep 2008
Posts:
22
Plugin Contributions:
0

Re: One-Page Checkout [Support Thread]

lat9:

Hmm, re-looking at that log posted:

--> PHP Fatal error: Unknown/invalid billto address # for customer#. in /includes/classes/OnePageCheckout.php on [B]line 2323[/B].

> That highlighted line is not the line on which that trigger_error is thrown.  Are you sure you have the most up-to-date version of that class-file?

You fixed it. Not the file reporting the error, but my tpl_modules_opc_shopping_cart.php was two characters shorter than the one contained in one_page_checkout-2.3.7.zip. I don't know why, and probably never will. Thanks for your help, I was getting close to a clean start-from-scratch rebuild, so now I am moving forward again.
Lars
15 Apr 2021, 4:53 PM
#1980
lat9 avatar

lat9

Administrator

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

Re: One-Page Checkout [Support Thread]

llemberg:

You fixed it. Not the file reporting the error, but my tpl_modules_opc_shopping_cart.php was two characters shorter than the one contained in one_page_checkout-2.3.7.zip. I don't know why, and probably never will. Thanks for your help, I was getting close to a clean start-from-scratch rebuild, so now I am moving forward again.
Lars
Lars, that still doesn't explain the line-number discrepancy for the /includes/classes/OnePageCheckout.php where that error was reported.