Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

eStore cart thumbnail IMG SRC is full size image

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Tweaks › eStore cart thumbnail IMG SRC is full size image

  • This topic has 3 replies, 2 voices, and was last updated 12 years, 11 months ago by jsmoriss.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • July 27, 2012 at 10:20 pm #7005
    jsmoriss
    Member

    Hi,

    I’m using eStore with NextGEN and the 1 store item configuration. Everything is working great so far. I’ve created a shopping cart page, and I’m using the [wp_eStore_cart_with_thumbnail] shortcode to get the basket. So far so good – all my items are there and all the thumbnails too. The only problem is the thumbnail’s IMG SRC is the full size image from the NextGEN gallery!

    Before I start hacking away at the eStore-extra-shortcodes plugin, I had a few questions…

    Since the “pid” shown in the cart is the image ID why can’t eStore use wp_get_attachment_image_src? I’m pretty sure NextGEN has hooks into the “thumbnail” size (though it doesn’t work for other sizes, like medium, large, etc.).

    I’ve added support for NextGEN gallery images in other plugins, so I could do the same with eStore-extra-shortcodes, but it’s a little difficult to spot where I would have to modify it… Any ideas?

    BTW, the image can also be retrieved by a dynamic URL:

    http://host/index.php?callback=image&pid=##&width=##&height=##&mode=crop

    Could I use this URL in the eStore/NextGEN/single-item configuration somehow?

    Thanks,

    js.

    July 28, 2012 at 12:35 am #47838
    jsmoriss
    Member

    FYI – Found where the problem was:

    $ diff eStore_misc_functions.php-orig eStore_misc_functions.php
    262c262
    <
    $replacement .= '<input type="hidden" name="thumbnail_url" value="'.$nggImage->imageURL.'" />';
    ---
    >
    $replacement .= '<input type="hidden" name="thumbnail_url" value="'.$nggImage->thumbURL.'" />';

    July 28, 2012 at 6:54 am #47839
    admin
    Keymaster

    Thank you. I will update this in the plugin.

    July 29, 2012 at 1:25 am #47840
    jsmoriss
    Member

    Excellent – thanks.

    BTW, here are some other changes I’ve made:

    wp-cart-for-digital-products$ diff eStore_misc_functions.php-orig eStore_misc_functions.php
    255c255,259
    < $replacement .= '<input type="hidden" name="product" value="'.htmlspecialchars($nggImage->alttext).'" /><input type="hidden" name="product_name_tmp1" value="'.htmlspecialchars($nggImage->alttext).'" />';
    ---
    > // jsmoriss - added caption to product_name_tmpl field
    > $replacement .= '<input type="hidden" name="product" value="'.htmlspecialchars($nggImage->alttext);
    > $replacement .= '" /><input type="hidden" name="product_name_tmp1" value="'.htmlspecialchars($nggImage->alttext);
    > if(!empty($nggImage->caption)) $replacement .= ' : '.$nggImage->caption;
    > $replacement .= '" />';
    261,262c265,267
    < if(!empty($nggImage->imageURL)){
    < $replacement .= '<input type="hidden" name="thumbnail_url" value="'.$nggImage->imageURL.'" />';
    ---
    > // jsmoriss - changed imageURL to thumbURL
    > if(!empty($nggImage->thumbURL)){
    > $replacement .= '<input type="hidden" name="thumbnail_url" value="'.$nggImage->thumbURL.'" />';

    eStore-extra-shortcodes$ diff shortcode_include.php-orig shortcode_include.php
    1107a1108,1109
    > // jsmoriss - added 100% to width of TD to maximize name / caption space
    > // linked image instead of item name since it (may) contain caption text
    1109c1111,1114
    < <tr><td style='overflow: hidden;'><div class='eStore_cart_thumbnail'><img src='".$item['thumbnail_url']."' /></div><div class='eStore_cart_item_name'><a href='".$item['cartLink']."'>".$item['name']."</a></div><div class='eStore-fancy-clear'></div></td>";
    ---
    > <tr><td style='overflow:hidden;width:100%;'>
    > <div class='eStore_cart_thumbnail'><a href='".$item['cartLink']."'><img src='".$item['thumbnail_url']."' /></a></div>
    > <div class='eStore_cart_item_name'>".$item['name']."</div>
    > <div class='eStore-fancy-clear'></div></td>";

    Thanks,

    js.

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