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

Dynamic Product Search (ajax)

 
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4
 
Thread Tools
  #1  
Old 03-08-2008, 02:15 PM
 
l0st l0st is offline
 

Advanced Member
  
Join Date: Mar 2008
Posts: 69
 

Default Dynamic Product Search (ajax)

Hello,

I've just installed this mod and it's not working at all. Im installing this on v4.1.9
__________________
X-Cart Gold v. 4.1.9
Reply With Quote
  #2  
Old 03-08-2008, 05:02 PM
 
balinor balinor is offline
 

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

Default Re: Dynamic Product Search (ajax)

Well first we need to know what mod you are talking about...where you got it, what it is called. Next, you should be contacting the vendor where you purchased it for assistance.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 03-08-2008, 05:47 PM
 
l0st l0st is offline
 

Advanced Member
  
Join Date: Mar 2008
Posts: 69
 

Default Re: Dynamic Product Search (ajax)

Sorry I thought that I posted a link.
http://www.xcartmods.co.uk/x-cart-ajax-dynamic-product-search/

Its a free mod and I wouldnt think they offer support for free products. I installed it and it as it said and it didn't work.
__________________
X-Cart Gold v. 4.1.9
Reply With Quote
  #4  
Old 03-08-2008, 06:24 PM
  kube's Avatar 
kube kube is offline
 

X-Adept
  
Join Date: Sep 2005
Location: London: a small place East of Wales
Posts: 529
 

Default Re: Dynamic Product Search (ajax)

did you make sure that you renamed...
dsearch[v4.1.x].tpl to dsearch.tpl

and have not used dsearch[v4.0.x].tpl by accident?

Do you get any JS errors?
__________________
Doms
kube v4.1.9
Reply With Quote
  #5  
Old 03-08-2008, 06:53 PM
 
l0st l0st is offline
 

Advanced Member
  
Join Date: Mar 2008
Posts: 69
 

Default Re: Dynamic Product Search (ajax)

Hello,
No it's not providing me with any errors. I still have the dsearch[v4.0.x].tpl file. I have it inside: skin1/dsearch
4 files are there.
dsearch[v4.0.x].tpl
dsearch.tpl
ajax.js
dsearch.css
dsearch.js

I have dsearch.php inside skin1 as well as root dir. I also ran: cleanup.php
__________________
X-Cart Gold v. 4.1.9
Reply With Quote
  #6  
Old 03-09-2008, 08:57 AM
 
l0st l0st is offline
 

Advanced Member
  
Join Date: Mar 2008
Posts: 69
 

Default Re: Dynamic Product Search (ajax)

My head.tpl:
Quote:
{if $usertype eq "C"}
{include file="dsearch/dsearch.tpl"}
{/if}

home.tpl

Quote:

<link rel="stylesheet" href="{$SkinDir}/{#CSSFile#}" />
<link rel="stylesheet" href="{$SkinDir}/dsearch/dsearch.css">
<script type="text/javascript" src="{$SkinDir}/dsearch/ajax.js"></script>
<script type="text/javascript" src="{$SkinDir}/dsearch/dsearch.js"></script>
{literal}
<script type="text/javascript">
function setCookie(name, value) {
var today = new Date()
var expires = new Date()
expires.setTime(today.getTime() + 1000*60*60*24*30)
document.cookie = name + "=" + escape(value) + "; expires=" + expires.toGMTString() +";path=/"
}
function getCookie(Name) {
var search = Name + "="
if(document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if(offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset)
if(end == -1) end = document.cookie.length
return unescape(document.cookie.substring(offset, end))}
else return ""
}
}
</script>
{/literal}
</head>

I added 'a little before' to show you whats in the code. Everything is in place where it needs to go but it just don't want to work.. any advice/help?
__________________
X-Cart Gold v. 4.1.9
Reply With Quote
  #7  
Old 03-09-2008, 08:58 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default Re: Dynamic Product Search (ajax)

You're using the fashion mosaic template, so the template layout will be slightly different.
__________________
xcartmods.co.uk
Reply With Quote
  #8  
Old 03-11-2008, 08:53 AM
 
l0st l0st is offline
 

Advanced Member
  
Join Date: Mar 2008
Posts: 69
 

Default Re: Dynamic Product Search (ajax)

So because I use it means I cannot use this mod? Does anyone have a solution?
__________________
X-Cart Gold v. 4.1.9
Reply With Quote
  #9  
Old 03-26-2008, 06:40 PM
 
Monarch1 Monarch1 is offline
 

Advanced Member
  
Join Date: Mar 2003
Posts: 30
 

Default Re: Dynamic Product Search (ajax)

This mod will work with XC 4.1.8 with the Fashion Mosaic skin.

Follow in the mod installation file, with the following changes:

STEP 1) SKIP THIS STEP

STEP 2) EDIT /dsearch.php.

REMOVE LINES 2 - 5

// SET MYSQL INFORMATION
$conn = mysql_connect("LOCALHOST","USERNAME","PASSWORD");
// CONNECT TO MYSQL DATABASE
mysql_select_db("DATABASE",$conn);

ADD:

require "./auth.php";

STEP 3) Upload all files, then rename dsearch[v4.0.x].tpl or dsearch[v4.1.x].tpl to dsearch.tpl, according to your version.

STEP 4) Add this code to /skin1/customer/home.tpl before </head>

<link rel="stylesheet" href="{$SkinDir}/dsearch/dsearch.css">
<script type="text/javascript" src="{$SkinDir}/dsearch/ajax.js"></script>
<script type="text/javascript" src="{$SkinDir}/dsearch/dsearch.js"></script>

STEP 5) SKIP THIS STEP

STEP 6) SORRY HERE"S THE HACK

Copy dsearch.tpl to "skin1/customer" directory
Back-up skin1/customer/search.tpl (cp search.tpl search.tpl.old)
Copy dsearch.tpl to search.tpl (cp dsearch.tpl search.tpl)

NOTE
====

To reduce the load on your server, in skin1/dsearch/dsearch.js....

Modify...

var minimumLettersBeforeLookup = 2; // Number of letters entered before a lookup is performed.

DONE..

ALERT: AN MS IE Security message will pop-up. Answer yes or no, it doesn't matter.
The search will work. Once I find the cause of the pop-up, I'll post the fix.
__________________
:::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::
X-Cart Pro 4.1.8 (Linux) (4.1.10 upgrade pending)
Reply With Quote
  #10  
Old 03-26-2008, 07:17 PM
 
Monarch1 Monarch1 is offline
 

Advanced Member
  
Join Date: Mar 2003
Posts: 30
 

Default Re: Dynamic Product Search (ajax)

*** UPDATED STEP 2 ***
This mod will work with XC 4.1.8 with the Fashion Mosaic skin.

Follow in the mod installation file, with the following changes:

STEP 1) SKIP THIS STEP

STEP 2) EDIT /dsearch.php.

REMOVE LINES 2 - 5

// SET MYSQL INFORMATION
$conn = mysql_connect("LOCALHOST","USERNAME","PASSWORD");
// CONNECT TO MYSQL DATABASE
mysql_select_db("DATABASE",$conn);

ADD:

require "./auth.php";

FIND THIS FOLLOWING LINE. (The search list will not display products with 0 available. If you are not using inventory tracking or want to display products no in stock in the search list make this change. Otherwise, skip this step.)

$res = mysql_query("select productid,product from xcart_products where forsale='Y' AND avail>0 AND product like '".$letters."%'") or die(mysql_error());

REPLACE WITH THIS UPDATED LINE

$res = mysql_query("select productid,product from xcart_products where forsale='Y' AND avail>=0 AND product like '".$letters."%'") or die(mysql_error());


STEP 3) Upload all files, then rename dsearch[v4.0.x].tpl or dsearch[v4.1.x].tpl to dsearch.tpl, according to your version.

STEP 4) Add this code to /skin1/customer/home.tpl before </head>

<link rel="stylesheet" href="{$SkinDir}/dsearch/dsearch.css">
<script type="text/javascript" src="{$SkinDir}/dsearch/ajax.js"></script>
<script type="text/javascript" src="{$SkinDir}/dsearch/dsearch.js"></script>

STEP 5) SKIP THIS STEP

STEP 6) SORRY HERE"S THE HACK

Copy dsearch.tpl to "skin1/customer" directory
Back-up skin1/customer/search.tpl (cp search.tpl search.tpl.old)
Copy dsearch.tpl to search.tpl (cp dsearch.tpl search.tpl)

NOTE
====

To reduce the load on your server, in skin1/dsearch/dsearch.js....

Modify...

var minimumLettersBeforeLookup = 2; // Number of letters entered before a lookup is performed.

DONE..

ALERT: AN MS IE Security message will pop-up. Answer yes or no, it doesn't matter.
The search will work. Once I find the cause of the pop-up, I'll post the fix.
__________________
:::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::
X-Cart Pro 4.1.8 (Linux) (4.1.10 upgrade pending)
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4



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 08:32 AM.

   

 
X-Cart forums © 2001-2020