texts: Extending a block disables whole output on Magento2 - Product - Reviews

texts:
I've tried to extend \Magento\Review\Block\Product\View\ListView. I've did so by creating a new module, MS_RealReviews. Within that I've created Block/Review.php and etc/frontend/di.xml and a few others. This is my file tree:

Block/Review.php:

<?php
namespace MS\RealReviews\Block;

class Review extends \Magento\Review\Block\Product\View\ListView
{

    public function isRealReview(){
        // Codebla
    }

}

etc/frontend/di.xml:

<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\Review\Block\Product\View\ListView" type="MS\RealReviews\Block\Review" />
</config>

default.xml

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>

        <referenceContainer name="content">
            <referenceContainer name="product.info.details">
                <block class="MS\RealReviews\Block\Review" name="product.info.product_additional_data" as="product_additional_data" template="product/view/list.phtml"/>
            </referenceContainer>
        </referenceContainer>

        <referenceBlock name="product.info.product_additional_data" remove="true" />

    </body>
</page>

The list.phtml is an unmodified copy of the original file.

When now checking the product page, I do not get any output anymore. I see the form, but once submitted and enabled in the backend, the review is not there.

What am I missing here?


texts: How to disable duplicated values options when adding new option of an attribute magento 2

texts:
I have set the attribute color as unque value but still can add same value and i have tried with an event catalog_entity_attribute_save_before but now he delete all the label and values please any help here is my code :

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="catalog_entity_attribute_save_before">
        <observer name="color_swatches" instance="Description\Set\Observer\ChangeColorOptions" />
    </event>
</config>

and here is my helper that i called then in the observer :

<?php

namespace Description\Set\Helper;
use \Magento\Framework\App\Helper\AbstractHelper;

class Data extends AbstractHelper
{
    protected $_resource;

    public function __construct(
        \Magento\Framework\App\ResourceConnection $resource
    )
    {
        $this->_resource = $resource;
    }

    public function checkColorExists($color)
    {
        $connection = $this->_resource->getConnection(\Magento\Framework\App\ResourceConnection::DEFAULT_CONNECTION);

        $result = $connection->fetchAll("SELECT  DISTINCT value FROM `eav_attribute_option_value` WHERE option_id IN (SELECT option_id FROM `eav_attribute_option` WHERE `attribute_id` = (SELECT attribute_id FROM eav_attribute WHERE attribute_code = 'color'))");
        foreach ($result as &$value) {
            $value = $value['value'];
        }
        if (!in_array($color, $result)) {

            return true;
        }
    }
}

and this is the observer:

<?php

namespace Description\Set\Observer;
use Magento\Catalog\Model\ResourceModel\Eav\AttributeFactory;
use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\Setup\ModuleDataSetupInterface;

class ChangeColorOptions implements \Magento\Framework\Event\ObserverInterface
{
    protected $dataHelper;
    protected $_productAttributeRepository;
    protected $eavSetupFactory;
    protected $setup;
    protected $_resource;
    protected $messageManager;

    public function __construct(

        \Description\Set\Helper\Data $dataHelper,
        \Magento\Catalog\Model\Product\Attribute\Repository $productAttributeRepository,
        EavSetupFactory $eavSetupFactory,
        \Magento\Framework\Message\ManagerInterface $messageManager,
        ModuleDataSetupInterface $setup,
        \Magento\Framework\App\ResourceConnection $resource

    )
    {

        $this->dataHelper = $dataHelper;
        $this->_productAttributeRepository = $productAttributeRepository;
        $this->eavSetupFactory = $eavSetupFactory;
        $this->setup = $setup;
        $this->_resource = $resource;
        $this->messageManager = $messageManager;

    }

    public function execute(\Magento\Framework\Event\Observer $observer)

    {

        //$options = $this->_productAttributeRepository->get('color')->getOptions();

        $attributeCode = 'color';
        $attributeId = 93;
        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $attributeModel = $objectManager->create('Magento\Customer\Model\Attribute')->load($attributeId);
        $options = $attributeModel->getSource()->getAllOptions(); //get all options
        $resource = $objectManager->create('Magento\Framework\App\ResourceConnection');
        $connection = $resource->getConnection();
        $myTable = $this->_resource->getTableName('eav_attribute_option_value');

        foreach ($options as $value) {

            $result = $this->dataHelper->checkColorExists($value['label']);

            if (!$result) {
                $this->messageManager->addError(__("This color exists yet."));
                $test = $value['value'];
                $connection->delete($myTable,['option_id = ?' => $test]);

            }

        }

    }
}

now i even the new color does not exist in the options it show me error and delete all the values any idea please and thanks in advance


texts: How to get Data of a UI Component Admin Form and use it in Controller?

texts:
So i'm creating a UI Component Admin Form with a few fields, and one of them is a Dropdown field.
I want to get the value that user selects, using a custom controller that i made.
I tried this comands:
$this->getRequest()->getParams(); but only returns ID and KEY. What can i don to get all data of the form?
$this->getRequest()->getPostValue(); i tried this one too, but don't works.
Well, but when i use those commandson the Save Controller it works, however thats not functional for me, because i want this to works when i call the DeleteHeader Controller. Why on the Save Controller works? thats because this tag <submitUrl> on the Form.xml: ?
<settings>
      <submitUrl path="api/data/save"/>
</settings>


texts:
I get this error in my System.log file

Strict Notice: Declaration of Mageplaza_Mpga_Block_Ga::getHelper() should be compatible with Mage_Core_Block_Abstract::getHelper($type).


texts: Unable to create customer account on frontend

texts:
When I try to create a customer account than I cause fatal error as:

  Fatal error: Call to a member function setMessageBody() on a non-object in app/code/core/Mage/Core/Model/Email/Template.php on line 412.

Please advise how I can resolve this error.


texts: Magento 2: Facing issue in "Edit Configurations" can't save product

texts:
I faced issue in "Edit Configurations" of product, can't save products, in Magento 2.3.1 with Apply images for all.

Error:

  The
  "/var/www/html/magentosample231/pub/media/tmp/catalog/product/d/o/download.jpeg"
  file doesn't exist.

Step to Reproduce:

  Step 1) Got to product and Edit the product.

  Step 2) Click on Edit configurations button.

  Step 3) Select new option for attribute.

  Step 4) Apply single set of images to all SKUs

  Step 5) Click on "Generate Products" button

  Step 6) Now "Save" the product.

After save the product thrown error.

Expected result:

Product should be updated or Save successfully.

Actual result:

Any help will be appreciated. Thanks.


texts: Compilation from source Error while installing theme in Magento2

texts:
I am trying to install a new free theme in my local system. After installing it, style sheet is showing 404 error in console. When I try to view the style sheet alone via browser, it shows the following error.

**mydomain/pub/static/version1491281875/frontend/Solwin/freego_child/en_US/css/styles-m.css Failed to load resource: the server responded with a status of 404 (Not Found)**

I have compiled, deployed the static content and cleaned caches also via terminal. Also permissions are also given to pub and var folders.

Please can anyone say how to resolve this issue?


texts: I want to override AbstractTemplate.php of vendor\magento\module-email\Model\ in magento 2.1.12.I want to change getUrl method which are declare in AbstractTemplate.php.How can do it?


texts: Layout Cache blocks checkout after X visits on site

texts:
If I activate Layout Cache on a live page, after 4-5 hours the checkout gets significally slower. After some hours more it is up to 20 seconds load time.

It's gone, as soon as I deactivate the layout cache.

What could be the reason for that? What point I should start diggin'?

I have a CE 1.9.9.3 running.


texts: How to add sidebar in custom layout in magento2?

texts:
I want to add sidebar All Product tab in custom layout in magento2?

How to do that.

Thanks.


texts: How to override DatePicker of cart price rule and add time within it in, Magento 2.2.6

texts:
I want to save it in date field no another field and not a new item

https://i.stack.imgur.com/0icp0.jpg

Example of the outcome I am looking for


texts: Magento 2: What's the `Magento` in a Static Asset URL?

texts:
In Magento 2, a static asset URL from a module looks like this

http://example.magento.com/static/frontend/Magento/blank/en_US/Pulsestorm_FrontendTutorial1/hello.js

What's the Magento for between the area and theme? (frontend/Magento/blank).  Is this hardcoded somewhere to Magento? Is it a name that's configurable per "Magento Application".  Something else?

i.e. I know this is where Magento ends up generating the static asset files for the product, but what does this part of the URL represent, and where is Magento's core code pulling it from?


texts: Creating an attribute programatically, but is never visible on front

texts:
I'm creating a new attribute via install, this is the code:

$installer = $this;
    $installer->startSetup();

    // Add new Attribute group
    $groupName = 'Atributos';
    $entityTypeId = $installer->getEntityTypeId('catalog_product');
    $attributeSetId = $installer->getDefaultAttributeSetId($entityTypeId);
    $installer->addAttributeGroup($entityTypeId, $attributeSetId, $groupName, 0);
    $attributeGroupId = $installer->getAttributeGroupId($entityTypeId, $attributeSetId, $groupName);

    $installer->addAttribute("catalog_product", "prd_alto", array(
        'group'             => 'Atributos',
        'label'             => 'Alto Producto',
        'input'             => 'text',
        "type"              => 'varchar',
        'required'          => false,
        'visible'           => true,
        'visible_on_front'  => true,
        'filterable'        => false,
        'searchable'        => false,
        'comparable'        => false,
        'user_defined'      => true,
        'is_configurable'   => false,
        'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
        'note'              => '',
    ));
$installer->endSetup();

As you can see, I'm first creating a new group and then asigning a new attribute to it, this works fine.
However, the attribute that is created has always the option "is_visible_on_front" deactivated.
I've tried with true and 1, neither of them worked.
I can't see why I can't set this attribute to be visible on front. Please help!!


texts: Get convert resultJsonFactory response to string in Magento2

texts:
I want to log the values of a resultJsonFactory object in php with in Magento 2:
How do I get the values I set in the $response object ?

$response = $this->resultJsonFactory->create();
$response->setHttpResponseCode(404);
$response->setData(['message' => 'bla bla bla']);

//something like that but it dosn't work
$myMessage = $response->getData('message');

UPDATE

I understand thant the getData is not set in the resultJsonFactory class but I can't find a way to get the values from the object.

