Guest User

Untitled

a guest
Jan 21st, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.40 KB | None | 0 0
  1. <!-- Item Image -->
  2. <div class="catItemImageBlock">
  3. <span class="catItemImage">
  4. <a href="<?php echo $this->item->link; ?>" title="<?php if(!empty($this-
  5. >item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item-
  6. >image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title);
  7. ?>">
  8. <img src="<?php echo $this->item->image; ?>" alt="<?php if(!empty($this-
  9. >item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item-
  10. >image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title);
  11. ?>" style="width:<?php echo $this->item->imageWidth; ?>px; height:auto;" />
  12. </a>
  13. </span>
  14. <div class="clr"></div>
  15. </div>
  16. <?php endif; ?>
  17.  
  18. <?php if($this->item->params->get('catItemIntroText')): ?>
  19. <!-- Item Image -->
  20. <div class="genericItemImageBlock">
  21. <span class="genericItemImage">
  22. <a href="<?php echo $this->item->link; ?>" title="<?php if(!empty($item-
  23. >image_caption)) echo K2HelperUtilities::cleanHtml($item->image_caption);
  24. else echo K2HelperUtilities::cleanHtml($item->title); ?>">
  25. <img src="<?php echo $this->item->imageGeneric; ?>" alt="<?php
  26. if(!empty($item->image_caption)) echo K2HelperUtilities::cleanHtml($item-
  27. >image_caption); else echo K2HelperUtilities::cleanHtml($item->title); ?>"
  28. style="width:<?php echo $this->params->get('itemImageGeneric'); ?>px;
  29. height:auto;" />
  30. </a>
  31. </span>
  32. <div class="clr"></div>
  33. </div>
  34.  
  35. <!-- Add to cart button -->
  36. <div class="span4 add_to_carts">
  37. <div id='add_to_cart_<?php echo $this->item->id; ?>'
  38. class="k2store_add_to_cart" style="display: block;">
  39. <input type="hidden" name="product_id" value="<?php echo $this->item->id; ?
  40. >" />
  41. <input type="hidden" id="task" name="task" value="" />
  42. <?php echo JHTML::_( 'form.token' ); ?>
  43. <input type="hidden" name="return" value="<?php echo base64_encode(
  44. JUri::getInstance()->toString() ); ?>" />
  45. <input value="<?php echo JText::_('K2STORE_ADD_TO_CART'); ?>"
  46. type="submit" class="k2store_cart_button btn btn-primary basecolor_1" />
  47. </div>
  48. </div>
  49.  
  50.  
  51.  
  52.  
  53. </div>
  54.  
  55.  
  56.  
  57. </form>
  58.  
  59. <?php if(count(JModuleHelper::getModules('k2store-addtocart-bottom')) > 0 ):
  60. ?>
  61. <div class="k2store_modules">
  62. <?php echo K2StoreHelperModules::loadposition('k2store-addtocart-bottom'); ?
  63. >
  64. </div>
  65. <?php endif; ?>
  66.  
  67. <?php
  68. /*------------------------------------------------------------------------
  69. # com_k2store - K2 Store v 2.6
  70. # ------------------------------------------------------------------------
  71. # author Ramesh Elamathi - Weblogicx India http://www.weblogicxindia.com
  72. # copyright Copyright (C) 2012 Weblogicxindia.com. All Rights Reserved.
  73. # @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
  74. # Websites: http://k2store.org
  75. # Technical Support: Forum - http://k2store.org/forum/index.html
  76. -------------------------------------------------------------------------*/
  77.  
  78.  
  79. $item = @$this->item;
  80. $formName = 'k2storeadminForm_'.$item->product_id;
  81. require_once (JPATH_SITE.'/components/com_k2store/helpers/cart.php');
  82. require_once
  83. (JPATH_ADMINISTRATOR.'/components/com_k2store/library/select.php');
  84. $action = JRoute::_('index.php?option=com_k2store&view=mycart');
  85. ?>
  86. <div class="k2store">
  87. <div class="row-fluid">
  88. <div class="span12">
  89. <?php if(count(JModuleHelper::getModules('k2store-addtocart-top')) > 0 ): ?>
  90.  
  91. <div class="k2store_modules">
  92. <?php echo K2StoreHelperModules::loadposition('k2store-addtocart-top'); ?>
  93. </div>
  94. <?php endif; ?>
  95. <form action="<?php echo $action; ?>" method="post" class="k2storeCartForm"
  96. id="<?php echo $formName; ?>" name="<?php echo $formName; ?>"
  97. enctype="multipart/form-data">
  98.  
  99. <?php if($this->params->get('show_price_field', 1)):?>
  100. <!--base price-->
  101. <div class="row-fluid">
  102. <div class="span12">
  103. <span id="product_price_<?php echo $item->product_id; ?>"
  104. class="product_price">
  105. <?php echo K2StoreHelperCart::dispayPriceWithTax($item->price, $item->tax,
  106. $this->params->get('price_display_options', 1)); ?>
  107. </span>
  108. </div>
  109. </div>
  110. <?php endif; ?>
  111.  
  112. <!--attribute options-->
  113. <div class="row-fluid">
  114. <div class="span12">
  115. <div id='product_attributeoptions_<?php echo $item->product_id; ?>'
  116. class="product_attributeoptions">
  117. <?php
  118. $default = K2StoreHelperCart::getDefaultAttributeOptions($this->attributes);
  119.  
  120. foreach ($this->attributes as $attribute)
  121. {
  122. $attribs = array('class' => 'inputbox', 'size' => '1');
  123. ?>
  124. <div class="pao" id='productattributeoption_<?php echo $attribute-
  125. >productattribute_id; ?>'>
  126. <?php
  127. echo "<span class='attribute_title'>".$attribute-
  128. >productattribute_name."&nbsp;";
  129. $required = K2StoreSelect::getAttributeRequired($attribute-
  130. >productattribute_id);
  131. if($required) {
  132. $attribs = array('class' => 'inputbox required', 'size' => '1');
  133. echo '*';
  134. } else {
  135. $attribs = array('class' => 'inputbox', 'size' => '1');
  136. }
  137. echo "</span>";
  138.  
  139. $key = 'attribute_'.$attribute->productattribute_id;
  140. $selected = (!empty($values[$key]))? $values[$key] :
  141. $default[$attribute->productattribute_id];
  142.  
  143. // Selected attribute options (for child attributes)
  144. $selected_opts = (!empty($this->selected_opts))? json_decode($this-
  145. >selected_opts) : 0;
  146.  
  147. if(!count($selected_opts))
  148. {
  149. $selected_opts = 0;
  150. }
  151. //now choose the format: select or radio
  152. $format = K2StoreSelect::getAttributeDisplayFormat($attribute-
  153. >productattribute_id);
  154. if($format == 'radio') {
  155. //echo K2StoreSelect::productattributeoptions( $attribute-
  156. >productattribute_id, $selected, $key, $attribs, null, $selected_opts );
  157. echo K2StoreSelect::radio_productattributeoptions( $attribute-
  158. >productattribute_id, $selected, $key, $attribs, $idtag = null, $required,
  159. $selected_opts );
  160. } else {
  161. echo K2StoreSelect::productattributeoptions( $attribute-
  162. >productattribute_id, $selected, $key, $attribs, $idtag = null, $required,
  163. $selected_opts );
  164. }
  165.  
  166. ?>
  167.  
  168. </div>
  169. <?php
  170. }
  171. ?>
  172.  
  173. </div> <!-- end of attribute options -->
  174. </div> <!-- end of span -->
  175. </div> <!-- end of row-fluid -->
  176.  
  177. <div class="row-fluid">
  178. <?php if($this->params->get('show_qty_field', 1)):?>
  179. <div class="span4 pull-left">
  180. <div id='product_quantity_input_<?php echo $item->product_id; ?>'
  181. class="product_quantity_input">
  182. <span class="title"><?php echo JText::_( "K2STORE_ADDTOCART_QUANTITY" ); ?>:
  183. </span>
  184. <input type="text" name="product_qty" value="<?php echo $item-
  185. >product_quantity; ?>" size="2" />
  186. </div>
  187. </div>
  188. <?php else:?>
  189. <input type="hidden" name="product_qty" value="<?php echo $item-
  190. >product_quantity; ?>" size="2" />
  191. <?php endif; ?>
  192.  
  193. <!-- Add to cart button -->
  194. <div class="span7 pull-left">
  195. <div id='add_to_cart_<?php echo $item->product_id; ?>'
  196. class="k2store_add_to_cart" style="display: block;">
  197. <input type="hidden" name="product_id" value="<?php echo $item-
  198. >product_id; ?>" />
  199. <input type="hidden" id="task" name="task" value="" />
  200. <?php echo JHTML::_( 'form.token' ); ?>
  201. <input type="hidden" name="return" value="<?php echo base64_encode(
  202. JUri::getInstance()->toString() ); ?>" />
  203. <input value="<?php echo JText::_('K2STORE_ADD_TO_CART'); ?>"
  204. type="submit" class="k2store_cart_button btn btn-primary" />
  205. </div>
  206. </div>
  207. </div>
  208.  
  209. </form>
  210.  
  211. <?php if(count(JModuleHelper::getModules('k2store-addtocart-bottom')) > 0 ):
  212. ?>
  213. <div class="k2store_modules">
  214. <?php echo K2StoreHelperModules::loadposition('k2store-addtocart-bottom'); ?
  215. >
  216. </div>
  217. <?php endif; ?>
  218.  
  219. </div>
  220. </div>
  221. </div>
  222.  
  223. <!--base price-->
  224. <div class="span4 product_prices">
  225. <span id="product_price_<?php echo $this->item->id; ?>"
  226. class="product_price">
  227. <?php echo K2StoreHelperCart::dispayPriceWithTax($this->item-
  228. >price, $this->item->tax, $this->item->params->get('price_display_options',
  229. 1)); ?>
  230. </span>
  231. </div>
  232. <?php endif; ?>
  233.  
  234. $this->item->price, $this->item->tax, $this->item->params-
  235. >get('price_display_options', 1)); ?>
Add Comment
Please, Sign In to add comment