X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Third Party Add-Ons for X-Cart 4 (https://forum.x-cart.com/forumdisplay.php?f=45)
-   -   X-Cart - reBOOT - Responsive Template (https://forum.x-cart.com/showthread.php?t=66570)

PhilJ 09-04-2019 06:39 AM

Re: X-Cart - reBOOT - Responsive Template
 
@Pinakin...

1) In skin/reboot/customer/home.tpl

Before...
Code:

</head>
Insert...

Code:

<script>var $ccatid;{if $current_category.categoryid}$ccatid={$current_category.categoryid};{/if}</script>
2) In skin/reboot/js/custom/reboot_products.js

After...
Code:

        setGrid(); // USAGE: setGrid(); or setRows(); or setList();

    }

Insert...
Code:

    // Set Products Layout to 'List' for Specific Categories
    //------------------------------------------

    if ($ccatid){
        var prev_products_layout = products_layout;
        console.log("Current Layout: "+prev_products_layout);
        console.log("Category ID: "+$cat);
        if ($ccatid == 7 || $ccatid == 999999999){
            $('.products-container .item').removeClass('col-xs-12 col-sm-6 col-md-4 col-lg-4 col-lg-12 grid-view rows-view list-view').addClass('col-lg-12 list-view');
            $('button.switcher').removeClass(selectedClass);
            $('button.switch_layout_list').addClass(selectedClass);
        } else {
            if (prev_products_layout == 'Grid') {
                setGrid();
            } else if (prev_products_layout == 'Rows') {
                setRows();
            } else if (prev_products_layout == 'List') {
                setList();
            }
        }
    }

Replace the numbers in red with the category ID(s).

zone1creative 09-04-2019 06:43 AM

Re: X-Cart - reBOOT - Responsive Template
 
Awesome stuff Phil .
Thanks

peggyr 09-11-2019 04:06 PM

Re: X-Cart - reBOOT - Responsive Template
 
Thanks Phil,

It has taken me a while to figure your reBOOT template out, but have made exponential progress this week. Looking forward to new update.

THANK YOU SO MUCH! Just tested mobile on my phone, and it works great --

thank you , thank you, thank you!

peggyr 09-16-2019 05:49 PM

Re: X-Cart - reBOOT - Responsive Template
 
Hi Phil,

I'm just confirming the wordpress level to use with reBOOT 4.7.11 on a 4.7.11 Goldplus.

I had installed wordpress 5.2.3 but would get publish failed when trying to publish a new post.

Then I saw the install.txt had "Currently supports Wordpress v4.7 - https://wordpress.org/download/"

So, I downloaded and installed 4.7, and now I get a fatal error

Uncaught Error: Call to undefined function determine_locale() in /homepages/11/999/htdocs/xcart/blog/wp-includes/script-loader.php:1199 Stack trace: #0 /homepages/11/999/htdocs/xcart/blog/wp-includes/class-wp-hook.php(298): wp_default_scripts(Object(WP_Scripts)) #1

what is the correct version I should be using? 4.7 or some later revision? If it is 4.7, I'll go back and retrace my steps to see if I created another problem somewhere

Thanks.

PhilJ 09-17-2019 01:40 AM

Re: X-Cart - reBOOT - Responsive Template
 
POST UPDATED 15th Oct 2019

You can actually use WP v5.2.4, which the demo is using (also using PHP v7.3.9)

WP auto-updates can break the blog, so I recommend disabling them in favour of manual updates...

In /blog/wp-config.php at the very end insert...
Code:

define( 'WP_AUTO_UPDATE_CORE', false );
/blog/includes/script-loader.php is a core file that sometimes get's overwritten when an update is performed.

If the blog is broken as a result of an update, in /blog/includes/script-loader.php *

Replace...
Code:

    // jQuery
    $scripts->add( 'jquery', false, array( 'jquery-core', 'jquery-migrate' ), '1.12.4-wp' );
    $scripts->add( 'jquery-core', '/wp-includes/js/jquery/jquery.js', array(), '1.12.4-wp' );
    $scripts->add( 'jquery-migrate', "/wp-includes/js/jquery/jquery-migrate$suffix.js", array(), '1.4.1' );

