[Skip to main content](#vessel-content)

#   Error PHP 8 ?

##

- **[maurizio.dematteis@gmail.com](/forum/user/53419-maurizio-dematteis-gmail-com "View maurizio.dematteis@gmail.com's Profile")**
- [![maurizio.dematteis@gmail.com's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/53419-maurizio-dematteis-gmail-com "View maurizio.dematteis@gmail.com's Profile") Topic Author
- [ Offline](/forum/user/53419-maurizio-dematteis-gmail-com)

Less More

- Posts: 18
- Thank you received: 2
-
-

3 years 8 months ago [\#349352](#349352) by [maurizio.dematteis@gmail.com](/forum/user/53419-maurizio-dematteis-gmail-com "View maurizio.dematteis@gmail.com's Profile")  *[Error PHP 8 ?](/forum/25-install-update/905918-error-php-8#349352 "-- HikaShop version -- : 4.7.1 -- Joomla version -- : 4.2.8 -- PHP version -- : 8.0 -- Error-message(debug-mod must be tuned on) -- : ATTEMPT TO ASSIGN PROPERTY &quot;SYNCHED&#95;CART&#95;QUANTITY&quot; ON NULL  Hello, when switching from PHP 7.4.x to 8.0 i get the error as shown in the screenshot. I am using the &quot;Storefront - eCommerce Joomla! template&quot;   storefront.demo.gavick.com/  When i switch back to PHP 7.4. and activate show php errors, i get:  Notice: Undefined property: ProductViewProduct::$row in .../components/com&#95;hikashop/views/product/tmpl/show&#95;quantity.php on line 60  Notice: Trying to get property 'product&#95;id' of non-object in .../com&#95;hikashop/views/product/tmpl/show&#95;quantity.php on line 60  Warning: Creating default object from empty value in .../com&#95;hikashop/views/product/tmpl/show&#95;quantity.php on line 61  Best regards Maurizio de Matteis")* was created by *[maurizio.dematteis@gmail.com](/forum/user/53419-maurizio-dematteis-gmail-com "View maurizio.dematteis@gmail.com's Profile")*

-- HikaShop version -- : 4.7.1
-- Joomla version -- : 4.2.8
-- PHP version -- : 8.0
-- Error-message(debug-mod must be tuned on) -- : ATTEMPT TO ASSIGN PROPERTY
"SYNCHED_CART_QUANTITY" ON NULL

Hello,
when switching from PHP 7.4.x to 8.0 i get the error as shown in the screenshot.
I am using the "Storefront - eCommerce Joomla! template" [ storefront.demo.gavick.com/](https://storefront.demo.gavick.com/)

When i switch back to PHP 7.4. and activate show php errors, i get:

Notice: Undefined property: ProductViewProduct::$row in .../components/com_hikashop/views/product/tmpl/show_quantity.php on line 60

Notice: Trying to get property 'product_id' of non-object in .../com_hikashop/views/product/tmpl/show_quantity.php on line 60

Warning: Creating default object from empty value in .../com_hikashop/views/product/tmpl/show_quantity.php on line 61

Best regards
Maurizio de Matteis

- [ ![Screenshot2023-02-17011213.png](/forum/attachment/56529) ](/forum/attachment/56529 "...2-17011213.png") [ ](/forum/attachment/56529?download=1 "...2-17011213.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzkwNTkxOC1lcnJvci1waHAtOD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Philip](/forum/user/34318-philip "View Philip's Profile")**
- [![Philip's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34318-philip "View Philip's Profile")
- [ Offline](/forum/user/34318-philip)

Less More

- Posts: 4820
- Thank you received: 652
-
-

3 years 8 months ago -  3 years 8 months ago [\#349355](#349355) by [Philip](/forum/user/34318-philip "View Philip's Profile")  Replied by *[Philip](/forum/user/34318-philip "View Philip's Profile")* on topic *[Error PHP 8 ?](/forum/25-install-update/905918-error-php-8#349355 "-- HikaShop version -- : 4.7.1 -- Joomla version -- : 4.2.8 -- PHP version -- : 8.0 -- Error-message(debug-mod must be tuned on) -- : ATTEMPT TO ASSIGN PROPERTY &quot;SYNCHED&#95;CART&#95;QUANTITY&quot; ON NULL  Hello, when switching from PHP 7.4.x to 8.0 i get the error as shown in the screenshot. I am using the &quot;Storefront - eCommerce Joomla! template&quot;   storefront.demo.gavick.com/  When i switch back to PHP 7.4. and activate show php errors, i get:  Notice: Undefined property: ProductViewProduct::$row in .../components/com&#95;hikashop/views/product/tmpl/show&#95;quantity.php on line 60  Notice: Trying to get property 'product&#95;id' of non-object in .../com&#95;hikashop/views/product/tmpl/show&#95;quantity.php on line 60  Warning: Creating default object from empty value in .../com&#95;hikashop/views/product/tmpl/show&#95;quantity.php on line 61  Best regards Maurizio de Matteis")*

Hello,

Can you process theses tests :
- Try php8 with a **default template** (Cassiopeia for J4)
=&gt; **No error ?**, then there are good chance that your issue come from template (no php8 support?)
- Can you precise your **test context**, when you "switch back to PHP 7.4" in order to allow us to better understand in which context these errors appear, we need you to precise :
- Confirm that you **Joomla debug** is activated **AND** in the maximum level (or dev level)
=&gt; Note that in **production phase** you have to **switch off** the debug (or at least use a lower level) because prevent notice error is almost impossible to prevent in many cases.
- Detail the **step by step** to reproduce your issue

Awaiting your returns to progress
Regards

Last edit: 3 years 8 months ago by [Philip](/forum/user/34318-philip "View Philip's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzkwNTkxOC1lcnJvci1waHAtOD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[maurizio.dematteis@gmail.com](/forum/user/53419-maurizio-dematteis-gmail-com "View maurizio.dematteis@gmail.com's Profile")**
- [![maurizio.dematteis@gmail.com's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/53419-maurizio-dematteis-gmail-com "View maurizio.dematteis@gmail.com's Profile") Topic Author
- [ Offline](/forum/user/53419-maurizio-dematteis-gmail-com)

Less More

- Posts: 18
- Thank you received: 2
-
-

3 years 8 months ago [\#349370](#349370) by [maurizio.dematteis@gmail.com](/forum/user/53419-maurizio-dematteis-gmail-com "View maurizio.dematteis@gmail.com's Profile")  Replied by *[maurizio.dematteis@gmail.com](/forum/user/53419-maurizio-dematteis-gmail-com "View maurizio.dematteis@gmail.com's Profile")* on topic *[Error PHP 8 ?](/forum/25-install-update/905918-error-php-8#349370 "-- HikaShop version -- : 4.7.1 -- Joomla version -- : 4.2.8 -- PHP version -- : 8.0 -- Error-message(debug-mod must be tuned on) -- : ATTEMPT TO ASSIGN PROPERTY &quot;SYNCHED&#95;CART&#95;QUANTITY&quot; ON NULL  Hello, when switching from PHP 7.4.x to 8.0 i get the error as shown in the screenshot. I am using the &quot;Storefront - eCommerce Joomla! template&quot;   storefront.demo.gavick.com/  When i switch back to PHP 7.4. and activate show php errors, i get:  Notice: Undefined property: ProductViewProduct::$row in .../components/com&#95;hikashop/views/product/tmpl/show&#95;quantity.php on line 60  Notice: Trying to get property 'product&#95;id' of non-object in .../com&#95;hikashop/views/product/tmpl/show&#95;quantity.php on line 60  Warning: Creating default object from empty value in .../com&#95;hikashop/views/product/tmpl/show&#95;quantity.php on line 61  Best regards Maurizio de Matteis")*

Hallo Philip,
it seems to be a problem with the Storefront template. With Cassiopeia all works well.
II will ask for support.
Thank you and regards
Maurizio

The following user(s) said Thank You: [Philip](/forum/user/34318-philip "View Philip's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzkwNTkxOC1lcnJvci1waHAtOD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[maurizio.dematteis@gmail.com](/forum/user/53419-maurizio-dematteis-gmail-com "View maurizio.dematteis@gmail.com's Profile")**
- [![maurizio.dematteis@gmail.com's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/53419-maurizio-dematteis-gmail-com "View maurizio.dematteis@gmail.com's Profile") Topic Author
- [ Offline](/forum/user/53419-maurizio-dematteis-gmail-com)

Less More

- Posts: 18
- Thank you received: 2
-
-

3 years 8 months ago [\#349430](#349430) by [maurizio.dematteis@gmail.com](/forum/user/53419-maurizio-dematteis-gmail-com "View maurizio.dematteis@gmail.com's Profile")  Replied by *[maurizio.dematteis@gmail.com](/forum/user/53419-maurizio-dematteis-gmail-com "View maurizio.dematteis@gmail.com's Profile")* on topic *[Error PHP 8 ?](/forum/25-install-update/905918-error-php-8#349430 "-- HikaShop version -- : 4.7.1 -- Joomla version -- : 4.2.8 -- PHP version -- : 8.0 -- Error-message(debug-mod must be tuned on) -- : ATTEMPT TO ASSIGN PROPERTY &quot;SYNCHED&#95;CART&#95;QUANTITY&quot; ON NULL  Hello, when switching from PHP 7.4.x to 8.0 i get the error as shown in the screenshot. I am using the &quot;Storefront - eCommerce Joomla! template&quot;   storefront.demo.gavick.com/  When i switch back to PHP 7.4. and activate show php errors, i get:  Notice: Undefined property: ProductViewProduct::$row in .../components/com&#95;hikashop/views/product/tmpl/show&#95;quantity.php on line 60  Notice: Trying to get property 'product&#95;id' of non-object in .../com&#95;hikashop/views/product/tmpl/show&#95;quantity.php on line 60  Warning: Creating default object from empty value in .../com&#95;hikashop/views/product/tmpl/show&#95;quantity.php on line 61  Best regards Maurizio de Matteis")*

Hallo Philip,
This workaround helped.I posted it to the guys of gavick and they said, this is Hikashop Core Code.
Can you give me advice.
best regards
Maurizio

---

Hello,
I commented out code in /components/com_hikashop/views/product/tmpl/show_quantity.php at line 59
Everything works fine as far as i can see.
Shop is not yet in productive mode.
Regards

$extra_classes = '';
from here:
if($this-&gt;config-&gt;get('synchronized_add_to_cart', 0)) {
$cartClass = hikashop_get('class.cart');
$cartProductData = $cartClass-&gt;getCartProductData($this-&gt;row-&gt;product_id);
$this-&gt;row-&gt;synched_cart_quantity = (int)@$cartProductData-&gt;cart_product_quantity;
if($quantityLayout == 'show_default')
$quantityLayout = 'show_default_div';
if($this-&gt;row-&gt;synched_cart_quantity)
$current_quantity = $this-&gt;row-&gt;synched_cart_quantity;
if($min_quantity == 1)
$min_quantity = 0;
$cartClass-&gt;syncInit();
if(in_array($quantityLayout, array('show_select','show_select_price')))
$extra_classes = 'no-chzn';
to here

?&gt;
&lt;input id="&lt;?php echo $id; ?&gt;_synch" class="synchronized_add_to_cart" data-id="&lt;?php echo $id; ?&gt;" data-product-id="&lt;?php echo $this-&gt;row-&gt;product_id; ?&gt;" data-cart-product-id="&lt;?php echo @$cartProductData-&gt;cart_product_id; ?&gt;" type="hidden" name="synched_cart_quantity" value="&lt;?php echo $this-&gt;row-&gt;synched_cart_quantity; ?&gt;"/&gt;
&lt;?php
}

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzkwNTkxOC1lcnJvci1waHAtOD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86556
- Thank you received: 14304
-
-

3 years 8 months ago [\#349433](#349433) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Error PHP 8 ?](/forum/25-install-update/905918-error-php-8#349433 "-- HikaShop version -- : 4.7.1 -- Joomla version -- : 4.2.8 -- PHP version -- : 8.0 -- Error-message(debug-mod must be tuned on) -- : ATTEMPT TO ASSIGN PROPERTY &quot;SYNCHED&#95;CART&#95;QUANTITY&quot; ON NULL  Hello, when switching from PHP 7.4.x to 8.0 i get the error as shown in the screenshot. I am using the &quot;Storefront - eCommerce Joomla! template&quot;   storefront.demo.gavick.com/  When i switch back to PHP 7.4. and activate show php errors, i get:  Notice: Undefined property: ProductViewProduct::$row in .../components/com&#95;hikashop/views/product/tmpl/show&#95;quantity.php on line 60  Notice: Trying to get property 'product&#95;id' of non-object in .../com&#95;hikashop/views/product/tmpl/show&#95;quantity.php on line 60  Warning: Creating default object from empty value in .../com&#95;hikashop/views/product/tmpl/show&#95;quantity.php on line 61  Best regards Maurizio de Matteis")*

Hi,

Change the line: Code:

if($this-&gt;config-&gt;get('synchronized_add_to_cart', 0)) {

to: Code:

if($this-&gt;config-&gt;get('synchronized_add_to_cart', 0) &amp;&amp; isset($this-&gt;row)) {

in the file components/com_hikashop/views/product/tmpl/show_quantity.php and that should fix the problem.
Let us know the result on your end so that we can add the modification on our end too for others.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzkwNTkxOC1lcnJvci1waHAtOD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[maurizio.dematteis@gmail.com](/forum/user/53419-maurizio-dematteis-gmail-com "View maurizio.dematteis@gmail.com's Profile")**
- [![maurizio.dematteis@gmail.com's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/53419-maurizio-dematteis-gmail-com "View maurizio.dematteis@gmail.com's Profile") Topic Author
- [ Offline](/forum/user/53419-maurizio-dematteis-gmail-com)

Less More

- Posts: 18
- Thank you received: 2
-
-

3 years 8 months ago [\#349516](#349516) by [maurizio.dematteis@gmail.com](/forum/user/53419-maurizio-dematteis-gmail-com "View maurizio.dematteis@gmail.com's Profile")  Replied by *[maurizio.dematteis@gmail.com](/forum/user/53419-maurizio-dematteis-gmail-com "View maurizio.dematteis@gmail.com's Profile")* on topic *[Error PHP 8 ?](/forum/25-install-update/905918-error-php-8#349516 "-- HikaShop version -- : 4.7.1 -- Joomla version -- : 4.2.8 -- PHP version -- : 8.0 -- Error-message(debug-mod must be tuned on) -- : ATTEMPT TO ASSIGN PROPERTY &quot;SYNCHED&#95;CART&#95;QUANTITY&quot; ON NULL  Hello, when switching from PHP 7.4.x to 8.0 i get the error as shown in the screenshot. I am using the &quot;Storefront - eCommerce Joomla! template&quot;   storefront.demo.gavick.com/  When i switch back to PHP 7.4. and activate show php errors, i get:  Notice: Undefined property: ProductViewProduct::$row in .../components/com&#95;hikashop/views/product/tmpl/show&#95;quantity.php on line 60  Notice: Trying to get property 'product&#95;id' of non-object in .../com&#95;hikashop/views/product/tmpl/show&#95;quantity.php on line 60  Warning: Creating default object from empty value in .../com&#95;hikashop/views/product/tmpl/show&#95;quantity.php on line 61  Best regards Maurizio de Matteis")*

Hello Nicolas,
works well!

Thanks and with best regards
Maurizio

The following user(s) said Thank You: [nicolas](/forum/user/63-nicolas "View nicolas's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI1LWluc3RhbGwtdXBkYXRlLzkwNTkxOC1lcnJvci1waHAtOD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.069 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
