Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Redirect & Scripting Issue

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-30-2006, 10:01 AM
  neaisha's Avatar 
neaisha neaisha is offline
 

eXpert
  
Join Date: May 2006
Posts: 276
 

Default Redirect & Scripting Issue

Hi,

I moved my site to the root directory and like most, I had to redirect index.html to home.php.

I would like to install a "Live Chat" feature on my website but believe that the script is unable to run properly due to the redirect.

No matter what "Live Chat"/Support script I use, the script either does not show me as being online when I clearly am OR, it allows customers to create support tickets without alerting me.

Question 1: Is there a way to have the site go directly to index.html like it's supposed to AND have index.html update automatically vs. manually?

Question 2: When installing a script in a .tpl file, do I need to include anything in the .tpl to get the script to work correctly? Beyond putting separators, I've not added anything extra. Is the script itself enough or should I be coding more?

Thanks
__________________
X-Cart Gold 4.4.3
--------------------------------------
Reply With Quote
  #2  
Old 08-30-2006, 10:50 AM
  neaisha's Avatar 
neaisha neaisha is offline
 

eXpert
  
Join Date: May 2006
Posts: 276
 

Default Re: Redirect & Scripting Issue

A better question might be, how do you add javascript to x-cart?

Say I want to add a simple visitor counter or clock, where would I put it?
__________________
X-Cart Gold 4.4.3
--------------------------------------
Reply With Quote
  #3  
Old 08-30-2006, 11:36 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Redirect & Scripting Issue

Ok first, you can't use index.html if you want to use dynamic features of X-Cart. An .html page is a static page. You shouldn't be using a redirect, you should have this in your .htaccess file:

DirectoryIndex home.php

That won't screw up any of your scripting.

Next, you don't want to use a hits counter that people can see, very 90s If you want to install tracking software, live chat or a clock, the scripts will probably go in customer/home.tpl, as that is where the <head> tag lives, and most JavaScripts go in the <head> tag. YOu will probably have to surround them with {literal} tags, like so:

{literal}script here{/literal}

Finally, having multiple JavaScripts on your page can cause compatibility issues, as some scripts don't work well with others. LiveChat sounds like your most important one, so get that working first and then worry about the clock and counter.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #4  
Old 08-30-2006, 11:53 AM
  neaisha's Avatar 
neaisha neaisha is offline
 

eXpert
  
Join Date: May 2006
Posts: 276
 

Default Re: Redirect & Scripting Issue

thanks sooooooooo much.

no, i'm not cheesy enough to put a counter/clock.

I figured that if someone could tell me how to install a counter, I'd be able to do the same with the live chat script.

The feature works but it's not monitoring who's on my site which is a secondary purpose of the script.

Either way, thanks tons! I sware balinor if you don't know everything, you're da*n sure close.
__________________
X-Cart Gold 4.4.3
--------------------------------------
Reply With Quote
  #5  
Old 08-30-2006, 11:57 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Redirect & Scripting Issue

Oh trust me, there is PLENTY I don't know

Make sure the installation instructions on the live chat software don't inclue a piece of code in the body of the site as well. I think there are some live chat discussions around here somewhere. Try searching for 'live chat'...this search is so much better you will actually get relevant results
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #6  
Old 09-26-2006, 07:09 PM
  neaisha's Avatar 
neaisha neaisha is offline
 

eXpert
  
Join Date: May 2006
Posts: 276
 

Default Re: Redirect & Scripting Issue

hey,

the scripting issue as far as putting the visitor monitoring code works as long as the visitor is at my site un/insecurely. meaning, when it goes to https, i'm no longer able to monitor them.

so if a customer's payment declines, i'd like the option of working them through the procedure but again, when they go to secure mode, they disappear off the monitoring software.

how do i monitor the vistor in https? meaning, how do i place code in the before the end of the <head> tag when they're in secure mode?

thanks
__________________
X-Cart Gold 4.4.3
--------------------------------------
Reply With Quote
  #7  
Old 09-27-2006, 02:36 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: Redirect & Scripting Issue

The script should still be there even in https mode, as it uses the same tempalte (customer/home.tpl). Do you have an {if} statement in there or a custom mod of some sort that uses a different home.tpl for checkout?
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:29 PM.

   

 
X-Cart forums © 2001-2020