Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2012
    Posts
    32
    Plugin Contributions
    1

    Default Help with a php statement

    Hello,

    Can someone help me with a php statement to use in tpl_product_info_display.php, something like
    if a product belongs to a categorie do this else do something different

    Thanks

  2. #2
    Join Date
    Apr 2010
    Posts
    319
    Plugin Contributions
    0

    Default Re: Help with a php statement

    you could try

    PHP Code:
    $current_category_id zen_get_products_category_id((int)$_GET['products_id']);
    if (
    $current_category_id == '478'
        {
        echo 
    'category match';
        } else {
        echo 
    'category not matched';
        } 
    changing 478 to the category you require

    bn

  3. #3
    Join Date
    Jun 2012
    Posts
    32
    Plugin Contributions
    1

    Default Re: Help with a php statement

    Works perfect. Thanks

 

 

Similar Threads

  1. Need Help With If Statement For Displaying Images
    By games4gamers in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 7 Apr 2010, 07:29 PM
  2. PHP: Help Using If Statement To Check Category?
    By joomoo79 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 12 Jan 2010, 08:22 AM
  3. adding php statement ! please help
    By gentmat in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 11 Apr 2009, 06:36 PM
  4. Php Conditional Statement
    By zforrest in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 16 Jun 2006, 01:07 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