solved Foxycart no longer working

Ken Rich
Ken Rich
@ken-rich
11 months ago
926 posts
My checkout is broken, I am getting emails like this below but I don't understand what is going on.

"An error was recently triggered for one of the templates for your store, Indie Gospel. There may be a fatal error in a twig template related to that page which will need to be corrected, otherwise customers may not be able to complete transactions for your store.

To correct this error, the first step is to recache and save your templates (including category and email templates) and test your store to ensure pages are displaying as they should. If the error persists, you will need to take a closer look at your templates to see what might be causing issues. If you're working with a developer for your store, it might be worth reaching out to them to ask them to assist you in debugging your templates. Also, you might find some additional information about this error from your stores error log available from your stores FoxyCart administration."

I am seeing the errors in the attached screenshots when "Submit Your Order" is pressed. It appears that the checkout template is somehow missing - https://indiegospel.net/foxycart/remote_templates/checkout

On testing a song sale, it also appears that "no payment needed" is being generated when there is a payment required as shown in the subtotal.


Subtotal
$0.99
Standard Shipping $NaN
Order Total: $NaN





--

Ken Rich
indiegospel.net

updated by @ken-rich: 09/04/23 10:54:27PM
Ken Rich
Ken Rich
@ken-rich
11 months ago
926 posts
I tried a non-downloadable sale (a book) but the "No Payment Needed" is generated for that as well.
So there is a subtotal but no Order Total, $NaN appears as the total instead.


--

Ken Rich
indiegospel.net
Ken Rich
Ken Rich
@ken-rich
11 months ago
926 posts
I wrote to Foxycart and got this advice below back. If I am correct then the problem is on the Jamroom side.
Are you still supporting the module and have you made changes that broke it?

+++++++++++++++++++++++

It looks like the issue is coming from the custom shipping javascript that is included on the "cart include" template for your store. It is taking care of setting the shipping costs on the checkout, and it looks for options on the product for international shipping and domestic shipping. It then parses the value as "float" and sets it as the shipping cost.

For that example product you provided, there is no product options for domestic and international shipping, so when the javascript tries to parse the value as float, it returns as not being a number (or "NaN").

If your approach for custom shipping costs expects those product options to be present, you'll need to ensure you're passing them with the product and that should correct the issue.

I also can't cache my template from the Foxycart admin panel because it apparently can no longer be found - https://indiegospel.net/foxycart/remote_templates/checkout

It does appear that that URL no longer works. If you have a different URL for your checkout template, you'll need to cache that URL instead.


--

Ken Rich
indiegospel.net
Ken Rich
Ken Rich
@ken-rich
11 months ago
926 posts
The only settings I have in the admin panel for Foxycart is what is shown in the attached screenshot. The "cart include" template and the "checkout" template are not things I understand or have access to. So what is the path forward on this?


--

Ken Rich
indiegospel.net
Ken Rich
Ken Rich
@ken-rich
11 months ago
926 posts
As I recall, the Foxycart module is supposed to be disabled and now runs as a 3rd party plugin using the API settings above.
So it seems to me, Jamroom has become incompatible with Foxycart and may need to be updated. Will this be supported, what is the path forward?


--

Ken Rich
indiegospel.net
Ken Rich
Ken Rich
@ken-rich
11 months ago
926 posts
My server guy has been looking into it. He says you have an error in Java that is initiated by the location settings. For example, using his American zipcode the cart worked fine, using my Canadian one, the error shows.

If you look at the screenshot, the total is zero ($NaN) though the subtotal is not, and a gateway error is generated. That was on a shippable item, not a download.


--

Ken Rich
indiegospel.net
brian
@brian
11 months ago
10,136 posts
This is a problem with your templates on the Foxycart side - FoxyCart uses "twig" for the pages it hosts during checkout so you can customize them. That checkout page is not generate of controlled by Jamroom.

Quote:
As I recall, the Foxycart module is supposed to be disabled and now runs as a 3rd party plugin using the API settings above.
So it seems to me, Jamroom has become incompatible with Foxycart and may need to be updated. Will this be supported, what is the path forward?

Yes - the FoxyCart module has not been supported for over 6 years - all the functionality was moved in to the Payments module + the subscriptions/bundles modules. So make sure you have installed the Payments module and configured it to work with FoxyCart in the global config.

