Jump to content
thirty bees forum

yaniv14

Trusted Members
  • Posts

    620
  • Joined

  • Last visited

  • Days Won

    27

Everything posted by yaniv14

  1. In general class/controllers/FrontConroller.php assign some global variables (inside init() function) that available to all templates. other then that each front page Controller add relevant variables to its own template... for example controllers/front/ProductController.php (inside initContent() function) similar process goes to hooks from modules -> registered hooks and some global template hooks. if you dont want to create a special module with custom hook and execute that hook inside your desire template, then you can and should override the desire front controller initContent function and add whatever variable you need. for example: <?php class ProductController extends ProductControllerCore { public function initContent() { $this->context->smarty->assign( [ 'my_custom_variable' => 'my custom value', ] ); parent::initContent(); } } now about you request for the shipping rates/zones and stuff, I cannot help much because I am not familiar with that part of the code and I dont have the time right now to dig inside. usually all codes/functions related to what you need is inside the desire class inside "classes" folder. can't tell if you need to look inside Zone.php or Cart.php or something else. Hopes it helps a bit and wish you good luck finding what you need. btw: when doing an override you need to remember to delete the file "cache/class_index.php"
  2. it need to be inside themes/my_theme_name/css/autoload/
  3. If you don't want to handle it via code you can just put css and js files inside autoload folder (css & js) in the theme folder. You can also add them manually to header.tpl file. Or you can create a module and register displayHeader hook with all logic
  4. You can export the niara theme and start from there. $css_files and $js_files are set in classes/controllers/FrontController.php
  5. yaniv14

    Database

    You should set all collation to utf8 in case you need to save unicode in those tables
  6. This error was long time ago and no longer exists. perhaps you are using some old cached JS files. Try to do hard reset on your browser (CTRL + F5) or try opening the admin site in incognito mode. Did you installed a fresh v1.2 shop or migrated from older versions?
  7. Please open an issue on github. https://github.com/thirtybees/thirtybees/issues
  8. @unbranched can you post all the special chars you were trying to use?
  9. What you need is a javascript event listener, probably "input" and/or "change" and then check the desire output and based on that show/hide input field/text display. of course this is not SAFE solution because its only front end manipulation. and its better to have a server side validation as well... which probably requires some controller override.
  10. btw: does "new order" is chcked in the module configuration?
  11. you have both files in your mails folder? /mails/en/new_order.html /mails/en/new_order.txt
  12. And does your payment module really trigger "validateOrder"?
  13. try to put it first in the actionValidateOrder hook. and also can you confirm that other modules on the same hook does trigger when a new order placed?
  14. Do you see the mailalerts module hooked into actionValidateOrder? Also try to disable any overrides (just for testing).
  15. check the mail logs in the backoffice, this will tell you if the mailalrets module did or did not send the mail to you. p.s. did you double check that your email is really set in the mail alerts configuration?
  16. The error probably caused because of regex expression that your php version unable to interpret. If you are on php version 7.3 or above, try to downgrade to php 7.2 just to see if the error resolved.
  17. Make sure your override is really not being used. rename or remove the file override/classes/dispatcher.php completely from the override folder, and delete file cache/class_index.php and then check again.
  18. Based on the screen shot it might be 2 things. you installed a ps 1.7 version of that module (the filename is font17.js?) the js file from the module is looking for some variable/object named prestashop.
  19. Just rename this file "override/classes/pdf/HTMLTemplateInvoice.php" to "override/classes/pdf/HTMLTemplateInvoice.php.bak" and delete file "cache/class_index.php" and you should be fine.
  20. This has got nothing to do with thirty bees. This error is caused by an override you did for classes/pdf/HTMLTemplateInvoice.php. Maybe you used to have this module "gwadvancedinvoice" that came with some lib named "QRCodeLib" and this module did the override for you and now you are not using this module anymore?
  21. yaniv14

    AWIN integration

    Adding currency code to custom code won't do the trick for you. This section only helps you if you need to add javascript code, like the script you have from AWIN. what you need to do is to add an override. your need to create a new file inside override/controllers/front folder and name that file OrderConfirmationController.php the content of the file should be something like <?php class OrderConfirmationController extends OrderConfirmationControllerCore { public function initContent() { $idCart = (int) Tools::getValue('id_cart'); $idOrder = Order::getOrderByCartId($idCart); $order = new Order($idOrder); $currency = new Currency($order->id_currency); $iso_code = $currency->iso_code; $cart_rules = $order->getCartRules(); $cart_rules_ids = []; foreach ($cart_rules as $cart_rule) { $cart_rules_ids[] = $cart_rule->id_cart_rule; } $cart_rules_ids_str = implode(',', $cart_rules_ids); Media::AddJsDef( [ 'iso_code' => $iso_code, 'cart_rules_ids' => $cart_rules_ids_str, ] ); $this->context->smarty->assign( [ 'iso_code' => $iso_code, 'cart_rules_ids' => $cart_rules_ids_str, ] ); return parent::initContent(); } } this is not tested and also cart_rules_ids is being passed as a comma separated ids, and I am not sure this is correct with AWIN because I am not familiar with it. also in order for the override to work you will need to delete "cache/class_index.php" file. hopes it gives you some direction where to start.
  22. yaniv14

    AWIN integration

    this line probably wont work: AWIN.Tracking.Sale.parts = DEFAULT: total_paid_tax_incl; you can try: AWIN.Tracking.Sale.parts = `DEFAULT: ${total_paid_tax_incl}`; also this line should not be inside {literal} tag and it should be like that. <img src="https://www.awin1.com/sread.img?tt=ns&tv=2&merchant=00000&amount={$order->total_paid_tax_incl}&cr={#isoCodeNum#}&ref={$order->id_order}&parts=DEFAULT:{$order->total_paid_tax_incl}&vc={#getOrderedCartRulesIds#}&ch=aw&testmode=0" border="0" width="0" height="0"> some variables as you can see are not available without overriding the controller so you need to create your override and add them like for currency iso code you can do something like $currency = new Currency($order->id_currency); $iso_core = $currency->iso_code;
  23. yaniv14

    AWIN integration

    Hi, You cannot use php code like you put. Smarty has {php} tag for that, but I think its deprecated and anyway its not recommended. What you have in your code is javascript and you should use only available javascript variables that are coming from the controller (server side). if you look at this you will see all variables that are injected to your template from the controller. So you can use it like that: AWIN.Tracking.Sale.amount = total_paid_tax_incl; if you need additional data that is not presented by the controller you can create your own override of the controller initContent() function. also keep in mind that this controller template will only loads if payment module configure proper usage of payment return and/or redirect success payment to order-confirmation page. Good luck
  24. Maybe you can try hold CTRL while clicking on save button on each section. This will submit the request in a new tab and keep the current tab open, so basically you can keep on clicking all the other sections.
  25. Go to modules -> positions and select displayFooter and see all modules that hooked to the footer.
×
×
  • Create New...