BLUE CRYSTAL GROUP

 

Shopping Cart mod

 

  

Shopping Cart

Works on PMD PRO   Version 1.x.x

Release date:  01--01-09

Author:  Blue Crystal group

 

      Description:  Brings a Shopping cart to PMD

 

 

Terms:

·         You can not re-sell this modification or use it as a base for other modifications and sell it.

·         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 have 180 days of support and you can download upgrades for 180 days

·         You can buy the new version of the mod for 50% of the current cost of it.

 

DISCLAIMER:  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 before making changes to them.

 

Mod Package

 

You need some knowledge of FTP, HTML and PHP to do the installation. If you prefer it, Blue Crystal can do the installation for you.              Order Professional Installation

 

The zip file you have received has two folders:

 

Modified code   - The modified code is code from PMD that has been changed.  You can upload the contents of this folder if you have not made any change to your own files.

 

New code - The New Code are new files that will have to be uploaded as part of the installation.

 

 

Integration

 

Please read the entire set of instructions before doing the install.

 

INTEGRATION

To integrate the changes, you will have to take the modified code from the files sent and merge it with your existing code. 

The modified code is mostly added code so most of the time you just have to copy additional lines of code that you will find in the “modified code” folder and copy it on place into your own files.

 

LOADER

Some of the modified files have a “loader”.   The loader are lines of code is used for some of the Blue Crystal modification to facilitate the integration of code and if you already have a Blue Crystal modification, you may already have installed the loader in some scripts.   If you have, do not repeat the code.  The loader.php code needs to be called only once.

 

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 ****/

 

INTEGRATION

To copy the modified code from the distribution folder to your files in the staging directory, open each file on the modified code folder and  Look for the blocks of code marked as BCG mods:

 

//  BCG         mod starts

...

//  BCG mod  ends:

In the template files, the added code is marked as follows:

 

<!-- BCG job mod starts here ->>

...

....

<!-- BCG Job mod ends here ->>

 

While doing the update consider these:

 

·         Most scripts only require adding a few lines of code 

·         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 and  then, locate the before an after lines on the original code.

·         All modified code will have a line with BCG on it so you can search for BCG and will

·         Most modifications include adding new lines of code as opposed to changing existing lines.  If some lines need to be changed or deleted, that will be clearly stated in the modified code.

 

For instance to integrate listing.php

Open your own listing.php file

Look for the lines:

 if($listing['www_allow'] AND !empty($listing['www'])) {

        if ($_GET['action'] == 'print') {

             $template_content->set('www',$listing['www']);

   

Insert the following lines before the above listed lines

 

/**** BCG LOADER STARTS HERE ****/

/*********************************/

/*********************************/

$filename='';

$methodName='require_once';

require(PMDROOT.'/bcg/loader.php');

/*********************************/

// YOU MUST HAVE ONLY ONE LOADER PER SCRIPT.  IT WILL LOAD ALL BCG MODS 

//**** BCG LOADER ENDS HERE ****/

 

http://manual.phpmydirectory.com/tip.png

Using a Compare and Merge Tool

A good way to see the differences between the modified code and your code is to use a compare and merge tool to merge your current files with the modification files

 

1.

Download  from your site the files listed in the modified-files folder that we are seding into a folder on your home computer.

 

2.

Extract the modified files from the modification zip file.

 And put them in another folder

3.

Use  the compare and merge tool to compare the files in the two folders.

 

4.

The tool will determine the differences and you may reviews these to make the needed changes.

 

5.

Re-upload the merged files and continue with the upgrade process as normal.

 

Compare and Merge Tools

WinMerge - Windows / Free

 

Beyond Compare - Windows / Linux - Low price

 

Araxis Merge - Windows/Mac - Higher price, more features

 

 

Steps to do the integration

 

1. - Extract the contents of the zip file to new folder.

            We'll refer to this folder as the distribution folder

2. – Create a folder that we will call the “staging folder”

 

3.-  Download from your site to the staging folder, all the files that exist in modified folder that you will find in the distribution folder

 

4.- Copy the code from each of the modified files to your own files as per the integration guidelines above

 

5.- Make sure you have a copy of your production system  files

 

6.- Copy the files from the modified-files folder in your staging area to your main folder

5.- Copy the contents of the  new-files directory to your main folder

For steps 5 and 6 consider that the template files are included on the template/default folder. If you are using other folder name for your template, you must upload the template files to that folder

7.- Execute the installation script

 

            You will find the installation script on the chart of modified code below.

 

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)

 

 

If you get and error message, please send Blue Crystal a copy of the message you received and stop the installation

 

 

 

 

INSTALL  SCRIPT     with  http://your_URl/bcg_install_cart.php 

 

List of modified code

 

 

Script / template

Loader

Notes

 

Root directory

 

 

 

Listing_offers.php

No

 

 

Listing.php

Yes

 

 

Template/ default

 

 

 

listing_offers.tpl

No

 

 

Listing_default.tpl

No

 

 

 

Configuration

 

 

 Assign the ShoppingCart field to all categories

 

 

Click on Edit fields

            Select the cart group

 

 

Edit the field and click on add to all categories

 

 

 

Also assign the custom field ShoppingCart to a membership type and apply it to existing listings

 

You can change the name of the Shopping cart field to a name that you would think would fit your website


End of installation

 

 

How to verify that the installation is complete

 

·         In memberships set a membership level to have access to the shopping cart.

 

 

·         Make sure you check the update current memberships

·         Go to Compare.php and see if the field appears.

·         Create a new listing on a membership level that can enter products and has the shopping cart feature (PayPal  e-mail ) (one of the memberships set up in the prior step)

 

·         Enter a valid e-mail on the PayPal payment e-mail field  

 

·         Enter at least one product for sale and with price

·         Go to the listing and display the products. You should see something like this:

 

·         Click the add to cart button. You should see the cart screen like this:

 

Using the Shopping Cart mod

 

You can decide which membership levels will have the ability to sale products using the shopping cart.

 

The users that want to sale products will enter their products, features and prices using the standard PDM feature for products, so you will have to allow products in a membership level to let them use the cart.

 

Each user will enter its own e-mail for PayPal and they get paid by PayPal directly.  

 

The system will use the e-mail entered in the PayPal e-mail field in the listing maintenance screen and it is responsibility of the listing owner to verify that the e-mail has a valid account in PayPal.

 

If you don’t want your users to list items for sale, you can restrict the use of the shopping cart to a membership level that only the administrator has access to.

 

 

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.