Jump to content
thirty bees forum

Wartin

Members
  • Posts

    347
  • Joined

  • Last visited

  • Days Won

    18

Everything posted by Wartin

  1. Hola. Sí, hay algunas cosas que no se pueden traducir porque no están bien las cadenas para que aparezcan en Traducción. El 'what others love most' está en el archivo /themes/niara/modules/blockbestsellers/blockbestsellers.tpl Yo lo cambié así para que diga "Lo que más aman todos": <h2><span class="tm-over">{l s='What others' mod='blockbestsellers'} <span>{l s='love' mod='blockbestsellers'}</span> {l s='most' mod='blockbestsellers'}</span> </h2> Luego de hacer esto, tendrás que ir a Traducciones, módulos, y buscar el módulo blockbestsellers. Ahi aparecerán las tres cadenas. El del blog posiblemente esté en este o alguno de ese directorio: /themes/niara/modules/ beesblogpopularposts/views/templates/hooks/home.tpl Si estás en una terminal de linux, podés buscar así: grep -Hr Popular Eso buscará la palabra Popular dentro de todos los directorios, recursivamente desde donde estés.
  2. Hi. I think you have to change order-address.js in your theme. I'm not sure if this is the way to go or is preferable to add custom javascript. In order to see more information like in the screenshot above you have to right click the element and then choose 'Inspect element'. Good luck!
  3. The checkbox is "use the same address" so it should hide the repeating address. But If you see, this bug also affects the opposite (check the video how marking the checkbox each time makes the opposite. It only matter what was last settting, not if was marked or unmarked) You could change that behavior changing the javascript function. Here is how to make it, in three different ways: https://www.tutorialsrack.com/articles/403/how-to-show-and-hide-div-on-checkbox-check-or-uncheck-using-jquery-or-javascript
  4. I didn't see your video, sorry. But are you using OPC? there are two different tpls, maybe it's changing to the other (with or without opc)
  5. Here it seems to be working well, if the checkbox is marked it shows two addresses, if it's not, it shows only one. No matter if I go to the third step and then go back. But i'm not using toplakd version, I made some changes for niara (i uploaded the .zip in the same thread)
  6. Wartin

    Matomo

    Hello, I'm not using the last version. Are you using TB's Matomo module? it adds the code before </body> and </footer>
  7. In each carrier you could make a new range and in prices over 149 set it to 9.99. BUT that won't make it just for one customer group, but everybody. In order to make something with just one customer group and shipping, you could make a Cart Rule. That way you can set free shipping for orders over 149. But I think you cant charge the 9.99... Maybe all this is helpful
  8. Maybe you're using 3 step checkout for Niara? I think I added that behavior. The idea is that if you want the same address it should not show two addresses. I don't see an incorrect behavior with checkbox in your video, but it should start hidden, and then, if you want a different address for invoice you have to click the checkbox.
  9. Hello again. Yes, it does what is says it does, displays how much you have to spend to get the general free shipping. That value is read from carriers->preferences, or you have the option to set it in the module's configuration page. BUT, you don't have the option to show a message for the carrier selected. So if you have different free shipping values from different carriers (like in my case) it's not really useful. My ideal would be to show, in blockcart/includes/popup.tpl, how much is needed to pass the barrier of the free shipping that's being calculated in the selected carrier in that popup.
  10. Hello, anyone can give me a hint? Thanks!
  11. I had to use phpmailer, as my server forbids me to use mail(). But you said you can use it from another script.
  12. Hello! I'm trying to set free shipping just for a carrier, starting from an amount of money (3000 in my case). I see there are two possibilities: 1) from carrier, setting two ranges, 0 to 3000 with the actual price and 3000 to inf with zero 2) setting a cart rule with a minimum of 3000, and setting just the carrier I want to give the free shipping. I think the second one is the best. I did it, and it shows free shipping but only just after buying, but not in the modal after adding to cart, nor in the summary. After adding a product that reaches 3000 the modal says: If I go to checkout: But, after clicking finish order the rule applies: Is it expected? the rule is applied only when finishing order, and not when adding products beyond my rule limit. Thanks!
  13. If you are in a shared hosting and have access to cPanel you can turn off ModSecurity just to make the change. I have to do it sometimes to make some changes, for example in SQL queries from the BO, it gives me permission error.
  14. I think I did it from Localization -> Countries, and then deleted 'birthdate' from 'address format'. But if hiding it works, it will do it for every country
  15. Mmm I think you will have to change the template, because you have to print smarty variables... I think you won't be able to do that with HTML block...
  16. Hola, de nada! espero que funcione. Mandá lo que tenes hecho hasta ahora. Saludos!
  17. Wartin

    Demo site

    I came for the same thing :)
  18. Hola. Sí, si estás usando el checkout en 5 pasos el archivo a editar es themes/niara/order-carrier.tpl, y agregarías un nuevo <input> debajo del que tiene el label cgv. te quedaría algo as <label for="cgv"> <input type="checkbox" name="cgv" id="cgv" value="1" {if $checkedTOS}checked="checked"{/if}> <span class="label-text" style="font-weight:bold;"> {l s='I agree to the terms of service and will adhere to them unconditionally.'} </span> </label> <input type="checkbox" name="tu-nuevo-input" id="elnombre"> No entendí bien qué significa que el resultado aparezca en traducciones.
  19. Wartin

    Demo site

    Yesterday I was trying to see the five step checkout in a clean TB, so I went to the demo. It would be nice to have a user/pw visible just to sign in without making an account.
  20. Hooks are something more complex, I thought you were trying to just add some stuff there. I read this thread the other day, I think it's easy to follow: https://www.prestashop.com/forums/topic/403588-calling-value-of-a-function-of-a-module-within-a-file-theme-tpl/ bye!
  21. Yes, it was something i didn't knew how to fix. Now instead of: if (70 == $idCarrier) { reads: if ($data["instance"]->name == 'My carrier's name') { Thanks again!
  22. Great, finally I tried two ways persisting the delay. First I tried with cookies, saving the value in the module with this: $this->context->cookie->__set('newdelay', $data->PlazoEntrega); $this->context->cookie->write(); And then in the override of the function getDeliveryOptionList this: public function getDeliveryOptionList(Country $defaultCountry = null, $flush = false) { if (Context::getContext()->cookie->__isset('newdelay')){ $newdelay = Context::getContext()->cookie->__get('newdelay'); } $delay = [ 1 => $newdelay.' días', ]; $deliveryOptionList = parent::getDeliveryOptionList($defaultCountry, $flush); foreach ($deliveryOptionList as $idAddress => $deliveryOption) { foreach ($deliveryOption as $key => $value) { foreach ($value['carrier_list'] as $idCarrier => $data) { // override Carrier if (70 == $idCarrier) { $deliveryOptionList[$idAddress][$key]['carrier_list'][$idCarrier]['instance']->delay = $delay; } } } } return $deliveryOptionList; } The second try, that I chose over the cookie was to add a column in module's table in the database, as it already register there other values concerning orders and prices. Then, in getDeliveryOptionList I get order values and make a query to module's table: class Cart extends CartCore { public function getDeliveryOptionList(Country $defaultCountry = null, $flush = false) { $deliveryOptionList = parent::getDeliveryOptionList($defaultCountry, $flush); $weight = $this->getTotalWeight(); $address = new Address(Context::getContext()->cart->id_address_delivery); $postcode = $address->postcode; foreach ($deliveryOptionList as $idAddress => $deliveryOption) { foreach ($deliveryOption as $key => $value) { foreach ($value['carrier_list'] as $idCarrier => $data) { // override Carrier if (70 == $idCarrier) { $query = new DbQuery(); $query->select('delay') ->from('tb_ocae_quotes') ->where('reference = 369 AND postcode ='.$postcode); $newdelay = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($query); $delay = [ 1 => $newdelay.' días', ]; $deliveryOptionList[$idAddress][$key]['carrier_list'][$idCarrier]['instance']->delay = $delay; } } } } return $deliveryOptionList; } } I tried to get the total cart price with getDeliveryOptionList but it overflows php, no idea what am I doing wrong. @Quant, maybe this is useful for you too. Thanks!
  23. Delay values comes in the same answer where the price comes from carrier webservice. The module indeed executes a call in every checkout (it's open source, I didn't made it). It saves in the database some values (weight, postal codes, price, etc.) to not call it again if it already did. Well, I thought I could use a cookie or some call to write the new delay in carrier list. Or to implement some function in my module like the one that returns the price. Thanks for your help. I think I'll have to just write 'from 2 to 8 days' :(
  24. Hello! I'm still stuck here. I tried both suggestions. With the override of simulateCarriersOutput I could put some string in delay, visible in .tpl with the smarty variable $carriers. With Quant's solution (getDeliveryOptionList override) my new delay string is showed in carrier list. I couldn't pass the real delay value returned by the webservice in a module to Cart class. I need a tip here :) If I can do it I'll write my solution here. Thanks!
×
×
  • Create New...