Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • cgc0202 Friend
    #164552

    Hello,

    I want larger thumbnails in both the product article and the modules where it is displayed. I tried to achieve this in modules by specifying “230 (W) x 375 (H)” in “What’s New Here”.

    I still got a very small thumbnail in the Slider Module (“What’s New Here”), as well as in the product article.

    How does one resolve this?

    Cornelio

    khoand Friend
    #393499

    Hi,
    – You change Thumbnail Image Width and Thumbnail Image Height field of Component > VirtueMart > Adim > Configuration > Site > Layout
    – replace this code from administratorcomponentscom_virtuemartclassesps_product.php file


    $q = "SELECT product_id, product_name, product_parent_id, product_thumb_image FROM #__{vm}_product WHERE product_sku='$product_sku'";

    with

    $q = "SELECT product_id, product_name, product_parent_id, product_full_image FROM #__{vm}_product WHERE product_sku='$product_sku'";

    replace

    $tpl->set( 'product_thumb_image', $db->f("product_thumb_image"), "alt="".$db->f("product_name").""");

    with


    $tpl->set( 'product_thumb_image', $db->f("product_full_image"), "alt="".$db->f("product_name").""");

    cgc0202 Friend
    #393724

    My error here khoand,

    It turned out to be a cache issue. The default thumbnail WxH is 120×120. I thought, after I changed the settings for the thumbnails in the specifications, and cleared the cache, the thumbnail should change, but it did not.

    After several tries with no success, and the codes you provided above, I was able to locate where the resized images were located. it turned out, the older smaller images were not cleared when the cache was cleared. I had to remove them manually and have to remove the original image also and start all over. That was the way to get the correct larger thumbnail images.

    Cornelio

    <em>@khoand 243407 wrote:</em><blockquote>Hi,
    – You change Thumbnail Image Width and Thumbnail Image Height field of Component > VirtueMart > Adim > Configuration > Site > Layout
    – replace this code from administratorcomponentscom_virtuemartclassesps_product.php file


    $q = "SELECT product_id, product_name, product_parent_id, product_thumb_image FROM #__{vm}_product WHERE product_sku='$product_sku'";

    with

    $q = "SELECT product_id, product_name, product_parent_id, product_full_image FROM #__{vm}_product WHERE product_sku='$product_sku'";

    replace

    $tpl->set( 'product_thumb_image', $db->f("product_thumb_image"), "alt="".$db->f("product_name").""");

    with


    $tpl->set( 'product_thumb_image', $db->f("product_full_image"), "alt="".$db->f("product_name").""");

    </blockquote>

    khoand Friend
    #394004

    <em>@cgc0202 243680 wrote:</em><blockquote>My error here khoand,

    It turned out to be a cache issue. The default thumbnail WxH is 120×120. I thought, after I changed the settings for the thumbnails in the specifications, and cleared the cache, the thumbnail should change, but it did not.

    After several tries with no success, and the codes you provided above, I was able to locate where the resized images were located. it turned out, the older smaller images were not cleared when the cache was cleared. I had to remove them manually and have to remove the original image also and start all over. That was the way to get the correct larger thumbnail images.

    Cornelio

    Cornelio</blockquote>

    You try delete all of files of cache directory

    cgc0202 Friend
    #394049

    <em>@khoand 244021 wrote:</em><blockquote>You try delete all of files of cache directory</blockquote>

    That’s correct khoand,

    My first time to use the VirtueMart. Every time I changed the thumbnail sizes, new ones are produced but the old ones were not deleted, except when I did it manually.

    Also, I found that the module dimensions have to be adjusted accordingly. I was using larger thumbnails, and they kept on merging. As it turned out, it was because the module dimensions were smaller than those of the thumbnail.

    Cornelio

Viewing 5 posts - 1 through 5 (of 5 total)

This topic contains 5 replies, has 2 voices, and was last updated by  cgc0202 13 years, 6 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum