Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2007
    Posts
    25
    Plugin Contributions
    0

    Default Medium Image in Featured sidebox

    Anyone know how I can use a products medium image in the featured sidebox, rather than the default small? I have Image Handler 2 installed.....?

    Cheers
    Lee

  2. #2
    Join Date
    Oct 2007
    Posts
    25
    Plugin Contributions
    0

    Default Re: Medium Image in Featured sidebox

    ok, can anyone explain this function then, please...!

    zen_image(DIR_WS_IMAGES . $random_featured_product->fields['products_image'], $random_featured_product->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT);

    I understand that it builds <img> tag src, name, alt, width, hight but how does DIR_WS_IMAGES work..?

    I try adding
    <?php require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_MAIN_PRODUCT_IMAGE));

    and using

    zen_image($products_image_medium, addslashes($products_name), FEATURED_PRODUCTS_WIDTH, FEATURED_PRODUCTS_HEIGHT)

    but understand that this will only work on the actual product page when product id id defined.

    Any ideas, I just need a push in the write direction...??

  3. #3
    Join Date
    Oct 2007
    Posts
    25
    Plugin Contributions
    0

    Default Re: Medium Image in Featured sidebox

    Any ideas on the above, just coming to the end of a 4 month build and if I can't resolve this it's time for a re-think / re-design..?

    Cheers
    Lee

  4. #4
    Join Date
    Oct 2007
    Posts
    25
    Plugin Contributions
    0

    Default Re: Medium Image in Featured sidebox

    Had one last try and it was easy!

    This might not be the right way to do it but I rebuilt the image link by using the small image name and stripping out the extension and adding _med etc.

    $image_path = $random_featured_product->fields['products_image'];
    $image_path = substr($image_path, 0 , -4);
    $med_path = "_MED.jpg";

    Using the origanal link

    $content .= '<a href="' . zen_href_link(zen_get_info_page($random_featured_product->fields["products_id"]), 'cPath=' . zen_get_generated_category_path_rev($random_featured_product->fields["master_categories_id"]) . '&products_id=' . $random_featured_product->fields["products_id"]) . '">';

    Adding the medium image

    $content .= '<img src="images/medium/' . $image_path . $med_path . '" alt="' . $random_featured_product->fields["products_name"] . '"' . '"/>';

    Closing the image link

    $content .= '</a>';

    Cheers
    Lee

 

 

Similar Threads

  1. Featured Product Sidebox Image - Only used in sidebox?
    By adg_ in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 18 Mar 2010, 07:38 AM
  2. Featured Sidebox - Changing Image Size
    By Donn in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 13 Jun 2009, 06:53 AM
  3. featured sidebox image next to text.
    By ctcentralinfo in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 18 Aug 2008, 03:57 AM
  4. Image on Featured Products Sidebox Head
    By bbemis in forum Templates, Stylesheets, Page Layout
    Replies: 23
    Last Post: 7 Jan 2008, 12:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg