Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notice: Trying to access array offset on value of type bool (PHP 7.4 is_shoppingcart override) #70

Closed
lramos-prolaser opened this issue Jan 31, 2022 · 2 comments

Comments

@lramos-prolaser
Copy link
Contributor

Hello!
There is a missing {if $product.default_image} control in starter/modules/is_shoppingcart/views/template/front/is_shoppingcart-product-line.tpl

image

For any of you having this same problem, there's a quick fix waiting for the next release of the theme with these bugs fixed, (as announced by @Oksydan here and here ):

In theme's directory starter/modules/is_shoppingcart/views/template/front/is_shoppingcart-product-line.tpl change these lines:

        <img
            {generateImagesSources image=$product.default_image size='cart_default' lazyload=false}
            alt="{$product.name|escape:'quotes'}"
            class="img-fluid"
            width="{$product.default_image.bySize.cart_default.width}"
            height="{$product.default_image.bySize.cart_default.height}">

to:

        <img
            {if $product.default_image}
                {generateImagesSources image=$product.default_image size='cart_default' lazyload=false}
            {else}
                src="{$urls.no_picture_image.bySize.cart_default.url}"
            {/if}
            alt="{$product.name|escape:'quotes'}"
            class="img-fluid"
            width="{if !empty($product.default_image)}{$product.default_image.bySize.cart_default.width}{/if}"
            height="{if !empty($product.default_image)}{$product.default_image.bySize.cart_default.height}{/if}">
@Oksydan
Copy link
Owner

Oksydan commented Feb 3, 2022

Hi @lramos-prolaser,
thank you for your report.
I know that next version is a bit late. I promise next version by the end of the month.

@Oksydan
Copy link
Owner

Oksydan commented Mar 14, 2022

Hi @lramos-prolaser,
fix has been applied. It is already on develop branch.
New minor release will be soon.

@Oksydan Oksydan closed this as completed Mar 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants