Jump to content
thirty bees forum

yaniv14

Members
  • Posts

    580
  • Joined

  • Last visited

  • Days Won

    24

Posts posted by yaniv14

  1. Order confirmation page contains various JS variables.

    'bought_products'          => $varProducts,
    'total_products_tax_incl'  => $order->total_products_wt,
    'total_products_tax_excl'  => $order->total_products,
    'total_shipping_tax_incl'  => $order->total_shipping_tax_incl,
    'total_shipping_tax_excl'  => $order->total_shipping_tax_excl,
    'total_discounts_tax_incl' => $order->total_discounts_tax_incl,
    'total_discounts_tax_excl' => $order->total_discounts_tax_excl,
    'total_paid_tax_incl'      => $order->total_paid_tax_incl,
    'total_paid_tax_excl'      => $order->total_paid_tax_excl,
    'id_customer'              => $this->context->customer->id,

    if you need order id as JS variable you will have to override orderconfirmation controller and add it your self.

    btw: order id is available in order confirmation template as smarty var

  2. If its only for your information than you can create sql query in Advanced parameters -> SQL Manager.

    select customer_email, id_product, id_product_attribute from tb_mailalert_customer_oos

    and you just view it on the admin page.

    it will show you: Email address, Product ID and Product attribute ID.

    p.s. in case you have other db prefix (like "ps") then you should use "ps_mailalert_customer_oos"

  3. Its possible but you will have to code it your self.

    mailalerts module keeps records of customer/email address who are waiting for products to be back in stock... inside mailalert_customer_oos table.

    you can create yourself a small module with some hook that matches product page (displayLeftColumnProduct,displayRightColumnProduct,actionProductOutOfStock,displayProductButtons), or some new custom hook (and edit product.tpl file).

    OR you can override front/ProductController and add extra context (and edit product.tpl file).

    you can use getCustomers() function inside module class to fetch all emails awaits notification regarding certain product.

    • Like 1
  4. Yes, you can try to use the rewrite_module or you can ask your server provider to do it for you.

    basically you need the images rewrites.

    location ~* \.(eot|gif|ico|jpg|jpeg|otf|pdf|png|svg|swf|ttf|woff|webp)$ {
            rewrite ^/([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$1$2$3.jpg break;
            rewrite ^/([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$1$2$3$4.jpg break;
            rewrite ^/([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$1$2$3$4$5.jpg break;
            rewrite ^/([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg break;
            rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg break;
            rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg break;
            rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg break;
            rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg break;
            rewrite ^/c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ /img/c/$1$2$3.jpg break;
            rewrite ^/c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ /img/c/$1$2.jpg break;
    
            rewrite ^/([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.webp$ /img/p/$1/$1$2$3.webp break;
            rewrite ^/([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.webp$ /img/p/$1/$2/$1$2$3$4.webp break;
            rewrite ^/([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.webp$ /img/p/$1/$2/$3/$1$2$3$4$5.webp break;
            rewrite ^/([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.webp$ /img/p/$1/$2/$3/$4/$1$2$3$4$5$6.webp break;
            rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.webp$ /img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.webp break;
            rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.webp$ /img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.webp break;
            rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.webp$ /img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.webp break;
            rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.webp$ /img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.webp break;
            rewrite ^/c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.webp$ /img/c/$1$2$3.webp break;
            rewrite ^/c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.webp$ /img/c/$1$2.webp break;
     
            allow all;
            try_files  $uri  $uri/  /index.php?$args;
        }

     

  5. 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"

    • Like 3
  6. 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

    • Like 1
  7. 12 hours ago, Francisco Ampuero said:

    Hello Thirtybees Team !!

    Thank you very much for the update. good that they are still active.

    Important:

    But there is still a problem with Edit Products . Error 500 as mentioned in some forums.

    Is there a solution coming soon?

    Greetings and Thanks for being present !!!

    Foto Error Therty Bees.jpg

    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?

  8. 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.

    • Like 1
×
×
  • Create New...