What i am trying to get is the json string and the httpResponseCode.


texts:
Magento 2 shipping address gets blank while adding new billing address
When we add info to fields in the new billing address , the shipping address section gets automatically reload and it gets blank. check here -https://prnt.sc/rqlvjg


texts: Headless Magento 2: Need custom URL instead of domain/products/:SKU

texts:
Fairly new to to magento. I am going for a headless approach, where I have created product listing pages with URLs as:

  www.domain.com/products/:productSKU

I want to change this to something like:

  www.domain.com/products/product-name

I have created a mapping of sorts in form of a dictionary/JSON/Text file, with productSKU as key and product-name as value.

Is there a way to do this? I read a little about NGNIX rewrites, but not sure if that'll work.

Thanks!


texts: Confirmation popup before removing item from cart

texts:
When i remove item from cart i get a poup confirmation:

     require([
        'jquery'
    ], function($) {
            $('.action-delete').off('click');
            $('.action-delete').click(function(e) {
            if(confirm('confirm')){
                return true
            }
            else {
                return false
            }
        })
})

How can i do this with Confirmation widget Magento 2??


texts: Magento 2 Hide Shipping Price on Checkout with Mixin

texts:
I have added a mixin for checkout shipping.js:

requirejs-config.js

var config = {
    config: {
        mixins: {
            'Magento_Checkout/js/view/shipping': {
                'Vendor_Modulename/js/view/checkout/shipping': true
            }
        }
    }
 };

shipping.js

define([
    'jquery',
    'uiComponent'
], function ($, Component) {
    'use strict';
    var mixin = {
        defaults: {
            shippingMethodListTemplate: 'Vendor_Modulename/checkout/shipping-address/shipping-method-list',
            shippingMethodItemTemplate: 'Vendor_Modulename/checkout/shipping-address/shipping-method-item'
        },

        canShowShippingPrice: function () {

            console.log("CAN SHOW SHIPPING:", false);
            return false;
        }
    };

    return function (target) {
        return target.extend(mixin);
    };
});

And in my override template:
shipping-method-list.html

shipping-method-item.html

        <input type="radio"
               class="radio"
               ifnot="method.error_message"
               ko-checked="element.isSelected"
               ko-value="method.carrier_code + '_' + method.method_code"
               attr="'aria-labelledby': 'label_method_' + method.method_code + '_' + method.carrier_code + ' ' + 'label_carrier_' + method.method_code + '_' + method.carrier_code,
                    'checked': element.rates().length == 1 || element.isSelected" />

            <each args="element.getRegion('price')" render="" />

            <input type="radio"
                   attr="'value' : method.method_code, 'id': 's_method_' + method.method_code" />

However, my function "canShowShippingPrice()" is always undefined. How can I use knockout to call this function inside the shippingMethod templates?


texts: slick slider error Uncaught TypeError: Cannot read property 'add' of null in magento2

texts:
I have applied slick slider in the phtml file but is giving error

Uncaught TypeError: Cannot read property 'add' of null in browser

here is my code
<script type="text/javascript">

    require(['jquery', 'slick'], function($){
    jQuery(document).ready(function ($) {
           jQuery('.slickslider').slick({
      dots: false,
      infinite: false,
      speed: 300,
      slidesToShow: 3.1,
      settings: "unslick",
      slidesToScroll: 1,
      responsive: [
        {
          breakpoint: 1024,
          settings: {
            slidesToShow: 3.1,
            slidesToScroll: 1,
            infinite: false,
            dots: false
          }
        },
         {
          breakpoint:767,
          settings: {
            slidesToShow: 3.2,
            slidesToScroll: 1,
             dots: false
          }
        },
        {
          breakpoint: 600,
          settings: {
            slidesToShow: 3.1,
            slidesToScroll: 1,
             dots: false
          }
        },
           {
          breakpoint: 320,
          settings: {
            slidesToShow: 2.1,
            slidesToScroll: 1,
             dots: false
          }
        },
        {
          breakpoint: 480,
          settings: {
            slidesToShow: 2.1,
            slidesToScroll: 1,
             dots: false
          }
        }
        // You can unslick at a given breakpoint now by adding:
        // settings: "unslick"
        // instead of a settings object
      ]
    });
});
});
createSlick();

//Now it will not throw error, even if called multiple times.
 $(window).on( 'resize', createSlick );


texts:
I'm using the Fishpig plugin for Wordpress integration, and I have the layout set to 3columns-left.
I have a sidebar on the left, and posts in middle, but I can't figure out how to put things on the right, because there doesn't seem to be a container over there to reference.
How can I add images (or any kind of data) to the column on the right?
Thanks


texts: Sorting products by catalog number in the frontend

