Jump to content
thirty bees forum

haylau

Members
  • Posts

    627
  • Joined

  • Last visited

  • Days Won

    35

Posts posted by haylau

  1. On 5/11/2022 at 4:22 PM, veganline said:

     

    ------------- 12.5..22
    I didn't see the other post about wordpress modules to show Prestashop / Thirtybees products:

     

    Nearly finished this review. Hopefully release the post about it today / tomorrow

  2. 2 hours ago, zen said:

    OK.. I did try it and you are right: it's slow, maybe the server is not the best but still it's almost not usable and far away from an elementor design system, it's too complicated and need login to their server for each modification to be saved... still buggy too.

    Unfortunatly I will not recommand Themler to any TB user 😞

     

     

    That was my conclusion also. 

  3. 2 hours ago, zen said:

    It is slow.. how much ? worst than elementor ?

    I'd like to give it a try but anyway the price is way too high, maybe better to try this one instead : https://pagebuilder.webshopworks.com/

    it's for prestashop 1.7 but they still have a 4.x version for prestashop 1.6, price is 79.99€ instead of the 199$ for themler that works for prestashop.

    I' ll send you a PM with details. I did look at Pagebuilder but in requirements it says 1.7 only. I'll ask them for clarification

  4. 11 hours ago, HenriBierman said:

    Thank you for your help, Yes my website is running 30B 1.3.0,  I also just checked, I do not believe I have any CDN running my website.  Did it show like this on your side?  I know we run CloudBric, do you think it could have this impact?

    If you right click on your page and choose View Page Source it shows these lines

     
     
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    		
    <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>

    But on reflection they may be another module or theme grabbing something, and they also I think are commented out, so you can ignore that

     

  5. 4 hours ago, datakick said:

    the wp plugin uses this code to construct image src:

    
                $src_img_product =  $url_service.'/'
                          .$result['alternate_data']['product']->product->id_default_image.'-'
                          .$current_atts['size_img']."/".$slug.".jpg";

    where $result and $slug comes from webservice response, but $current_atts['size_img'] comes from plugin configuration:

    
    'size_img'    => get_option('didpd_default_size_img')

    There is probably some UI element to set this config key, or maybe now. I don't know wordpress.

    Anyway, this is not tb webservice issue

    Thanks, that gives me something to work with

  6. I am testing the Wordpress / Prestashop integration modules to display prestashop products on Wordpress for my blog. 

    All the modules use the API system, and the ones I have tested so far all have a common issue - getting the product image, they want some variation of  image type "home_default"

    image.png.80ec734813e060387f1e746dbca059e7.png

    Which with Niara and probably other modules no longer exists.

    If I manually edit that code in the browser console panel to a Niara image type it works

    image.png.f5d4a0c8cf33c5a1208a88ceb799842f.png

     

    Three posible solutions:

     

    1) asimple workaround is of course to create that image type in TB

    2) A bug in Webservice? I did wonder, as they all have the same issue if this is something to do with changes to the ThirtyBees webservice -  so could the webservice be delivering the wrong image name? or is it simply old modules that never worked on anything but the old Prestashop themes

    3) Modify the module code - I did reach out to one of the developers who told me 

    Quote

    The image data is obtained by the "Webservice / API" of Prestashop.

    In the includes/classes/class-didpdmain.php file, inside the
    didpd_clean_values function you will see that it mounts the "$values"
    array, which is used in the template (templates/public/didpd_model_a.php
    ) to paint the data.

    It is in that function (didpd_clean_values) where you would have to
    adapt, since it is possible that it uses other names to tare the image
    data. Modify that part of the code where it refers to the image.

     

    This level of programming is beyond me, so can anyone see how to modify this code to work?

     

    <?php
    namespace did_prestashop_display\includes\classes;
    
    
    
    final class DIDPDMain
    {
        protected static $_instance = null;
        public $didpd_admin = null;
        public $didpd_read = null;
    
        public function __construct()
        {
            $this->includes();
            $this->didpd_read = new DIDPDRead();
            $this->didpd_admin = new DIDPDAdmin($this->didpd_read);
    
            $this->init_hooks();
        }
    
    
        /**
         * Includes
         * @since 0.0.1
         */
        public function includes()
        {
            include_once dirname(__FILE__) . '/class-didpdadmin.php';
            include_once dirname(__FILE__) . '/class-didpdread.php';
        }
    
        /**
         * Hook into actions and filters.
         *
         * @since 0.0.1
         */
        private function init_hooks()
        {
    
    
            add_action('admin_menu', array( $this->didpd_admin,  'didpd_admin_menu'));
            add_shortcode('dp_product', array( $this,  'didpd_shortcode_product'));
    
            // enqueue
            add_action('wp_enqueue_scripts', array( $this,'didpd_enqueue'));
            add_action('admin_enqueue_scripts', array( $this,'didpd_enqueue'));
    
        }
    
    
    
        public function search_logo($name_img)
        {
    
          $attachments = get_page_by_title($name_img, OBJECT, 'attachment');
    
           if ( $attachments ){
               $attachment_url = $attachments->guid;
    
           } else {
               return false;
           }
    
           return $attachment_url;
        }
    
    
    
        /**
        * Creation display product
        *
        */
        public function didpd_shortcode_product($atts)
        {
            $models_display = array('a','b');
    
            $current_atts = shortcode_atts(array(
                'id'          => '3',
                'type'        => get_option('didpd_default_type'),
                'lang'        => get_option('didpd_default_lang'),
                'domain'      => get_option('didpd_default_domain'),
                'size_img'    => get_option('didpd_default_size_img'),
                'name'        => 'void',
                'description' => 'void',
                'button'      => get_option('didpd_default_button'),
                'status'      => 'success',
                'status_msg'  => '',
                'with_taxes'  => get_option('didpd_default_with_taxes'),
                'with_price'  => get_option('didpd_default_with_price'),
                'currency'    => get_option('didpd_default_currency'),
                'dev'         => '0'
              ), $atts, 'atributes');
    
            if (!in_array($current_atts['type'], $models_display)) {
                $current_atts['type'] = 'a';
            }
    
            $arr = get_option('didpd_domains');
    
    
            $arr_domain = (isset($arr[$current_atts['domain']]))?$arr[$current_atts['domain']]:null;
    
            if($arr_domain !== null) {
    
    
            $dat = $arr_domain; //$arr[$current_atts['domain']];
            $dataFont = $dat['didpd_url_webservice_'.$current_atts['domain']];
            $font = $dataFont;
            $result = $this->didpd_read->didpd_read(
                                                  $arr_domain, //$arr[$current_atts['domain']],
                                                  $current_atts['domain'],
                                                  $current_atts['id'],
                                                  $current_atts['type']
    
                                                  );
    
            } else {
              ob_start();
    
              $display = ob_get_clean();
    
              return $display;
            }
    
    
    
            ob_start();
    
            if($current_atts['dev'] == 1
              || $current_atts['dev'] == 2) {
              $this->showStatus($result, $current_atts);
            }
    
    
            $url_service = $arr[$current_atts['domain']]['didpd_url_webservice_'.$current_atts['domain']];
    
            if($result['status'] == "error") {
              $current_atts['status'] = 'error';
              $current_atts['status_msg'] =  $result['error_txt'];
    
              $values = $this->didpd_clean_values_aternate($current_atts, $url_service, $result);
    
              $without_product_data = false;
              foreach($result['error_txt'] as $key => $value){
                if($key == 'inactive'
                  || $key == '404'
                  || $key == 'not_product'){
                  $without_product_data = true;
                }
              }
    
              $img_logo = $this->search_logo($url_service);
    
              if(!$result['alternate_error'] && !$without_product_data) {
    
                $getTemplate = 'didpd_model_alternate_home_';
    
    
                $path_template = $this->didpd_create_path_template($getTemplate.$current_atts['type'].'.php');
                include($path_template);
    
              } else {
    
                $path_template = $this->didpd_create_path_template('didpd_model_alternate_home_'.$current_atts['type'].'.php');
                include($path_template);
    
              }
    
            } else {
    
              $values = $this->didpd_clean_values($current_atts, $url_service, $result);
    
              $path_template = $this->didpd_create_path_template('didpd_model_'.$current_atts['type'].'.php');
    
              include($path_template);
    
            }
            $display = ob_get_clean();
    
            return $display;
        }
    
    
    
    
        public function didpd_create_path_template($name_template)
        {
          return __DIR__.'/../../templates/public/'.$name_template;
        }
    
    
        public function getIdLang($current_atts, $result) {
          $id_lang = (int)$current_atts['lang'];
          if($id_lang == 0){
            $id_lang = (int)$result['id_current_lang'];
          }
          return $id_lang;
        }
    
    
        public function didpd_clean_values_aternate($current_atts, $url_service, $result)
        {
            $is_category = false;
            $id_lang    =  $this->getIdLang($current_atts, $result);
    
            $values = array('name_category' => 'void',
                            'description_category' => 'void',
                            'name_button' => 'void',
                            'link'        => 'void',
                            'img_product' => 'void',
                            'is_category' => $is_category,
                            'url_category' => 'void',
                            'description_category' => 'void');
    
    
            $errors = [];
            $vist_website = false;
            foreach($result['error_txt'] as $key => $value){
                $errors[] = $key;
            }
    
    
            if(in_array('inactive', $errors) && !in_array('404', $errors)){
              $vist_website = true;
    
            } else if(in_array('without_stock', $errors) && !in_array('404', $errors)){
              $vist_website = false;
    
            } else if(in_array('404', $errors) ){
              $vist_website = true;
    
            }
    
            $name_category = '';
            $description_category = '';
            $src_img_product = '';
            $url_category = '';
    
            if (!$result['alternate_error'] && !$vist_website) {
                $is_category = true;
    
                $name_button =  __('Visit our category', 'didprestashopdisplay');
    
    
                $url_category = $url_service.'/index.php?controller=category&id_category=' . $result['alternate_data']['category']->category->id;
    
    
                if(!isset($result['alternate_data']['category']->category->name->language[$id_lang])) {
                  $name_category =  $result['alternate_data']['category']->category->name->language;
                } else {
                  $name_category =  $result['alternate_data']['category']->category->name->language[$id_lang];
                }
    
                $description_category = $result['alternate_data']['category']->category->description->language[$id_lang];
                $id_lang    =  (int)$current_atts['lang'];
                $id_product = $result['alternate_data']['product']->id;
    
                if(!isset($result['alternate_data']['product']->product->link_rewrite->language[$id_lang])) {
                  $slug   = $result['alternate_data']['product']->product->link_rewrite->language;
                } else {
                  $slug   = $result['alternate_data']['product']->product->link_rewrite->language[$id_lang];
                }
    
    
                //$slug = ($slug == '')?'image':$slug;
                $src_img_product =  $url_service.'/'
                          .$result['alternate_data']['product']->product->id_default_image.'-'
                          .$current_atts['size_img']."/".$slug.".jpg";
    
    
              } else {
                $name_button =  __('Visit our Website', 'didprestashopdisplay');
    
              }
    
              $values['name_category']= strip_tags($name_category);
              $values['description_category']= strip_tags($description_category);
              $values['name_button']  = strip_tags($name_button);
              $values['link']         = $url_service;
              $values['is_category']  = $is_category;
              $values['img_product']  = $src_img_product;
              $values['url_category'] = $url_category;
    
            return $values;
        }
    
    
        public function didpd_clean_values($current_atts, $url_service, $result)
        {
            $values = array('name'        => 'void',
                            'description' => 'void',
                            'name_button' => 'void',
                            'url_product' => 'void',
                            'img_product' => 'void',
                            'price'       => 'void',
                            'taxes'       => 'void',
                            'with_taxes'  => 'void',
                            'with_price'  => 'void');
    
            if ($current_atts['status'] == 'success') {
                $id_lang    =  $this->getIdLang($current_atts, $result);
                $id_product = $result['content']['product_obj']->id;
                $slug       = $result['content']['product_obj']->link_rewrite->language[$id_lang];
                $with_taxes = $current_atts['with_taxes'];
    
                $all_prices = $result['all_prices'];
    
                $name = $current_atts['name'];
    
                if ($name == 'void') {
                  if($result['content']['product_obj']->name->language[$id_lang] == NULL) {
                    $name = $result['content']['product_obj']->name->language;
                  } else {
                    $name = $result['content']['product_obj']->name->language[$id_lang];
                  }
                }
    
    
                $description = $current_atts['description'];
                if ($description == 'void') {
                  if($result['content']['product_obj']->description_short->language[$id_lang] == NULL) {
                    $description = $result['content']['product_obj']->description_short->language;
                  } else {
                    $description = $result['content']['product_obj']->description_short->language[$id_lang];
                  }
    
                    if ($description == '') {
                      if($result['content']['product_obj']->description->language[$id_lang] == NULL) {
                        $description = $result['content']['product_obj']->description->language;
                      } else {
                        $description = $result['content']['product_obj']->description->language[$id_lang];
                      }
    
                    }
                    $description = strip_tags($description);
                    if (strlen($description) > 125) {
                        $description = substr($description, 0, 125)."...";
                    }
                }
    
    
                $name_button = $current_atts['button'];
                if ($name_button == 'void') {
                    $name_button = __('More information...', 'didprestashopdisplay');
                }
                $slug = ($slug == '')?'image':$slug;
                $src_img =  $url_service.'/'
                          .$result['content']['product_obj']->id_default_image.'-'
                          .$current_atts['size_img']."/".$slug.".jpg";
    
    
    
                $url_product = $url_service.'/index.php?controller=product&id_product=' . $id_product;
    
                $values['name']        = $name;
                $values['description'] = $description;
                $values['name_button'] = $name_button;
                $values['url_product'] = $url_product;
                $values['img_product'] = $src_img;
                $values['with_taxes']  = $with_taxes;
                $values['all_prices']  = $all_prices;
                $values['with_price']  = $current_atts['with_price'];
                $values['currency']    = $current_atts['currency'];
            }
    
            return $values;
        }
    
    
    
        /**
         * Main DIDPDMain  Instance.
         *
         *
         * @since 0.0.1
         * @static
         * @see didis()
         * @return DIDPDMain - Main instance.
         */
        public static function instance()
        {
    
            if (is_null(self::$_instance)) {
                self::$_instance = new self();
            }
            return self::$_instance;
        }
    
    
    
    
        /**
        * Include CSS and JS
        * @return void
        */
        public function didpd_enqueue()
        {
            wp_register_style('barsandmore_4', plugin_dir_url( __FILE__ ) .'../../css/bootstrap.min.css', false, null, 'all');
            wp_enqueue_style('barsandmore_4');
    
            wp_register_style('did-web-css', plugin_dir_url( __FILE__ ) .'../../css/did-web.css', false, null, 'all');
            wp_enqueue_style('did-web-css');
    
            wp_enqueue_script('jquery');
    
            wp_register_script('boot3', plugin_dir_url( __FILE__ ) .'../../js/bootstrap.min.js', array('jquery'), '1.0', true);
            wp_enqueue_script('boot3');
    
        }
    
    
    
        private function showStatus($result, $atts) {
    
          $error_txt = '';
          if(isset($result['error_txt'])
            && gettype($result['error_txt']) == 'array') {
            $error_txt = implode(', ', $result['error_txt']);
          }
    
          $id         = 'Sin ID';
          $statusHttp = 'Sin Http';
          $cantidad   = (isset($result['stock_available']))?$result['stock_available']:0;
          $url_font   = $result['url_font'];
    
          if(isset($result['content'])) {
            $id = ($result['content']['product_obj']->id)?$result['content']['product_obj']->id:'Sin Id';
            $statusHttp = $result['content']['httpCode'];
          }
    
          $status = $result['status'];
    
          $css_status = 'success';
          if($status == 'error') {
            $css_status = 'danger';
          }
          echo "<div class='col-12 col-lg-12 bg-light-success border boreder-success boreder-rounded'>";
          echo "<small class='text-primary'>Solicitud: ".$atts['id']." </small><br>";
          echo "<small class='text-primary'>".$error_txt." </small><br>";
    
          echo "<small class='text-".$css_status."'>Status [".$id."]: <b>".$result['status']."</b> / Http: <b>".$statusHttp."</b></small><br>";
    
          echo "<small class='text-".$css_status."'>Cantidad: <b>".$cantidad."</b></small><br>";
          echo "<a class='text-".$css_status."' target='_blank'  href='".$url_font."'><small>".$url_font."</small> </a>";
    
          if($atts['dev'] == 2) {
            echo "<pre>".var_dump($atts)." </pre><br>";
            echo "<pre>".var_dump($result['content'])." </pre><br>";
          }
          echo "</div>";
    
        }
    
    }

     

  7. Themler works on ThirtyBees - as far as I can tell

    https://themler.io/

    On the plus side you can create loads of templates and either sell them or give them away. BUT - it is complex and slow. And need someone with more patience than me and more importantly much more artistic flair

    So, before I write a short review and add it to my blog, I thought I would throw this out there

    I persuaded them to give me a free 1 month licence, and there are about 2 weeks left

    If anyone out there with artistic flair, and some technical skills,  would like to take a detailed look at this with a view of using it going forward to create a number of themes (perhaps some free and some premium??) I would be willing to let you use my licence for a few days to test it 

    I might also be willing to purchase the full licence with an agreement for a certain number of free themes to be created

    Send me a message if interested in doing some work for the community 

    • Like 2
  8. On 5/2/2022 at 9:15 PM, haylau said:

    Great news - CSS Magician works on ThirtyBees and is supported. 

    https://www.presta-magician.com/en/accueil/11-module-prestashop-theme-maker-css-magician.html

    I am currently installing a demo and will write a review in the next day or so

    So there were a few teething problems, but all now seems to work

    You can see my review of CSSMagician and a demo site to test it here:

    https://blog.haylau-4-thirtybees.co.uk/css-magician/

    A theme editor rather than a theme, but has some great features

  9. On 5/3/2022 at 1:56 PM, wakabayashi said:

    I have rewritten this module. Version 2.0.0 is out. It works now out of the box. 

    Download is now available for everyone: https://github.com/eschiendorfer/genzo_category/releases/tag/v.2.0.0

    is it OK if I install your category and loyalty points modules on a demo site and mention them on my blog?

    https://blog.haylau-4-thirtybees.co.uk/

    I will write a blog about them, and add them to the directory pages. Also can I add your ThirtyBees powered main website - www.spielezar.ch?

    • Thanks 1
  10. On 4/14/2022 at 7:09 PM, António Moreira said:

    How to find a template designer for thirtybees? 

     

    Thank you.

    Great news - CSS Magician works on ThirtyBees and  is supported. It is not free though. It is a great tool for those unfamiliar with CSS and has a whole host of features allowing you to effectively create new themes just with CSS

    https://www.presta-magician.com/en/accueil/11-module-prestashop-theme-maker-css-magician.html

    I am installing a demo for you to test with, and writing a review. It will be available in a day or two. Keep an eye on this thread:

     

  11. 6 hours ago, nickz said:

    Or get rid of it.

    I find most sites claiming that reviews are super essential to raise ROI are borderline truth. Those sites read like paid articles.

    I think reviews are vital - especially for smaller sellers. But not for the reason others might think. I believe their main use is to simply show that the website is still operating. There are many, many redundant sites out there. How do you know that a website is still functioning successfully before you spend you money? Reviews. Looks at the reviews to see if they are still recent. 

    Having said that, I don't think follow ups are a good idea

  12. 23 minutes ago, zen said:

    Actually I don't know, I started this theme full of hope, but after some time i understood that not enough people were interested in, so I skipped the work on it... I am glad that you are interested now.

    I believe I should put back the 5 steps by default.. and give a tutorial with files to install for the 3 steps only order process, what do you think ?

    I like it with the 3 step, but if it is easier to do as you say then go ahead. Either way I will update the blog just written about it. If you leave it as it is, I will add a short tutorial on my blog how I did it. Very straighforward

    I am scouring the internet for PS 1. 6 modules and themes that work with TB - out of the box with no need to tinker, and I am struggling. Which is why I though to bring it all together in one place to try and show potential TB users that there are enhancements to TB that work

  13. On 4/21/2022 at 8:48 AM, Coachonko said:

    I am working for a shop based in Italy. In italy there are "remote areas" within municipalities (states) that cost more money to deliver to. The shipping partner provided a list of ZIP codes of these locations.

    I want to override TB to assign these zip codes to a zone that isn't the default state zone, so that when a customer provides the mandatory zip code at checkout (guest or registered), the carrier rates of the correct zone are applied.

    What controller handles this behavior?

    We used this module for a similar thing. We don't use it now, but i think it worked on TB. You could ask

    https://addons.prestashop.com/en/shipping-costs/19959-shipping-costs-per-zipcode-zone-country-state-city.html

     

  14. As we know, "Free Compatible themes and Modules" for ThirtyBees are in short supply. As are paid for modules. 

    I have started a website / blog / testbed system where we can test PS 1.6 themes and modules to see if they work

    My website, https://blog.haylau-4-thirtybees.co.uk/. will have three main areas

    • A blog to highlight PS 1.6 themes and modules that I have found and tested. There will be links to Front and Back office to test them for yourself (https://blog.haylau-4-thirtybees.co.uk/blog/)
    • A business directory for ThirtyBees specific products (support websites, modules, themes)
    • The business directory will also have a category for your own ThirtyBees powered websites - every link counts!)

    When I test a new module / theme I will update this thread

    If you have ThirtyBees specific product, or ThirtyBees powered website you can add your own details to the directory or contact me and I can add it for you

    If you want to test a module / theme you have on a fresh install then let me know and I will set one up for you

     

×
×
  • Create New...