Object of class stdClass could not be converted to string - shopin product slider image exchange or new image - Forum | JoomShaper
Solved SP Page Builder

Object of class stdClass could not be converted to string - shopin product slider image exchange or new image

Asked by Rózsa Csaba 4 years ago Last activity 4 years ago

Hi!

When I want to add a new item in the slider, I get this error when I add a new image. If I want to change an image in the existing item, I get the same error. Please help me!

error: 0
Object of class stdClass could not be converted to string

Joomla! 3.10.11 Template: Shopin Page Builder Pro Version 4.0.5 Php: 7.4.32 5.5.5-10.4.18-MariaDB-1:10.4.18+maria~stretch

Accepted answer

Marked as the solution
Ofi Khan Staff

You are welcome 😊

I have modified this file:

templates/shaper_shopin/sppagebuilder/addons/products_slider/site.php

changed line 34 from this

$bg_image = ($slide_item->bg) ? 'style="background-image: url('/ . JURI::base() . $slide_item->bg . '); background-repeat: no-repeat;

to this

$bg_image = ($slide_item->bg) ? 'style="background-image: url('/ . JURI::base() . (is_string($slide_item->bg) ? $slide_item->bg : $slide_item->bg->src) . '); background-repeat: no-repeat;

3 more replies

Ofi Khan Staff

Hello Rózsa Csaba

Apology for the inconvenience. Your issue is fixed now. Please check your site.

Best regards

Rózsa Csaba Asked this

Hello Ofi,

Thank you very much! Perfect! Can you tell me what you improved so I can learn?

Thank you so much Ofi!

Best Regards
Csab

Ofi Khan Staff

Please accept the answer that helped you. It will be then easier to find the solution for the other users with the same issue. There is a button to accept answer after each comment.

I have a humble request too. It would be very kind of you if you can manage some moment to give us feedback on 

  1. Joomla Extension Directory
  2. TrustPilot

This will inspire us to improve.

Log in to reply.