texts:
Magento CE 1.9.1 - I have a custom attribute (Scott #) which essentially is a stamp catalog number. When the frontend sorts the display by Scott #, it was fine until I hit number 100. Now, it is putting catalog number 101 after number 1, rather than after number 99. How can I fix this?
Thank you!


texts:
I have a magento 2 website where we want to have 3 different stores on 3 different domains. We want to share cart and customer session on the different websites. Each website/store will have different catalog.

Now my questions follow as:

What should be the proper configuration of stores to achieve this?
Is it possible to achieve this in Magento 2?


texts: How do I stop customers on Magento from using the same email on different store views?

texts:
I have a wholesale and retail version of my store. I have these setup on Magento as different store views, which means they can access the same database, which makes it simple to stock manage etc.

My problem is that my customers are able to sign up using the same email across both stores.

We do not want this as it can cause confusion.

Is there any way to disable a user signing up again with the same email?

The only instance that the user is can't sign up with the same email is when they try to sign up on the same store E.G Wholesale .

However if a customer signed up to wholesale using the email hello@example.com. They could then sign up to the retail using hello@example.com.

Is there any way we can fix this as it is causing major inconvenience


texts: Admin Configuration page showing Error: Exception #0 (Exception): Notice: Undefined index: id in Iterator.php on line 59

texts:
On the Admin > Store > Configuration page, Showing Below Error

Exception #0 (Exception): Notice: Undefined index: id in /var/www/html/Magento/vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php on line 59

  I have tried Below Steps but still facing same error.

php bin/magento setup:upgrade
php bin/magento setup:di:compile
sudo chmod -R 777 var/
php bin/magento cache:clean


texts:
In this class app/code/core/Mage/Catalog/Block/Navigation.php in this method:

/**
 * Render category to html
 *
 * @param Mage_Catalog_Model_Category $category
 * @param int Nesting level number
 * @param boolean Whether ot not this item is last, affects list item class
 * @param boolean Whether ot not this item is first, affects list item class
 * @param boolean Whether ot not this item is outermost, affects list item class
 * @param string Extra class of outermost list items
 * @param string If specified wraps children list in div with this class
 * @param boolean Whether ot not to add on* attributes to list item
 * @return string
 */
protected function _renderCategoryMenuItemHtml($category, $level = 0, $isLast = false, $isFirst = false,
    $isOutermost = false, $outermostItemClass = '', $childrenWrapClass = '', $noEventAttributes = false)
{
    if (!$category->getIsActive()) {
        return '';
    }
    //...
}

the first parameter $category has type Mage_Catalog_Model_Category. I need to get the value of the custom category attribute inside that method. But when I try to get the category attribute value like this:

$value = $category->getData('catalog_pdf');

it returns nothing. I checked the type of the parameter $category with

get_class($category); //It returnes Varien_Data_Tree_Node

and it turned out to be Varien_Data_Tree_Node (but not Mage_Catalog_Model_Category like it is declared in the comments above this method).

So my question is:

How I can retrieve an object of type Mage_Catalog_Model_Category so that it is possible to retrieve value of the category attribute? Is the standard category object wrapped somehow inside that object of type Varien_Data_Tree_Node?
And a bonus question: what is that type Varien_Data_Tree_Node used for? I tried to investigate the code but that class seems to be quite complicated. If anyone knows any good tutorials about it, I'd be very grateful.


texts: Magento2 - How to place order using graphql?

texts:
I am following this tutorial to process cart / checkout for placing orders using graphql. Magento GraphQl Tutorial.
And we have installed stripe on magento(backend).

So we are facing issue while placing order.

Customer logs in get a authentication token
Create empty cart
Add product to cart
Set billing and shipping address for cart
Set payment method to stripe_payments (without card details)
Placing order receiving error here

How can I set payment method and debit card details to cart using graphql and place successful test order?


texts: configuring product price as entered by user

texts:
I am working on a website which provides an online option for mobile refill, Where customer can enter the amount to be recharged.

If we use simple product for it and use the custom option as text field, is it possible to change the amount of product as per the amount entered.

I tried to find the relative extension but was not able to get any. Is there any extension which fulfills such requirement ?

It would be great if anyone can guide me from where to start.

Thanks


texts: Magento 2 - While Importing product CSV its gives “503 - Unavailable” error {Magento-2}

texts:
When I import product in bulk above-300  it gives error.
{ Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
Additionally, a 503 Service Unavailable error was encountered while trying to use an ErrorDocument to handle the request. }


texts: Magento2 after placing order success page showing error

texts:
I have tried to place an order with simple and configurable product but after placing in success page i am getting below error.

Fatal error: Uncaught Error: Call to undefined method Magento\Catalog\Model\Product\Type\Simple::getConfigurableAttributeCollection() in /var/www/html/m2/vendor/magento/module-configurable-product/Helper/Product/Options/Loader.php:52 Stack trace: #0 /var/www/html/m2/vendor/magento/module-configurable-product/Model/Product/ReadHandler.php(48): Magento\ConfigurableProduct\Helper\Product\Options\Loader->load(Object(Magento\Catalog\Model\Product\Interceptor)) #1 /var/www/html/m2/vendor/magento/framework/EntityManager/Operation/Read/ReadExtensions.php(48): Magento\ConfigurableProduct\Model\Product\ReadHandler->execute(Object(Magento\Catalog\Model\Product\Interceptor), Array) #2 /var/www/html/m2/vendor/magento/framework/EntityManager/Operation/Read.php(117): Magento\Framework\EntityManager\Operation\Read\ReadExtensions->execute(Object(Magento\Catalog\Model\Product\Interceptor), Array) #3 /var/www/html/m2/vendor/magento/framework/EntityManager/EntityManager.php(61): Magento\Frame in /var/www/html/m2/vendor/magento/module-configurable-product/Helper/Product/Options/Loader.php on line 52

Please help me to fix this


texts: Magento 2 Catalogsearch Page Empty when i search Something

texts:
I'm hardly puzzled after searching there is always empty page. i have lot of iphones but when i search it shows there is nothing.

any advice highly highly admired.

https://cellphonepartscanada.com/catalogsearch/result/?q=iphone


texts: Magento 1: Exceeding the Padding Length of an Increment ID

texts:
Can a Magento 1 system survive an increment ID that exceeds its padding length?

That is -- the eav_entity_type table contains an increment_pad_length column that defaults to 8.  This means when Magento generates an increment ID for an order (or quote, shipment, etc) from the eav_entity_store table, it will pad the number to look something like this

100000012

Will a Magento system still operate normally if that padding is is set to 1 or 0?  Will a Magento system still operate normally if that padding is reduced to something like 4, and the actual increment ID value in eav_entity_store is greater than 10,000?


texts: Tier pricing rounding - to show float number for SAVE 3.55%

texts:
There is problem with "You save %" on tier prices. It shows only integer and I many cases this looks strange like, without desired precision.

Buy 4 for 29.69 each and save extra 2%
Buy 6 for 29.39 each and save extra 3%
Buy 12 for 29.10 each and save extra 3%

Users are confused with 2 tiers - which shows they save the same percent amount.

How to overcome this and show exact % save with 2 digits float.


texts: "Shop by" / "layered navigation" configurable products not filtering correctly

texts:
For example. You have t-shirts with size and color.
You have a configurable product t-shirt with a number of variations on these attributes as simple products.

When filtering using "shop by" and you have say a "red small" and a "green medium" shirt but no "red medium", if try filter by "red" and "medium" the configurable product will be displayed even though no such combination exists within the configurable product.

Is there a option or fix to get the correct behavior?

Using 1.8.1.0 Community Edition and SCP (Simple Configurable Products).


texts: magento 2 issue with event observer help needed

texts:
i tried to replicate : Redirect add to cart for affiliate products

in magento 2 but it does not work below is my module code

Devshree\Affliliate\etc\frontend\events.xml

code:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
        <event name="controller_action_predispatch_checkout_cart_add">
        <observer name="devshree_affliliate_event_obs" instance="Devshree\Affliliate\Observer\redirectExternalLink" />
    </event>
</config>

and
Devshree\Affliliate\Model\Observer.php

code :

namespace Devshree\Affliliate\Observer;

use \Magento\Framework\Event\Observer;
use \Magento\Framework\Event\ObserverInterface;

class redirectExternalLink implements ObserverInterface {
    public function execute(Observer $observer) {
        $productId = Mage::app()->getRequest()->getParam('product', 0);
        $product = Mage::getModel('catalog/product')->load($productId);
        // Check for value set on this product for external_link attribute.
        if ($url = $product->getExternalLink()) {
            Mage::app()->getResponse()->setRedirect($url);
            Mage::app()->getResponse()->sendResponse();
            exit;
        }
        return $this;
    }
}


texts: Region locale adding from admin panel on edit show value in Admin in Magento

texts:
i am adding a locale for region from admin panel add is working perfectly but i want to show the value in edit how can i achieve this?

here is my code:

<?php

foreach (Mage::app()->getWebsites() as $webs) {
                $fieldset->addField(str_replace(' ','_',$webs->getName()), 'note', array(

                'label'     => $webs->getName(),
                'fieldset_html_class' => 'website',
            ));
        foreach ($webs->getGroups() as $groups) {

            $fieldset->addField(str_replace(' ','_',$groups->getName()), 'note', array(

                'label'     => $groups->getName(),
                'fieldset_html_class' => 'store-group',
            ));
            $stores = $groups->getStores();
            foreach ($stores as $store) {

                $fieldset->addField('region_'.Mage::getStoreConfig('general/locale/code', $store->getId()), 'text',  array(
                'name'      => 'region_'.Mage::getStoreConfig('general/locale/code', $store->getId()),
                'fieldset_html_class' => 'store',
                'label'     => $store->getName(),
                'title'     => $store->getName(),
            ));
        }}}
?>


texts: Reset URL Keys for all products to "Use Default" for all store views

texts:
I've got 2 store views, recently I noticed that for some reason (either by design or by a bug) that each product has a unique URL KEY for both store views.

It is setup in the following way:

Default Store
English
French

I need to reset all products for English and French to use the Default Store view URL key.

The store is separated by /eng and /fr so there is no reason to have a unique url key.

There are 2 ways I thought of doing this:

Run a MySQl Statement to delete all the keys and set back to use default:

delete from catalog_product_entity_varchar where attribute_id = 97 and store_id != 0

But it doesn't address the fact that if more products are modified, it will continue to create new keys.

Another way I thought of doing this was to force the URL Key to be a [GLOBAL] attribute and not [STORE VIEW] But I dont know if this is possible or if this would be the best approach.

What is the best way to set all my existing products to use the Default store view URL Key and prevent this from happening to new products?

Is this normal Magento behavior?


texts:
I  have Magento2 site. When I load first time in the browser it's not loading.
Complete and show javascript error in the console but when I refresh, it shows correct? What is the issue in Magento 2


texts:
How to delete all configurable products with associated simple products from  certain category programmatically in Magento2?

I found an old topic for Magento 1, but that’s not what I need.

I know how to remove the simple and configuration separately, but I don’t understand how to remove all the configuration products and the simples attached to them with certain category magento2

Thanks


texts: Magento 2: Ensure Message Manager Messages Show Up After a Redirct

texts:
I have the following code in a Magento controller execute method

public function execute()
{
    //...
    /* var $messageManager \Magento\Framework\Message\ManagerInterface $messageManager */

    $this->messageManager->addError('My Error');

    return $this->resultFactory->create(
        \Magento\Framework\Controller\ResultFactory::TYPE_REDIRECT
        )->setUrl('/');

    //...
}

My expectation is that this will

Add my message to the session messenger
Redirect the user to the home page
Display the error message out of the session messenger

Numbers one and two appear to go off without a hitch.  Number 3, however, does not.  My error message does not display when I redirect to the home page.

Strangely, if I navigate to a category listing page and add a product, the error message does display (along with the cart success message).

Am I using the message manager properly?  Or is it meant only for ajax requests?  If the later, is there a system in Magento 2 that replicates the old Magento 1 "add notices to session, redirect, and have them display on the next page load" functionality?

This is specifically for a project on the merchant beta, but I'd also be interested in answers that cover any changes in the official 2.0 release.

This is also for the frontend theme(s), but I'd be interested in difference between the adminhtml and frontend areas.


texts:
To setup multi-website store, I'm following this

https://www.magentocommerce.com/knowledge-base/entry/tutorial-multi-site-multi-domain-setup

I think I did everything but Edit the .htaccess

As the link said I add those on my .htaccess

SetEnvIf Host www.domain1.com MAGE_RUN_CODE=domain1_com
SetEnvIf Host www.domain1.com MAGE_RUN_TYPE=website
SetEnvIf Host ^domain1.com MAGE_RUN_CODE=domain1_com
SetEnvIf Host ^domain1.com MAGE_RUN_TYPE=website

SetEnvIf Host www.domain2.com MAGE_RUN_CODE=domain2_com
SetEnvIf Host www.domain2.com MAGE_RUN_TYPE=website
SetEnvIf Host ^domain2.com MAGE_RUN_CODE=domain2_com
SetEnvIf Host ^domain2.com MAGE_RUN_TYPE=website

SetEnvIf Host www.domain3.com MAGE_RUN_CODE=domain3_com
SetEnvIf Host www.domain3.com MAGE_RUN_TYPE=website
SetEnvIf Host ^domain3.com MAGE_RUN_CODE=domain3_com
SetEnvIf Host ^domain3.com MAGE_RUN_TYPE=website

I changed domain1 -> mydomain1 , domain2 -> mydomain2 , domain3 -> mydomain3

When I add those on the .htaccess file, I got 404 error: Page not found.

Without those line, I can connect my website

Do I have to add those line? or is it okay without it? or Something worng?

Magento 1.9.01


texts: Unable to call curl function from observer page

texts:
After check out, I need to pass order details to another page. So i created new module called Order_Add.Module triggering but not passing the values;
Below i am providing my config.xml and observer.php file

Config.xml :

Observer.php

Please help me to resolve the issue.


texts:
I have changed the design of my Magento and now it's slow all the page, but the product page is extremely slow, more than 30 seconds.
I have enabled the profiler, I have attached the screenshots with highest numbers:


texts:
I have a problem with my magento store. Every now and then when a bot crawls my shop, the website goes down.

I have made changes to robots.txt and .htacces.
Also varnish is installed and a full page cache.

But still it doesn't help. Does anybody have some tips what I can try?

Thx


texts: Magento 2: Add extension attributes to product collection

texts:
I have added extension attribute to Magento\Catalog\Api\Data\ProductInterface using extension_attrributes.xml and its getting reflected when I get product(s) using ProductRepository's get, getList and getById methods.

Now I want to show those attributes data on product listing pages however, when I debugged that part, I have found out magento is using product collection to get products instead of product repository.

I know that we can use event observer (catalog_product_collection_load_after) to load external data but I want to know if there is any optimal solution for this.

Thanks in advance!


texts: Magento2 : Parent category load child category's product too

texts:
In my store parent category load collection of its child category also.
I can solve it by Is Anchor to "No".
But by doing this Filter is not coming in the left bar so it is not the solution of my problem.
How can I load the products which I assigned to the category itself?


texts: Set a Fixed shipping price based on product attribute

texts:
Using Magento 1.9. I was not able to find an extension that does this as far as i can tell, and i cannot set this up using the promotion rules.

I want to setup 4 different fixed shipping rates, free, 50, 100, 150, but based on the largest item in my cart. These are based on product size. For example 4 different sizes light, small, medium and large, i setup all products to have this attribute and set which size they are. I would like the fixed rate shipping option to be based on the largest item in the cart. So if 2 small items and one large item are in the cart the fixed rate is still only 150. If only light items are in the cart you get free shipping.

I hope that makes sense.


texts:
After installing magento enterprise, getting following error:

  Recoverable Error: session_regenerate_id(): Failed to create(read) session ID: user (path: )  in /www/spree/helloworld/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 514

after googling it has come across some SO & GitHub posts such as ( https://github.com/magento/magento2/issues/2873 ) and these all mention casting the read() return value in SaveHandler to string - but I cannot seem to find this function/class in the enterprise edition?


texts: My observer is not logging out the user when password is changed

texts:
1) I registered my extension at app/etc/modules/Bmg_Golo.xml

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Bmg_Golo>local</Bmg_Golo>
        <active>true</active>
    </modules>
</config>

2) My config.xml is at app/code/local/Bmg/Golo/etc/config.xml

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Bmg_Golo>
            <version>0.0.1</version>
        </Bmg_Golo>
    </modules>
    <global>
        <models>
            <Bmg_Golo>
                <class>Bmg_Golo_Model</class>
            </Bmg_Golo>
        </models>
    </global>
    <frontend>
        <events>
            <controller_action_postdispatch_customer_account_resetpasswordpost>
                <observers>
                    <Bmg_Golo>
                        <class>Bmg_Golo/observer</class>
                        <method>logout</method>
                    </Bmg_Golo>
                </observers>
            </controller_action_postdispatch_customer_account_resetpasswordpost>
        </events>
    </frontend>
