Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Image size hack for product pages

This is a discussion on Image size hack for product pages within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; I was dissatisfied with the "Configuration --> Images" options. For some reason you are stuck with the "small" image size ...

      
  1. #1
    New Member
    Join Date
    Sep 2006
    Posts
    28
    Rep Power
    0


    Default Image size hack for product pages

    I was dissatisfied with the "Configuration --> Images" options. For some reason you are stuck with the "small" image size for pretty much every instance of your product image on the site. I wanted the ability to specify a separate image size for product information pages, so I set it up in the following way:

    1) inserted two rows into the configuration table with new keys PRODUCT_PAGE_IMAGE_WIDTH and PRODUCT_PAGE_IMAGE_HEIGHT, configuration group 4, and altered the sort order values to place them directly below SMALL_IMAGE_*.

    2) global substitution of "PRODUCT_PAGE_IMAGE_" for "SMALL_IMAGE_" in product_info.tpl.php and product_listing.php

    If this work is redundant with another project and/or has some pitfalls I didn't think of, forgiveness and enlightenment would be appreciated. :)

  2. #2
    Lurker
    Join Date
    Feb 2007
    Posts
    2
    Rep Power
    0


    Default Re: Image size hack for product pages

    Quote Originally Posted by brendanl79 View Post
    I was dissatisfied with the "Configuration --> Images" options. For some reason you are stuck with the "small" image size for pretty much every instance of your product image on the site. I wanted the ability to specify a separate image size for product information pages, so I set it up in the following way:

    1) inserted two rows into the configuration table with new keys PRODUCT_PAGE_IMAGE_WIDTH and PRODUCT_PAGE_IMAGE_HEIGHT, configuration group 4, and altered the sort order values to place them directly below SMALL_IMAGE_*.

    2) global substitution of "PRODUCT_PAGE_IMAGE_" for "SMALL_IMAGE_" in product_info.tpl.php and product_listing.php

    If this work is redundant with another project and/or has some pitfalls I didn't think of, forgiveness and enlightenment would be appreciated.
    This is the solution that I was looking for, but not working for me. I can't see the product page image input fields in configure -> image menu, and the size value doesn't get applied to product info page, original picture shows up on product info page now.

    Does anybody have other suggestion beside this please let me know.

    Thanks!.

    ---- Edit -----
    My system had a hic-ups, restarting somehow fixed the issue...
    Thanks for this hack. It helped me a lot on fixing things the way I wanted!!!
    Last edited by vbrookie; 03-26-2007 at 08:22 AM. Reason: Restarted and everything's ok!

  3. #3
    Member
    Join Date
    Jan 2007
    Posts
    34
    Rep Power
    0


    Default Re: Image size hack for product pages

    WHO WHEN WHAT WHERE HOW!
    Is this in the sql file. A file in admin or otherwise...I need assistnace.

  4. #4
    Member
    Join Date
    Jan 2007
    Posts
    34
    Rep Power
    0


    Default Re: Image size hack for product pages

    Pardon me while I talk to myself....

    I figured it out. Using PHPADMIN I located the configuration table and "browsed" it. I found SMALL_IMAGE_WIDTH & SMALL_IMAGE_HEIGHT.
    I edited each with PRODUCT_IMAGE_* and SAVED AS a new row and set the sort to the SORT # following the SMALL_IMAGE_HEIGHT.

    Just trying to help those who may be a BOOB NOOB like me.
    Thanks, Angie

  5. #5
    Member
    Join Date
    Mar 2007
    Posts
    31
    Rep Power
    0


    Default Re: Image size hack for product pages

    and for us that don't have phpMyadmin access??

    I want to re-size the image in my shoppingcart, and only there..

    PHP Code:
                           '    <td class="productListing-data" align="center"><a href="' tep_href_link(FILENAME_PRODUCT_INFO'products_id=' $products[$i]['id']) . '">' tep_image(DIR_WS_IMAGES $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTHSMALL_IMAGE_HEIGHT) . '</a></td>' 
    isn't there a way to just change "SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT" to numbers??

    And if not, can someone explain more step-by-step how to add a Shoppingcart_Image_width to the config, If you only have ftp access?

    Thanks!

  6. #6
    Member
    Join Date
    Jan 2007
    Posts
    34
    Rep Power
    0


    Default Re: Image size hack for product pages

    I don't think it is possible. Sorry about that. You should move your site to a hosting service that provides phpadmin access.
    Last edited by michael_s; 04-18-2007 at 04:03 PM. Reason: self promotion not allowed

  7. #7
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,501
    Rep Power
    567


    Default Re: Image size hack for product pages

    Give it a try.. just change the constants to numbers (you may need to put them in single quotes.
    Michael Sasek
    osCMax Developer


    osCmax installation service - Have our professionals install osCmax on your server - same day service!
    osCmax 2.0 User Manual - the must have beginners guide to osCmax v2.0

    Stay Up To Date with everything osCMax:
    Free osCMax Newsletters - Security notices, New Releases, osCMax News
    osCMax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  8. #8
    Member
    Join Date
    Apr 2007
    Posts
    40
    Rep Power
    0


    Default Re: Image size hack for product pages

    If you have ftp access, you can install PHPmyAdmin yourself. It's free open source. At least I was able to do it on a host I used to have that didn't have it, and it was fairly easy.

    But like the other guy said, there are so many hosts that provide it these days with your hosting, why bother with a host that doesn't?

  9. #9
    Member
    Join Date
    Mar 2007
    Posts
    31
    Rep Power
    0


    Default Re: Image size hack for product pages

    Quote Originally Posted by aaanativearts View Post
    If you have ftp access, you can install PHPmyAdmin yourself. It's free open source. At least I was able to do it on a host I used to have that didn't have it, and it was fairly easy.

    But like the other guy said, there are so many hosts that provide it these days with your hosting, why bother with a host that doesn't?
    it was a retorical question.. to get another solution.

  10. #10
    New Member
    Join Date
    May 2007
    Posts
    7
    Rep Power
    0


    Default Re: Image size hack for product pages

    I did this and it works fine..

    (SMALL_IMAGE_HEIGHT * '1.5')


    Code:
    <script language="javascript" type="text/javascript"><!--
                document.write('<a href="javascript:popupImage(\'<?php echo tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id'] . '&type=' . $lg_image_ext); ?>\',\'<?php echo ((int)$image_size[1] + 30); ?>\',\'<?php echo ((int)$image_size[0] + 5); ?>\');"><?php echo tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), (SMALL_IMAGE_WIDTH * '1.5'), (SMALL_IMAGE_HEIGHT * '1.5')); ?><br /><span class="smallText"><?php echo TEXT_CLICK_TO_ENLARGE; ?></span></a>');
    //--></script>
    <noscript>
                <a rel="nofollow" href="<?php echo tep_href_link($image_lg . '.' . $lg_image_ext); ?>" target="_blank"><?php echo tep_image(DIR_WS_IMAGES . $product_info['products_image'], stripslashes($product_info['products_name']), (SMALL_IMAGE_WIDTH * '1.5'), (SMALL_IMAGE_HEIGHT * '1.5')); ?><br /><span class="smallText"><?php echo TEXT_CLICK_TO_ENLARGE; ?></span></a>

Page 1 of 2 12 LastLast

Similar Threads

  1. How to change the image size on product page?
    By groggory in forum osCmax v2 Customization/Mods
    Replies: 1
    Last Post: 02-08-2006, 07:06 PM
  2. Set Product Page Image Size
    By groggory in forum osCmax v2 Customization/Mods
    Replies: 0
    Last Post: 01-22-2006, 04:52 PM
  3. Clicking product image to view larger size
    By twinklep in forum osCommerce 2.2 Modification Help
    Replies: 2
    Last Post: 09-07-2004, 07:35 AM
  4. Need help with a simple product listing hack...
    By Nocturnaloner in forum osCommerce 2.2 Modification Help
    Replies: 2
    Last Post: 06-04-2004, 10:14 AM
  5. image size
    By Anonymous in forum osCmax v1.7 Discussion
    Replies: 0
    Last Post: 04-15-2004, 07:15 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
  •