GithubHelp home page GithubHelp logo

magepow / magento-2-categories Goto Github PK

View Code? Open in Web Editor NEW
39.0 7.0 15.0 2.29 MB

Magento 2 Category Extension is a module that helps you present custom product categories on the pages, navigating customers to your featured product categories.

Home Page: https://magepow.com/magento-2-categories-extension.html

PHP 72.24% HTML 19.04% Less 8.73%
magento2 magento2-module magento2-extension magento2-extension-free magento-module magepow-categories magepow subcategories magento-widget-categories magento-advanced-categories

magento-2-categories's Introduction

Magento 2 Categories Extension Free

Magento 2 Categories Extension Free allows you to take the shortest way to lead customers to their target pages. With this extension, you can show subcategories on category pages and choose the layout to display them as the grid or list. Aside from that, you also can show the hot categories or simply the chosen categories on the Homepage or any CMS page.

Categories extension free by Magepow is very easy to configure and manage, with no coding needed and responsive ready. With this extension, you can suggest to customers more content/products you have on your store and make an eye-catching look.

For example, your online store is selling a wide range of subcategories such as Tops, bottoms, pants, bags, jackets... might dozens of categories but you want when your customers come to your store, you want them to buy or know most of some products types that you concentrate more than normal products.

Magento 2 Categories Free

So this extension can help you show on the top of the page the hot categories are chosen from categories collection or show them on the top of the category pages to recommend to customers.

Latest Stable Version Total Downloads Daily Downloads

1. Highlight Features

Features Free Version Pro Version
Display optional subcategories on Home page
Display the subcategories as slider layout on the Home page X
Display optional subcategories on Category page
Display the subcategories as slider layout on the Categories page X
Display optional subcategories on Product page X
Display optional subcategories on Shopping Cart page X
Add or remove categories for the home pape and category pages as desired
Add or remove categories on each page as desired X
Multiple positions show categories X
Subcategory characteristics on homepage and category page vary with 2
independent installers
Subcategory block characteristics on each page can be individually
customized using 'Category Pro Rule'
X
Grid layout
List layout
Slider layout X
Sort the subcategories by Name
Sort the subcategories by Page Title
Sort the subcategories by Location
Sort the subcategories by Creation Date
Sort the subcategories by Admin tree X
Display subcategory with Block Title
Display subcategory with Description
Display subcategory with Thumbnail
Display subcategory with Item Amount
Full responsive design
Customize Responsive Information X
Display different categories with customer groups
(Not logged in, General, Wholesale, Retailer)
X
Free Support X

Magento 2 Categories Free

Display optional subcategories on Home page

Magento 2 Categories Free

Display optional subcategories on Category page

Magento 2 Categories Free

Display optional subcategories on Product page

Magento 2 Categories Free

Display optional subcategories on Shopping Cart page

See more: Demo free version - Demo Pro version

Magento 2 Categories Free Magento 2 Categories Pro

2. How to install Magento 2 Categories extension Free

✓ Install Magepow Categories via composer (recommend)

Run the following command in Magento 2 root folder:

composer require magepow/categories
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f

3. Magepow Categories user guide

SubCategories extension free for Magento allows customers access the categories quickly and conveniently, stimulating users to click on the categories because of the beautiful interface.

Enable Magepow Categories

Go to Admin Panel > Stores > Settings > Configuration > Magepow > Categories

Select Yes to enable module.

Setting Magepow SubCategories

Go to Admin Panel > Stores > Settings > Configuration > Magepow > Categories

  • Two layouts available (Grid or List).
  • Ability to sort subcategories by "Name", "Page Title", "Position", and "Created Date".
  • Ability to show subcategories heading or not and to type in the heading text.
  • Ability to show or not category description.
  • Select categories that do not display subcategories.

config-module-img

The home page also has the same settings as the category page, except that:

  • The home page can choose the display categories instead of excluding the display category.
  • The home page can order the categories by 'custom sort', which will display in the order ids appear in the config value. You can curate this by manually setting the ids in the env.php file to override admin based config.
    ./bin/magento config:set -e magepow_categories/home_page/category_select "64,72,73,1052,68,69,70,1046,65,88,311"
    
  • Select the categories displayed on the home page.

config-module-img

This Is Result In Frontend

In homepage

config-module-img

In categories page

config-module-img

Donation

If this project help you reduce time to develop, you can give me a cup of coffee :)

paypal

Our Magento 2 Extensions

Our Magento 2 services

Our Magento 2 Themes

Our Shopify Themes

Our Shopify App

Our WordPress Theme

magento-2-categories's People

Contributors

alanadong avatar alothemes avatar amyyd avatar annadoann avatar davidduong90 avatar duongquyet avatar magiccart avatar manhhd296 avatar ngoducnhuiit avatar proxiblue avatar thuythunguyen avatar zetman0369 avatar zoe-997 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

magento-2-categories's Issues

Parameter must be an array

main.CRITICAL: Warning: count(): Parameter must be an array or an object that implements Countable in /vendor/magepow/categories/view/frontend/templates/categories.phtml on line 25 {"exception":"[object] (Exception(code: 0): Warning: count(): Parameter must be an array or an object that implements Countable in vendor/magepow/categories/view/frontend/templates/categories.phtml on line 25 at vendor/magento/framework/App/ErrorHandler.php:61)"} []

the line is
<?php if (empty(count($categories))) return; ?>

it should probably be

<?php if (is_array($categories) == false) return; ?>
<?php if (empty(count($categories))) return; ?>

Sorting by position does not give ideal sorting result

The sot by just position does not take into consideration the parent child setup of categories in the positional tree.

For example:

image

