Jump to content

marissa_bari

Members
  • Posts

    10
  • Joined

  • Last visited

Profile Information

  • Location
    Andria
  • Activity
    Other

marissa_bari's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. thanks for the reply! However, I want to ask anyway as being able to integrate the last step is a brief summary of where the customer is going to buy. Is it possible?
  2. hello, I have extreme need your help; in the final stage of the order, after you choose the payment method, I get the "summary order" with the chosen payment note. There is a second string, or "here is a quick summary of the order," but then it is all white, nothing appears! See the picture attached. How can I review the products purchased? which file should I change and where? I hope you answer me soon. thanks
  3. CIAO RAGAZZI, POTETE AIUTARMI? AL 4 STEP DELL'ORDINE MI COMPARE LA SCRITTA: Ecco un breve riepilogo del tuo ordine: ma poi tutto bianco sotto ancora esce l'ammontare dell'importo etc etc come faccio a far comparire il riepilogo appunto? guardando un pò sul web ho trovato questa solutione ma non so dove inserire il codice risolutivo.... questo è il codice in ordercontroller.php <?php /* * 2007-2011 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.or...ses/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-2011 PrestaShop SA * @version Release: $Revision: 6823 $ * @license http://opensource.or...ses/osl-3.0.php Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA */ ControllerFactory::includeController('ParentOrderController'); class OrderControllerCore extends ParentOrderController { public $step; public function init() { parent::init(); $this->step = (int)(Tools::getValue('step')); if (!$this->nbProducts) $this->step = -1; } public function preProcess() { global $isVirtualCart, $orderTotal; parent::preProcess(); /* If some products have disappear */ if (!self::$cart->checkQuantities()) { $this->step = 0; $this->errors[] = Tools::displayError('An item in your cart is no longer available for this quantity, you cannot proceed with your order.'); } /* Check minimal amount */ $currency = Currency::getCurrency((int)self::$cart->id_currency); $orderTotal = self::$cart->getOrderTotal(); $minimalPurchase = Tools::convertPrice((float)Configuration::get('PS_PURCHASE_MINIMUM'), $currency); if (self::$cart->getOrderTotal(false) < $minimalPurchase && $this->step != -1) { $this->step = 0; $this->errors[] = Tools::displayError('A minimum purchase total of').' '.Tools::displayPrice($minimalPurchase, $currency). ' '.Tools::displayError('is required in order to validate your order.'); } if (!self::$cookie->isLogged(true) AND in_array($this->step, array(1, 2, 3))) Tools::redirect('authentication.php?back='.urlencode('order.php?step='.$this->step)); if ($this->nbProducts) self::$smarty->assign('virtual_cart', $isVirtualCart); } public function displayHeader() { if (!Tools::getValue('ajax')) parent::displayHeader(); } public function process() { parent::process(); /* 4 steps to the order */ switch ((int)$this->step) { case -1; self::$smarty->assign('empty', 1); break; case 1: $this->_assignAddress(); break; case 2: if(Tools::isSubmit('processAddress')) $this->processAddress(); $this->autoStep(); $this->_assignCarrier(); break; case 3: //Test that the conditions (so active) were accepted by the customer $cgv = Tools::getValue('cgv'); if (Configuration::get('PS_CONDITIONS') AND (!Validate::isBool($cgv))) Tools::redirect('order.php?step=2'); if(Tools::isSubmit('processCarrier')) $this->processCarrier(); $this->autoStep(); /* Bypass payment step if total is 0 */ if (($id_order = $this->_checkFreeOrder()) AND $id_order) { if (self::$cookie->is_guest) { $email = self::$cookie->email; self::$cookie->logout(); // If guest we clear the cookie for security reason Tools::redirect('guest-tracking.php?id_order='.(int)$id_order.'&email='.urlencode($email)); } else Tools::redirect('history.php'); } $this->_assignPayment(); break; default: $this->_assignSummaryInformations(); break; } } private function processAddressFormat() { $addressDelivery = new Address((int)(self::$cart->id_address_delivery)); $addressInvoice = new Address((int)(self::$cart->id_address_invoice)); $invoiceAddressFields = AddressFormat::getOrderedAddressFields($addressInvoice->id_country); $deliveryAddressFields = AddressFormat::getOrderedAddressFields($addressDelivery->id_country); self::$smarty->assign(array( 'inv_adr_fields' => $invoiceAddressFields, 'dlv_adr_fields' => $deliveryAddressFields)); } public function displayContent() { global $currency; parent::displayContent(); self::$smarty->assign(array( 'currencySign' => $currency->sign, 'currencyRate' => $currency->conversion_rate, 'currencyFormat' => $currency->format, 'currencyBlank' => $currency->blank, )); switch ((int)$this->step) { case -1: self::$smarty->display(_PS_THEME_DIR_.'shopping-cart.tpl'); break; case 1: $this->processAddressFormat(); self::$smarty->display(_PS_THEME_DIR_.'order-address.tpl'); break; case 2: self::$smarty->display(_PS_THEME_DIR_.'order-carrier.tpl'); break; case 3: self::$smarty->display(_PS_THEME_DIR_.'order-payment.tpl'); break; default: self::$smarty->display(_PS_THEME_DIR_.'shopping-cart.tpl'); break; } } public function displayFooter() { if (!Tools::getValue('ajax')) parent::displayFooter(); } /* Order process controller */ public function autoStep() { global $isVirtualCart; if ($this->step >= 2 AND (!self::$cart->id_address_delivery OR !self::$cart->id_address_invoice)) Tools::redirect('order.php?step=1'); $delivery = new Address((int)(self::$cart->id_address_delivery)); $invoice = new Address((int)(self::$cart->id_address_invoice)); if ($delivery->deleted OR $invoice->deleted) { if ($delivery->deleted) unset(self::$cart->id_address_delivery); if ($invoice->deleted) unset(self::$cart->id_address_invoice); Tools::redirect('order.php?step=1'); } elseif ($this->step >= 3 AND !self::$cart->id_carrier AND !$isVirtualCart) Tools::redirect('order.php?step=2'); } /* * Manage address */ public function processAddress() { if (!Tools::isSubmit('id_address_delivery') OR !Address::isCountryActiveById((int)Tools::getValue('id_address_delivery'))) $this->errors[] = Tools::displayError('This address is not in a valid area.'); else { self::$cart->id_address_delivery = (int)(Tools::getValue('id_address_delivery')); self::$cart->id_address_invoice = Tools::isSubmit('same') ? self::$cart->id_address_delivery : (int)(Tools::getValue('id_address_invoice')); if (!self::$cart->update()) $this->errors[] = Tools::displayError('An error occurred while updating your cart.'); if (Tools::isSubmit('message')) $this->_updateMessage(Tools::getValue('message')); } if (sizeof($this->errors)) { if (Tools::getValue('ajax')) die('{"hasError" : true, "errors" : ["'.implode('\',\'', $this->errors).'"]}'); $this->step = 1; } if (Tools::getValue('ajax')) die(true); } /* Carrier step */ protected function processCarrier() { global $orderTotal; parent::_processCarrier(); if (sizeof($this->errors)) { self::$smarty->assign('errors', $this->errors); $this->_assignCarrier(); $this->step = 2; $this->displayContent(); include(dirname(__FILE__).'/../footer.php'); exit; } $orderTotal = self::$cart->getOrderTotal(); } /* Address step */ protected function _assignAddress() { parent::_assignAddress(); self::$smarty->assign('cart', self::$cart); if (self::$cookie->is_guest) Tools::redirect('order.php?step=2'); } /* Carrier step */ protected function _assignCarrier() { global $defaultCountry; if (isset(self::$cookie->id_customer)) $customer = new Customer((int)(self::$cookie->id_customer)); else die(Tools::displayError('Fatal error: No customer')); // Assign carrier parent::_assignCarrier(); // Assign wrapping and TOS $this->_assignWrappingAndTOS(); self::$smarty->assign('is_guest' ,(isset(self::$cookie->is_guest) ? self::$cookie->is_guest : 0)); } /* Payment step */ protected function _assignPayment() { global $orderTotal; // Redirect instead of displaying payment modules if any module are grefted on Hook::backBeforePayment('order.php?step=3'); /* We may need to display an order summary */ self::$smarty->assign(self::$cart->getSummaryDetails()); self::$smarty->assign(array( 'total_price' => (float)($orderTotal), 'taxes_enabled' => (int)(Configuration::get('PS_TAX')) )); self::$cookie->checkedTOS = '1'; parent::_assignPayment(); } } dovrei aggiungere questo, dove? ($this->_assignSummaryInformations() questo è il link con la soluzione di vekia: http://www.prestashop.com/forums/topic/357264-solved-show-cart-summary-in-all-checkout-steps/?hl=show+summary+order&do=findComment&comment=1818975
  4. Hello vekia, can u help me? this is code of ordercontroller.php <?php /* * 2007-2011 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-2011 PrestaShop SA * @version Release: $Revision: 6823 $ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA */ ControllerFactory::includeController('ParentOrderController'); class OrderControllerCore extends ParentOrderController { public $step; public function init() { parent::init(); $this->step = (int)(Tools::getValue('step')); if (!$this->nbProducts) $this->step = -1; } public function preProcess() { global $isVirtualCart, $orderTotal; parent::preProcess(); /* If some products have disappear */ if (!self::$cart->checkQuantities()) { $this->step = 0; $this->errors[] = Tools::displayError('An item in your cart is no longer available for this quantity, you cannot proceed with your order.'); } /* Check minimal amount */ $currency = Currency::getCurrency((int)self::$cart->id_currency); $orderTotal = self::$cart->getOrderTotal(); $minimalPurchase = Tools::convertPrice((float)Configuration::get('PS_PURCHASE_MINIMUM'), $currency); if (self::$cart->getOrderTotal(false) < $minimalPurchase && $this->step != -1) { $this->step = 0; $this->errors[] = Tools::displayError('A minimum purchase total of').' '.Tools::displayPrice($minimalPurchase, $currency). ' '.Tools::displayError('is required in order to validate your order.'); } if (!self::$cookie->isLogged(true) AND in_array($this->step, array(1, 2, 3))) Tools::redirect('authentication.php?back='.urlencode('order.php?step='.$this->step)); if ($this->nbProducts) self::$smarty->assign('virtual_cart', $isVirtualCart); } public function displayHeader() { if (!Tools::getValue('ajax')) parent::displayHeader(); } public function process() { parent::process(); /* 4 steps to the order */ switch ((int)$this->step) { case -1; self::$smarty->assign('empty', 1); break; case 1: $this->_assignAddress(); break; case 2: if(Tools::isSubmit('processAddress')) $this->processAddress(); $this->autoStep(); $this->_assignCarrier(); break; case 3: //Test that the conditions (so active) were accepted by the customer $cgv = Tools::getValue('cgv'); if (Configuration::get('PS_CONDITIONS') AND (!Validate::isBool($cgv))) Tools::redirect('order.php?step=2'); if(Tools::isSubmit('processCarrier')) $this->processCarrier(); $this->autoStep(); /* Bypass payment step if total is 0 */ if (($id_order = $this->_checkFreeOrder()) AND $id_order) { if (self::$cookie->is_guest) { $email = self::$cookie->email; self::$cookie->logout(); // If guest we clear the cookie for security reason Tools::redirect('guest-tracking.php?id_order='.(int)$id_order.'&email='.urlencode($email)); } else Tools::redirect('history.php'); } $this->_assignPayment(); break; default: $this->_assignSummaryInformations(); break; } } private function processAddressFormat() { $addressDelivery = new Address((int)(self::$cart->id_address_delivery)); $addressInvoice = new Address((int)(self::$cart->id_address_invoice)); $invoiceAddressFields = AddressFormat::getOrderedAddressFields($addressInvoice->id_country); $deliveryAddressFields = AddressFormat::getOrderedAddressFields($addressDelivery->id_country); self::$smarty->assign(array( 'inv_adr_fields' => $invoiceAddressFields, 'dlv_adr_fields' => $deliveryAddressFields)); } public function displayContent() { global $currency; parent::displayContent(); self::$smarty->assign(array( 'currencySign' => $currency->sign, 'currencyRate' => $currency->conversion_rate, 'currencyFormat' => $currency->format, 'currencyBlank' => $currency->blank, )); switch ((int)$this->step) { case -1: self::$smarty->display(_PS_THEME_DIR_.'shopping-cart.tpl'); break; case 1: $this->processAddressFormat(); self::$smarty->display(_PS_THEME_DIR_.'order-address.tpl'); break; case 2: self::$smarty->display(_PS_THEME_DIR_.'order-carrier.tpl'); break; case 3: self::$smarty->display(_PS_THEME_DIR_.'order-payment.tpl'); break; default: self::$smarty->display(_PS_THEME_DIR_.'shopping-cart.tpl'); break; } } public function displayFooter() { if (!Tools::getValue('ajax')) parent::displayFooter(); } /* Order process controller */ public function autoStep() { global $isVirtualCart; if ($this->step >= 2 AND (!self::$cart->id_address_delivery OR !self::$cart->id_address_invoice)) Tools::redirect('order.php?step=1'); $delivery = new Address((int)(self::$cart->id_address_delivery)); $invoice = new Address((int)(self::$cart->id_address_invoice)); if ($delivery->deleted OR $invoice->deleted) { if ($delivery->deleted) unset(self::$cart->id_address_delivery); if ($invoice->deleted) unset(self::$cart->id_address_invoice); Tools::redirect('order.php?step=1'); } elseif ($this->step >= 3 AND !self::$cart->id_carrier AND !$isVirtualCart) Tools::redirect('order.php?step=2'); } /* * Manage address */ public function processAddress() { if (!Tools::isSubmit('id_address_delivery') OR !Address::isCountryActiveById((int)Tools::getValue('id_address_delivery'))) $this->errors[] = Tools::displayError('This address is not in a valid area.'); else { self::$cart->id_address_delivery = (int)(Tools::getValue('id_address_delivery')); self::$cart->id_address_invoice = Tools::isSubmit('same') ? self::$cart->id_address_delivery : (int)(Tools::getValue('id_address_invoice')); if (!self::$cart->update()) $this->errors[] = Tools::displayError('An error occurred while updating your cart.'); if (Tools::isSubmit('message')) $this->_updateMessage(Tools::getValue('message')); } if (sizeof($this->errors)) { if (Tools::getValue('ajax')) die('{"hasError" : true, "errors" : ["'.implode('\',\'', $this->errors).'"]}'); $this->step = 1; } if (Tools::getValue('ajax')) die(true); } /* Carrier step */ protected function processCarrier() { global $orderTotal; parent::_processCarrier(); if (sizeof($this->errors)) { self::$smarty->assign('errors', $this->errors); $this->_assignCarrier(); $this->step = 2; $this->displayContent(); include(dirname(__FILE__).'/../footer.php'); exit; } $orderTotal = self::$cart->getOrderTotal(); } /* Address step */ protected function _assignAddress() { parent::_assignAddress(); self::$smarty->assign('cart', self::$cart); if (self::$cookie->is_guest) Tools::redirect('order.php?step=2'); } /* Carrier step */ protected function _assignCarrier() { global $defaultCountry; if (isset(self::$cookie->id_customer)) $customer = new Customer((int)(self::$cookie->id_customer)); else die(Tools::displayError('Fatal error: No customer')); // Assign carrier parent::_assignCarrier(); // Assign wrapping and TOS $this->_assignWrappingAndTOS(); self::$smarty->assign('is_guest' ,(isset(self::$cookie->is_guest) ? self::$cookie->is_guest : 0)); } /* Payment step */ protected function _assignPayment() { global $orderTotal; // Redirect instead of displaying payment modules if any module are grefted on Hook::backBeforePayment('order.php?step=3'); /* We may need to display an order summary */ self::$smarty->assign(self::$cart->getSummaryDetails()); self::$smarty->assign(array( 'total_price' => (float)($orderTotal), 'taxes_enabled' => (int)(Configuration::get('PS_TAX')) )); self::$cookie->checkedTOS = '1'; parent::_assignPayment(); } } where i enter your suggestion? ($this->_assignSummaryInformations() help me please?
  5. grazie ragazzi! in realtà bastava rinominarlo nel back end nelle impostazioni seo url! da sitemap (veniva reindirizzato al sitemap xml) adesso è mappa del sito =)
  6. salve, ho un problema nella piattaforma prestashop 1.4.3; ho spuntato la riscrittura degli URL in "generatori", il sito pare funzioni tutto bene ad esclusione del file sitemap che in pratica compare in formato xml. come posso fare? grazie!
  7. salve, ho un problema nella piattaforma prestashop 1.4.3; ho spuntato la riscrittura degli URL in "generatori", il sito pare funzioni tutto bene ad esclusione del file sitemap che in pratica compare in formato xml. come posso fare? grazie!
  8. Gentilissimi, ho scaricato ed installato one all social per ps 1.4, una volta configurato nel back office e salvate le modifiche (non si vede nessuna spunta verde) il modulo nn "parte" non funziona. inoltre,nn verifa ne le porte ne le api key! come posso fare? un 'altra cosa... vorrei creare un modulo d'ordini scrivibile on line ed inserirlo in una pagina cms... come si fa?
  9. Salve ragazzi, aiuto ho urgente bisogno di voi! Premetto che: non sono praticissima in questa materia, uso un tema diverso da quello di defaul ho modificato alcuni file .tpl caricandoli con FTP e forzando la compilazione tutto funzione e qui l'inghippo: modifico il file global.css provo a caricarlo (anche forzando la compilazione smarty) ma non accade assolutamente nulla! perchè? aiuto...... grazie infinite!!
×
×
  • Create New...