We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36686
    • 165 Posts
    Some questions about product images in MiniShop2:

    1. Is it possible to change the default media source (i.e. the image path) "MS Images" if I want to store my product images somewhere other than assets/images/products, or does it have to be set manually for every product?

    Edit: Feeling pretty daft now, it's pretty obvious how to do this. In case anyone else is wondering, the media sournce can be changed either by editing the System Setting ms2_product_source_default or under Tools > Media Sources.

    2. I've changed ms2_product_thumbnail_size in System Settings but the images on the category pages are still the default 120x90 and new images I upload are stored in the folder 120x90. Is this a bug or is it just me?

    3. The default size of images on product pages seems to be 360x270 - how do I change this?

    This question has been answered by sketchi. See the first response.

    [ed. note: sketchi last edited this post 10 years, 5 months ago.]
    • discuss.answer
      • 36686
      • 165 Posts
      Quote from: sketchi at Nov 16, 2013, 09:11 AM

      2. I've changed ms2_product_thumbnail_size in System Settings but the images on the category pages are still the default 120x90 and new images I upload are stored in the folder 120x90. Is this a bug or is it just me?

      3. The default size of images on product pages seems to be 360x270 - how do I change this?

      I managed to find the answer to the above questions as well after a lot of digging. Apart from the system settings you also have to change the MS2 Image values under Tools > Media Sources > thumbnails.

      However, if you've already uploaded images and want to change your layout afterwards and change the image sizes, you'd have to reupload all the images as far as I can tell. Therefore I decided to only use the original full size images and use phpthumbof instead for resizing. So in tpl.msGallery.outer for example, I replaced this:

      [[+360x270:default=`/assets/components/minishop2/img/web/ms2_medium.png`]]
      


      With this:

      [[+url:default=`/assets/components/minishop2/img/web/ms2_medium.png`:phpthumbof=`w=340&zc=0&q=95&f=png`]]


      Etc.

      There are many cool options for phpthumbof which can be read about at http://www.belafontecode.com/image-manipulation-with-phpthumbof-in-modx-revolution/
        • 33238
        • 388 Posts
        Hello Sketchi... I try your solution but for any reason did not work for me.
        Searching I find another solution by Vasiliy Naumkin the guy that programming the miniShop2.

        here is the answer, is very simple.

        Quote from: bezumkin2 at Apr 26, 2013, 02:37 AM
        PhpThumbOf not needed at all.

        All thumbnails are generating according media source settings when you uploads image in product.


        Then you can show it by snippet msGallery (use placeholders by it size, for example [[+120x90]]) or in snippet msProducts (same placeholders, but you must to include needed sizes by parameter &includeThumbnails=`120x90`)

        Also you can look at products gallery at minishop2.com/manager/, login/pass: demo/demo

        And needs to change the value in the: system setting / ms2_product_thumbnail_size

        Forum Link: http://forums.modx.com/thread/?thread=83965&page=1

        Aditional
        Modify the size [[+360x270]] in the chunk: tpl.msGallery.row
        This Chunk is about the gallery picture size, thumbnails and big images.

        and, in the chunk: tpl.msGallery.outer you need to modify the width="360" height="270" image size.
        same thing in the chunk: tpl.msProducts.row modify the width="" height="" This one shows the products list.

        That is all wink

        PhpThumbOf for some reazon does not work inside the miniShop templates. sad
        but with this changes you don,t really need it! [ed. note: Ysanmiguel last edited this post 10 years ago.]
          --
          ysanmiguel.com