Jump to content
Killersites Forums

php shopping cart oop mvc paypal


Recommended Posts

This is the error I keep getting when clicking the add to cart button on the product of choice.
Fatal error: Uncaught Error: [] operator not supported for strings in C:\xampp\htdocs\phpcartoopmvc-projectfiles\app\models\m_products.php:172 Stack trace: #0 C:\xampp\htdocs\phpcartoopmvc-projectfiles\app\models\m_cart.php(162): Products->get_prices(Array) #1 C:\xampp\htdocs\phpcartoopmvc-projectfiles\app\init.php(51): Cart->get_total_cost() #2 C:\xampp\htdocs\phpcartoopmvc-projectfiles\index.php(3): include('C:\\xampp\\htdocs...') #3 {main} thrown in C:\xampp\htdocs\phpcartoopmvc-projectfiles\app\models\m_products.php on line 172

could the constants I have set be part of the problem?

benshop.png

constants.png

Screenshot 2021-07-17 234852.png

Edited by Shad76
showing image of product buttons that cause error
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...