Giter Site home page Giter Site logo

ierhyna / goods-catalog Goto Github PK

View Code? Open in Web Editor NEW
12.0 3.0 11.0 408 KB

Plugin for WordPress to create a catalog of products

Home Page: http://oriolo.ru/dev/goods-catalog

License: GNU General Public License v3.0

PHP 96.35% CSS 3.65%
wordpress-plugin wordpress

goods-catalog's Introduction

Goods Catalog

Codacy Badge Build Status

Goods Catalog provides a catalog of products organized into categories. It is easy to use and fully customizable. Goods Catalog was created to help you organize a simple catalog of products on WordPress site.

Main features

  • Unlimited categories of products with unlimited depth of subcategories
  • Tumbnails for categories and products
  • The separate sidebar for the catalog, to show different widgets on the catalog and other pages.
  • Shortcodes
  • Widgets

The catalog created with Goods Catalog is easy to navigate: at the main catalog page are located all parent categories of products, at the category page firstly are located subcategories and then products of the category.

Shortcodes

  • Use shortcode [goods_newest] to display the newest products anywhere in the site: on post or page. For example, to show 6 products, type: [goods_newest number=6]
  • [goods_categories] to display the list of goods categories (many thanks to Alexander Chizhov & Pineapple Design Studio)
  • [goods_tags] to display list of all products' tags
  • [goods_sitemap] to display sitemap of the catalog (testing mode). Usage: [goods_sitemap include_category=55,54 orderby=include]
  • [goods_term] to display category or tag by ID. Usage: [goods_term goods_category|goods_tag id=X], ex.: [goods_term goods_category id=3] to display category with ID=3, or [goods_term goods_tag id=5] to display tag with ID=5. It only displays title with link and description, without image.

Languages

Goods Catalog is ready for localization to your language. Now it is available in the following languages:

  • English
  • Russian
  • Spanish (thanks to netsis)
  • French (thanks to Bertrand)
  • Italian (thanks to Massimo Gallarotti)

You can send me translation for your language, and I'll add it to the release.

Installation

Install the Goods Catalog Plugin

The easiest way to install Goods Catalog plugin is the automatic installation:

  • From WordPress admin panel, navigate to the Plugins menu and click Add New,
  • In the search field type "Goods Catalog" and click Search Plugins. Found Goods Catalog plugin in the list.
  • Click Install Now.

Or you can install the plugin manually:

  • Download the plugin in .zip archive.
  • Upload unzipped goods-catalog folder to the /wp-content/plugins/ directory.

After the installation, please activate the plugin through the Plugins menu in WordPress.

Install the dependencies

Please install Taxonomy Images plugin, that provides thumbnails for categories.

Basic configuration

After you have the Goods Catalog installed, you need to flush the permalinks to prevent 404 errors. Just go to Settings -> Permalinks and press "Save". You don't need to change your permalinks.

Frequently Asked Questions

There is 404 on /catalog or products page

You need to update your permalinks. Just go to Settings -> Permalinks and press "Save". You don't need to change it.

There are no thumbnails for the categories

Please use Taxonomy Images plugin to attach image to category, and than turn on "Show Thumbnails for categories" option in Gooods Catalog plugin settings.

Can I use sidebar in the catalog pages?

Sure! There is special sidebar for the catalog. All widgets you put in there will be available only for catalog pages. Please, set up the sidebar in the plugin settings.

How can I translate Goods Catalog to my language?

Please use one of translation tools, listed in the Codex to open .POT file and create your own translation. You can put your .PO and .MO files into /wp-content/languages/plugins/ and you will not loose the translations after plugin update. Also, you can send me your language files and I'll add them to the release.

How to customize title meta tag on catalog or category page?

The simpliest way is to use some SEO plugins that allow to customize titles: ex., WordPress SEO by Yoast or All in One SEO Pack.

Or you can manually change your theme's header.php (see here).

Another option is to change the plugin files see the discussion here. It is not recommended: you will lose the changes after the plugin update.

How can I enable or disable the comments for catalog entries?

