Post by 0xymoron » Fri Dec 08, 2023 8:21 am

I've been setting up my OpenCart store for a couple days now, last night I started setting up shipping and tax rates. Everything seemed to have went well, I had set up a sales tax rate for my "Taxable Goods" and had configured weight-based shipping. Everything was functional as of last night and I can't recall changing anything in those settings since.
Today I tried adding an item to my cart to double-check that the shipping price would be accurate as a customer wanted to place an order, now there's an empty drop-down for the "State/Region" while in the cart and in account registration. I've tried on multiple browsers and devices, all are having the same issue.
I've tried every single solution I've seen in old forum posts, most of them being almost 10 years old and no longer relevant.
I have no custom theme as far as I know, I tried to install one ages ago but it didn't work out and has been left unassigned since.
The only extension I believe I have installed is the PayPal Checkout extension.

My shop URL is https://oxytuned.com/shop

Any help would be greatly appreciated, I'm really struggling here and haven't been able to come up with any solution. I'll gladly reward whoever helps me get this figured out.
Last edited by 0xymoron on Sat Dec 09, 2023 1:02 am, edited 1 time in total.

Newbie

Posts

Joined
Thu Apr 27, 2023 1:26 am

Post by 0xymoron » Fri Dec 08, 2023 8:27 am

Also something else to add, not sure if it's relevant though. When trying to create a new account on the OpenCart forum I experienced the exact same issue with the "Language" drop-down. Luckily I already had an account I was able to recover otherwise I'd have no way to even submit this post.

Newbie

Posts

Joined
Thu Apr 27, 2023 1:26 am

Post by ADD Creative » Fri Dec 08, 2023 7:02 pm

You have something adding the following to every response. You need to work out what is adding it.

Code: Select all

<!DOCTYPE html>
<html lang="en">
<head>
  <meta property="og:image" content="../assets/img/oxytuned_bg.jpg">
  <meta property="og:image:type" content="image/jpeg">
  <meta property="og:image:width" content="1200">
  <meta property="og:image:height" conntet="628">
  <link href="../assets/img/favicon.png" rel="icon">
  <link href="../assets/img/apple-touch-icon.png" rel="apple-touch-icon">
</head>
</html>

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by JNeuhoff » Fri Dec 08, 2023 8:27 pm

It looks like you got some Javascript errors on your checkout page:

Code: Select all

Uncaught TypeError: paypal_data.components is undefined
    loadPayPalSDK https://oxytuned.com/shop/extension/paypal/catalog/view/javascript/paypal.js?page_code=checkout&separator=.:75
    init https://oxytuned.com/shop/extension/paypal/catalog/view/javascript/paypal.js?page_code=checkout&separator=.:483
    <anonymous> https://oxytuned.com/shop/extension/paypal/catalog/view/javascript/paypal.js?page_code=checkout&separator=.:492
    EventListener.handleEvent* https://oxytuned.com/shop/extension/paypal/catalog/view/javascript/paypal.js?page_code=checkout&separator=.:491
And clicks on the 'Add to Cart' button on your homepage always result in this Javascript error:

Code: Select all

SyntaxError: JSON.parse: unexpected character at line 2 column 1 of the JSON data

OK

<!DOCTYPE html>
<html lang="en">
<head>
  <meta property="og:image" content="../assets/img/oxytuned_bg.jpg">
  <meta property="og:image:type" content="image/jpeg">
  <meta property="og:image:width" content="1200">
  <meta property="og:image:height" conntet="628">
  <link href="../assets/img/favicon.png" rel="icon">
  <link href="../assets/img/apple-touch-icon.png" rel="apple-touch-icon">
</head>
</html>
{"error":{"option_237":"Select required!"},"redirect":"https:\/\/oxytuned.com\/shop\/index.php?route=product\/product&language=en-gb&product_id=55"}
You should at least use OpenCart 4.0.2.3, or the upcoming 4.0.2.4, not an older one!

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by paulfeakins » Fri Dec 08, 2023 10:58 pm

JNeuhoff wrote:
Fri Dec 08, 2023 8:27 pm
You should at least use OpenCart 4.0.2.3, or the upcoming 4.0.2.4, not an older one!
Agreed!

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Guru Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by 0xymoron » Sat Dec 09, 2023 12:13 am

Oh man, you guys are great. How did you figure out that was the issue? I'm not very experienced in web development, no idea how to debug.
I added this disgusting piece of code to my shop's index.php real fast because I was advertising my shop and the logo looked awful, didn't realize it was what caused the issue.

Code: Select all

echo( '
<!DOCTYPE html>
<html lang="en">
<head>
  <meta property="og:image" content="../assets/img/oxytuned_bg.jpg">
  <meta property="og:image:type" content="image/jpeg">
  <meta property="og:image:width" content="1200">
  <meta property="og:image:height" conntet="628">
  <link href="../assets/img/favicon.png" rel="icon">
  <link href="../assets/img/apple-touch-icon.png" rel="apple-touch-icon">
</head>
</html>
' );
How would I add this og:image without destroying my shop?

Newbie

Posts

Joined
Thu Apr 27, 2023 1:26 am

Post by ADD Creative » Sat Dec 09, 2023 12:26 am

You could add it to common / header.twig in the theme editor. You only need to add the meta and link into the current html head section.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by 0xymoron » Sat Dec 09, 2023 12:37 am

Thank you guys so much, I can't begin to explain how frustrated this had me yesterday lol. I almost lost my first sale because of this mess up, luckily the guy reached out and we handled the sale manually. I'd still love to know how you guys found the issue so I can debug a little better myself next time before making a post.

Newbie

Posts

Joined
Thu Apr 27, 2023 1:26 am

Post by ADD Creative » Sat Dec 09, 2023 12:43 am

In your web browser you can use the developer tool. This will display any errors or messages about the page you are viewing. You can also use it to see the page HTML and any data sent to and from the server.

For other issues you may need to look in the OpenCart and PHP error logs.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 3 guests