Phyxi0n Posted August 26, 2008 Posted August 26, 2008 Before I start, I do not try to let myself be spoon fed, so I appreciate and thank anyone who may have an idea of how to fix this problem. I understand that by purchasing an OSC template, its not as easy to modify or find certain files to fix things, but I was still hoping maybe this was something setup one time in OSC, or in a style sheet or something that can be fixed. Here is a link to a picture of the issue: Sorry if the image is huge. What I don't understand, is the title/intro content and everything starts left-aligned, like I want it, but all the images are automatically set to middle-alignment or centered alignment, therefore, if there isn't at least three products on the page, it makes it look all funky and un-professional. Can anyone please give me input on if they may know where to locate this problem and fix it? Thank you. Cody
ktshannon Posted August 26, 2008 Posted August 26, 2008 Make sure the row for the table holding the image is left aligned.
Phyxi0n Posted August 26, 2008 Author Posted August 26, 2008 Make sure the row for the table holding the image is left aligned. It isn't just this product. It does this automatically anywhere in my store if there aren't three items in a row per page. Where can I look either file wise, or in OSC settings to fix this row in the display of my products? Thank you for the suggestion.
♥FWR Media Posted August 26, 2008 Posted August 26, 2008 try . . <?php echo tep_image(DIR_WS_IMAGES . 'MyImageName.jpg', 'AltText', 'imageHeight', 'imageWidth', 'style="float: left;"'); ?> Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work.
Phyxi0n Posted August 26, 2008 Author Posted August 26, 2008 try . . <?php echo tep_image(DIR_WS_IMAGES . 'MyImageName.jpg', 'AltText', 'imageHeight', 'imageWidth', 'style="float: left;"'); ?> Hey thanks. I'm not trying to sound like a complete idiot, but what PHP file do I find to make that change? Thanks FWR Media.
♥FWR Media Posted August 26, 2008 Posted August 26, 2008 Well it's a template so I'm not able to give proper support .. but the file may well be includes/modules/product_listing.php (you may have the _col version I don't know). If it is that file try .. find .. case 'PRODUCT_LIST_IMAGE': $lc_align = 'center'; Change to .. case 'PRODUCT_LIST_IMAGE': $lc_align = 'left'; Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work.
♥FWR Media Posted August 26, 2008 Posted August 26, 2008 Well it's a template so I'm not able to give proper support .. but the file may well be includes/modules/product_listing.php (you may have the _col version I don't know). If it is that file try .. find .. case 'PRODUCT_LIST_IMAGE': $lc_align = 'center'; Change to .. case 'PRODUCT_LIST_IMAGE': $lc_align = 'left'; Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work.
Phyxi0n Posted August 27, 2008 Author Posted August 27, 2008 Well it's a template so I'm not able to give proper support .. but the file may well be includes/modules/product_listing.php (you may have the _col version I don't know). If it is that file try .. find .. case 'PRODUCT_LIST_IMAGE': $lc_align = 'center'; Change to .. case 'PRODUCT_LIST_IMAGE': $lc_align = 'left'; I have seen in my code this "col_" stuff you're talking about in different files. When I was modifying the index.php file and stylesheet and other files I noticed some things like that. I have attached my product_listing.php file. Can anyone chime in? Thanks FWR for the help so far. I found that chunk of code, and changed it from center to left like you said, but it did Not fix the alignment issue. <?php /* $Id: product_listing.php,v 1.44 2003/06/09 22:49:59 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ ?> <?php echo tep_draw_title_top();?> <?php echo $breadcrumb->trail(' » ')?> <?php echo tep_draw_title_bottom();?> <?php tep_draw_heading_top_3();?> <?php $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id'); if ( ($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '2') ) ) { ?> <?php echo tep_draw_result_top_1(); ?> <table border="0" width="100%" cellspacing="0" cellpadding="0" class="result"> <tr> <td align="left"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td> <td class="result_right" align="left"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table> <?php echo tep_draw_result_bottom_1(); ?> <?php echo tep_draw_result_top(); ?> <?php } $info_box_contents = array(); $list_box_contents = array(); $my_row = 0; $my_col = 0; for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_text = TABLE_HEADING_MODEL; $lc_align = ''; break; case 'PRODUCT_LIST_NAME': $lc_text = TABLE_HEADING_PRODUCTS; $lc_align = ''; break; case 'PRODUCT_LIST_MANUFACTURER': $lc_text = TABLE_HEADING_MANUFACTURER; $lc_align = ''; break; case 'PRODUCT_LIST_PRICE': $lc_text = TABLE_HEADING_PRICE; $lc_align = 'right'; break; case 'PRODUCT_LIST_QUANTITY': $lc_text = TABLE_HEADING_QUANTITY; $lc_align = 'right'; break; case 'PRODUCT_LIST_WEIGHT': $lc_text = TABLE_HEADING_WEIGHT; $lc_align = 'right'; break; case 'PRODUCT_LIST_IMAGE': $lc_text = TABLE_HEADING_IMAGE; $lc_align = 'center'; break; case 'PRODUCT_LIST_BUY_NOW': $lc_text = TABLE_HEADING_BUY_NOW; $lc_align = 'center'; break; } if ( ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW') && ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) { $lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text); } $list_box_contents[0][] = array('align' => $lc_align, 'params' => 'class="productListing-heading"', 'text' => ' ' . $lc_text . ' '); } if ($listing_split->number_of_rows > 0) { $rows = 0; $listing_query = tep_db_query($listing_split->sql_query); while ($listing = tep_db_fetch_array($listing_query)) { $rows++; if (($rows/2) == floor($rows/2)) { $list_box_contents[] = array('params' => 'class="productListing-even"'); } else { $list_box_contents[] = array('params' => 'class="productListing-odd"'); } $cur_row = sizeof($list_box_contents) - 1; for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { $lc_align = ''; switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_align = ''; $lc_text = ' ' . $listing['products_model'] . ' '; break; case 'PRODUCT_LIST_NAME': $lc_align = ''; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $p_name = $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a>'; } else { $p_name = $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a>'; } break; case 'PRODUCT_LIST_MANUFACTURER': $lc_align = ''; $lc_text = ' <a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a> '; break; case 'PRODUCT_LIST_PRICE': $lc_align = 'right'; if (tep_not_null($listing['specials_new_products_price'])) { $p_price = $lc_text = '<s>' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span>'; } else { $p_price = $lc_text = '<span class="productSpecialPrice">' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span>'; } break; case 'PRODUCT_LIST_QUANTITY': $lc_align = 'right'; $lc_text = ' ' . $listing['products_quantity'] . ' '; break; case 'PRODUCT_LIST_WEIGHT': $lc_align = 'right'; $lc_text = ' ' . $listing['products_weight'] . ' '; break; case 'PRODUCT_LIST_IMAGE': $lc_align = 'left'; if (isset($HTTP_GET_VARS['manufacturers_id'])) { $p_pic = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; } else { $p_pic = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; } break; case 'PRODUCT_LIST_BUY_NOW': $lc_align = 'center'; $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; break; } $product_query = tep_db_query("select products_description, products_id from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$listing['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); $product = tep_db_fetch_array($product_query); $p_desc = substr(strip_tags($product['products_description']), 0, MAX_DESCR_1); $p_id = $product['products_id']; /* $list_box_contents[$cur_row][] = array('align' => $lc_align, 'params' => '', 'text' => $lc_text); */ } $info_box_contents[$my_row][$my_col] = array('align' => 'center', 'params' => ' style="width:33%;"', 'text' => ' <table cellpadding="0" cellspacing="0" border="0" class="cont_body_table"> <tr> <td> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td style="height:167px " class="vam" align="center">'.tep_draw_prod_pic_top().''.$p_pic.''.tep_draw_prod_pic_bottom().'</td> </tr> </table> <table cellpadding="0" cellspacing="0" border="0" style="border:1px solid #FFFFFF; border-width:7px 12px 11px 14px"> <tr> <td style="height:29px " class="vam"><span>'.$p_name.'</span></td> </tr> <tr> <td style="height:47px " class="vam">'.$p_desc.'</td> </tr> <tr> <td style="height:28px " class="vam">'.$p_price.'</td> </tr> <tr> <td style="height:47px " class="vam"><a href="' . tep_href_link('product_info.php?products_id='.$p_id) . '">'.tep_image_button("button_details.gif").'</a><br />'.tep_draw_separator('spacer.gif', '1', '5').'<br /><a href="'.tep_href_link("products_new.php","action=buy_now&products_id=".$p_id).'">'.tep_image_button('button_add_to_cart1.gif').'</a></td> </tr> </table> </td> </tr> </table>'); $my_col ++; if ($my_col > 2) { $my_col = 0; $my_row ++; } } new contentBox($info_box_contents); // new productListingBox($list_box_contents); } else { ?> <br style="line-height:11px;"> <?php /* echo tep_draw_infoBox_top(); */ ?> <table cellpadding="0" cellspacing="0" class="product"> <tr><td class="padd_22"><?php echo TEXT_NO_PRODUCTS ?></td></tr> </table> <br style="line-height:1px;"><br style="line-height:10px;"> <?php /* echo tep_draw_infoBox_bottom(); */ } if ( ($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) { ?> <?php echo tep_draw_result_bottom(); ?> <?php echo tep_draw_result_top_2(); ?> <table border="0" width="100%" cellspacing="0" cellpadding="0" class="result"> <tr> <td align="left"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td> <td class="result_right" align="left"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table> <?php echo tep_draw_result_bottom_2(); ?> <?php } ?>
Phyxi0n Posted August 27, 2008 Author Posted August 27, 2008 Bump - hoping someone could chime in and help.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.