emizentech / magento2-shop-by-brand Goto Github PK
View Code? Open in Web Editor NEWShop By Brand Extension for #Magento2
Shop By Brand Extension for #Magento2
How can i add new brand in this module
Unable to input manufacture with Configureable Product
Not sure if this is a bug or there is a special way to add the manufacture for a Configureable Product.
Thank you for releasing this..
im having 502 because of having many products in some brands.
I think kind of paging is necessary, is there any milestone to add it ?
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
As per title.
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!
Hi,
I think it needs to have an API for mobile app.
Do you have a plan for this?
Thanks.
HI,
great extension but it seems its not adding url key into rewrite section.
is there any issue or its not available yet ?
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; }
Hi,
I am unable to see my layered navigation on brand product view page
From what I gather this module is only for M2.0 , any hopes for an update to current Magento version?
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?
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.
Why I am getting the above link in every product?
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?
Any idea what it would take to build such a feature?
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?
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
<?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;
}
}
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.