- Posts: 18
- Thank you received: 2
Error PHP 8, Cart Module
- maurizio.dematteis@gmail.com
-
Topic Author
- Offline
Less
More
3 years 7 months ago - 3 years 7 months ago #349604
by maurizio.dematteis@gmail.com
Error PHP 8, Cart Module was created by maurizio.dematteis@gmail.com
-- HikaShop version -- : 4.7.1
-- Joomla version -- : 4.2.8
-- PHP version -- : 8.x
-- Error-message(debug-mod must be tuned on) -- : Warning: Undefined property: stdClass::$cart_id in /homepages/19/d950326389/htdocs/cms/joom4/templates/gk_storefront/html/com_hikashop/product/cart.php on line 132
Hello,
i have an error message in the cart module.
Thank you and with best regards
Maurizio
the code snippet:
-- Joomla version -- : 4.2.8
-- PHP version -- : 8.x
-- Error-message(debug-mod must be tuned on) -- : Warning: Undefined property: stdClass::$cart_id in /homepages/19/d950326389/htdocs/cms/joom4/templates/gk_storefront/html/com_hikashop/product/cart.php on line 132
Hello,
i have an error message in the cart module.
Thank you and with best regards
Maurizio
the code snippet:
Code:
<form action="<?php echo hikashop_completeLink('product&task=updatecart' . $url_itemid, false, true); ?>" method="post" name="<?php echo $form; ?>">
<div>
<div>
<?php
$k = 0;
$this->cart_product_price = true;
$group = $this->config->get('group_options', 0);
$cart_id = 0;
$app = JFactory::getApplication();
$productClass = hikashop_get('class.product');
$defaultParams = $this->config->get('default_params');
$this->image = hikashop_get('helper.image');
$height = $this->config->get('thumbnail_y');
$width = $this->config->get('thumbnail_x');
foreach ($this->rows as $i => $row) {
$cart_id = $row->cart_id; // LINE WITH THE ISSUE
if (empty($row->cart_product_quantity) || @$row->hide == 1)
continue;
if ($group && $row->cart_product_option_parent_id)
continue;
$productClass->addAlias($row);
?>
Last edit: 3 years 7 months ago by Jerome. Reason: [code] tag is NICE
Please Log in or Create an account to join the conversation.
3 years 7 months ago #349613
by nicolas
Replied by nicolas on topic Error PHP 8, Cart Module
Hi,
This warning comes from the view override in your template.
This line is not in the default view file in HikaShop.
You could rename the file templates/gk_storefront/html/com_hikashop/product/cart.php to something else via FTP to deactivate the override, and that would fix the warning. However, you'll loose the look of your cart module.
You could also turn off the "error reporting" and "debug" settings of the joomla configuration (which should be the case normally on a live website, for security reasons) and that would hide the warning.
However, the best would be to provide the warning to your template provider's support and check with them what they recommend.
This warning comes from the view override in your template.
This line is not in the default view file in HikaShop.
You could rename the file templates/gk_storefront/html/com_hikashop/product/cart.php to something else via FTP to deactivate the override, and that would fix the warning. However, you'll loose the look of your cart module.
You could also turn off the "error reporting" and "debug" settings of the joomla configuration (which should be the case normally on a live website, for security reasons) and that would hide the warning.
However, the best would be to provide the warning to your template provider's support and check with them what they recommend.
Please Log in or Create an account to join the conversation.
- maurizio.dematteis@gmail.com
-
Topic Author
- Offline
Less
More
- Posts: 18
- Thank you received: 2
3 years 7 months ago #349623
by maurizio.dematteis@gmail.com
Replied by maurizio.dematteis@gmail.com on topic Error PHP 8, Cart Module
Hello Nicolas,
i will do so and thank you for your quick reply.
Best Regards
Maurizio
i will do so and thank you for your quick reply.
Best Regards
Maurizio
Please Log in or Create an account to join the conversation.
Time to create page: 0.135 seconds