Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2007
    Location
    Dayton, Ohio
    Posts
    672
    Plugin Contributions
    0

    Default How to change image dimensions via PHP

    I have added a cross sell module to my store. The module takes definitions from small image settings in the control panel. But I would like for these images to be smaller than the stores definitions. You can see an example here: http://www.lasilhouettelingerie.com/...ra-p-1173.html

    This is the coding that controls these cross sell images. It is located in includes/modules/MyTemplate/multi_xsell_product.php:
    Code:
    $xsell_query->fields['products_name'] = zen_get_products_name($xsell_query->fields['products_id']);
      $list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsCrossSell centeredContent back"' . ' ' .  'style="width:' . $col_width . '%;"',
    'text' => '<div class="listingProductImage" style="margin-top: 5px; margin-bottom: 5px;"><a href="' . zen_href_link(zen_get_info_page($xsell_query->fields['products_id']), 'products_id=' . (int)$xsell_query->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $xsell_query->fields['products_image'], $xsell_query->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></div>'.
    Obviously this controls the image size for my page:
    Code:
    SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGH
    I would like for this coding to use sizes that are smaller than the definitions I set in the control panel. Can I just put size dimensions right here in the code? I would like something like: 75pxH X 50px wide. If so how would I put these dimensions directly into this PHP page.

  2. #2
    Join Date
    Apr 2007
    Location
    Dayton, Ohio
    Posts
    672
    Plugin Contributions
    0

    Default Re: How to change image dimensions via PHP

    I have an answer. I am sorry for posting prematurely, but I was able to use the small dimensions settings in my store. I did not need this setting for any other area, so it was fine using this setting.

 

 

Similar Threads

  1. How can I make the shipping carrier logo keep its image dimensions?
    By windsurfer in forum Addon Shipping Modules
    Replies: 0
    Last Post: 8 Jan 2012, 10:16 PM
  2. How to POST php file via jQuery?
    By tiffbrink in forum General Questions
    Replies: 0
    Last Post: 29 Mar 2011, 05:37 PM
  3. How to change pop up Dimensions?
    By belaze in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 25 Aug 2010, 01:30 AM
  4. Need Product Dimensions for shipping via Palettes
    By abran1984 in forum Addon Shipping Modules
    Replies: 0
    Last Post: 19 Nov 2008, 12:20 AM
  5. How to get order status via php?
    By breadfan in forum General Questions
    Replies: 6
    Last Post: 14 Sep 2007, 10:20 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR