s09e01 - Review Image SUPPORT / QUESTIONS / CHAT

Open to all! Ask other shopowners for help.
Post Reply
User avatar
burt
Core Team
Posts: 4550
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

s09e01 - Review Image SUPPORT / QUESTIONS / CHAT

Post by burt »

Addon:
Allows possibility of customer uploading an image as part of their review.

Download:
viewtopic.php?f=28&t=718

--

Questions/Support
I am not here to build for you.
I am here to build with you. Let's help each other.

Tags:


Join The Code Co-op to get access to your library in the Code Co-op Forum
Omar_one
Senior Contributor
Posts: 677
Joined: Fri Oct 25, 2019 5:06 pm
Phoenix Version: v1.0.8.16
Has thanked: 100 times
Been thanked: 56 times

Re: s01e08 & s01e09 - Layout Modules

Post by Omar_one »

@ecartz I get error (error_log file)
PHP Notice: Undefined index: reviews_image in

Code: Select all

  /templates/override/includes/modules/content/product_info/tpl_cm_pi_reviews.php on line 11
here is the lines 10-12

Code: Select all

    // new added to get the review image if such image exists
    echo new Image('pub/' . $review['reviews_image'], ['class' => 'float-left', 'loading' => 'lazy']);
    // eof
    
radhavallabh
Senior Contributor
Posts: 466
Joined: Tue Oct 27, 2020 4:09 am
Phoenix Version: 1.1.0.6
Has thanked: 29 times
Been thanked: 3 times

Re: 1.0.8.14 Questions / Comments / Concerns

Post by radhavallabh »

Hi dear after upgrade to 1.0.8.14
I still get below errors in admin on reviews.php when I select a review with image
Warning: array_merge(): Expected parameter 2 to be an array, null given in /xx/xx/admin/includes/actions/reviews/views/default.php on line 83

Warning: Invalid argument supplied for foreach() in /xx/xx/admin/includes/classes/object_info.php on line 20

On a review without image on selection I get below error on same review.php page-
Notice
: Trying to get property 'reviews_image' of non-object in
/xx/xx/includes/hooks/admin/reviews/image.php
on line
17
User avatar
burt
Core Team
Posts: 4550
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: 1.0.8.18 Questions / Comments / Concerns

Post by burt »

MyGamesShop wrote: Sun Sep 11, 2022 3:12 am <img class="float-left img-fluid" loading="lazy" src="pub/" border="0" title="" />
This part here does not include the image filename...it should be something like;

src="pub/name_of_image.jpg"

This would be the first thing for you to check. Does the image exist? Is it the image filename stored in the reviews table? Is the script grabbing the filename?
I am not here to build for you.
I am here to build with you. Let's help each other.
14Steve14
Senior Contributor
Posts: 921
Joined: Fri Oct 25, 2019 7:01 pm
Phoenix Version: v1.0.9.1
Has thanked: 17 times
Been thanked: 103 times

Re: s09e01 - Review Image SUPPORT / QUESTIONS / CHAT

Post by 14Steve14 »

I have had a customer add an image to a review but the image is huge. Is there a way to alter the size of an image without the need to go into the pub folder and manually change them to something smaller. I have changed the code to

Code: Select all

echo new Image('pub/' . $review['reviews_image'], ['class' => 'float-left', 'loading' => 'lazy', 'style' => 'width: 100px; height: 100px;']);
but that expands the image outside of the blockquote area.
User avatar
burt
Core Team
Posts: 4550
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: s09e01 - Review Image SUPPORT / QUESTIONS / CHAT

Post by burt »

Try;

echo new Image('pub/' . $review['reviews_image'], ['class' => 'float-left w-25', 'loading' => 'lazy']);
I am not here to build for you.
I am here to build with you. Let's help each other.
14Steve14
Senior Contributor
Posts: 921
Joined: Fri Oct 25, 2019 7:01 pm
Phoenix Version: v1.0.9.1
Has thanked: 17 times
Been thanked: 103 times

Re: s09e01 - Review Image SUPPORT / QUESTIONS / CHAT

Post by 14Steve14 »

burt wrote: Mon Sep 09, 2024 9:21 am Try;

echo new Image('pub/' . $review['reviews_image'], ['class' => 'float-left w-25', 'loading' => 'lazy']);
Thanks Gary.

Tried that and it seems to be dependant on the size of the image that was uploaded. Tied adding on a test site two reviews on the same product with two different sized images uploaded, one to each review the reviews section sort of starts to look all wrong and out of proportion if you know what I mean.

I will also have to look into the blockquote css to see if there is a way to make it expand to the maximum size of the images. Bound to be something online.
User avatar
burt
Core Team
Posts: 4550
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: s09e01 - Review Image SUPPORT / QUESTIONS / CHAT

Post by burt »

Otherwise try sticking the image into the grid. I haven't looked at this addon since it was released to Supporters...

Try;

Code: Select all

echo '<div class="w-25 float-left">';
  echo new Image('pub/' . $review['reviews_image'], ['loading' => 'lazy']);
echo '</div>';
This is addition of a div (width 25 of the container and floated left).
And remove float-left from the image.
I am not here to build for you.
I am here to build with you. Let's help each other.


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply