=== NoShop ===

Contributors: dkguru
Tags: noshop, products, list, shop
Requires at least: 4.7
Tested up to: 7.0
Stable tag: 1.0.0
License: GPLv3

NoShop Product Page allows you to create a list of products/items with pictures without using a full shopping cart.



== Description ==

NoShop Product Page allows you to create a formatted list of products/items with pictures.

This allows you to create a shopping cart like product page or employee list with pictures without having to install and maintain a full shopping cart.

Note: This plugin is now version 1.0. - after more than a decade of being dormant, it has been revived and updated for modern WordPress versions. :-)

Data is stored in the wordpress database.

Pictures has to be pre-uploaded to somewhere and then referenced via URL.

For each item you can add specifications tags.

[My blog post](https://dkguru.wordpress.com/2026/08/02/reviving-noshop-after-more-than-a-decade/) about reviving this plugin.




== Installation ==

= How to install the plugin and get it working. =

1. Upload the downloaded `noshop` folder to the `/wp-content/plugins/` directory. (Or install via WP plugin directory)

2. Activate the plugin through the 'Plugins' menu in WordPress.

3. Add products on the option page.

4. Place `[NoShop <category name>]` in your page.





== Frequently Asked Questions ==

= Why is this so clunky =

This plugin is still meant to be simple, but please feel free to visit my page and submit some comments and suggestions :-)

= Are there other plugins that works! =

This works! I am currently using it in a live environment - however - it IS clunky...

I wrote is because I couldn't find any other plugins that does the same (simple list of products - no shopping cart - no fancy setup).

If you find a solution that's easy to use, feel free to tell me and I'll happily stop wasting my time re-inventing the wheel :-)

= I know this plugin is free, but... can I contribute? =

If you really want to contribute, please consider donating to my wife's nonprofit [Living Islands Donation Page](http://donorbox.org/linp). They are doing what they can to support Micronesia and the Pacific Islands. Any donation is greatly appreciated.


== Screenshots ==

1. NoShop! in action
2. NoShop! Admin interface

== Changelog ==

= 1.0.0 =

* Initial public (re-)release in 2026


= 0.9.5 =

* Text domain and cache group finalization
  - Reverted text domain to the canonical 'noshop' used by the plugin and ensured all i18n calls use that domain.
  - Standardized internal cache groups to 'noshop' for consistency.
  - Updated final version metadata and readme entries for 0.9.5.

= 0.9.4 =

* Final sweep & release housekeeping
  - Finalized escaping of all admin outputs and form fields; ensured internationalization domain is present on strings.
  - Replaced remaining direct $_SERVER reads with wp_unslash-ed locals to satisfy static checks.
  - Removed development logging (error_log) from production paths.
  - Added object caching (wp_cache_get/wp_cache_set) for product lists, product lookups and specs to reduce DB load.
  - Replaced unlink() in tests with wp_delete_file() and added ABSPATH guards to test files.
  - Prepared release notes and created release ZIP (noshop-0.9.3.zip) in the workspace root.
  - Bumped plugin version to 0.9.4.

= 0.9.3 =

* Hardening & Compatibility: Addressed plugin-checker findings and improved WP best-practices.
  - Added ABSPATH protection to prevent direct file access in main plugin file and tests.
  - Replaced plugin-defined global is_ssl() with a namespaced fallback (noshop_is_ssl) and unslashed $_SERVER access.
  - Removed legacy global path variables; use plugin_dir_url()/plugin_dir_path() instead.
  - Enqueued front-end stylesheet via wp_enqueue_style() on wp_enqueue_scripts instead of echoing <link> tags.
  - Replaced raw SQL and prepared interpolations with WPDB helpers: $wpdb->insert, $wpdb->update, $wpdb->delete, and preserved $wpdb->prepare only for placeholders.
  - Escaped all admin outputs (esc_html / esc_attr / esc_url / esc_textarea) and used checked() helper for checkboxes.
  - Ensured admin form actions use esc_url() and preserved nonces (wp_nonce_field + check_admin_referer).
  - Guarded debug logging (error_log) behind WP_DEBUG.
  - Added ABSPATH guards to PHPUnit test files.
  - Updated readme header (Requires at least 4.7, Tested up to 7.0) and bumped Stable tag to 0.9.3.

= 0.9.2 =

* License: Updated license to GNU General Public License version 3 (GPLv3).
  - Added full license file at trunk/COPYING.
  - Updated plugin header and readme to reference GPLv3.


