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

Can I use SitePal in X-cart?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 08-04-2005, 07:45 AM
 
marian marian is offline
 

Senior Member
  
Join Date: Mar 2005
Posts: 103
 

Default 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!
__________________
Xcart Gold 4.0.13
OS: Linux
Apache version: 1.3.33 (Unix)
PHP version: 4.3.11
MySQL version: 4.0.22-standard
Reply With Quote
  #2  
Old 08-04-2005, 07:48 AM
 
balinor balinor is offline
 

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

Default

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....
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 08-04-2005, 08:24 AM
 
marian marian is offline
 

Senior Member
  
Join Date: Mar 2005
Posts: 103
 

Default 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)
__________________
Xcart Gold 4.0.13
OS: Linux
Apache version: 1.3.33 (Unix)
PHP version: 4.3.11
MySQL version: 4.0.22-standard
Reply With Quote
  #4  
Old 08-04-2005, 08:25 AM
 
balinor balinor is offline
 

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

Default

Which pages do you want that application to show up on?
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 08-04-2005, 08:44 AM
 
marian marian is offline
 

Senior Member
  
Join Date: Mar 2005
Posts: 103
 

Default 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.
__________________
Xcart Gold 4.0.13
OS: Linux
Apache version: 1.3.33 (Unix)
PHP version: 4.3.11
MySQL version: 4.0.22-standard
Reply With Quote
  #6  
Old 08-04-2005, 08:48 AM
 
balinor balinor is offline
 

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

Default

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.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #7  
Old 08-04-2005, 08:56 AM
 
marian marian is offline
 

Senior Member
  
Join Date: Mar 2005
Posts: 103
 

Default 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??
__________________
Xcart Gold 4.0.13
OS: Linux
Apache version: 1.3.33 (Unix)
PHP version: 4.3.11
MySQL version: 4.0.22-standard
Reply With Quote
  #8  
Old 08-04-2005, 09:00 AM
 
balinor balinor is offline
 

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

Default

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.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #9  
Old 08-04-2005, 09:06 AM
 
marian marian is offline
 

Senior Member
  
Join Date: Mar 2005
Posts: 103
 

Default 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!
__________________
Xcart Gold 4.0.13
OS: Linux
Apache version: 1.3.33 (Unix)
PHP version: 4.3.11
MySQL version: 4.0.22-standard
Reply With Quote
  #10  
Old 04-07-2006, 03:07 PM
  ShishaPipeUK's Avatar 
ShishaPipeUK ShishaPipeUK is offline
 

Senior Member
  
Join Date: Jul 2005
Location: London, England.
Posts: 118
 

Default

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} <table width="100%" border="0" cellpadding="0"> <tr> <td><script language="JavaScript" type="text/javascript"> AC_VHost_Embed_?????(105,140,'FFFFFF',1,1,183133,0,0,0,'4659d8fa9bb73b0f67d8dce48ae34b8b',6); </script></td> </tr> </table> {/capture} { include file="menu.tpl" dingbats="dingbats_categorie.gif" menu_title="Site Pal " menu_content=$smarty.capture.menu }

Then just call this in your shopcart/skin1/customer/home.tpl file

Code:
{ include file="customer/sitepal.tpl" }

Like this:
Code:
{ include file="customer/sitepal.tpl" } { include file="modules/Users_online/menu_users_online.tpl" } { include file="customer/menu_cart.tpl" } {if $active_modules.Feature_Comparison ne "" && $comparison_products ne ''} { include file="modules/Feature_Comparison/product_list.tpl" } {/if}

Hope this helps.

You can see the finished version at http://www.shisha.co.uk/shopcart/home.php
__________________
Apache/2.0.55 (Red Hat) & MYSQL Server: 5.0.24
PERL: 5.008005 / PHP: 4.4.4 - 4.3.1 X-CART

Shop carts at
http://www.nightscene.co.uk/shop/home.php
http://www.theshisha.net/shopcart/home.php
http://www.system-maintenance.com/maint/home.php
http://www.tabac4u.com
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 02:18 AM.

   

 
X-Cart forums © 2001-2020