|
BLUE CRYSTAL GROUP |
Contents
6BContacting
Blue Crystal Group
0BCoupon
mod
|
Works on PMD: Version Fully compatible with PMD Version 1.1.8.& up
Release date: 11/10/09
Author: Blue Crystal group
Description: Creates Coupons
Terms:
· You are free to modify this code for
your own purposes. You may install this mod on one instance of phpmydirectory for which you hold a valid phpmydirectory license.
· You can not
re-sell this modification or use it as a base for other modifications and sell
it.
· Blue Crystal does not warrant the merchantability
of this modification, and all liability is limited to any amount paid.
Installation of this modification is done at your own risk. Backup your scripts
and database before making changes to them.
1BMod Package
|
The zip
file you have received has 2 folders:
Modified
code - The modified code is code form PMD that has been changed.
New code
- The New Code are new files that will have to be uploaded as part of the
installation.
2BModified
code
|
3BInstallation
|
Please
read the entire set of instructions before doing the install.
1. -
Extract the contents of the zip file to new folder.
We'll refer to this folder as the distribution folder
2. -
Make a copy of the distribution folder.
We'll refer to this folder as the staging folder
3.
Verify that your PMD installation is ready to work with coupons.
Make
sure that you can upload graphics to your installation by uploading a logo.
If the
system is having some problems, do not load the coupon mod until the system is
fully working.
4.-
Integrate code
To
integrate the changes, you will have to take the modified code from the files
sent and merge it with your existing code.
Copy the
files to integrate from your web site to the staging folder.
The BCG
loader is used for some of the Blue Crystal modification and if you have a Blue
Crystal modification, you may already have installed the loader in some
scripts. The loader.php code needs to be
called only once so if you already have those lines in your current scripts, do
not repeat them.
The BCG
loader lines are similar to these:
/**** BCG mod loader STARTS HERE ****/
$filename=''; // The filename may vary
$methodName='require_once';
require_once(PMDROOT.'/bcg/loader.php');
/**** BCG mod loader ENDS
HERE ****/
When
doing the integration, to find what linens to copy, look in the PHP files for
the comments that say
// BCG coupon
mod starts
...
...
...
// BCG coupon
mod ends
In the template files ,
the new lines will be marked as follows:
<!-- BCG Coupon mod starts here
->>
...
....
<!-- BCG Coupon mod ends here ->>
PMD base
code does change and you will find that your code does not match line by line
the code we sent. When copying the modified lines of code, first see in which
line number they are in our delivered code and what lines are before and after
the modified code then , locate the line number in
your code and look for the lines before and after the modified code.
Copying
the modified code:
All
modified code will have a line with BCG on it so you can search for BCG and
will find the new lines.
Most
modifications include adding new lines of code as opposed to changing existing
lines.
Most
files have only one section to copy but other files have 2 or 3 sections.
Do this
for every file that you don't want to overwrite
Keep in
mind that we only send the listing template for level 1, (listing_1.tpl) you
can put the code changes in the templates of the levels you want to.
5.
Update .htaccess
Download
.htaccess and add the
following lines before the last line which is
</IfModule>
#BCG MOD START HERE
RewriteRule ^([^/]+)/coupons\.html$
listing_coupons.php?id=$1 [L]
#BCG MOD ENDS HERE
Upload .htaccess
6.-
Upload all the files on the coupon-new-files directory to your main directory
8.-
Execute the install.php script
Type the
following on your web browser and hit enter http://your_URl/bcg_install_coupon.php
The
install script will ask you for a license number. The license is a number of
the form 999-9999-9999-9999 and is unique by domain.
You will
find your license number on the receipt you received when you purchased the
modification or you can find it on your order history on the Blue Crystal web.
License
number on your order history (example)
9.
Change the files/coupons folder permissions to 777 (you can use chgmod for this)
10. Set
up configuration
In
configuration:


10.1.- Go to memberships and click on the Coupon field to
indicate that the membership will have the coupon feature.
10.2.- Then go to Configuration/settings/BCG Coupons and
set the tow critical settings
Show Featured coupon. You can set
this to Yes or No.
Enter the number of coupons allowed.
10.3 Assign the coupon field to all categories

Click on
Edit fields

Edit the
field and click on add to all categories

Coupon
Format
Experienced
users can change the size of the coupon and the size of the logo appearing on
the coupon on the bcg/coupons/coupon_config.php
file
Sidebox coupons
To
change the number of sidebox coupons please open the
file bcg/coupon/config.php
And look
for a line like this:
$sidebox_coupons_limit=1;
Change
the number 1 to the number of coupons you want
End of
installation
5BMost frequent problems
|
1.- The
coupons and/or upload folder in user_media, do not
have write rights (mod 777)
2.- Call
to undefined function: imagettfbbox() in...
This
problem and other similar calls to undefined functions might happen if the Free
Type library is not installed on the hosting server. Ask your hosting provider
to verify if they have the Free type Library
installed. You can refer them to http:www.freetype.org
Mod
re-write and friendly URL's
*******************************
Not all
links generated by the coupon mod are "URL friendly" because the
"Friendly URL" solution from PMD was still in state of flux when we
were developing the coupon and the coupon links are so deep in the site
structure that the value provided for the friendly URL in the coupons would be
very low.
Adding
the feature would have made the mod more complex and more difficult to
integrate and upgrade with little upside.
Contacting Blue
Crystal Group
|
Should you have any issues with the
software, questions or concerns, the quickest
way to contact us is by means of our Forum
http://bluecrystalgroup.com/support/forum
or by e-mail to support@bluecrystalgroup.com
We’ll
get back to you inside a business day.