Let me know if that helps.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Ken Rich
Ken Rich
@ken-rich
11 months ago
926 posts
I followed the instructions Jamroom gave at that time. I disabled the Foxycart modules, enabled the Payments module, and did the global config for the Foxycart plugin.

The templates were set up previously as per Jamroom instructions (when you supported the module) and seemed to work for a long time. There have been no new instructions and I sure as hell don't know how to tweak the forms.

So now I have a screwed-up cart and I can't move off Foxycart without disconnecting all my customers who are subscribed.


--

Ken Rich
indiegospel.net
brian
@brian
11 months ago
10,136 posts
So to just to be clear here:

- the FoxyCart module - this was discontinued 7 years ago and we no longer support it
- the Payments module (which supports FoxyCart) is still supported.

You indicate you believe we no longer support the Payments module and that is not correct. The URL you poster earlier:

https://indiegospel.net/foxycart/remote_templates/checkout

is from the FoxyCart module - which again - was discontinued 7 years ago so please make sure the FoxyCart and FoxyCart Bundles modules are DISABLED as they are no longer supported and there is no help for those. You should 100% be on the payments module only.

... on to the issue ...

The issue here is with the TWIG templates on FoxyCart's end - i.e. THEIR checkout pages - not your Jamroom checkout. We of course have no access to that from the Jamroom side of things, so you'll need to contact FoxyCart support on resetting your templates (or configuring them for your needs) within your FoxyCart admin portal:

https://admin.foxycart.com/admin


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

updated by @brian: 05/27/23 01:04:38PM
Ken Rich
Ken Rich
@ken-rich
11 months ago
926 posts
I think I may have fixed the issue by switching the templates from custom to default at Foxycart. I should have been instructed to do so 7 years ago. No one told me I needed to do that for Foxycart to continue working. I was using the templates Jamroom told me to use when I initially set up Foxycart. I may have been missing sales for years and I see lots of errors in their log files going back a long time.


--

Ken Rich
indiegospel.net
brian
@brian
11 months ago
10,136 posts
Glad you got it working - thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Ken Rich
Ken Rich
@ken-rich
11 months ago
926 posts
Hi Brian,

Since I switched to Foxycart's default templates it is working somewhat but there may be a problem with the shipping costs. Instead of being combined in the Total, they get combined in the subtotal and then shipping costs appear as zero. Please refer to the screenshots.

Moreover, it appears that shipping costs are not added to the profile payout form even though the box for that is checked.

Also, I see you now have the option to use Stripe as the plugin. If I switched to Stripe would I still be able to keep my current subscribers enabled (since Stripe is my payment gateway anyway)? That would remove a $25. a month charge for Foxycart and perhaps I would be happier with the default templates from Stripe.


--

Ken Rich
indiegospel.net
Ken Rich
Ken Rich
@ken-rich
11 months ago
926 posts
Also, the Foxycart team has said this about the Jamroom integration. The values in question revolve around the nuances of shipping costs - distance, country, tariffs, and taxes, rather than just a flat rate charge for everyone regardless of actual shipping costs.

"The custom shipping javascript that used to exist in your cart include template I believe was attempting to get those values. It assumed they were sent with the add to cart information, and assumed that there was a domestic and an international shipping price.

I guess at some point the Jamroom integration changed to send the shipping cost as part of a package price of "cart items" instead of sending the items and shipping costs separately. The Jamroom team would be able to speak more to that side of things - as the cart view in your screenshot where it's separate is Jamroom rather than Foxy. The checkout is then Foxy - but we rely on what Jamroom send us for what is being added to the cart."


--

Ken Rich
indiegospel.net
brian
@brian
11 months ago
10,136 posts
Ken Rich:
Also, I see you now have the option to use Stripe as the plugin. If I switched to Stripe would I still be able to keep my current subscribers enabled (since Stripe is my payment gateway anyway)? That would remove a $25. a month charge for Foxycart and perhaps I would be happier with the default templates from Stripe.

