Hi,
Is there a way to replace the Product Name on the Product Display page with a graphic image (of the name, of course)?
Thank your for your help.
Amy
Hi,
Is there a way to replace the Product Name on the Product Display page with a graphic image (of the name, of course)?
Thank your for your help.
Amy
The Product Name is used in many areas and I suppose that you "only" want this replaced on the product info page - right?? This will take a bit of re-coding so as not to break other items
Zen-Venom Get Bitten
Unfortunately that is correct. I would only like to replace it on the product display page.
Thank you for any help.
Amy
Assuming you're still referring to the product info page, are you trying to implement a flash or a modulated function when outputting the product name graphically ? If so, this could be arranged easily as I have already customized the product info with one of my MOD. It shouldn't be too difficult.I would only like to replace it on the product display page.
In /includes/templates/your_template/templates/tpl_product_info_display.php, find the product name blockand replace it with thisPHP Code:
<!--bof Product Name-->
<h1 id="productName" class="productGeneral"><?php echo $products_name; ?></h1>
<!--eof Product Name-->Name your product-name images like prodname69.gif, and save them in /your_template/images/.PHP Code:
<!--bof Product Name-->
<h1 id="productName" class="productGeneral"><?php echo (zen_image(DIR_WS_TEMPLATE_IMAGES . 'prodimg' . $_GET['products_id'] . '.gif') ? zen_image(DIR_WS_TEMPLATE_IMAGES . 'prodname' . $_GET['products_id'] . '.gif') : $products_name); ?></h1>
<!--eof Product Name-->
This checks to see if there is a file for the product id and, if so, displays it; if not, displays the product name as usual.
I used the product id instead of the name for building the filename because the product name could have spaces or other characters that would be bad for a filename.
Last edited by gjh42; 29 Jun 2007 at 02:57 PM.
Ok, belay that, not tested fully enough... it gives a false positive when the filename doesn't exist and displays nothing. I could just use the product name as the alt, but then IE would insist on screaming "here's a broken image, and its name is xxx"...
Thank you for responding to my question
After I posted the question I did realize that it was a bigger deal than I realized because, of course, each product has it's own name. It's not a simple as dropping the same graphic on each page.
I was very excited about code posted - thank you. Too bad it doesn't work. Look like you had it figured out.
As for what I'm trying to do - I wish it was something very interesting and exciting but it's not. My customer likes a kind of scripty font and it's always safer to make those kinds of things into graphics so they don't get messed up on the different browsers. Plus I make the name a little bigger in a nice color with an interesting font. Not a big deal but it does add a little softness to the site.
Thank you all for your help. If you end up getting the code worked out I'd love to see it.
Amy
Here it is. Just had to find the right function to verify a valid file.PHP Code:
<!--bof Product Name gjh42 2007-06-29-->
<h1 id="productName" class="productGeneral"><?php echo (zen_not_null(zen_image(DIR_WS_TEMPLATE_IMAGES . 'prodimg' . $_GET['products_id'] . '.gif')) ? zen_image(DIR_WS_TEMPLATE_IMAGES . 'prodimg' . $_GET['products_id'] . '.gif') : $products_name); ?></h1>
<!--eof Product Name-->
Glenn you are awesome! Thank you for that code I really appreciate it.
Amy
Bookmarks