With...
Code:

    // jQuery
    if(is_admin()) { // reBOOT Template
    $scripts->add( 'jquery', false, array( 'jquery-core', 'jquery-migrate' ), '1.12.4-wp' );
    $scripts->add( 'jquery-core', '/wp-includes/js/jquery/jquery.js', array(), '1.12.4-wp' );
    $scripts->add( 'jquery-migrate', "/wp-includes/js/jquery/jquery-migrate$suffix.js", array(), '1.4.1' );
    } // reBOOT Template

You should also ensure that /blog/.htaccess is blank and non-writable, so CHMOD it to 444, which you may or may not be able to do in your FTP client, in which case use your control panel file manager to change it's permissions.

That's really all you need to know. The Alienship theme has to be used as it's Bootstrap 3 based. The next reBOOT reDUX blog uses this theme instead which is Bootstrap 4 based.

Some WP plugins will work, some may not. You should also be aware that some plugins may be dangerous or call home etc. so be careful what you install.

I recommend using the Yoast plugin for tweaking the SEO.

reBOOT reDUX has it's own blog feature if you don't wish to use WP. I am trying to get reDUX finished ASAP.

* IMPORTANT UPDATE:

To avoid the issue with /blog/includes/script-loader.php
In /blog/wp-content/themes/alienship/functions.php
At the end insert...
Code:

if (!is_admin()) {
    wp_deregister_script('jquery');
    wp_register_script('jquery', '', '', '', true);
}


peggyr 09-19-2019 12:04 PM

Re: X-Cart - reBOOT - Responsive Template
 
Thanks Phil and Paul,

I have WP 5.2.3 working and am on PHP 7.3.9. I needed to use the Classic Editor (thx Paul) to successfully publish a BLOG page or post and since I'm using a subdirectory for this store, I had to add the

RewriteBase /xcart/ to my .htaccess file.

I also had turned on 'clean urls' which turned out if it was listed 'first' in the .htaccess file, before the 'reBOOT' updates to .htaccess, I got 404. When I changed the order for the reBOOT lines first, followed by the clean urls, it worked.

I just reran a test on the order, and failed with 404 on blog entry if clean URLs are first, and succeed if reBOOT blog updates first as shown below.

# Wordpress Blog [[[
RewriteEngine On
#RewriteBase /
RewriteBase /xcart/
RewriteRule ^blog/(wp-login\.php|wp-admin|wp-includes|wp-content|wp-comments-post\.php|wp-cron\.php|xmlrpc\.php)(.*)$ blog/$1$2 [QSA,L]
RewriteRule ^blog/(.*).(css|js|gif|jpg|png|html|php)$ reboot_blog.php?incl_file=$1.$2 [QSA,L]
RewriteRule ^blog/.*$ reboot_blog.php?url=$1 [QSA,L]
RewriteRule ^blog$ reboot_blog.php [QSA,L]
# /Wordpress Blog ]]]

# Clean URLs [[[
# Options +FollowSymLinks -MultiViews -Indexes
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /xcart/
RewriteCond %{REQUEST_URI} !^/xcart/(payment|admin|provider|partner)/
RewriteCond %{REQUEST_URI} !^/server-status
RewriteCond %{REQUEST_URI} !\.(gif|jpe?g|png|js|css|swf|php|ico|svg|tif|avi|m p3|mp4|flv)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ dispatcher.php [L]
</IfModule>
# /Clean URLs ]]]

peggyr 09-24-2019 11:30 AM

Re: X-Cart - reBOOT - Responsive Template
 
In case this is helpful for others, I was having a 'layout alignment' when resizing screen for featured categories.

Phil told me a couple changes to try, in the following 2 files, which worked for me.

in /skin/reboot/css/reboot.css -- I changed max-height value from 100 to 150 for class .featured_category_icon in

in /skin/reboot/custom/home/home_featured_categories.tpl -- I changed the truncate value from 150 to 155 for {$c.description|truncate:155:"...":true}

Including here in case helpful for others.

Thanks again Phil!

PhilJ 09-24-2019 02:13 PM

Re: X-Cart - reBOOT - Responsive Template
 
Small favour...

For reDUX I'm planning to use Minify to serve the template CSS/JS assets separately from the X-Cart assets and I would like to do a quick survey to see if it works on most servers.