</config>

3) I created an observer at app/code/local/Bmg/Golo/module/Observer.php

<?php
/**
*
*/
class Bmg_Golo_Model_Observer
{
    public function logout($observer) {
        $session = Mage::getSingleton('customer/session');
            if ($session->isLoggedIn()) {
                Mage::getSingleton('customer/session')->logout();
            }
    }

}
?>

Now when i log in as customer and change password. Its not logging out


texts:
I am using magento version 2.3.0. Now the soap url stop working suddenly after deployment. I reverted the change but still geting issue while calling SOAP API.
Anyone face issue like then or any suggested solution.

[2020-09-18 12:37:19] main.CRITICAL: Report ID: webapi-5f64a9fff1426;
Message: The "ResultInterface" class doesn't exist and the namespace must be specified. Verify and try again.
{"exception":"[object] (Exception(code: 0): Report ID: webapi-5f64a9fff1426;
 Message: The \"ResultInterface\" class doesn't exist and the namespace must be specified.
 Verify and try again. at /var/www/html/vendor/magento/framework/Webapi/ErrorProcessor.php:206,
 LogicException(code: 0): The \"ResultInterface\" class doesn't exist and the namespace must be specified.
  Verify and try again. at /var/www/html/vendor/magento/framework/Reflection/TypeProcessor.php:143)"} []


texts: Replace string of number / remove numbers

texts:
I have create an attribute and it shows the stock on our two stores.

It is made through an integration from our Navision.

My output is 2.0000 etc.

I would like to make an replace on the stock number so I only get the number 2 shown insteed of the 2.0000

Thanks in advance.


texts: Adding a static block messing up footer?

texts: I am trying to edit the category page on my Magento 2.3 site. I use the pearl theme. I took out all the default text and pictures and called a static block. The static block looks how I want, which is great. However, now the footer gets called in the middle of page. I cleared the cache and the issue still persists.


texts: How to add Store View Filter in Custom Listing Grid In Magento 2.X?

texts:
I have created a custom module in my Magento 2.3.1 site. The module has Admin Listing Grid and Add/Edit view. My site is multi-store site, Now I want to display "Store View" filter in listing grid at admin. Can you anyone guide me to add it? I also want to filter the listing result as per the filtered store id. Please see attached screenshot of Magento CMS module filters. I want to add same "Store View" filter in my custom module listing grid.
I have used "ui_component" .xml file to display listing grid in my module. So, Please help to add "Store View" filter in "ui_component" xml file.

Thank you in advance.


texts: Send Confirmation Email to New Customers does not work for Action

texts:
I set up Confirmation Email to New Customers and this works if I edit a customer and change activation. but if I use the quick action from the top bar on /admin/customer/index/ it does not work.

I select the user, at the top I set "Actions" to "Customer Activated" and "Customer Activated" to "Yes". After submit the user is active but no mail was send.


texts: Magento 2: Show/Hide product attribute based on other attribute value

texts:
I created two custom attributes for product. One attribute is of type drop down and other attribute is of type multi select. I want to hide multi select type attribute when drop down attribute is selected as 'no' otherwise i want to display that multi select type attribute.

Please provide me solution for this.


texts: How to use FilterPool and Collection using the FilterApplierInterface

texts:
Hi fellow Magento developers!

I'm currently trying to figure out how to use the FilterPool with classes instead of using it with the etc/di.xml.

It should be possible to use filters in a grid listing without setting up a di.xml virtual provider, however, I can't seem to work out how..

How I understand it now is like this:

You have a class, say Supplier, and you want it to be the DataProvider for given listing supplier_listing.xml, I also want to be able to apply Filter's to it, therefore i'm going to implement the interface FilterApplierInterface, which requires me to implement a method called apply().

However, the apply() method requires a Collection object and a Filter object, and this is where I get lost, how can I specify which data to apply and what Filter to use? Do I need to call the apply() method myself or should the Magento framework do this for me? If so, how can I tell Magento which Collection to use and what Filter to apply?

Any help would be appreciated, as I'm at a loss right now..

On a side note, i've used the di.xml virtual providers, however, I want to learn more about how Magento does it and how to do it yourself without the virtuals. Any help would be greatly appreciated!


texts: Magento 2 - Change Magento Logo on the admin page

texts: I want to change Magento Logo in the admin login page, can somebody tell me how to do that ?


texts: Is it possible to move the media folder and its contents to a different server

texts:
I want my media folder to be placed in another server
My server has low space.
So I need it to be placed in another server.
Changing the media Url is not working.
Somebody suggest some idea


texts: Magento 2 Store View multiselect in system.xml

texts:
I am not able to add store view selection in system.xml I am only able to add in the ui form field component:

When I tried to add in system.xml it gives the error:

1 exception(s):
Exception #0 (Exception): Warning: htmlspecialchars() expects parameter 1 to be string,
array given in
.../vendor/magento/framework/Data/Form/Element/AbstractElement.php on line 287

system.xml:

<field id="store_view" translate="label" type="multiselect" sortOrder="13" showInDefault="1" showInWebsite="1" showInStore="1">
   <label>Store view</label>
   <source_model>Magento\Cms\Ui\Component\Listing\Column\Cms\Options</source_model>
</field>

form_edit.xml

<field name="store">
    <argument name="data" xsi:type="array">
        <item name="options" xsi:type="object">Magento\Cms\Ui\Component\Listing\Column\Cms\Options/item>
        <item name="config" xsi:type="array">
            <item name="label" xsi:type="string" translate="true">Store</item>
            <item name="visible" xsi:type="boolean">true</item>
            <item name="dataType" xsi:type="string">number</item>
            <item name="formElement" xsi:type="string">multiselect</item>
            <item name="source" xsi:type="string">store</item>
            <item name="multiple" xsi:type="boolean">true</item>
            <item name="dataScope" xsi:type="string">store</item>
            <item name="valueMap" xsi:type="array">
                <item name="true" xsi:type="number">1</item>
                <item name="false" xsi:type="number">0</item>
            </item>
            <item name="default" xsi:type="number">0</item>
        </item>
    </argument>
</field>

Is it possible at all the way magento has build this?


texts: Is it possible to write form validator which can process two different elements?

texts:
I need to do a validation on form submit, Which needs values from two different fields in the same form. I thought I will write a validator for one element and will read other element value with jQuery and validate. Is there a Magento way to do it?

I add adding validator like this -

Validation.add("string", "string", function(v){})


texts: SQL injections vulnerabilities when using SQL models of the Zend Framework

texts:
When joining tables, I use SQL models of the Zend Framework. As example I modified my actual code, but I think you will get the point:

$this->getSelect()->join(
                      array('sections' => $sectionsTableName),
                      'main_table.banner_id = pages.banner_id',
                      array()
                    )
                  ->where("sections.section= '$section' OR sections.section = '0' OR (sections.section = '6' AND ? LIKE main_table.url)",$url)
                  ->group('main_table.banner_id');

The page is loaded with ajax and $section parameter is sent as GET parameter (www.example.com/controllerName/index/display/3?paremeter1=example&section=www.example2.com).

Now here is the problem if somebody perform something like this:

www.example.com/controllerName/index/display/3?paremeter1=example&url=(SELECT 3630 FROM(SELECT COUNT(*),CONCAT(0x7170786a71,(SELECT (ELT(3630=3630,1))),0x717a716b71,FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.CHARACTER_SETS GROUP BY x)a)

In this way user can dump entire database. The data won't be displayed, but still SQL will perform dump which can cause sql overload.

Questions:

What is the best way to prevent such scenario?
Now I am worried for previous customers. Is with this code possible to make even
more risk action, like delate or alter table? I guess not because
you can not put any other statement than SELECT inside subselect so
DELETE would produce sql syntax error. Am I right?

UPDATE:
My example is not proper illustration of SQL injection because there is ' sign arround $sections and thus it won't be possible to make injection. Anyway this would be possible when expecting integer value and when you don't filter integer input. See my comment below.


texts: Choose a groupe (local/export) before registrate magento 2

texts:
I want to have in this page above create An Account 2 buttons and according to my choice  i will be redirected to different form of registration after clic on create account :

So how to do that help please


texts: I am working on setting up my first Magento Store. While setting up tax rates I am stuck at setting Shipping Tax rate. Tax class for shipping is set to "Shipping" tax class. I do not have a clue where to define the rate of tax applicable on Shipping. I tried to learn about it in Magento CE Manual but no substantial information is found. The tax rate to be defined for shipping is fixed at 14.5% but don't how to define a rule for tax on shipping.


texts: Magento 2 static files not creating mage folder and mixins.js

texts:
After upgrading from Magento 2.2.2 to Magento 2.3.3. While generating  static content with command "php  bin/magento setup:static-content:deploy -f"
 it updates all the files in pub/static folder except mage folder and files from

  "vendor/magento/magento2-base/lib/web/mage"

to

  "pub/static/frontend/Theme/Theme_Name/en_US/"

I am using following command

php  bin/magento setup:static-content:deploy -f


texts: Add confirmation box for "add to cart" button (Magento 1.9)

texts:
Suggest solution to add confirmation box for "add to cart" button in product list view.

It should display before adding product to cart

I searched for many extensions but not found any.


texts: Add an attribute to product where NAME contains "something"

texts:
I nedd to add a specific attribute to products where product name contains "sometingh".
Example:
Product Name: "shoes ARMANI leather patent"
Attribute Designer: empty
I would add ARMANI to attribue DESIGNER for all products that have on NAME the word "ARMANI".


texts: How to add section to admin tag edit form

texts: I'm writing my custom module, and i'me searching the possibility to add a custom grid to admin tag edit form to handle my_entity-to-tag relation. Anyone knows how to implement that?


texts: What is the layout for editing the "Your search returned no results." page?

texts: Instead of showing "Your search returned no results." I would like to give the user some links to other pages in the site. When I look in module-catalog-search/view/frontend/layout I see three files but they apply to all search results. Is there an easy way to do this with a layout or template file or do I have to build a module?


texts: Add multiselect attribute by installer: Wrong values

texts:
I am trying to add a multiselect by my install script.
This is my code:

$installer = Mage::getResourceModel('catalog/setup', 'catalog_setup');
$installer->startSetup();

$options = array();
foreach(Mage::getModel('adminhtml/system_config_source_country')->toOptionArray() as $option) {
    $options["value"][$option["value"]] = array($option["label"]);
}

$installer->addAttribute('catalog_product', 'allowed_countries', array(
    'group'                         => 'General',
    'type'                          => 'varchar',
    'input'                         => 'multiselect',
    'label'                         => 'Restrict shipping to',
    'backend'                       => 'eav/entity_attribute_backend_array',
    'visible'                       => 1,
    'required'                      => 0,
    'user_defined'                  => 1,
    'configurable'                  => 1,
    'global'                        => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
    'option'                        => $options
));

$installer->endSetup();

The problem is that the values of the options are not the values of the array $options.

For example:
Magento changes "US" => "United States" to "8396" => "United States"

Any ideas?

Here is the solution:

$installer = Mage::getResourceModel('catalog/setup', 'catalog_setup');
$installer->startSetup();

$installer->addAttribute('catalog_product', 'allowed_countries', array(
    'group'                         => 'General',
    'type'                          => 'varchar',
    'input'                         => 'multiselect',
    'label'                         => 'Restrict shipping to',
    'backend'                       => 'eav/entity_attribute_backend_array',
    'visible'                       => 1,
    'required'                      => 0,
    'user_defined'                  => 1,
    'configurable'                  => 1,
    'global'                        => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
    'source'                        => 'customer/entity_address_attribute_source_country'
));

$installer->endSetup();


texts: Magento 2 Extension Scrutinizer Dependencies Error

texts:
I'm trying to run some auto-code-review in scrutinizer-ci for a new extension, the problem is that the builder can't find these composer dependencies:

"magento/framework": "~100.0",
"magento/module-catalog": "~100.0",
"magento/module-store": "~100.0",
"magento/module-theme": "~100.0",

These are my module dependencies and I don't want to remove them, so anyone knows if there is a way to "hack" dependencies resolution in scrutinizer or if my composer.json file is wrong?

Here is my entire composer.json file

{
  "name": "mauronigrele/setuptools",
  "description": "Mauro Nigrele - Setup Tools",
  "type": "magento2-module",
  "version": "0.1.0",
  "license": [
    "OSL-3.0",
    "AFL-3.0"
  ],
  "authors": [
    {
      "name": "Mauro Nigrele",
      "email": "mauro.nigrele@gmail.com"
    }
  ],
  "require": {
    "php": "~5.5.0|~5.6.0|~7.0.0",
    "magento/magento-composer-installer": "*"
    "magento/framework": "~100.0",
    "magento/module-catalog": "~100.0",
    "magento/module-store": "~100.0",
    "magento/module-theme": "~100.0",
  },
  "autoload": {
    "files": [ "registration.php" ],
    "psr-4": {
      "MauroNigrele\\SetupTools\\": "MauroNigrele/SetupTools"
    }
  }
}


texts: Magento 2 security scan failed AngularJS and XS Vulnerability

texts: Our Magento 2 site failed the AngularJS and XS Vulnerability checks. Does anyone know how this can be fixed.


texts: Defer parsing of JavaScript issue of recaptcha js

texts:
facing problem in defer parsing of javascript
2 3rd party javascript is not defer

http://prntscr.com/nau390

is per gtmatrix give information ill also pass the async

http://prntscr.com/nau3kw


texts: Move up Validation in Configurable Product Page

texts:
Is it possible to move up label, below the fields?
And where I can find it? I tried in validation.js, but didn't have much luck.


texts: hide the "buy now " button if quantity is out of stock "

texts:
i followed this blog to display the BUY NOW BUTTON

http://blog.fusedwebspace.co.uk/adding-buy-now-button-to-magento-1-9-that-skips-the-shopping-cart/

i displayed as like in the  below link :
i want to hide the buy now button if quantity is "out - of -stock"

please help me to find solution


texts: Format for adding custom attributes in additional_attributes column

texts:
I have few attributes which have to be mapped to specific attribute set.
How to achieve the same in Magento 2x csv template.

Eg:

My attribute set : Desktop

Has 4 products .

Attributes are:

Brand

Series

Model No.

Type

Colour

Read/Write Speed

Lock Port

Built-in Webcam

Sensor Resolution

How should i give this in my csv along with attribute values ??

I m following the magento2 csv product template format.


texts: configure Magento 2.3 with Will-Call only shipping method

texts:
I have put together a store for my Rose Club's annual fund-raiser.  Unlike most of you customers, we do not do any shipping or deliver, but rather have two weekends where the livestock (roses and other perishable plant material) can be picket up.

How do I configure magento 2.3 to skip the shipping step, or configure a "Will-Call" shipping method as the only option?


texts: How to add custom attributes to a specific category in Magento

texts:
I need to add some custom attributes to a category in Magento. I only want to use for a special category, not all. Thanks
Such as attribute1, attribute2, which will belong tab "Custom Tab",  but I want to it only apply for Sport/Swimrun category,  not all categories, as image link


texts: What Command or Commands need to Run When I create a Plugin in Magento 2?

texts: I created a Plugin form Magento, I need to know what commands need to run.


texts: Magento 2.3 - magmi 2 SODIUM_CRYPTO_PWHASH_SALTBYTES error

texts:
How to solve the following error,
https://github.com/macopedia/magmi-m2
Warning: Use of undefined constant SODIUM_CRYPTO_PWHASH_SALTBYTES - assumed 'SODIUM_CRYPTO_PWHASH_SALTBYTES' (this will throw an Error in a future version of PHP) in /var/www/html/test/pub/magmi/inc/magmi_auth.php on line 69
Warning: substr() expects parameter 3 to be int, string given in /var/www/html/test/pub/magmi/inc/magmi_auth.php on line 69
Warning: Use of undefined constant SODIUM_CRYPTO_PWHASH_SALTBYTES - assumed 'SODIUM_CRYPTO_PWHASH_SALTBYTES' (this will throw an Error in a future version of PHP) in /var/www/html/test/pub/magmi/inc/magmi_auth.php on line 71


texts: Get data from Soap Xml API using CURL or SOAP Object

texts:
I want to integrate some out soap API data with magento store and want to get data from soap API.

For this I have two methods to get data one is using curl and other is using soapClient object, and from both methods I am getting same data but I want to know what is the best method to get data from soap API.

Thanks in advance.


texts: Magento 2 Don't show custom entity option "catalog_category" in magento import section

texts:
I am creating a custom module to import export categories in Magento 2. This module will use cron to import categories from a file. I don't want to show this option in Magento import process. This process will only run using cron and cannot be executed manually.

I don't want to show categories option showing in the above image. I tried removing label attribute from import.xml file but got an error

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_ImportExport:etc/import.xsd">
    <entity name="catalog_category" model="Plenty\Item\Model\Plugin\ImportExport\Import\Entity\Category"
    behaviorModel="Magento\ImportExport\Model\Source\Import\Behavior\Basic" />
</config>

Fatal error: Uncaught Magento\Framework\Exception\LocalizedException: Invalid Document Element 'entity': The attribute 'label' is required but missing.

What should I do show that my entity option is not shown in Magento import section?


texts: Magento 2.0 Stable - Enabling Custom Module gives error

texts:
Download

Today I downloaded the Magento 2.0 Full Release from the Magento website. I downloaded the Full Release with Sample Data (ZIP with sample data) and installed it. I wanted to test if my custom module build in RC-1 was still working however when I tried to enable the module I got an error.

Module installation

When I wanted to install my custom module I noticed the app/code directory disappeared and after a few clicks found that this was moved to the vendor directory. I assumed this was done by composer so decided to add my module to the composer.json in the document root. Running composer update installed the module to the vendor directory.

Error

Tried to enable module by executing the following command from my root directory:

PHP -f bin/magento module:enable --clear-static-content Test_Module

http://devdocs.magento.com/guides/v2.0/extension-dev-guide/enable-module.html

Unfortunately, I get the following error; anyone has an idea what goes wrong?

  [InvalidArgumentException]
  There are no commands defined in the "module" namespace.


texts: Magento2 - add dropdown city everywhere in store

texts: Magento2 - I want to show city in dropdown for everwhere in store. I was tried with https://github.com/EaDesgin/Magento2-City-Dropdown but its not working properly.


texts: Get Custom Product attribute using camel case

texts: How can i get custom product attribute custom_attribute_1 using $product->getCustomAttribute1 .Is camel casing works for numbers?


texts: Magento 2 Luma theme menu navigation not showing

texts:
I migrated to magento 2 and enabled the luma theme, but now i don't see any navigation anymore....

https://www.huurhulp.nl/tricot-stoffen.html

My categories are not showing up.


texts: Observer not working - Trying to catch completed sales order - Magento 2.1 EE

texts:
Magento 2.1 EE

I have an observer looking to observer "checkout_onepage_controller_success_action".

I can't see what I am missing.  Comparing to all the other posts and my other observers, I don't see why this shouldn't work.

events.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="checkout_onepage_controller_success_action">
        <observer name="wundercarparts_alsobought" instance="Wundercarparts\AlsoBought\Observer\SaveOrderItems" shared="false" />
    </event>
</config>

SalesOrderItems.php

use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\Event\Observer;

class SaveOrderItems implements ObserverInterface {

        /** @var \Magento\Framework\Logger\Monolog */
        protected $logger;

        public function __construct(
                \Psr\Log\LoggerInterface $loggerInterface
        ) {
                $this->logger = $loggerInterface;
        }

        /**
         * This is the method that fires when the event runs.
         *
         * @param Observer $observer
         */
        public function execute( Observer $observer ) {
                $orderId = $observer->getData('order_id');
                $this->logger->addDebug(print_r( $orderId, true ));
        }
}


texts: Magento 2 - Select the interceptor/observer

texts:
I want to have products that not require to stay logged and other that need it. So i think the best way is set in the admin "Allow Guest Checkout = Yes" and when the client goes to the checkout and there's products that require the login i send him/her to the checkout.

Or maybe it's better to use an observer.

I need to know what's the name to the interceptor (or the observer).

UPDATE

I think ask the client to login after add determinate products may be confused, so, i want to add it just in the last point, when you push on"Proceed to checkout" after the www.test.com\checkout\cart in www.test.com\checkout, where you see the direction to the shipment.


texts:
I'm having trouble understanding how an "Authorize" command is executed in a payment method.

Magento 2 uses Javascript components for payment methods and a "Place order" click initiates the whole process, I'm just not sure how/when the Authorize request gets built & sent to a payment provider.

For example, if I use the sample payment gateway that Magento provides: https://github.com/magento/magento2-samples/tree/master/sample-module-payment-gateway, how is the request builder going to be called?

EDIT

This is a reference to Joni Jones's answer

  When Magento performs place order actions, it calls authorize or
  capture (used for sale operation too) payment operation (according to
  an operation configured for the selected payment method).

This is the part that I'm having trouble with.

Do I understand you correctly that the command, which is specified in the payment modules di.xml (authorize/capture/sale) gets automatically called when the "Place order" action gets triggered?

If so, what is the entry point, i.e. which class/file gets called first in a hypothetical situation where you have only 1 command in a command pool (e.g. the authorize command)?

And, if it's not asking too much, what is the bare minimum that you need to have to start execution of a command? Is it really enough to just have a simple custom payment method and the command specified in the payment method's di.xml?


texts: How to translate city/region dropdown on magento 2

texts:
The city/region drop-down list on checkout page is not translatable with .csv files I tried everything but it didn't work.

Does anyone have an idea?

Magento 2.1.2, Community edition.


texts: How to get category tree with selected permission to user in custom module?

texts: I have created category tree in my custom admin form. Now If i give role to user to view only selected category in custom category tree. How to show permitted category in custom category tree in magento 1.9?


texts: How to get product custom attribute drop-down appear on frontend?

texts:
Basically I have to create a drop-down of "brands" on my product page such that customers can manually select their brands depending on their choice. What is the way to do this?

Is it possible to create a custom attribute of brands in the admin panel then show that dropdown of brands in the frontend such that customers can select their choice of brand manually?

By the way, I have created the dropdown of brands in the admin panel, I want to show this dropdown in the frontend also..

Thanks!!


texts: I want to apply some rule for customer group for example if general user can buy only single quantity of any product and wholesaler can buy limitless product quantity and retail can buy specific quantity and so on for different customer groups. For maximum quantity means particular group cannot buy more than its allowed limit.


texts: How to filter product collection by custom text attribute

texts:
I have a custom attribute in my magento store say "duration". and it has values like "2 Hours", "180 Minutes", "1 day" etc. for display on frontend.

But now I want to filter product collection by this attribute.

For example : I want to filter products with less than "1000 minutes" duration. Collection must return those products which has value in hours or days (according to hour and day calculation).

Is it possible to filter product collection using this attribute? If yes then How to apply filter on product collection?


texts: Which cron script is best to run? cron.php or cron.sh

texts:
Magento provides two cron scripts in its root directory, cron.php and cron.sh.

Which one is the better to run and why?


texts:
I'm trying to add a custom CSS file when a Magento action is loaded.

My layout page is as follows :

<layout version="0.1.0">

<helloworld_index_index>
  <reference name="head">

        <action method="addCss">
            <stylesheet>css/custom.css</stylesheet>
        </action>
    </reference>
       <reference name="root">
         <block type="page/html" name="root"  output ="toHtml" template = "mypage.phtml"/>

     </reference>

</helloworld_index_index>
</layout>

The content of mypage.phtml displays without a problem but the CSS is not loaded.
The path to my css is :

  skin\frontend\base\default\css\custom.css


texts: How to implement Single Date and Time Picker in Magento 2

texts: Reference to Magento documentation, I want to implement "Single Date and Time Picker" mentioned in Devdocs.


texts: after install magento 2.4.2 frontend and backend url not working

texts:
I have installed Magento version 2.4.2 in xampp ubuntu with elastic search,
installation was successful, but when i run front URL and backend URL, its not working,
both URL's shows below error,

Object not found! The requested URL was not found on this server. If
you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404
127.0.0.1 Apache/2.4.46 (Unix) OpenSSL/1.1.1h PHP/7.4.13 mod_perl/2.0.11 Perl/v5.32.0

so i have chacked in Database core_config_data table, here is shows same URL name
http://127.0.0.1/magento242/,
after installation, i have run Magento's all basic commands also,
now please help me on this, how can i fix this issue?


texts:
In the above 2 div,
The first div comes along with raw showing data-mage-init and not processed
while the second div is processed properly
The second div works properly.
whenever the site loads and mostly the site brings like first div case
Note: I'm using multi-website


texts: How To create Custom Cart Price rule In magento 2.3.1

texts:
I want to create a custom cart price rule with below conditions
1. If Subtotal Should be greater than xyz amount then abc product will be free.
I am able to add condition for greater than xyz but not able to add free product with available rules, Can anyone help me to know how We can achieve this


texts: How to stop scrolling to first validation error message on magento2 on add to cart?

texts: How to stop scrolling to top or first validation failure message


texts: Magento 2 plugins (interceptor) beforeCancel() making the cancel order bug

texts:
I have created a plugin which intercept the cancel function from the interface Magento\Sales\Api\OrderManagementInterface, the plugin intercept before the cancel function is called.

My problem is that when my module is activated, I can't cancel any orders, neither from the page admin/sales/order/view/order_id/10 or from the list of orders.

For example, when i click the cancel button, the text "You canceled the order." is displayed but in fact the order isn't canceled and has still the status "pending".

I have a custom table which reference the sales_order table, but the attribute referencing the table has the action on delete cascade

->addColumn(
                    'sales_order_id',
                    Table::TYPE_INTEGER,
                    10,
                    ['nullable' => false,
                    'unsigned' => true],
                    'Reference to entity_id of table sales_order'
                )
->addForeignKey(
                    $installer->getFkName('my_custom_table', 'sales_order_id', 'sales_order', 'entity_id'),
                    'sales_order_id',
                    $installer->getTable('sales_order'), /* main table name */
                    'entity_id',
                    \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE
                )

But even with the action on delete cascade, before canceling an order, I'm deleting the record which is referencing to the order being cancelled.

After cancelling an order, the order is not deleted from the database and has the status cancelled, so I'm getting confused on how can my module make the cancel function bug.

The purpose of my function beforeCancel is only to remove the record with an particular id from the table referencing the sales_order table and add it into an other table having no reference.


texts: Layered Navigation not affecting result on page

texts:
I have created a module to show all products with special price.

I have added layered navigation to left block. It shows proper product count. But When I click any of filter (like category, price range), it doesn't affect number of products on page.

Any suggestions would be appreciated.


texts:
I am working on custom product upload form where sellers can upload their products. So i generated a form using the attribute sets which will give the related attributes, lable, type which is required for product form.

In form, I am using frontend_type as input type in a form such as text, select, textarea. However, it gives some different values like

Image
media_image
gallery
boolean
weight
price
multiline
multiselect
select
multiple

Generally, it is clear that, which input type they belongs to but how can I use that all. As I want to upload the images for product so is that possible with this frontend_type="image" input. With the select I am able to fetch the values but unable to use another frontend_type. Please let me know if I am creating a form in wrong way and if you have any other suitable idea for generating automatic product form.

Thank you all in advance :)


