| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Keep track of keywords searched! | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Keep track of keywords searched!
Hello everyone,
I am new to x-cart (migrated from oscommerce) and wanted to be able to see what my customers were searching for when visiting my shop. I had this feature in my oscommerce shop (from a contribution) so I decided to try and make it happen with xcart. I Must warn you, this is my first attempt at doing anything like this and I am no programer... SO USE IT AT YOUR OWN RISK!!!!!! and BACKUP!!!BACKUP!!!BACKUP!!! Oh, and it also looks ugly. Maybe one of the pros can make it a little prettier? Here we go.... First ad 2 new tables to the DB... Code:
Now open /xcart/customer/search.php and add the following (in between the comments)... Code:
Now create a new file /xcart/customer/stats_keywords.php with the code below... Code:
This should be it. Now everytime someone searches for anything in your store, it will be saved to the DB for your viewing. This is very useful so you know what people are most looking for. ----------------------------------- One thing: 1. When you go to http://www.domain.com/xcart/customer/stats_keywords.php , you'll not see the keywords yet. You'll need to click on "Update DB" then click on either "Sort by name" or "Sort by count" buttons to view the collected data. I think that is it. Hope this helps and I look forward to any suggstions for improvement
__________________
Emerson █ Total Server Solutions LLC- Quality X-Cart Hosting █ Recommended X-Cart Hosting Provider - US and UK servers █ Does your host backup your site? We do EVERY HOUR!!! █ Shared Hosting | Managed Cloud | Dedicated Servers |
|||||||
#2
|
|||||||||
|
|||||||||
ROCK ON - can't wait to try it!
did you implement this on 3.5.5?? Thank you for a useful mod!!
__________________
~jaime* shop.mpartworks.com ~~~~~~~~~~~~~~ xcart pro 3.5.5 heavily modified freeBSD 4.8 php 4.3.3 |
|||||||||
#3
|
|||||||
|
|||||||
Hi Jaime,
I used this on a 3.5.6 Pro but I am pretty sure it will work with 3.5.5 as all it does is collect the keyword from the url and save it to the DB tables you create
__________________
Emerson █ Total Server Solutions LLC- Quality X-Cart Hosting █ Recommended X-Cart Hosting Provider - US and UK servers █ Does your host backup your site? We do EVERY HOUR!!! █ Shared Hosting | Managed Cloud | Dedicated Servers |
|||||||
#4
|
|||||||
|
|||||||
Thanks lot Emerson this was much wanted mod.
It's working with 3.5.5 too Thanks once again for it mate.
__________________
X-Cart: 4.7.7 LIVE Skin:Ultra by xcartmods.co.uk X-cart Modules: | ACR, Rich Google Search, Customer Testimonials | Cloud Search, | Websitecm: CDSEO (2.1.9) --------------- Server: Linux php: 5.3 mysql: 5.0.89 ---------------- |
|||||||
#5
|
|||||||
|
|||||||
YW
I'm glad I could help
__________________
Emerson █ Total Server Solutions LLC- Quality X-Cart Hosting █ Recommended X-Cart Hosting Provider - US and UK servers █ Does your host backup your site? We do EVERY HOUR!!! █ Shared Hosting | Managed Cloud | Dedicated Servers |
|||||||
#6
|
|||||||
|
|||||||
While trying to figure out how to fix the count problem, I came across this.
I changed... Code:
to Code:
...which should have fixed the problem. However, the results are blank. I tried running the query manually via phpMyAdmin and it works fine. Anyone have any ideas what could be causing the problem?
__________________
Emerson █ Total Server Solutions LLC- Quality X-Cart Hosting █ Recommended X-Cart Hosting Provider - US and UK servers █ Does your host backup your site? We do EVERY HOUR!!! █ Shared Hosting | Managed Cloud | Dedicated Servers |
|||||||
#7
|
|||||||
|
|||||||
Found a solution...
It now displays the correct count for the keywords searched... The code has been updated in the original post to reflect this change.
__________________
Emerson █ Total Server Solutions LLC- Quality X-Cart Hosting █ Recommended X-Cart Hosting Provider - US and UK servers █ Does your host backup your site? We do EVERY HOUR!!! █ Shared Hosting | Managed Cloud | Dedicated Servers |
|||||||
#8
|
|||||||
|
|||||||
Return to home.php
Hi !!
I have followed the instructions indicated, but when I send "stats_keywords.php" it gives back me home main I running v3.4.14 Anyone have any ideas? greetings!!
__________________
X -Cart v3.4.14 X-Cart V4.3.1 |
|||||||
#9
|
|||||||
|
|||||||
AWESOME! VERY AWESOME! It works perfectly on 3.5.7
I'm gonna' see what I can do to incorporate it into admin. Thank You, Great Mod! |
|||||||
#10
|
|||||||
|
|||||||
Ok, I made a few small changes that allow you to call this from the Admin area and cleaned up the GUI a little (room for improvement)
First of all stats_keywords.php goes in XCART/admin not XCART/customer, here it is with the changes: UPDATED 05/27/04 TO FUNKY PURPLE (you get the idea) Code:
OOoops! I forgot this... Add this line to skin1/admin/menu_admin.tpl Code:
Done! |
|||||||
|
|||
X-Cart forums © 2001-2020
|