If you have a spare moment, please grab this file (it's safe) and upload the /min folder to your store root, then try the following in your browser...

https://www.yourdomain.com/min/?f=min/quick-test.css

If CSS code appears, it works. Please drop me a quick PM (don't reply here) letting me know if it worked or not, along with your PHP version.

If it doesn't work, please let me know what type of server you have.

Then just delete the /min folder. If you're using less than PHP v5.3, no need to bother.

I appreciate your time, TIA :)


Updated 18/03/20, new link to zip file.

PhilJ 10-10-2019 01:22 AM

Re: X-Cart - reBOOT - Responsive Template
 
Mad, what have I started? So much to do.

zone1creative 10-10-2019 01:53 AM

Re: X-Cart - reBOOT - Responsive Template
 
Quote:

Originally Posted by PhilJ
Mad, what have I started? So much to do.


Damn!! that form is longer than the one for getting UK settlement after brexit

elmirage001 10-10-2019 11:19 AM

Re: X-Cart - reBOOT - Responsive Template
 
Quote:

Originally Posted by PhilJ
Mad, what have I started? So much to do.


Hi Phil !

Wow! I better start sleeping now :-)

A couple of questions please.

1. Are you changing from WordPress to your own CMS?
2. Is there a way to incorporate "srcset" into reDUX?

My WooCommerce competition is killing me when it comes to Google displaying my images in my listings. WordPress makes use of srcset and my blog post images display nicely but because x-cart does not use srcset Google does not display many of my images like they do for WooCommerce.

Thanks again for all you do!

Paul

PhilJ 10-13-2019 05:26 AM

Re: X-Cart - reBOOT - Responsive Template
 
Hi Paul,

1) There's basic blog functionality available, whereby you just elect one of your parent categories as the main blog category, example.

Or you can use the included Wordpress addon, example.

2) reDUX uses lazysizes for general lazyloading, so there is scope to use SRCSET in X-Cart, but there's also JSON-LD to encourage Google in the listings.

Don't forget the image sitemap generator also.

You can PM me your competitors URL(s) and I'll take a look to see how they are doing it.

elmirage001 10-13-2019 03:55 PM

Re: X-Cart - reBOOT - Responsive Template
 
Hi Phil !

Quote:

Originally Posted by PhilJ
1) There's basic blog functionality available, whereby you just elect one of your parent categories as the main blog category, example.

Or you can use the included Wordpress addon, example.


Perfect!!

Quote:

Originally Posted by PhilJ
2) reDUX uses lazysizes for general lazyloading, so there is scope to use SRCSET in X-Cart, but there's also JSON-LD to encourage Google in the listings.

Don't forget the image sitemap generator also.

You can PM me your competitors URL(s) and I'll take a look to see how they are doing it.

lazysizes uses size and picture so that should work and JSON-LD will be the icing :-)

Thank you so much! Paul

PhilJ 10-15-2019 02:17 AM

Re: X-Cart - reBOOT - Responsive Template
 
For those using the Wordpress blog, I've found a workaround for the script-loader.php issue.

In /blog/wp-content/themes/alienship/functions.php

At the end insert...
Code:

if (!is_admin()) {
    wp_deregister_script('jquery');
    wp_register_script('jquery', '', '', '', true);
}

After that, future wordpress updates should not break the blog.

Pitak 10-27-2019 10:08 PM

Re: X-Cart - reBOOT - Responsive Template
 
When I access the admin page, I've to login multiple times for it to work. The first time I login, it loads the admin page. But when I click on any other links on the page, I've to login again. This happens about 2-3 times consecutively. Then it seems to work normally. Does anyone know how to fix this?

zone1creative 11-02-2019 12:29 AM

Re: X-Cart - reBOOT - Responsive Template
 
1 Attachment(s)
Hi I have noticed that firefox 70 is rendering grid viewing like so on reboot/bootstrap 3


any ideas on a solution?


Attachment 5403

peggyr 11-16-2019 10:49 AM

Re: X-Cart - reBOOT - Responsive Template
 
Hi Phil,

I must be missing something obvious, but can't seem to find how to generate an html out of the entries in languages for FAQs Q and A.

I understand how to update a file, like {**{include file="custom/footer/footer_heading.tpl" title=$lng.lbl_reboot_footer_heading_CT} *} Where I can add an 'html' file, such as frequently_asked_questions.html

Should I be able to generate an html file from the languages FAQs entries, or are these enabled some other way. I'm missing something, but can't figure out what.


Thanks.

Peggy

PhilJ 11-17-2019 05:40 AM