texts:
Some of my products have the first image set to position 0 and some has the first image set for position 1. Because of that, I need to run a check determining the id of the first gallery image. How can I do this?

I was thinking something like

Mage::getModel('catalog/product')->load($_product->getId())->getMediaGalleryImages()[0]->getPosition();

But that doesnt seem to work..


texts:
Magento2 In My Shipping Method only have DHL
i can't find another shipping such as Free shipping , Table Rates , Flat Rates


texts: Magento 2 cache files and generated files keep chanching ownership

texts:
I have created a superuser and set my project owner and group to be magneto www-data . I've set the folders and file permissions using the commands below.
I followed the documentation from Magento

https://devdocs.magento.com/guides/v2.4/config-guide/prod/prod_file-sys-perms.html#mage-owner-two-prod

But for some reason the files inside my cache folder and genreated folder keeps changing ownership.
find . -type d -exec chmod 755 {} \; && find . -type f -exec chmod 644 {} \; && chmod u+x bin/magento

find var generated pub/static pub/media app/etc -type f -exec chmod g+w {} + && find var generated pub/static pub/media app/etc -type d -exec chmod g+ws {} + && chown -R :www-data . && chmod u+x bin/magento

I found a person with thesame issue but without any resolution:

https://community.magento.com/t5/Installing-Magento-2-x/cache-folder-and-generated-folder-keep-change-owner-back-to-root/td-p/370363


texts: Magento 2: Display category list and end child category only show product list

texts:
Display category list and end child category only show product list

My custom theme

  Magento_Catalog/category/products.phtml

<?php
/**
 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

?>
<?php
/**
 * Category view template
 *
 * @var $block \Magento\Catalog\Block\Category\View
 */
