Git Product home page Git Product logo

magento2-shop-by-brand's People

Contributors

emizentech 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  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

magento2-shop-by-brand's Issues

Unable to add brands

Hi,

I installed this extension using composer and it got installed without any error.
Screenshot 2020-08-09 at 8 14 08 AM
I want to know where to add brand in this page ? In product page also it is not showing any option to add/select brand.

Running into Array To String Conversion error on M2

Hello,

We're implementing an M2 CE (2.0.4), and using your ShopByBrand extension. We are running into array to string conversion error when attempting to disable the Featured setting. I think we were able to change the setting for 1 single brand.

We have about 167 brand records, all have images associated to them. The record ID ranges from 1432-1598.

I'm attaching the error log displayed after hitting the SAVE button.

Can you help? Are we doing something wrong?

Thanks in advance.
Immanuel Pekerti
Specialized Products Company

ShopByBrand-ErrLog.txt

Don't force a view in package

Just a suggested change in your code.

Don't include a forced view into the header. Most people will end up with a custom theme, and forcing it into the header breaks all sorts of menu's.
Id suggest making this a widget, which can be inserted into any page, wherever the user wants.

Your generated brand page works great though! Great job!

Request Feature

Hi,
I think it needs to have an API for mobile app.
Do you have a plan for this?
Thanks.

Unable to use URL Key

HI,

great extension but it seems its not adding url key into rewrite section.

is there any issue or its not available yet ?

Save image

Hei

Right now u cant save new image before u have deleted old one, also if u allready have image u get php notice (in dev mode) ... so on save.php (line 50) probably should be something like:

//unset($data['image']);
if (isset($data['logo']['value'])) { $data['logo'] = $data['logo']['value']; } else { $data['logo'] = null; }

shows products with visibility set to 'Not Visible Individually'

I have lots of simple products set as "Not Visible Individually" for inclusion in Configurable and Bundle products.

When viewing the individual brand page, all the products set as Not Visible are displayed. Can this be fixed so Not Visible products are not displayed?

Product with status disabled

Hei again, tnx for nice module ;)

Found a small bug:
When open single brand to view products, it also shows out products with status set disabled.

And some other questions.

  1. Is there a way to show brand logo on single product page? (Magento_Catalog/layout/catalog_product_view.xml)
  2. Brand page shows all products connected to this brand, is there a easy way to show products like in category pages - "Products per Page on Grid" , so there will be pagination and sorting options.

brand/view/index/ link in product page

Why I am getting the above link in every product?

image

The link is applied to the "add item to basket", to the product counter, and the local area.

When I press "add to basket", or the brand/view/index/ link the below happens:

Fatal error: Uncaught Error: Call to a member function getAttributeId() on boolean in /var/www/html/vendor/emizentech/shopbybrand/Block/View.php:118 Stack trace: #0 /var/www/html/vendor/emizentech/shopbybrand/Block/View.php(58): Emizentech\ShopByBrand\Block\View->getProductCollection() #1 /var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(111): Emizentech\ShopByBrand\Block\View->__construct(Object(Magento\Catalog\Block\Product\Context), Object(Magento\Catalog\Model\ResourceModel\Product\CollectionFactory), Object(Magento\Catalog\Model\Product\Visibility), Object(Magento\Framework\App\Http\Context), Object(Emizentech\ShopByBrand\Model\BrandFactory), Array) #2 /var/www/html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(66): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Emizentech\\Shop...', Array) #3 /var/www/html/vendor/magento/framework/ObjectManager/ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Emizen in /var/www/html/vendor/emizentech/shopbybrand/Block/View.php on line 118

Any ideas what is causing this?

Image not showing

As i have multiple store view in my magento. I am Unable to view the image because it takes the wrong path for the image path( store path). Please help
2017-03-30_15-42-28

A question about customization

Great job with the module!

I wanted to ask you, what would be the best way to modify the frontend of the brands page? I want to customize it, that instead of brand titles, I would love to have brand logos. And is it maybe already built-in?

Issue with images and store codes ( logo 404 not found - Solved ).

Hey @emizentech ,

i faced an issue where the logo URL in brands page gives 404 not found.
after i uploaded an image it was stored in /pub/media/brand/a/p/apple.png and everything was good,
but when i checked the logo nothing appears, so i checked the URL path with chrome inspector and it was storeurl.com/en/pub/media/brand/a/p/apple.png .

so i modified getImageMediaPath() function and replaced the return to $this->_storeManager->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA);

please check if this is a good solution

complete code :

<?php
namespace Emizentech\ShopByBrand\Block;
class Index extends \Magento\Framework\View\Element\Template
{

    protected $_brandFactory;
    protected $_storeManager;
	
    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
         \Emizentech\ShopByBrand\Model\BrandFactory $brandFactory
    ) 
    {
    	 $this->_brandFactory = $brandFactory;
		 $this->_storeManager=$storeManager;
        parent::__construct($context);
    }
    
    
    public function _prepareLayout()
    {
        return parent::_prepareLayout();
    }
    
    public function getBrands(){
		$collection = $this->_brandFactory->create()->getCollection();
		$collection->addFieldToFilter('is_active' , \Emizentech\ShopByBrand\Model\Status::STATUS_ENABLED);
		$collection->setOrder('name' , 'ASC');
		$charBarndArray = array();
		foreach($collection as $brand)
		{	
			$name = trim($brand->getName());
			$charBarndArray[strtoupper($name[0])][] = $brand;
		}
		
    	return $charBarndArray;
    }
     public function getImageMediaPath(){
    	return $this->_storeManager->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA); 
    }
    
     public function getFeaturedBrands(){
	   //  $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
//     	$model = $objectManager->create(
//             'Magento\Catalog\Model\ResourceModel\Eav\Attribute'
//         )->setEntityTypeId(
//             \Magento\Catalog\Model\Product::ENTITY
//         );
// 
// 		$model->loadByCode(\Magento\Catalog\Model\Product::ENTITY,'manufacturer');
// 		return $model->getOptions();


		$collection = $this->_brandFactory->create()->getCollection();
		$collection->addFieldToFilter('is_active' , \Emizentech\ShopByBrand\Model\Status::STATUS_ENABLED);
		$collection->addFieldToFilter('featured' , \Emizentech\ShopByBrand\Model\Status::STATUS_ENABLED);
		$collection->setOrder('sort_order' , 'ASC');
    	return $collection;
    }
    
}

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.