Jump to content

som-olga

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by som-olga

  1. I have been looking at adding some custom pages based on the prices-drop function, but which would only show products discounted at, for example, 20%. I created a custom-page.php in the main folder, and a custom-page.tpl in the theme folder. I cannot really understand where I could do this in a modified getPricesDrop function (from Product.php), so I thought I could create a new Controller based on the PricesDropController.php and revise the products array there. This is what I got so far: <?php /* Create a custom page in PrestaShop without CMS - CustomPageController class * */ /* The classname here will be the name of the controller */ class CustomPageController extends FrontController{ public $php_self = 'custompage'; public function setMedia() { parent::setMedia(); $this->addCSS(_THEME_CSS_DIR_.'product_list.css'); } /** * Assign template vars related to page content * @see FrontController::initContent() */ public function initContent() { parent::initContent(); $this->productSort(); $nbProducts = Product::getPricesDrop($this->context->language->id, (int)$this->p - 1, (int)$this->n, false); $nbConditionProducts= array(); foreach ($nbProducts as $nproduct) { if ($nproduct.specific_prices && $nproduct[specific_prices][reduction_type]=='percentage' && $nproduct[specific_prices][reduction]== 0.200000 ) { //$condition_products .= $product; array_push($nbConditionProducts, $nproduct); } } $this->pagination(count($nbConditionProducts)); $products = Product::getPricesDrop($this->context->language->id, (int)$this->p - 1, (int)$this->n, false, $this->orderBy, $this->orderWay); $condition_products = array(); foreach ($products as $product) { if ( $product[specific_prices][reduction_type]=='percentage' && $product[specific_prices][reduction]== 0.200000 ) { array_push($condition_products, $product); } } $this->addColorsToProductList($condition_products); $this->context->smarty->assign(array( 'products' => $condition_products, 'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'), 'nbProducts' => count($nbConditionProducts), 'homeSize' => Image::getSize(ImageType::getFormatedName('home')), 'comparator_max_item' => Configuration::get('PS_COMPARATOR_MAX_ITEM') )); $this->setTemplate(_PS_THEME_DIR_.'custom-page.tpl'); } } My problem is this does not work properly. It does display only products at 20% but not all the products at 20%, and pagination does not work. Any ideas how to fix this? Or maybe another way to do it? Thanks!
  2. Thank you so much! This is a great module! I installed on 1.6.1.6 with no problems, and could follow your advice to adapt it to my custom theme, showing up in an extra cart page they have. Thanks again!
  3. Go to your php error log and check what it says. you can find it by clicking in the wamp icon and in php > PHP error log. Is this a new installation or did you migrate your files from an online shop?
  4. Check out this topic- https://www.prestashop.com/forums/topic/520452-update-from-1614-to-1615/page-2 . It seems to be a problem with having prestashop on a subfolder (like /shop/) and a bug on the new /classes/Media.php .
  5. Check out this topic- https://www.prestashop.com/forums/topic/520452-update-from-1614-to-1615/page-2 . It seems to be a problem with having prestashop on a subfolder (like /shop/) and a bug on the new /classes/Media.php .
  6. Hi, try to disable SSL from the database. It is on the ps_configuration table and the lines are called PS_SSL_ENABLED and PS_SSL_ENABLED_EVERYWHERE . just set it from 1 to 0.
  7. j'ai suivi l'instructions dans https://www.prestashop.com/forums/topic/520686-bug-paypal-3106/?hl=%2Bpaypal&do=findComment&comment=2302386 et ça l'air de marcher maintenant.
  8. Merci beaucoup, j'ai suivi vos instructions et ça va maintenant!
  9. Lo he resuelto siguiendo las instrucciones del forum en francês: https://www.prestashop.com/forums/topic/520686-bug-paypal-3106/?hl=%2Bpaypal&do=findComment&comment=2302386 a ver que tal funciona todo el 17 Junio...
  10. Bonjour, J'ai aussi le même message Your configuration use version 1.0 to communicate with PayPal.From July, all payments will be blocked.Thank you to approach your hosting company to enable the TLS version 1.2 Mais j'ai confirmé avec mon hébergeur, et sur https://cryptoreport.geotrust.com et www.ssllabs.com et j'ai bien la TLS 1.2 instalé. Qu'est que jeux peux faire pour vérifier ou c'est produit l'erreur? Merci bien!
  11. Hola, He instalado hoy la nueva versión del módulo de Paypal y también me deci que tengo la versión TLS 1.0. Pero tenemos la versión 1.2, con certificado SSL, llave SHA225, todo lo que pedia el security update de paypal. Lo hemo incluso confirmado en www.ssllabs.com . Donde podría estar el error? Hay algún archivo de log que se pueda consultar?
×
×
  • Create New...

Important Information

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