You can't switch them unfortunately - you would have to get everyone to sign back up to a subscription again since subs are not transferable between providers. Stripe doesn't use templates either - it's just a modal checkout.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
brian
@brian
11 months ago
10,136 posts
Ken Rich:
Also, the Foxycart team has said this about the Jamroom integration. The values in question revolve around the nuances of shipping costs - distance, country, tariffs, and taxes, rather than just a flat rate charge for everyone regardless of actual shipping costs.

Yeah - Jamroom doesn't do this - you can add a shipping fee that will be added in to the amount for checkout.

Quote:
I guess at some point the Jamroom integration changed to send the shipping cost as part of a package price of "cart items" instead of sending the items and shipping costs separately. The Jamroom team would be able to speak more to that side of things - as the cart view in your screenshot where it's separate is Jamroom rather than Foxy. The checkout is then Foxy - but we rely on what Jamroom send us for what is being added to the cart."

Yeah we combine them since Stripe does not break the charges out. Our goal with the payment module is to make the actual checkout side as simple and as much as possible the same, so it's a pretty simple setup.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Ken Rich
Ken Rich
@ken-rich
11 months ago
926 posts
OK, so you provide simple flat rate shipping only, no difference between local and international, etc. Fair enough but what can I do to make the shipping part of the total rather than the subtotal? It looks like an error to me to have it added to the subtotal and then shown as zero under shipping. Not only that, on multiple items that would mean many shipping charges added into the subtotals, instead of one combined shipping charge - am I right?

Like on the screenshot provided, I am showing zero shipping charge on the form because it is already added to the subtotal. If that were multiple items, wouldn't there be multiple shipping charges added into the subtotals, and still shipping showing as zero?

Are you saying it is designed to work that way?


--

Ken Rich
indiegospel.net
brian
@brian
11 months ago
10,136 posts
Correct. I assume you are using the Products module and you are adding the S&H in the Shipping and Handling field on your items? If so the S&H will appear in the Cart and be included in the price for checkout.
20230601-063934.jpg
20230601-063934.jpg  •  272KB




--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Ken Rich
Ken Rich
@ken-rich
11 months ago
926 posts
Yes, except that the Foxycart checkout template doesn't show what you are showing.

So in the example in the screenshot, I have a 9.99 dollar CD showing as 13.99 with zero shipping shown on the form. The 4-dollar shipping charge isn't shown, it is included in the subtotal, and zero shows for shipping and handling charges. That is deceptive.

Moreover, the shipping charge is not included in the Profile Payout, even though the setting is made to include it. In other words, "Include Shipping in Payout" is checked but it is not being included.

So those are the two issues I have with the current set-up.


--

Ken Rich
indiegospel.net
brian
@brian
11 months ago
10,136 posts
Ken Rich:
Yes, except that the Foxycart checkout template doesn't show what you are showing.

My screenshot is the Jamroom shopping cart - not FoxyCart.

Quote:
So in the example in the screenshot, I have a 9.99 dollar CD showing as 13.99 with zero shipping shown on the form. The 4-dollar shipping charge isn't shown, it is included in the subtotal, and zero shows for shipping and handling charges. That is deceptive.

This is not Jamroom doing this - log in to your FoxyCart admin and see if you can disable shipping. My guess is that at some time years ago you enabled shipping options in your FoxyCart and they are still showing. Jamroom is not adding that line.

Quote:
Moreover, the shipping charge is not included in the Profile Payout, even though the setting is made to include it. In other words, "Include Shipping in Payout" is checked but it is not being included.

So this is from the Payments -> Tools -> Profile Payout?


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Ken Rich
Ken Rich
@ken-rich
11 months ago
926 posts
Quote: So this is from the Payments -> Tools -> Profile Payout?

Yes - I did a test with a shippable product. The product price but not the shipping cost ended up in the Profile Payment section.
This was despite the fact the box was checked to include the shipping cost.

Thanks on the other tip, I will check into that.


--

Ken Rich
indiegospel.net
Ken Rich
Ken Rich
@ken-rich
11 months ago
926 posts
Foxycart gave me a code to hide the shipping charge since it is already in the subtotal.

I did two more tests for the shipping charge adding to the Profile Payout. Both were successful, I don't know why it failed before.

So I think the issues are fixed at this point - thanks for your help.


--

Ken Rich
indiegospel.net
brian
@brian
11 months ago
10,136 posts
Glad to hear that's working now - thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

Tags