Forums / Templates, Stylesheets, Page Layout / Incorporating PHP into another set of codes

Incorporating PHP into another set of codes

Locked

Views: 991

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
15 Jul 2006, 7:30 AM
#1
turtledove avatar

turtledove

Zen Follower

Join Date:
May 2006
Posts:
182
Plugin Contributions:
0

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:

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

<!--bof Product details list  -->


<?php if ( (($flag_show_product_info_model == 1 and $products_model !=”) or ($flag_show_product_info_weight == 1 and $products_weight !=0) or ($flag_show_product_info_quantity == 1) or ($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name))) ) { ?>
<ul id="productDetailsList" class="floatingBox back">
  <?php echo (($flag_show_product_info_model == 1 and $products_model !='') ? '<li>' . TEXT_PRODUCT_MODEL . $products_model . '</li>' : '') . "\n"; ?>
  <?php echo (($flag_show_product_info_weight == 1 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 == 1 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.

17 Jul 2006, 1:55 AM
#2
turtledove avatar

turtledove

Zen Follower

Join Date:
May 2006
Posts:
182
Plugin Contributions:
0

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.

17 Jul 2006, 8:06 AM
#3
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

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

17 Jul 2006, 9:49 PM
#4
turtledove avatar

turtledove

Zen Follower

Join Date:
May 2006
Posts:
182
Plugin Contributions:
0

Re: Incorporating PHP into another set of codes

Thanks for the response Kobra :D

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!

:D