Jump to content

Dejv

Members
  • Posts

    7
  • Joined

  • Last visited

About Dejv

  • Birthday 08/29/1989

Profile Information

  • Activity
    Developer

Recent Profile Visitors

2,861,597 profile views

Dejv's Achievements

Newbie

Newbie (1/14)

2

Reputation

  1. I used your solution and it worked, so thanks for this work around Specifically, I did the following (PS 1.5.6): 1. Copy file controllers/front/OrderOpcController.php to dir override/controllers/front/ 2. Open copied file and change line class OrderOpcControllerCore extends ParentOrderController to class OrderOpcController extends OrderOpcControllerCore 3. Delete all content of this class except method _getPaymentMethods() 4. Inside this _getPaymentMethods() method, comment out these conditions: if (!$this->isLogged) return '<p class="warning">'.Tools::displayError('Please sign in to see payment methods.').'</p>'; if ($this->context->cart->OrderExists()) return '<p class="warning">'.Tools::displayError('Error: This order has already been validated.').'</p>'; if (!$this->context->cart->id_customer || !Customer::customerIdExistsStatic($this->context->cart->id_customer) || Customer::isBanned($this->context->cart->id_customer)) return '<p class="warning">'.Tools::displayError('Error: No customer.').'</p>'; $address_delivery = new Address($this->context->cart->id_address_delivery); $address_invoice = ($this->context->cart->id_address_delivery == $this->context->cart->id_address_invoice ? $address_delivery : new Address($this->context->cart->id_address_invoice)); if (!$this->context->cart->id_address_delivery || !$this->context->cart->id_address_invoice || !Validate::isLoadedObject($address_delivery) || !Validate::isLoadedObject($address_invoice) || $address_invoice->deleted || $address_delivery->deleted) return '<p class="warning">'.Tools::displayError('Error: Please select an address.').'</p>'; if (count($this->context->cart->getDeliveryOptionList()) == 0 && !$this->context->cart->isVirtualCart()) { if ($this->context->cart->isMultiAddressDelivery()) return '<p class="warning">'.Tools::displayError('Error: None of your chosen carriers deliver to some of the addresses you\'ve selected.').'</p>'; else return '<p class="warning">'.Tools::displayError('Error: None of your chosen carriers deliver to the address you\'ve selected.').'</p>'; } if (!$this->context->cart->getDeliveryOption(null, false) && !$this->context->cart->isVirtualCart()) return '<p class="warning">'.Tools::displayError('Error: Please choose a carrier.').'</p>'; if (!$this->context->cart->id_currency) return '<p class="warning">'.Tools::displayError('Error: No currency has been selected.').'</p>'; 5. Delete file cache/class_index.php (PS will regenerate it for you - this is for override to take effect) 6. You are done
  2. If you want to see payment methods without sign in, you need to edit controllers/front/OrderOpcController.php:431 (PS 1.5.4.1). (You can easilly use overrides to do this) Here you want to better handle condition: if (!$this->isLogged) return '<p class="warning">'.Tools::displayError('Please sign in to see payment methods.').'</p>'; I changed mine to: if (!$this->isLogged){ if ($this->context->cart->OrderExists()) return '<p class="warning">'.Tools::displayError('Error: This order has already been validated.').'</p>'; if (!$this->context->cart->checkQuantities()) return '<p class="warning">'.Tools::displayError('An item in your cart is no longer available. You cannot proceed with your order.').'</p>'; $return = Hook::exec('displayPayment').'<p class="warning">'.Tools::displayError('Please sign in to see payment methods.').'</p>'; if (!$return) return '<p class="warning">'.Tools::displayError('No payment method is available for use at this time. ').'</p>'; }else{ I know this is horrible solution, but at least it's a solution.
  3. There is the same question, but for older version of PS. File structure completely changed since then. Even though I hope this helps. http://www.prestashop.com/forums/index.php?/topic/112752-solved-how-to-skip-sign-in-to-see-payment-methods-in-one-page-checkout/page__view__findpost__p__569042
  4. Editing access rights to 777 for folder /cache/smarty/compile worked for me
  5. Zdravím, již nějakou dobu se trápím s nalezením jedné položky konfigurace prestashopu. Přesouvám e-shop z hostingu na localhost (appserv) pro úpravy. Přesunu celý obsah na local, připojím databázi v settings.inc.php, ale když do prohlížeče zadám url na localhost shop (localhost/shop), dostanu redirrect na localhost/shop/cs. Obchod na hostingu se chová stejně, tedy směruje na http://www.shop.cz/cs, přitom nikde žádný adresář cs není! Nevíte někdo, kde se mění tento redirrect? Mám podezření, že někde v rámci databáze. Díky.
×
×
  • Create New...