Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2014
    Posts
    18
    Plugin Contributions
    0

    Default How do I add a text statement if a attribute is selected?

    I have a attribute that requires a file upload.

    I would like the product info page to display a general text statement if the attribute is an option on a product.

    Example:
    I have a attribute Named Your Photo ( required ) on certain products ( Attribute ID 1 )

    What I want:
    if the attribute is present on the product info page, then the page should display some text.

    ie... When Uploading a image, when you select your image from your computer, your upload will begin when you <b>"Add To Cart"</b>. Please do <b>not</b> refresh your page. Depending on the size of the file, it could take a few minutes to complete the upload. When your upload is finished the site will automatically take you to the next page.

    I am thinking I could add this statement to the language file "product_info.php" using something like "TEXT_PRODUCT_UPLOAD"
    I am wondering what I need to add or change in the "tpl_product_info_display.php"

    Any Help would be greatly appreciated

  2. #2
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: How do I add a text statement if a attribute is selected?

    You need to put an if - else statement on the tpl_product_info_display.php

    Something like this...

    if ($your_photo_attribute == 'Your Photo') {
    // print the page
    // insert the text you want to see here
    } else {
    // do not print the page
    }

    Alternately you may use an existing $variable that looks at the attribute ID
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base8 - Obsidian - This, is what's new.

  3. #3
    Join Date
    Jan 2014
    Posts
    18
    Plugin Contributions
    0

    Default Re: How do I add a text statement if a attribute is selected?

    Please forgive my ignorance,,, I have no clue on how to do this... by no means am I a script writer or understand what you just said...

    where would I add the information on the page?
    if($your_photo_attribute == 'Your Photo'){ - HUH?

    I am sorry - I am lost already.

    so the line needs to be added - I understand that - but what does the line mean?
    $your_photo_attribute --- would that be the attribute ID?
    == 'Your Photo' I am assuming that is the Value Name defined the attribute manger?

    the next question is where do I put it

 

 

Similar Threads

  1. Selected Attribute Requires Text
    By djdavedawson in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 25 Aug 2011, 07:51 PM
  2. Text Attribute Disapears if other attributes are not Selected
    By toussi in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 29 Nov 2010, 11:53 AM
  3. Need User text input based on Attribute selected
    By heinz in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 7 Aug 2007, 09:35 PM
  4. How to Disable Add to Cart if no Attribute is Selected?
    By Stenrique in forum Setting Up Categories, Products, Attributes
    Replies: 27
    Last Post: 29 Jun 2007, 03:46 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