static function k2Store($item) { // preparing the output array $output = array('cart' => '', 'price' => ''); // if the settings exists if (is_file(JPATH_SITE . '/components/com_k2store/helpers/cart.php')) { require_once JPATH_SITE . '/components/com_k2store/helpers/cart.php'; // get product data $item_plugins_data = json_decode($item['plugins']); // output for the cart $output['cart'] = '<form action="index.php?option=com_k2store&view=mycart" method="post" class="k2storeCartForm1 nspK2StoreCartForm" id="k2storeadminForm_' . $item['id'] . '" name="k2storeadminForm_' . $item['id'] . '" enctype="multipart/form-data"> <div id="add_to_cart_12" class="k2store_add_to_cart"> <input type="hidden" id="k2store_product_id" name="product_id" value="' . $item['id'] . '"> ' . JHTML::_('form.token') . ' <input type="hidden" name="return" value="' . base64_encode(JUri::getInstance()->toString()) . '"> <input value="Add to cart" type="submit" class="k2store_cart_button btn btn-primary"> </div> <div class="k2store-notification" style="display: none;"> <div class="message"></div> <div class="cart_link"><a class="btn btn-success" href="index.php?option=com_k2store&view=mycart">View Cart</a></div> <div class="cart_dialogue_close" onclick="jQuery(this).parent().slideUp().hide();">x</div> </div> <div class="error_container"> <div class="k2product"></div> <div class="k2stock"></div> </div> <input type="hidden" name="product_qty" value="1"> <input type="hidden" name="option" value="com_k2store"> <input type="hidden" name="view" value="mycart"> <input type="hidden" id="task" name="task" value="add"> </form>'; // output for the price $output['price'] = ''; // getting the necessary data $price = $item_plugins_data->k2storeitem_price; $tax = $item_plugins_data->k2storeitem_tax; $special_price = 0; // getting the special price if exists if (isset($item_plugins_data->k2storespecial_price)) { $special_price = $item_plugins_data->k2storespecial_price; } // generate the basic price $base_price = K2StoreHelperCart::dispayPriceWithTax($price, $tax, 1); // check if the special price exists if ($special_price > 0.0) { $base_price = '<strike>' . $base_price . '</strike> ' . K2StoreHelperCart::dispayPriceWithTax($special_price, $tax, 1); } // set the final output of the price $output['price'] = '<span class="nspK2StorePrice">' . $base_price . '</span>'; } // return the output array return $output; }
if ($item->special_price > 0.0) { echo '</strike>'; } ?> </span> <!--special price--> <?php if ($item->special_price > 0.0) { ?> <span id="product_special_price_<?php echo $item->product_id; ?> " class="product_special_price"> <?php echo K2StoreHelperCart::dispayPriceWithTax($item->special_price, $item->sp_tax, $this->params->get('price_display_options', 1)); ?> </span> <?php } ?> <?php } ?> <!-- sku --> <?php if ($this->params->get('show_sku_field', 0)) {
?> "><?php echo stripslashes($db->escape(JText::_($option_value['optionvalue_name']))); ?> <?php if ($option_value['product_optionvalue_price'] > 0) { ?> <?php //get the tax $tax = $this->tax_class->getProductTax($option_value['product_optionvalue_price'], $this->item->product_id); ?> (<?php echo $option_value['product_optionvalue_prefix']; ?> <?php echo K2StoreHelperCart::dispayPriceWithTax($option_value['product_optionvalue_price'], $tax, $this->params->get('price_display_options', 1)); ?> ) <?php } ?> </label> <br /> <?php } ?> </div> <br /> <?php } ?>