= 0.9.1 =

* Security & Compatibility: Updated for PHP 8+ and WordPress 7 compatibility.
  - Converted old PHP4 constructor to modern __construct and removed unsafe static calls.
  - Converted createtable() and createsubtable() to instance methods and updated call sites.
  - Ensured callbacks use array(callback) style where required.
* Sanitization & Hardening
  - Replaced legacy stripslashes/addslashes/mysql_real_escape_string usage with wp_unslash + sanitize_text_field, sanitize_textarea_field, esc_url_raw and intval.
  - Added nonces (wp_nonce_field + check_admin_referer) to admin forms to protect against CSRF.
  - Escaped outputs (esc_url / esc_html) for admin notices and links.
* Template & Theming
  - Added load_template() helper so themes can override table.template.xhtml and subtable.template.xhtml by placing files in theme/noshop/.
* Admin UX & Error Reporting
  - Added admin notices and error_log entries when the plugin instance is missing and a shortcode could not be rendered.
  - Added settings messages for DB operations (add/update/delete) using add_settings_error/settings_errors.
* Tests
  - Added PHPUnit tests for basic class existence, shortcode replacement and full template replacement flow (trunk/tests/).
* Misc
  - Replaced hardcoded PayPal donate form with a Donorbox link (http://donorbox.org/linp).
  - Replaced legacy path handling with plugin_dir_url()/plugin_dir_path() and admin_url().

= 0.8.4 =

* Change: Reversed This ChangeLog
* New: Added {hashtitle} that will take you directly to a product on the page (See table.template.xhtml for example)
* New: Added {autourlbegin} and {autourlend} that will create the A HREF tag for you, but NOT do so if you do not have an URL for the product.
       {url} still works and is still used for the product image so the template has an example of both.

= 0.8.3 =

* Fix: Corrected call to dbDelta() and update_option(). Database should now upgrade without need for deactivate/activate

= 0.8.2 =

* Added note about multi-categories.
* Added link to settings page to Wordpress Plugin Directory Support page for this plugin.

= 0.8.1 =

* Tested on WordPress 3.4.2 - Passed!
* DB Version updated to 0.8.1 to keep in sync with plugin

= 0.8 =

* New: Sorting index for entries
* New: Added Category name and index as variable to template (use {cat} and {ndx}).
* New: Added Category name and index as HTML comment in table.template.
* Fix: Multiple list on one page NOW WORKS! (I had a DAH moment :-)

= 0.7.8 =

* Fix: Whoops, got my versioning out of sync. Fixed. :-)

= 0.7.7 =

* Added delete button for products.
* Fix: Multiple Lists on same page now working.
= 0.7.6 =

* Fix: Invalid argument supplied for foreach() - Thanks Gayan Hewa!

= 0.7.5 =

* Added donation button. Thank you for considering it :-)
* Fixed this readme file (again!)

= 0.7.4 =

* Rewrote CSS and XHTML templates for better CSS
* New CSS much leaner
* New simpler back end been revised but still buggy (will be released later this week)
* This version now allow for custom CSS separate from install
* Added width field for value headers

= 0.6 =

* First rewrite. Horrible. Trying to forget.

= 0.5.3 =

* Uh oh. DB didn't update. Temporary fix in there. Plz ignore update error - it's not real :-)

= 0.5.2 =

* Moved output to template based output. Plugin now uses html templates and css for all formatting.
* Template per item: table.template.html
* Template per specification: subtable.template.html
* Keep templates in plugin directory.
* ONLY HARDCODED TEMPLATE for now. Later I'll add selectable :-)

= 0.5.1 =

* Redesigned options screen to more compact format.

= 0.5 =

* Fixed small errors.
* Fixed versioning.
* Added imgurlmode field to DB (DB now version 0.5!)
* Fixed ' != ` error in dbDelta that prevented DB upgrade!

= 0.4.5 =

* Added screenshots.

= 0.4.4 =

* Added default image to settings.

= 0.4.3 =

* Updated options page: Add specification button added
* Updated options page: Showing thumbnail picture preview

= 0.4.2 =

* Updated options page: Moved 'Create Product' to a button rather than a checkbox.

= 0.4.1 =

* Error fix: Added 'static' to NoShop::Products()
* Updated this readme.txt

= 0.4 =

* New and improved admin page

= 0.3 = 

* First version of admin page

= 0.2 =

* Created functions to show database contents in list
* Created CSS

= 0.1 =

* Copied hello.php