Here category with ID 94 will be positioned before category with ID 71, even though category with ID 94 is way lower (and a child of another parent category.

Ideally the position sorting shoudl consider teh parent to child layout as well.

Placeholder custom in system config not work, always magento placeholder

I change vendor\magepow\categories\Block\Categories.php to add helper image in construct:
...
\Magento\Catalog\Helper\Image $helperImage
...
$this->helperImage = $helperImage;

and I change function getImage to get placeholder success:
$placeholderImageUrl = $this->helperImage->getDefaultPlaceholderUrl('small_image');

File result:

`<?php
/*

namespace Magepow\Categories\Block;

class Categories extends \Magento\Framework\View\Element\Template
{
const XML_PATH = 'category_page';

public $helper;

public $storeManager;

public $helperImage;

public $coreRegistry;

public $categoryFactory;

public $catalogHelperOutput;

public function __construct(
    \Magento\Store\Model\StoreManagerInterface $storeManager,
    \Magento\Framework\Registry $coreRegistry,
    \Magento\Catalog\Model\CategoryFactory $categoryFactory,
    \Magento\Catalog\Helper\Output $catalogHelperOutput,
    \Magento\Catalog\Helper\Image $helperImage,
    \Magepow\Categories\Helper\Data $helper,
    \Magento\Framework\View\Element\Template\Context $context,
    array $data = []
) {    
    $this->storeManager        = $storeManager;
    $this->coreRegistry        = $coreRegistry;
    $this->categoryFactory     = $categoryFactory;
    $this->catalogHelperOutput = $catalogHelperOutput;
    $this->helperImage  = $helperImage;
    $this->helper = $helper;
    parent::__construct($context, $data);
}

public function getLayout() 
{
    return $this->helper->getConfig(self::XML_PATH . '/layout');
}

public function getHeading() 
{
    return $this->helper->getConfig(self::XML_PATH . '/heading');
}    

public function isShowDescription() 
{
    return $this->helper->getConfig(self::XML_PATH . '/description');
}    

public function getSortAttribute() 
{
    return $this->helper->getConfig(self::XML_PATH . '/sort_attribute');
} 

public function getExcludeCategory()
{
    return $this->helper->getConfig(self::XML_PATH . '/exclude_category');
}

public function getCategories()
{

    $category = $this->coreRegistry->registry('current_category');
    if(!$category) return;

    $categoryId = $category->getId();

    if ($this->isExcluded($categoryId)) return;

    $sortAttribute = $this->getSortAttribute();  
    $model = $this->categoryFactory->create();
    $categories = $model->getCollection()
    ->addAttributeToSelect(['name', 'url_key', 'url_path', 'image','description'])
    // ->addAttributeToFilter('include_in_menu', 1)
    ->addAttributeToFilter('parent_id', $categoryId)
    ->addAttributeToSort($sortAttribute)
    ->addIsActiveFilter();

    return $categories;
}

public function getDescription($category)
{
    $description = $category->getDescription();
    if ($description) {
        $categoryDescription = $this->catalogHelperOutput
        ->categoryAttribute($category, $description, 'description');
    } else {
        $categoryDescription = '';
    }
    return trim($categoryDescription);
}

public function getImage($category)
{
	$placeholderImageUrl = $this->helperImage->getDefaultPlaceholderUrl('small_image');
    $image = $category->getImage();
    if ($image != null) {
        $url = $this->getImageUrl($image);
    } else {
        $url = $placeholderImageUrl;
    }  
    return $url;
}

public function getImageUrl($image)
{
    $url = false;  
    if ($image) {
        if (substr($image, 0, 1) === '/') {
            $url = $this->storeManager->getStore()->getBaseUrl(
                \Magento\Framework\UrlInterface::URL_TYPE_WEB
            ) . ltrim($image, '/');
        } else {
            $url = $this->storeManager->getStore()->getBaseUrl(
                \Magento\Framework\UrlInterface::URL_TYPE_MEDIA
            ) . 'catalog/category/' . $image;
        }
    } 
    return $url;
}

public function isExcluded($id)
{
    $excluded = explode(',', $this->getExcludeCategory());
    if (!$excluded) return;
    return in_array($id, $excluded);
}

}`

Categories Layout Grid not working only list

I installed via composer and is working except the Categories Layout: Grid option. It lists all the categories fine tho. Is there anything specific i need to set in the category page under Design tab? I have tried altering the layout between 1, 2 & 3 column's but no difference still just lists with a bullet point.

Error compatible PHP 8.2

Deprecated Functionality: Creation of dynamic property Magepow\Categories\Setup\InstallData::$categorySetupFactory is deprecated
app/code/Magepow/Categories/Setup/InstallData.php on line 14

Bloch widget for change position in home page

Hello everybody

Is it possible to load the module on the home page from the static block?
exemple
{{block class="Magepow\Categoryes\Block\Widget" }}

if so what is the code?

thank you

composer install fails - propose other method - zip?

Struggling to get this installed via composer due to the current errors -

Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
  - Installing magepow/categories (1.0.2): Downloading (100%)
Package container-interop/container-interop is abandoned, you should avoid using it. Use psr/container instead.
Package facebook/webdriver is abandoned, you should avoid using it. Use php-webdriver/webdriver instead.
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.
Package sebastian/finder-facade is abandoned, you should avoid using it. No replacement was suggested.

mmap() failed cannot allocate memory

[catfnbctwx]:public_html$ composer require magepow/categories
Cannot create cache directory /home/404905.cloudwaysapps.com/catfnbctwx/.cache/composer/repo/https---repo.magento.com/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/404905.cloudwaysapps.com/catfnbctwx/.cache/composer/repo/https---repo.packagist.org/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/404905.cloudwaysapps.com/catfnbctwx/.cache/composer/files/, or directory is not writable. Proceeding without cache
Loading composer repositories with package information
Warning from repo.magento.com: You haven't provided your Magento authentication keys. For instructions, visit https://devdocs.magento.com/guides/v2.3/install-gde/prereq/connect-auth.html
Authentication required (repo.magento.com):
Username: 57d047858b88f90f9613a1ada7e6957b
Password:
Do you want to store credentials for repo.magento.com in /home/404905.cloudwaysapps.com/catfnbctwx/.config/composer/auth.json ? [Yn] n
Updating dependencies (including require-dev)

mmap() failed: [12] Cannot allocate memory

mmap() failed: [12] Cannot allocate memory
PHP Fatal error: Out of memory (allocated 721420288) (tried to allocate 364544 bytes) in phar:///usr/local/bin/composer/src/Composer/Util/RemoteFilesystem.php on line 462

Fatal error: Out of memory (allocated 721420288) (tried to allocate 364544 bytes) in phar:///usr/local/bin/composer/src/Composer/Util/RemoteFilesystem.php on line 462

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.