Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
 All Forums
 General
 Off topic, News and Updates
 Updating - css/ectcart.css and js/ectcart.js
Author « Topic »  

Andy
ECT Moderator

95440 Posts

Posted - 02/20/2017 :  06:51:43  
When updating to the latest versions of the store, the javascript has been extracted from the cart pages and placed in an external file and the CSS has also been added to an external style sheet. These changes bring considerable performance and search engine ranking improvements to the cart, but mean that if you are updating from an older version you may need to add these two files to the head section of your cart pages...

<link rel="stylesheet" type="text/css" href="/css/ectcart.css">
<script src="/js/ectcart.js"></script>


Placement of these files is discussed in greater detail below.

Andy

Please feel free to review / rate our software

Andy
ECT Moderator

95440 Posts

Posted - 03/28/2017 :  13:26:51  
The file ectcart.css contains all the formatting of the main forms used on the ECT stores. As you've probably noticed it has evolved over time to incorporate the css required by the new features we've been adding, and as we continue to improve the shopping cart feature set, the ectcart.css file has become central to those improvements.

For that reason we strongly advise that the file isn't edited, much in the same way we advise against editing core ECT admin files as going forward it will make updating more problematic.

Obviously there are going to be times when you need to make changes to the standard css we provide and this is what we suggest

  • Any changes should be added to your store css file not to ectcart.css

  • Any changes you make should be commented so they are easy find in your main css file, use this syntax for commenting
    /* Comments go here */

  • Make sure the path to your ectcart.css file comes before your main store css file in the <head> section of pages so any changes you make there take precedent

  • Any entries you then make in your main store css file will overwrite those defined in ectcart.css

  • If necessary you may have to use !important for the formatting to take precedence eg color:#fff !important;


How to add the file ectcart.css to your site

You'll see in the updater there's a folder called /ccs/ - this needs uploading via your FTP program to the store root (where you have the cart, product, search etc pages)

Now you need to link to that file from your store pages

Dreamweaver and Expression Web

In your dwt file add this line before your main css file line

<link rel="stylesheet" type="text/css" href="/css/ectcart.css"/>

so that would typically look like this in your code

<link rel="stylesheet" type="text/css" href="/css/ectcart.css"/>
<link rel="stylesheet" type="text/css" href="/style.css"/>

Save the dwt file, make sure all your store pages are updated with the change and then upload them all to your server as per normal

Wordpress

In the header.php file add the following before your other css lines

<link rel="stylesheet" type="text/css" href="/css/ectcart.css"/>

..and save the file

Other editors

Add this line on all your store pages. It will go somewhere in the <head> section and before your main css file

<link rel="stylesheet" type="text/css" href="/css/ectcart.css"/>

Andy

Please feel free to review / rate our software

Andy
ECT Moderator

95440 Posts

Posted - 05/30/2017 :  02:42:08  
One of the major features of ECT Version 6.9.3 is the enhanced performance of the store pages. Your pages will load faster and hopefully you’ll notice the difference in speed. One of the things we have done here is move the javascript to an external file. This has many benefits, your page will load faster but subsequent pages will already have the js downloaded so they too will speed up more as a result. It also means from an SEO point of view that there’s less code for the search engines to go through to get to your keywords and main content.

This does mean you will need to add one line of code the <head> section of your store pages

<script src="/js/ectcart.js"></script>

..and make sure you upload the ectcart.js file to the /js/ folder on the server. If you don’t have a directory called /js/ you can simply create one

Dreamweaver and Expression Web

In your dwt file add this line somewhere before the closing </head> tag, the exact location in the head section isn’t so important

<script src="/js/ectcart.js"></script>

Save the dwt file, make sure all your store pages are updated with the change and then upload them all to your server as per normal

Wordpress

In the header.php file add the following with your other js lines

<script src="/js/ectcart.js"></script>

..and save the file

Other editors

Add this line on all your store pages. It will go somewhere in the <head> section

<script src="js/ectcart.js"></script>

NOTE
Every time you update, you also need to also update the css/ectcart.css file and the js/ectcart.js files.

Andy


Please feel free to review / rate our software

yusuf691
New Member

USA
98 Posts

Posted - 09/24/2022 :  09:31:18  
I tried to add the lines and keep getting the error messages can you please look into this

the entire site stopped working

i can send you seperate message with my site credentials


Thanks

Vince
Administrator

42466 Posts

Posted - 09/24/2022 :  15:41:46  
Hi yusuf691
Sure thing, just send all details to vince AT ecommercetemplates DOT com and I'll take a look. If you can send the site FTP login I may be able to fix things for you.

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

ckempter
Starting Member

Australia
8 Posts

Pre-sales questions only
(More Details...)

Posted - 10/19/2022 :  10:07:47  
Are these instructions assuming that the template is located at the same level of the ecommerce software?
Where will the system be looking for the files in the following two statements (at the top level or at the level of the ecommerce software)?
<link rel="stylesheet" type="text/css" href="/css/ectcart.css">
<script src="/js/ectcart.js"></script>

1818charlie
ECT Moderator

United Kingdom
1180 Posts

Posted - 10/19/2022 :  13:49:41  
Hi Colin

If your store is inside any folder other than the root then the reference to the css/js files would require to reflect such. Most stores will be in the root & as such wouldn't need any change making, but if your store is in another folder, for example a folder named shop then the reference would be

<link rel="stylesheet" type="text/css" href="shop/css/ectcart.css">
<script src="shop/js/ectcart.js"></script>

Normally, & in majority of cases, all the ECT software files are uploaded to the root so making any changes to the references isn't usually required.

-----------------------------------------------
Steve
Manchester UK

How to update your store
https://www.ecommercetemplates.com/updater_info.asp

QuickBuy, Product & Product Details Layouts
https://www.ecommercetemplates.com/help/layouts.asp

User Manual - an easy read!
https://www.ecommercetemplates.com/free_downloads.asp#usermanual

Request Updater
https://www.ecommercetemplates.com/updaters.asp

Edited by - 1818charlie on 10/19/2022 13:51:29

ckempter
Starting Member

Australia
8 Posts

Pre-sales questions only
(More Details...)

Posted - 10/20/2022 :  10:11:56  
I have just upgraded to version 7.4.1. I am getting a bug in products.php

BUG: Fatal error: Only variables can be passed by reference in /home/austra20/public_html/ECommerce/vsadmin/inc/incproductbody.php on line 182

I have included the ectcart css and js references.

Could I get your suggestions please?

Vince
Administrator

42466 Posts

Posted - 10/20/2022 :  11:16:45  
This is sorted now and was because you were including files which were one directory up and which hadn't been updated. This is an example...

<?php include "../vsadmin/inc/inccart.php" ?>

That should have been...

<?php include "vsadmin/inc/inccart.php" ?>

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.03 seconds. Snitz Forums 2000