- Posts: 9
- Thank you received: 1
Bug Report: Undefined array key "quantity"
- Patrick Jackson
- Topic Author
- Offline
- New Member
Less
More
2 months 3 weeks ago #168575
by Patrick Jackson
Bug Report: Undefined array key "quantity" was created by Patrick Jackson
While turning on debug to look at another issue, I had this appear on the popup cart screen:
Warning: Undefined array key "quantity" in /components/com_eshop/helpers/cart.php on line 942
It's a warning and doesn't seem to be causing anything else to be impacted.
EShop Version 3.9.5
Joomla Version 5.1.4
This is the function in cart.php affected (from Line 926)
Warning: Undefined array key "quantity" in /components/com_eshop/helpers/cart.php on line 942
It's a warning and doesn't seem to be causing anything else to be impacted.
EShop Version 3.9.5
Joomla Version 5.1.4
This is the function in cart.php affected (from Line 926)
Code:
/**
*
* Function to get real product data in cart based on product sku
*/
public function getProductDataInCart()
{
$productData = [];
foreach ($this->getCartData() as $product)
{
$productData[$product['product_sku']]['product_name'] = $product['product_name'];
$productData[$product['product_sku']]['minimum_quantity'] = $product['minimum_quantity'];
$productData[$product['product_sku']]['maximum_quantity'] = $product['maximum_quantity'];
if (isset($productData[$product['product_sku']]))
{
[b] $productData[$product['product_sku']]['quantity'] += $product['quantity'];[/b]
}
else
{
$productData[$product['product_sku']]['quantity'] = $product['quantity'];
}
}
return $productData;
}
Please Log in or Create an account to join the conversation.
- Giang Dinh Truong
- Offline
- Administrator
2 months 1 week ago #168741
by Giang Dinh Truong
Replied by Giang Dinh Truong on topic Bug Report: Undefined array key "quantity"
Hello Patrick,
Thank you for submitting the ticket here. The reason because you turn on debug mode. You just need to turn it off.
I will also check the source code to make it better.
Sincerely, Giang
Thank you for submitting the ticket here. The reason because you turn on debug mode. You just need to turn it off.
I will also check the source code to make it better.
Sincerely, Giang
Please Log in or Create an account to join the conversation.
Moderators: Giang Dinh Truong
Support
Documentation
Information
Copyright © 2024 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.