ierhyna / goods-catalog Goto Github PK
View Code? Open in Web Editor NEWPlugin for WordPress to create a catalog of products
Home Page: http://oriolo.ru/dev/goods-catalog
License: GNU General Public License v3.0
Plugin for WordPress to create a catalog of products
Home Page: http://oriolo.ru/dev/goods-catalog
License: GNU General Public License v3.0
Add breadcrumbs to catalog pages
Из-за установки плагина пользователи с ролями автора и редактора не могут войти в меню Записей (обычных, не в каталоге, а на самом сайте) - белый экран. (Если плагин деактивировать, записи снова становятся доступны.) Все остальные функции при этом вроде как доступны. И у роли администратора таких проблем нет.
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
make a shortcode to show products from selected category
no featured image box, exactly for adding goods page.
Здравствуйте!
Для пробы создал один товар, но как-то запамятовал связать его с определённой категорией. Вот что вылезло:
Warning: Invalid argument supplied for foreach() in Z:\home\wp\www\wp-content\plugins\goods-catalog\inc\breadcrumbs.php on line 67
Ясно, что плагин подразумевает распределение товаров по категориям, но забывчивость пользователей-"непрограммистов" нельзя оставить в стороне. :)
Решение очевидно:
Также, честно говоря, не совсем понял необходимость в этой же ф-ции условия-"обёртки":
if (is_single() || is_tax()) {
Одно из этих условий внутри "обёртки" всё равно выполнится, или она для наглядности?
shortcode to display products by ID
using flush_rewrite_rules functions
Grid, Mosaic grid, List
Не выводятся шорткоды товаров – ни [goods_newest] ни [goods_newest number=12]. Просто пустые дивы. тоже не выводит. Причем категории выводятся нормально.
Нашел ошибку – в файле function.php плагина на 162 строчки – вместо get_the_permalink() необходимо исправить на get_permalink()
Указывается параметр префикса перед выводом цены
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( '', '', '' );
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; }
Breadcrumbs show the first parent category in all subcategories pages even if they are not in this parent category
Update template
Add comments to products
The translation to Item Options box is added. but do not works
and random products from category
allow users create own fields for product
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.