Random Image
My Account
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

glfusion:shop:start [2019/02/06 23:11] (current)
lee created
Line 1: Line 1:
 +======Shop Plugin======
 +This is an revision of the //Paypal Plugin// for glFusion, to allow multiple payment options
 +
 +===== Requirements =====
 +  * glFusion v1.7.0 or newer
 +  * PHP 7.1.0 or higher
 +  * lgLib plugin 1.0.7 or higher
 +
 +
 +=====Features=====
 +  * Sell items on your site.
 +  * [[PluginIntegration]] - Plugins may provide items for sale to be included in the catalog. Some possibilities are:
 +    * Event Fees
 +    * Site Membership Fees
 +    * Advertising
 +  * Support for [[[[glfusion:​shop:​gateway_paypal#​encrypted_buttons|encrypted Paypal buttons]]. (new)\\ Buttons are automatically created when a product is updated.
 +  * Support for comments.
 +  * Support for product ratings.
 +  * Change to a category table, rather than free-form category strings.
 +  * Support for multiple product images. Images may be uploaded via the product catalog rather than being uploaded separately.
 +  * Downloadable products may be uploaded directly from the product form.
 +  * Search products using glFusion'​s search.
 +  * Include product links in other text using [[glfusion:​shop:​start#​AutoTags]]
 +  * Track item inventory. Purchases can be blocked if an item is out or stock.
 +  * Support multiple item options, such as size or color.
 +  * Multiple payment gateways ([[API Reference]]). Gateways have their own configurations and may be disabled.
 +    * [[gateway_paypal|PayPal]]
 +    * [[gateway_amazon|Square]]
 +    * [[gateway_authorizenet|Authorize.Net]]
 +  * Shopping cart
 +  * Configurable checkout [[WorkFlows]]
 +
 +===== Installation =====
 +The Shop Plugin uses the glFusion automated plugin installer. ​ Simply upload the distribtuion using the glFusion plugin installer located in the Plugin Administration page.
 +
 +<​note>​Always back up your database before installing or upgrading a plugin!</​note>​
 +
 +The plugin may be installed manually, if necessary.
 +
 +===== Upgrading =====
 +The upgrade process is identical to the installation process, simply upload the distribution from the Plugin Administration page.
 +
 +=====Usage====
 +===Autotags===
 +Autotags can be used to embed product information into a static page or story. The autotag format is
 +  [shop:​product_id optional_text]
 +Where //​product_id//​ is the numeric database ID number of the product and //​optional_text//​ is the text to display in the link.  If the text parameter is omitted, then the product name will be shown.
 +
 +===== Administration =====
 +==== Configuration Options ====
 +Configuration Options are set by the Paypal section in the site Configuration area.  There is no config.php required unless you wish to override any other settings.
 +
 +^Option^Description^
 +^General^
 +|Administrator Email Address|This is a optional email address of your Shop administrator. If this is empty, confirmation messages will be sent to the global site_email address.|
 +|Currency|Select the currency that your site uses.  Only one currency type is supported.|
 +|Anonymous users can buy?|Set this to "​Yes"​ to allow anonymous visitors to make purchases. ​ If this is "​No",​ then visitors must log in before they can purchase items.|
 +|Email User upon purchase?​|Set this to "​Yes"​ to send an email acknowledgment to the buyer. ​ Note that they will also recieve an payment acknowledgment from Paypal, but this allows you to send something similar to an invoice.|
 +|Attach files to user's email message?|If this is "​Yes",​ then downloadable files which are purchased will be attached to the acknowledgment email (assuming "Email User upon purchase"​ is also "​Yes"​). ​ If this is "​No",​ then the buyer will need to visit your site to download the purchased file.  Note that the buyer can still download the file from your site until the expiration time runs out.|
 +|Attach files to anonymous buyer email?|This is the same as "​Attach files to user's email message"​ above, but applies specifically to anonymous buyers. ​ If you allow anonymous buyers to purchase downloadable files, then this **must** be set to "​Yes"​ or the buyer will never be able to get their files.|
 +|Notify administrators of purchases?​|Choose when an administrator will receive an email as a purchase is made.  If you are selling physical items that require some intervention on your part (such as shipping the item), you are strongly encouraged to receive notifications at least for physical item sales. ​ The notification email is sent to the configure site email address.|
 +|Add to main menu?​|Setting this value to "​Yes"​ adds a "​Products"​ menu option under the "​Extras"​ menu.  If you prefer, you can set this to "​No"​ and manually add a menu option anywhere you like.|
 +|Default sort order for product display|Select the field that will be used initially to sort the product listing.|
 +|Max products displayed per page|Enter a number for the maximum number of products to be displayed on a single page in the product list.|
 +|Category Columns|Enter a number for the number of columns used to create the category links at the top of the product listing.|
 +|Use internal CSS tabbed menu?|If this is "​Yes",​ then the menu in the product catalog will use the styles defined by the plugin. ​ This gives you the opportunity to customize the look of the menu, if you like.  If this is "​No",​ then the standard glFusion tabbed menu will be used.|
 +|Max number of product images|Set this to the maximum number of images that may be uploaded with a product.|
 +|Enable Comments?​|Select "​Yes"​ to allow site users to add comments to products, similar to articles and other glFusion content. ​ Select "​No"​ to disable comments globally.|
 +|Enable Ratings?​|Select "​Yes"​ to allow products to be rated by site visitors. ​ Select "​No"​ to disable ratings completely.|
 +|Enable Left Blocks\\ Enable Right Blocks|Left and/or Right blocks may be disabled when the product catalog is displayed.|
 +|Debug IPN Messages|If you're having trouble handling the Instant Payment Notification messages from Paypal, enabling this option may help troubleshoot the problem by logging the complete message the the error.log file.|
 +^Images and Paths^
 +|Max Thumbnail Dimension|Enter the maximum size (width or height), in pixels, that a thumbnail may occupy. ​ When thumbnails are created from uploaded images, they will be sized so that the longest dimension does not exceed this value.|
 +|Max Image Width\\ Max Image Height|These are the maximum dimensions, in pixels, that a product image may occupy. ​ When the product images are uploaded, they will be resized to fit within these dimensions while preserving their aspect ratios.|
 +|Full path to downloadable files|Enter the //​complete//​ path to where downloadable files are stored. ​ The default value will be created during the plugin'​s installation process; if you change this you must make sure that your webserver has permission to read //and write// to this path.  Files uploaded with the product form will be saved in this location.|
 +|Max size for downloadable files|Enter the maximum number of megabytes for downloadable files.|
 +
 +==== Gateway Selection ====
 +Version 0.5.0 introduces a modular approach to using multiple payment gateways. ​ By adding a class file under private/​plugins/​paypal/​classes/​gateways,​ and an IPN handler under private/​plugins/​paypal/​classes/​ipn,​ new payment gateways can be used.
 +
 +Gateways can also be deleted from the configuration.
 +<note warning>​If you delete a gateway, you will lose all of its configuration including access and secret keys.  Be sure that you have these items backed up.</​note>​
 +
 +=== Payment Button Configuration ===
 +Each product may have a payment button for "​buy_now",​ "​donate",​ or none at all.  With multiple payment options, the blocks and product list can become cluttered with payment buttons, so each gateway can be configured whether it will handle the buy_now and/or donate options. ​ (All enabled gateways are available for order checkout.)
 +
 +==== Instant Payment Notification ====
 +Paypal'​s Instant Payment Notification (IPN) messages can be used by the plugin to record transactions in its own database, allowing you to review transactions from within the plugin'​s administration interface.
 +
 +Further, the IPN messages allow other Paypal-enabled plugins to take action based on the purchase. ​ This may include automatically subscribing the buyer to some site feature, or allowing the buyer to immediately place the classified ad that they purchased.
 +
 +<note important>​If you're using the Bad Behaviour plugin, there may be issues with your payment gateways. ​ Check the gateway information page for details.</​note>​
 +
 +===== Product Options (v0.4.5) =====
 +Starting with version 0.4.5, you can add atributes to your products such as color or size, and charge more or less depending upon which options are chosen by the buyer.
 +
 +After creating a product record normally, click the "​Attribute List" option in the main PayPal administration menu.  Select the product name from the dropdown list.
 +
 +For the "​Attribute Name" field, you can enter a value to create a new attribute, or select from the list of previously created names. ​ Attributes are simply associated by name, so any item named "​Color"​ will be grouped with other "​Color"​ attributes. ​ The selection list primarily helps avoid issues due to typos or misspellings.
 +
 +For each product/​attribute pair, enter a Value, e.g. "​Red",​ "​Large",​ etc. and a price. ​ The price is the amount that will be added to the product'​s base price when the attribute is selected. ​ Enter a negative number to reduce the product price.
 +
 +For example, if you sell sweaters you may have color options for Red, Blue and Green, and size options for Small, Medium and Large. ​ You may also have an option for Extra-Large,​ which costs $5.00 extra, and for Yellow sweaters which are discounted $3.00 due to excess inventory.
 +
 +Each product/​attribute pair may be individually disabled, which you might do if you run out of inventory for that item.
 +
 +====Notes====
 +Products which have attributes can't be purchased by the "Buy Now" or "Add to Cart" buttons shown on the main product page; the buyer must view the product detail and select the options that they want.
 +
 +**Product Attributes require Javascript**- the prices shown in the catalog and submitted to PayPal are updated via Javascript when the selections are changed. ​ Products using attributes also cannot use encrypted Paypal buttons. ​ This offers the opportunity for spoofed purchases where a buyer might submit an order for the expensive options, but change the price to a lower amount. ​ As long as you and your customers are aware that the amount charged Paypal is the authority, this shouldn'​t present a problem. ​ The product detail screen now displays an error if Javascript is not enabled.
 +
 +===== Text Fields =====
 +Products can have text fields for the buyer to provide, such as custom engraving instructions. Enter the prompt for each text field in the space provided and separate multiple fields with a pipe "​|"​ character. For example:
 +  Name|Club
 +  ​
 +===== Inventory Tracking =====
 +<​note>​This feature is planned for version 0.5.0</​note>​
 +These fields have been added to the product record in order to track inventory:
 +  * Quantity On Hand - The number of items currently available
 +  * Reorder Level - When the Quantity On Hand falls to this level, then the product should be re-ordered. ​ May provide a "​reorder report"​.
 +  * Sell Below QOH? - This is a checkbox indicating that the item may be sold if the Quantity On Hand is depleted. ​ If this is //not// checked, then the product will not appear in the catalog if the QOH is zero (or less).
 +
 +When an item is purchased, the quantity given in the IPN message is automatically deducted from inventory. ​ The "Sell Below QOH" flag is //not// evaluated, since the purchase has already taken place via PayPal.
 +<note important>​More than the available quantity may be sold even if "Sell Below QOH" is not checked. ​ For example, if two buyers simultaneously purchase an item that has only one available. ​ Or, if one buyer selects "Add to Cart" and purchases two items when only one is on hand.</​note>​
 +
 +Updating the Quantity On Hand when products are received is done manually.
 +
 +===== Known Issues =====
 +==== Version 0.4.5 ====
 +  * The template the "Buy Now" button contained test code to use a PNG image, but the image was not distributed. ​ Starting with line 44 of templates/​buttons/​btn_buy_now.thtml,​ change <code html>
 +<input type="​image"​ src="​{site_url}/​paypal/​images/​buynow.png"​ border="​0"​
 +        style="​background:​transparent;"​
 +        name="​submit"​ alt="​{$LANG_PP['​buy_now'​]}"​
 +        title="​{$LANG_PP['​buy_now'​]}"​ {xhtml}>
 +</​code>​ to <code html>
 +  <input type="​image"​ src="​{site_url}/​paypal/​images/​buynow.gif"​ border="​0"​
 +        name="​submit"​ alt="​{$LANG_PP['​buy_now'​]}"​
 +        title="​{$LANG_PP['​buy_now'​]}"​ {xhtml}>
 +</​code>​
 +
 +==== Version 0.4.3 ====
 +A couple of issues relating to anonymous access to downloadable products.
 +  * Download button is displayed to all anonymous users. ​ Once a purchase was made by an anonymous user, "​Anonymous"​ can see the download button until it expires. ​ {{:​glfusion:​glpaypal:​product.class.php.gz|}} fixes that by blocking all download buttons, except for free products, from anonymous users. ​ Unzip this file in your private/​plugins/​paypal/​classes directory.
 +  * Emails and files are not properly sent to anonymous users. ​ {{:​glfusion:​glpaypal:​baseipn.class.php.gz|}} correctly attaches files to anonymous buyers. ​ Unzip this file in your private/​plugins/​paypal/​classes directory.
 +
 +==== Version 0.4.0 ====
 +  * Comments cannot be disabled for individual products.\\ A bug in the Product class causes the "​Comments Enabled"​ selection to be ignored. ​ This is fixed in [[http://​glfusion.svn.sourceforge.net/​viewvc/​glfusion/​paypal/​trunk/​classes/​product.class.php?​view=log|SVN]] for version 0.4.1. The global comment setting is working; this only affects the per-product comment setting.
 +
 +===== License =====
 +This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
 +
 +Copyright (c) 2009 by Lee Garner
 +
 +Based upon the Paypal Plugin for Geeklog version 0.2.0 by Vincent Furia (Copyright (c) 2005-2006 by Vincent Furia).
  
Logged in as: Guest (anonymous)
glfusion/shop/start.txt · Last modified: 2019/02/06 23:11 by lee
 
Except where otherwise noted, content on this wiki is licensed under the following license: GNU Free Documentation License 1.3
Random Image
My Account