edwardtilbury Posted April 9, 2009 Share Posted April 9, 2009 I'm trying to customize the google base xml exporter for zen cart to automatically reduce my Product Name / Title to 70 characters or less.. I was able to accomplish this with my test variable $test_name , see the example code below of what I was able to do: //BOF Edward Custom formatting of product name and title $badstuff = array('>', '(', ')', 'discount', 'sale', '/'); $test_name = str_ireplace('doctor', 'DR', $test_name); $test_name = str_ireplace('bill gates', 'Bill', $test_name); $test_name = str_ireplace($badstuff, "", $test_name); trim ($test_name); substr($test_name, 0, 70); //EOF Edward Custom Now my only problem is inserting the code into the google base xml exporter... I do not understand where the actual product name / title varible is. Here's where I think it exists, but I'm not 100% sure.. $content["title"] = '<title>' . $google_base->google_base_xml_sanitizer($products->fields['products_name'], true) . '</title>'; How would I edit the title with my script? In other words, how could I combine the 2? Link to comment https://forums.phpfreaks.com/topic/153355-where-is-the-product-name-located-in-this-code-snippet-please-see-example/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.