Re: X-Cart - reBOOT - Responsive Template
 
1 Attachment(s)
Hi Peggy, create a new FAQ static page and use this code...
Code:

{include file="custom/faqs/general_faq.tpl"}
Ensure "Parse Smarty tags in the content of embedded static pages" is checked in Admin > General Settings > Misc

Then use the admin reBOOT menu to modify the Q&A language labels.

Or you can edit and apply the attached SQL patch which contains all the Q&A's.

If you want to display product FAQs, install the 'Product Additional Data' addon.

peggyr 11-17-2019 08:48 AM

Re: X-Cart - reBOOT - Responsive Template
 
Hi Phil,

What I needed was to create a static page with the following

{include file="custom/faqs/general_faq.tpl"}

THANKS!

Peggy

peggyr 11-17-2019 04:36 PM

Re: X-Cart - reBOOT - Responsive Template
 
Hi Phil,

I've decided I do NOT need/want the wordpress blog add-on into reboot.

I'd like to clean up my store from the un-needed files.

In addition to 'unchecking' the blog admin in the reBoot templates,

Can I just

1) delete the blog folder

2) remove the update to .htaccess for the blog access in the root directory

3) delete the wpxxx tables from the db?

Of is there some 'uninstall' of the wordpress blog that needs to be done?

Thanks

Peggy

PhilJ 11-18-2019 02:55 AM

Re: X-Cart - reBOOT - Responsive Template
 
Yes, those 3 steps are correct and safe to perform to remove the WP blog.

peggyr 11-19-2019 12:39 PM

Re: X-Cart - reBOOT - Responsive Template
 
One other update needed to 'remove' the Wordpress blog was update, auth.php and remove the blog add on

# Remove BLOG add on
# if ($config['Reboot']['reboot_blog_addon'] == "Y") {
# include './reboot_blog_latest.php';
# }

Peggy

zone1creative 11-29-2019 04:13 AM

Re: X-Cart - reBOOT - Responsive Template
 
2 Attachment(s)
Hi Is there a way we could show the basket total and number of items in the basket on reboot for desktop and mobile.

It would need to update on the add to basket popup too?

A bit like in the images attached.

PhilJ 11-29-2019 05:14 AM

Re: X-Cart - reBOOT - Responsive Template
 
Hi Pinakin, look for the setting "Minicart button display" in the reBoot Settings > Theme.

zone1creative 11-29-2019 07:11 AM

Re: X-Cart - reBOOT - Responsive Template
 
Phil you have thought of everything!

peggyr 01-16-2020 05:54 PM

Re: X-Cart - reBOOT - Responsive Template
 
Hi,

I had the same problem. I realized that trying Firefox on a different computer worked fine (3 cols across). But on my main computer, I got 2 cols across.

I tried to access https://www.zpz.cn/ but never got to a product layout, only to Chinese.

What fixed my system was to 'clear everything' in options -- and that cleared up my problem on my main PC -- but doesn't say others wouldn't run in to it.

You may want to try a test, and

1) either try using Firefox on another PC

2) clear all history as in attachment

While this is not something you could have a customer do, it may give you more information

peggyr 01-17-2020 09:04 AM

Re: X-Cart - reBOOT - Responsive Template
 
Hi,

I was able to get 3 columns of your site under firefox, when I MAXED the screen on my PC see attached

The product (recommended thumbnail size is 50x50-150x150) when you add a product. I have all my product thumbnails 150x150.

Your product image (the one I checked) appears to be 520x260. I don't know if this is causing your problem.

The different browsers may process resizing images differently, eg, working on Chrome and not on Firefox.

PhilJ 01-19-2020 03:23 AM

Re: X-Cart - reBOOT - Responsive Template
 
@cheap, change your permalink setting in WP Admin. If the blog breaks, just ensure /blog/.htaccess is blank, then change permissions on it to 444 so it can't be written to.

In /skin/reboot/custom/footer/footer_content_BP.tpl

Replace {$post.guid} with {$post.post_name}

PhilJ 01-21-2020 01:13 AM

Re: X-Cart - reBOOT - Responsive Template
 
Use truncate
Quote:

{$post.post_title|truncate:30:"...":true}

PhilJ 01-21-2020 12:40 PM

Re: X-Cart - reBOOT - Responsive Template
 
2 Attachment(s)
Drop-in replacement for the breadcrumbs, to fix the "data-vocabulary.org schema deprecated" issue from Google.

Upload attached to /skin/reboot/customer

It includes JSON-LD stuctured data also :D

UPDATED 30th JAN TO HANDLE SPECIAL CHARACTERS BETTER

PhilJ 01-21-2020 03:05 PM

Re: X-Cart - reBOOT - Responsive Template
 
@ cheap, try this instead...

In /skin/reboot/custom/footer/footer_content_BP.tpl

Replace...
Code:

<ul class="angles footer">
{foreach from=$blog_latest item=post name=post}
<li><a href="{$post.post_name}">{$post.post_title}</a></li>
{/foreach}
</ul>

With...
Code:

{foreach from=$blog_latest item=post name=post}
<div class="footer-truncate{if $smarty.foreach.post.last} last{/if}"><i class="fa fa-angle-right"></i> <a href="{$post.post_name}">{$post.post_title}</a></div>
{/foreach}

Then in /skin/reboot/css/reboot.css

At the end insert...
Code:

.footer-truncate { margin: 0; padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,.1); width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.footer-truncate.last { border-bottom: none; }
.footer-truncate a:link { color: #fff !important; text-decoration: none !important; padding-left: 3px; }

Then clear the template cache.

PhilJ 01-30-2020 12:32 PM

Re: X-Cart - reBOOT - Responsive Template
 
breadcrumbs.tpl updated to support special characters and validate better.

zone1creative 01-31-2020 02:04 AM

Re: X-Cart - reBOOT - Responsive Template
 
Quote:

Originally Posted by PhilJ
Drop-in replacement for the breadcrumbs, to fix the "data-vocabulary.org schema deprecated" issue from Google.

Upload attached to /skin/reboot/customer

It includes JSON-LD stuctured data also :D

UPDATED 30th JAN TO HANDLE SPECIAL CHARACTERS BETTER


Thanks Phil, This is to do with data-vocabulary being depreciated by google.

PhilJ 01-31-2020 02:29 AM

Re: X-Cart - reBOOT - Responsive Template
 
@pinakin no, just structured data for the breadcrumb ^

PhilJ 02-14-2020 03:22 AM

Re: X-Cart - reBOOT - Responsive Template
 
Quote:

how to change blog to other fold name, say news?
There's not a quick way of doing that unfortunately, but you'll need to change references to /blog in your root .htaccess file and reboot_blog.php file.

You'll obviously need to change the WP config settings and need to change the posts and images absolute paths in the WP database tables - example SQL patch code is provided in the WP blog addon install.txt file.

There's more general info on 'moving' a WP site here.

jmccunep 03-07-2020 11:53 AM

Re: X-Cart - reBOOT - Responsive Template
 
1 Attachment(s)
ReBoot must be adding the See Also tab and its contents, and adding content to the Recommended tab. Both tabs are displayed below each product in my store.

How/where is the content of those tabs modified, besides through the Related Products link under Product Management for each product?

See attached image.

PhilJ 03-07-2020 11:59 AM

Re: X-Cart - reBOOT - Responsive Template
 
'See Also' products are your defined 'upselling' products in product modify. You may know them as Related Products, if you have changed the language label.

Recommended are from the 'recommended products' module.

peggyr 03-11-2020 05:36 PM

Re: X-Cart - reBOOT - Responsive Template
 
Hi Phil,

Should reBOOT 4.7.11 work with PHP 7.4? I'm going to upgrade to 4.7.12 and want to use PHP 7.4 when I do. Should reBOOT 4.7.11 work as well?

It may have been mentioned earlier in this thread, but I didn't see it.

Thanks.

Peggy

PhilJ 03-12-2020 02:48 AM

Re: X-Cart - reBOOT - Responsive Template
 
@ Peggy, yes it should work fine, I don't foresee any issues, but I'm still waiting for CPanel to release PHP 7.4 for EasyApache4, which should be any day now.

For the moment, I'm updating the old and new reBOOT templates to support v4.7.12.

dpcompany 03-12-2020 04:28 AM

Re: X-Cart - reBOOT - Responsive Template
 
Yeah, I recently spoke with my host regarding PHP 7.4 for cPanel, but they didn't have a definite release date. When it gets released, if someone could post and update in this thread to let others know, I am sure others would appreciate it as much as I would.


All times are GMT -8. The time now is 06:44 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.