p51mustang Posted November 12, 2012 Posted November 12, 2012 I used a free template which I modified to create my shop (www.saairforce.co.za/shop) However, the product title field on the home page and category pages is too short, cutting off the full product name. Please see the image attached. Where do I increase the field length for the product name? Thanks!
Bob Terveuren Posted November 12, 2012 Posted November 12, 2012 Hi there You have a bit of code in one of the PHP includes that is chopping the name down to 19 characters (probably so that it will always fit in the title bar?) In a standard shop you'd be looking at a file catalog/includes/modules/product_listing.php - that may differ in the template though. Have a look though and see if you can see something that looks like substr($listing['products_name'],0,19) and try changing 19 to a bigger figure - screenshot attached suggests lots & lots? Bob
p51mustang Posted November 13, 2012 Author Posted November 13, 2012 Thanks Bob, appreciated. The relevant code in product_listing.php is as follows: 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']) . '">' . substr( $listing['products_name'],0,MAX_DESCR_NAME) . '</a>'; } else { $p_name = $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . substr($listing['products_name'],0,MAX_DESCR_NAME). '</a>'; } Changing the '0' to something else does horrible things!
p51mustang Posted November 21, 2012 Author Posted November 21, 2012 Forgot to update this thread: Sorted! Changed the "MAX_DESCR_NAME" to 47 which seems a good fit. The file to alter the field length for the catelog was, as Bob mentioned, product_listing.php The file to alter the field length for New Products on the home page was new_products.php Thanks Bob!
deiana38 Posted December 14, 2012 Posted December 14, 2012 hi, i am having this same problem and can not figure out how to do this i followed cat/includ/mod/pro_list does not look like the one described?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.