texts:
I've just made a fresh installation of Magento 2 (Magento ver. 0.42.0-beta7). I've noticed that in the backend, the top navigation menu is not working (Sales, Products, Customers). Also when I try to switch the store view, I get a good number of javascript errors as follows:

I saw this behavior on both Chrome and Firefox.

Also, if I go to my Magento installation and go to pub/static/adminhtml/Magento/backend/en_US, I don't find the jquery folder. That explains the 404 errors for the javascript files.

Has anyone met this problem?

Thanks,


texts: mage::getModel('module/model')->getData returns an empty array

texts:
I am trying to pull data from a table. To do this I have used

mage::getModel('module/model')->getData

this has returned an empty array, but i can't work out why as the table i am calling holds data.

There is a discrepancy between this model

class Ps_Prefs_Model_Prefsformelements
extends Mage_Core_Model_Abstract
{
protected function _construct()
{
    $this->_init('ps_prefs/prefsformelements');
}

}

class Ps_Prefs_Model_Resource_Prefsformelements
extends Mage_Core_Model_Resource_Db_Abstract
{
protected function _construct()
{
    $this->_init('ps_prefs/prefsformelements', 'idform_elements');
}
}

class Ps_Prefs_Model_Resource_Prefsformelements_Collection
extends Mage_Core_Model_Resource_Db_Collection_Abstract
{
protected function _construct()
{
    $this->_init('ps_prefs/prefsformelements');
}
}

and other models in my module. That descripency lies in the namespace_module/... part of the call. as you can see this model uses namespace_module/... while my other models work fine with just module/... I have tried run the above code using just module/... but I get the error can't retrieve entity config but if I try to run the other using this namespace_module/... I start throwing errors why?

I had considered my config but if that is the case why am I not getting errors when I use namespace_module/... and why wont it work when I make it conform to the other models?

===

EDIT

===

<config>
...
  <global>
    <models>
        <prefs>
            <class>Ps_Prefs_Model</class>
            <resourceModel>prefs_resource</resourceModel>
        </prefs>

        <prefs_resource>
            <class>Ps_Prefs_Model_Resource</class>
            <entities>
                <prefs>

prefcentre

                </prefs>
                <prefsemail>

prefcentre_options

                </prefsemail>
                <prefsform>

pref_form_elements

                </prefsform>
            </entities>
        </prefs_resource>
    </models>
  ...
</global>
...
</config>


texts: upgrade magento 2.3.2 to 2.3.3 give zendframework/zend-stdlib error

texts:
upgrade Magento 2.3.2 to 2.3.3  give zendframework/zend-stdlib error.

  Your requirements could not be resolved to an installable set of packages.
  Problem 1
   - magento/product-community-edition 2.3.3 requires zendframework/zend-stdlib ^3.2.1 -> satisfiable by zendframework/zend-stdlib[3.2.1, 3.3.x-dev, 3.2.x-dev] but these conflict with your requirements or minimum-stability.
   - magento/product-community-edition 2.3.3 requires zendframework/zend-stdlib ^3.2.1 -> satisfiable by zendframework/zend-stdlib[3.2.1, 3.3.x-dev, 3.2.x-dev] but these conflict with your requirements or minimum-stability.
   - Installation request for magento/product-community-edition 2.3.3 -> satisfiable by magento/product-community-edition[2.3.3].
  Installation failed, reverting ./composer.json to its original content.

composer require zendframework/zend-stdlib ^3.2.1

Your requirements could not be resolved to an installable set of packages.

  Problem 1
      - magento/framework 102.0.2 requires zendframework/zend-stdlib ^2.7.7 -> satisfiable by zendframework/zend-stdlib[2.7.7, 2.7.x-dev]
  but these conflict with your requirements or minimum-stability.
      - magento/framework 102.0.2 requires zendframework/zend-stdlib ^2.7.7 -> satisfiable by zendframework/zend-stdlib[2.7.7, 2.7.x-dev]
  but these conflict with your requirements or minimum-stability.
      - magento/framework 102.0.2 requires zendframework/zend-stdlib ^2.7.7 -> satisfiable by zendframework/zend-stdlib[2.7.7, 2.7.x-dev]
  but these conflict with your requirements or minimum-stability.
      - magento/framework 102.0.2 requires zendframework/zend-stdlib ^2.7.7 -> satisfiable by zendframework/zend-stdlib[2.7.7, 2.7.x-dev]
  but these conflict with your requirements or minimum-stability.
      - Installation request for magento/framework 102.0.2 -> satisfiable by magento/framework[102.0.2].

Installation failed, reverting ./composer.json to its original content.

PHP version: 7.2.20


texts: How to stash a single untracked file out of a group of hundreds of both modified and untracked files in the git?

texts: I did an upgrade to Magento 2.3.5 resulting in hundreds of files being modified while some were newly added. I added another untracked file not related to the upgrade in anyway, and know exactly what the file name is. Is there a git command or something to stash this particular untracked file by mentioning only the file name that I want stashed? I know this files resides on the file system.


texts: How to find the last time the database was used by a live magento site

texts:
So here's the deal.
I have 5 magento databases made a couple of months ago when I upgraded magento from 1.8.0 to 1.9.2.4

Now I need to archive these database (for backup purposes) according to their versions and last used since I made a couple of copies.
I totally forgot to label any of these databases as to what their magento versions are or when I managed to download them.

I can tell that one has to be the 1.9.2.4 version since it has no content yet but the other are 1.8 and I have no idea which was the original or which was the one I was going to upgrade to magento 1.9.2.4

What tables do I look at to check the last usage of the database?


texts: Magento 2 - Override template files in module

texts:
What is the correct way to override a template file ? I need to display custom text in place of In Stock and Price on the product page.

I want to override the template -

  Magento_Catalog/view/frontend/templates/product/view/type/default.phtml for In stock.

However, I cannot figure what would be the correct XML for it.

I've tried -

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

        <referenceBlock name="product.info.type">
            <block class="Magento\Catalog\Block\Product\View\Type\Simple" name="product.info.simple" as="product_type_data" template="Vendor_Module::product/view/type/default.phtml" />
        </referenceBlock>

</page>

I can't find out which file should be overridden to change the text for price.

I would really appreciate it if you could explain how to write the XML file for overriding templates.

UPDATED catalog_product_view.xml -

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

    <referenceContainer name="product.info.type">
        <block class="Magento\Catalog\Block\Product\View\Type\Simple" name="product.info.simple" as="product_type_data" template="Vendor_Module::product/view/type/default.phtml"/>
    </referenceContainer>

</page>

Vendor/Module/view/templates/product/view/type/default.phtml -

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

// @codingStandardsIgnoreFile

?>
<?php /* @var $block \Magento\Catalog\Block\Product\View\AbstractView */?>
<?php $_product = $block->getProduct() ?>

<?php if ($block->displayProductStockStatus()): ?>
    <?php if ($_product->isAvailable()): ?>
        <div class="stock available" title="<?= /* @escapeNotVerified */ __('Availability') ?>">
            <?= /* @escapeNotVerified */ __('In stock with static text') ?>

    <?php else: ?>
        <div class="stock unavailable" title="<?= /* @escapeNotVerified */ __('Availability') ?>">
            <?= /* @escapeNotVerified */ __('Out of stock') ?>

    <?php endif; ?>
<?php endif; ?>


texts: Display Discounted Price in the Product view

texts:
<?php
  $priceModel = $block->getPriceType('regular_price');
  $finalPriceModel = $block->getPriceType('final_price');
  $idSuffix = $block->getIdSuffix() ? $block->getIdSuffix() : '';
  $schema = ($block->getZone() == 'item_view') ? true : false;
  $valor = $_product->getResource()->getPrice('special_price')->getFrontend()->getValue($_product);
  $total = $_product->getFinalPrice();
  $percent = $_product->getResource()->getAttribute('desconto')->getFrontend()->getValue($_product);
  $discount_value = ($total / 100) * $percent;
  $final_price = $total - $discount_value;
?>

Can anybody help me? I'm converting a module from Magento 1 to 2. I put this section to show a price in the product view with a 10% discount in case the customer wants to pay in advance. This value of 10 is taken from a custom product attribute so that when I want to offer 15 I enter the product and make the change. But my codex is giving an error on line 5 Undefined variable. I've already made some changes but none of them worked and I can't display them on the frontend.


texts: Magento 2 : Custom online shipping method with shipping API

texts:
I am having a custom shipping API which I want to integrate with Magento version 2.2.x

Is there anyone having some knowledge how to create an online shipping method, how to call the custom API to generate the shipping cost and set dynamically, how to create a shipping?

Please help!


texts: Adding an Email Confirmation to the Registration page

texts:
So I've been trying to add "Confirm Email" field to my registration page.

I'm using these two pages as references:
http://magentopaper.blogspot.com/2011/09/how-to-add-confirmation-email-field-in.html
http://edmondscommerce.github.io/magento/adding-confirm-e-mail-address-field-to-magento-frontend-forms.html

However for some reason, I can't get it to show up.

I've added this to customer.xml

<action method="addJs"></action>

This to validation.js

['validate-cemail', 'Please make sure your emails match.', function(v) {
  var conf = $$('.validate-cemail')[0];
  var pass = false;
     if ($('email')) {
     pass = $('email');
 }
  var emailElements = $$('.validate-email');
  for (var i = 0; i < emailElements.size(); i++) {
  var emailElement = emailElements[i];
     if (emailElement.up('form').id == conf.up('form').id) {
     pass = emailElement;
 }
 }
    if ($$('.validate-admin-email').size()) {
    pass = $$('.validate-admin-email')[0];
 }
    return (pass.value == conf.value);
}],

And this to register.phtml

*<?php echo$this >_('Confirm Email Address') ?>
<input type="text" name="confirm_email" title="<?php echo $this->__('Confirm Email') ?>" id="confirm_email" class="input-text required-entry validate-cemail" />


texts: How to share order/invoice/shipment/creditmemo increment_id across multiple websites

texts:
I have an EE 1.12 Magento install with 2 websites. We would like the increment_id of orders to be shared between the two stores. e.g order 1 through store A will be 100000001 and order 2 through store B will be 100000002, rather than the default functionality where the two orders will be 100000001 and 200000001 respectively. The same for invoice, shipment and creditmemo.

After doing some research I have been able to implement this by changing some entity configuration in the database. Specifically setting eav_entity_type.increment_per_store to 0 for each of these entities, and then setting eav_entity_store.store_id to 0 for the default store so it applies to all stores.

