osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

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 ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Customization/Mods

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Reply

 

LinkBack Thread Tools
  #1  
Old 10-09-2006, 12:45 PM
New Member
 
Join Date: Sep 2006
Posts: 21
Thanks: 3
Thanked 12 Times in 5 Posts
Rep Power: 0
brendanl79
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. :)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following 2 Users Say Thank You to brendanl79 For This Useful Post:
poppatopz (03-23-2007), vbrookie (03-23-2007)
  #2  
Old 03-23-2007, 03:32 AM
Lurker
 
Join Date: Feb 2007
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
vbrookie is on a distinguished road
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 07:22 AM. Reason: Restarted and everything's ok!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 04-04-2007, 02:25 AM
Member
 
Join Date: Jan 2007
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
ashelleydesign is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 04-04-2007, 05:22 PM
Member
 
Join Date: Jan 2007
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
ashelleydesign is on a distinguished road
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old 04-17-2007, 10:39 AM
Member
 
Join Date: Mar 2007
Posts: 31
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
Luggruff is on a distinguished road
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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6  
Old 04-18-2007, 02:18 PM
Member
 
Join Date: Jan 2007
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
ashelleydesign is on a distinguished road
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 03:03 PM. Reason: self promotion not allowed
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7  
Old 04-18-2007, 03:04 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,328
Thanks: 68
Thanked 322 Times in 305 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
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 Templates - Hundreds of premium quality templates. New designs every month!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8  
Old 04-27-2007, 02:30 PM
New Member
 
Join Date: Apr 2007
Posts: 29
Thanks: 13
Thanked 1 Time in 1 Post
Rep Power: 0
aaanativearts is on a distinguished road
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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9  
Old 04-27-2007, 04:49 PM
Member
 
Join Date: Mar 2007
Posts: 31
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
Luggruff is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10  
Old 05-24-2007, 09:38 AM
New Member
 
Join Date: May 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
FlakyJake is on a distinguished road
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>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
How to change the image size on product page? groggory osCMax v2 Customization/Mods 1 02-08-2006 07:06 PM
Set Product Page Image Size groggory osCMax v2 Customization/Mods 0 01-22-2006 04:52 PM
Clicking product image to view larger size twinklep osCommerce 2.2 Modification Help 2 09-07-2004 06:35 AM
Need help with a simple product listing hack... Nocturnaloner osCommerce 2.2 Modification Help 2 06-04-2004 09:14 AM
image size Anonymous osCMax v1.7 Discussion 0 04-15-2004 06:15 PM


All times are GMT -8. The time now is 08:26 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax