Results 1 to 4 of 4
  1. #1
    Join Date
    May 2006
    Posts
    188
    Plugin Contributions
    0

    Default Incorporating PHP into another set of codes

    I'm trying to add my 'Additional product images' and my 'Product Descriptions' inside a box that contains the 'Add a Cart' button and 'Attributes' in the product information page.

    How do I incorporate:

    PHP Code:
    <!--bof Product description -->
    <?php if ($products_description != '') { ?>
    <div id="productDescription" class="productGeneral biggerText"><?php echo stripslashes($products_description); ?></div>
    <?php ?>
    <!--eof Product description -->

    <br class="clearBoth" />




    <!--bof Additional Product Images -->
    <?php
    /**
     * display the products additional images
     */
      
    require($template->get_template_dir('/tpl_modules_additional_images.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_modules_additional_images.php'); ?>
    <!--eof Additional Product Images -->

    into


    PHP Code:
    <!--bof Product details list  -->


    <?php if ( (($flag_show_product_info_model == and $products_model !=) or ($flag_show_product_info_weight == and $products_weight !=0) or ($flag_show_product_info_quantity == 1) or ($flag_show_product_info_manufacturer == and !empty($manufacturers_name))) ) { ?>
    <ul id="productDetailsList" class="floatingBox back">
      <?php echo (($flag_show_product_info_model == and $products_model !='') ? '<li>' TEXT_PRODUCT_MODEL $products_model '</li>' '') . "\n"?>
      <?php echo (($flag_show_product_info_weight == and $products_weight !=0) ? '<li>' TEXT_PRODUCT_WEIGHT .  $products_weight TEXT_PRODUCT_WEIGHT_UNIT '</li>'  '') . "\n"?>
      <?php echo (($flag_show_product_info_quantity == 1) ? '<li>' $products_quantity TEXT_PRODUCT_QUANTITY '</li>'  '') . "\n"?>
      <?php echo (($flag_show_product_info_manufacturer == and !empty($manufacturers_name)) ? '<li>' TEXT_PRODUCT_MANUFACTURER $manufacturers_name '</li>' '') . "\n"?>
    </ul>
    <br class="clearBoth" />
    <?php
      
    }
    ?>
    <!--eof Product details list -->
    Ive tried only using the 'echos' into the Product Details Code, but it doesn't work. Any ideas?

    Thanks.

  2. #2
    Join Date
    May 2006
    Posts
    188
    Plugin Contributions
    0

    Default Re: Incorporating PHP into another set of codes

    Does anyone have any ideas?

    I want to incorporate the "Product Description" and "Additional Images" into the second set of PHP code, so that the end result would be a box that contains the product's description, additional images, attributes, and add to cart button.

    I tried using only the "php echo" parts of the code, but it wouldnt work. And, when I put :

    <!--bof Product description -->
    <?php if ($products_description != '') { ?>
    <div id="productDescription" class="productGeneral biggerText"><?php echo stripslashes($products_description); ?></div>
    <?php } ?>
    <!--eof Product description -->

    in between the codes in the second set of PHP codes, the description wouldnt show inside the box, but on top of the box.

    Any info would be great.

    Thanks.

  3. #3
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Incorporating PHP into another set of codes

    It is not that your question has not been viewed as you can also view the # of views for this.

    I am not a coder, so I can not assist where you have ventured into the code & functions.

    Others that have viewed I would guess have the same problem of not having an answer for you.

    I can state that this is most probably something that can be done by someone that understands the Zen Code well.

    If you are desiring additional images be presented with your product this is part of Zen Cart and does not require hacking the code. Just create additional images with a # suffix like this:

    Main image: your_pic.jpg

    additioal images: your_pic_1.jpg. your_pic_2.jpg

    Load them to the images folder and Zen will display them magically.

    The additional add to cart buttons will take some code alteration.
    Zen-Venom Get Bitten

  4. #4
    Join Date
    May 2006
    Posts
    188
    Plugin Contributions
    0

    Default Re: Incorporating PHP into another set of codes

    Thanks for the response Kobra

    The additional images of a product and the add to cart button is already being shown on my website; I was just hoping something knew how to alter the codes so that the additional images and product description will be shown inside a box that contains the add to cart button and attributes.

    This is what I am ultimately going for:



    I already have that box with the attributs and add to cart button, but don't know how to add the product's description and additional images inside it the box.

    If anyone can help me out, i'd appreciate it.

    Thanks!


 

 

Similar Threads

  1. Incorporating a Board/Forum into a ZC Website?
    By mishutkadesign in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 22 Feb 2010, 08:19 PM
  2. Incorporating Zen Cart Product pages into existing website?
    By Mountain Mermaid in forum General Questions
    Replies: 1
    Last Post: 20 Jul 2008, 10:18 PM
  3. Incorporating ZC into an existing website - and ... can UPS do this?
    By mstank in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 19 Jul 2007, 01:21 AM
  4. Incorporating into an exisiting site
    By abasel in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 27 Jun 2007, 10:52 AM

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