Jump to content

fale.henrique

Members
  • Posts

    19
  • Joined

  • Last visited

Profile Information

  • First Name
    Henrique
  • Last Name
    Leite

fale.henrique's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hello, i am developing a shipment module and i want to change the description for to show user how many days your shopping will arrive. I did this function, but isn't works in Prestashop 1.6.13 and 1.7. public function hookdisplayBeforeCarrier($params) { if (null == $this->context->cart->getDeliveryOptionList()) { return; } $mercado_envios_activate = Configuration::get('MERCADOENVIOS_ACTIVATE'); if (empty($mercado_envios_activate) || $mercado_envios_activate == "false") { return; } // Init var $address = new Address($params['cart']->id_address_delivery); $lista_shipping = (array) Tools::jsonDecode( Configuration::get('MERCADOPAGO_CARRIER'), true ); $delivery_option_list = $this->context->cart->getDeliveryOptionList(); $retornoCalculadora = $this->calculateListCache($address->postcode); $mpCarrier = $lista_shipping['MP_SHIPPING']; foreach ($delivery_option_list as $id_address) { foreach ($id_address as $key) { foreach ($key['carrier_list'] as $id_carrier) { if (in_array($id_carrier['instance']->id, $mpCarrier)) { if (isset($lista_shipping['MP_CARRIER'][(int)$id_carrier['instance']->id])) { $id_mercadoenvios_service_code = $lista_shipping['MP_CARRIER'][$id_carrier['instance']->id]; $calculadora = $retornoCalculadora[(string) $id_mercadoenvios_service_code]; $msg = $calculadora['estimated_delivery'].' '.$this->l('working days.'); $id_carrier['instance']->delay[$this->context->cart->id_lang] = $this->l('After the post, receive the product ').$msg; } } } } } } The result is: https://drive.google.com/file/d/0B2DsLG3vEqKAc0dkYTR3YnFhMW8/view?usp=sharing I apprenciate any help. Thank you
  2. Hi guys, it is possible install and uninstall a Hook by button? Usually the activation of hook is in method install using the function $this->registerHook(). Can i do this using a button? Example: // My button will call this method public function activeHookShipments() { $this->registerHook('displayBeforeCarrier'); } Thank you.
  3. Olá pessoal, tudo bem? Podem me ajudar com essa pesquisa de 3 perguntas? https://goo.gl/forms/mtNdiMnK4rcptOFY2 Obrigado.
  4. Thank you, but i am doing it in back end. $redirect = $this->context->link->getAdminLink('AdminOrders'); Tools::redirectAdmin($redirect); But this isn't worked.
  5. Hi Guys, In back office i want to create a button to return for AdminOrders Page. How can i do it? I want to direct the user to this link. http://localhost:8888/prestashop_6_7/admin669poorqk/index.php?controller=AdminOrders&token=a4a0eeeb3157c0106c20b18cea760a87 Thank you.
  6. Olá pessoal, com a última versão esses erros foram corrigidos. Qualquer problema entrem em contato comigo através do email: [email protected] Nosso grupo no facebook: https://www.facebook.com/groups/modulos.mercadopago/?fref=ts Obrigado.
  7. Hi, is is possible redirect by my module for AdminOrders page? I did like this, but not work. Ex: <?php class MyModuleCustomPaymentModuleFrontController extends ModuleFrontController { public function initContent() { $this->display_column_left = false; parent::initContent(); $this->placeOrder(); } private function placeOrder() { $link = $this->context->link->getAdminLink('AdminOrders'); Tools::redirect($link); } }
  8. Hi guys, is possible i check if my cart change? Because i am to using the function getOrderShippingCost and this is often called unnecessarily. I want to call this only when my cart change, is it possible? tks.
  9. Hi, i am developing a module for shipment. I have a doubt, is possible i change the column of delivery, like image? I know is possible change the column cost using the hook getOrderShippingCost. I would like to do the same thing at the column delivery. https://www.dropbox.com/s/i1nueesvw512522/envios.png?dl=0 Thank you.
  10. Ok, but i need to access the another fields. $height, $width, $length, $weight; Is is possible?
  11. Hi @ndiaga, but what are the attributes? I am looking at class Product and didn't found. https://github.com/pal/prestashop/blob/master/classes/Product.php tks
  12. Hi! I need to get this product information on my module, it is possible? $height $width $length $weight; Example: "dimensions": "30x30x30,500" Tks
  13. Hi, i will to resolve it.. Please waiting. Tks
×
×
  • Create New...