Ramos Themes Logo

Documentation: Price Tapestry Likes App

This mod can either be installed over the top of a default price tapestry installation or integrated into an existing website. See further down for integration instructions.

Files:

  • html/
    • footer.php
    • header.php
    • like.php
    • likes.config.php
    • likes.css
    • number_shorten.php
    • product.php
    • searchresults.php
  • images/
    • icons-1.jpg
    • icons-1-sm.jpg
    • icons-2.jpg
    • icons-2-sm.jpg
  • scripts/
    • likes_cleanUp.php
  • likes_setup.php

Step 1:

Upload the contents of the upload folder to your main installation directory.

Step 2:

Run the likes_setup.php in your browser to install the likes table.

Step 3:

Either copy the styles from the likes.css and past at the bottom of default.css or if you would prefer to keep the stylesheets seperate add the code below to html/header.php before the default.css stylesheet is called.

<link rel='stylesheet' href='<?php print $config_baseHREF; ?>html/likes.css' />

How to integrate into an existing website.

Step 1:

Upload the following files to your installation:

  • html/
    • like.php
    • likes.config.php
    • likes.css
    • number_shorten.php
  • images/
    • icons-1.jpg
    • icons-1-sm.jpg
    • icons-2.jpg
    • icons-2-sm.jpg
  • scripts/
    • likes_cleanUp.php
  • likes_setup.php

Step 2:

Run the likes_setup.php in your browser to install the likes database table.

Step 3:

Carefully copy every instance of code wrapped in the following tags:

<!-- BEGIN LIKES -->

<!-- END LIKES -->

from the following files into the respective files:

  • html/
    • footer.php 1 instance
    • header.php 2 instance
    • product.php 2 instances
    • searchresults.php 3 instances

Lastly, either copy the contents from the likes.css stylesheet into your own or include the file before your stylesheet in html/header.php.

Example: <link rel='stylesheet' href='<?php print $config_baseHREF; ?>html/likes.css' />

The following options are configured in html/likes.config.php.

$likes_showLikeBtn = false;
$likes_showDislikeBtn = false;
If using heart dislike button should be set to false.

$likes_enableSearch = false;
$likes_enableProduct = false;
Enable / disable on search result / individual product pages.

$likes_type = "img";
Options: img / heart

$likes_style = "1";
Options: 1 / 2 See images folder for different styles - Likes_type must be set to 'img'.

The file scripts/likes_cleanUp.php deletes products from the likes table that no longer exist in the products table. The file can be run in the browser or via a cron job. Ideally run after product import.