X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Can I use SitePal in X-cart? (https://forum.x-cart.com/showthread.php?t=15684)

marian 08-04-2005 07:45 AM

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! :)

balinor 08-04-2005 07:48 AM

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....

marian 08-04-2005 08:24 AM

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:

balinor 08-04-2005 08:25 AM

Which pages do you want that application to show up on?

marian 08-04-2005 08:44 AM

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.

balinor 08-04-2005 08:48 AM

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.

marian 08-04-2005 08:56 AM

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?? :?

balinor 08-04-2005 09:00 AM

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.

marian 08-04-2005 09:06 AM

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! :)

ShishaPipeUK 04-07-2006 03:07 PM

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


All times are GMT -8. The time now is 12:37 PM.

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