Jump to content

Pete Nice

Members
  • Posts

    43
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Pete Nice's Achievements

Newbie

Newbie (1/14)

7

Reputation

1

Community Answers

  1. FYI I received a response on Twitter from Prestashop who said they were looking into a solution to this.
  2. Might be a good idea from some at Prestashop to let everyone know whether PayPal disabling SSL 3.0 is going to have an impact on the PayPal module. It's going to be disabled on the 3rd December.
  3. I resolved this by moving the dev site to a subdomain.
  4. From what I can tell the htaccess file in the /dev folder is being ignored.
  5. It worked fine using 1.4.7 but now my /dev folder is inaccessible and I get a 404 when I try to access the homepage or admin. If I disable the htaccess in the dev folder I can access the homepage and admin but I get a 404 accessing any subsequent pages in the /dev store.
  6. I've just upgraded to 1.5.6.2. and I'm trying to run a dev version of my shop in a sub folder but there's an issue with the mod_rewrite in my htaccess files. Anyone know how to amend this so I can run the dev shop independently?
  7. Hi, I'm just upgrading my site up to 1.5.6.2 and I've got an issue with my Webgains tracking in the PayPal module. I have an override for the OrderConfirmationController.php which works with my Braintree module - but the PayPal order confirmation seems to be ignoring this. Any ideas how I can get this to work with the PayPal module? class OrderConfirmationControllerCore extends FrontController { public $php_self = 'order-confirmation'; public $ssl = true; public $id_cart; public $id_module; public $id_order; public $reference; public $secure_key; public $wgOrderValue;# total order value in the currency your program runs in (please do not include currency symbol) public $wgOrderReference; public $wgEventID=xxxx; # this identify's the commission type (in account under Program Setup (commission types)) public $wgComment; #optional field public $wgMultiple=1; public $wgItems; public $wgCustomerID= '';# please do not use without contacting us first public $wgProductID= '';# please do not use without contacting us first public $wgSLang = 'php';# string, used to identify the programming language of your online systems. Needed because url_encoding differs between platforms. public $wgLang = 'en_GB';# string, used to identify the human language of the transaction public $wgPin = xxxx;# pin number provided by webgains (in account under Program Setup (program settings -> technical setup)) public $wgProgramID = xxxx; # int, used to identify you to webgains systems public $wgVoucherCode; #string, used to store the voucher code used for transaction public $wgCurrency = 'GBP'; #only the following are valid: AUD,CAD,CHF,CZK,DKK,EUR,GBP,HKD,HUF,JPY,NOK,NZD,PLN,SEK,SGD,SKK,USD public $wgVersion = '1.2'; public $wgSubDomain="track"; public $wgCheckString; public $wgCheckSum; public $wgQueryString; public $wgUri; public $theCart; public $total_products; /** * Initialize order confirmation controller * @see FrontController::init() */ public function init() { parent::init(); $this->id_cart = (int)(Tools::getValue('id_cart', 0)); $this->theCart = new Cart($this->id_cart); $this->total_products = $this->theCart->getOrderTotal(false, Cart::BOTH_WITHOUT_SHIPPING); $is_guest = false; /* check if the cart has been made by a Guest customer, for redirect link */ if (Cart::isGuestCartByCartId($this->id_cart)) { $is_guest = true; $redirectLink = 'index.php?controller=guest-tracking'; } else $redirectLink = 'index.php?controller=history'; $this->id_module = (int)(Tools::getValue('id_module', 0)); $this->id_order = Order::getOrderByCartId((int)($this->id_cart)); $this->secure_key = Tools::getValue('key', false); $order = new Order((int)($this->id_order)); if ($is_guest) { $customer = new Customer((int)$order->id_customer); $redirectLink .= '&id_order='.$order->reference.'&email='.urlencode($customer->email); } if (!$this->id_order || !$this->id_module || !$this->secure_key || empty($this->secure_key)) Tools::redirect($redirectLink.(Tools::isSubmit('slowvalidation') ? '&slowvalidation' : '')); $this->reference = $order->reference; if (!Validate::isLoadedObject($order) || $order->id_customer != $this->context->customer->id || $this->secure_key != $order->secure_key) Tools::redirect($redirectLink); $module = Module::getInstanceById((int)($this->id_module)); if ($order->payment != $module->displayName) Tools::redirect($redirectLink); } /** * Assign template vars related to page content * @see FrontController::initContent() */ public function initContent() { parent::initContent(); $this->context->smarty->assign(array( 'is_guest' => $this->context->customer->is_guest, 'HOOK_ORDER_CONFIRMATION' => $this->displayOrderConfirmation(), 'HOOK_PAYMENT_RETURN' => $this->displayPaymentReturn() )); if ($this->context->customer->is_guest) { $this->context->smarty->assign(array( 'id_order' => $this->id_order, 'reference_order' => $this->reference, 'id_order_formatted' => sprintf('#%06d', $this->id_order), 'email' => $this->context->customer->email )); /* If guest we clear the cookie for security reason */ $this->context->customer->mylogout(); } $this->wgCheckString = "wgver=".$this->wgVersion."&wgsubdomain=".$this->wgSubDomain."&wglang=".$this->wgLang."&wgslang=".$this->wgSLang."&wgprogramid=".$this->wgProgramID."&wgeventid=".$this->wgEventID."&wgvalue=".$this->total_products."&wgorderreference=".$this->id_order."&wgcomment=".$this->wgComment."&wgmultiple=".$this->wgMultiple."&wgitems=".$this->wgItems."&wgcustomerid=".$this->wgCustomerID."&wgproductid=".$this->wgProductID."&wgvouchercode=".$this->wgVoucerCode.""; $this->wgCheckSum = md5($this->wgPin.$this->wgCheckString); # make checksum $this->wgQueryString = $this->wgCheckString."&wgchecksum=".$this->wgCheckSum."&wgCurrency=".$this->wgCurrency; self::$smarty->assign('scUri',$this->wgUri); self::$smarty->assign('scSub',$this->wgSubDomain); self::$smarty->assign('scQuery',$this->wgQueryString); $this->setTemplate(_PS_THEME_DIR_.'order-confirmation.tpl'); } /** * Execute the hook displayPaymentReturn */ public function displayPaymentReturn() { if (Validate::isUnsignedId($this->id_order) && Validate::isUnsignedId($this->id_module)) { $params = array(); $order = new Order($this->id_order); $currency = new Currency($order->id_currency); if (Validate::isLoadedObject($order)) { $params['total_to_pay'] = $order->getOrdersTotalPaid(); $params['currency'] = $currency->sign; $params['objOrder'] = $order; $params['currencyObj'] = $currency; return Hook::exec('displayPaymentReturn', $params, $this->id_module); } } return false; } /** * Execute the hook displayOrderConfirmation */ public function displayOrderConfirmation() { if (Validate::isUnsignedId($this->id_order)) { $params = array(); $order = new Order($this->id_order); $currency = new Currency($order->id_currency); if (Validate::isLoadedObject($order)) { $params['total_to_pay'] = $order->getOrdersTotalPaid(); $params['currency'] = $currency->sign; $params['objOrder'] = $order; $params['currencyObj'] = $currency; return Hook::exec('displayOrderConfirmation', $params); } } return false; } }
  8. Thanks, I actually used your method to customise my CategoryController rather than add a module
  9. So I modified the homefeatured module to get the products from 2 categories and merged the resulting arrays. EDIT - Ha! Thanks I'd just figured that out.
  10. Yes I could use that category but I like the flexibility of which products can be added to each independent new arrivals category. Surely someone can point me in the right direction to create a function to pull products from both categories?
  11. I have a clothing store that has separate categories for Men & Women. I want to combine both of the 'New Arrivals' categories on one page so the products need to stay in their respective categories.
  12. Hi, I'm trying to show the products from 2 categories on one category page. I've created a blank category and assigned a custom category template with an override CategoryController.php. Can anyone show me an example of a function to get the products from two categories?
  13. In my 1.4.7 shop I'm displaying my categories using if statements: {foreach from=$categories item=category} {if $category.id_category == 7 || $category.id_category == 20} <option class="drop" value="{$link->getcategoryLink($category.id_category, $category.link_rewrite)}">{$category.name|escape:'htmlall':'UTF-8'}</option> {/if} {/foreach} This doesn't seem to work in the blockcategories in 1.5.6.1 - any ideas on how to change below to work in the same way: {foreach from=$blockCategTree.children item=child name=blockCategTree} {if $smarty.foreach.blockCategTree.last} {include file="$branche_tpl_path" node=$child last='true'} {else} {include file="$branche_tpl_path" node=$child} {/if} {/foreach}
  14. Hmm - I've just looked at the update date of the module in Add Ons and it says 01/20/14 - today - strange.
×
×
  • Create New...