Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Sep 2007
    Posts
    18
    Plugin Contributions
    0

    Default Re: How to call MED image info on main page? Not an IMG but the path. Help please !

    Alright.
    I'm pretty excited as I managed to get SOME results from knowing nothing.

    I put this inside the WHILE
    PHP Code:
    require(DIR_WS_MODULES zen_get_module_directory(FILENAME_MAIN_PRODUCT_IMAGE)); 
    and put a value into $products_image
    PHP Code:
         $products_image $new_products->fields['products_image']; 
    but when I use that variable in $products_image_medium I get a mismatched image.

    I dont know what to think because in the very next space $new_products->fields['products_name'] is called and its CORRECT but the code right before that gives me a $new_products->fields['products_image'] of the previous product.

    Here is the code line 62 in new_products.php if anybody could point out where to define my $products_image for the medium filename changer

    PHP Code:
        'text' => (($new_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' '<a href="' zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'products_id=' $new_products->fields['products_id']) . '">' zen_image(DIR_WS_IMAGES $new_products->fields['products_image'], $new_products->fields['products_name'], IMAGE_PRODUCT_NEW_WIDTHIMAGE_PRODUCT_NEW_HEIGHT'style="position:relative" onmouseover="showtrail(\'' .  $products_image_medium '\',\'' $new_products->fields['products_name'] . '\',250,130,350,373,this,0,0,250,130);" onmouseout="hidetrail();"') . '</a><br />') . '<a href="' zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'products_id=' $new_products->fields['products_id']) . '">' $new_products->fields['products_name'] . '</a><br />' $products_price); 
    Again I have no programming knowledge so any help is greatly appreciated.

  2. #2
    Join Date
    Sep 2007
    Posts
    18
    Plugin Contributions
    0

    Default Re: How to call MED image info on main page? Not an IMG but the path. Help please !

    Okay fantastic!!! looks like I solved it by defining products_image before the while statement for the first item, and by moving the second definition before the require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_MAIN_PRODUCT_IMAGE))

    I definitely didnt expect to be able to do that.

    Which is plenty good for me now. I guess this means I will put this code in New_products, Featured_products, products_all and everything where my small images are used?

    Please let me know if there is a better way to affect all of these templates. Thanks!

    So the end it looks like this:
    PHP Code:
    if ($num_products_count 0) {
      if (
    $num_products_count SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS || SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS == ) {
        
    $col_width floor(100/$num_products_count);
      } else {
        
    $col_width floor(100/SHOW_PRODUCT_INFO_COLUMNS_NEW_PRODUCTS);
      }
        
    $products_image $new_products->fields['products_image'];
        
      while (!
    $new_products->EOF) {
          
    $products_image $new_products->fields['products_image'];
        require(
    DIR_WS_MODULES zen_get_module_directory(FILENAME_MAIN_PRODUCT_IMAGE));

        
    $products_price zen_get_products_display_price($new_products->fields['products_id']);
        
    $new_products->fields['products_name'] = zen_get_products_name($new_products->fields['products_id']);

        
    $list_box_contents[$row][$col] = array('params' => 'class="centerBoxContentsNew centeredContent back"' ' ' 'style="width:' $col_width '%;"',
        
    'text' => (($new_products->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) ? '' '<a href="' zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'products_id=' $new_products->fields['products_id']) . '">' zen_image(DIR_WS_IMAGES $new_products->fields['products_image'], $new_products->fields['products_name'], IMAGE_PRODUCT_NEW_WIDTHIMAGE_PRODUCT_NEW_HEIGHT'style="position:relative" onmouseover="showtrail(\'' .  $products_image_medium '\',\'' $new_products->fields['products_name'] . '\',250,130,350,373,this,0,0,250,130);" onmouseout="hidetrail();"') . '</a><br />') . '<a href="' zen_href_link(zen_get_info_page($new_products->fields['products_id']), 'products_id=' $new_products->fields['products_id']) . '">' $new_products->fields['products_name'] . '</a><br />' $products_price); 
    Now i need to have these preloaded, however the hell you do that.

 

 

Similar Threads

  1. Replies: 4
    Last Post: 1 Oct 2010, 05:09 AM
  2. How NOT to show categories on main page but still keep the subcategories open?
    By Cindy2010 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 16 Jun 2010, 06:24 AM
  3. Replies: 3
    Last Post: 29 Oct 2009, 05:43 PM
  4. Replies: 0
    Last Post: 15 Jan 2009, 03:48 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