?>
<?php
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$category = $objectManager->get('Magento\Framework\Registry')->registry('current_category');
$subcats = $category->getChildrenCategories();
//var_dump($category->getData());
//var_dump($category->getIsAnchor());
//var_dump($subcats->count());
if ($subcats && ($category->getIsAnchor() != '1' || $category->getIsAnchor() != 1)) { ?>

        <?php
        foreach ($subcats as $subcat) {
            if ($subcat->getIsActive()) {
                $_category = $objectManager->create('Magento\Catalog\Model\Category')->load($subcat->getId());
                $subcaturl = $subcat->getUrl();
                $_imgHtml = '';
                if ($_imgUrl = $_category->getImageUrl()) {
                    $_imgHtml = '';
                } else {
                    $mediaUrl = $objectManager->get('Magento\Store\Model\StoreManagerInterface')->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA);
                    $_imgHtml = '';
                }
                ?>

                    <a href="<?php echo $subcaturl; ?>" class="block-promo" title="<?php echo $subcat->getName(); ?>">
                        <?php echo $_imgHtml; ?>

                        <?php echo $subcat->getName(); ?>

            <?php }
        } ?>

<?php } else { ?>
<?php if (!$block->isContentMode() || $block->isMixedMode()): ?>
    <?php echo $block->getProductListHtml() ?>
<?php endif; ?>
<?php } ?>

Not display category list only show product list

Remove else part show category list only not product list

what mistake i am done i don't know


texts: Accordion widget Missing off transition animation when switching elements

texts:
Like this one https://github.com/magento/magento2/issues/24807;
There is no animation effect when switching elements, resulting in a bumpy transition


texts: If product has custom options, then echo out div on list.phtml

texts:
I'm fairly new to Magento and looking at PHP code is just daunting to me so I'm trying to learn by doing.
I've been looking into making my own "Free Gift" label for items on my store but no extension I've found is able to give me the specific functionality I require. Basically if the product has an option with the label "Free Gift" then echo out my .

I managed to get some code that does this perfectly except it displays the Free Gift label on any product that has an option available (size for example).

<?php if ( $_product->getData('has_options') && ($_product->getTypeID() == 'simple') ): ?>

<?php echo "Free Gift" ?>
;
<?php endif; ?>

If I place this code in my theme files (media.phmtl, list.phtml) then it works like I want it to except with the problem above (as the code only looks for if the product has options)

Now below I have some different code that works PERFECTLY on the product pages.

<?php

$theoptions = $_product->getOptions();
foreach($theoptions as $opkey=> $opval)

if(( $_product->getData('has_options')) && ($_product->getTypeID() == 'simple') && ($opval->getTitle() == 'Free Gift')): ?>

<?php echo "Free Gift" ?>
;
<?php endif; ?>

But it doesn't work when I place it in list.phtml, no labels show up at all. I'm not sure why this is but I think it's because it can't read if the products had options or not.

I'm not sure if I'm going the wrong way about this or if there's a different solution to this but any help would be massively appreciated as I'm not very experienced in PHP, Thank you.


texts: Dependancy injection and shared/unshared object and cron job

texts:
Something interesting happens to Magento2 code and I cannot realise what I missed. The same code works flawlessly via browser and does not work via cron.

(in adminhtml area) I calculate the result in AnotherClass that must depend on the value of $this->myProperty.

$this->myProperty is being kept in MyWorkingClass and read from AnotherClass because (in my understanding) fabric will create a new instance of AnotherClass where this property is not set.

Everything works as expected when I run Magento in browser. But when cron is executed (either manually in cli - cron:run or by schedule) I see unexpected result in logs.

Any help is appreciated!

`

class MyWorkingClass
{
    private $myProperty;

    ...

    public function doStuff($params)
    {
        $result = $this->someFactory->create()->getSomethingUseful();
        $this->logEverything($result);
        $this->myProperty = 1;
        $result = $this->someFactory->create()->getSomethingUseful();
        $this->logEverything($result);
    }

    public function getMyProperty()
    {
        return $this->myProperty;
    }
    ...
}

class AnotherClass
{
    ...

    public function getSomethingUseful()
    {
        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $myClassObject = $objectManager->get('Vendor\Module\Model\MyWorkingClass');
        $myProperty = $myClassObject->getMyProperty();
        if ($myProperty == 1) {
            $result = 2 * 2;
            return "Everything is okay now! 2 x 2 = $result";
        }
        return "Nothing works. 2 x 2 = 5";
    }

}`


texts: Set pagination in product review tab in magento2

texts:
I want to set pagination in product review tab.
So if I have 30 reviews for particular product, then in reviews tab I want the pagination from 1 to 5 with next and previous buttons and in all pages I want to show only 5 review/page.

On this path vendor/magento/module-review/Block/Product/View I got block file ListView.php. File code is below.

protected function _prepareLayout()
{
    parent::_prepareLayout();

    $toolbar = $this->getLayout()->getBlock('product_review_list.toolbar');
    if ($toolbar) {
        $toolbar->setCollection($this->getReviewsCollection());
        $this->setChild('toolbar', $toolbar);
    }

    return $this;
}

Above is the review collection code so how to change this code so I can set pagination?


texts:
I'm having a problem with config values being locked in the Magento 2 admin.

I've seen that this can happen when you dump the config, but I didn't do that.

When, You dump it's supposed to update the config.php, but my config.php has no settings entries, only module enable/disable flags.

bin/magento app:config:import returns back Nothing to import.

Something broke and I can't undo it.  This only seems to be happening for the Default Scope, and it's not all settings, only the Store Email Addresses settings.  We configured them once, now I can't get back in and change them.

HELP!


texts: I am using magento version 2.1.How to get all order status options in my custom module?


texts: Magento2: user magnifier widget without fotorama

