Page 1 of 5 123 ... LastLast
Results 1 to 10 of 43
  1. #1
    Join Date
    Feb 2010
    Location
    Syracuse, NY
    Posts
    2,153
    Plugin Contributions
    17

    Default Making v154 DIY/Picaflor-Azul templates work with v1.5.5

    Making them work with v1.5.5

    This is for those upgrading their picaflor-azul or DIY Responsive templates.

    A few major changes to the responsive components.

    1 - /includes/classes/Mobile_Detect.php
    This was updated to the latest version.

    2 - /includes/functions/extra_functions/zca_responsive_functions.php
    This was added in v1.5.5

    3 - /includes/auto_loaders/config.display_mode.php
    This file was removed in v1.5.5 and replaced with config.zca_layout.php

    4 - /includes/init_includes/init.display_mode.php
    This file was removed in v1.5.5 and replaced with init.zca_layout.php

    5 - /includes/templates/responsive_classic/common/html_header.php
    The call to include the Mobile_Detect class has changed from:
    PHP Code:
    if (!class_exists('Mobile_Detect')) {
    include_once(
    DIR_WS_CLASSES 'Mobile_Detect.php'); 
    $detect = new Mobile_Detect;

    to:
    PHP Code:
    if (!class_exists('Mobile_Detect')) {
      include_once(
    DIR_WS_CLASSES 'Mobile_Detect.php');
    }
      
    $detect = new Mobile_Detect;
      
    $isMobile $detect->isMobile();
      
    $isTablet $detect->isTablet();
      if (!isset(
    $layoutType)) $layoutType = ($isMobile ? ($isTablet 'tablet' 'mobile') : 'default'); 
    the device specific if statements have changed from:
    PHP Code:
    if ($detect->isMobile() && !$detect->isTablet() or $detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode']=='isMobile' or $detect->isTablet() && $_SESSION['display_mode']=='isMobile' or $_SESSION['display_mode']=='isMobile') {
        echo 
    $responsive_mobile;
    } else if (
    $detect->isTablet() or $detect->isMobile() && $_SESSION['display_mode']=='isTablet' or $detect->isTablet() && $_SESSION['display_mode']=='isTablet' or $_SESSION['display_mode']=='isTablet'){
        echo 
    $responsive_tablet;
    } else if (
    $detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode']=='isDesktop' or $detect->isTablet() && $_SESSION['display_mode']=='isDesktop' or $_SESSION['display_mode']=='isNonResponsive'){
        echo 
    '';
    } else {
        echo 
    $responsive_default;

    to:
    PHP Code:
      if ( $detect->isMobile() && !$detect->isTablet() || $_SESSION['layoutType'] == 'mobile' ) {
        echo 
    $responsive_mobile;
      } else if ( 
    $detect->isTablet() || $_SESSION['layoutType'] == 'tablet' ){
        echo 
    $responsive_tablet;
      } else if ( 
    $_SESSION['layoutType'] == 'full' ) {
        echo 
    '';
      } else {
        echo 
    $responsive_default;
      } 
    6 - the DIY changes for /admin/layout_controller.php were never ported to v1.5.5
    You can download the v1.5.5 layout_controller.php from the GIT link in my signature.

    Cheers!
    Website - Github. Like the ZCA Bootstrap 4 Template? Donations Welcome. Bootstrap Plugins?

  2. #2
    Join Date
    Jan 2004
    Posts
    65,211
    Blog Entries
    7
    Plugin Contributions
    223

    Default Re: Making v154 Picaflor-Azul templates work with v1.5.5

    And to work in v155 if your template has an /includes/templates/YOUR_TEMPLATE/jscript/jscript_framework.php file , it needs to be replaced by copying the one from /includes/template_default/jscript/jscript_framework.php in v155
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Feb 2008
    Posts
    530
    Plugin Contributions
    0

    Default Re: Making v154 DIY/Picaflor-Azul templates work with v1.5.5

    Quote Originally Posted by rbarbour View Post
    Making them work with v1.5.5

    5 - /includes/templates/responsive_classic/common/html_header.php
    The call to include the Mobile_Detect class has changed from:
    PHP Code:
    if (!class_exists('Mobile_Detect')) {
    include_once(
    DIR_WS_CLASSES 'Mobile_Detect.php'); 
    $detect = new Mobile_Detect;

    to:
    PHP Code:
    if (!class_exists('Mobile_Detect')) {
      include_once(
    DIR_WS_CLASSES 'Mobile_Detect.php');
    }
      
    $detect = new Mobile_Detect;
      
    $isMobile $detect->isMobile();
      
    $isTablet $detect->isTablet();
      if (!isset(
    $layoutType)) $layoutType = ($isMobile ? ($isTablet 'tablet' 'mobile') : 'default'); 
    the device specific if statements have changed from:
    PHP Code:
    if ($detect->isMobile() && !$detect->isTablet() or $detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode']=='isMobile' or $detect->isTablet() && $_SESSION['display_mode']=='isMobile' or $_SESSION['display_mode']=='isMobile') {
        echo 
    $responsive_mobile;
    } else if (
    $detect->isTablet() or $detect->isMobile() && $_SESSION['display_mode']=='isTablet' or $detect->isTablet() && $_SESSION['display_mode']=='isTablet' or $_SESSION['display_mode']=='isTablet'){
        echo 
    $responsive_tablet;
    } else if (
    $detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode']=='isDesktop' or $detect->isTablet() && $_SESSION['display_mode']=='isDesktop' or $_SESSION['display_mode']=='isNonResponsive'){
        echo 
    '';
    } else {
        echo 
    $responsive_default;

    to:
    PHP Code:
      if ( $detect->isMobile() && !$detect->isTablet() || $_SESSION['layoutType'] == 'mobile' ) {
        echo 
    $responsive_mobile;
      } else if ( 
    $detect->isTablet() || $_SESSION['layoutType'] == 'tablet' ){
        echo 
    $responsive_tablet;
      } else if ( 
    $_SESSION['layoutType'] == 'full' ) {
        echo 
    '';
      } else {
        echo 
    $responsive_default;
      } 
    This file as in Responsive Sheffield Blue has other differences besides the two above. Should I merge in those two changes only, or substitute the entire file, or?

    Thanks for these tips.

    zc 1.5.5 clean install test site with Responsive Sheffiled Blue, imported database from livesite zc 1.5.4 with Responsive Westminster Black.

  4. #4
    Join Date
    Feb 2010
    Location
    Syracuse, NY
    Posts
    2,153
    Plugin Contributions
    17

    Default Re: Making v154 DIY/Picaflor-Azul templates work with v1.5.5

    Merge all the differences but when merging these 2, they have changed in v1.5.5 to what I have posted.

    Quote Originally Posted by soxophoneplayer View Post
    This file as in Responsive Sheffield Blue has other differences besides the two above. Should I merge in those two changes only, or substitute the entire file, or?

    Thanks for these tips.

    zc 1.5.5 clean install test site with Responsive Sheffiled Blue, imported database from livesite zc 1.5.4 with Responsive Westminster Black.
    Website - Github. Like the ZCA Bootstrap 4 Template? Donations Welcome. Bootstrap Plugins?

  5. #5
    Join Date
    Feb 2008
    Posts
    530
    Plugin Contributions
    0

    Default Re: Making v154 DIY/Picaflor-Azul templates work with v1.5.5

    Quote Originally Posted by rbarbour View Post
    ...
    6 - the DIY changes for /admin/layout_controller.php were never ported to v1.5.5
    You can download the v1.5.5 layout_controller.php from the GIT link in my signature...
    I had success with all these edits for using Sheffield Blue Responsive template on zc 1.5.5.

    But I ran into trouble when I tried to add WP4Zen mod on top of that. (posted on that forum). Trying to access the layout controller in the admin panel led to white blank page/error message.

    In the end I tried taking two zero's out of the layoutcontroller.php around line #66 so it now looks like this:

    PHP Code:
    // (BOF - EDIT) ZCA Responsive Components for 1.5.5

          
    $db->Execute("insert into " TABLE_LAYOUT_BOXES "
                      (layout_template, layout_box_name, layout_box_status, layout_box_location, layout_box_sort_order, layout_box_sort_order_single, layout_box_status_single, show_box_min_width)
                      values ('" 
    zen_db_input($template_dir) . "', '" zen_db_input($file) . "', 0, 0, 0, 0, 0, 0)");

    // (EOF - EDIT) ZCA Responsive Components for 1.5.5 

    I'm just fumbling in the dark but that change seems to work - I can access/use the tools/layout controller. I hope I didn't cause other problems that I've yet to see.

    Does anything jump out?

  6. #6
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,030
    Plugin Contributions
    32

    Default Re: Making v154 DIY/Picaflor-Azul templates work with v1.5.5

    Quote Originally Posted by soxophoneplayer View Post
    I had success with all these edits for using Sheffield Blue Responsive template on zc 1.5.5.

    But I ran into trouble when I tried to add WP4Zen mod on top of that. (posted on that forum). Trying to access the layout controller in the admin panel led to white blank page/error message.

    In the end I tried taking two zero's out of the layoutcontroller.php around line #66 so it now looks like this:

    PHP Code:
    // (BOF - EDIT) ZCA Responsive Components for 1.5.5

          
    $db->Execute("insert into " TABLE_LAYOUT_BOXES "
                      (layout_template, layout_box_name, layout_box_status, layout_box_location, layout_box_sort_order, layout_box_sort_order_single, layout_box_status_single, show_box_min_width)
                      values ('" 
    zen_db_input($template_dir) . "', '" zen_db_input($file) . "', 0, 0, 0, 0, 0, 0)");

    // (EOF - EDIT) ZCA Responsive Components for 1.5.5 

    I'm just fumbling in the dark but that change seems to work - I can access/use the tools/layout controller. I hope I didn't cause other problems that I've yet to see.

    Does anything jump out?
    Wanted to jump in and add this..

    The last two values you removed don't appear to have a corresponding column for those values in this SQL statement. (hence why you got the column count errors when activating the WP4Zen sideboxes) Without your edit the SQL statement has only 8 table columns named, but TEN values to insert. (So this SQL statement is either missing two table columns, or has too many values to insert)
    Last edited by DivaVocals; 27 Mar 2016 at 06:16 PM.
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  7. #7
    Join Date
    Feb 2010
    Location
    Syracuse, NY
    Posts
    2,153
    Plugin Contributions
    17

    Default Re: Making v154 DIY/Picaflor-Azul templates work with v1.5.5

    @DivaVocals

    Great explanation!

    I would assume the errors were there even before the WP4Zen side-boxes were installed.

    @soxophoneplayer

    As Crystal (@DivaVocals) pointed out, the query tried to insert 10 values into 8 columns.

    Removing , 0, 0 was the right option. I must have made one of my most common mistakes (copy and paste), the 10 values are actually used for my commercial templates which allows one to control the display on (Desktop, Tablet and Mobile) devices from the ADMIN Layout Boxes Controller.

    I will update the GIT files to reflect.


    Quote Originally Posted by soxophoneplayer View Post
    I had success with all these edits for using Sheffield Blue Responsive template on zc 1.5.5.

    But I ran into trouble when I tried to add WP4Zen mod on top of that. (posted on that forum). Trying to access the layout controller in the admin panel led to white blank page/error message.

    In the end I tried taking two zero's out of the layoutcontroller.php around line #66 so it now looks like this:

    PHP Code:
    // (BOF - EDIT) ZCA Responsive Components for 1.5.5

          
    $db->Execute("insert into " TABLE_LAYOUT_BOXES "
                      (layout_template, layout_box_name, layout_box_status, layout_box_location, layout_box_sort_order, layout_box_sort_order_single, layout_box_status_single, show_box_min_width)
                      values ('" 
    zen_db_input($template_dir) . "', '" zen_db_input($file) . "', 0, 0, 0, 0, 0, 0)");

    // (EOF - EDIT) ZCA Responsive Components for 1.5.5 

    I'm just fumbling in the dark but that change seems to work - I can access/use the tools/layout controller. I hope I didn't cause other problems that I've yet to see.

    Does anything jump out?
    Quote Originally Posted by DivaVocals View Post
    Wanted to jump in and add this..

    The last two values you removed don't appear to have a corresponding column for those values in this SQL statement. (hence why you got the column count errors when activating the WP4Zen sideboxes) Without your edit the SQL statement has only 8 table columns named, but TEN values to insert. (So this SQL statement is either missing two table columns, or has too many values to insert)
    Website - Github. Like the ZCA Bootstrap 4 Template? Donations Welcome. Bootstrap Plugins?

  8. #8
    Join Date
    Feb 2010
    Location
    Syracuse, NY
    Posts
    2,153
    Plugin Contributions
    17

    Default Re: Making v154 DIY/Picaflor-Azul templates work with v1.5.5

    OK, so I guess I didn't thoroughly explain.

    1 - /includes/classes/Mobile_Detect.php
    This was updated to the latest version and IS NOW INCLUDED in v1.5.5, so DO NOT UPLOAD the version included in your template package.

    2 - /includes/functions/extra_functions/zca_responsive_functions.php
    This was added in v1.5.5, I'm listing this because it's a NEW file that will cause CONFLICT to your template's device specific (mobileDetect) layout.

    3 - /includes/auto_loaders/config.display_mode.php
    This file was removed in v1.5.5 and replaced with config.zca_layout.php, so DO NOT UPLOAD the version included in your template package.

    4 - /includes/init_includes/init.display_mode.php
    This file was removed in v1.5.5 and replaced with init.zca_layout.php, so DO NOT UPLOAD the version included in your template package.

    5 - /includes/templates/YOUR_TEMPLATE/common/html_header.php

    This file needs to be replaced with the v1.5.5 equivalent and the (mobileDetect, javascript) additions from your templates html_header.php should be merged into the v1.5.5 file.

    I cannot list all of the templates additions but the following REQUIRED changes need to be made to your existing templates html_header.php code before merging to correctly work in v1.5.5.

    find:
    PHP Code:
    // (BOF - 2.1) Responsive DIY Template Default for 1.5.x (65)    

    if (!class_exists('Mobile_Detect')) {
    include_once(
    DIR_WS_CLASSES 'Mobile_Detect.php'); 
    $detect = new Mobile_Detect;
    }

    // (EOF - 2.1) Responsive DIY Template Default for 1.5.x (65) 
    change to:
    PHP Code:
    if (!class_exists('Mobile_Detect')) {
      include_once(
    DIR_WS_CLASSES 'Mobile_Detect.php');
    }
      
    $detect = new Mobile_Detect;
      
    $isMobile $detect->isMobile();
      
    $isTablet $detect->isTablet();
      if (!isset(
    $layoutType)) $layoutType = ($isMobile ? ($isTablet 'tablet' 'mobile') : 'default'); 
    the device specific if statements have changed from:
    PHP Code:
    if ($detect->isMobile() && !$detect->isTablet() or $detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode']=='isMobile' or $detect->isTablet() && $_SESSION['display_mode']=='isMobile' or $_SESSION['display_mode']=='isMobile') {
        echo 
    $responsive_mobile;
    } else if (
    $detect->isTablet() or $detect->isMobile() && $_SESSION['display_mode']=='isTablet' or $detect->isTablet() && $_SESSION['display_mode']=='isTablet' or $_SESSION['display_mode']=='isTablet'){
        echo 
    $responsive_tablet;
    } else if (
    $detect->isMobile() && !$detect->isTablet() && $_SESSION['display_mode']=='isDesktop' or $detect->isTablet() && $_SESSION['display_mode']=='isDesktop' or $_SESSION['display_mode']=='isNonResponsive'){
        echo 
    '';
    } else {
        echo 
    $responsive_default;

    to:
    PHP Code:
      if ( $detect->isMobile() && !$detect->isTablet() || $_SESSION['layoutType'] == 'mobile' ) {
        echo 
    $responsive_mobile;
      } else if ( 
    $detect->isTablet() || $_SESSION['layoutType'] == 'tablet' ){
        echo 
    $responsive_tablet;
      } else if ( 
    $_SESSION['layoutType'] == 'full' ) {
        echo 
    '';
      } else {
        echo 
    $responsive_default;
      } 
    6 - the DIY changes for /admin/layout_controller.php were never ported to v1.5.5 but this file was changed in v1.5.5, so DO NOT UPLOAD the version included in your template package. I provide a download for v1.5.5 via the GIT link in my signature.

    7 - As DrByte pointed out
    And to work in v155 if your template has an /includes/templates/YOUR_TEMPLATE/jscript/jscript_framework.php file , it needs to be replaced by copying the one from /includes/template_default/jscript/jscript_framework.php in v155

    Cheers!

    As stated elsewhere, all these templates are getting upgraded, if your still not sure or don't understand. Ask through the respective templates support thread. Someone will help you.
    Website - Github. Like the ZCA Bootstrap 4 Template? Donations Welcome. Bootstrap Plugins?

  9. #9
    Join Date
    May 2016
    Location
    Indiana, United States
    Posts
    184
    Plugin Contributions
    0

    Default Re: Making v154 DIY/Picaflor-Azul templates work with v1.5.5

    Hey guys,

    Hopefully one of you can help me. I'm currently using the newest Responsive Sheffield Blue template with the newest version of Zen Cart. Everything was working perfectly until I tried to create a new column/field for user registration. As soon as I did that I couldn't login, create new users or anything and the error code "An unknown response null: :text/html; charset=utf-8: :SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data was received while processing an ajax call. The action you requested could not be completed." popped up.

    I removed the two random rows I inserted by accident when trying to create a column in the "zen_customers" part of my database. After I did that I could then login again and create new users but that same error message still pops up which is weird.

    I click login, error message pops up, click okay, proceeds to login page and I can login as normal. Help please.

    I'd link you to my site but it's all local as I'm learning Zen Cart and I haven't really coded anything for about 6 years.

    Gif of what's happening - https://gyazo.com/15b3a8802a00353ca009a1b291bbf78c

    Thanks in advance.

    Ash.

  10. #10
    Join Date
    Jul 2009
    Location
    picaflor-azul.com
    Posts
    6,918
    Plugin Contributions
    45

    Default Re: Making v154 DIY/Picaflor-Azul templates work with v1.5.5

    Quote Originally Posted by CSGODeimos View Post
    Hey guys,

    Hopefully one of you can help me. I'm currently using the newest Responsive Sheffield Blue template with the newest version of Zen Cart. Everything was working perfectly until I tried to create a new column/field for user registration. As soon as I did that I couldn't login, create new users or anything and the error code "An unknown response null: :text/html; charset=utf-8: :SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data was received while processing an ajax call. The action you requested could not be completed." popped up.

    I removed the two random rows I inserted by accident when trying to create a column in the "zen_customers" part of my database. After I did that I could then login again and create new users but that same error message still pops up which is weird.

    I click login, error message pops up, click okay, proceeds to login page and I can login as normal. Help please.

    I'd link you to my site but it's all local as I'm learning Zen Cart and I haven't really coded anything for about 6 years.

    Gif of what's happening - https://gyazo.com/15b3a8802a00353ca009a1b291bbf78c

    Thanks in advance.

    Ash.
    See the second post of this thread for the answer.

    Thanks,

    Anne
    Mobile Friendly Responsive Zen Cart Design
    Convert your zen cart easily with our Free Responsive Zen Cart Templates
    Check them out!

 

 
Page 1 of 5 123 ... LastLast

Similar Threads

  1. Replies: 1
    Last Post: 3 Feb 2013, 01:10 AM
  2. v150 how to remove "www.picaflor-azul.com" link from slider?
    By fatimazboutique in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 12 Nov 2012, 09:19 AM
  3. v150 Mystery box I can't remove in Cambridge Pro Template by Picaflor Azul
    By Feznizzle in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 1 Sep 2012, 06:39 PM
  4. Replies: 3
    Last Post: 2 Mar 2012, 02:10 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR