vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Miscellaneous Hacks - Relevant Store Products on Threads & Search (https://vborg.vbsupport.ru/showthread.php?t=266739)

optikalefx 07-12-2011 10:00 PM

Relevant Store Products on Threads & Search
 
1 Attachment(s)
This hack will use data from your online store database (or whatever data source you want) and determine which are the most relevant products to show at the top of a thread. It will also show relevant products related to search queries.

It accomplishes this task by some clever javascript that gets the most common occurrences of words / phrases in your posts, and does some clever mysql logic to figure out what is most relevant.

This hack comes with an option for users with over 50 posts to turn OFF seeing these products.
You need to make 2 template modifications, add some CSS and Javascript, and drop in the PHP files. Also add 1 field to the user table (sql statement included) Then edit the relevantProducts.php file to match whatever data you have. Its setup right now for a Volusion API export.

Files:
relevantProducts.php
relevantProductsAjax.php
RP-plugins.txt
RP-search template changes.txt
RP-box template.txt
RP-css.css
RP-debugging.php
RP-hide/show template changes.txt
RP-jQuery Plugin.js
RP-jQuery Plugin Usage.js
RP-sql.sql

https://vborg.vbsupport.ru/external/2011/07/32.png
https://vborg.vbsupport.ru/external/2011/07/33.png


To make this better for later, your store might also give you product popularity, something our store does not. Factoring that in would increase the relevance of the products.

If you like this hack please donate to paypal@mp3car.com
Thanks!

Manoel J?nior 07-13-2011 04:25 PM

Hooo great!!! Thanks

Do you think if functionally with Mercado livre? www.mercadolivre.com.br

optikalefx 07-13-2011 06:23 PM

Yea it shouldn't be a problem. You will just need to match the correct database fields in relevantProducts.php.

If you know a little PHP you can swap out the correct database fields and table names.

lem 10-02-2011 04:00 PM

This works with any online store software? Or just Volusion?

optikalefx 10-02-2011 04:14 PM

The current files work with Volusion, but you just need an XML output of products from any store and it will work.

The script takes a little bit of "making it work for you" because store databases are so different. But its well commented and should be easy to see where things need to go. Volusion was easy because they have an XML output of orders from their API


All times are GMT. The time now is 06:51 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01061 seconds
  • Memory Usage 1,718KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete