texts: how to get the tier prices as well as quantities in the pop up after adding it to the cart?

texts:
When I click "Add to cart" button, an ajax request is sent and a pop up is displayed with its image to say that the product has been added.
I want some more information about that product like I want to show the next tier price and the quantity upon which the customer would get some discount.
So I need both the quantity and the tier price .But I don't know how to get it.
This the file which is called in the ajax request..

 <?php
 require_once 'Mage/Checkout/controllers/CartController.php';
 class Excellence_Ajax_IndexController extends Mage_Checkout_CartController
{
    public function addAction()
   {
    $cart   = $this->_getCart();
    $params = $this->getRequest()->getParams();
    if($params['isAjax'] == 1){
        $response = array();
        try {
            if (isset($params['qty'])) {
                $filter = new Zend_Filter_LocalizedToNormalized(
                array('locale' => Mage::app()->getLocale()->getLocaleCode())
                );
                $params['qty'] = $filter->filter($params['qty']);
            }

            $product = $this->_initProduct();
            $related = $this->getRequest()->getParam('related_product');

            /**
             * Check product availability
             */
            if (!$product) {
                $response['status'] = 'ERROR';
                $response['message'] = $this->__('Unable to find Product ID');
            }

            $cart->addProduct($product, $params);
            if (!empty($related)) {
                $cart->addProductsByIds(explode(',', $related));
            }

            $cart->save();

            $this->_getSession()->setCartWasUpdated(true);

            /**
             * @todo remove wishlist observer processAddToCart
             */
            Mage::dispatchEvent('checkout_cart_add_product_complete',
            array('product' => $product, 'request' => $this->getRequest(), 'response' => $this->getResponse())
            );

            if (!$cart->getQuote()->getHasError()){
                $message = $this->__('%s was added to your shopping cart.', Mage::helper('core')->htmlEscape($product->getName()));
                $response['status'] = 'SUCCESS';
                $response['message'] = $message;
           $response['product_name'] = $this->__('%s', Mage::helper('core')->htmlEscape($product->getName()));
                $response['product_image'] = $this->__('%s', Mage::helper('catalog/image')->init($product, 'small_image')->resize(180));
                $this->loadLayout();
                $sidebar_block = $this->getLayout()->getBlock('cart_sidebar');
                Mage::register('referrer_url', $this->_getRefererUrl());
                $sidebar = $sidebar_block->toHtml();
                $response['sidebar'] = $sidebar;
            }
        } catch (Mage_Core_Exception $e) {
            $msg = "";
            if ($this->_getSession()->getUseNotice(true)) {
                $msg = $e->getMessage();
            } else {
                $messages = array_unique(explode("\n", $e->getMessage()));
                foreach ($messages as $message) {
                    $msg .= $message.'<br/>';
                }
            }

            $response['status'] = 'ERROR';
            $response['message'] = $msg;
        } catch (Exception $e) {
            $response['status'] = 'ERROR';
            $response['message'] = $this->__('Cannot add the item to shopping cart.');
            Mage::logException($e);
        }
        $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($response));
        return;
    }else{
        return parent::addAction();
    }
}

}`


texts:
I am running Magento 1.8.0.0 CE and have a problem with Centinel 3D Secure.
All the settings are correct in the backend as it did use to work.

The problem is that as soon as you press the place order button you get the error..

  This card has failed validation and cannot be used.
  The log output of the 3D Secure Module is - [ErrorNo] => 8030  [ErrorDesc] =>
  Communication Timeout Encountered

Does anyone know what can be done to fix this?
From what I can make out its a problem with my hoster.. but no one seems to be able to tell me what I need to get them to change.


texts: add to cart and continue shopping url in single button

texts:
I am using magento 1.8.
I am having custom add-to-cart button, that label is "Add to cart and continue shopping"

Magento have these both option seperatly, "Add-to-cart" and "continue Shopping"
How can I combine both the option in single button or click.
I mean when user clicks on "Add to cart and continue shopping" it need to add the product to cart and redirect to home page/product list page..

THANK YOU.


texts:
I want to create an xml file when I first install the integration in /app/code/Foo/Bar/view/frontend/layout with php.

Is it possible to do so and how should it be done ? Tried with fopen in InstallData.php but it did not create the file.


texts: Custom category attribute is not being saved - issue

texts:
I managed to create my custom attribute:
    $installer = $setup;
    $installer->startSetup();
    $categorySetup = $this->categorySetupFactory->create(['setup' => $setup]);

    $categorySetup->addAttribute(
        Category::ENTITY,
        'content_category_page',
        [
            'type' => 'int',
            'label' => 'Content Page',
            'input' => 'select',
            'sort_order' => 100,
            'source' => 'Magento\Catalog\Model\Category\Attribute\Source\Page',
            'global' => 2,
            'visible' => true,
            'required' => true,
            'user_defined' => false,
            'default' => null,
            'group' => 'General Information',
            'backend' => ''
        ]
    );
    $installer->endSetup();

I made the file view/adminhtml/ui_component/category_form.xml with this content:
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <fieldset name="content">
        <field name="content_category_page">
            <argument name="data" xsi:type="array">
                <item name="options" xsi:type="object">Vendor\Module\Model\Config\ContentPages</item>
                <item name="config" xsi:type="array">
                    <item name="dataType" xsi:type="string">text</item>
                    <item name="label" xsi:type="string" translate="true">Content Page</item>
                    <item name="formElement" xsi:type="string">select</item>
                    <item name="dataScope" xsi:type="string">content_category_page</item>
                </item>
            </argument>
        </field>
    </fieldset>
</form>

The new attribute appeared in the right place, but when i choose an option and press the save button, the value is not being saved . Would you please advice, why my custom category attribute is not created ? :)  Thnx in advance!


texts: Magento2 - Value of rewritten ListProduct::getProductDetailsHtml Method do not print out value

texts:
Magento 2.1 CE

Hi,

i do something like this:

Create a new Module with di rewrite, etc ...

Than rewrite the ListProduct Block from Mage Core:

use Magento\Catalog\Block\Product\ListProduct as MagentoListProduct;

class ListProduct extends MagentoListProduct
{
    public function getProductDetailsHtml(\Magento\Catalog\Model\Product $product)
    {
        $html = $this->getLayout()->createBlock('SomeVendor\SomeModule\Block\Catalog\DoSomething')
            ->setProduct($product)->setTemplate('SomeVendor_SomeModule::catalog/product/list/dosomething.phtml')->toHtml();

        return $html;
    }
}

Where getProductDetailsHtml is the orig. Magento Block Method call in the product list template:

...
<?php echo $block->getReviewsSummaryHtml($_product, $templateType); ?>
<?php echo $block->getProductDetailsHtml($_product); ?>
...

My Problem ist, that public function getProductDetailsHtml() do not return a value. The Template do not render any content out!

If i place a var_dump, like this:

public function getProductDetailsHtml(\Magento\Catalog\Model\Product $product)
{
    $html = $this->getLayout()->createBlock('SomeVendor\SomeModule\Block\Catalog\DoSomething')
        ->setProduct($product)->setTemplate('SomeVendor_SomeModule::catalog/product/list/dosomething.phtml')->toHtml();

    var_dump($html);
    return $html;
}

it dumps out the value!

If i add a new Method in my rewritten block, like:

public function getProductDetailsHtmlFoo(\Magento\Catalog\Model\Product $product)
{
    $html = $this->getLayout()->createBlock('Come\ProductListSwatches\Block\Catalog\Swatches')
        ->setProduct($product)->setTemplate('Come_ProductListSwatches::catalog/product/list/swatches.phtml')->toHtml();

    return $html;
}

and in Frontend:

<?php echo $block->getReviewsSummaryHtml($_product, $templateType); ?>
<?php echo $block->getProductDetailsHtml($_product); ?>
<?php echo $block->getProductDetailsHtmlFoo($_product); ?>

it will work as i want!

Do is miss something? Whats wrong?


texts:
We have got alert from USPS which is about upcoming updates:

  January 26 USPS Web Tools Update:  USPS Web Tools will be implementing
  changes and additional features to the U.S. Postal Service APIs listed
  below effective January 26, 2014 with testing available January 13th.

But I can't find official patch for Magento CE 1.7. Will new updates affect to our store, we only use Priority Mail and stamps.com integration. Thanks for helps.


texts:
I'm working on custom payment system in which I am using Magento2 default vault functionality. Everything is working fine when if I replace below code in file Magento\Vault\Model\Method\Vault into authorize() or capture() methods.

$commandExecutor = $this->commandManagerPool->get(
        $this->getVaultProvider()->getCode()
    );

to

$commandExecutor = $this->commandManagerPool->get(
        "method_code"
    );

My question is how can I assign vaultprovider? so I can get method code directly form vaultprovider object.

Note: I'm not placing an order in Magento, I just authorize or capture amount from third party payment gateway system(paypal pro) in my custom module.


texts:
Assume I have a URL like this,

http://mystore.com/cms/sales/order/view/order_id/286/

I want to get values of the order_id which is 286,

Please help with some example or snippet in Magento 2.


texts: Magento 2 What is the different between setDefaultOrder and SetSortBy in layout xml?

texts:
I'm trying to set a default sort order to products listing in category page.

I have seen people suggest using

            <action method="setDefaultOrder">
                <argument name="sort" xsi:type="string">name</argument>
            </action>
                <action method="setDefaultDirection">
                    <argument name="dir" xsi:type="string">asc</argument>
                </action>

or by using

            <action method="setSortBy"><string>name</string></action>
                <action method="setDefaultDirection">
                    <argument name="dir" xsi:type="string">asc</argument>
                </action>

Unfortunately none of the above method worked for me. But I just want to know what's the different between setDefaultOrder and setSortBy?


texts: How to add color picker in widgets in magento 2.3

texts:
i want to add color picker in widget
https://magento.stackexchange.com/a/190260/73525
This above link is working for system config

same thing i want in widget as field
Any one have idea about this


texts: Need pass dynamic url param value in button url of ui-component grid

texts:
I have a button on a admin grid in Magento 2 which need to pass URL parameter coming on the grid page like:

http://127.0.0.1/admin/vendor_module/questionsetflow/index/questionset_id/19/key/8a93789d2ff74e19ee9d8b0aabc1349419582836dea63df961a6146d7454cf38/

I need to pass the dynamic param questionset_id (value = 19) to button 'Add New Question' in my admin grid (ui component):

<?xml version="1.0"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <argument name="data" xsi:type="array">
        <item name="js_config" xsi:type="array">
            <item name="provider" xsi:type="string">alkemy_chatbot_questionsetflow_listing.alkemy_chatbot_questionsetflow_listing_data_source</item>
            <item name="deps" xsi:type="string">alkemy_chatbot_questionsetflow_listing.alkemy_chatbot_questionsetflow_listing_data_source</item>
        </item>
        <item name="spinner" xsi:type="string">alkemy_chatbot_questionsetflow_columns</item>
        <item name="buttons" xsi:type="array">
            <item name="back" xsi:type="array">
                <item name="name" xsi:type="string">back</item>
                <item name="label" xsi:type="string" translate="true">Back</item>
                <item name="class" xsi:type="string">primary</item>
                <item name="url" xsi:type="string">alkemy_chatbot/questionset/index</item>
            </item>
            <item name="add" xsi:type="array">
                <item name="name" xsi:type="string">add</item>
                <item name="label" xsi:type="string" translate="true">Add New Question</item>
                <item name="class" xsi:type="string">primary</item>
                <item name="url" xsi:type="url" path="alkemy_chatbot/questionsetflow/new">
                    <param name="questionset_id">!!!!!!!!</param>
                </item>
            </item>
        </item>
    </argument>

What value is necessary to put in <param name="questionset_id">

Thanks


texts:
Im getting this error on http://localhost:8080/
Magento ver. 1.9.3.10
Any help is appreciated.

Notice: Undefined variable: cart  in C:\wamp64\www\app\design\frontend\default\hardwood\template\callouts\left_col.phtml on line 60


texts: how to add multiple grids in custom module in magento 1.9 ?

texts: Getting this Error , can anyone suggest steps to add multiple grids ?


texts:
Has anyone successfully uploaded an image for use with a category? When going through the documentation @ http://devdocs.magento.com/swagger/index.html#/ I don't see any implementation that could support it.

Also when retrieving a category using REST you don't get the category image back.

In the admin page, you can add the category here:


texts:
I can not seem to override the Magento Invoice class.

I've created a module, installed it, enabled it.
I have the following in my di.xml file

<?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\Sales\Model\Order\Pdf\Invoice" type="Dojo\InvoiceBarcodes\Model\Order\Pdf\Invoice" />
</config>

I've run the following commands:

./bin/magento cache:flush
./bin/magento setup:di:compile

If I run dev:di:info, it shows my class as a preference...

$ ./bin/magento dev:di:info "Magento\Sales\Model\Order\Pdf\Invoice"

DI configuration for the class Magento\Sales\Model\Order\Pdf\Invoice in the GLOBAL area

Preference: Dojo\InvoiceBarcodes\Model\Order\Pdf\Invoice

Constructor Parameters:
+-------------------+-----------------------------------------------------+-----------------------------------------------------------------------+
| Name              | Requested Type                                      | Configured Value                                                      |

I can verify it's not using my class because if I alter the Magento Invoice file, it reflects when I click print invoice.

I've checked all the logs, and there are no errors.

I'm not sure if I'm doing something wrong, if you can't override this class, or need to override in a different way.

Magento version 2.3.2

Any help would be appreciated.


texts: Getting cloudflare to work with magento 2

texts:
This is a complicated subject for me because I'm brand new to server work so I will do my best to explain what I have done and what the issue is. The bottom line is that as you can see below, my percentage of cloudflare cache requests is extremely low

So I followed the steps at this url: https://support.cloudflare.com/hc/en-us/articles/236168808

That seems to be the reason for the few cache requests from cloudflare but when I contacted cloudflare support, they believe the reason is because when they do a test on my website, they can see the following information which is preventing cloudflare from doing cache requests

As you can see, it shows Cache-Control twice. The bottom one is what I did to try to fix this. The top one is obviously the issue and from my research it looks like Magento sets it in the code below

code found in vendor/magento/framework/App/Response/Http.php

public function setNoCacheHeaders()
{
    $this->setHeader('pragma', 'no-cache', true);
    $this->setHeader('cache-control', 'no-store, no-cache, must-revalidate, max-age=0', true);
    $this->setHeader('expires', $this->getExpirationHeader('-1 year'), true);
}

So with all of that being said:

What can I do to increase the percentage of cache requests through cloudflare? Am I missing something?


texts: Is there a way to make the bundled products in M2 behave like a simple product, except that the components are listed on the product page? Aheadworks has a module that almost does the job (link to screenshot). The only problem is that the "available stock"-formula they have created leaves a lot to be desired. (They think that if only one of the components is in stock, then the whole bundle should also be in stock - even if two or three other components are missing).


texts: How to show products from subcategories in a category page

texts:
I need to list products in a category page sorted by subcategory with respective subcategory name before the products. With static blocks I can display the name of the subcategory on the category page but I cannot list the products.
Any pointers?


texts: set a product list with pager in ajax action controller

texts:
I am trying to set child to another block using the following script :

public function refreshlistAction() {
    $data = $this->getRequest()->getParams();
    if (isset($data['delivery'])) {
        $layout = $this->getLayout();
        $blockPager = $layout->createBlock('page/html_pager','product_list_toolbar_pager');
        $blockToolbar = $layout->createBlock('catalog/product_list_toolbar', 'product_list_toolbar')->setTemplate('catalog/product/list/toolbar.phtml');
        $blockToolbar->setChild('product_list_toolbar_pager',$blockPager);
        $block = $layout->createBlock('catalog/product_list', 'product_box_list')->setTemplate('catalog/product/list.phtml');
        $block->setChild('toolbar', $blockToolbar);
        $block->setCategoryId($data['category']);
        $session = Mage::getSingleton('core/session');
        //let's check if there is not a delivery mode set and a product in the cart
        if (($session->hasDelivery())&&(!empty($session->getDelivery()))&&(!empty(Mage::getModel('checkout/cart')->getProductIds()))&&($session->getDelivery()!=$data['delivery'])){
            Mage::getSingleton('core/session')->addNotice($this->__("Your cart is not empty. Therefore, you cannot adopt a different delivery mode"));
            $data['delivery'] = $session->getDelivery();
        }
        $block->setFilterDelivery($data['delivery']);
        $session->setDelivery($data['delivery']);
        $html = $block->toHtml();
        $this->getResponse()
                ->setHeader('Content-Type', 'text/html')
                ->setBody($html);
        return;
    } else {
        echo $this->__('This page cannot be accessed');
    }
}

The product list and toolbar are returned and can be displayed but the pager is not. If I make a var_dump in toolbar.php(line 809) :

$pagerBlock = $this->getChild('product_list_toolbar_pager');
var_dump($pagerBlock);

$pagerBlock contains a boolean (false).

Is there something I am missing ?

My idea is to refresh the product list with ajax on an attribute filtering.


texts: How to Extend Algolia_AutoSearch extension in my own custom extension. Magento 2

texts: I want to create a custom Module in which I want to use Algolia_AutoSearch extension Like my extension is about Search like Algolia extension do but my search will be about the orders i.e. customer want to search order when the add his number like 123 then all the orders will be shown which id starts from the 123. So how can I set this type of search using algolia?


texts:
I am using magento 2.2.3. And my issue is, on frontend I am getting below errors which stucks checkout page. Means, Page Loader is continuosly loading on checkout page so customer can not do anything :

Errors :::

  Error: Script error for: mageplaza/core/bootstrap
  http://requirejs.org/docs/errors.html#scripterror require.js:166:17

  Error:
  https://website.com/pub/static/version1552373356/frontend/Mytheme/theme-grocery/en_US/js-translation.json
  HTTP status: 404

If I am trying to deploy static content then some errors are displaying on cmd :

  Fatal error: Uncaught Error: Call to a member function getPackage() on
  null in
  /home/mysite/public_html/vendor/magento/module-deploy/Package/Processor/PostProcessor/CssUrls.php:215
  Stack trace:

  #0 /home/mysite/public_html/vendor/magento/module-deploy/Package/Processor/PostProcessor/CssUrls.php(109):
  Magento\Deploy\Package\Processor\PostProcessor\CssUrls->getValidExternalUrl('{{base_url_path...',
  Object(Magento\Deploy\Package\Package))

  #1 /home/mysite/public_html/vendor/magento/module-deploy/Package/Processor/PostProcessor/CssUrls.php(80):
  Magento\Deploy\Package\Processor\PostProcessor\CssUrls->parseCss(Array,
  'css/email.css', 'frontend/Ionwe/...', '@import url("{{...',
  Object(Magento\Deploy\Package\Package))

  #2 /home/mysite/public_html/vendor/magento/module-deploy/Service/DeployPackage.php(151):
  Magento\Deploy\Package\Processor\PostProcessor\CssUrls->process(Object(Magento\Deploy\Package\Package),
  Array)

  #3 /home/mysite/public_html/vendor/magento/module-deploy/Service/DeployPackage.php(107):
  Magento\Deploy\Servi in
  /home/mysite/public_html/vendor/magento/module-deploy/Package/Processor/PostProcessor/CssUrls.php
  on line 215

Anyone can help on this ??

Thanks in advance.


texts: Magento 2 - Customer/Token Rest API issue

texts:
Customer is signup through rest api in magento 2.3 successfully. after signup, I am unable to get customer's token through customer/token rest api.

Api returns following error:

Any help, experience and knowledge sharing would be appreciated.


texts: How to add pop up window on Grid.php action link?

texts:
I want to add popup link on Grid.php , i tried

      $this->addColumn('action', array(
            'header'    =>  Mage::helper('mymodule')->__('Action'),
            'width'     => '80',
            'type'      => 'action',
            'getter'    => 'getId',
            'actions'   => array(
                array(
                    'caption'   => Mage::helper('feedback')->__('Reply'),
                    'url'       => array('base'=> '*/*/edit'),
                    'field'     => 'id',
                    'onclick' =>"return popitup('".$this->getUrl('*/*/edit', array('id' => $this->getId()))."')"
                )
            ),
            'filter'    => false,
            'sortable'  => false,
            'index'     => 'stores',
            'is_system' => true,
    ));

I want both below link same

Reply


texts: Why need click in save and continue to show images?

texts:
I have a problem with images of my products.

If I enter in the product XXXXX he have an image but don't show in the frontpage then I need enter in backend of Magento and click in Save an continue.

Any idea?


texts: Analytics Params being truncated on Product URLs - Magento CE 1.9.1

texts: In Magento 1.9.1 Community Edition when adding params to the end of the URL they get truncated. My concern is that when tracking campaigns the tracking parameters get truncated. Has anyone else experienced this behavior and come up with a solution to preserve UTM params to Magento product pages?


texts:
I have a very very annoying problem with Magento 2.3.3.
I have a product with size and color attributes.
If I inspect the code, I will see ALL the values:
Indeed in "Magento_Swatches/js/swatch-renderer": I will get all the results in jsonConfig jsonSwatchConfig etc etc.
The problem is that when I click on the attributes, the price doesn't change and the picture doesn't show.

The console is showing me this error TypeError: this.options.jsonConfig.mappedAttributes is undefined

On particularly in the _onClick function when I call the method _getAttributeCodeById.
If I comment the _getAttributeCodeById, the price will update, but the picture will show the magento placeholder.

This thing is driving me crazy!!
Please, help me with that!


texts: Get collection with promotional products not working

texts:
I need to get a collection listing all products with a promotion, but I'm getting this error:

Fatal error: Call to a member function getBackend() on boolean

I tried those 2 solutions, but still getting the same error:

First try:

$collection = Mage::getResourceModel('reports/product_collection')->addAttributeToSelect('*')->addAttributeToFilter('promotion', 1);

Second try:

$collection = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*')->addAttributeToFilter('promotion', 1);

How can I solve that and get the list with only promotional products? Thanks in advance.


texts:
Not sure if this is a bug or if this is an actual issue which is going on. I have tried to read up on few informations and tried to follow the steps.
But I am not getting anywhere unfortunately.

The issue I am facing currently is the following
If I tried to login to a customer from the admin area buy clicking login account it logs in without any issue.
But the name is not showing and also when I get to checkout and try to click proceeds to checkout it keeps asking to login

Please can anyone suggest the way around this problem


texts: how to add a new phtml file into another file

texts:
I added like that in page.xml

<block type="page/html_banner" name="banner" as="banner" template="page/html/banner.phtml">
</block>

but didn't get the template.

please any one suggest me.


texts: install Magento 2.1 Error 404 after success installation

texts:
Installation from the download Page and the right ownership from there

Ubuntu 16.04

PHP 7.0.8

MySQL 5.7.12

Apache 2.4.18 with configured VirtualHost

And after installation I see the success page.

Then:

admin page: 404

The frontend has some resource 404s:

After a setup:di:compile some resource 404s are gone. But admin page are still 404.

What can I do?


texts: Add .js file in root folder from xml, Magento version 1.9.3.8

texts:
Is it possible to add in xml configuration .js file from root folder. In root folder we have the folder js_components. How can I add a file in xml? I can not move this "js_components" folder
in default "js" folder.

            <action method="addJs"><script>js_components/test.js</script></action>


texts: Create multiselect with source model in UI component

texts:
Since Magento 2.1 you have to define a UI component for custom category attributes (See Magento 2.1: how to create category attrbute programmatically?)

I have one multiselect attribute with a custom source model and cannot get it to work. I took available_sort_by as an example and managed to show the attribute with a multiselect input but it has no options, i.e. it is not using my source model.

This is the relevant part of category_form.xml:

    <field name="solr_remove_filters">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="sortOrder" xsi:type="number">20</item>
                <item name="additionalClasses" xsi:type="string">admin__field-default</item>
                <item name="formElement" xsi:type="string">multiselect</item>
                <item name="source" xsi:type="string">category</item>
                <item name="label" xsi:type="string" translate="true">Remove Filters</item>
                <item name="tooltip" xsi:type="array">
                    <item name="link" xsi:type="string">#</item>
                    <item name="description" xsi:type="string" translate="true">Hold the CTRL key to select multiple filters</item>
                </item>
                <item name="scopeLabel" xsi:type="string">[STORE VIEW]</item>
            </item>
        </argument>
    </field>

The attribute solr_remove_filters has been added with the following install script:

    $eavSetup->addAttribute(
        Category::ENTITY,
        'solr_remove_filters',
        [
            'type'              => 'text',
            'input'             => 'multiselect',
            'source'            => FilterableProductAttributeSource::class,
            'backend'           => FilterableProductAttributeBackend::class,
            'label'             => 'Remove Filters',
            'note'              => 'Hold the CTRL key to select multiple filters',
            'required'          => 0,
            'user_defined'      => 0,
            'group'             => 'Solr',
            'global'            => 0,
            'visible'           => 1,
        ]
    );

I have set a debug breakpoint in FilterableProductAttributeSource::getAllOptions() and see that it is executed and returns an array in the form

[
    ['value' => 'value1', 'label' => 'label1'],
    ['value' => 'value2', 'label' => 'label2'],
    ['value' => 'value3', 'label' => 'label3'],
]

which confirms that the source model is instantiated and works.

What do I need to do to populate the UI component with these values?


texts:
I just installed the sample data (1.9.0.0) and then installed Magento 1.9.0.1 after that. The homepage for Madison Island loads great (localhost/magento/index.php/) but any of the links are broken. For example, if I click "women", I get a 404 error for this page: localhost/magento/women.html. I tried searching the sample data "media" folder and I can't find that HTML page or any images.

If someone could please let me know what I'm doing wrong, I'd appreciate!

Thanks, Josh


texts: How to remove Proceed to checkout button in cart page

texts: I am working on mobile theme in Magento. When I add more than one product to cart proceed to checkout button showing twice both on top of the products and bottom of the products. How to remove from top?


texts: onclick button all products deleting instead of one product

texts:
We are displaying Products in My account section & gave an option to add product to cart once user click on Add to cart. now we want to provide an option to delete the products once we click on "Delete" button.

Edit

After using below code, once i  click on "Delete" button, all products are deleting instead of one product :

<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>

<?php $collections = $this->getCollection(); ?>

<?php $_product = $this->getProduct(); ?>

<?php $buttonTitle = Mage::helper('core')->quoteEscape($this->__('Add to Cart')); ?>

<?php foreach ($collections as $key => $product) {

    echo $product->getName().'
';
     echo $product->getId().'
';

    $_product = Mage::getModel('catalog/product')->load($product->getId());

?>

<?php

$itemRemoveUrl=$this->getUrl('checkout/cart/delete',array('id'=>$_product->getId(),
   Mage_Core_Controller_Front_Action::PARAM_NAME_URL_ENCODED=>$this->helper('core/url')->getEncodedUrl())
);
?>

<form
action="<?php

Mage::register('isSecureArea', true);
$_product = Mage::getModel('catalog/product')->load($product->getId());
try
 {
$product->delete();
Mage::unregister('isSecureArea');
}
catch(Exception $e)
{
echo "write";
}

?>" method="post">

<button type="submit" title="Delete" class="button btn-cart" >
    Delete
</button>

</form>

<?php

}
?>


texts: How to set null value product in last in sorting on product listing page?

texts:
Hello i have main 4 product like

     product_name  attribute_name attribute_value
----------------------------------------------------------
     test1           catname        abc
     test2           catname        ccc
     test3           catname        ###
     test4           catname        bbb

when i sort product bye catname on product listing page than i will get null value product test3 first , but i need it in last. i have to igonre null attribute value.

I have try in toolbar.phtml for asc and desc but its not which i want.

Can anyone help me??


texts:
I am trying to install Magento with pwa,but when i run in terminal command yarn create @magento/pwa,
and after answer of the question-
Im getting an error-- Invalid directory path; contains illegal characters


texts: How to call function from php file to .phtml file in magento 2

texts:
I am trying to add google reCaptcha for the newsletter.

I have added the following code after <form>;

<button
class="g-recaptcha"
data-sitekey="6Lfc-WsUAAAAAMvtAnrdwdDGxdiOsuPyFK4wse1D"
data-callback="YourOnSubmitFn">
Submit
</button>

I want to call subscribe() function for parameter data-callback from file app/code/Magento/Newsletter/Model/Subscriber.php

How to call function from php to .phtml?


texts:
I would like to add two custom field for order process.

My config file:

    <resources>
        <sales_custom_attribute>
            <setup>
                <module>Ucs_CatalogOrder</module>
                <class>Mage_Sales_Model_Mysql4_Setup</class>
            </setup>
            <connection>
                <use>core_setup</use>
            </connection>
        </sales_custom_attribute>
    </resources>

Below is MySQl:

Location: app\code\local\Ucs\CatalogOrder\sql\sales_custom_attribute\mysql4-install-1.0.0.php

<?php
$installer = $this;
$installer->startSetup();

$this->addAttribute('quote_item', 'card_wallet_amount', array(
        'type' => 'varchar',
        'input' => 'text',
        'label' => 'Card handling Charges',
        'global' => 1,
        'visible' => 1,
        'required' => 0,
        'user_defined' => 1,
        'visible_on_front' => 0
    ));
$this->addAttribute('order_item', 'card_wallet_amount', array(
        'type' => 'varchar',
        'input' => 'text',
        'label' => 'Card handling Charges',
        'global' => 1,
        'visible' => 1,
        'required' => 0,
        'user_defined' => 1,
        'visible_on_front' => 0
    ));

$installer->endSetup();

After clearing cache I reload my page. When I check core_resource I can see the module sql record. But the fields haven't been added.


texts: How to add custom field in order_sales table and used it?

texts:
i need to add new field in order_sale tables.

I create a initialSchema and add field in database (office_id). But i don't use this filed in order create, no matter where it is created.

Please tell me how to use this field, on order save. Google's results are very confusing .

Please do not answer me with things like EAV or attributes.

This should be the table and should be used there.

I have a specific question, I hope for get a clear and precise answer.


texts: Can I change the extension from .HTML to .phtml?

texts:
I've got a custom payment module. I've .HTML checkout button page in this path.

\app\code\vendorName\moduleName\view\frontend\web\template\payment\vendor.html

Can i change .phtml instead of .HTML


texts: Magento - Subscription product - need to revert to another product after initial period

texts:
Magento 1.9.0.1 with Recurring /Subscription module by anywebsol.

We have a grouped product with three associated products within itself.

I is a monthly subscription (no issues).

II will be a fixed pay for first 3 months

III will be a fixed pay for first 6 months.

The Grouped product alone will be shown in the catalog. For II & III buyers/subscribers, after the initial period (of 3 or 6 months), the subscription should automatically switchover to Monthly or Option I.

Is this possible? Can the 3-month and 6-month product be altered using a cron job to convert to montly subscription after the end date? Configurable product? or is there better way to do this with your extension.

Would appreciate early responses. Thanks in advance.


texts:
Data Migration > EAV Step

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-Migration_Default' for key 'EAV_ATTRIBUTE_SET_ENTITY_TYPE_ID_ATTRIBUTE_SET_NAME'

i have find solution here but not work for me also i have remove duplicate attribute set in eav_attribute_set table
but after run command then new error genrated

Undefined offset: 4 in
vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php on
line 292

Any help would be appreciated.
Thanks.


texts: Get all custom attributes added for products - programmatically

texts: I have added few attributes in Magento like Veg, NonVeg etc.Is there any way to get all newly added attributes from Magento? I do not want those attributes which were already present.


texts:
After updating Magento Framework to 2.1.7, none of the flash messages (success, error, notice ..) are show on frontend, which is making very difficult  for user to understand what has happened after performing some action.

I found that in older version "mage-messages" cookie gets deleted on page load if empty, But after updating its not the same. I have 2 store view and found multiple records for mage-messages cookie.

Once I delete the mage-messages (session cookie) I am able to see the messages.

Is this a know issue? How can we debug such Issue?

Thank You.

Edit:

On further debugging I found there is a difference in messages.js file

on Version 2.1.3

    define([
    'jquery',
    'uiComponent',
    'Magento_Customer/js/customer-data',
    'jquery/jquery-storageapi'], function ($, Component, customerData) {
    'use strict';
    return Component.extend({
        defaults: {
            cookieMessages: [],
            messages: []
        },
        initialize: function () {
            this._super();

            this.cookieMessages = $.cookieStorage.get('mage-messages');
            this.messages = customerData.get('messages').extend({disposableCustomerData: 'messages'});
            $.cookieStorage.setConf({path: '/', expires: -1}).set('mage-messages', null);
        }
    });
});

Where as on Version 2.1.7 code is

    define([
    'jquery',
    'uiComponent',
    'underscore',
    'Magento_Customer/js/customer-data',
    'jquery/jquery-storageapi'], function ($, Component, _, customerData) {
    'use strict';

    return Component.extend({
        defaults: {
            cookieMessages: [],
            messages: []
        },

        /** @inheritdoc */
        initialize: function () {
            this._super();

            this.cookieMessages = $.cookieStorage.get('mage-messages');
            this.messages = customerData.get('messages').extend({
                disposableCustomerData: 'messages'
            });

            if (!_.isEmpty(this.messages().messages)) {
                customerData.set('messages', {});
            }

            $.cookieStorage.set('mage-messages', '');
        }
    });
});

Seems the new versions is making use of underscore. Also noticed that below code is removed in new version

.setConf({path: '/', expires: -1})

I believe this issue is occurred with sites having  multiple store views.


texts: Magento 2 / Require JS is trying to load a file from a TweenLite CDN script

texts:
We're using TweenLite in a Magento 2 webshop for some animations. I've added the scripts in a separate module in the way Greensock recommends, like this:

<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.19.1/plugins/CSSPlugin.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.19.1/easing/EasePack.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.19.1/TweenLite.min.js"></script>

I've added these script tags in a template file, which will be loaded by Magento through a module. When I check the webshop, the template file is loaded and the scripts are visible in the source code. But when I check the console, it shows the following errors:

In particular, the second error is a bit weird. I'm only loading the TweenLite.min.js through the script tag from the CDN, but now it also tries to load a TweenLite.js from the static files.

Apparently, the CSSPlugin and/or EasePack files are trying to load the TweenLite.js file. When I remove those two, it doesn't try loading the TweenLite.js file.

Does anyone know the reason for trying to get the TweenLite.js file from the static files? And is there a solution for this, like loading the files through RequireJS or something?


texts:
I'm having an issue with customer email not being saved in order details.
It happens when not registered customer makes an order, whether he chooses to register or buy as a guest.

That is how "Account information" section in order view looks like:

Customer Name: Guest
Email (that field is empty)
Customer Group: General

And that is how it should look like:

Customer Name: Firstname Lastname
Email: j596669@trbvm.com
Customer Group: NOT LOGGED IN

Weird thing about that is that I "solved" this problem yesterday by changing:
Customers > Customer Configuration > Enable Automatic Assignment to Customer Group –  from YES to NO.

After changing that it worked just fine, but today it doesn't work again neither on Enable Automatic Assignment to Customer Group enabled nor disabled.

Do you happen to have any ideas what can be wrong?


texts: Magento 2 admin login redirects to login page issue

texts:
I cant seem to login into my magento 2 backend.
When I enter the correct credentials it just redirects me to the login page with no error.
Debug, system and exception log are clean.
Cache is cleaned already.

Thanks in advance!


texts: Show Configurable Product List by Default In Product Section In Admin

texts:
In Magento Admin, when we go to Catalog > Manage Products, We see the list of Products of all types by Default as shown as below image:-

but I want to show only Configurable Type Product by Default View.

Is there a way to do it.? Please anyone help me.

Thanks in Advance.


texts: download custom option uploaded image in order even if Add Store Code to Urls set yes

texts:
Magento ver. 1.7.0.2

In my Store Under System -> Configuration -> General -> Web , I set Add Store Code to Urls Yes.

Due to i get problem to download custom option image from order. If I set NO than i able to download image but I don't want to disable this option .
its may be generate problem for past seo work which has done.

Is any way to get download custom option image from order ?


texts:
I am using magento 1.9 community edition.
How to remove or hide product price and "add to cart " button in specific magento store.


texts: Use Mage_Uploader in custom form in store frontend

texts:
Magento 1.9.3 (also: 1.x with security patch SUPEE-8788) introduced the Mage_Uploader module, a new file upload widget without Flash. The core only uses it in the admin area (product images, CMS), but I would like to have it on a custom form in the frontend too, to allow multiple file uploads.

What do I need to do to make it available in the frontend?


texts: Redirect customers to login page after new account is created

texts:
When a new customer registers an account on our site, the registration page simply refreshes and clears the password field, making it look like registration has failed, when in fact it has succeeded. Is there any way to redirect to the login page after a successful registration, with a "thank you for creating an account message?" Using Magento 2.3.2.

Thank you.


texts: How do you create a link to BOTH the product frontend and backend from the sales order page?

texts:
We are looking to create a link to the frontend of a product and the backend of a product from the "items ordered" area of the sales order page. We have the code to create both, but not from the same section. By this we mean we can't combine them into the same column/area, For example we have:

Frontend:

        <?php if ($this->canDisplayContainer()): ?>
        <div id="<?php echo $this->getHtmlId() ?>" class="item-container">
        <?php endif; ?>

<?php $_pullProduct = Mage::getModel('catalog/product')->loadByAttribute('sku', $_item->getData('sku')); ?>
<a target="_blank" rel="external" href="<?php echo Mage::getUrl() . $_pullProduct->getData('url_path'); ?>"><?php echo $this->getColumnHtml($_item, 'name') ?>

        <?php if ($this->canDisplayContainer()): ?>

        <?php endif ?>

And for the backend:

        <?php if ($this->canDisplayContainer()): ?>
        <div id="<?php echo $this->getHtmlId() ?>" class="item-container">
        <?php endif; ?>

<?php $_pullProduct = Mage::getModel('catalog/product')->loadByAttribute('sku', $_item->getData('sku')); ?>
<a target="_blank" rel="external" href="<?php echo Mage::helper('adminhtml')->getUrl('adminhtml/catalog_product/edit', array('id' => $_pullProduct->getId()))?>"><?php echo $this->getColumnHtml($_item, 'name') ?>

        <?php if ($this->canDisplayContainer()): ?>

        <?php endif ?>

Can this code be combined to create a link to the frontend from the product name, and a link to the product backend from the SKU?

We would ideally like to create a small module or file to override the default configuration in Magento so the code is not overwritten in future updates.


texts:
I need a functionality to split custom line item in magento 2.3.4 .
For example, suppose Product A has custom addon Child A, then by default magento will show like this Product-A-Child-A in sales order details page. But i want functionality to split this line items into 2 different items like this Product-A & Child-A.
For More clarification currently we have this type of sku in sales order details page .

What i want sku for line custom items .


texts: How can i use _module.less in custom module

texts:
I'm writing a custom module and i need to add styles. So i'm trying to follow magento's way with using _module.less file.
i've created a file Namespace/Module/view/frontend/web/css/source/_module.less. When i change this file, i see, that grunt watch see those changes and recompiles my styles. But changes from my _module.less file never gets into result files. Any help?


texts: How to set customer first name email template after creating new account in Magento 2

texts:
I want to set customer first name on transactions email after create new customer account in magento2

I tried this line but that did not work

{{trans "Dear %name," name=$Firstname}}


texts: How can I disable or remove a Magento 2 UI Global Component such as the modal?

texts:
I want remove the Modal Ajax requests on every page - this is a Magento 2 UI componenet.

I tried this in my app/design/frontend/scorpion/default/Magento_Theme/layout/default.xml

<item name="Modal" xsi:type="array">
    <item name="config" xsi:type="array">
        <item name="componentDisabled" xsi:type="boolean">true</item>
    </item>
</item>

I also applied a query to remove authentication popup which works partially but it does not remove the modal calls..

<referenceBlock name="authentication-popup" remove="true"/>

However the files still do the AJAX request and still appear in HTML:


texts: Magento 2: Varnish + Redis for Full Page Cache at the same time?

texts:
My question is to Magento Pros:

Can I use Varnish and Redis for FPC (Full Page Cache) at the same time?

My current setup looks like this:

SSL termination > Varnish Full Page Cache > Apache > two Magento 2 websites.

In addition to the setup above  I installed Redis for Page Cache to see if I will get any benefit from it.

What confused me is this line in Redis config:

'page_cache' =>
array(
  'backend' => 'Cm_Cache_Backend_Redis',

and here is the full code of sample Redis config I got from Magento official website:

 'cache' =>
 array(
    'frontend' =>
    array(
       'default' =>
       array(
          'backend' => 'Cm_Cache_Backend_Redis',
          'backend_options' =>
          array(
             'server' => '127.0.0.1',
             'port' => '6379'
             ),
     ),
     'page_cache' =>
     array(
       'backend' => 'Cm_Cache_Backend_Redis',
       'backend_options' =>
        array(
          'server' => '127.0.0.1',
          'port' => '6379',
          'database' => '1',
          'compress_data' => '0'
        )
     )
   )
 ),

http://devdocs.magento.com/guides/v2.0/config-guide/redis/redis-pg-cache.html

As far as I understand "page_cache" refers to Full Page Cache and I already have that in Varnish.

I checked many answers regarding Varnish, Redis and FPC in Magento 2 on this and other websites but still did not find the answer.

Question 1) Should I just remove that 'page_cache' part from the code? Or, does Varnish and Redis use different segments of FPC and I should keep it?

Question 2) Please share based on Your personal experience how well Varnish and Redis getting along in FPC in Magento 2 and would you reccomend to use both at the same time for Full Page Cache?


texts: Elasticsearch max file descriptors too low

texts:
When I tried to launch Elasticsearch - I get an error

[2019-05-28T23:08:59,142][INFO ][o.e.t.TransportService   ] [protectcovers-1] publish_address {127.0.0.1:9300}, bound_addresses {127.0.0.1:9300}, {[::1]:9300}
[2019-05-28T23:08:59,236][WARN ][o.e.b.BootstrapChecks    ] [protectcovers-1] max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]
[2019-05-28T23:08:59,237][WARN ][o.e.b.BootstrapChecks    ] [protectcovers-1] max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

curl -i localhost:9200/

{
  "name" : "protectcovers-1",
  "cluster_name" : "protectcovers",
  "cluster_uuid" : "_na_",
  "version" : {
    "number" : "6.6.1",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "1fd8f69",
    "build_date" : "2019-02-13T17:10:04.160291Z",
    "build_snapshot" : false,
    "lucene_version" : "7.6.0",
    "minimum_wire_compatibility_version" : "5.6.0",
    "minimum_index_compatibility_version" : "5.0.0"
  },
  "tagline" : "You Know, for Search"
}

/etc/security/limits.conf file

#*               soft    core            0
#root            hard    core            100000
#*               hard    rss             10000
#@student        hard    nproc           20
#@faculty        soft    nproc           20
#@faculty        hard    nproc           50
#ftp             hard    nproc           0
#ftp             -       chroot          /ftp
#@student        -       maxlogins       4
elasticsearch   soft    nofile          65536
elasticsearch   hard    nofile          65536
elasticsearch   memlock unlimited


texts: How to get Sku, name, and image in magento2 through programmatically?

texts: I don't know how to implement this task. I want to get product name, SKU, and image in magento2. Can you please help me?


texts: What tests perform after moving Magento to another host?

texts:
I have asked to move a website on Magento to another hosting provider. The technical assistance of the hosting provider did this operation.

I have made some tests on public side and in the admin panel. Things seems working apart two timeouts.

What kind of tests would you perform at this point to watch if the site is working properly in all its functionalities?

Are there some tools to use?


texts:
I'm trying to move products element and can't find it's name to reference via XML.
The element has class "products wrapper grid products-grid" in rendered HTML.

Using Magento 2.


texts: undefined method when getting collection

texts:
I had this block of code for long time but it suddenly stopped working:

  PHP Fatal error: Call to undefined method Model\ResourceModel\Campaign\Collection::getCollection()

My code is this:

 $campaignLimit = $this->_campaignCollection->create()
            ->getCollection()
            ->addFieldToFilter('email', $email)
            ->addFieldToFilter('event_name', 'Lost Basket')
            ->addFieldToFilter('sent_at', $updated)
            ->count();

All necessary classes are injected in the constructor


texts: updateAttribute() function is not working on order attribute

texts:
i  am trying to update an sales order  attribute default using  updateAttribute()  function

But it is not working.

code is here:

$installer = $this;
/* @var $installer Mage_Sales_Model_Mysql4_Setup */

$installer->startSetup();
$installer->updateAttribute('order', 'is_local',  array('default'=>0));
$installer->endSetup();

Can anyone tell me,IS updateAttribute()  function is not working on sales order field magento 1.9 CE?


texts: Magento 2 How to correctly change the size of the minicart icon on the desktop?

texts:
Copy theme Luma.
I tried to find the correct solution in the documentation and found that this is done using .lib-dropdown in app\design\frontend\Vendorname\default\Magento_Checkout\web\css\source\module\_minicart.less. Also I could not understand how to remove: .minicart-wrapper .block-minicart:before and .minicart-wrapper .block-minicart:after.


texts:
We are getting problems with Authorize.net 'timing out' but then creating the order in Magento and then creating the transaction on Authorize.net.

To resolve, I have to go to Authorize.net and capture funds there. However, this leaves the invoice in Magento as unpaid.

Is there a place in the DB where I can change this status or is there some code to make the Authorize.net/Magento 2.2 connection more reliable? It doesn't happen often, but it happens enough to be annoying.


texts: How to access product custom attribute in cart page and in order

texts:
I have two product custom attributes Package and Tint.
I have assigned values to those attributes in my observer before add to cart in following way

   $item = $observer->getQuoteItem();
    // Ensure we have the parent item, if it has one
    $item = ( $item->getParentItem() ? $item->getParentItem() : $item );

    // Set the custom price
    $item->setCustomPrice($custom_price);

    $item->setOriginalCustomPrice($custom_price);

    $item->setPackage('Silver'); // these values are depends upon customers selection
    $item->setTint('Green');

    // Enable super mode on the product.

    $item->getProduct()->setIsSuperMode(true);

then I tried to get that values in my cart.phtml page using

   $item->getPackage(); it returns nothing

What is correct method to access attribute values in cart page. Also I want to show those attributes in order for admin and customer


texts: Magento 1.9.3.10 - Search doesn't work, advanced does!

texts:
Hi guys got a weird one the normal magento search returns 0 results, but the advanced search works?

Tried:

Reindexing
Clearing Cache
Re updating attributes of products to link
to website
Checked for theme files overriding (have I missed any?)

I edited "Mage_CatalogSearch_Model_Layer"

And added:

Mage::log($collection->getSelectSQL(1), false, 'search.log', true);
Mage::log((array)Mage::getConfig()->getNode()->global->models->catalogsearch, false, 'search.log', true)

Which gave me the SQL query, ran it in MySQL and returned a load of products as it should!

Any ideas why this wouldn't be working?


texts: Cant access the site after I made a clone of Magento 2.3.5-p1 Instance using AMI on EC2

texts:
I would be really grateful if you can give me a solution to this.

My main website is working fine on a custom domain "www.example.com". I made a clone of this using AMI and created a new instance on AWS.
Now on the new instance(cloned) I cannot access the website I tried changing the base url to IP of the new instance and also to the localhost:8080. None of them appear to be working.
I did run cache:flush and access rights to various directory (html,var,app,etc,pub,generated) non seems to be working

Please help, your input will be highly appreciated.
Regards.


texts:
How can I add a coupon, Free Shipping if Subtotal greater than or equal $50?

I'm new to Magento.

I'm using v1.7.0.2

Thanks.


texts: add export functionality in custom grid (not ui grid ) Magento2

texts:
I have created a custom admin grid using 2 tables and that is working fine.
This is not a UI grid, but a grid same as Magento 1.

Please suggest me, how can I add a export feature in that.


texts: We have a Magento Site which is online. We want to change the theme. Is there any way to install a new theme, make changes on it, which it is visible only for us, and when it is ready to replace old with the new?


texts: Magento 2: How can I get all product attributes and get the value (Yes/No)

texts:
As caption, I would like get the product attributes as attribute code like 'Label_x' for example 'Label_Hot', 'Label_Big_Sale'
can't create Attributes object with all attribute

I try the code as following:

public function label ($product)
{
$attributes = $product->getAttribute();
        foreach ($attributes as $attribute) {
           if (stristr($attribute, 'label')==true)
            {
            ...........logic..........
         }
     }
}


texts:
I am including the extension Ves MegaMenu in my theme in default.xml.
How can I wrap this within a container?

<referenceBlock name="page.wrapper">
    <block class="Ves\Megamenu\Block\Menu" name="catalog.topnav" after="header.container" template="Ves_Megamenu::topmenu.phtml">
        <arguments>
            <argument name="alias" xsi:type="string">menu-top</argument>
        </arguments>
    </block>
</referenceBlock>

Thank you.


texts: any idea of Dutchento VatFallback module? do i able to get documentation to know the purpose of this module

texts: any idea of the Dutchento VatFallback module? do I able to get documentation to know the purpose of this module


texts: What cookies does Magento CE store by default?

texts:
There is some little info in the manual, but what cookies does Magento CE actually store during a visit?

In other words what does each cookie do?


texts:
I have a fresh Magento 2 install from DigitalOcean which includes Magento 2.4.2 with sample files and the Luma theme. Now when I edit a page (for example "About us") and change a header for example, the Home page still shows the old content.
Question: How to change the file and see the changes?
The strange thing is that some pages seem to work fine. For example when I edit "Privacy Policy", the changes show without any further action.

I am in developer mode:
$ bin/magento deploy:mode:show

Current application mode: developer. (Note: Environment variables may override this value.)

The caches are:
$ bin/magento cache:status
Current status:
                        config: 1
                        layout: 1
                    block_html: 0
                   collections: 1
                    reflection: 1
                        db_ddl: 1
               compiled_config: 1
                           eav: 1
         customer_notification: 1
            config_integration: 1
        config_integration_api: 1
                     full_page: 0
             config_webservice: 1
                     translate: 1
                        vertex: 1

In the admin panel I click on content/pages and select edit from the page:

Then I change the header from "Luma Delivery and Returns" to "Foo Bar":

and save the page.
Then I navigate to the main page of the Magento installation (as a "customer", not "admin") to /customer-service and the change does not show, it still shows the old "Luma Delivery and Returns".
However, when I add ?foobar to the URL to customer-service?foobar, I see the same page but with the changes.

Which other settings do I need do check in order to track this problem down?
Is this due to the varnish cache in front of the site? Since some pages work without problems, I doubt that this is a simple caching problem, but I just don't know.


texts: Magento 1.9 : How to add custom link in account sidebar

texts: How to add custom link in account sidebar magento 1.x, i can't find it in google, all is for magento 2. please help me a example


texts: Adding custom customer attribute to admin panel?

texts:
I am creating a module that will prevent the user from logging in until the admin has approved the account. I have added a custom attribute using the below install script:

<?php

$installer = $this;
$attribute  = array(
    'type' => 'int',
    'input' => 'text',
    'label' => 'Is Active',
    'global' => 1,
    'visible' => 1,
    'default' => '0',
    'required' => 0,
    'user_defined' => 0,
    'used_in_forms' => array(
        'adminhtml_customer',
    ),
    'comment' => 'Flag to check if user can log into their account. 0 = No, 1 = Yes.',
);

$installer->addAttribute('customer', 'can_log_in', $attribute);
$installer->endSetup();

The account listener works and the attribute is being set (I can see it in the database). The problem is, I cannot see it in the admin area (Customers -> Manage Customers -> Edit -> Account Information) to toggle.

How do I get my attribute to appear in the Account Information segment of the edit customer form?


texts: Magento 2.3 - Use product image for swatch (Change color of configurable product)

texts:
I would want to use the main product image for swatch to change the different colors of configurable products. Example:

How can I do this without using any extension?
Thank you so much!


texts: Magento 2: How shipping rest api function called On Checkout?

texts:
When u click on "Ship here" on Checkout Page it calls

magento/rest/default/V1/carts/mine/estimate-shipping-methods-by-address-id

Then it goes to below JS files

magento\vendor\magento\module-checkout\view\frontend\web\js\model\shipping-rate-processor\customer-address.js

magento\vendor\magento\module-checkout\view\frontend\web\js\model\resource-url-manager.js

getUrlForEstimationShippingMethodsByAddressId: function(quote) {
    var params = (this.getCheckoutMethod() == 'guest') ? {quoteId: quote.getQuoteId()} : {};
    var urls = {
        'default': '/carts/mine/estimate-shipping-methods-by-address-id'
    };
    return this.getUrl(urls, params);
}

magento\vendor\magento\module-quote\Model\ShippingMethodManagement.php

 public function estimateByAddressId($cartId, $addressId)
    {
      echo 1;exit;
    }

How above function estimateByAddressId is Called?


texts:
i need to add the orange block on 2 column customer account,

what is the best way to adding that block, if i do from the 2 column left phtml, just scared it will shown at all 2column type, from local xml, but i am not sure about the code

any suggestion will be appreciate, Thanks


texts: PayPal integration, order confirmation not being sent

texts:
I have an issue with the PayPal integration. For quite a while all order confirmation emails were working with no problems. Recently if a customer uses paypal express checkout, they no longer receieve the order confirmation email. If the customer uses a card they get it with no problems. Both payment methods are part of the PayPal Payments Pro integration.

Any help on how to get to the bottom of this would be gratefully appreciated. PayPal have been useless on their support with this, which is a tad worrying.


texts: Magento checkout onepage redirecting to cart on mobile

texts:
I'm facing a weird problem. I'm working on magento mobile theme (1.7). We have a header with a checkout icon pointing to: http://sitename.com/checkout/onepage/

When the user visits the site, a popup is shown for login. When he logins, the page simply reloads and if he has cart items, we show the checkout icon which links to the above given url.

The problem is, for the first time when user clicks the link, it redirects to http://sitename.com/checkout/cart/.

The cart page again has the same link. If the user clicks again on the checkout link, it moves to proper url: http://sitename.com/checkout/onepage/

I'm not able to find why it is moving to the /cart/ url for the first time instead of going to /onepage/. And why it is moving to /onepage/ for any other time.

Please help me on this


texts: Magento Blocks Permission in Admin Dashboard

texts:
I saw this option in store admin of Magento 1.9 by going to System - > Permission -> blocks. The questions are:
- How do I use it?
- I have a third party extension where is displays recently added blogs. I want to move this block to the CMS home page. Will adding the block here allow me to call it from CMS block?
- When adding a new block to this list, how do I know the name of the block?

Note that I am mainly interested in moving some blocks of third party extension to different custom CMS pages.
Another example, I have an extension (ramification extension) wherein some page it displays top users who have purchased most from the store. It currently displays it on some page of the extension and wants to display the same on the home page. How do I know the block name, and make use of store admin to be able to call it in static blocks or CMS page?


texts: How to get all the system configuration values in magento 2?

texts:
I need to get all the fields and values from

  Stores -> Configuration -> General


texts: I want to get the page title in a PHTML template file. Is there a global function I can call to retrieve this?


texts: Magento 2: How to put default value in yes/no field of admin UI component form

texts:
I have a UI component Form checkbox. I want it to default to yes rather than no.

This is my Field

<field name="status">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="component" xsi:type="string">Magento_Ui/js/form/element/single-checkbox-toggle-notice</item>
                <item name="dataType" xsi:type="string">boolean</item>
                <item name="formElement" xsi:type="string">checkbox</item>
                <item name="source" xsi:type="string">template</item>
                <item name="prefer" xsi:type="string">toggle</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 name="label" xsi:type="string" translate="true">Please confirm you wish to proceed ?</item>
            </item>
        </argument>


texts: Shipment Email Template issue Magento 2.3.1

texts:
I am using Magento 2.3.1 CE.
My English is not perfect sorry.
Admin > Marketing > Email Templates > Shipment Email Template
When I click preview template, I see this error.

  Fatal error: Uncaught Error: Call to a member function getTracksCollection() on null in /var/www/html/var/view_preprocessed/pub/static/vendor/magento/module-sales/view/frontend/templates/email/shipment/track.phtml:1

I added a picture. https://prnt.sc/nyyeei


texts: How to change sequence of attributes of review posted on page magento 2

texts:
I want to change sequence of attributes of review . like I want to change position of stars and user name etc like in given picture.
  and I want the postions of posted attributes likes  . where I can change it and how small clue of it ?


texts: Configuration->General Settings keep getting cleared. In core_config_data table path 'genera' value 0 keeps appearing

texts:
This just started happening recently in our development environment. The row

  id default 0 general 0

keeps getting inserted into core_config_data. Every time I delete it manually via sql, it comes back as if its from some cron job.

So the point is that when this row is in the database, my entire General tab under system->configuration is cleared/reset/blank/deselected. (this messes up the frontend also where all the countries disappear from drop down.)

This is driving me crazy, how can I pinpoint what is causing this entry to keep reappearing? Could it be from a rogue cron job, config.xml, or setup installer sql?

*Update: I believe the SQL query causing this is:

  INSERT INTO core_config_data (value) VALUES ('0')

Found that query while searching logs for all queries being run.

Magento version 1.9.1.0


texts: How to get cartId of a guest-user in Magento 2.3?

texts:
I want to use external software (widget written in javascript attached to Magento) to add products to cart through API (POST request @ /rest/V1/guest-carts/{cartId}/items).

For this, I need cartId for guest-user (non authenticated user). I tried to make a POST request to

/rest/V1/guest-carts

but this request creates new cart, but I need to get current cartId of visitor somehow. Any ideas?


texts: Magento custom module rewrite url problem

texts:
I created a custom module for news. I need to change url structure for detail page.

My current news detail page url something like this

www.domain.com/news/detail/?id=4

I need following url
www.domain.com/news/detail/id/4/
or
www.domain.com/news/id/4/


texts: How to add css only for checkout page of rwd theme in Magento 1.9.0

texts:
I need to add a custom css in checkout.xml file like this

<checkout_cart_index translate="label">
    <reference name="head">

    <action method="addCss">
                <stylesheet>css/new.css</stylesheet>
            </action>
    </reference>
</checkout_cart_index>

and its not working.
I have changed my theme like this

I have created local.xml file at \app\design\frontend\rwd\default\layout\local.xml

I am thinking that local.xml file is not loading.


texts: SQLSTATE[42000]: Syntax error or access violation: 1235 This version of MySQL doesn't yet support Magento 2

texts:
I am facing below error while run setup upgrade commands.

  SQLSTATE[42000]: Syntax error or access violation: 1235 This version
  of MySQL doesn't yet support 'multiple triggers with the same action
  time and event for one table', query was: CREATE TRIGGER
  trg_cataloginventory_stock_item_after_insert AFTER INSERT ON
  cataloginventory_stock_item FOR EACH ROW BEGIN INSERT IGNORE INTO
  catalog_product_price_cl (entity_id) VALUES (NEW.product_id);
  INSERT IGNORE INTO catalogsearch_fulltext_cl (entity_id) VALUES
  (NEW.product_id); END

Anyone know about this issue. Please revert here.

Thanks in Advance.


texts: core_email_queue_send_all - not beig queued

texts:
I'm dealing problems with order confirmation emails in my website. I'm using SMTP pro and have set custom smtp method to send emails. It works fine if I choose to send these emails immidiatelly. If I choose to queue these emails and send them via cron job, it's not working.

I noticed that "core_email_queue_send_all" is stuck in running proccess, never finishes execution, causing all other crons to get stuck as well. (displays Runtime:-419985h -5m -4s). I tried deleting all crons queued but as soon as "core_email_queue_send_all" is starting to run, it gets stuck again etc. etc.

Any ideas of what may be the cause of this issue?


texts: How to get the array of size and quantity as a value in magento from product collection?

texts:
I am quite a new to magento, but trying hard to learn it and know all it models and collections.
I had a requirement to get the size of all the simple products and its quantity. We do have the size attribute set and many product are of type configurable and we are displaying that on the list page as well.

Configurable product do have the quantity and size as it is associates all the simple products.

Now i am really curious to know the stock in this format.

stock ={
"size" => "quantity"
 }

where size is the attribute and it can be x,xl,xs,xxl,xxxl and so on. and quantity is the quantity which is in stock for that particular size.

What i have tried uptill now is to get the name,id,sku,product url, images url and category id as well.

$collection = Mage::getModel('catalog/product')->getCollection()
->addAttributeToSelect('*');
// set the offset (useful for pagination)

// we iterate through the list of products to get attribute values
foreach ($collection as $product) {
  echo $product->getName(); //get name of the product
  echo "
";
  echo (float) $product->getPrice(); //get price as cast to float
   echo "
";
  echo $product->getDescription(); //get description
   echo "
";

   echo $product->getSku(); //get sku
   echo "
";
echo (int)Mage::getModel('cataloginventory/stock_item')
                ->loadByProduct($product)->getQty(); //get the qty of the product
   echo "
";

  // getCategoryIds(); returns an array of category IDs associated with the product
  foreach ($product->getCategoryIds() as $category_id) {
      $category = Mage::getModel('catalog/category')->load($category_id);
       echo "
";
 echo $category->getName(); //get name of the category && sub-category
       echo "
";
  }
  echo '
';

  //gets the image url of the product

             //var_dump($product->getMediaGalleryImages());
echo "
";
  echo $product->getProductUrl();  //gets the product url
  echo '
';
echo $product->getSize();
  echo '
';
$product1 = Mage::getModel('catalog/product')->load($product->getID())->getMediaGalleryImages();//product

$items = array();

foreach($product1 as $gimage) {
    $items[] = $gimage['url'];
}
$t = implode(',', $items);

echo $t;

echo "
";
}

Now, how will i be able to fetch the quantity and size in the format mentioned above foreach product using the above collection ??


texts:
I want to include yahoo.js and yahoo-calendar.min.js from my custom module

yahoo.js

yahoo-calendar.min.js

basically i need to call the function from yahoo-calendar.min.js which require yahoo.js file, i tried to include it like this using requirejs-config.js from my custom module:

var config = {
    "map": {
        "*": {
            YAHOO: 'Vendor_Module::js/yahoo-calendar.min'
        }
    }
};

i'm gonna use YAHOO as the alias , but i don't know where to put the yahoo.js file

the usage will be like this:

YAHOO.namespace("example.calendar");
                    YAHOO.example.calendar.init = function() {
                        YAHOO.example.calendar.cal1 = new YAHOO.widget.Calendar("cal1",'container-id');
                        YAHOO.example.calendar.cal1.render();
                    }

                    YAHOO.util.Event.onDOMReady(YAHOO.example.calendar.init);


texts:
I need a solution for showing a different store view to different customer group.

For example:

  Store view 1 must be displayed to the Customer Group 1 and  Store view
  2 must be displayed to the Customer Group 2

Is there any way to do that? I've looked for any kind of solution or plugin but I cannot find anything useful.
Hope somebody can help me. Cheers!

Magento 2.3


texts: Commerce Edition - Website Restrictions Enabled and robots.txt

texts:
Is it expected functionality that a website with restriction mode set to "Website Closed" will cause the router to exceed it's 100 loop limit when trying to reach /robots.txt?
I'm seeing this routing error periodically in logs with regards to a specific site which is in "Website Closed" mode and the requested path being /robots.txt. I get that "Website Closed" should not allow any access; however, shouldn't it still return a robots.txt of NOINDEX,NOFOLLOW (or just be blank)?


texts:
I am using magento 1.7 community edition is there is any way to restrict user's
in publishing products in some specific categories.


texts:
Im using a magento 2.3 recently migrated from magento 1.9.3.

I installed a theme in it (argento theme) and installed a pt_BR translation pack by composer (https://github.com/rafaelstz/traducao_magento2_pt_br/)

The problem is that a few stuff in my website were translated and other stuff were not. For example: In product page there is DETAILS (untranslated) and Avaliações (translated). In home page there is SHOP SALE untranslated.

I tried to add the remaining untranslated stuff in pt_BR.csv (/web-site/vendor/rafaelstz/traducao_magento2_pt_br) and it doesn't work.

I tried to add in app/design/frontend/magento but the folder is empty;

i tried to create a folder app/i18n/ and scan for words and it didn't worked;

I tried entering folder: /mage2.abaraujo.com/pub/static/frontend/Swissup/argento-pure2/pt_BR and entering respective extensions and change. It doesn't worked.

What should i do?

Thanks
Lucas


texts: Magento 2 REST API need only then needed custom_attribute rather getting all

texts:
On Magento 2 REST API I need to get an only a specific field for the sake of speed issue,

but now I can get a specific field like name, SKU, status, etc. But for the custom attribute, it get all the field.

But for custom, I can get a specific field rather getting all the field.

Currently, I am using this URL to get the response,

$ch = curl_init($storeURL."rest/V1/products?fields=items[sku,name,custom_attributes]&searchCriteria[pageSize]=10");

Now I can get that?


texts: Magento2 MySQL Recommeded Configurations

texts: I was looking for the best practices and recommended configuration settings for configuring a MySQL server for hosting a Magento2 Application.


texts: Magento 2 Invalid block type Magento\Catalog\Block\Crosssellproduct

texts:
Magento 2.2.6 - Apache - Nginx

I am getting this error when trying to open product pages on my site

  2 exception(s): Exception #0
  (Magento\Framework\Exception\LocalizedException): Invalid block type:
  Magento\Catalog\Block\Crosssellproduct Exception #1
  (ReflectionException): Class Magento\Catalog\Block\Crosssellproduct does not exist

This site was working previously but some changes to either server or site files are causing this to happen.

Also is it possible this error is showing for something unrelated as I have read on other similar posts for this error?


texts: Products in Magento DB but not Magento Admin

texts: I created a script that imports simple products programatically. However, it appears 49 products are stuck in "limbo." They appear in the DB table "catalog_product_entity" but not within Magento's Admin Panel. Should I truncate this table? Are there any other tables I should truncate?


texts:
I have an odd issue where suddenly on my 1.9.3 Magento Community production server the grid items for the Admin > System > Cache Management have disappeared.   The same code displays the items fine on my dev and test server.  No errors (or warning) are logged if I turn on developer mode with notices enabled.

See the attached image.

Any ideas?


texts:
I made a custom module that creates a model which can be associated to products. There are 2 tables:

Model (for simplify, it only has an id, name and img)
ModelProduct (id, id_model, id_product)

I have this, and it works fine for my purposes.

Now it has to be multilingual, in particular I only need that the name of the Model be in every storeView. So how can I do it?

The first thought is add another column in model store_id but then I will have to save the same association for every storeView, because the same Model translated for every storeView will have differents id.

So I didn't know how to do next, these solutions came to me:

I can add another column on the Model like model_id and save the same if for every storeView, and in ModelProduct save that model_id instead of id.
Add storeView on ModelProduct and add a row for every storeView with the same association.

But I don't know if there is a better way to do these kind of things. I think is a recurring problem, working with storeViews.


texts: Buy a single product from bundle product

texts:
I have a set of Virtual products in a bundle product, Is there any way to make each of virtual products buy separately in Magento.

How to edit view of product list in a bundle?

I am new in Magento,I know only basics of Magento


texts: Magento 1.9.3.8 problem with folders permission

texts:
I have magento installed in a cloud server and folder public_html/.
Some days ago because the permissions of the files was a messed up I used Magento's instruction's to set permissions from the beginning:

find . -type f -exec chmod 400 {} +
find . -type d -exec chmod 500 {} +
find var/ -type f -exec chmod 600 {} +
find media/ -type f -exec chmod 600 {} +
find var/ -type d -exec chmod 700 {} +
find media/ -type d -exec chmod 700 {} +

I've done this logged in with ssh with root user. Site is working but all magento cron jobs are not.

Server is using Nginx as:

  user:www-data

Magento is installed with:

  user:wpaper

All files and subfolders now in public_html/ are:

  owner:www-data & group:wpaper

Both user wpaper and user www-data are in the same groups.
Groups are wpaper and www-data.
What am I doing wrong please?


texts:
Probably due to errors during reindexing, our store got really slow. Reindexing didn't solve it. I activated query log to identify which ones take are slower.

Following is one of them. How could I possibly repair this mess?

  SQL: SELECT e.*, core_url_rewrite.request_path,
  IF(at_is_active.value_id > 0, at_is_active.value,
  at_is_active_default.value) AS is_active FROM
  catalog_category_entity AS e  LEFT JOIN core_url_rewrite ON
  (core_url_rewrite.category_id=e.entity_id) AND
  (core_url_rewrite.is_system=1 AND core_url_rewrite.store_id='2' AND
  core_url_rewrite.id_path LIKE 'category/%')  INNER JOIN
  catalog_category_entity_int AS at_is_active_default ON
  (at_is_active_default.entity_id = e.entity_id) AND
  (at_is_active_default.attribute_id = '42') AND
  at_is_active_default.store_id = 0  LEFT JOIN
  catalog_category_entity_int AS at_is_active ON
  (at_is_active.entity_id = e.entity_id) AND
  (at_is_active.attribute_id = '42') AND (at_is_active.store_id
  = 2) WHERE (e.entity_type_id = '3') AND (IF(at_is_active.value_id > 0, at_is_active.value, at_is_active_default.value) = '1') AND (e.entity_id IN('4', '5', '6', '7', '9', '56', '66', '93', '94',
  '95', '103', '110', '111', '313', '314', '452')) ORDER BY
  e.position ASC

AFF: 16

TIME: 25.8226


texts: Running a custom Magento script with CLI ( OOP approach )

texts:
My programming background is in different languages so I am tackling php and magento and learning as I go.  so this may be a php question more than magento , but it would be good to know how people write scripts like this.

require_once '../../../app/Mage.php';

Mage::setIsDeveloperMode(true);
ini_set('display_errors', 1);
umask(0);
Mage::app('admin');
$newStoreId = Mage_Core_Model_App::ADMIN_STORE_ID;
Mage::app()->setCurrentStore(Mage::getModel('core/store')->load(newStoreId));

class myClass
{

    public function doStuff(){
        $installer = Mage::getResourceModel('catalog/setup', 'catalog_setup');
        var_dump($this->installer);
//etc..
}

$obj = new myClass();
$obj-> doStuff();

$this->installer  is always null.  I have tried all sorts of different variations.  I don't want $installer to have any initial value , but I have tried declaring as a public variable.

How can I set this value ( $installer )  inside the class and have access to it inside the class?

I feel like I am fundamentally missing something.

Thanks for your time.


texts: My Downloadable Products Error, The link is not available

texts:
Using MCE 2.3.1 and all products are downloadable.  After a purchase, the customer is sent an Email verifying the purchase and it has a link back to their My Downloadable Products.   When the link is pressed, it goes to their My Downloadable Products page with a list of the purchases and the error "The link is not Available".
Also the individual download links next to each product are missing.   It shows the items Pending, but the 2.3 User Guide, p223 indicates Pending or Invoiced state is good for delivery.   I have checked the server location for files and permissions.   Number of downloads is 3 and it shows 3 downloads are available.

Please help as my website is down, unable to deliver product.
Thanks
Bob


texts:
When i try to place order using paypal payments method i got error like this
paypal gateway has rejected request . Invalid token (# 10410 invalid token).
i have double checked by backend credential. there is no problem. How to resolve this.


texts: How to get all simple product which does not have configurable product

texts:
i want collection of those product which remain as simple product.

in other world i got all simple product which is include in configurable now i just want those product which does not included in configurable and still alone.


texts: Remove My Tags from sidebar in my account page

texts:
I want to remove My Tags link from sidebar in my account page without changing in base files.

How can I do it?


texts: Magento 2 Plugin Not Extending Model - Finally Solved It

texts:
I'm trying to use a plugin from the answer on this question

Add additional select attributes to grouped product's child collection

I would go back and ask the person who answered but I don't have a high enough reputation score yet to add comments.

I don't use composer, so have gone the old route of app/code.

My plugin looks like this

<?php
namespace mynamespace\Plugingrouped\Plugin;
use \Magento\Catalog\Model\ResourceModel\Product\Link\Product\Collection;
use \Magento\GroupedProduct\Model\Product\Type\Grouped as TypeGrouped;
class Grouped
{
public function afterGetAssociatedProductCollection(TypeGrouped $subject, Collection $result)
{
$result->addAttributeToSelect('my_attribute_weight');
$result->addAttributeToSelect('my_attribute_height');
return $result;
}
}
?>

I've added the plugin code as Grouped.php into a folder
app/code/mynamespace/Plugingrouped/Plugin

My di.xml file in my module looks like this

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\GroupedProduct\Model\Product\Type">
    <plugin name="Grouped" type="Mynamespace\Plugingrouped\Plugin\Grouped" />
</type>

And then I tried calling a custom attribute in

app/design/frontend/Mynamespace/base/Magento_GroupedProduct/templates/product/view/type/grouped.html

<?= $block->escapeHtml($_item->getName()) ?>
                Weight : <?php echo $_item->getmy_attribute_height() ?>

To add custom attributes into the grouped product grid.

However, they don't render, I don't get an error, but I can't figure out how to make sure the plugin is working.


texts: Magento 2: What's the difference between Store and Group?

texts:
I want to create a Store programatically, but if it already exists, then return the existing store. So far my code looks like this:
private function _getStore($website, $storeName, $storeCode)
{
    try {
        if ($store = $this->storeRepository->get($storeCode)) {
            $groupId = $store->getStoreGroupId();
            return $this->groupRepository->get($groupId);
        }
    } catch (\Exception $e) {}

    if ($website->getId() && !empty($storeName) && !empty($storeCode)) {
        /** @var \Magento\Store\Model\Group $group */
        $group = $this->groupFactory->create();
        $group->setWebsiteId($website->getWebsiteId());
        $group->setName($storeName);
        $group->setCode($storeCode);
        $this->groupResourceModel->save($group);
        return $group;
    }
    return null;
}

When I create the store for the first time with the store code my_store it works fine; I can see that it is logged in store_group table.
The second time I run it I am expecting it to give me the store thanks to $this->storeRepository->get($storeCode) but it doesn't find the store... I know this because if I remove the try/catch it will return an exception:
The store that was requested wasn't found. Verify the store and try again.
So how would I check if the store already exists by code?
Can someone please explain the difference between store and group?


texts: how to compile or rebuild particular theme in magento2

texts:
whenever I bin\magento setup:static-content:deploy it will create all theme or compile all theme

but in my case I need to recompile or rebuild my specific theme in that case how to do it in magento2?


texts:
I found this code at Multishipping.php, but i dont know what the function, is save() function is saving the order?

Multishipping.php :

$order->place();
$order->save();

And how could i save an order to database 2 times?


texts: Magento 2 - Install Mirasvit Profiler (Missing symfony/yaml)

texts:
I am running Magento 2.2.6 and it's a slow instance so I wanted to try out the Mirasvit profiler. However, when I try to enable it, I get an error about yaml not being installed. I dug through the issues on github (https://github.com/mirasvit/module-profiler/issues) and on this issue (https://github.com/mirasvit/module-profiler/issues/36), I found a suggestion of using the dev-master branch of the profiler.

I tried that, and got this:
Problem 1
- Installation request for mirasvit/module-profiler dev-master -> satisfiable by mirasvit/module-profiler[dev-master].
- mirasvit/module-profiler dev-master requires symfony/yaml dev-issue-8145 -> satisfiable by symfony/yaml[dev-issue-8145] but these conflict with your requirements or minimum-stability.

If I try to run composer require symfony/yaml, I get symfony/yaml v3.4.0 conflicts with symfony/console[v2.8.*]. I tried installing yaml:2.8.49 and got this result:
  Problem 1
    - symfony/yaml v2.8.49 conflicts with symfony/dependency-injection[v3.4.20].
    - symfony/yaml v2.8.49 conflicts with symfony/dependency-injection[v3.4.20].
    - symfony/yaml v2.8.49 conflicts with symfony/dependency-injection[v3.4.20].
    - Installation request for symfony/yaml 2.8.49 -> satisfiable by symfony/yaml[v2.8.49].
    - Installation request for symfony/dependency-injection (locked at v3.4.20) -> satisfiable by symfony/dependency-injection[v3.4.20].

I've cleared the composer cache, run composer update to update existing components and cleared Magento caches and generated files, to no avail.

How do I get this profiler working? Failing that, is there another Magento 2 profiler that I can use that's comparable to Mirasvit?


texts:
Where should I put the custom .css file for my custom block/phtml.

When I want to customize the display of my block then I have to create a custom .css for that. But where do I have to put that .css file and how do I have to call it so my block would know to use that .css.


texts: Magento 2: Image Processing Settings - GD2 V/s ImageMagick

texts:
Go to Admin -> Stores -> Configuration -> Advanced -> Developer -> Image Processing Settings

By default, it's PHP GD2.

We need to use ImageMagick or GD2?
Is there more benefit of ImageMagick over GD2?
What is recommended?

https://github.com/magento/magento2/issues/7690


texts: Issues with elasticsearch installation Magento 2.3.1

texts:
I am trying to install and enable elasticsearch.
I have successfully done the below command
Sudo apt-get install elasticsearch
When I started the service of elasticsearch it's successfully Working.
I am stuck when I execute curl localhost:9300. https://prnt.sc/nu9zx5

It's showing some connection refused error.
Then I tried to install some additional plugins https://prnt.sc/nua06d
at
/usr/share/elasticsearch> bin/elasticsearch-plugin install pluginName

But it shows me "elasticsearch-plugin" no file or directory found.
I have checked but no such file reside in elasticsearch/bin folder.

I  following this video link https://www.youtube.com/watch?v=ES3XIzWiffo
I have ubuntu 16.04 and Magento 2.3.1 and PHP 7.2


texts: Magento 2.3: Write unit test for Observer

texts:
I am writing a unit test for an observer invoking sales_order_place_after event.

SendOrderToVenuePay  Observer

class SendOrderToVenuePay implements \Magento\Framework\Event\ObserverInterface
{
    public function __construct(
        \Sample\Module\Helper\Credit\Config $helperCreditConfig,
        \Sample\Module\Helper\Credit $helperCredit,
        \Magento\Customer\Helper\Session\CurrentCustomer $currentCustomer,
        \Sample\Module\Api\CreditManagementInterface $creditManagement
    ) {
        $this->helperCreditConfig = $helperCreditConfig;
        $this->helperCredit = $helperCredit;
        $this->currentCustomer = $currentCustomer;
        $this->creditManagement = $creditManagement;
    }

    /**
     * @param \Magento\Framework\Event\Observer $observer
     */
    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $order = $observer->getEvent()->getOrder();
        if ($this->currentCustomer->getCustomerId()) {
            // do some good stuff with order
        }
    }
}

SampleObserverTest

class SampleObserverTest extends \PHPUnit\Framework\TestCase
{
    public function setUp()
    {
        $objectManager = new ObjectManager($this);

        $this->helperCreditConfigMock = $this->createMock('\Sample\Module\Helper\Credit\Config');

        $this->helperCreditMock = $this->createMock('\Sample\Module\Helper\Credit');

        $this->currentCustomerMock = $this->getMockBuilder('\Magento\Customer\Helper\Session\CurrentCustomer')
            ->disableOriginalConstructor()
            ->setMethods(['getCustomerId'])
            ->getMock();

        $this->creditManagementMock = $this->createMock('\Sample\Module\Api\CreditManagementInterface');

        $this->sendOrderToVenuePay = $objectManager->getObject(
            'Sample\Module\Observer\SendOrderToVenuePay',
            [
                'helperCreditConfig' => $this->helperCreditConfigMock,
                'helperCredit' => $this->helperCreditMock,
                'currentCustomer' => $this->currentCustomerMock,
                'creditManagement' => $this->creditManagementMock
            ]
        );
    }

    public function testExecute()
    {
        $this->eventMock = $this->createPartialMock(
            \Magento\Framework\Event::class,
            ['getOrder']
        );
        $this->eventObserverMock = $this->createMock(
            \Magento\Framework\Event\Observer::class
        );
        $this->eventObserverMock
            ->expects($this->any())
            ->method('getEvent')
            ->willReturn($this->eventMock);

        $this->eventMock
            ->expects($this->atLeastOnce())
            ->method('getOrder')
            ->willReturn($this->returnSelf());

        $this->currentCustomerMock
            ->expects($this->atLeastOnce())
            ->method("getCustomerId")
            ->willReturn($this->any());
    }
}

Following block of code

$this->currentCustomerMock
    ->expects($this->atLeastOnce())
    ->method("getCustomerId")
    ->willReturn($this->any());

throws

1) Sample\Module\Test\Observer\SampleObserverTest::testExecute
Expectation failed for method name is equal to "getCustomerId" when invoked at least once.
Expected invocation at least once but it never occurred.

and following block of code

$this->eventMock
    ->expects($this->atLeastOnce())
    ->method('getOrder')
    ->willReturn($this->returnSelf());

throws

1) Sample\Module\Test\Observer\SampleObserverTest::testExecute
Expectation failed for method name is equal to "getOrder" when invoked at least once.
Expected invocation at least once but it never occurred.

Please help what I am doing wrong? Since I am new to PHPUnit I am unable to figure it out.


texts: Magento 1.9.2.4 patch SUPEE-8788 malformed patch at line 5790

texts:
I want to apply the new SUPEE-8788 patch.

But when bash the patch trough SSH, I get the following error:

Checking if patch can be applied/reverted successfully...
/bin/patch: **** malformed patch at line 5790: ?rM]M??????&X㔮??v??Q;r?N?qJ??Y???I0?Y??4??'?????9?.??X?Ǒ?{??ax!G???I???q?u|????թ??????|
                                                       h??o?V@??|? ?g?H aꪭ??Ю???,I"?ğ????.??    yI?I\????)?X?
                             ?p???*?e?q?K8<DqD?H;|?
ERROR: Patch can't be applied/reverted successfully.

How can I solve this?


texts: Magento 2: Make category field required in product form in backend

texts:
I want to make the category field required for product form in the backend.

I have tried to add the required class in the block class, but nothing happened.

Since the category field is not an input or dropdown field, I am not able to figure out how can I make it required.

Can anyone help me to achieve this?


texts: Setup Delivery Module in Magento Admin Panel

texts:
I would like to know..., what is the Module name for magento admin panel, that support with DHL, UPS, Fedex and other international Courrier?

The Free One :)

Thank you...


texts: Country not dispalyed in grid after overriding grid customer magento 2

texts:
I have overrided the grid customer I can see all the value of attributes except the country I don't know why this behavior this is a part of grid code:

<column name="billing_country_id" component="Magento_Ui/js/grid/columns/select" sortOrder="80">
            <settings>
                <filter>select</filter>
                <dataType>select</dataType>
                <label translate="true">Country</label>
            </settings>
        </column>

and this is a part of the code of the di.xml

<virtualType name="Magento\Customer\Model\ResourceModel\Collection" type="Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult">
    <arguments>
        <argument name="mainTable" xsi:type="string">customer_grid_flat</argument>
        <argument name="resourceModel" xsi:type="string">Magento\Customer\Model\ResourceModel\Customer</argument>
    </arguments>
</virtualType>

and this is a screenshot of the result:


texts:
how can i add a css class eg.: class="myClass" to an item on checkout xml?

for example

<item name="after-place-agreements" xsi:type="array">
    <item name="component" xsi:type="string">uiComponent</item>
    <item name="displayArea" xsi:type="string">after-place-agreements</item>
    <item name="dataScope" xsi:type="string">before-place-order</item>
    <item name="provider" xsi:type="string">checkoutProvider</item>
    <item name="config" xsi:type="array">
        <item name="template" xsi:type="string">Magento_Checkout/payment/before-place-order</item>
    </item>
    <item name="children" xsi:type="array">
        <item name="agreementss" xsi:type="array">
            <item name="component" xsi:type="string">Magento_CheckoutAgreements/js/view/checkout-agreements</item>
            <item name="sortOrder" xsi:type="string">100</item>
            <item name="displayArea" xsi:type="string">after-place-agreements</item>
            <item name="dataScope" xsi:type="string">checkoutAgreements</item>
            <item name="provider" xsi:type="string">checkoutProvider</item>
        </item>
    </item>
</item>