Since the version 1.0.0 comments comments are enabled by default. You can disable them globally in WordPress Admin settings (at Discussion tab), or you can use third-part plugins to make comments available only for some post types, for example Disable Comments Plugin.

How can I separate comments to products and posts in the Admin Panel?

You can use my plugin Comments by Post Type for that.

Changelog

Please find the changelog here.

Other Info

You can contribute code and localizations to this plugin via GitHub

License: GNU General Public License v3

Donate link: http://oriolo.ru/dev/goods-catalog/donate

goods-catalog's People

Contributors

alexchizhovcom avatar blackmelancholia avatar ierhyna avatar ikenfin avatar ildarkhasanshin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

goods-catalog's Issues

get_the_permalink

Не выводятся шорткоды товаров – ни [goods_newest] ни [goods_newest number=12]. Просто пустые дивы. тоже не выводит. Причем категории выводятся нормально.
Нашел ошибку – в файле function.php плагина на 162 строчки – вместо get_the_permalink() необходимо исправить на get_permalink()

my_breadcrumb()

Здравствуйте!
Для пробы создал один товар, но как-то запамятовал связать его с определённой категорией. Вот что вылезло:
Warning: Invalid argument supplied for foreach() in Z:\home\wp\www\wp-content\plugins\goods-catalog\inc\breadcrumbs.php on line 67
Ясно, что плагин подразумевает распределение товаров по категориям, но забывчивость пользователей-"непрограммистов" нельзя оставить в стороне. :)
Решение очевидно:
default
Также, честно говоря, не совсем понял необходимость в этой же ф-ции условия-"обёртки":
if (is_single() || is_tax()) {
Одно из этих условий внутри "обёртки" всё равно выполнится, или она для наглядности?

Category Images are not shown

Hi everyone,

  1. I add an image into category.
    It shows properly in the edit mode.
    img2

  2. Navigate to the category.
    The default image is shown but not the correct one.
    img1

If you can help I would be very thankful.

get_the_product_price()

Указывается параметр префикса перед выводом цены

function get_the_product_price( $title = '', $before = '<p class="goods-price-single">', $after = '</p>' ) {

Но потом он перезаписывается

if ((isset($gc_price)) && ($gc_price != '')) { // show fields values
    $title = __('Price:', 'goods-catalog');

Получается, что параметр $title у функции захардкорен и невозможно указать какие-либо свои значения. Всегда выводится "Цена:" перед ценником. С $before и $after подобной мелкой ошибки не наблюдается.
Из-за данного бага не получается убрать все ненужное и вывести чистую строку цены без HTML-мусора.

echo get_the_product_price( '', '', '' );

Check quotes in SKU input field

If set in SKU field 'word here "My god" ' and press Publish
In next view it shows 'word here' as input field value and '"My god"' will be near input field

add templates customization

like that:
// Checks the themes "get_stylesheet_directory()"root directory for both the custom single & archive templates // if not found it uses the templates in the plugin "plugin_dir_path( __FILE__ )"template directory. add_filter('template_include', 'myposttype_template_include'); function myposttype_template_include($template) { if(get_query_var('post_type') == 'myposttype') { if ( is_archive() || is_search() ) : if(file_exists(get_stylesheet_directory() . '/archive-myposttype.php')) return get_stylesheet_directory() . '/archive-myposttype.php'; return plugin_dir_path( __FILE__ ) . '/templates/archive-myposttype.php'; else : if(file_exists(get_stylesheet_directory() . '/single-myposttype.php')) return get_stylesheet_directory() . '/single-myposttype.php'; return plugin_dir_path( __FILE__ ) . '/templates/single-myposttype.php'; endif; } return $template; }

user roles white screen

Из-за установки плагина пользователи с ролями автора и редактора не могут войти в меню Записей (обычных, не в каталоге, а на самом сайте) - белый экран. (Если плагин деактивировать, записи снова становятся доступны.) Все остальные функции при этом вроде как доступны. И у роли администратора таких проблем нет.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.