texts:
I am developing a custom theme for Magento 2.1.x based on blank theme.
In the product view page, I want to get rid of the fotorama gallery (the images are as normal img tag, ne after another.
What I would like to do is to use the magnifier function in a way taht when a user clicks on the img tag the nagnifier overlay is shown.

Is there a way to do it without using fotorama?


texts: SSL Expired - Accidentally turned on SSL in Magento Admin - now I cannot log in

texts:
So a customer complained that she would not buy anything without secure check out. Googled SSL and Magento. Found an article on how to turn the ssl on (https://www.siteground.com/tutorials/magento/magento_ssl.htm).

Followed instructions, not realizing my SSL certificate was expired. When I hit save I was kicked out of the admin and cannot log back in.

Followed fix instructions here: https://wiki.magento.com/pages/viewpage.action?pageId=10223941

Did not work. I'm wondering what my next steps to fix it are. I have no ssl experience and today was the first time I've ever even seen the core_config_data table. I inherited this site about 1.5 years ago.

Thanks for any help!!


texts: magento1: How to get stock status instead of qty of product

texts:
In this code I need to look get stock status instead of qty of a product.
What to change.

Thanks

<?php $qty = (int)Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty(); ?>
<span class="<?php if ($qty == 0) { echo  'sold-out'; } ?>">
         <?php

                if ($qty == 0) :
                    echo $this->__('Sold');
                else :
                    echo $this->__('&nbsp;');
                endif;
        ?>


texts: Change text message "Sorry, no quotes are available for this order at this time"

texts:
I want to change this text at the checkout page, once no shipping method can select. I did try to override the core file seems not working, and I did change at core file, seems not working, am I editing the wrong file?
app/design/frontend/testing/ABC/Magento_Checkout/web/template/shipping.html
also I did try to change vendor/magento/moudle-checkout/view/frontend/web/template/cart/shipping-rates.html

even I did scan the text over the complete folder, still can't find anything else.

Please help


texts: Magento 2 - Show product data in front end using graphQL

texts: I need to show Product Data (Name SKU)in front end using graphQL is this possible to show Product Data custom page in Magento 2 ?


texts: Magento 2 Unable to change the Default Home page

texts:
I am getting below error while changing the Default Home page from configuration on Magento Admin.

  Invalid domain name: The input does not match the expected structure
  for a DNS hostname; The input does not appear to be a valid URI
  hostname; The input does not appear to be a valid local network name


texts: Store views not shown in language switcher

texts:
We have set up two store views, but the language switcher does not appear. If I comment out this if statement in the switcher code:

<?php if(count($this->getStores())>1): ?>

the selector appears but there are no store views to select and it's completely empty.


texts: I been trying to find something to setup tests for my website, for functions like login, add to cart, add to wish list and so. And I tried finding something reliable but I been reading that it cant be tested with PHPUnit,now i might seen something thats not true, but i am a beginner with frameworks like this and not sure what to think, is there something i can use to set up the test i need, and if so please leave some links to it and to any sort of documents or guides?


texts: Change price template only for product view page?

texts:
as far as I understand this the price is rendered in:

/app/code/Magento/Catalog/view/base/templates/product/price/amount/default.phtml

But as I change it, it gets, of course, changed for every part of the site (like category view).

How can I change how my price is displayed in my product view? If I for example want to add labels for price incl. tax and excl. tax, tax amount, etc..?


texts: I have Magento 2 and want to hide small images of the product that is added from the admin on frontend. I have hidden the small image attribute from admin but want to hide it from front-end as well.


texts: Magento duplicate the product getting innodb lock timeout error

texts:
My customer doing instant of create a new product they duplicate the product and change the attributes,inventory,name,sku,etc to make it a new product.

Since We are facing randomly database innodb error like below

  "SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try
  restarting transaction, query was: UPDATE catalog_product_entity SET
  entity_type_id = ?, attribute_set_id = ?, type_id = ?, sku = ?,
  has_options = ?, required_options = ?, created_at = '2015-07-22
  21:31:59', updated_at = '2016-03-17 14:58:23' WHERE (entity_id=1395)"

This error not happening every time it is happening randomly or some times only. when i get this error after some minutes i will try again with successfully product duplication. I really don't have any idea why its happening.

I have not touch any core functionality yet. I have not installed any extensions related to duplicate or product.

I am nearly struggling more then a week to find the problem. But no luck yet. So please kindly give me your suggestions to fix the issue.


texts: PHP Fatal error: Uncaught Error: Class 'Locale' not found in /opt/lampp/htdocs/magento-2.4.2/vendor/magento/framework/Locale/Bundle/DataBundle.php:64

texts:
I am using xampp and it's version is 7.4.15-0 and php version is 7.4.3.
I am trying to install magento version-2.4.2 in ubuntu linux and it's always say's Locale not Found.

I have enable the extension=php_intl.dll extension by removing the comment, but it still gives the same error. How should i solve it?

Edit(Solved)==>
I have solved this problem. This is happening because my terminal using usr/bin/php as default php, not the xampp php. So i have change the php path. To change the php path, please follow the link below
==> https://blog.shaharia.com/use-xampp-php-cli-in-your-command-line


texts: Magento 2.3: saving configurable products lead to erasing price

texts:
When I create a new configurable product and then I add the configurations price field gets disabled and erased. Is there any way to fix this or just take the first configuration price?

Also in admin product listing the prices the price attribute is not present for configurable product.

This is the configurable product:

and this are its childs:


texts: Magento 2.3.3 PayPal problem while checkout

texts:
I'm making a payment by PayPal as a customer (express & Standard) in IWD OPC
and I getting this error.
This happened in my both sites after the 2.3.3 updated

[2019-10-16 07:11:40] main.CRITICAL: Report ID: webapi-5da6b02296f14; Message: Property "DisableTmpl" does not have accessor method "getDisableTmpl" in class "Magento\Quote\Api\Data\PaymentInterface". {"exception":"[object] (Exception(code: 0): Report ID: webapi-5da6b02296f14; Message: Property \"DisableTmpl\" does not have accessor method \"getDisableTmpl\" in class \"Magento\\Quote\\Api\\Data\\PaymentInterface\". at /home/332092.cloudwaysapps.com/wvrgznubmd/public_html/vendor/magento/framework/Webapi/ErrorProcessor.php:208, LogicException(code: 0): Property \"DisableTmpl\" does not have accessor method \"getDisableTmpl\" in class \"Magento\\Quote\\Api\\Data\\PaymentInterface\". at /home/332092.cloudwaysapps.com/wvrgznubmd/public_html/vendor/magento/framework/Reflection/NameFinder.php:100)"} []

Appreciate any help
Thanks,
Kobi


texts:
I want to create a ecommerce website which is combination of WordPress and magento2,So for now I can get the cart items by the customer id by using RESTAPI .But what when happen if customer is not yet logged in and he added the product to cart in magento2 then how can I sync that cart in WordPress site.
Note:-I have installed WordPress and Magento2 on same server


texts: How can i show language switcher in both the header and the footer?

texts: How can i show language switcher in both the header and the footer, but with a different template than in the header? I would like to have another phtml file, where I can customize it...


texts: Hiding sold products in inner search engine, but NOT hiding them on Google searches

texts:
I'm a total n00b at Magento, and I need to hide sold products from the inner (i.e. Magento's built-in) search engine. BUT I don't want to hide them regarding Google searches.

This means: the url for the product should still be indexable by Google, but should not be returned by the Magento inner / in-site search.

Question: Is there a way to filter the Magento search engine, so the already-sold products are not returned?


texts: Magento 2 custom ui_grid filterSearch issue

texts:
I have an error when attempting to search for a keyword in my custom table

In Network tab, i have a call to

https://mylocalsite.local/admin/mui/index/render/?namespace=my_grid&search=123&filters%5Bplaceholder%5D=true&paging%5BpageSize%5D=20&paging%5Bcurrent%5D=1&sorting%5Bfield%5D=po_date&sorting%5Bdirection%5D=asc&isAjax=true

which returns
{"error":"UI component could not be rendered because of system exception","errorcode":"42"}

And in the exception.log i have:

main.CRITICAL: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'fulltext' in 'where clause', query was: SELECT COUNT(*) FROM purchase_order AS main_table
INNER JOIN admin_user AS u ON u.user_id = main_table.created_by WHERE (((fulltext = 'abc')))

In my grid XML declaration i have the following:
...
<dataSource name="my_grid_data_source">
    <argument name="dataProvider" xsi:type="configurableObject">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="update_url" xsi:type="url" path="mui/index/render"/>
                <item name="storageConfig" xsi:type="array">
                    <item name="indexField" xsi:type="string">id</item>
                </item>
            </item>
        </argument>
        <argument name="class" xsi:type="string">Vendor\Module\Ui\DataProvider\Module\GridDataProvider</argument>
        <argument name="name" xsi:type="string">my_grid_data_source</argument>
        <argument name="primaryFieldName" xsi:type="string">id</argument>
        <argument name="requestFieldName" xsi:type="string">id</argument>
    </argument>
    <argument name="data" xsi:type="array">
        <item name="js_config" xsi:type="array">
            <item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
        </item>
    </argument>
</dataSource>
...

<listingToolbar>
    ...
    <filterSearch name="fulltext"></filterSearch>
    ...
</listingToolbar>

I have the database indexes in place (created from the install script)

However, when i try to search for something, i am getting that error i posted in the beginning of this question.
What am i missing?
Thank you.


texts:
I am trying to make a grid with all the orders containing the same product grouped together (all the orders only have one product in them) any ideas how to achieve this? this is what i have so far the last line is breaking my code if i group by city or company it works how do i get group by products to work?

    $collection = Mage::getResourceModel('sales/order_collection')
        ->join(array('a' => 'sales/order_address'), 'main_table.entity_id = a.parent_id AND a.address_type != \'billing\'', array(
            'company'    => 'company',
            'city'       => 'city',
            'country_id' => 'country_id'
        ))
        ->join(array('c' => 'customer/customer_group'), 'main_table.customer_group_id = c.customer_group_id', array(
            'customer_group_code' => 'customer_group_code'
        ))
        ->addExpressionFieldToSelect(
            'fullname',
            'CONCAT({{customer_firstname}}, \' \', {{customer_lastname}})',
            array('customer_firstname' => 'main_table.customer_firstname', 'customer_lastname' => 'main_table.customer_lastname'))
        ->addExpressionFieldToSelect(
            'products',
            '(SELECT GROUP_CONCAT(\' \', x.name)
                FROM sales_flat_order_item x
                WHERE {{entity_id}} = x.order_id
                    AND x.product_type != \'configurable\')',
            array('entity_id' => 'main_table.entity_id')
        );
        $collection->getSelect()->group('products');


texts: Products dissappeared from bundle options, 2.2.6

texts:
We discovered a bundle with 8 options showing as out of stock despite products being in stock.  We saved the bundle and it dropped half of the products.

The products are simple products and available in the general catalog.  When trying to add the items to the bundle options we can not find them in product selection from the bundle page.

Bundles have been issue free for the year with no changes made.  Reindexed, flushed cache.  Any help is appreciated.


texts: Mag 2.0 - How to display product quantity in stock on storefront

texts: I need to display the stock quantity for a product in both the category listing and product detail pages. I know which templates to edit, but I don't know how to get the stock quantity passed into the template. Any guidance appreciated.


texts:
Is there any page in Magento 2 which lists all the products present on the website by default or is there some page for the default root category which shows the default category products.

ex. if I have test category then Magento create the link http://yourwebsiteurl.com/test.html like that is there any URL for default root category in Magento


texts: Magento 1.7 how to rewrite a URL with special characters in such as %20 etc

texts:
Someone at the company I work for has added a product in Magento and created a terrible URL with 's and spaces in. They must have entered the product name in the URL field.

The URL looks like this:

/Kickster%20Academy%2016'%20x%207'

Google has indexed this URL so I am trying to add a 301 for it to the correct URL.

My problem is I dont know what to put in the .htaccess file to do this, if I put it in how it is above, the browser swaps out the %20s for spaces and then the URL doesn't get rewritten.

If I swap out the %20's before I put it into the htaccess file then it breaks the .htaccess file as there are spaces where there shouldn't be

Any ideas?


texts:
im having trouble with the quick search results, i been looking in many posts, but none resolved by issue.

Im using mangeot search "combine" option, but still doesnt give me the result i need, for example, if i search for "Levis" the first results are "televisions" and after show the levis products, the search result is taking in consideration the letters between "televisions". So than i select "Full text" option, and than worked well, but the problem that i have when i search for "LG", it doesnt give me results beause in my title products i have "LG" betterrn other words on the title. I could resolve this issue using the "LIKE" option, but then the "Levis" wouldnt be resolved and show first the televisions, instead of Levis products. Someone have some kind of solution please?


texts: how to always display reviews stars magento 2

texts:
Currently, stars are displayed if the product has at least one opinion:

How to display empty stars everywhere for products that do not have reviews yet?


texts: How to add custom fields (such as District, Ward or Street) in Table Rate Shipping Method in Magento 2?

texts:
As the question title, I wanna add some custom fields (dropdown) as District, Ward or even Street in Table Rates Shipping Method on Magento 2. How can i do it?

Thanks.


texts: module data is not showing on the frontend

texts:
I am trying to get the my custom module on front end from database but it not showing any thing but just the blank module page:

My controller:

  <?php
  class OptFirst_ReviewMyCompany_IndexController extends Mage_Core_Controller_Front_Action{

    public function IndexAction() {

    $this->loadLayout();
    $this->getLayout()->getBlock("head")->setTitle($this->__("Reviews"));
    $breadcrumbs = $this->getLayout()->getBlock("breadcrumbs");

        $breadcrumbs->addCrumb("home", array(
        "label" => $this->__("Home Page"),
        "title" => $this->__("Home Page"),
        "link"  => Mage::getBaseUrl()
   ));

      $breadcrumbs->addCrumb("titlename", array(
        "label" => $this->__("Reviews"),
        "title" => $this->__("Reviews")
   ));

    $this->renderLayout();

  }
}

Here is my block :

 <?php
class OptFirst_ReviewMyCompany_Block_Index extends Mage_Core_Block_Template
    {
     public function index()
    {
        $productId = 1;//change to your product id
        $collection = Mage::getModel('optfirst_reviewmycompany/new_optfirst_reviewmycompany')->getCollection()
         ->addFieldToFilter('id_optfirst_reviewmycompany', $productId);
           return $collection;

   }

}

And this is my module template:

  <?php
$collection = $this->index();
print_r($collection);
foreach ($collection as $instance) {
          echo  $instance['facebook'].'<br>';
          /* you can customize code here */
          }

     ?>

layout Node review.xml

  <? xml version = "1.0" ?>
  <layout version="0.1.0">
     <reviews_index_index>
       <reference name="root">
         <action method="setTemplate"><template>page/1column.phtml</template></action>
       </reference>
       <reference name="content">
           <block type="reviews/index" name="reviews_index" template="reviews/index.phtml"/>
      </reference>
 </reviews_index_index>
  </layout>

here is the front-end template:

Anyone can look and let me know what is the issue:

Thanks!