Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2007
    Posts
    21
    Plugin Contributions
    0

    Default Change Product Name to Graphic

    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

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Change Product Name to Graphic

    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

  3. #3
    Join Date
    Jun 2007
    Posts
    21
    Plugin Contributions
    0

    Default Re: Change Product Name to Graphic

    Unfortunately that is correct. I would only like to replace it on the product display page.

    Thank you for any help.

    Amy

  4. #4
    Join Date
    Aug 2004
    Posts
    1,590
    Plugin Contributions
    1

    Default Re: Change Product Name to Graphic

    I would only like to replace it on the product display page.
    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.

  5. #5
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Change Product Name to Graphic

    In /includes/templates/your_template/templates/tpl_product_info_display.php, find the product name block
    PHP Code:
    <!--bof Product Name-->
    <h1 id="productName" class="productGeneral"><?php echo $products_name?></h1>
    <!--eof Product Name-->
    and replace it with this
    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-->
    Name your product-name images like prodname69.gif, and save them in /your_template/images/.

    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.

  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Change Product Name to Graphic

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

  7. #7
    Join Date
    Jun 2007
    Posts
    21
    Plugin Contributions
    0

    Default Re: Change Product Name to Graphic

    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

  8. #8
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Change Product Name to Graphic

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

  9. #9
    Join Date
    Jun 2007
    Posts
    21
    Plugin Contributions
    0

    Default Re: Change Product Name to Graphic

    Glenn you are awesome! Thank you for that code I really appreciate it.

    Amy

 

 

Similar Threads

  1. How would I change Product URL in Product Type Info Page to a different name
    By wtashby in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 21 Nov 2008, 11:11 PM
  2. change metta graphic?
    By lizar5- in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 20 Sep 2007, 04:06 AM
  3. Change Name of Product Pages?
    By hypwoman in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 16 Aug 2007, 05:58 PM
  4. Change Product Name without creating a new product
    By jmcneil in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 19 May 2006, 12:45 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR