![]() |
Can I use SitePal in X-cart?
http://www.oddcast.com/sitepal2/howworks/how/
I downloaded and read the basic manual and it seems like something that might be possible until I saw where you have to put code between the <head> tags of the page you want it to display. Since xcart is php or tpl and not html, is there an alternate place to put code that belongs in the HEAD section of an HTML page? Thanks! :) |
There is indeed a head part of the page. Even though X-Cart is php based, the output is still html or the browsers wouldn't be able to read it :) Open up customer/home.tpl and add the code in the <head> tag :)
However, it will show up on every page unless you use {if} tags.... |
Thanks for the info!
I opened the home.tpl and sure enough - there are the HEAD tags. Now to figure out how to set up {if} statements so that it shows up on a certain page.
Do you have any examples of this type of statement? (sorry so ignorant) :oops: |
Which pages do you want that application to show up on?
|
Hmmm
Well for starters I know the home page. I am guessing that they will want it to be in at least the main category pages, and probably the check out page too.
I know this is vague but my client told me of this idea a few days ago and we haven't discussed in depth exactly "where" we want this to appear. However, I am pretty sure of the ones I mentioned above. Here is the example code that would go into the HEAD and BODY tags: http://www.bryanshobbyshop.com/images/SitePal_ex01.jpg I just need an example of how to structure an {if} statement to implement this on a page or pages in xcart. |
Oh so there ARE two pieces. So that should make it easy then...as it looks like the piece that goes in the head doesn't actually call it, but the part that goes in the body does. So....just put the body piece on the templates that you want. Be sure to put {literal} tags around the code as well.
|
Okay!
The BODY tag part I pretty much understand. ANd I know that some of the tpls are called or included inside other tpls. So I guess it is just a matter of figuring out which is the main tpl at that moment and putting the HEAD info there and adding the BODY tag code in what ever tpl is included at that time.
If that makes sense to you.... I'm still trying to learn Smarty code. :) Do I know what I am talking about here?? :? |
Just put it in customer/main/welcome.tpl for the time being, that will show it on the home page only. After that, you can figure out where you want it to appear and just include the code on those specific templates.
|
Okay!
That gives me a starting point. If I get this to work correctly, I will let you know. Thanks for your help and insight! :)
|
This is what i did at my site for SitePal.
In shopcart/skin1/home.tpl I placed the code in the <head> section: Replace ????? with your account number. Code:
{literal}<script language="JavaScript" type="text/javascript" src="https://vhost.oddcast.com/vhost_embed_functions.php?acc=?????&js=1&followCursor=1"></script>{/literal} And then I created a new file in shopcart/skin1/customer/sitepal.tpl Replace ????? with your account number. This shows at 140 pixcels wide and 105 pixcels high Code:
{capture name=menu} Then just call this in your shopcart/skin1/customer/home.tpl file Code:
{ include file="customer/sitepal.tpl" } Like this: Code:
Hope this helps. You can see the finished version at http://www.shisha.co.uk/shopcart/home.php |
All times are GMT -8. The time now is 04:57 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.