Addon:
Allows possibility of customer uploading an image as part of their review.
Download:
viewtopic.php?f=28&t=718
--
Questions/Support
s09e01 - Review Image SUPPORT / QUESTIONS / CHAT
- burt
- Core Team
- Posts: 4550
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 252 times
- Been thanked: 412 times
s09e01 - Review Image SUPPORT / QUESTIONS / CHAT
I am not here to build for you.
I am here to build with you. Let's help each other.
I am here to build with you. Let's help each other.
Tags:
-
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
@ecartz I get error (error_log file)
PHP Notice: Undefined index: reviews_image in
here is the lines 10-12
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
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
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
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
- burt
- Core Team
- Posts: 4550
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 252 times
- Been thanked: 412 times
Re: 1.0.8.18 Questions / Comments / Concerns
This part here does not include the image filename...it should be something like;MyGamesShop wrote: ↑Sun Sep 11, 2022 3:12 am <img class="float-left img-fluid" loading="lazy" src="pub/" border="0" title="" />
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.
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
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
but that expands the image outside of the blockquote area.
Code: Select all
echo new Image('pub/' . $review['reviews_image'], ['class' => 'float-left', 'loading' => 'lazy', 'style' => 'width: 100px; height: 100px;']);- burt
- Core Team
- Posts: 4550
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 252 times
- Been thanked: 412 times
Re: s09e01 - Review Image SUPPORT / QUESTIONS / CHAT
Try;
echo new Image('pub/' . $review['reviews_image'], ['class' => 'float-left w-25', 'loading' => 'lazy']);
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.
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
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.
- burt
- Core Team
- Posts: 4550
- Joined: Tue Oct 29, 2019 9:37 am
- Phoenix Version: v1.1.0.8
- : Buy Me A Beverage
- Has thanked: 252 times
- Been thanked: 412 times
Re: s09e01 - Review Image SUPPORT / QUESTIONS / CHAT
Otherwise try sticking the image into the grid. I haven't looked at this addon since it was released to Supporters...
Try;
This is addition of a div (width 25 of the container and floated left).
And remove float-left from the image.
Try;
Code: Select all
echo '<div class="w-25 float-left">';
echo new Image('pub/' . $review['reviews_image'], ['loading' => 'lazy']);
echo '</div>';
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.
I am here to build with you. Let's help each other.