Favorites Wishlist
Version 6.0.1
Copyright © 2015-2023, Vinos de Frutas Tropicales, contact me here. Current Support Thread on GitHub: https://github.com/lat9/favorites_wishlist_support
Plugin Information: https://vinosdefrutastropicales.com/index.php?main_page=product_info&cPath=2_8&products_id=56
Notes:
- Be sure to review the instructions for either installing or upgrading your Favorites Wishlist installation! This is especially important for v6.0.0 (and later) if you're doing an initial install or upgrading from a Favorites Wishlist version prior to v6.0.0; see this section for details.
- Starting with v6.0.0 of the plugin, only Zen Cart Versions 1.5.7a and later are supported; the minimum PHP version now supported is PHP 7.3. Note, too, that the site's storefront template must now load a version of jQuery for proper operation.
Purpose
This plugin, modelled after the like-named feature of a major Internet retailer, provides your customers with a Favorites Wishlist where they can save their favorites and then share those favorite selections with friends and family. A customer's favorites can be easily moved between their Favorites Wishlist and their shopping cart.
When a customer arrives at your store, they are presented with a My Favorites link in the top navigation header. On each product's detailed information page, the add-to-cart block includes an Add to Favorites button. Only account-holders at your store have access to Favorites Wishlists (either theirs or a shared wishlist) and they must be logged into your store to complete this access.
You use the Configuration :: Favorites Wishlist settings to control whether a listing or center-box contains an "Add to Favorites" link for each product in the list.
This plugin is installed on my Zen Cart 1.5.8a demo site; you can access my favorites using this link: https://zc158.vinosdefrutastropicales.com/zc158/index.php?main_page=favorites&fc=3:7791f29012cc5328ff5b3f52b818a37c … after logging in or creating an account.
Starting with v6.0.0 of Favorites Wishlist, the majority of the documentation is now on-line in the plugin's public support-thread's `wiki`.
Installation and Upgrading
v6.0.0 (and later) "Hand-Edits" Required
Starting with v6.0.0, the overrides required in your site's default template (i.e. the /includes/templates/YOUR_TEMPLATE directory) have been removed. Instead, jQuery modules provided by this plugin add the required links, buttons and additional forms as required.
There is one possible exception, /includes/templates/YOUR_TEMPLATE/templates/tpl_shopping_cart_default.php
. The version of that module provided in Zen Cart 1.5.8a and the supported version of the Bootstrap-4 template (v3.5.2 and later) already includes the code required to enable the Favorites Wishlist additional display on the shopping_cart
page. If your site's template is based on one of those templates, you're good-to-go; otherwise, you'll need to review your version of that module and add the required code.
See this on-line documentation for additional information.
Initial Installation
This plugin makes changes to your database; you should always backup your cart's database and files prior to making any changes.
- Rename the YOUR_ADMIN directory to match your Zen Cart's secret admin directory name.
- Rename the YOUR_TEMPLATE directory (one of them) to match your store's currently-active template directory:
- /includes/templates/YOUR_TEMPLATE
- Log into your Zen Cart's admin console.
- Copy the new and merged files to your cart's file-system:
- /images/icons/favorites.png (Added in v1.1.0)
- /includes/auto_loaders/config.favorites.php
- /includes/classes/class.favorites.php
- /includes/classes/observers/auto.favorites_restore_product_attributes.php (Added in v3.0.1)
- /includes/extra_cart_actions/favorites_wishlist_actions.php
- /includes/extra_datafiles/favorites_file_database_names.php
- /includes/functions/extra_functions/favorites_wishlist_functions.php (Added in v4.0.0)
- /includes/init_includes/init_favorites_wishlist.php (Added in v3.0.0)
- /includes/languages/english/favorites.php
- /includes/languages/english/extra_definitions/favorites_extra_definitions.php
- /includes/languages/english/html_includes/define_favorites.php
- /includes/languages/english/html_includes/define_favorites_other.php
- /includes/modules/pages/favorites/header_php.php
- /includes/modules/pages/favorites/jscript_main.php
- /includes/modules/pages/shopping_cart/header_php_favorites.php
- /includes/modules/pages/shopping_cart/jscript_favorites.php (Added in v3.0.0)
- /includes/templates/bootstrap/common/tpl_favorites_wishlist_selectors.php (Added in v6.0.0)
- /includes/templates/bootstrap/css/stylesheet_favorites.css (Added in v6.0.0)
- /includes/templates/bootstrap/templates/tpl_favorites_default.php (Added in v6.0.0)
- /includes/templates/bootstrap/templates/tpl_modules_favorites_products.php (Added in v3.0.0)
- /includes/templates/bootstrap/templates/tpl_modules_favorites_shopping_cart.php (Added in v6.0.0)
- /includes/templates/bootstrap/templates/tpl_modules_favorites_sc_move_button.php (Added in v6.0.0)
- /includes/templates/template_default/buttons/english/add_favorites_to_cart.gif
- /includes/templates/template_default/buttons/english/add_to_favorites.gif
- /includes/templates/template_default/buttons/english/move_to_cart.gif
- /includes/templates/template_default/buttons/english/remove_favorites.gif
- /includes/templates/template_default/buttons/english/share_favorites.gif
- /includes/templates/template_default/common/tpl_favorites_wishlist_selectors.php (Added in v6.0.0)
- /includes/templates/template_default/common/tpl_jscript_favorites_wishlist.php (Added in v6.0.0)
- /includes/templates/template_default/images/icons/move.png
- /includes/templates/template_default/jscript/favorites_groups.js (Added in v3.0.0)
- /includes/templates/template_default/jscript/favorites_groups.min.js (Added in v3.0.0)
- /includes/templates/template_default/jscript/favorites_page.js (Added in v3.0.0)
- /includes/templates/template_default/jscript/favorites_page_bootstrap.min.js (Added in v6.0.0)
- /includes/templates/template_default/jscript/favorites_page_bootstrap.js (Added in v6.0.0)
- /includes/templates/template_default/jscript/favorites_page.min.js (Added in v3.0.0)
- /includes/templates/template_default/templates/tpl_favorites_default.php
- /includes/templates/template_default/templates/tpl_modules_favorites_products.php (Added in v3.0.0)
- /includes/templates/template_default/templates/tpl_modules_favorites_shopping_cart.php
- /includes/templates/template_default/templates/tpl_modules_favorites_sc_move_button.php (Added in v6.0.0)
- /includes/templates/YOUR_TEMPLATE/css/favorites.css
- /includes/templates/YOUR_TEMPLATE/css/stylesheet_favorites.css
- /YOUR_ADMIN/stats_favorites_wishlist.php
- /YOUR_ADMIN/includes/auto_loaders/config.favorites_admin.php
- /YOUR_ADMIN/includes/classes/observers/class.favorites_wishlist_admin_observer.php
- /YOUR_ADMIN/includes/extra_datafiles/favorites_file_database_names_admin.php
- /YOUR_ADMIN/includes/init_includes/init_favorites_wishlist.php
- /YOUR_ADMIN/includes/functions/extra_functions/zen_cfg_read_only.php (Added in v6.0.0)
- /YOUR_ADMIN/includes/languages/english/extra_definitions/favorites_wishlist_menu_names.php
- /YOUR_ADMIN/includes/languages/english/stats_favorites_wishlist.php
- Click the Admin Home link within your Zen Cart's admin console. This causes the plugin's initialization script to run, making the database changes required by the plugin.
- Navigate to the newly-created Configuration :: Favorites Wishlist. Enter your site's Shared Wishlist Secret Phrase and then set Enable Favorites Wishlist? to true.
Upgrading an Existing Installation
Upgrading Favorites Wishlist is easy. Normally, the plugin's updates to template-override files don't require change from one version to the next, but sometimes it's unavoidable. Refer to this readme's File/Database Changes by Version to see if updates have occurred since you last installed or upgraded Favorites Wishlist. You can find your current Favorites Wishlist version by navigating to your Zen Cart admin's Configuration->Favorites Wishlist.
If an updated file is a template-override file, i.e. the file's name includes a YOUR_TEMPLATE
directory, you'll need to merge the updated file's changes with the core- or template-file presently in your cart's file-system. Otherwise, that file is unique to the Favorites Wishlist plugin and you'll simply copy the updated file to your cart's file-system.
Note: I suggest either placing your site's storefront into Maintenance Mode or temporarily disabling the Favorites Wishlist when performing an upgrade. Depending on the number of files changed, the storefront can get "messy". Don't forget to undo that configuration change when you've got all the appropriate files installed!
Un-install
Delete the new files you copied to your store's file-system, then copy and paste the contents of /docs/favorites_wishlist/uninstall/uninstall_favorites_wishlist.sql
into your admin's Tools :: Install SQL Patches to remove the plugin's database changes.
Version and Change History:
Version History
- v6.0.1, 2023-05-27:
- BUGFIX: Correct PHP Fatal error when
DB_PREFIX
is not an empty string.
- BUGFIX: Missing pre-declaration of the base class' icon variable; deprecation logs created.
- BUGFIX: "Lost" integration with URL managers.
- BUGFIX: Clicking icon on listing page doesn't honor configuration setting when "stay-on-page" is set.
- v6.0.0, 2023-04-28:
- CHANGE: Minimum Zen Cart version supported is zc157a; minimum PHP version required is PHP 5.6.
- CHANGE: "Freshen" various modules to use now-current PHP structuring, e.g. short-array syntax.
- CHANGE: Migrating the template-specific
/buttons
, /images/icons
and /jscript
files to "template_default", so they're usable by multiple templates.
- CHANGE: Use jQuery to inject the add-to-favorites on product listing and
_info
pages as well as "My Favorites" links in the header; removes need for template overrides!
- CHANGE: Use
zen_cfg_read_only
for the display of the plugin's configured version.
- CHANGE: Inject "favorites" section on
shopping_cart
page using zc158 method; no longer providing template file!
- BUGFIX: Products with more than one checkbox-type attribute are added to the cart with only one checkbox attribute.
- BUGFIX: Ensure that no-longer-available products are removed from a customer's wishlist on the storefront.
- BUGFIX: Honor store's settings regarding checking out with out-of-stock items as well as products' in-cart maximums.
- v5.0.0, 2021-07-04:
- CHANGE: Use
zen_is_logged_in
and zen_in_guest_checkout
functions to determine whether/not a customer is logged in.
- CHANGE: Minimum Zen Cart version supported is zc156. Minimum PHP version required is PHP 5.6.
- BUGFIX: Check for logged-in status prior to product attributes when adding to favorites from a listing or centerbox.
- CHANGE: Enable a product with pre-selected attributes to be directly added to the customer's favorites from a listing or centerbox.
- CHANGE: Convert script-related actions to use jQuery instead of javascript.
- BUGFIX: The default/public arguments were reversed when creating a new group.
- BUGFIX: Correct MySQL error on admin report when the MySQL installation is strict.
- CHANGE: Template-override change basis now zc156c's
responsive_classic
.
- BUGFIX:
favorites.css
, selector for input/select is too broad, affecting header and sidebox layouts.
- BUGFIX: Non-desktop rendering doesn't include a favorites' link in the header.
- v4.0.2, 2020-02-27:
- BUGFIX: Missing report files in the readme's Installation tab (affects documentation only).
- BUGFIX: Update configuration descriptions, removing duplicated a.
- BUGFIX: Correct $messageStack usage when the plugin isn't enabled (using admin-format interface on storefront).
- v4.0.1, 2019-09-19:
- BUGFIX: Listing/centerbox additions fail due to use of incorrect variable name.
- BUGFIX: Correct PHP notice when viewing another customer's favorites.
- BUGFIX: Remove references to no-longer used constants when viewing favorites.
- v4.0.0, 2019-05-02:
- BUGFIX: Incorrect table-constant used on
favorites
page, causing debug-log for sites that use a non-empty "DB_PREFIX".
- CHANGE: Future-proofing and integration with Zen Cart 1.5.6 and later.
- CHANGE: Enable integration with other attribute-handling plugins, e.g. Attribute Image Swapper, to allow those additional attribute types to be successfully added to a customer's Favorites.
- BUGFIX: Product's name not included in message when moved from favorites to cart.
- v3.0.1, 2018-09-03:
- BUGFIX: Selected attributes weren't being restored on the product-details page (e.g. product_info) when a favorite product's link was clicked.
- CHANGE: Use the shopping-cart's add_cart method to add favorites to the cart; enables better integration with other plugins.
- v3.0.0, 2017-11-26:
- BUGFIX: The
products_id
value stored for un-attributed products included a "false" indication of attributes, resulting in an unneeded addition to the database storage requirements. The plugin's admin-level initialization script "cleans-up" any existing records.
- CHANGE: Zen Cart 1.5.5e is now the change-basis for all core/template overrides; those files have not changed from the v2.0.0 release of Favorites Wishlist.
- CHANGE: Re-factor (PSR-2 styling) all plugin-specific modules.
- CHANGE: Wait for admin login before applying installation/upgrade database changes.
- CHANGE: Add "Favorites Groups" support; use ZC 1.5.5e as the change-basis for all core/template overrides.
- v2.0.0, 2016-11-15:
- CHANGE: Drop support for Zen Cart versions prior to 1.5.5a; use ZC 1.5.5b as the change-basis for all core/template overrides.
- CHANGE: Add installation check for built-in notifier.
- BUGFIX: Update
favorites
page template to display properly in responsive mode.
- v1.2.0, 2016-04-16:
- CHANGE: Include ZX AJAX Add to Cart correction, see this posting for details.
- CHANGE: Use trigger_error instead of error_log to log interface errors.
- CHANGE: PHP 7 compliance, change class constructor names to __construct.
- BUGFIX: Duplicate records inserted into
favorites
table; clean them up!
- CHANGE: Add admin tool to view your customers' current wishlists, Reports->View Favorites Wishlists.
- CHANGE: Change the
fav-col
class' name to fav-elmt
. The Zen Cart v1.5.5 built-in responsive template's CSS is "greedy" and takes over any class with the characters col in their names.
- CHANGE: Restructure the plugin's installation.
- v1.1.0, 2015-09-07:
- CHANGE: Added support allowing a customer to add a product to their favorites from either centerbox or listing displays.
- BUGFIX: Correct not detecting product is already in the favorites' list.
- CHANGE: Re-organized the distribution zip-file, moving all readme and uninstall SQL files under a plugin-specific /docs directory.
- v1.0.0, 2015-02-21: Initial public release.