PageRenderTime 60ms CodeModel.GetById 32ms RepoModel.GetById 0ms app.codeStats 0ms

/includes/templates/template_default/templates/tpl_product_free_shipping_info_display.php

https://github.com/ZenMagick/zc-base
PHP | 238 lines | 178 code | 22 blank | 38 comment | 59 complexity | d9d13f141f7f70ac48ea16454df5205c MD5 | raw file
  1. <?php
  2. /**
  3. * Page Template
  4. *
  5. * Loaded automatically by index.php?main_page=product_free_shipping_info.<br />
  6. * Displays details of a "free-shipping" product (provided it is assigned to the product-free-shipping product type)
  7. *
  8. * @package templateSystem
  9. * @copyright Copyright 2003-2006 Zen Cart Development Team
  10. * @copyright Portions Copyright 2003 osCommerce
  11. * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
  12. * @version $Id: tpl_product_free_shipping_info_display.php 16242 2010-05-08 16:05:40Z ajeh $
  13. */
  14. ?>
  15. <div class="centerColumn" id="productFreeShipdisplay">
  16. <!--bof Form start-->
  17. <?php echo zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($_GET['products_id']), zen_get_all_get_params(array('action')) . 'action=add_product', $request_type), 'post', 'enctype="multipart/form-data"') . "\n"; ?>
  18. <!--eof Form start-->
  19. <?php if ($messageStack->size('product_info') > 0) echo $messageStack->output('product_info'); ?>
  20. <!--bof Category Icon -->
  21. <?php if ($module_show_categories != 0) {?>
  22. <?php
  23. /**
  24. * display the category icons
  25. */
  26. require($template->get_template_dir('/tpl_modules_category_icon_display.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_category_icon_display.php'); ?>
  27. <?php } ?>
  28. <!--eof Category Icon -->
  29. <!--bof Prev/Next top position -->
  30. <?php if (PRODUCT_INFO_PREVIOUS_NEXT == 1 or PRODUCT_INFO_PREVIOUS_NEXT == 3) { ?>
  31. <?php
  32. /**
  33. * display the product previous/next helper
  34. */
  35. require($template->get_template_dir('/tpl_products_next_previous.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_products_next_previous.php'); ?>
  36. <?php } ?>
  37. <!--eof Prev/Next top position-->
  38. <!--bof Main Product Image -->
  39. <?php
  40. if (zen_not_null($products_image)) {
  41. ?>
  42. <?php
  43. /**
  44. * display the main product image
  45. */
  46. require($template->get_template_dir('/tpl_modules_main_product_image.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_main_product_image.php'); ?>
  47. <?php
  48. }
  49. ?>
  50. <!--eof Main Product Image-->
  51. <!--bof Product Name-->
  52. <h1 id="productName" class="freeShip"><?php echo $products_name; ?></h1>
  53. <!--eof Product Name-->
  54. <!--bof Product Price block -->
  55. <h2 id="productPrices" class="freeShip">
  56. <?php
  57. // base price
  58. if ($show_onetime_charges_description == 'true') {
  59. $one_time = '<span >' . TEXT_ONETIME_CHARGE_SYMBOL . TEXT_ONETIME_CHARGE_DESCRIPTION . '</span><br />';
  60. } else {
  61. $one_time = '';
  62. }
  63. echo $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE : '') . zen_get_products_display_price((int)$_GET['products_id']);
  64. ?></h2>
  65. <!--eof Product Price block -->
  66. <!--bof free ship icon -->
  67. <?php if(zen_get_product_is_always_free_shipping($products_id_current) && $flag_show_product_info_free_shipping) { ?>
  68. <div id="freeShippingIcon"><?php echo TEXT_PRODUCT_FREE_SHIPPING_ICON; ?></div>
  69. <?php } ?>
  70. <!--eof free ship icon -->
  71. <!--bof Product description -->
  72. <?php if ($products_description != '') { ?>
  73. <div id="productDescription" class="freeShip biggerText"><?php echo stripslashes($products_description); ?></div>
  74. <?php } ?>
  75. <!--eof Product description -->
  76. <br class="clearBoth" />
  77. <!--bof Add to Cart Box -->
  78. <?php
  79. if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') {
  80. // do nothing
  81. } else {
  82. ?>
  83. <?php
  84. $display_qty = (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($_GET['products_id'])) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($_GET['products_id']) . '</p>' : '');
  85. if ($products_qty_box_status == 0 or $products_quantity_order_max== 1) {
  86. // hide the quantity box and default to 1
  87. $the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
  88. } else {
  89. // show the quantity box
  90. $the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '<br />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
  91. }
  92. $display_button = zen_get_buy_now_button($_GET['products_id'], $the_button);
  93. ?>
  94. <?php if ($display_qty != '' or $display_button != '') { ?>
  95. <div id="cartAdd">
  96. <?php
  97. echo $display_qty;
  98. echo $display_button;
  99. ?>
  100. </div>
  101. <?php } // display qty and button ?>
  102. <?php } // CUSTOMERS_APPROVAL == 3 ?>
  103. <!--eof Add to Cart Box-->
  104. <!--bof Product details list -->
  105. <?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))) ) { ?>
  106. <ul id="productDetailsList" class="floatingBox back">
  107. <?php echo (($flag_show_product_info_model == 1 and $products_model !='') ? '<li>' . TEXT_PRODUCT_MODEL . $products_model . '</li>' : '') . "\n"; ?>
  108. <?php echo (($flag_show_product_info_weight == 1 and $products_weight !=0) ? '<li>' . TEXT_PRODUCT_WEIGHT . $products_weight . TEXT_PRODUCT_WEIGHT_UNIT . '</li>' : '') . "\n"; ?>
  109. <?php echo (($flag_show_product_info_quantity == 1) ? '<li>' . $products_quantity . TEXT_PRODUCT_QUANTITY . '</li>' : '') . "\n"; ?>
  110. <?php echo (($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name)) ? '<li>' . TEXT_PRODUCT_MANUFACTURER . $manufacturers_name . '</li>' : '') . "\n"; ?>
  111. </ul>
  112. <br class="clearBoth" />
  113. <?php
  114. }
  115. ?>
  116. <!--eof Product details list -->
  117. <!--bof Attributes Module -->
  118. <?php
  119. if ($pr_attr->fields['total'] > 0) {
  120. ?>
  121. <?php
  122. /**
  123. * display the product atributes
  124. */
  125. require($template->get_template_dir('/tpl_modules_attributes.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_attributes.php'); ?>
  126. <?php
  127. }
  128. ?>
  129. <!--eof Attributes Module -->
  130. <!--bof Quantity Discounts table -->
  131. <?php
  132. if ($products_discount_type != 0) { ?>
  133. <?php
  134. /**
  135. * display the products quantity discount
  136. */
  137. require($template->get_template_dir('/tpl_modules_products_quantity_discounts.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_products_quantity_discounts.php'); ?>
  138. <?php
  139. }
  140. ?>
  141. <!--eof Quantity Discounts table -->
  142. <!--bof Additional Product Images -->
  143. <?php
  144. /**
  145. * display the products additional images
  146. */
  147. require($template->get_template_dir('/tpl_modules_additional_images.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_additional_images.php'); ?>
  148. <!--eof Additional Product Images -->
  149. <!--bof Prev/Next bottom position -->
  150. <?php if (PRODUCT_INFO_PREVIOUS_NEXT == 2 or PRODUCT_INFO_PREVIOUS_NEXT == 3) { ?>
  151. <?php
  152. /**
  153. * display the product previous/next helper
  154. */
  155. require($template->get_template_dir('/tpl_products_next_previous.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_products_next_previous.php'); ?>
  156. <?php } ?>
  157. <!--eof Prev/Next bottom position -->
  158. <!--bof Tell a Friend button -->
  159. <?php
  160. if ($flag_show_product_info_tell_a_friend == 1) { ?>
  161. <div id="productTellFriendLink" class="buttonRow forward"><?php echo ($flag_show_product_info_tell_a_friend == 1 ? '<a href="' . zen_href_link(FILENAME_TELL_A_FRIEND, 'products_id=' . $_GET['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_TELLAFRIEND, BUTTON_TELLAFRIEND_ALT) . '</a>' : ''); ?></div>
  162. <?php
  163. }
  164. ?>
  165. <!--eof Tell a Friend button -->
  166. <!--bof Reviews button and count-->
  167. <?php
  168. if ($flag_show_product_info_reviews == 1) {
  169. // if more than 0 reviews, then show reviews button; otherwise, show the "write review" button
  170. if ($reviews->fields['count'] > 0 ) { ?>
  171. <div id="productReviewLink" class="buttonRow back"><?php echo '<a href="' . zen_href_link(FILENAME_PRODUCT_REVIEWS, zen_get_all_get_params()) . '">' . zen_image_button(BUTTON_IMAGE_REVIEWS, BUTTON_REVIEWS_ALT) . '</a>'; ?></div>
  172. <br class="clearBoth" />
  173. <p class="reviewCount"><?php echo ($flag_show_product_info_reviews_count == 1 ? TEXT_CURRENT_REVIEWS . ' ' . $reviews->fields['count'] : ''); ?></p>
  174. <?php } else { ?>
  175. <div id="productReviewLink" class="buttonRow back"><?php echo '<a href="' . zen_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, zen_get_all_get_params(array())) . '">' . zen_image_button(BUTTON_IMAGE_WRITE_REVIEW, BUTTON_WRITE_REVIEW_ALT) . '</a>'; ?></div>
  176. <br class="clearBoth" />
  177. <?php
  178. }
  179. }
  180. ?>
  181. <!--eof Reviews button and count -->
  182. <!--bof Product date added/available-->
  183. <?php
  184. if ($products_date_available > date('Y-m-d H:i:s')) {
  185. if ($flag_show_product_info_date_available == 1) {
  186. ?>
  187. <p id="productDateAvailable" class="freeShip centeredContent"><?php echo sprintf(TEXT_DATE_AVAILABLE, zen_date_long($products_date_available)); ?></p>
  188. <?php
  189. }
  190. } else {
  191. if ($flag_show_product_info_date_added == 1) {
  192. ?>
  193. <p id="productDateAdded" class="freeShip centeredContent"><?php echo sprintf(TEXT_DATE_ADDED, zen_date_long($products_date_added)); ?></p>
  194. <?php
  195. } // $flag_show_product_info_date_added
  196. }
  197. ?>
  198. <!--eof Product date added/available -->
  199. <!--bof Product URL -->
  200. <?php
  201. if (zen_not_null($products_url)) {
  202. if ($flag_show_product_info_url == 1) {
  203. ?>
  204. <p id="productInfoLink" class="freeShip centeredContent"><?php echo sprintf(TEXT_MORE_INFORMATION, zen_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($products_url), 'NONSSL', true, false)); ?></p>
  205. <?php
  206. } // $flag_show_product_info_url
  207. }
  208. ?>
  209. <!--eof Product URL -->
  210. <!--bof also purchased products module-->
  211. <?php require($template->get_template_dir('tpl_modules_also_purchased_products.php', DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . 'tpl_modules_also_purchased_products.php');?>
  212. <!--eof also purchased products module-->
  213. <!--bof Form close-->
  214. </form>
  215. <!--bof Form close-->
  216. </div>