I have tested this on a clean install and it seems to work ok, however this doesn't seem to be officially documented anywhere as a feature so I am a little hesitant to use this method. My questions, a) has anyone implemented this successfully in production sites? and b) are there any hidden gotchas that might show up by changing these settings around.


texts: Difference between catalog_attributes.xml vs eav_attributes.xml vs extension_attributes.xml

texts:
In the

Magento_Catalog

module i have seen there are three different configuration (xml) files related to the catalog attributes, those three files are

catalog_attributes.xml vs eav_attributes.xml vs
extension_attributes.xml

So my question is what is the difference between these three files, what are the specific usages of these three files ?


texts: How to remove choose option from configurable product drop-down

texts: How can i remove choose option from configurable product drop-down in both listing and details page.


texts: Is it possible at some point to have problems if I set attribute weight to be visible for Configurable products as well? I want to set the weight for a configurable product in order to display it on product listing and I don't want to add a new attribute. I am asking to be sure that shipping rate will not be influenced by this setting.


texts: How to put multiple orders into one pdf page if space

texts: When printing invoice pdf it puts each order into separate pdf page. But is it possible to put them on one page and if the page is full only then make another one.


texts: Magento 2 : Create configurable product programmatically

texts:
I want to create configurable product with simple product assign.

It should be working same as like create from admin.

I have tried so many tutorials and answers. But, it's not working.

Can anyone please help me?


texts: Magento 2 remove category filter from list page filters?

texts: How can I remove Category Filter from Magento 2 Product List Page.


texts: Magento Multistores base url retriving issue in adminpanel

texts:
I have created multistore in Magento. In admin panel i tried to get this multistore base url:

Below code i tried :

Mage::getStoreConfig("web/secure/base_url", 2);
Mage::getStoreConfig("web/secure/base_url", 5);
Mage::getStoreConfig("web/secure/base_url", 3);

Also i tried below code  :

Mage::app()->getStore(2)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
Mage::app()->getStore(3)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
Mage::app()->getStore(5)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);

If i enterd this code in the site, the page was not loaded.

My Code in admin-panel(header.phtml) :

            <?php echo $this->__("Logged in as %s", $this->escapeHtml($this->getUser()->getUsername())) ?>|<?php echo $this->formatDate(null, 'full') ?>|<?php echo $this->__('Try Magento Go for Free') ?>|<a href="<?php echo $this->getLogoutLink() ?>" class="link-logout"><?php echo $this->__('Log Out') ?>
            &nbsp;&nbsp;&nbsp;
            <?php
             if(Mage::helper('multistoreconfig')->multistore_config_enable()) {
                echo "<select class='no-changes' id='list_store' onchange=\"popWin(this.value,  '_blank')\"><option value=''>-- Select Store --</option>";
                foreach (Mage::app()->getWebsites() as $websiteid => $website) {
                    foreach ($website->getGroups() as $group) {
                        $stores = $group->getStores();
                        foreach ($stores as  $storeId => $store) {
                            $data = $this->checkMultiStoreConfigurInStoreId($storeId);
                            if( $data[0]['sub_directory'] || $storeId == 1) {
                                $option_url = Mage::getStoreConfig("web/secure/base_url", $storeId);
                                // $option_url = Mage::app()->getStore($storeId)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK);
                                echo "<option value='". $option_url ."'>";
                                echo Mage::helper('multistoreconfig/data')->getStoreName($storeId);
                                echo "</option>";
                            }
                        }
                    }
                }
             }
             echo "</select>";
            ?>

Any help would be appreciation.


texts: Magento 2 - Construct a HTTP Post REST API

texts:
I construct a REST api using POST as follow

etc/webapi.xml

<?xml version="1.0"?>
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../vendor/magento/module-webapi/etc/webapi.xsd">
    <route url="/V1/BonusPoint/updateFreeBonusPoint" method="POST">
        <service class="Vendor\BonusPoint\Api\BonusPointInterface" method="updateFreeBonusPoint"/>
        <resources>
            <resource ref="anonymous"/>
        </resources>
    </route>
</routes>

Vendor\BonusPoint\Api\BonusPointInterface.php

<?php

namespace Vendor\BonusPoint\Api;

interface BonusPointInterface {

    /**
     * Update free bonus point of a customer.
     *
     * @api
     * @param int $customerId Customer ID.
     * @param int $point Free bonus point balance.
     * @return boolean True if success. Otherwise, false.
     */
    public function updateFreeBonusPoint($customerId, $point);
}

Vendor\BonusPoint\Model\BonusPoint.php

<?php

namespace Vendor\BonusPoint\Model;

use Vendor\BonusPoint\Api\BonusPointInterface;

class BonusPoint implements BonusPointInterface {

    protected $_customerBonusPointFactory;

    public function __construct(\Vendor\BonusPoint\Model\CustomerBonusPointFactory $customerBonusPointFactory) {
        $this->_customerBonusPointFactory = $customerBonusPointFactory;
    }

    public function updateFreeBonusPoint($customerId, $point) {
        try {
            $customerBonusPoint = $this->_customerBonusPointFactory->create();
            $customerBonusPoint->load($customerId);
            $customerBonusPoint->setFreeBonusPoint($point);
            $customerBonusPoint->save();
            return true;
        } catch (Exception $ex) {
            return false;
        }
    }

}

When I run curl to test:

curl -X POST "http://local.magento/index.php/rest/V1/BonusPoint/updateFreeBonusPoint" \
     -d "customerId=1&point=123" \
     -H "Authorization: Bearer soqsupye97th0sd0le136u3l933vto1o"

It returns:

{
    "message": "Server cannot understand Content-Type HTTP header media type application/x-www-form-urlencoded",
    "trace": null
}

What is the problem?


texts: newsletter subscription export error Magento 1.9

texts:
I have more than 6000 records of subscription user I am using the Magento core module for that
while exporting all the records my screen shows [https://prnt.sc/unj950]
can anyone help me what's the issue?
**NOTE: ITS MAGENTO CORE MODULE NO OVERRIDE OR ANY EXTENSION INSTALLED **


texts: Help me to Install magento on Ubuntu I am getting 500 Error or Admin Redirect .

texts: Can somebody help me to install fully magento on unbuntu or centOS also suggest me best practices so for future it will help me . I will appreciate the efforts .


texts: Move element in catalog_product_view_type_bundle.xml to bundle summary

texts:
I want to move my plugin element position for bundle product page

I tried various ways but couldn't achieve it.
Here is my catalog_product_view.xml
<referenceContainer name="product.info.main">
  <block class="My\Example\Block\Catalog\Sampledata" name="my.example.block" after="product.info.price" template="My_Example::sample/product.phtml" />
</referenceContainer>

And, here is my catalog_product_view_type_bundle.xml
<move element="my.example.block" destination="bundle.options.container" after="product.info.addtocart.bundle"/>

Also I have tried different ways like
 1. <move element="my.example.block" destination="bundle.options.container" after="bundle.summary"/>
 2. <move element="my.example.block" destination="bundle.options.container" after="product.info"/>
 3. <move element="my.example.block" destination="bundle.options.container"  after="product.price.render.bundle.customization"/>

None of those were working.
Can you please help me how I can move my element after customized price block?
Thanks


texts: Magento2: How to hide header on register new account form

texts:
needs to create a custom login and registration template. I would like to hide the top header and leave the registration form alone.
Some solution?


texts: How to send post data with redirect from magento 2 for a payment gateway?

texts:
we use magento2/app/code/Paymentgateway/Example/Controller/Standard/Redirect.php

public function execute()
{
    $order = $this->getOrder();
    if ($order->getBillingAddress())
    {
        $this->getResponse()->setRedirect(
            $this->getExampleModel()->buildExampleRequest($order)
        );
    }

Any suggestions??


texts: Product custom attribute in Rest api for orders on Magento 2

texts:
I need product custom attribute like size and color which are being save but when i call rest api it shows only attribute id and not attribute label. API call is
http://localhost/aaa/rest/V1/orders/items?searchCriteria[currentPage]=1


texts: Why wont the product description attribute, when set to TextArea, convert line breaks to

texts:
Magento v2.4.2
My product description attribute was set to TextArea, and its worked fine for the last year. New lines where rendered as  in HTML on the product page. I decided to change it to TextEditor so I can use HTML. I didnt realize when I did that, all my non HTML descriptions would lose all their formatting and new lines or line breaks would no longer render as  and my descriptions would look like one giant run on paragraph.
So I changed the attribute back to TextArea thinking it would revert back. It didnt. There is still new line or line breaks in all the product descriptions, so the data is still here. Its just not rendering like it used to.
I have cleared the cache, redeployed etc etc...any ideas?


texts: Get the discount % in shopping cart page

texts:
I want to get the discount % of the total items in the cart. I couldnt find any core method to do so, so this is what i tried :

$total = Mage::getSingleton('checkout/session')->getQuote()->getTotals();
if(!empty($total['subtotal']) && !empty($total['discount']))
{
    $subtotal = $total['subtotal']->getValue();
    $discount = $total['discount']->getValue();
    $discPer  = -(($discount/$subtotal) * 100);
    $discountPer = round($discPer,2);
    echo $discountPer;
}

This works fine. but now i have customized discounts. for an eg. discount is not applied when a specific custom option is selected. So for those products i want to display the discount % like original, even when discount is not applied. Thanks.


texts: Magento 2.4.1: Does reCaptch v2 work with Magento 2.4.1?

texts: I added reCaptcha v2 Invisible to the new account creation page, but it doesn't show the reCaptcha icon at the right bottom corner. I wonder if I need to set up reCaptcha v3 Invisible for it work.


texts: Get all item in cart using quote id Magento 2

texts: Is there a way to load all items in cart, only using quote entity_id from quote table in magento 2 database?


texts: Magento Import Product With image in CSV

texts:
i am upload a csv file that contain products and its image . when i read the documentation they says that you need to place images in intall_directory/media/import/file_name.jpg

I do the same thing also give right to folder but when i import it says Image does not exist.

sku,name,description,price,_store,status,visibility,thumbnail,image,_category,type,_product_websites,short_description,weight,tax_class_id,attribute_set
testnew121_prrrrrrodusssct121hissam bbb,This Is test New Producssst1 hissam,Description of New Product1,18.45,default,1,4,platon_photographer-president-mahmoud-ahmadinejad-portrait_1.jpeg,platon_photographer-president-mahmoud-ahmadinejad-portrait_1.jpeg,Closeouts,simple,base,short_description,5,4,Default


texts: SQLSTATE[HY000] [2006] MySQL server has gone away only for magento 2

texts:
The MySQL is regularly going away for Magento 2 only. While working, if I refresh cache, then it shows gone.

I can login to the MySQL and do all the queries. It is working. Also, the local Magento 1 will work properly. Only the Magento 2 has a problem.

 3 exception(s):
    Exception #0 (Zend_Db_Adapter_Exception): SQLSTATE[HY000] [2006] MySQL server has gone away
    Exception #1 (PDOException): SQLSTATE[HY000] [2006] MySQL server has gone away
    Exception #2 (Exception): Warning: PDO::__construct(): MySQL server has gone away in /Library/WebServer/Documents/magento/store2/public_html/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php on line 129

    Exception #0 (Zend_Db_Adapter_Exception): SQLSTATE[HY000] [2006] MySQL server has gone away
    #0 /Library/WebServer/Documents/magento/store2/public_html/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Mysql.php(111): Zend_Db_Adapter_Pdo_Abstract->_connect()
    #1 /Library/WebServer/Documents/magento/store2/public_html/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(340): Zend_Db_Adapter_Pdo_Mysql->_connect()
    #2 /Library/WebServer/Documents/magento/store2/public_html/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(460): Magento\Framework\DB\Adapter\Pdo\Mysql->_connect()
    #3 /Library/WebServer/Documents/magento/store2/public_html/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SHOW TABLES', Array)


texts:
I need to edit the Magento Top Links in a specific way and only need to show three links in below order

Login  Register  Cart

This would result in following

Remove only Checkout Link and not Cart Link
Remove My account Link and add Register Link instead
Rename My Cart to Cart

How can I achieve this ?

Please Guide.

Thanks !!!


texts: (Magento2) Grunt Less problem with a new theme

texts:
I've cloned the blank theme for app/design/frontend/lima/mdl, swapping Magento/blank for lima/mdl and give this error:

  Processed Area: frontend, Locale: pt_BR, Theme: lima/mdl, File
  type: less.

  [InvalidArgumentException]
     Verify entered values of the argument and options. Unable to resolve the source file for
  'frontend/lima/mdl/pt_BR/css/styles-m.less'

my files:

app/design/frontend/lima/mdl/registration.php

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

\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::THEME,
    'frontend/lima/mdl',
    __DIR__
);

app/design/frontend/lima/mdl/theme.xml

<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
    <title>Lima MDL</title>
    <media>
        <preview_image>media/preview.jpg</preview_image>
    </media>
</theme>

app/design/frontend/lima/mdl/composer.json

{
    "name": "lima/mdl",
    "description": "N/A",
    "require": {
        "php": "7.0.2|7.0.4|~7.0.6|~7.1.0",
        "magento/framework": "101.0.*"
    },
    "type": "magento2-theme",
    "version": "100.2.1",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "autoload": {
        "files": [
            "registration.php"
        ]
    }
}

dev/tools/grunt/configs/themes.js

module.exports = {
    blank: {
        area: 'frontend',
        name: 'Magento/blank',
        locale: 'pt_BR',
        files: [
            'css/styles-m',
            'css/styles-l',
            'css/email',
            'css/email-inline'
        ],
        dsl: 'less'
    },
    luma: {
        area: 'frontend',
        name: 'Magento/luma',
        locale: 'pt_BR',
        files: [
            'css/styles-m',
            'css/styles-l'
        ],
        dsl: 'less'
    },
    mdl: {
        area: 'frontend',
        name: 'lima/mdl',
        locale: 'pt_BR',
        files: [
            'css/styles-m',
            'css/styles-l'
        ],
        dsl: 'less'
    },
    backend: {
        area: 'adminhtml',
        name: 'Magento/backend',
        locale: 'pt_BR',
        files: [
            'css/styles-old',
            'css/styles'
        ],
        dsl: 'less'
    }
};

I am running:

  grunt clean; grunt exec; grunt less:mdl; sudo chmod 777 -R var/*;

I solved fixing permissions in all project, but I still don't know why...


texts: How to manipulate templates without copying them, for example in an extension?

texts:
If I write extensions it is often unavoidable  to install small pieces of code into core templates (if there are no appropriate layout templates).

How do you handle this situation? How do to inject code to the templates?


texts: magento 2 UI Component form Character Limit Validation

texts:
How to create custom Validation for UI Component Form? I want to create Validation for maximum character, not for max-word which is already available in Magento 2.
if any body knows please share the procedure.Thanks


texts: How Can I Add Packing Charge for Only Selected Products Using Shopping Cart Price Rule?

texts:
I need to apply Package charges for sensitive products!

how can I add Packing charge for only selected products SKU's using shopping cart Pricing Rule?


texts: Magento 2 change knockout js template order

texts:
How to change Magento 2 knockout js template order.
I want to change these blocks order for order summary table:
http://prntscr.com/ca9nbc

Moving orders items block above summary table.


texts: When updating stock via soap API some random products stock not updating

texts:
Background

We have a live site. When we try to update stock levels via Soap API some products will not update but we have no errors. I have taken one of the products that would not update and made a copy, this updated first time!

I have put the code below but cannot see any issues with it. I have looked at the product information for the items that update vs those that will not and there is nothing different.

Any ideas where else to look? Any help would be very much appreciated!

This works:

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:Magento">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:catalogInventoryStockItemUpdate soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <sessionId xsi:type="xsd:string">SESSIONIDGOESHERE</sessionId>
         <product xsi:type="xsd:string">12</product>
         <data xsi:type="urn:catalogInventoryStockItemUpdateEntity">
            <qty xsi:type="xsd:string">15</qty>
         </data>
      </urn:catalogInventoryStockItemUpdate>
   </soapenv:Body>
</soapenv:Envelope>

<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:Magento" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
   <SOAP-ENV:Body>
      <ns1:catalogInventoryStockItemUpdateResponse>
         <result xsi:type="xsd:int">1</result>
      </ns1:catalogInventoryStockItemUpdateResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

This doesn't:

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:Magento">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:catalogInventoryStockItemUpdate soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <sessionId xsi:type="xsd:string">SESSIONIDGOESHERE</sessionId>
         <product xsi:type="xsd:string">11</product>
         <data xsi:type="urn:catalogInventoryStockItemUpdateEntity">
            <qty xsi:type="xsd:string">15</qty>
         </data>
      </urn:catalogInventoryStockItemUpdate>
   </soapenv:Body>
</soapenv:Envelope>

<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:Magento" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
   <SOAP-ENV:Body>
      <ns1:catalogInventoryStockItemUpdateResponse>
         <result xsi:type="xsd:int">1</result>
      </ns1:catalogInventoryStockItemUpdateResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>


texts: how to use other module data source to new module in magento 2

texts:
Hi I want to use the data source of module 1 to module 2 in Magento 2

  how I can do this ??

vendor/module2/etc/module.xml

<sequence>
<module name=vendor_module1/>
</sequence>

how I declare in

di.xml


texts:
Good morning. I just upgraded from 2.2.4 and I get this template filter error in my home page:

  SQLSTATE[42S22]: Column not found: 1054 Unknown column
  'at_featured_default.value' in 'where clause', query was: SELECT
  DISTINCT COUNT(DISTINCT e.entity_id) FROM catalog_product_entity AS e
  INNER JOIN catalog_category_product_index_store6 AS cat_index ON
  cat_index.product_id=e.entity_id AND cat_index.store_id='6' AND
  cat_index.visibility IN(2, 4) AND cat_index.category_id='2' INNER JOIN
  catalog_product_index_price AS price_index ON price_index.entity_id =
  e.entity_id AND price_index.website_id = '1' AND
  price_index.customer_group_id = 0 WHERE (((IFNULL(e.entity_id,
  at_featured_default.value) IN ('1', '2', '3', '5', '6', '7', '8', '9',
  '10', '11', '12', '13', '14', '15', '16', '17', '18', '21', '20')) ))

I'm not sure if this query is in default Magento or if it's my theme creating this issue, but I don't know how to find where this query is originating. Any help will be appreciated.


texts:
We are in one of the last steps of migrating to Magento2 and we only need to copy the media/catalog images to Magento2. I would like to know if I need to flush the image cache first before copying to Magento2. We need to copy the images from a live magento1 shop.

Kind Regards


texts:
I wanted to create MENU below  logo.

how to create "header menu with "HOME", "ABOUT US", "TESTIMONIALS", "CONTACT US".


texts: How to disable the product price for all the pages in magento 2.3.2

texts:
from everywhere I need to hide the price if the module is enabled.

  how can I achieve this functionality? Is anyone have any idea about
  it?


texts: Unable to upload product image in magento 1.9.2

texts:
Get an error message when trying to add product image

http://i.stack.imgur.com/BUHAk.png


texts:
There's a class called "validate-zip" and "validate-zip-international". How does that function know how many digits to validate against? Where do you adjust the settings that affect how many digits to validate against?

This is for Magento 1


texts: Magento2 : Having issue with product add to cart jmeter

texts:
I am using Magento2.2.5 and using benchmark_2015.jmx, Facing issue when test for logged in customer and adding product to cart, Cart shows empty.

It's default magento benchmark_2015 script, stored in the installation folder at setup/performance-toolkit/benchmark_2015.jmx
Request where form key is extracted : http://prntscr.com/mty0su
Login request : http://prntscr.com/mty19u
Add to cart request : http://prntscr.com/mty00o
Let me know if you need more details

https://image.prntscr.com/image/2QJvTGhnS_6ROx0aM7-goA.png

https://image.prntscr.com/image/Hv3aM1XIRp6Y_VmJjub5QA.png

https://image.prntscr.com/image/Yz6glTNgTpONPv0LWChj2A.png


texts: What is different between magento-coding-standard and marketplace-eqp?

texts:
In Magento Marketplace Technical Review
It will Check The Coding standard of the Extension So I Need To Check in My Local Machine
But I have Found 3 Solution and I am confused what is better Solution.

1 magento-coding-standard
2 marketplace-eqp
3 extdn-phpcs

I am developing my extension for Magento 2.3.* So I need To setup Coding Standard in my local machine for checking the quality of my extension`s code
I Need to Know the Difference Between this Two.
Which is better

standalone application for checking

or

Use within your Magento 2 project

Provide me Simple steps to install Magento coding standard.


texts: Magento 2.1 missing Web Setup Wizard link

texts:
Installed fresh Magento 2.1 store (php 7.0.8), with /pub as root web directory from command line and using tar.gz file. Everything seems to be fine, but when I go to admin panel under: System -> Tools the link for the "Web Setup Wizard" is missing.

/setup is aliased correctly on the webserver, and going directly to /setup while logged in as admin results in page saying "Welcome to Magento Admin, your online store headquarters. To use the Magento setup wizard sign into your Admin account and navigate to System => Tools => Web Setup Wizard"

Am I missing something? Didn't see a bug/issue with this on github. Also, is setting the docroot to /pub still the recommended configuration?


texts: Can only install one of: magento/page-builder-commerce 1.0.3, 1.0.1?

texts:
I am on Magento 2.3.2. I would like to install the new security patch so I ran-

composer require magento/product-enterprise-edition=2.3.2-p2 which gives me this output-

Your requirements could not be resolved to an installable set of packages.

Problem 1
- Can only install one of: magento/page-builder-commerce[1.0.3, 1.0.1].
- Can only install one of: magento/page-builder-commerce[1.0.3, 1.0.1].
- Can only install one of: magento/page-builder-commerce[1.0.1, 1.0.3].
- magento/product-enterprise-edition 2.3.2-p2 requires magento/page-builder-commerce 1.0.3 -> satisfiable by magento/page-builder-commerce[1.0.3].
- Installation request for magento/product-enterprise-edition 2.3.2-p2 -> satisfiable by magento/product-enterprise-edition[2.3.2-p2].
- Installation request for magento/page-builder-commerce (locked at 1.0.1) -> satisfiable by magento/page-builder-commerce[1.0.1].

I figured I would try and update pagebuilder.

composer update magento/module-page-builder
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update

I tried adding the version number but that adds more errors-

composer require magento/module-page-builder:1.1.0
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
- magento/module-banner-page-builder 1.0.1 requires magento/module-page-builder 1.0.* -> satisfiable by magento/module-page-builder[1.0.1, 1.0.0, 1.0.3] but these conflict with your requirements or minimum-stability.
- magento/module-banner-page-builder 1.0.1 requires magento/module-page-builder 1.0.* -> satisfiable by magento/module-page-builder[1.0.1, 1.0.0, 1.0.3] but these conflict with your requirements or minimum-stability.
- magento/module-banner-page-builder 1.0.1 requires magento/module-page-builder 1.0.* -> satisfiable by magento/module-page-builder[1.0.1, 1.0.0, 1.0.3] but these conflict with your requirements or minimum-stability.
- Installation request for magento/module-banner-page-builder (locked at 1.0.1) -> satisfiable by magento/module-banner-page-builder[1.0.1].

Installation failed, reverting ./composer.json to its original content.

How can I install the security patch?


texts: How to restrict, Selected Category Products Purchase only from selected Zip/Pin Codes area?

texts:
The selected category of products purchase only from selected Pin/Zip Codes area, how can i do that,,

eg:

Category: Leaves
Zip code : 0214578,2849648

Suppose the customer order from the zip code: 32212, Don't able to place the order.


texts: How to enable or disable crons in Magento 2?

texts:
I checked in cron_schedule table, cron are disabled.
I want to enable or disable crons.
How can I do that?


texts:
I'm setting multiple store, I have setup two domains domain1.com and domain2.com

All work is done but I have an issue with the URL

Both domains show pages even I created a new page for second domain but it still shows 1st domain content and all the URL from main domain not the from second domains.

I'm working with magento 1.9

Please guide me


texts: Magento 1.9.0.1 SUPEE 8788 applied, query string with multiple parameter does not work

texts:
SUPEE 8788 v2 has been applied to our Magento CE 1.9.0.1 site. I just noticed that any url request with two and more query string parameters (http://www.domain.com/?p=1&sort=ASC) will result an error page (The webpage resulted in too many redirects). One parameter query string works fine.

I have reverted SUPEE 8788 v2 patch and the problem was gone. Is there anyone suffer this kind of problem? Anyone has clue on this? Thank you.


texts: Large / Bulky items - is it possible to stop them being available for delivery except for specific countries (UK/Ireland)

texts:
We sell items ranging from 10g weight, to 10kg weight, lengths of up to 3.2m.
We want to be able to sell internationally (and we do) but people are ignoring the notices we put on the website to say “do not order this item if you aren’t in the UK”
I wondered if anyone knows of a solution, either built in or an extension that would cater for this?
I have looked and can’t see anything that specifically mentions it.
E.G.
“Your cart contains items that cannot be shipped internationally”
Rather than allowing them to proceed based on weight vs. destination.


texts: magento catalog price rules disappear sometimes

texts:
My store is running on magento 1.8.1  CE.

The catalog price rules are working fine and being set every noght with a cron.

But sometimes during the day the price rules disappear ...
I can solve it again by pressing the set catatlog rules, but i am missing a lot of conversipon trough this problem.

Does anyone know what is wrong?


texts: Magento 2.3.2 getting error after manually deleted products from mysql

texts:
I had deleted product using "DELETE FROM catalog_product_entity" in Magento 2.3.2. I am getting stuck in reindexing about error

`catalogsearch_fulltext_scope2`' exists., query was: CREATE TABLE IF NOT EXISTS `catalogsearch_fulltext_scope2` (
  `entity_id` int UNSIGNED NOT NULL COMMENT 'Entity ID' ,
  `attribute_id` int UNSIGNED NOT NULL COMMENT 'Attribute_id' ,
  `data_index` longtext NULL COMMENT 'Data index' ,
  PRIMARY KEY  (`entity_id`, `attribute_id`),
  FULLTEXT `FTI_FULLTEXT_DATA_INDEX` (`data_index`)
) COMMENT='catalogsearch_fulltext_scope2' ENGINE=innodb charset=utf8 COLLATE=utf8_general_ci

Please help me to resolve issue


texts:
For some reason, the little script we used to get the current year in the copyright block under Content/design/configuration/footer is not being executed. It is being treated as normal text in the frontend

Backoffice:

Frontend:

What could be the problem?


texts: How to get Fedex module quote to match Fedex’s website quotes?

texts:
I’m having a little bit of trouble trying to get the Fedex shipping module to match the List Prices that Fedex is giving me when I use their website on our company’s account. I’m using the same account for the module that I am when pulling these quotes on Fedex’s site. On both my website and Fedex I’m using Residential Delivery, Regular Pickup, Your Packaging, and on the Magento end I’ve tried both options for “Packages Request Type”. I haven’t really been able to see a pattern either (i.e. always a certain percentage higher or lower… it’s pretty inconsistent) Here are some of the results I’m coming up with:

1x 45lbs package - Magento says $16.39 home delivery, Fedex says $18.45 list rate

1x 45lbs package + 1x 54lbs package - Magento says $41.73, Fedex says says $37.84 list rate

1x 45lbs package + 2x 54lbs packages - Magento says $63.50, Fedex says $57.23 list rate

Any ideas on what I could be setting wrong, or is the module just plain inaccurate for some reason? I’m running Magento community 1.7.0.2


texts:
I've recently start working on implemented storefront that was developed by others, and I just solving bugs.

2 days ago I've noticed unexpected behavior in checkout for example:

-checkbox for using default address for shipping and billing not working. I click it but no change happen

-shipping options disappeared

what are causes


texts:
I am trying to get data where if my order state is complete and delivery_at is between date1 and date 2.

At the same time I also want to filter when state = canceled and delivery_at is between date3 and date4.

Point is that there are two conditions to filer : when (state = A and delivery_at = X) OR (state = 'canceled' and delivery_at = Y)

The code which I wrote is :

orderCollection = Mage::getModel('sales/order')->getCollection()->getSelect()->where(
                   new \Zend_Db_Expr("(state = 'complete') OR (state = 'canceled')")

In the above code, I haven't done filtering on delivery_at, as the above query is failing even then, as the count I get is 0;

So, how can I do in this current situation.

EDIT :: MY EXACT QUERY

$orderCollection = Mage::getModel('sales/order')->getCollection();
    $orderCollection->getSelect()->where(
                    new Zend_Db_Expr("(state = 'complete' AND DATE(delivery_at) >= '{$from}' AND DATE(delivery_at) <= '{$to}') OR (state = 'canceled' AND DATE(delivery_at) >= '{$from}' AND DATE(delivery_at) <= '{$to}'))")
                );

Error message :

Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 2, query was: SELECT `main_table`.* FROM `sales_flat_order` AS `main_table` WHERE ((state = 'complete' AND DATE(delivery_at) >= '2020-02-25' AND DATE(delivery_at) = '2020-02-25' AND DATE(delivery_at) ";i:1;s:2171:"#0 /var/www/html/fresh/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)


texts: Is there a way to add a Category column to admin 'Manage Category' Product Grid?

texts:
I have applied this code:
Is there a way to add Category column to admin Product Grid?

to our store here and it works great! Thank you in advance. Is there a way to add this to the products grid in the 'Manage Category' section easily enough?


texts: Magento2: Issue with label "new" for configurable product

texts:
I have any issue with display label "new" only for configurable product.
Displays in the same place where the % discount is

Anyone help me how can I move to little down orange label with % discount?

@update
Here is configurable product and you see % discount:

Here is simple product and magento not shows % discount:


texts: Error 500 in Magento 1.9.3 products admin page

texts:
I tried to upgrade magento in order to solve login problem But after I revert back I can't access Products page in Admin. Looking errors I receive

PHP Fatal error:  Call to undefined method
Mage_Adminhtml_Catalog_ProductController::_setForcedFormKeyActions()
in
/home/username/public_html/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php
on line 55

I looked at line 55 but there are comments and no code.
any help please?


texts: Magento2 - is there any class such as Mage_Shell_Abstract to extend?

texts: I mean, what's the right / best approach to write shell scripts, as the ones in Magento1 /shell folder?


texts: Magento 2 Get category id using category title

texts:
I would like get category id by only using category title by using this kind of function.

->load($categoryTitle, 'title')
->getId();

Use case: Get category id by title and put id data to array in migration script.


texts:
I am adding subdistrict to magento 2 checkout page on address form. In magento 1 i used ajax to get the subdistrict for the selected city.
How to do this to comply with magento 2 best practice?


texts: Collect customer information upon registration

texts:
So in order to help prevent fraud on my website, I want to setup a table that collects information about a person when they register on my site. Information such as Real IP address, Proxy IP address, referer URL, cookies, browser information (type of browser, version, plugins, fonts), flash hash, maybe a generated salted hash from their password input.

I've searched around and can't find any significantly helpful articles on created a script for this. I imagine I'd need to create the table in mysql, and then reference the table via a custom PHP doc. However, I need help on the script for collecting such information to begin with. Any help is greatly appreciated!

The only page I could find similar to this was http://blog.chapagain.com.np/magento-track-visitors-information/


texts: How can i solve fatal error regard memory space

texts: Just am hosting, when i try to reindex, i got this error.


texts: How to display regions list sorted by region_id

texts:
Thank you for making your attention to my question.

I'd like to show Region List ordered by region_id on the DB with RegionUpdater.
Currently its ordered by Region's name alphabet.
I tried to modified the following files but haven't succeed to change it.

Modified file: "./app/code/core/Mage/Directory/Helper/Data.php"
tried to add "->setOrder('region_id', 'ASC')"

Our environment is Magento 1.9.3.1.

If you have any idea to solve this, let me have your help.

Regards,
7steps


texts: How to find from which file $block->getContent() called?

texts:
I am using Magefan blog extension,
app\code\Magefan\Blog\view\frontend\templates\post\view.phtml

            <?= /*@noEscape*/ $block->getContent() ?>

From which file content gets called?


texts:
Is there a way to add a "Black Friday Promotion" with sale priced products, AND percentages off for entire categories AND free shipping but be ONE single promotion in the "Shopping Cart Rules?"

If not, how would you do something like that? Would each sale priced thing be all different promotions?

We just don't want to do a blanket 10% off or whatever but still want to for certain areas and have specific prices to specific products for the day.


texts: Enable/Disable field in admin product edit form with radio button. (Magento 2)

texts:
I try to enable "Field to be enable" when radio button "Enable field" is checked. You can see screenshot
field to be enable

UpgradeData.php

            $eavSetup->addAttribute(
            \Magento\Catalog\Model\Product::ENTITY,
            'stop_production',
            [
                'group' => 'Product Details',
                'type' => 'int',
                'label' => 'Enabled field',
                'input' => 'boolean',
                'source'   => 'Magento\Eav\Model\Entity\Attribute\Source\Boolean',
                'default'  => '0',
                'required' => false,
                'sort_order' => 50,
                'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE,
                'visible' => true

            ]
        );

        $eavSetup->addAttribute(
            \Magento\Catalog\Model\Product::ENTITY,
            'item_replace',  [
            'type'     => 'text',
            'label'    => 'Field to be enable',
            'input'    => 'text',
            'sort_order' => 55,
            'global'  => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE,
            'required' => false,
            'group'    => 'Product Details',
            'backend' => 'Wo\StopProduction\Model\Attribute\Backend\ItemReplace'
        ]);

Class ItemReplace.php ( use for disabled field but not working )

{
    protected $arrayManager;

public function __construct(
    ArrayManager $arrayManager
) {
    $this->arrayManager = $arrayManager;
}

public function modifyMeta(array $meta)
{
    $meta = $this->customizeItemReplace($meta);

    return $meta;
}

public function modifyData(array $data)
{
    return $data;
}

protected function customizeItemReplace(array $meta)
{
    $weightPath = $this->arrayManager->findPath('item_replace', $meta, null, 'children');

    if ($weightPath) {
        $meta = $this->arrayManager->merge(
            $weightPath . static::META_CONFIG_PATH,
            $meta,
            [
                'dataScope' => 'item_replace',
                'validation' => [
                    'required-entry' => true
                ],
                'additionalClasses' => 'admin__field-small',
                'imports' => [
                    'disabled' => '!${$.provider}:' . self::DATA_SCOPE_PRODUCT
                        . '.stop_production:value'
                ]
            ]
        );
    }
    return $meta;
}

di.xml

    <virtualType name="Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\Pool">
    <arguments>
        <argument name="modifiers" xsi:type="array">
            <item name="item_replace" xsi:type="array">
                <item name="class" xsi:type="string">Wo\StopProduction\Ui\DataProvider\Product\Form\Modifier\ItemReplace</item>
                <item name="sortOrder" xsi:type="number">10</item>
            </item>
        </argument>
    </arguments>
</virtualType>

First problem: modifier not work for disable field.

Second problem: how can render field enable and required when radio button is enable ?

Many thanks for your help


texts: Mock products and setting values on unit testing

texts:
I've created an API extension that manages gallery easily for our demands and now I wanted to create a unit testing.

For example, one functionality is: give an 'sku' and 'entry' object (with base64 img) and API adds this image on that product.

This is the class I want to test:

<?php

namespace Gsp\ApiExtension\Model;

use Gsp\ApiExtension\Api\SGIMediaInterface;
use Magento\Framework\Api\ImageContentValidatorInterface;
use Magento\Catalog\Api\ProductAttributeMediaGalleryManagementInterface;
use Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterface;
use Magento\Catalog\Api\ProductRepositoryInterface;
use Magento\Store\Api\StoreRepositoryInterface;
use Magento\Framework\App\ObjectManager;

class SGIMedia implements SGIMediaInterface {

    /**
     * @var StoreRepositoryInterface $storeRepository
     */
    protected $storeRepository;

    /**
     * @var ProductRepositoryInterface
     */
    protected $productRepository;

    /**
     * @var ImageContentValidatorInterface
     */
    protected $contentValidator;

    /**
     * @var ProductAttributeMediaGalleryManagementInterface
     */
    protected $galleryManagement;

    /**
     * @param StoreRepositoryInterface $storeRepository
     * @param ProductAttributeMediaGalleryManagementInterface $galleryManagement
     * @param ProductRepositoryInterface $productRepository
     * @param ImageContentValidatorInterface $contentValidator
     */
    public function __construct(StoreRepositoryInterface $storeRepository, ProductAttributeMediaGalleryManagementInterface $galleryManagement, ProductRepositoryInterface $productRepository, ImageContentValidatorInterface $contentValidator) {
        $this->productRepository = $productRepository;
        $this->contentValidator = $contentValidator;
        $this->galleryManagement = $galleryManagement;
        $this->storeRepository = $storeRepository;
    }

    /**
     * @inheritdoc
     */
    public function update($skus, ProductAttributeMediaGalleryEntryInterface $entry) {
        $sku_array = explode('|', $skus);

        foreach ($sku_array as $sku) {
            $this->galleryManagement->create($sku, $entry);
        }
    }

(...)

}

1) I need to mock a product, I've already did that, but then all attributes are NULL, so I would need to set an SKU at least. setData is not working. I'm stuck here.

I did this:

/**
* @var \Magento\Catalog\Model\Product
*/
protected $product;

protected function setUp() {
    $this->product = $this->createMock(\Magento\Catalog\Model\Product::class, [], [], '', false);

    $this->product->setSku('test');
    var_dump($this->product->getSku()); //returns NULL

    $this->product->setData('sku', 'test');
    var_dump($this->product->getData('sku')); //returns NULL

    $this->product->save();
    var_dump($this->product->getData('sku')); //returns NULL
 }

2) Then I get my model and call my method passing this SKU and a fixed entry as a parameters.

