Home › Forums › Space themes support forum › Product Builder Image Gallery Widget Size
Product Builder Image Gallery Widget Size
- This topic has 14 replies, 2 voices, and was last updated 3 years, 2 months ago by Artem Temos.
-
AuthorPosts
-
September 28, 2021 at 4:09 pm #321761
newsprinceParticipantHello.
In product builder your widget > Gallery that shows the product image with the thumbnails it doesn’t have an option to set the image width.
How to do it?
September 29, 2021 at 6:22 am #321865
Artem TemosKeymasterHello,
Product images width can be set globally only via Dashboard -> Appearance -> Customize -> WooCommercce -> Product images. You can set a different size for product images on a particular product page.
Kind Regards
September 29, 2021 at 6:31 am #321868
newsprinceParticipantNo it is not right to set it globally. This is different functionality.
We are talking about widget’s style option. You should add the same option as elementor’s image widget style settings.
Attachments:
You must be logged in to view attached files.September 29, 2021 at 6:32 am #321870
Artem TemosKeymasterWould you be so kind and send us this screenshot in English so we can better understand what are you talking about? 🙂
September 29, 2021 at 6:36 am #321871
newsprinceParticipantSure
Attachments:
You must be logged in to view attached files.September 29, 2021 at 6:37 am #321873
Artem TemosKeymasterYes, but it is just a single image, it is not a dynamic product images gallery. It can’t have such options and simply ignore global WooCommerce settings.
September 29, 2021 at 6:39 am #321875
newsprinceParticipantYes but it’s in the widget’s scope to have these options. It can inherit them via global woo settings but the widgets have their own functionality.
Anyway i’ll do it via custom css..
September 29, 2021 at 12:04 pm #322004
Artem TemosKeymasterYes, but this element has a too complicated logic behind and it is not as easy to implement custom image size there and not break anything like images lightbox, variations images, etc.
Kind Regards
September 29, 2021 at 8:59 pm #322098
newsprinceParticipant@Artem Temos.
No offense here, i believe you are one of the best team in market and produce the best themes but telling me that this element has a too complicated logic to implement a width image size option for the image product builder widget is plain excuse.
I added a few lines of code based on elementor’s guide and it works just like i described.
Here is the code
$this->add_responsive_control( 'main_image_width', array( 'label' => esc_html__( 'Images Block Width (%)', 'xts-img-width-builder' ), 'type' => Controls_Manager::SLIDER, 'size_units' => array( '%' ), 'range' => array( '%' => array( 'min' => 0, 'max' => 100, ), ), 'default' => array( 'unit' => '%', 'size' => 100, ), 'selectors' => array( '{{WRAPPER}} ' . $css_scheme['images'] => 'width: {{SIZE}}% !important; float: none !important;', ), ) );
File:
/xts-hitek/framework/integration/elementor/elements/single-product/gallery/class-gallery.phpAfter line 131.
I attach a screen record to see it in action.
Thank you.
September 30, 2021 at 6:33 am #322152
Artem TemosKeymasterThis control just changes the image container size with CSS. It has no sense since you can use column width for this.
We were talking about the image size itself, not with its container CSS style.September 30, 2021 at 8:11 am #322193
newsprinceParticipantActually that was what i wanted to say in the first place. I miswrote it.
The element’s width not the image as image. The image can stay what ever value has for woocommerce settings.
I meant the width of the image widget. I know you can use column width BUT i want the column to stay for example at 50% and only shrink the image.
Consider adding this in the widget please.
Thank you.
September 30, 2021 at 11:14 am #322253
Artem TemosKeymasterIn this case, you would better add some padding to the right side of the column. If it is possible to do with existing functionality there is no sense in adding more and more extra options.
September 30, 2021 at 3:08 pm #322355
newsprinceParticipantI think padding is not the solution here and let me show you why.
I attached a screen record to see.
I don’t know why is there so much negativity for a simple feature.
Anyway thank you.
September 30, 2021 at 3:17 pm #322356
newsprinceParticipantAlso by applying padding you cant center the image widget afterwards.
Check the screen record here too.
October 1, 2021 at 6:15 am #322452
Artem TemosKeymasterHello,
1. The difference is that you set fixed padding in PX and the width is set in %. You need to use the same unit of measurement. Also, the padding can be adjusted on mobile devices too.
2. You can center it easily by adding paddings from the right and left sides.
By the way, why you didn’t set the image width container size using an appropriate option that comes in the Advanced tab of Elementor by default? It looks like your custom option does exactly the same. https://gyazo.com/f63be2be2ac5940362bdbfce621e9961
Kind Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register