Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by kikis

  1. Hook processing: 3673 ms / 23.16 Mb 61 methods called in 36 modules Hook Processing displayHome 4.18 Mb in 1717 ms displayTop 6.88 Mb in 1488 ms displayFooter 1.56 Mb in 210 ms displayHomeTab 0.14 Mb in 118 ms displayHeader 5.90 Mb in 63 ms displayTopColumn 0.10 Mb in 46 ms moduleRoutes 4.28 Mb in 21 ms displayNav 0.12 Mb in 11 ms actionObjectAddBefore 0.00 Mb in 0 ms actionObjectAddAfter 0.00 Mb in 0 ms DisplayOverrideTemplate 0.00 Mb in 0 ms displayHomeTabContent 0.00 Mb in 0 ms actionObjectConnectionAddBefore 0.00 Mb in 0 ms actionObjectConnectionAddAfter 0.00 Mb in 0 ms displayBanner 0.00 Mb in 0 ms footTab 0.00 Mb in 0 ms actionDispatcher 0.00 Mb in 0 ms actionFrontControllerSetMedia 0.00 Mb in 0 ms footerAdvt 0.00 Mb in 0 ms
  2. I have the same problem here. In 10 valid orders I will receive 1-2 empty orders without any payment choosen. Also I don't received any email alert about this new order. upgrade from 1.4 Payment modules only bank wire and cod with fee So how can I fix it?? The bugs in 1.6 version are uncountable :(
  3. I just refresh my browser and now there aren't the Notice: unserialize() [function.unserialize]: Also now has Load time: 4278 ms You'd better run your shop on a toaster What's going on?
  4. I did it but I cannot understand many things... :/ What exactly to see? Are theese usefull? Notice: unserialize() [function.unserialize]: Unexpected end of serialized data in /_______/httpdocs/classes/cache/CacheFs.php on line 70 Notice: unserialize() [function.unserialize]: Error at offset 20288 of 105258 bytes in /________/httpdocs/classes/cache/CacheFs.php on line 70 . Load time: 10754 ms You'd better run your shop on a toaster Hook processing: 9525 ms / 22.51 Mb 61 methods called in 36 modules Memory peak usage: 45.9 Mb Total cache size (in Cache class): 2.31 Mb DB type: DbPDO SQL Queries: 174 queries Time spent querying: 558 ms Included files: 216 Size of included files: 3.49 Mb
  5. Oh God there is a miracle here!! I had a very annoying problem after upgrade to 1.6 I couldn't save any changes in the products. The only way was the Store Manager that I had purchased in the past. I had an error about description (English) Greek etc.. I did Vekia's tutorial about upgrade to full feature editor because I read in other topic that it will stop the error. I had blank pages when I finished but I tried without the last step about iframe and now I can save the products!!! Miracle!! But the editor is just the same.. not full feature haha Thanks anyway Vekia!!
  6. Can you tell us the different method? I tried all theese and I have blank pages everywhere.
  7. I am using CuteFTP 8.3 to upload file and I use the editor of cute ftp when I am editing files. I was thinking that this editor was ok. Now what can I do please? Which file needs change?
  8. After my upgrade from 1.4 to 1.6 my site is very slow. You can see here a web page test http://www.webpagetest.org/result/150105_RT_D34/1/details/ I contact with my hosting company They said me that I use it at limits http://prntscr.com/5op5g6 And they can see a strange call " http://www.musclebody.gr/undefined?1420447935507 " and that is 404. They told me that this is the reason of the low speed. I don't believe it ofcourse. Can you give me your opinion? And what is this undefined? Can I disable it?
  9. Sure! For my site works great with the following code in fblogin.css It is aligned properly as you can see. div.fblogin {cursor:pointer;} div.fblogin p::before{ width:21px; height:21px; background:url('../img/fb1.png') no-repeat top right; display:inline-block; content:""; } div.fblogin p { padding:0px 0px; background:url('../img/fb2.png') repeat-x top; height:21px; color:#FFF; text-shadow:1px 1px 0px #41577d; font-size:12px; display:inline-block; } div.fblogin p span { display:inline-block; padding:0px 10px; position:relative; top:-6px; font-weight:bold; } div.fblogin p:after{ width:2px; height:21px; background:url('../img/fb3.png') no-repeat top left; display:inline-block; content: ""; } .fblogin-link { float:right; border-left: 0px solid #515151; display: block; color: white; font-weight: bold; padding: 6px 10px 0px 10px; text-shadow: 1px 1px rgba(0, 0, 0, 0.2); cursor: pointer; line-height: 18px; } .fbloader{ display:none; position:fixed; bottom:0px; right:0px; height:40px; width:80px; background:#3B5998 url('../img/loading.gif') no-repeat center; } .loginpopupsocial { display:inline-block; float:left; margin-right:10px; margin-top:5px; } .loginpopupsocial span { color:#FFF!important; text-shadow: 1px 1px rgba(0, 0, 0, 0.2)!important; font-family:arial!important; } .loginpopupsocial p { margin-top:0px; }
  10. Thank you very much! It works But because noone will understand to push the button save at group default it is better to make it from default Also I fixex the css file to align it a little and disable the border that it wasn't pretty
  11. As you can see in my site there is a white strip. Anyone knows how to fix it? Today I play a little with top horizontal menu positions and sizes and some other modules. I use firefox and in firefox I couldn't see this white strip but from chrome and ie there is. Any help?
  12. I use file system cache! But either with cache enabled or disabled it doesn't refresh the changes without F5
  13. I don't know what is CDN Cloudflare. I checked with ΙΕ, Firefox and Chrome.. It is very annoying because neither order status update!!
  14. I cannot see any update in my changes if I don't presh F5!! I have updated to and everything works perfect except this. It is very annoying this problem. I have disabled CACHE. My website is www.musclebody.gr
  15. I bought it but it doesn't work properly.. After someone login with facebook the costumer can see only the logo of website and nothing else :/ To see the site again must delete COOKIES. Any solution?
  16. Can this labels shows also the products? It is very usefull because the stuff wouldn't know what products to add at the packages. First we print the labels and then we make tha packages.
  17. Something else is that 30% of the users choose a gift... All the others don't check a gift... Can I make a choose of a gift necessary to go to the next page of checkout?
  18. I just installed the mod. I like it... Ofcourse I disabled the button for checkout As I see if you 3 ranges for example and the custumer is just at 1 range he can see only the product for the next range... Why you don't put after 2nd range the 3rd range products and after the 4th etc... With this way the custumers will have a reason to buy more and more products. But if I have 5 ranges and the costumer will see the 1st and 2nd it is usefull :/ Ofcourse I am talking about the "SET OFF" the multiple precents. To understand me better I would like to have range 50-100 101-200 201-300 301-400 401-1000 With multiple presents ON I must give 5 products at the 5th level. With multiple presents OFF I will give one precent only but very impressive precents. The higher level... the more impressive precent People likes impressive gifts. If you have to choose to get 1 expensive and impressive present and 5 cheapy presents what will you choose? Please fix the module
  19. <?php /* * 2007-2010 PrestaShop * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/osl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author Prestashop SA <[email protected]> * @copyright 2007-2010 Prestashop SA * @version Release: $Revision: 1.4 $ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA Upravila: Maria */ if (!defined('_CAN_LOAD_FILES_')) exit; class CashOnDeliveryWithFee extends PaymentModule { public function __construct() { $this->name = 'cashondeliverywithfee'; $this->tab = 'payments_gateways'; $this->version = '1.0'; $this->currencies = false; $this->isFee = TRUE; //fee yes parent::__construct(); $this->page = basename(__FILE__, '.php'); $this->displayName = $this->l('Cash on delivery with fee (COD)'); $this->description = $this->l('Accept cash on delivery payments with extra fee'); } public function install() { if (!parent::install() OR !$this->registerHook('payment') OR !$this->registerHook('paymentReturn')) return false; return true; } public function getContent() { $this->_html = '<h2>Dobírka</h2>'; if (isset($_POST['submitCOD'])) { if (empty($_POST['fee'])) $_POST['fee'] = '0'; if (empty($_POST['feetype'])) $_POST['feetype'] = '0'; if (empty($_POST['feemin'])) $_POST['feemin'] = '0'; if (!sizeof($this->_postErrors)) { Configuration::updateValue('COD_FEE', floatval( $_POST['fee']) ); Configuration::updateValue('COD_FEE_TYPE', floatval( $_POST['feetype']) ); Configuration::updateValue('COD_FEE_MIN', floatval( $_POST['feemin']) ); $this->displayConf(); } else $this->displayErrors(); } $this->displayCOD(); $this->displayFormSettings(); return $this->_html; } public function displayCOD() { $this->_html .= ' <img src="../modules/cashondeliverywithfee/logo.gif" style="float:left; margin-right:15px;" /> <b>'.$this->l('This module allows you to accept payments by Cash on delivery and charge a extra fee.').'</b><br /><br /><br />'; } public function displayFormSettings() { $conf = Configuration::getMultiple(array('COD_FEE','COD_FEE_TYPE','COD_FEE_MIN')); $fee = array_key_exists('fee', $_POST) ? $_POST['fee'] : (array_key_exists('COD_FEE', $conf) ? $conf['COD_FEE'] : ''); $feetype = array_key_exists('feetype', $_POST) ? $_POST['feetype'] : (array_key_exists('COD_FEE_TYPE', $conf) ? $conf['COD_FEE_TYPE'] : ''); $feemin = array_key_exists('feemin', $_POST) ? $_POST['feemin'] : (array_key_exists('COD_FEE_MIN', $conf) ? $conf['COD_FEE_MIN'] : ''); $this->_html .= ' <form action="'.$_SERVER['REQUEST_URI'].'" method="post"> <fieldset> <legend><img src="../img/admin/contact.gif" />'.$this->l('Settings').'</legend> <label>'.$this->l('Fee').'</label> <div class="margin-form"><input type="text" size="33" name="fee" value="'.htmlentities($fee, ENT_COMPAT, 'UTF-8').'" /></div> <br /> <label>'.$this->l('Type').'</label> <div class="margin-form"> <input type="radio" name="feetype" value="0" '.(!$feetype ? 'checked="checked"' : '').' /> '.$this->l('Amount').' <input type="radio" name="feetype" value="1" '.($feetype ? 'checked="checked"' : '').' /> '.$this->l('%').' </div> <label>'.$this->l('Minimum Fee').'</label> <div class="margin-form"><input type="text" size="33" name="feemin" value="'.htmlentities($feemin, ENT_COMPAT, 'UTF-8').'" /></div> <br /> <br /><center><input type="submit" name="submitCOD" value="'.$this->l('Update settings').'" class="button" /></center> </fieldset> </form><br /><br />'; } public function displayConf() { $this->_html .= ' <div class="conf confirm"> <img src="../img/admin/ok.gif" alt="'.$this->l('Confirmation').'" /> '.$this->l('Settings updated').' </div>'; } public function displayErrors() { $nbErrors = sizeof($this->_postErrors); $this->_html .= ' <div class="alert error"> <h3>'.($nbErrors > 1 ? $this->l('There are') : $this->l('There is')).' '.$nbErrors.' '.($nbErrors > 1 ? $this->l('errors') : $this->l('error')).'</h3> <ol>'; foreach ($this->_postErrors AS $error) $this->_html .= '<li>'.$error.'</li>'; $this->_html .= ' </ol> </div>'; } public function hookPayment($params) { if (!$this->active) return ; global $smarty; // Check if cart has product download foreach ($params['cart']->getProducts() AS $product) { $pd = ProductDownload::getIdFromIdProduct((int)($product['id_product'])); if ($pd AND Validate::isUnsignedInt($pd)) return false; } //fee check if($params['cart']->getOrderShippingCost() == 0) $this->isFee = TRUE; $smarty->assign(array( 'isFee' => $this->isFee, 'this_path' => $this->_path, 'fee' => number_format($this->getCost($params), 2, '.', ''), 'this_path_ssl' => Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/'.$this->name.'/' )); return $this->display(__FILE__, 'payment.tpl'); } //Return the fee cost function getCost($params) { if(Configuration::get('COD_FEE_TYPE')==0) { return floatval(Configuration::get('COD_FEE')); } else { $minimalfee = floatval(Configuration::get('COD_FEE_MIN')); $cartvalue = floatval($params['cart']->getOrderTotal(true, 3)); $percent = floatval(Configuration::get('COD_FEE')); $percent = $percent / 100; $fee = $cartvalue * $percent; if($fee<$minimalfee) { $fee=$minimalfee; } return floatval($fee); } } //Return the fee cost function getCostValidated($cart) { if(Configuration::get('COD_FEE_TYPE')==0) { return floatval(Configuration::get('COD_FEE')); } else { $minimalfee = floatval(Configuration::get('COD_FEE_MIN')); $cartvalue = floatval($cart->getOrderTotal(true, 3)); $percent = floatval(Configuration::get('COD_FEE')); $percent = $percent / 100; $fee = $cartvalue * $percent; if($fee<$minimalfee) { $fee=$minimalfee; } return floatval($fee); } } public function hookPaymentReturn($params) { if (!$this->active) return ; return $this->display(__FILE__, 'confirmation.tpl'); } /** * Validate an order in database AND ADD EXTRA COST * Function called from a payment module * * @param integer $id_cart Value * @param integer $id_order_state Value * @param float $amountPaid Amount really paid by customer (in the default currency) * @param string $paymentMethod Payment method (eg. 'Credit cart') * @param string $message Message to attach to order */ public function validateOrderCOD($id_cart, $id_order_state, $amountPaid, $paymentMethod = 'Unknown', $message = NULL, $extraVars = array(), $currency_special = NULL, $dont_touch_amount = false, $secure_key = false) { global $cart; $cart = new Cart((int)($id_cart)); $CODfee = $this->getCostValidated($cart); if ($cart->getOrderShippingCost() == 0) $CODfee = 0; $jj = TRUE; // Does order already exists ? if (Validate::isLoadedObject($cart) AND $cart->OrderExists() == false) { if ($secure_key !== false AND $secure_key != $cart->secure_key) die(Tools::displayError()); // Copying data from cart $order = new Order(); $order->id_carrier = (int)($cart->id_carrier); $order->id_customer = (int)($cart->id_customer); $order->id_address_invoice = (int)($cart->id_address_invoice); $order->id_address_delivery = (int)($cart->id_address_delivery); $vat_address = new Address((int)($order->id_address_delivery)); $order->id_currency = ($currency_special ? (int)($currency_special) : (int)($cart->id_currency)); $order->id_lang = (int)($cart->id_lang); $order->id_cart = (int)($cart->id); $customer = new Customer((int)($order->id_customer)); $order->secure_key = ($secure_key ? pSQL($secure_key) : pSQL($customer->secure_key)); $order->payment = $paymentMethod; if (isset($this->name)) $order->module = $this->name; $order->recyclable = $cart->recyclable; $order->gift = (int)($cart->gift); $order->gift_message = $cart->gift_message; $currency = new Currency($order->id_currency); $order->conversion_rate = $currency->conversion_rate; $amountPaid = !$dont_touch_amount ? Tools::ps_round((float)($amountPaid), 2) : $amountPaid; $order->total_paid_real = floatval(number_format($amountPaid+$CODfee, 2, '.', '')); $order->total_products = (float)($cart->getOrderTotal(false, Cart::ONLY_PRODUCTS)); $order->total_products_wt = (float)($cart->getOrderTotal(true, Cart::ONLY_PRODUCTS)); $order->total_discounts = (float)(abs($cart->getOrderTotal(true, Cart::ONLY_DISCOUNTS))); $order->total_shipping = (float)($cart->getOrderShippingCost()+$CODfee); $order->carrier_tax_rate = (float)Tax::getCarrierTaxRate($cart->id_carrier, (int)$cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')}); $order->total_wrapping = (float)(abs($cart->getOrderTotal(true, Cart::ONLY_WRAPPING))); $order->total_paid = (float)(Tools::ps_round((float)($cart->getOrderTotal(true, Cart::BOTH)+$CODfee), 2)); $order->invoice_date = '0000-00-00 00:00:00'; $order->delivery_date = '0000-00-00 00:00:00'; // Amount paid by customer is not the right one -> Status = payment error // We don't use the following condition to avoid the float precision issues : http://www.php.net/manual/en/language.types.float.php // if ($order->total_paid != $order->total_paid_real) // We use number_format in order to compare two string if (number_format($order->total_paid, 2) != number_format($order->total_paid_real, 2)) $id_order_state = _PS_OS_ERROR_; // Creating order if ($cart->OrderExists() == false) $result = $order->add(); else { $errorMessage = Tools::displayError('An order has already been placed using this cart.'); Logger::addLog($errorMessage, 4, '0000001', 'Cart', intval($order->id_cart)); die($errorMessage); } // Next ! if ($result AND isset($order->id)) { if (!$secure_key) $message .= $this->l('Warning : the secure key is empty, check your payment account before validation'); // Optional message to attach to this order if (isset($message) AND !empty($message)) { $msg = new Message(); $message = strip_tags($message, '<br>'); if (Validate::isCleanHtml($message)) { $msg->message = $message; $msg->id_order = intval($order->id); $msg->private = 1; $msg->add(); } } // Insert products from cart into order_detail table $products = $cart->getProducts(); $productsList = ''; $db = Db::getInstance(); $query = 'INSERT INTO `'._DB_PREFIX_.'order_detail` (`id_order`, `product_id`, `product_attribute_id`, `product_name`, `product_quantity`, `product_quantity_in_stock`, `product_price`, `reduction_percent`, `reduction_amount`, `group_reduction`, `product_quantity_discount`, `product_ean13`, `product_upc`, `product_reference`, `product_supplier_reference`, `product_weight`, `tax_name`, `tax_rate`, `ecotax`, `ecotax_tax_rate`, `discount_quantity_applied`, `download_deadline`, `download_hash`) VALUES '; $customizedDatas = Product::getAllCustomizedDatas((int)($order->id_cart)); Product::addCustomizationPrice($products, $customizedDatas); $outOfStock = false; foreach ($products AS $key => $product) { $productQuantity = (int)(Product::getQuantity((int)($product['id_product']), ($product['id_product_attribute'] ? (int)($product['id_product_attribute']) : NULL))); $quantityInStock = ($productQuantity - (int)($product['cart_quantity']) < 0) ? $productQuantity : (int)($product['cart_quantity']); if ($id_order_state != _PS_OS_CANCELED_ AND $id_order_state != _PS_OS_ERROR_) { if (Product::updateQuantity($product, (int)$order->id)) $product['stock_quantity'] -= $product['cart_quantity']; if ($product['stock_quantity'] < 0 && Configuration::get('PS_STOCK_MANAGEMENT')) $outOfStock = true; Product::updateDefaultAttribute($product['id_product']); } $price = Product::getPriceStatic((int)($product['id_product']), false, ($product['id_product_attribute'] ? (int)($product['id_product_attribute']) : NULL), 6, NULL, false, true, $product['cart_quantity'], false, (int)($order->id_customer), (int)($order->id_cart), (int)($order->{Configuration::get('PS_TAX_ADDRESS_TYPE')})); $price_wt = Product::getPriceStatic((int)($product['id_product']), true, ($product['id_product_attribute'] ? (int)($product['id_product_attribute']) : NULL), 2, NULL, false, true, $product['cart_quantity'], false, (int)($order->id_customer), (int)($order->id_cart), (int)($order->{Configuration::get('PS_TAX_ADDRESS_TYPE')})); // Add some informations for virtual products $deadline = '0000-00-00 00:00:00'; $download_hash = NULL; if ($id_product_download = ProductDownload::getIdFromIdProduct((int)($product['id_product']))) { $productDownload = new ProductDownload((int)($id_product_download)); $deadline = $productDownload->getDeadLine(); $download_hash = $productDownload->getHash(); } // Exclude VAT if (Tax::excludeTaxeOption()) { $product['tax'] = 0; $product['rate'] = 0; $tax_rate = 0; } else $tax_rate = Tax::getProductTaxRate((int)($product['id_product']), $cart->{Configuration::get('PS_TAX_ADDRESS_TYPE')}); $ecotaxTaxRate = 0; if (!empty($product['ecotax'])) $ecotaxTaxRate = Tax::getProductEcotaxRate($order->{Configuration::get('PS_TAX_ADDRESS_TYPE')}); $quantityDiscount = SpecificPrice::getQuantityDiscount((int)$product['id_product'], Shop::getCurrentShop(), (int)$cart->id_currency, (int)$vat_address->id_country, (int)$customer->id_default_group, (int)$product['cart_quantity']); $unitPrice = Product::getPriceStatic((int)$product['id_product'], true, ($product['id_product_attribute'] ? intval($product['id_product_attribute']) : NULL), 2, NULL, false, true, 1, false, (int)$order->id_customer, NULL, (int)$order->{Configuration::get('PS_TAX_ADDRESS_TYPE')}); $quantityDiscountValue = $quantityDiscount ? ((Product::getTaxCalculationMethod((int)$order->id_customer) == PS_TAX_EXC ? Tools::ps_round($unitPrice, 2) : $unitPrice) - $quantityDiscount['price'] * (1 + $tax_rate / 100)) : 0.00; $query .= '('.(int)($order->id).', '.(int)($product['id_product']).', '.(isset($product['id_product_attribute']) ? (int)($product['id_product_attribute']) : 'NULL').', \''.pSQL($product['name'].((isset($product['attributes']) AND $product['attributes'] != NULL) ? ' - '.$product['attributes'] : '')).'\', '.(int)($product['cart_quantity']).', '.$quantityInStock.', '.(float)(Product::getPriceStatic((int)($product['id_product']), false, ($product['id_product_attribute'] ? (int)($product['id_product_attribute']) : NULL), (Product::getTaxCalculationMethod((int)($order->id_customer)) == PS_TAX_EXC ? 2 : 6), NULL, false, false, $product['cart_quantity'], false, (int)($order->id_customer), (int)($order->id_cart), (int)($order->{Configuration::get('PS_TAX_ADDRESS_TYPE')}), $specificPrice, FALSE)).', '.(float)(($specificPrice AND $specificPrice['reduction_type'] == 'percentage') ? $specificPrice['reduction'] * 100 : 0.00).', '.(float)(($specificPrice AND $specificPrice['reduction_type'] == 'amount') ? (!$specificPrice['id_currency'] ? Tools::convertPrice($specificPrice['reduction'], $order->id_currency) : $specificPrice['reduction']) : 0.00).', '.(float)(Group::getReduction((int)($order->id_customer))).', '.$quantityDiscountValue.', '.(empty($product['ean13']) ? 'NULL' : '\''.pSQL($product['ean13']).'\'').', '.(empty($product['upc']) ? 'NULL' : '\''.pSQL($product['upc']).'\'').', '.(empty($product['reference']) ? 'NULL' : '\''.pSQL($product['reference']).'\'').', '.(empty($product['supplier_reference']) ? 'NULL' : '\''.pSQL($product['supplier_reference']).'\'').', '.(float)($product['id_product_attribute'] ? $product['weight_attribute'] : $product['weight']).', \''.(empty($tax_rate) ? '' : pSQL($product['tax'])).'\', '.(float)($tax_rate).', '.(float)Tools::convertPrice(floatval($product['ecotax']), intval($order->id_currency)).', '.(float)$ecotaxTaxRate.', '.(($specificPrice AND $specificPrice['from_quantity'] > 1) ? 1 : 0).', \''.pSQL($deadline).'\', \''.pSQL($download_hash).'\'),'; $customizationQuantity = 0; if (isset($customizedDatas[$product['id_product']][$product['id_product_attribute']])) { $customizationText = ''; foreach ($customizedDatas[$product['id_product']][$product['id_product_attribute']] AS $customization) { if (isset($customization['datas'][_CUSTOMIZE_TEXTFIELD_])) foreach ($customization['datas'][_CUSTOMIZE_TEXTFIELD_] AS $text) $customizationText .= $text['name'].':'.' '.$text['value'].'<br />'; if (isset($customization['datas'][_CUSTOMIZE_FILE_])) $customizationText .= sizeof($customization['datas'][_CUSTOMIZE_FILE_]) .' '. Tools::displayError('image(s)').'<br />'; $customizationText .= '---<br />'; } $customizationText = rtrim($customizationText, '---<br />'); $customizationQuantity = (int)($product['customizationQuantityTotal']); $productsList .= '<tr style="background-color: '.($key % 2 ? '#DDE2E6' : '#EBECEE').';"> <td style="padding: 0.6em 0.4em;">'.$product['reference'].'</td> <td style="padding: 0.6em 0.4em;"><strong>'.$product['name'].(isset($product['attributes_small']) ? ' '.$product['attributes_small'] : '').' - '.$this->l('Customized').(!empty($customizationText) ? ' - '.$customizationText : '').'</strong></td> <td style="padding: 0.6em 0.4em; text-align: right;">'.Tools::displayPrice(Product::getTaxCalculationMethod() == PS_TAX_EXC ? $price : $price_wt, $currency, false).'</td> <td style="padding: 0.6em 0.4em; text-align: center;">'.$customizationQuantity.'</td> <td style="padding: 0.6em 0.4em; text-align: right;">'.Tools::displayPrice($customizationQuantity * (Product::getTaxCalculationMethod() == PS_TAX_EXC ? $price : $price_wt), $currency, false).'</td> </tr>'; } if (!$customizationQuantity OR (int)$product['cart_quantity'] > $customizationQuantity) $productsList .= '<tr style="background-color: '.($key % 2 ? '#DDE2E6' : '#EBECEE').';"> <td style="padding: 0.6em 0.4em;">'.$product['reference'].'</td> <td style="padding: 0.6em 0.4em;"><strong>'.$product['name'].(isset($product['attributes_small']) ? ' '.$product['attributes_small'] : '').'</strong></td> <td style="padding: 0.6em 0.4em; text-align: right;">'.Tools::displayPrice(Product::getTaxCalculationMethod() == PS_TAX_EXC ? $price : $price_wt, $currency, false).'</td> <td style="padding: 0.6em 0.4em; text-align: center;">'.((int)($product['cart_quantity']) - $customizationQuantity).'</td> <td style="padding: 0.6em 0.4em; text-align: right;">'.Tools::displayPrice(((int)($product['cart_quantity']) - $customizationQuantity) * (Product::getTaxCalculationMethod() == PS_TAX_EXC ? $price : $price_wt), $currency, false).'</td> </tr>'; } // end foreach ($products) $query = rtrim($query, ','); $result = $db->Execute($query); // Insert discounts from cart into order_discount table $discounts = $cart->getDiscounts(); $discountsList = ''; $total_discount_value = 0; $shrunk = false; foreach ($discounts AS $discount) { $objDiscount = new Discount((int)$discount['id_discount'], $order->id_lang); $value = $objDiscount->getValue(sizeof($discounts), $cart->getOrderTotal(true, Cart::ONLY_PRODUCTS), $order->total_shipping, $cart->id); if ($objDiscount->id_discount_type == 2 AND in_array($objDiscount->behavior_not_exhausted, array(1,2))) $shrunk = true; if ($shrunk AND ($total_discount_value + $value) > ($order->total_products + $order->total_shipping + $order->total_wrapping)) { $amount_to_add = ($order->total_products + $order->total_shipping + $order->total_wrapping) - $total_discount_value; if ($objDiscount->id_discount_type == 2 AND $objDiscount->behavior_not_exhausted == 2) { $voucher = new Discount(); foreach ($objDiscount AS $key => $discountValue) $voucher->$key = $discountValue; $voucher->name = 'VSRK'.(int)$order->id_customer.'O'.(int)$order->id; $voucher->value = (float)$value - $amount_to_add; $voucher->add(); $params['{voucher_amount}'] = Tools::displayPrice($voucher->value, $currency, false); $params['{voucher_num}'] = $voucher->name; @Mail::Send((int)$order->id_lang, 'voucher', Mail::l('New voucher regarding your order #').$order->id, $params, $customer->email, $customer->firstname.' '.$customer->lastname); } } else $amount_to_add = $value; $order->addDiscount($objDiscount->id, $objDiscount->name, $amount_to_add); $total_discount_value += $amount_to_add; if ($id_order_state != _PS_OS_ERROR_ AND $id_order_state != _PS_OS_CANCELED_) $objDiscount->quantity = $objDiscount->quantity - 1; $objDiscount->update(); $discountsList .= '<tr style="background-color:#EBECEE;"> <td colspan="4" style="padding: 0.6em 0.4em; text-align: right;">'.$this->l('Voucher code:').' '.$objDiscount->name.'</td> <td style="padding: 0.6em 0.4em; text-align: right;">'.($value != 0.00 ? '-' : '').Tools::displayPrice($value, $currency, false).'</td> </tr>'; } // Specify order id for message $oldMessage = Message::getMessageByCartId((int)($cart->id)); if ($oldMessage) { $message = new Message((int)$oldMessage['id_message']); $message->id_order = (int)$order->id; $message->update(); } // Hook new order $orderStatus = new OrderState((int)$id_order_state, (int)$order->id_lang); if (Validate::isLoadedObject($orderStatus)) { Hook::newOrder($cart, $order, $customer, $currency, $orderStatus); foreach ($cart->getProducts() AS $product) if ($orderStatus->logable) ProductSale::addProductSale((int)$product['id_product'], (int)$product['cart_quantity']); } if (isset($outOfStock) AND $outOfStock) { $history = new OrderHistory(); $history->id_order = (int)$order->id; $history->changeIdOrderState(_PS_OS_OUTOFSTOCK_, (int)$order->id); $history->addWithemail(); } // Set order state in order history ONLY even if the "out of stock" status has not been yet reached // So you migth have two order states $new_history = new OrderHistory(); $new_history->id_order = (int)$order->id; $new_history->changeIdOrderState((int)$id_order_state, (int)$order->id); $new_history->addWithemail(true, $extraVars); // Order is reloaded because the status just changed $order = new Order($order->id); // Send an e-mail to customer if ($id_order_state != _PS_OS_ERROR_ AND $id_order_state != _PS_OS_CANCELED_ AND $customer->id) { $invoice = new Address((int)($order->id_address_invoice)); $delivery = new Address((int)($order->id_address_delivery)); $carrier = new Carrier((int)($order->id_carrier), $order->id_lang); $delivery_state = $delivery->id_state ? new State((int)($delivery->id_state)) : false; $invoice_state = $invoice->id_state ? new State((int)($invoice->id_state)) : false; $data = array( '{firstname}' => $customer->firstname, '{lastname}' => $customer->lastname, '{email}' => $customer->email, '{delivery_block_txt}' => $this->_getFormatedAddress($delivery, "\n"), '{invoice_block_txt}' => $this->_getFormatedAddress($invoice, "\n"), '{delivery_block_html}' => $this->_getFormatedAddress($delivery, "<br />", array( 'firstname' => '<span style="color:#DB3484; font-weight:bold;">%s</span>', 'lastname' => '<span style="color:#DB3484; font-weight:bold;">%s</span>')), '{invoice_block_html}' => $this->_getFormatedAddress($invoice, "<br />", array( 'firstname' => '<span style="color:#DB3484; font-weight:bold;">%s</span>', 'lastname' => '<span style="color:#DB3484; font-weight:bold;">%s</span>')), '{delivery_company}' => $delivery->company, '{delivery_firstname}' => $delivery->firstname, '{delivery_lastname}' => $delivery->lastname, '{delivery_address1}' => $delivery->address1, '{delivery_address2}' => $delivery->address2, '{delivery_city}' => $delivery->city, '{delivery_postal_code}' => $delivery->postcode, '{delivery_country}' => $delivery->country, '{delivery_state}' => $delivery->id_state ? $delivery_state->name : '', '{delivery_phone}' => ($delivery->phone) ? $delivery->phone : $delivery->phone_mobile, '{delivery_other}' => $delivery->other, '{invoice_company}' => $invoice->company, '{invoice_vat_number}' => $invoice->vat_number, '{invoice_firstname}' => $invoice->firstname, '{invoice_lastname}' => $invoice->lastname, '{invoice_address2}' => $invoice->address2, '{invoice_address1}' => $invoice->address1, '{invoice_city}' => $invoice->city, '{invoice_postal_code}' => $invoice->postcode, '{invoice_country}' => $invoice->country, '{invoice_state}' => $invoice->id_state ? $invoice_state->name : '', '{invoice_phone}' => ($invoice->phone) ? $invoice->phone : $invoice->phone_mobile, '{invoice_other}' => $invoice->other, '{order_name}' => sprintf("#%06d", (int)($order->id)), '{date}' => Tools::displayDate(date('Y-m-d H:i:s'), (int)($order->id_lang), 1), '{carrier}' => $carrier->name, '{payment}' => Tools::substr($order->payment, 0, 32), '{products}' => $productsList, '{discounts}' => $discountsList, '{total_paid}' => Tools::displayPrice($order->total_paid, $currency, false), '{total_products}' => Tools::displayPrice($order->total_paid - $order->total_shipping - $order->total_wrapping + $order->total_discounts, $currency, false), '{total_discounts}' => Tools::displayPrice($order->total_discounts, $currency, false), '{total_shipping}' => Tools::displayPrice($order->total_shipping, $currency, false), '{total_wrapping}' => Tools::displayPrice($order->total_wrapping, $currency, false)); if (is_array($extraVars)) $data = array_merge($data, $extraVars); // Join PDF invoice if ((int)(Configuration::get('PS_INVOICE')) AND Validate::isLoadedObject($orderStatus) AND $orderStatus->invoice AND $order->invoice_number) { $fileAttachment['content'] = PDF::invoice($order, 'S'); $fileAttachment['name'] = Configuration::get('PS_INVOICE_PREFIX', (int)($order->id_lang)).sprintf('%06d', $order->invoice_number).'.pdf'; $fileAttachment['mime'] = 'application/pdf'; } else $fileAttachment = NULL; if (Validate::isEmail($customer->email)) Mail::Send((int)($order->id_lang), 'order_conf', Mail::l('Order confirmation'), $data, $customer->email, $customer->firstname.' '.$customer->lastname, NULL, NULL, $fileAttachment); } $this->currentOrder = (int)($order->id); return true; } else { $errorMessage = Tools::displayError('Order creation failed'); Logger::addLog($errorMessage, 4, '0000002', 'Cart', intval($order->id_cart)); die($errorMessage); } } else { $errorMessage = Tools::displayError('Cart can\'t be loaded or an order has already been placed using this cart'); Logger::addLog($errorMessage, 4, '0000001', 'Cart', intval($cart->id)); die($errorMessage); } } /** * @param Object Address $the_address that needs to be txt formated * @return String the txt formated address block */ public function _getFormatedAddress(Address $the_address, $line_sep, $fields_style = array()) { $out = ''; $adr_fields = AddressFormat::getOrderedAddressFields($this->id_country); $r_values = array(); foreach($adr_fields as $fields_line) { $tmp_values = array(); foreach (explode(' ', $fields_line) as $field_item) { $field_item = trim($field_item); $tmp_values[] = (isset($fields_style[$field_item]))? sprintf($fields_style[$field_item], $the_address->{$field_item}) : $the_address->{$field_item}; } $r_values[] = implode(' ', $tmp_values); } $out = implode($line_sep, $r_values); return $out; } }
  20. I did it.. Delete <a href="{$link->getPageLink("$order_process.php", true)}{if $order_process == 'order'}?step=1{/if}" id="button_order_cart" class="exclusive{if $order_process == 'order-opc'}_large{/if}" title="{l s='Check out' mod='blockcart'}">{l s='Check out' mod='blockcart'}</a> At blockcart both at module theme and at modules and then force compile and chace.. Without the last you will never see the changes!! This is why I did it after many hours haha
  21. I am trying to find the error but nothing. If you can please check the file {* * 2007-2012 PrestaShop * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License (AFL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/afl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @author PrestaShop SA <[email protected]> * @copyright 2007-2012 PrestaShop SA * @version Release: $Revision: 14514 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} {include file="$tpl_dir./errors.tpl"} {if $errors|@count == 0} <script type="text/javascript"> // <![CDATA[ // PrestaShop internal settings var currencySign = '{$currencySign|html_entity_decode:2:"UTF-8"}'; var currencyRate = '{$currencyRate|floatval}'; var currencyFormat = '{$currencyFormat|intval}'; var currencyBlank = '{$currencyBlank|intval}'; var taxRate = {$tax_rate|floatval}; var jqZoomEnabled = {if $jqZoomEnabled}true{else}false{/if}; //JS Hook var oosHookJsCodeFunctions = new Array(); // Parameters var id_product = '{$product->id|intval}'; var productHasAttributes = {if isset($groups)}true{else}false{/if}; var quantitiesDisplayAllowed = {if $display_qties == 1}true{else}false{/if}; var quantityAvailable = {if $display_qties == 1 && $product->quantity}{$product->quantity}{else}0{/if}; var allowBuyWhenOutOfStock = {if $allow_oosp == 1}true{else}false{/if}; var availableNowValue = '{$product->available_now|escape:'quotes':'UTF-8'}'; var availableLaterValue = '{$product->available_later|escape:'quotes':'UTF-8'}'; var productPriceTaxExcluded = {$product->getPriceWithoutReduct(true)|default:'null'} - {$product->ecotax}; var reduction_percent = {if $product->specificPrice AND $product->specificPrice.reduction AND $product->specificPrice.reduction_type == 'percentage'}{$product->specificPrice.reduction*100}{else}0{/if}; var reduction_price = {if $product->specificPrice AND $product->specificPrice.reduction AND $product->specificPrice.reduction_type == 'amount'}{$product->specificPrice.reduction}{else}0{/if}; var specific_price = {if $product->specificPrice AND $product->specificPrice.price}{$product->specificPrice.price}{else}0{/if}; var specific_currency = {if $product->specificPrice AND $product->specificPrice.id_currency}true{else}false{/if}; var group_reduction = '{$group_reduction}'; var default_eco_tax = {$product->ecotax}; var ecotaxTax_rate = {$ecotaxTax_rate}; var currentDate = '{$smarty.now|date_format:'%Y-%m-%d %H:%M:%S'}'; var maxQuantityToAllowDisplayOfLastQuantityMessage = {$last_qties}; var noTaxForThisProduct = {if $no_tax == 1}true{else}false{/if}; var displayPrice = {$priceDisplay}; var productReference = '{$product->reference|escape:'htmlall':'UTF-8'}'; var productAvailableForOrder = {if (isset($restricted_country_mode) AND $restricted_country_mode) OR $PS_CATALOG_MODE}'0'{else}'{$product->available_for_order}'{/if}; var productShowPrice = '{if !$PS_CATALOG_MODE}{$product->show_price}{else}0{/if}'; var productUnitPriceRatio = '{$product->unit_price_ratio}'; var idDefaultImage = {if isset($cover.id_image_only)}{$cover.id_image_only}{else}0{/if}; var ipa_default = {if isset($ipa_default)}{$ipa_default}{else}0{/if}; // Customizable field var img_ps_dir = '{$img_ps_dir}'; var customizationFields = new Array(); {assign var='imgIndex' value=0} {assign var='textFieldIndex' value=0} {foreach from=$customizationFields item='field' name='customizationFields'} {assign var="key" value="pictures_`$product->id`_`$field.id_customization_field`"} customizationFields[{$smarty.foreach.customizationFields.index|intval}] = new Array(); customizationFields[{$smarty.foreach.customizationFields.index|intval}][0] = '{if $field.type|intval == 0}img{$imgIndex++}{else}textField{$textFieldIndex++}{/if}'; customizationFields[{$smarty.foreach.customizationFields.index|intval}][1] = {if $field.type|intval == 0 && isset($pictures.$key) && $pictures.$key}2{else}{$field.required|intval}{/if}; {/foreach} // Images var img_prod_dir = '{$img_prod_dir}'; var combinationImages = new Array(); {if isset($combinationImages)} {foreach from=$combinationImages item='combination' key='combinationId' name='f_combinationImages'} combinationImages[{$combinationId}] = new Array(); {foreach from=$combination item='image' name='f_combinationImage'} combinationImages[{$combinationId}][{$smarty.foreach.f_combinationImage.index}] = {$image.id_image|intval}; {/foreach} {/foreach} {/if} combinationImages[0] = new Array(); {if isset($images)} {foreach from=$images item='image' name='f_defaultImages'} combinationImages[0][{$smarty.foreach.f_defaultImages.index}] = {$image.id_image}; {/foreach} {/if} // Translations var doesntExist = '{l s='The product does not exist in this model. Please choose another.' js=1}'; var doesntExistNoMore = '{l s='This product is no longer in stock' js=1}'; var doesntExistNoMoreBut = '{l s='with those attributes but is available with others' js=1}'; var uploading_in_progress = '{l s='Uploading in progress, please wait...' js=1}'; var fieldRequired = '{l s='Please fill in all required fields, then save the customization.' js=1}'; {if isset($groups)} // Combinations {foreach from=$combinations key=idCombination item=combination} addCombination({$idCombination|intval}, new Array({$combination.list}), {$combination.quantity}, {$combination.price}, {$combination.ecotax}, {$combination.id_image}, '{$combination.reference|addslashes}', {$combination.unit_impact}, {$combination.minimal_quantity}); {/foreach} // Colors {if $colors|@count > 0} {if $product->id_color_default}var id_color_default = {$product->id_color_default|intval};{/if} {/if} {/if} //]]> </script> {include file="$tpl_dir./breadcrumb.tpl"} <div id="primary_block" class="clearfix"> <h1>{$product->name|escape:'htmlall':'UTF-8'}</h1> {if isset($adminActionDisplay) && $adminActionDisplay} <div id="admin-action"> <p>{l s='This product is not visible to your customers.'} <input type="hidden" id="admin-action-product-id" value="{$product->id}" /> <input type="submit" value="{l s='Publish'}" class="exclusive" onclick="submitPublishProduct('{$base_dir}{$smarty.get.ad}', 0)"/> <input type="submit" value="{l s='Back'}" class="exclusive" onclick="submitPublishProduct('{$base_dir}{$smarty.get.ad}', 1)"/> </p> <div class="clear" ></div> <p id="admin-action-result"></p> </p> </div> {/if} {if isset($confirmation) && $confirmation} <p class="confirmation"> {$confirmation} </p> {/if} <!-- right infos--> <div id="pb-right-column"> <!-- product img--> <div id="image-block"> {if $have_image} <img src="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large')}" {if $jqZoomEnabled}class="jqzoom" alt="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'thickbox')}"{else} title="{$product->name|escape:'htmlall':'UTF-8'}" alt="{$product->name|escape:'htmlall':'UTF-8'}" {/if} id="bigpic" width="{$largeSize.width}" height="{$largeSize.height}" /> {else} <img src="{$img_prod_dir}{$lang_iso}-default-large.jpg" id="bigpic" alt="" title="{$cover.legend|escape:'htmlall':'UTF-8'}" width="{$largeSize.width}" height="{$largeSize.height}" /> {/if} </div> {if isset($images) && count($images) > 0} <!-- thumbnails --> <div id="views_block" {if isset($images) && count($images) < 2}class="hidden"{/if}> {if isset($images) && count($images) > 3}<span class="view_scroll_spacer"><a id="view_scroll_left" class="hidden" title="{l s='Other views'}" href="javascript:{ldelim}{rdelim}">{l s='Previous'}</a></span>{/if} <div id="thumbs_list"> <ul id="thumbs_list_frame"> {if isset($images)} {foreach from=$images item=image name=thumbnails} {assign var=imageIds value="`$product->id`-`$image.id_image`"} <li id="thumbnail_{$image.id_image}"> <a href="{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox')}" rel="other-views" class="thickbox {if (isset($image.cover) AND $image.cover == 1) OR (!isset($image.cover) AND $smarty.foreach.thumbnails.first)}shown{/if}" title="{$image.legend|htmlspecialchars}"> <img id="thumb_{$image.id_image}" src="{$link->getImageLink($product->link_rewrite, $imageIds, 'medium')}" alt="{$image.legend|htmlspecialchars}" height="{$mediumSize.height}" width="{$mediumSize.width}" /> </a> </li> {/foreach} {/if} </ul> </div> {if isset($images) && count($images) > 3}<a id="view_scroll_right" title="{l s='Other views'}" href="javascript:{ldelim}{rdelim}">{l s='Next'}</a>{/if} </div> {/if} {if isset($images) && count($images) > 1}<p class="align_center clear"><span id="wrapResetImages" style="display: none;"><img src="{$img_dir}icon/cancel_16x18.gif" alt="{l s='Cancel'}" width="16" height="18"/> <a id="resetImages" href="{$link->getProductLink($product)}" onclick="$('span#wrapResetImages').hide('slow');return (false);">{l s='Display all pictures'}</a></span></p>{/if} <!-- usefull links--> <ul id="usefull_link_block"> {if $HOOK_EXTRA_LEFT}{$HOOK_EXTRA_LEFT}{/if} <li><a href="javascript:print();">{l s='Print'}</a><br class="clear" /></li> {if $have_image && !$jqZoomEnabled} <li><span id="view_full_size" class="span_link">{l s='View full size'}</span></li> {/if} </ul> </div> <!-- left infos--> <div id="pb-left-column"> {if $product->description_short OR $packItems|@count > 0} <div id="short_description_block"> {if $product->description_short} <div id="short_description_content" class="rte align_justify">{$product->description_short}</div> {/if} {if $product->description} <p class="buttons_bottom_block"><a href="javascript:{ldelim}{rdelim}" class="button">{l s='More details'}</a></p> {/if} {if $packItems|@count > 0} <h3>{l s='Pack content'}</h3> {foreach from=$packItems item=packItem} <div class="pack_content"> {$packItem.pack_quantity} x <a href="{$link->getProductLink($packItem.id_product, $packItem.link_rewrite, $packItem.category)}">{$packItem.name|escape:'htmlall':'UTF-8'}</a> <p>{$packItem.description_short}</p> </div> {/foreach} {/if} </div> {/if} {if isset($colors) && $colors} <!-- colors --> <div id="color_picker"> <p>{l s='Pick a color:' js=1}</p> <div class="clear"></div> <ul id="color_to_pick_list"> {foreach from=$colors key='id_attribute' item='color'} <li><a id="color_{$id_attribute|intval}" class="color_pick" style="background: {$color.value};" onclick="updateColorSelect({$id_attribute|intval});$('#wrapResetImages').show('slow');" title="{$color.name}">{if file_exists($col_img_dir|cat:$id_attribute|cat:'.jpg')}<img src="{$img_col_dir}{$id_attribute}.jpg" alt="{$color.name}" width="20" height="20" />{/if}</a></li> {/foreach} </ul> <div class="clear"></div> </div> {/if} {if ($product->show_price AND !isset($restricted_country_mode)) OR isset($groups) OR $product->reference OR (isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS)} <!-- add to cart form--> <form id="buy_block" {if $PS_CATALOG_MODE AND !isset($groups) AND $product->quantity > 0}class="hidden"{/if} action="{$link->getPageLink('cart.php')}" method="post"> <!-- hidden datas --> <p class="hidden"> <input type="hidden" name="token" value="{$static_token}" /> <input type="hidden" name="id_product" value="{$product->id|intval}" id="product_page_product_id" /> <input type="hidden" name="add" value="1" /> <input type="hidden" name="id_product_attribute" id="idCombination" value="" /> </p> <!-- prices --> {if $product->show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE} <p class="price"> {if !$priceDisplay || $priceDisplay == 2} {assign var='productPrice' value=$product->getPrice(true, $smarty.const.NULL, 2)} {assign var='productPriceWithoutRedution' value=$product->getPriceWithoutReduct(false, $smarty.const.NULL)} {elseif $priceDisplay == 1} {assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL, 2)} {assign var='productPriceWithoutRedution' value=$product->getPriceWithoutReduct(true, $smarty.const.NULL)} {/if} {if $product->on_sale} <img src="{$img_dir}onsale_{$lang_iso}.gif" alt="{l s='On sale'}" class="on_sale_img"/> <span class="on_sale">{l s='On sale!'}</span> {elseif $product->specificPrice AND $product->specificPrice.reduction AND $productPriceWithoutRedution > $productPrice} <span class="discount">{l s='Reduced price!'}</span> {/if} <br /> <span class="our_price_display"> {if $priceDisplay >= 0 && $priceDisplay <= 2} <span id="our_price_display">{convertPrice price=$productPrice}</span> {if $tax_enabled && ((isset($display_tax_label) && $display_tax_label == 1) OR !isset($display_tax_label))} {if $priceDisplay == 1}{l s='tax excl.'}{else}{l s='tax incl.'}{/if} {/if} {/if} </span> {if $priceDisplay == 2} <br /> <span id="pretaxe_price"><span id="pretaxe_price_display">{convertPrice price=$product->getPrice(false, $smarty.const.NULL, 2)}</span> {l s='tax excl.'}</span> {/if} <br /> </p> {if $product->specificPrice AND $product->specificPrice.reduction} <p id="old_price"><span class="bold"> {if $priceDisplay >= 0 && $priceDisplay <= 2} {if $productPriceWithoutRedution > $productPrice} <span id="old_price_display">{convertPrice price=$productPriceWithoutRedution}</span> {if $tax_enabled && $display_tax_label == 1} {if $priceDisplay == 1}{l s='tax excl.'}{else}{l s='tax incl.'}{/if} {/if} {/if} {/if} </span> </p> {/if} {if $product->specificPrice AND $product->specificPrice.reduction_type == 'percentage'} <p id="reduction_percent">{l s='(price reduced by'} <span id="reduction_percent_display">{$product->specificPrice.reduction*100}</span> %{l s=')'}</p> {/if} {if $packItems|@count} <p class="pack_price">{l s='instead of'} <span style="text-decoration: line-through;">{convertPrice price=$product->getNoPackPrice()}</span></p> <br class="clear" /> {/if} {if $product->ecotax != 0} <p class="price-ecotax">{l s='include'} <span id="ecotax_price_display">{if $priceDisplay == 2}{$ecotax_tax_exc|convertAndFormatPrice}{else}{$ecotax_tax_inc|convertAndFormatPrice}{/if}</span> {l s='for green tax'} {if $product->specificPrice AND $product->specificPrice.reduction} <br />{l s='(not impacted by the discount)'} {/if} </p> {/if} {if !empty($product->unity) && $product->unit_price_ratio > 0.000000} {math equation="pprice / punit_price" pprice=$productPrice punit_price=$product->unit_price_ratio assign=unit_price} <p class="unit-price"><span id="unit_price_display">{convertPrice price=$unit_price}</span> {l s='per'} {$product->unity|escape:'htmlall':'UTF-8'}</p> {/if} {*close if for show price*} {/if} {if isset($groups)} <!-- attributes --> <div id="attributes"> {foreach from=$groups key=id_attribute_group item=group} {if $group.attributes|@count} <p> <label for="group_{$id_attribute_group|intval}">{$group.name|escape:'htmlall':'UTF-8'} :</label> {assign var="groupName" value="group_$id_attribute_group"} <select name="{$groupName}" id="group_{$id_attribute_group|intval}" onchange="javascript:findCombination();{if $colors|@count > 0}$('#wrapResetImages').show('slow');{/if};"> {foreach from=$group.attributes key=id_attribute item=group_attribute} <option value="{$id_attribute|intval}"{if (isset($smarty.get.$groupName) && $smarty.get.$groupName|intval == $id_attribute) || $group.default == $id_attribute} selected="selected"{/if} title="{$group_attribute|escape:'htmlall':'UTF-8'}">{$group_attribute|escape:'htmlall':'UTF-8'}</option> {/foreach} </select> </p> {/if} {/foreach} </div> {/if} <p id="product_reference" {if isset($groups) OR !$product->reference}style="display: none;"{/if}><label for="product_reference">{l s='Reference :'} </label><span class="editable">{$product->reference|escape:'htmlall':'UTF-8'}</span></p> <!-- quantity wanted --> <p id="quantity_wanted_p"{if (!$allow_oosp && $product->quantity <= 0) OR $virtual OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}> <label>{l s='Quantity :'}</label> <input type="text" name="qty" id="quantity_wanted" class="text" value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}{if $product->minimal_quantity > 1}{$product->minimal_quantity}{else}1{/if}{/if}" size="2" maxlength="3" {if $product->minimal_quantity > 1}onkeyup="checkMinimalQuantity({$product->minimal_quantity});"{/if} /> </p> <!-- minimal quantity wanted --> <p id="minimal_quantity_wanted_p"{if $product->minimal_quantity <= 1 OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}>{l s='You must add '} <b id="minimal_quantity_label">{$product->minimal_quantity}</b> {l s=' as a minimum quantity to buy this product.'}</p> {if $product->minimal_quantity > 1} <script type="text/javascript"> checkMinimalQuantity(); </script> {/if} <!-- availability --> <p id="availability_statut"{if ($product->quantity <= 0 && !$product->available_later && $allow_oosp) OR ($product->quantity > 0 && !$product->available_now) OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}> <span id="availability_label">{l s='Availability:'}</span> <span id="availability_value"{if $product->quantity <= 0} class="warning_inline"{/if}> {if $product->quantity <= 0}{if $allow_oosp}{$product->available_later}{else}{l s='This product is no longer in stock'}{/if}{else}{$product->available_now}{/if} </span> </p> <!-- number of item in stock --> {if ($display_qties == 1 && !$PS_CATALOG_MODE && $product->available_for_order)} <p id="pQuantityAvailable"{if $product->quantity <= 0} style="display: none;"{/if}> <span id="quantityAvailable">{$product->quantity|intval}</span> <span {if $product->quantity > 1} style="display: none;"{/if} id="quantityAvailableTxt">{l s='item in stock'}</span> <span {if $product->quantity == 1} style="display: none;"{/if} id="quantityAvailableTxtMultiple">{l s='items in stock'}</span> </p> {/if} <!-- Out of stock hook --> {if !$allow_oosp} <p id="oosHook"{if $product->quantity > 0} style="display: none;"{/if}> {$HOOK_PRODUCT_OOS} </p> {/if} <p class="warning_inline" id="last_quantities"{if ($product->quantity > $last_qties OR $product->quantity <= 0) OR $allow_oosp OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if} >{l s='Warning: Last items in stock!'}</p> {if $product->online_only} <p>{l s='Online only'}</p> {/if} <p{if (!$allow_oosp && $product->quantity <= 0) OR !$product->available_for_order OR (isset($restricted_country_mode) AND $restricted_country_mode) OR $PS_CATALOG_MODE} style="display: none;"{/if} id="add_to_cart" class="buttons_bottom_block"><input type="submit" name="Submit" value="{l s='Add to cart'}" class="exclusive" /></p> {if isset($HOOK_PRODUCT_ACTIONS) && $HOOK_PRODUCT_ACTIONS}{$HOOK_PRODUCT_ACTIONS}{/if} <div class="clear"></div> </form> {/if} {if $HOOK_EXTRA_RIGHT}{$HOOK_EXTRA_RIGHT}{/if} </div> </div> {if $quantity_discounts} <!-- quantity discount --> <ul class="idTabs"> <li><a style="cursor: pointer" class="selected">{l s='Quantity discount'}</a></li> </ul> <div id="quantityDiscount"> <table class="std"> <tr> {foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'} <th>{$quantity_discount.quantity|intval} {if $quantity_discount.quantity|intval > 1} {l s='quantities'} {else} {l s='quantity'} {/if} </th> {/foreach} </tr> <tr> {foreach from=$quantity_discounts item='quantity_discount' name='quantity_discounts'} <td> {if $quantity_discount.price != 0 OR $quantity_discount.reduction_type == 'amount'} -{convertPrice price=$quantity_discount.real_value|floatval} {else} -{$quantity_discount.real_value|floatval}% {/if} </td> {/foreach} </tr> </table> </div> {/if} {$HOOK_PRODUCT_FOOTER} <!-- description and features --> {if $product->description || $features || $accessories || $HOOK_PRODUCT_TAB || $attachments} <div id="more_info_block" class="clear"> <ul id="more_info_tabs" class="idTabs idTabsShort"> {if $product->description}<li><a id="more_info_tab_more_info" href="#idTab1">{l s='More info'}</a></li>{/if} {if $features}<li><a id="more_info_tab_data_sheet" href="#idTab2">{l s='Data sheet'}</a></li>{/if} {if $attachments}<li><a id="more_info_tab_attachments" href="#idTab9">{l s='Download'}</a></li>{/if} {if isset($accessories) AND $accessories}<li><a href="#idTab4">{l s='Accessories'}</a></li>{/if} {$HOOK_PRODUCT_TAB} </ul> <div id="more_info_sheets" class="sheets align_justify"> {if $product->description} <!-- full description --> <div id="idTab1" class="rte">{$product->description}</div> {/if} {if $features} <!-- product's features --> <ul id="idTab2" class="bullet"> {foreach from=$features item=feature} <li><span>{$feature.name|escape:'htmlall':'UTF-8'}</span> {$feature.value|escape:'htmlall':'UTF-8'}</li> {/foreach} </ul> {/if} {if $attachments} <ul id="idTab9" class="bullet"> {foreach from=$attachments item=attachment} <li><a href="{$link->getPageLink('attachment.php', true)}?id_attachment={$attachment.id_attachment}">{$attachment.name|escape:'htmlall':'UTF-8'}</a><br />{$attachment.description|escape:'htmlall':'UTF-8'}</li> {/foreach} </ul> {/if} {if isset($accessories) AND $accessories} <!-- accessories --> <ul id="idTab4" class="bullet"> <div class="block products_block accessories_block clearfix"> <div class="block_content"> <ul> {foreach from=$accessories item=accessory name=accessories_list} {assign var='accessoryLink' value=$link->getProductLink($accessory.id_product, $accessory.link_rewrite, $accessory.category)} <li class="ajax_block_product {if $smarty.foreach.accessories_list.first}first_item{elseif $smarty.foreach.accessories_list.last}last_item{else}item{/if} product_accessories_description"> <h5><a href="{$accessoryLink|escape:'htmlall':'UTF-8'}">{$accessory.name|truncate:22:'...':true|escape:'htmlall':'UTF-8'}</a></h5> <div class="product_desc"> <a href="{$accessoryLink|escape:'htmlall':'UTF-8'}" title="{$accessory.legend|escape:'htmlall':'UTF-8'}" class="product_image"><img src="{$link->getImageLink($accessory.link_rewrite, $accessory.id_image, 'medium')}" alt="{$accessory.legend|escape:'htmlall':'UTF-8'}" width="{$mediumSize.width}" height="{$mediumSize.height}" /></a> <a href="{$accessoryLink|escape:'htmlall':'UTF-8'}" title="{l s='More'}" class="product_description">{$accessory.description_short|strip_tags|truncate:70:'...'}</a> </div> <p class="product_accessories_price"> {if $accessory.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}<span class="price">{if $priceDisplay != 1}{displayWtPrice p=$accessory.price}{else}{displayWtPrice p=$accessory.price_tax_exc}{/if}</span>{/if} <a class="button" href="{$accessoryLink|escape:'htmlall':'UTF-8'}" title="{l s='View'}">{l s='View'}</a> {if ($accessory.allow_oosp || $accessory.quantity > 0) AND $accessory.available_for_order AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE} <a class="exclusive button ajax_add_to_cart_button" href="{$link->getPageLink('cart.php')}?qty=1&id_product={$accessory.id_product|intval}&token={$static_token}&add" rel="ajax_id_product_{$accessory.id_product|intval}" title="{l s='Add to cart'}">{l s='Add to cart'}</a> {else} <span class="exclusive">{l s='Add to cart'}</span> <span class="availability">{if (isset($accessory.quantity_all_versions) && $accessory.quantity_all_versions > 0)}{l s='Product available with different options'}{else}{l s='Out of stock'}{/if}</span> {/if} </p> </li> {/foreach} </ul> </div> </div> </ul> {/if} {$HOOK_PRODUCT_TAB_CONTENT} </div> </div> {/if} <!-- Customizable products --> {if $product->customizable} <ul class="idTabs"> <li><a style="cursor: pointer">{l s='Product customization'}</a></li> </ul> <div class="customization_block"> <form method="post" action="{$customizationFormTarget}" enctype="multipart/form-data" id="customizationForm"> <p> <img src="{$img_dir}icon/infos.gif" alt="Informations" /> {l s='After saving your customized product, remember to add it to your cart.'} {if $product->uploadable_files}<br />{l s='Allowed file formats are: GIF, JPG, PNG'}{/if} </p> {if $product->uploadable_files|intval} <h2>{l s='Pictures'}</h2> <ul id="uploadable_files"> {counter start=0 assign='customizationField'} {foreach from=$customizationFields item='field' name='customizationFields'} {if $field.type == 0} <li class="customizationUploadLine{if $field.required} required{/if}">{assign var='key' value='pictures_'|cat:$product->id|cat:'_'|cat:$field.id_customization_field} {if isset($pictures.$key)}<div class="customizationUploadBrowse"> <img src="{$pic_dir}{$pictures.$key}_small" alt="" /> <a href="{$link->getProductDeletePictureLink($product, $field.id_customization_field)}" title="{l s='Delete'}" > <img src="{$img_dir}icon/delete.gif" alt="{l s='Delete'}" class="customization_delete_icon" width="11" height="13" /> </a> </div>{/if} <div class="customizationUploadBrowse"><input type="file" name="file{$field.id_customization_field}" id="img{$customizationField}" class="customization_block_input {if isset($pictures.$key)}filled{/if}" />{if $field.required}<sup>*</sup>{/if} <div class="customizationUploadBrowseDescription">{if !empty($field.name)}{$field.name}{else}{l s='Please select an image file from your hard drive'}{/if}</div></div> </li> {counter} {/if} {/foreach} </ul> {/if} <div class="clear"></div> {if $product->text_fields|intval} <h2>{l s='Texts'}</h2> <ul id="text_fields"> {counter start=0 assign='customizationField'} {foreach from=$customizationFields item='field' name='customizationFields'} {if $field.type == 1} <li class="customizationUploadLine{if $field.required} required{/if}">{assign var='key' value='textFields_'|cat:$product->id|cat:'_'|cat:$field.id_customization_field} {if !empty($field.name)}{$field.name}{/if}{if $field.required}<sup>*</sup>{/if}<textarea type="text" name="textField{$field.id_customization_field}" id="textField{$customizationField}" rows="1" cols="40" class="customization_block_input" />{if isset($textFields.$key)}{$textFields.$key|stripslashes}{/if}</textarea> </li> {counter} {/if} {/foreach} </ul> {/if} <p style="clear: left;" id="customizedDatas"> <input type="hidden" name="ipa_customization" id="ipa_customization" value="{$ipa_customization}" /> <input type="hidden" name="quantityBackup" id="quantityBackup" value="" /> <input type="hidden" name="submitCustomizedDatas" value="1" /> <input type="button" class="button" value="{l s='Save'}" onclick="javascript:saveCustomization()" /> <span id="ajax-loader" style="display:none"><img src="{$img_ps_dir}loader.gif" alt="loader" /></span> </p> </form> <p class="clear required"><sup>*</sup> {l s='required fields'}</p> </div> {/if} {if $packItems|@count > 0} <div> <h2>{l s='Pack content'}</h2> {include file="$tpl_dir./product-list.tpl" products=$packItems} </div> {/if} {/if}
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More