3) Verify the product has this entry.

By the way, I'm very new at unit testing and on Magento too.


texts: How to get product configrable id in cart in magento 2 using jquery

texts:
i have a custom module for shipping methods in magento 2

  i need to get config product id in the cart list using jquery

Date-block.html

<script type="text/javascript">
require(
    ['jquery','jquery/ui'],
    //function($) {
      $(document).ready( function() {
        //alert(1);
        // read checkoutconfig
        var quoteData = checkoutConfig.quoteItemData,
          quote_length = quoteData.length,
          prep_times = [],
          creation_dates = [],
          cake_names = [],
          item_ids = [];

        // Manually prepare this list either by cake name or by item id

        var cakes_prep_time_by_name = {
'1101':'4',}
for(var i = 0; i < quote_length; i++) {
           // quoteData[i].name
           //var prep_time = quoteData[i].prep_time; //assumed
           //prep_times.push(prep_time);

           var order_time = quoteData[i].created_at;
           creation_dates.push(order_time);

           var cake_name = quoteData[i].name;
           cake_names.push(cake_name);

           var item_id = quoteData[i].item_id;
           item_ids.push(item_id);

           var prep_time = cakes_prep_time_by_name[cake_name];
           console.log(cake_name+'/'+prep_time);
           prep_times.push(prep_time);
</script>

when i go to check out i need to get all configurable products ids and new custom attribute

any one have idea???


texts:
I want to get the BaseURL with the StoreViewCode via Magento 2 Variables but with no success. I have the "add Storeview to URL" enabled at the Backend and using the following variable only shows the Base URL without it.

{{config path="web/unsecure/base_url"}}

Is there a variable to get the StoreviewCode as well?


texts: Magento2 updating custom field in order creates new grid row

texts:
I've created a custom attribute in Magento2 Order grid and sales_order table. Now when I am saving Order info using OrderRepositoryInterface, it creates a new blank row in order grid.

I am using     \Magento\Sales\Api\OrderRepositoryInterface $orderRepository in my constructor and below is my code block

$order = $this->orderRepository->get($data['order_id']);
if ($order->getId() && $data['order_id']) {
    $order->setAtrributeName('4.4.1');
    $this->orderRepository->save($order);
}

Can someone tell me where I am doing wrong?


texts: magento 2 create table (setting) in the system configuration save or delete values in custom table

texts:
I have create a  custom table with insert/delete table in system configuration.
On click save configuration it save value in "core_config_data" table. For that I have referenced http://www.ibnab.com/en/blog/magento-2/magento-2-backend-guide-to-create-table-setting-in-the-system-configuration link

I want in configuration table field it will display my custom table's record and on click delete button It will delete record from custom table.


texts: Huge input lookup on admin configurable product page

texts:
Whenever I try to open a large configurable product with over 4000 simple products I get the following error:

  Warning: DOMDocumentFragment::appendXML(): Entity: line 1: parser
  error : internal error: Huge input lookup in
  /vendor/magento/framework/View/TemplateEngine/Xhtml/Template.php on
  line 60

I found this issuetracking, but there the problem is about the order grid.
https://github.com/magento/magento2/issues/8084

Any idea how to solve this? I'm on version 2.2.1 because of a Shipping module for the Netherlands.


texts: How to add custom button in sales order view in admin after cancel button

texts: I have added custom button in sales order view on admin .But I need the custom button next to cancel button.


texts:
following code:

<?php
namespace UV\Bestellung\Controller\Adminhtml\Order;

use Magento\Framework\App\Filesystem\DirectoryList;
class CreatePrint  extends \Magento\Sales\Controller\Adminhtml\Order
{

    public function execute()
    {

    /*
        $objectManager =  \Magento\Framework\App\ObjectManager::getInstance();
        $order = $objectManager->create('Magento\Sales\Model\Order')->load($orderId);
    */
        if($order->hasShipments()) {
            #Sendungen vorhanden
            $shipments = $order->getShipmentsCollection();
            $pdfGenerator = $objectManager->create('UV\Bestellung\Model\Order\Pdf\Shipment');
            $content = $pdfGenerator->getPdf($shipments);
            $fileFactory = $objectManager->get('\Magento\Framework\App\Response\Http\FileFactory');
            $fileFactory->create('Bestellschein.pdf', $content->render(), DirectoryList::VAR_DIR , 'application/octet-stream');

        } else {
            #Keine Sendungen vorhanden
            print_r("Keine Sendung vorhanden!");
            exit;
        }
        // your logic here
    }
}
?>

How can I get the order ID?

Thanks!


texts: Remember "products per page" when going to another category

texts:
In Magento 2 the option to allow customer to change how many products to show per page is a default feature.

Can we save the option customer chose so that when the customer goes to another category they see as many products per page as they chose to earlier in the first category?


texts: Magento 2 - How to list websites on frontend

texts:
What's the best method to get specific data in Magento 2, i.e. to list all the websites in the CMS? In Magento 1 I'd use

Mage::app()->getWebsites()

But that doesn't work in Mag2 anymore. I do see code like this:

$this->storeManager = $storeManager;
$id = $this->storeManager->getStore()->getId();

Which I guess would be a fair starting point, but whenever I call this code in the frontend, I get Notice: Undefined variable: storeManager errors. So appareantly this isn't the way to call that storeManager. My question is; what is the right way?


texts: How to update toplinks from observer in checkout page?

texts:
I followed this Answer:
customer save before process checkout button click

And it works great. However, when I add the line:

Mage::getSingleton('customer/session')->loginById($customer->getId()); // to login that customer.

It doesn't update the toplinks. I need to refresh the page to actually reflect that I got logged in. How can I achieve that?


texts: Magento 2: Why my multi store isn't loading CSS?

texts:
I've set up multi-store with multi-domain, but I'm facing a weird issue that is default store is running perfectly but another store is not able to load CSS.

Please help


texts: Magento2.4 rying to import simple products via csv

texts:
I am trying to import products via a csv in Magento2.4 the file is a bit big its 189MB in size.
I edited the php.ini file to allow a bigger max_imput_size and upload_max_filesize . I restarted apache but now when I upload the file I get a spinner in the browser that just never goes away.
I am not sure what else I could do to get this not to be stuck?

Suggestions?


texts: Copy a product's attributes value to another attribute?

texts:
I want to copy a product's attribute (weight) to another atribute (general_weight).

I found this:

Create an script at magento root update.php and put the below code :

<?php
require_once  "app/Mage.php";
Mage::app("admin");
umask();

/*
 Step2: get Product Collection filter by Saleable
*/
$collection = Mage::getResourceModel('catalog/product_collection')->addAttributeToSelect('weight');

foreach($collection as $eachproduct){
$val=$product->getWeight();
/*$product->getWeight() is not given the value then used

$product->getResource()->getAttribute('weight')->getFrontend()->getValue($product-)

*/
$product->setGeneralWeight($val);
$product->getResource()->saveAttribute($product, 'general_weight');

}

then run the script by browser or shell php program.

but this faces to an error:

  Fatal error: Call to a member function getWeight() on a non-object in update.php on line 12


texts: Configurable Product Options not visible on frontend

texts:
I have created a configurable product with color (Red and Blue) and size (5, 6, 7 and 8) as two options.
I can see all the associated products in admin correctly. But on frontend I am getting only color option to select and there is nothing to select under size option on frontend.
All the child simple products are enabled and are in stock.
I have performed the indexation and flushed all the caches but no luck.
It will be very helpful if anyone can guide me to figure out the issue here and how to fix this.


texts: How to display specific text based on attribute option id on product page view - magento

texts:
i want to display specific text based on attribute option id on product page view.

Where I made a mistake?

I run this code on product page view.

$attribute = $_product->getMyattribute();
if ($attribute ='32') {
echo 'My text';
}

var_dump($attribute); returns 31,32,33

Then I try the following code , but again failure.

$attribute = $_product->getMyattribute();
    $filterName = Array();
    foreach ($attribute as $key => $value) {
    $filterName[] = $value;
    }
    if (in_array("30", $filterName)) {
        echo 'My text';
    }
    ?>

UPDATE
added another solution

$attribute = $_product->getResource()->getAttribute("Myattribute");

if ($attribute->getSource()->getOptionText("31")) {
    echo 'My text';
}


texts:
Magento 2 Decline message disappears quickly in the Checkout page when placing the order using a credit card.

/vendor/magento/module-ui/view/frontend/web/js/view/messages.js


texts:
I have to get order id in admin edit order?

I have tried to get order id from quote but the order creating new so that I don't fetch order id. Is there any way to get order id in admin edit order?

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$quote = $objectManager->create('Magento\Backend\Model\Session');
$quoteData = $quote->getQuote()->getData();

But I can't fetch any order detail.


texts: Magento 2.3 improve detail, product description, with others attributes

texts:
I would like to edit the details tab with the description and also include the product attributes under details in order to make them immediately visible without having to change the tab, as in the image below.

How can I do to make this change, which files should I edit?

Thank you


texts: Unable to Filter Order Grid Collection for Diffrent Layouts in magento 2

texts:
i am using sales_order_grid in two layouts
sales_order_index and custom_order_index
I want to filter collection for both grid based on a custom attribute in sales_order_grid table its name is archived
I added a plugin in di.xml
<type name="Magento\Framework\View\Element\UiComponent\DataProvider\Reporting">
        <plugin name="filter_order_collection" type="Vendor\Module\Plugin\Adminhtml\FilterOrderCollection" sortOrder="1"/>
    </type>

in my FilterOrderCollection.php
use Magento\Framework\UrlInterface;
use Magento\Sales\Model\ResourceModel\Order\Grid\Collection as OrderCollection;

class FilterOrderCollection
{
    protected $request;

    public function __construct(
        \Magento\Framework\App\Request\Http $request
    ){
        $this->request = $request;
    }

    public function afterSearch($subject, $collection)
    {
        if($collection instanceof OrderCollection) {

            $fullActionName=$this->request->getFullActionName();
            if($fullActionName=='sales_order_index'){
                $collection->getSelect()->where('archived = ?', 0);
                $collection->clear()->load();
            }elseif($fullActionName=='custom_order_index'){
                $collection->getSelect()->where('archived = ?', 1);
                $collection->clear()->load();
            }

                return $collection;

        }
}

when I print collection in plugin Data its filtering fine but in Grid, I am not getting filtered Data


texts:
Running Magento ver 1.8.1.0 and I am having a Checkout issue. In Magento default theme it works a treat no issue but if I enable Ultimo theme one areas does not function correctly which is the main checkout update feature. Here is a video of issue will try to attach as well to post.

I know you’re going to say it’s the theme but the developer says cart not touched with theme only CSS style. Plus other user using Ultimo no issue.

Looking for ideas please cannot fix it but i am a newbie at Magento hence looking for help.

Video Link https://dl.dropboxusercontent.com/u/92887/Shopping%20Cart%20not%20Updating.wmv
Happy Festive Season everybody


texts: Add custom price to child product of bundle

texts:
I have used this solution to add bundle product in the cart but I also want to change the price of the child products
How to add bundle product to cart programmatically with custom price and quantity (of all products) in Magento 2?
The product with his children are getting add only I want to change the price of each child


texts: CE 1.9 - Move the Page Title for Category pages only above the breadcrumbs

texts:
I don't want to do this on every page, but on a site I am working on, there is a design requirement to show the Page Title above the breadcrumbs only on Category/Sub-category pages, irrespective if it is a 1-column, 2-column, etc layout.

I can play around with the template files, and use conditions, but I feel this is messy and would therefore like to know if there is a more elegant way of achieving this using local.xml?

I was thinking of something along the lines of:

<catalog_category_default>
    <reference name="root">
        <action method="unsetChild"><name>page_content_heading</name></action>
    </reference>
<catalog_category_default>

Am I correct or at least half-way there?


texts: Changing breadcrumbs product name to an attribute

texts:
I would like to change the output of the breadcrumbs to be an attribute instead of the product name.

Example:

Home -> Category -> Product Name would become Home -> Category -> Magento_Attribute

I have tracked down 2 places where the breadcrumbs are generated:

/app/code/core/Mage/Catalog/Helper/Data.php

/**
 * Retrieve current Product object
 *
 * @return Mage_Catalog_Model_Product|null
 */
public function getProduct()
{
    return Mage::registry('current_product');
}

and
/app/design/frontend/ultimo/default/template/page/html/breadcrumbs.phtml

I've been playing around with both files not having much luck.

How do I change the default behavior of the breadcrumbs product name to and attribute?


texts: Is there any reason not to include every attribute in the product flat tables ('Used in Product Listing" - Yes)

texts:
While building google product feeds, I found it necessary (or at least helpful) to add a few attributes to the product flat table which I normally don't use in my listings.

Is there any reason not to include every attribute in the flat table? Wouldn't it be easier and more flexible? I guess the idea is that it will affect performance? But will it actually have any kind of effect? On a related matter, does including all (available) attributes in product collections have a real effect on performance? Is it much faster to only select the attributes you will use?


texts:
How to convert

 $products = $this->_catalogSearchAdvanced
        ->getProductCollection()
        ->addStoreFilter($storeId)
        ->setCurPage($page)
        ->setPageSize($pageSize)
        ->setOrder($searchOrder, $searchDir)
        ->addAttributeToFilter(
            array(
                array('attribute' => 'name', 'like' => '%' . $searchTerm . '%'),
                array('attribute' => 'description', 'like' => '%' . $searchTerm . '%'),
            ));

for get the same result using SearchCriteria and ProductRepository?


texts: Why does Magento2 add 0.0001 in the credit memo refund processing?

texts:
I am talking about the file

vendor/magento/module-sales/Model/Order/Creditmemo/Total/Shipping.php

here in codes
if ($desiredAmount < $this->priceCurrency->round($maxAllowedAmount) + 0.0001) {

And
if ($desiredAmount > $maxAllowedAmount - 0.0001) {

why is there addition and subtraction of the amount 0.0001
Can't this be done without this?


texts: Magento 2 You will be redirected to the PayPal website

texts:
I need to change the text to my own. help me pls. in what file i can edit it?
vendor/magento/module-paypal/view/frontend/web/template/payment/
i tryed to change here, but nothing new on page (after changes i flush magento cash for sure)
What function and in which file causes this message to the page? Many thanks!!!


texts: How to retrieve data from an event review_controller_product_init_before inside the observer in Magento 2?

texts:
Using Magento 2, I trying to retrieve the data (rating, nickname, ...) when the user write a review for a product. i want to retrieve this data, do some process and return back to be displayed in the screen.

How to grab this data inside the observer?


texts:
how can we use
$resource = Mage::getSingleton('core/resource');
$readConnection = $resource->getConnection('core_read');
$tableName      = $resource->getTableName('sales/order');
in magento2?

What is the replacement of core/resource in magento2?
I have tried with \Magento\Framework\Setup\SchemaSetupInterface but its not instantiating in block or model classes.


texts:
I'm using Magento 1.9.0.1 with New Installation

and have 2 issues.

1.) After proceeded Backing up and whether checked the "Put store on the maintenance mode while backup creation" or not, Frontend and Backend returns Error 500,

I solved this by using magento-cleanup, and then I can access to both Frontend
and Backend again. But I'm not sure about its side effect.

Could someone give me suggestion or it will be fine?

2.) After the "Enable CAPTCHA on Frontend" was set to YES,
and Forms : selected all items
and Displaying Mode : Always
and then refresh/flush.

The CAPTCHA doesn't display.

Am I missing something?

Thank you


texts:
I'm trying to write a bit of php code to determine if the user is on the checkout page by getting the current url, and the checkout page url, and comparing the two. The comparison is not working though, and I can't understand why.

This php code here:

$courl = Mage::getURL('onestepcheckout');
$cururl = Mage::helper('core/url')->getCurrentUrl();
var_dump($courl);
echo "
";
var_dump($cururl);
echo "
";
echo "\"$courl\"
";
echo "\"$cururl\"
";

produces this result:

string(58) "http://127.0.0.1/store/index.php/onestepcheckout/"
string(49) "http://127.0.0.1/store/index.php/onestepcheckout/"
"http://127.0.0.1/store/index.php/onestepcheckout/"
"http://127.0.0.1/store/index.php/onestepcheckout/"

I've tried comparing with ==, ===, and strcmp and none work. I assume this must have something to do with the length discrepancy...

This seems like it must some strange little php nuance I'm not familiar with... I suspected whitespace and tried to trim() both but that didn't have any effect either.

Thanks for any nudges in the right direction! :)


texts: How to show all wishlist item in custom HTML without breaking any functionaility

texts:
I have created wishlist HTML which contains an image, product name, price & add & delete button. I want to show all the wishlist on my HTML page.

My wishlist

Product Name

                   499

                     599

                  <button class="btn " tabindex="0"></button>

                 Add to cart

 (4.5) 167 Reviews

Product Name

                   499

                     599

                  <button class="btn " tabindex="0"></button>

                 Add to cart

 (4.5) 167 Reviews


texts: How to create Static block that shows an random image

texts:
I want to create a static block which shows randomly one image from a specified image folder.
Does anyone know if this is possible and how to create it.

Thanks


texts:
I have the following code. The drawback of the code is it is getting all custom options for a product while I want to get only those options which are selected by the customer on the product page.

$items = $order->getAllItems();
foreach ($items as $item) {
    $product = Mage::getModel('catalog/product');
    $prodSku = $item->getSku();
    $productId = $product->getIdBySku($prodSku);

    $product->load($productId);
    $product = $item->getProduct();
    $productId = $item->getItemId();
    $options = $product->getOptions();
    foreach($options as $_option) {
        echo $_option->getTitle();
    }
}


texts: Load only Configurable product of order not child simple product

texts:
I want to get all the ordered items by order id. But if configurable product then I want to get only parent item id not it's child product.

For this I am using following code:

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$orderId = $this->getOrderId();
$order = $objectManager->create('Magento\Sales\Model\Order')->loadByIncrementId($orderId);
$orderItems = $order->getAllItems();`

So, How can I skip child products of configurable products?


texts: Magento 2: how to extend core function only for REST API

texts:
I want to extend some core function via the plugin and it should work in only when function call via REST API so in short my override things are only for REST API scope not for the web.

is this possible in Magento 2 and how can I write a plugin using di.xml which only call when request form API

Any idea? any help appreciate


texts: Content loading in two different places half way through the same XML block declaration

texts:
Below is a snippet from page.xml...
            <action method="addItem"><type>skin_js</type><name>js/slideshow.js</name></action>
            <action method="addItem"><type>skin_js</type><name>js/lib/imagesloaded.js</name></action>
            <action method="addLinkRel"><rel>stylesheet</rel><href>//fonts.googleapis.com/css?family=Raleway:300,400,500,700,600</href></action>
            <action method="addItem"><type>skin_js</type><name>js/minicart.js</name></action>

            <!-- Add stylesheets with no media queries for use in IE 8 and below -->
            <action method="addItem"><type>skin_css</type><name>css/styles-ie8.css</name><params/><if><![CDATA[ (lte IE 8) & (!IEMobile)]]></if></action>
            <action method="addItem"><type>skin_css</type><name>css/madisonisland-ie8.css</name><params/><if><![CDATA[ (lte IE 8) & (!IEMobile)]]></if></action>

<!-- #################################################################################-->

            <!-- Add stylesheets with media queries for use by modern browsers -->
            <action method="addItem"><type>skin_css</type><name>css/styles.css</name><params/><if><![CDATA[<!--[if (gte IE 9) | (IEMobile)]><!-->]]></if></action>
            <action method="addItem"><type>skin_css</type><name>css/madisonisland.css</name><params/><if><![CDATA[<!--[if (gte IE 9) | (IEMobile)]><!-->]]></if></action>

            <!-- Sets viewport meta tag using text block -->
            <block type="core/text" name="head.viewport">
                <action method="setText"><text><![CDATA[<meta name="viewport" content="initial-scale=1.0, width=device-width" />]]>&#10;</text></action>
            </block>

This is the default Magento 1.9 RWD page.xml.
Everything above the line of hashes ### is being loaded in the <head>.
Everything below the line of hashes ### is being loaded in the <body>.
Despite all these calls included within the same block, it is breaking somehow, half way through - the block starts with:-
<default translate="label" module="page">
    <label>All Pages</label>
    <block type="page/html" name="root" output="toHtml" template="page/3columns.phtml">

        <block type="page/html_head" name="head" as="head">

Rendered in the browser at the frontend at the very top of the page, but just inside the opening <body> is ]> which I believe does indicate there is possibly some sort of syntax error with one of the [CDATA references although I can't see an issue anywhere - it is exactly the same file as the 1.9 RWD Magento demo and that doesn't have the issue.
Two hours on trying to get to the bottom of this and I'm now beginning to pull my hair out.
Any ideas?
Edit
I thought it clear, but evidently not.
The line of hashes ### is not actually in the file. I just added this into my question to show you where the split occurs (i.e - everything above in the <head> and everything below in the <body>.


texts: Magento 2.2 home page only 503 error on varnish

texts:
All pages are working fine and the only home page is giving error:

  Error 503 Backend fetch failed

with varnish 4 enabled


texts: Update position product programmatically for one position

texts:
because I can't answer yet to this question: How to update product position (number) in specific category programmatically, because of my reputation. Hereby a new question about the updates for the position of a single category.

How would you only update products in that category with a curtain position, for example position 0. So only products with position 0 will change to the new number and products with  position 10 will keep there position.

Hope someone can help.


texts: Edit price of upsell product in magento 2

texts:
i am using magento 2.3.4 and i want to change the price of product when added in up-sell.
but there no option for edit.

how we can achieve this?


texts: Magento 2: Join EAV attribute from product attribute set on a custom flat table

texts:
Hi fellow programmers,

I would like to know how to do a join on my custom flat table (i.e. discountrules), I've implemented a generic Repository based on the Pestle archive, which implements the RepositoryInterface, it uses the DiscountRule Resource model and it's corresponding Collection, but I would like to join a attribute on this flat table within the Repository.

I can do a join using the $collection->getSelect()->join(... implementation, but I was wondering whether we can specify the EAV attribute and join them automatically.

I hope this question is valid and there's enough information to understand what I'm looking for, I hope someone can help me out!


texts: product description - WYSIWYG editor is not displayed

texts:
my WYSIWYG editor is not displayed in product description in the admin panel.

my sittings:
Catalog-->magnage attributes--> description --> Enable WYSIWYG = "yes"
system --> configuration --> Content Management --> Enable WYSIWYG Editor = "Enabled by Default"

has anyone any idea?


texts:
Has anyone faced up an issue during magento installation with composer?

  Installing vertex/module-tax (3.0.0): Downloading (100%)

  [UnexpectedValueException]   The checksum verification of the file
  failed (downloaded from
  https://repo.magento.com/archives/vertex/module-tax/vertex-module-tax-3.0.0.0.zip)

the command:

composer create-project --repository=https://repo.magento.com/ magento/project-community-edition m2


texts: How to enable translate languages in magento2

texts:
How to show select language filter in frontend.
languages likes en,fr and etc.


texts: i want to make last name optional , can i do it via any setting in admin ?? or what will be best way to do it.. how can i do it via code , i tried setting customer attributes but no sucess


texts: how to join fields like product skus in sales order grid collection in magento2?

texts:
I want to join product skus and order comments and order product custom option in sales order grid collection.

I have aleady added columns in ui component but values is not rendered because of collection does not have this values.

I have tried with column renderer is working but filter is not working.

vender/modulename/Ui/Component/Listing/Columns/Skus.php

Is it possible to filter with sku in sales order grid ?
or is it possible to disable filter for one column then how ?

Please help me for fix this issue


texts: How do I install the MagMi for Magento 2 extension?

texts:
I have downloaded and extracted the MagMi M2 module from https://github.com/macopedia/magmi-m2 but I have no idea how to install it.

I tried copying it into the vendor dir in several locations, ran ./magento setup, but the module is nowhere to be found in my Magento 2 installation.

So, how do I install that module?


texts: custom form in frontend and using this form customer can get appointment

texts: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 10 bytes) in C:\wamp64\www\store\vendor\zendframework\zend-code\src\Scanner\FileScanner.php on line 36


texts:
First time I installed a module via ssh, and I accidentally make "composer update".
Now my site has this error:

1 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): Please update your modules: Run "composer install" from the Magento root directory.
The following modules are outdated:
Magento_Tax db schema version: defined in codebase - 2.0.2, currently installed - 2.0.3
Magento_Tax db data version: defined in codebase - 2.0.2, currently installed - 2.0.3

Exception #0 (Magento\Framework\Exception\LocalizedException): Please update your modules: Run "composer install" from the Magento root directory.
The following modules are outdated:
Magento_Tax db schema version: defined in codebase - 2.0.2, currently installed - 2.0.3
Magento_Tax db data version: defined in codebase - 2.0.2, currently installed - 2.0.3
#0 /home/r2gutenb/public_html/vendor/magento/framework/Interception/Interceptor.php(121): Magento\Framework\Module\Plugin\DbStatusValidator->beforeDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Magento\Framework\App\Request\Http))
#1 /home/r2gutenb/public_html/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(73): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#2 /home/r2gutenb/public_html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#3 /home/r2gutenb/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#4 /home/r2gutenb/public_html/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#5 /home/r2gutenb/public_html/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#6 /home/r2gutenb/public_html/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http->launch()
#7 /home/r2gutenb/public_html/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#8 {main}

What can I do?


texts: My new created block for footer links will not show up in frontend

texts:
I work in Magento 2.3.
I removed the general footer links by
<referenceBlock name="footer_links" remove="true"/>

But now i add a new block and widget but it wont show up.
I tried the next YouTube link but no result

https://www.youtube.com/watch?v=HrzSjBNqrho&list=PLtaXuX0nEZk9eL59JGE3ny-_GAU-z5X5D&index=22

Where is my mistake?
Regards Gerwin


texts:
I have a multi-store site, and i have 2 problems :

  1- When I create a product, I can only set the product for the
  main-website, and not the main-website/storegroup or view I want. Only
  one checkbox is displayed at the main-website level.

  2- I am not able to display the product created above in the specified
  category. I am sure it is set under the correct category, but
  $_productCollection=$this->getLoadedProductCollection(); is always
  empty.

The product "prod1" is a "simple product". The categories are set as
following :
Products
 --> Cartes (id 34)
 -------> Cartes de visites (id 38)

Below the executed query when I access the category "Cartes de visites" in the frontend :

SELECT `e`.*, `cat_index`.`position` AS `cat_index_position`, `price_index`.`price`, `price_index`.`tax_class_id`, `price_index`.`final_price`, IF(price_index.tier_price IS NOT NULL, LEAST(price_index.min_price, price_index.tier_price), price_index.min_price) AS `minimal_price`, `price_index`.`min_price`, `price_index`.`max_price`, `price_index`.`tier_price` FROM `zoccatalog_product_entity` AS `e`  INNER JOIN `zoccatalog_category_product_index` AS `cat_index` ON cat_index.product_id=e.entity_id AND cat_index.visibility IN(2, 4) AND cat_index.category_id = '38'  INNER JOIN `zoccatalog_product_index_price` AS `price_index` ON price_index.entity_id = e.entity_id AND price_index.website_id = '1' AND price_index.customer_group_id = 0 ORDER BY `cat_index`.`position` ASC LIMIT 12;
Empty set (0.00 sec)

After digging a little bit more, i found that the table 'catalog_product_index_price' is empty. Re-Indexing wont help.

Regards.


texts: Input field reloads the page when I click to write text

texts: When I click on the text area it immediately reloads the homepage. But it's working fine on the category page or on a sticky menu.


texts: show products of a category on home page in magento 1.9.2.2

texts:
i'm getting crazy right now. I'm setting up a template and this easy thing which was done in 5 minutes took my last 3 hours.

I can't figure out why this simple block thing for showing a category on home page is not working anymore in magento 1.9.2.2:

{{block type="catalog/product_list" name="home.catalog.product.list" category_id="7" template="catalog/product/list.phtml"}}

I found out that you have to whitelist that block... how to do this?!

Could anyone help me? I would really appreciate that!

Thanks a lot in advance!


texts: Change the 'Product Identifier' to another attribute in dataflow import profile

texts:
Unfortunately I have to use the dataflow profile in Magento (1.9.2.1) to update some prices. The problem is I have to use another attribute as the product identifier instead of the SKU.

Any ideas how can this be done?


texts: Magento2: Overwriting block file showing ReferenceError: opConfig is not defined

texts:
I want to overwrite this block file Magento\Catalog\Block\Product\View\Options\Type\Select.php

But I am getting ReferenceError: opConfig is not defined error while changing or selecting the custom option.

See screenshot.


texts: How to improve Magento performance by eliminating Apache .htaccess files?

texts:
Our setup is a Magento 2.3.3 store running on a dedicated (not shared) Linux host. We have full root access and can edit files as needed. The httpd server is Apache 2.4.41.

We have read several good articles on improving Magento performance. In those that we have seen, no mention is made of the fact that .htaccess files slow down Apache (and nginx) web servers.

In our pub directory, we have these .htaccess files:

pub/.htaccess
pub/errors/.htaccess
pub/media/.htaccess
pub/media/customer/.htaccess
pub/media/downloadable/.htaccess
pub/media/import/.htaccess
pub/media/theme_customization/.htaccess
pub/static/.htaccess

How can we address this?


texts: Magento 2. Flush cache programmatically for particular block

texts:
I'm creating catalog rule programmatically and I want to see update price block on category and product pages immediately after that. Is there way to flush cache for price block only?

Or what is the best solution here (use small ttl, etc)?


texts: Custom system.xml source model, ReflectionException class does not exist

texts:
Writing a new module and in my system.xml I can put the following:

<field id="environment" translate="label" type="select" showInDefault="1" showInWebsite="1" showInStore="1">
    Environment
    <source_model>Magento\Config\Model\Config\Source\Enabledisable</source_model>
</field>

And I get a select input with two options, Enable and Disable.

If I write my own Source class, and put the correct class namespace path, I get the following error:

Exception #0 (ReflectionException): Class Vendor\Module\Model\Config\Source\Environment does not exist

Environment.php

<?php

namespace Vendor\Module\Model\Config\Source;

use Magento\Framework\Data\OptionSourceInterface;

class Environment implements OptionSourceInterface
{
    public function toOptionArray()
    {
        return [
            ['value' => 0, 'label' => __('Sandbox')],
            ['value' => 1, 'label' => __('Production')]
        ];
    }
}

Updated system.xml field

<field id="environment" translate="label" type="select" showInDefault="1" showInWebsite="1" showInStore="1">
    Environment
    <source_model>Vendor\Module\Model\Config\Source\Environment</source_model>
</field>


texts: So I have a category in the navigation section that I would like to link to the same link that is in the footer. I've tried copying the link path that I used for the footer link and putting it in the category for the one in the navigation however it isn't working. So could someone please guide me through the process?


texts: Magento 2 : Default billing address not selected by default on checkout page

texts:
I am using Magento 2.0.7 and my default billing and shipping address are different in My account Address section.

When I am going on checkout page my default shipping address selected by default and I move on payment section but on payment section My shipping address by default set as billing address.

  I already mention default billing address then how we get that address selected by default ?


texts: FME Layered Navigation extention in left navigation

texts:
Magento 1.9.2.2

Hi all.
I have made a Magento store with several products and categories. After this I have installed A free module to enable layered navigation to have my future customers be able to make selections on color, size etc.

Unfortunately the module does not show up in the left_info_block.

I have left the Magento standard theme as it is out of the box.

It probably is something very basic, like adding a line to local.xml but I can't figure it out.
Who is willing to help me out with this?


texts: How is a product name retrieved if the query does not return it in the result set?

texts:
I'm trying to get data from catalog_product EAV tables with the following code:

$productCollection = Mage::getModel('catalog/product')->getCollection()
            ->addAttributeToFilter('type_id', ['eq' => Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE])
            ->addAttributeToFilter('status', ['eq' => Mage_Catalog_Model_Product_Status::STATUS_ENABLED])
            ->addAttributeToSelect('some_custom_attribute')
            ->addAttributeToSelect('name');

as you can see above, I have also called for some_custom_attribute to be sent with the result of the query.

Associated query for the above collection from getSelect() returns:

SELECT `e`.*, `at_status`.`value` AS `status` FROM `catalog_product_entity` AS `e`
 INNER JOIN `catalog_product_entity_int` AS `at_status` ON (`at_status`.`entity_id` = `e`.`entity_id`) AND (`at_status`.`attribute_id` = '96') AND (`at_status`.`store_id` = 0) WHERE (`e`.`type_id` = 'configurable') AND (at_status.value = 1))

The result of the query does not contain the name. However, when I do the following:

foreach ($productCollection as $product) {
            echo "Product is: ".$product->getId()." with name ".$product->getName()." with value of custom attribute ".$product->getSomeCustomAttribute()."\n";

It returns me the correct name of the product even though the name was not received as part of the query.

How is it that I'm able to get the value of name and some_custom_attribute even though the query result does not contain those columns?


texts:
I would like to add "nav-before-open nav-open" in html tag by default in Magento2. if any one have idea ?

I am trying to add a css class on html tag but not able to find any file, from where the html tag is rendered.

I have added class in body tag using below code

<body>
    <attribute name="class" value="demo"/>
</body>


texts: Magento 2 Get all attributes option in phtml

texts:
I have created an attribute with multiple options I have to get all option of in dropdown.

Attribute created: country
Options: India, USA, UK

below is my code in phmtl file

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$productCollection = $objectManager->get('Magento\Catalog\Model\ResourceModel\Product\CollectionFactory');
    /** @var \Magento\Catalog\Model\ResourceModel\Product\Collection $collection */
    $collection = $productCollection->create();
    $collection->addAttributeToSelect('country')
        ->addAttributeToFilter('country', array('notnull' => true))// get only not null values
        ->getSelect()->group('country');
print_r($collection);

it does not show all attribute option of the country.


texts: How to use different banner sliders for different store views in Magento 2?

texts:
I am trying to make a Hindi version of my website.

Things I am able to do:

Create a store view and use a different Locale setting for it.
Add different products for the different views, with translated keywords such as "Payment", "Add to cart", "Checkout" and stuff.

Thing I am stuck at:

My original store had a bannerslider (Magestore), and I want to display different images on the slider, when the Hindi website is selected.

But unfortunately, the view settings of the "Manage Banners" in the "top left corner" doesn't work.

Those settings aren't there in the Manage Slider settings, so I can't create a different slider for it.

I tried creating a different homepage from the CMS for the hindi website, but I can't really think of how to integrate a different slider for it.

Any help would be needed.

Thanks!


texts:
Recently upgraded to Magento enterprise edition 2.3.5-p2, I have a problem that occurs with a specific module during compilation:
SummaTheme\Widgets\Block\Banners\Product
            Incompatible argument type: Required type: \Magento\Catalog\Api\CategoryRepositoryInterface. Actual type: array; File:

I know how to solve this specific problem injecting the following dependency: \Magento\Catalog\Api\CategoryRepositoryInterface $categoryRepository.
My biggest problem is that I have tried to override the Block in a custom module inside app/code but then when I execute magento setup:di:compile throws the error again.
I need to do it without touching directly the module files because it's inside a module on the vendor folder.
Anyone has any idea of how to solve this?