texts:
Every one of my products 404 when i try using the SEO rewrite link, also when i direct link to the product page it 404's, my search as well doesn't work (which is probably is cause of this). I have read about every Magento Stack issue and each one that is suggested doesnt work for me.

What I've done so far.

Products
  They are enabled, quantity over 0, in stock, Visibility (Catalog,Search), Product in website (main website).

I have reindexed (all indexes are current to date), flushed cache, setup:upgrade, di:compile a bunch of times.

I have checked the sequence_product table each of my id's on in there

In configuration catelog search engine opt the product and category url suffix is blank and i have refreshed the cache.

I may be missing something since I feel I have tried everything.

Not sure exactly what else to do I would appreciate any suggestions.

Please dont mark this a duplicate since I have tried each 404 magento product question and they do not work for me. Dont have enought rep to comment on those posts.

Thanks Magento Community.

Best,


texts: Product page edit error "there is error processing your request"

texts: i have following concern, as whenever i try to open the product to edit in  admin panel it showing me the following error, as attached


texts: Need help with CSS for placing span on top of an input field

texts:
I am trying to make input text for street address turn red if it is too long, like in this fiddle.

For that I have created a  in the "input-box" div like this:

                *<?php echo $this->__('Street Address') ?>

                    <input type="text" name="street[]" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet(1)) ?>" title="<?php echo $this->__('Street Address') ?>" id="street_1" class="input-text <?php echo $_streetValidationClass ?>" />

Which does what I want.

The problem is that I need to get this span on top of the input field and make the actual input text transparent so it looks natural.

Test site

You can play around with the CSS on my test site

e-mail: test@test.com
password: test123

(only the first address field)

I don't have a lot of experience in web design and I realise that this is more of a general question and not Magento, but there is something with Magento CSS classes that interferes with what I am trying to do, I cannot figure out what.


texts: Customize Magento2 sales email, in especial items.phtml

texts:
We are struggling since hours with customization of the Order- and other sales emails. The part with the email templates (e.g. order_new_guest.html etc.) works easily fine.

However, we do not succeed in modifying items.phtml.

We did
- generate a xml sales_email_order_items.xml in <mytemplate>/Magento_Sales/layout

tried to reference our items.phtml with  <action method="setTemplate">
written items.phtml in <mytemplate>/Magento_Sales/email
but we don't get any change in the emails.

Probably, this is because we don't locate the .xml file in the proper directory? How do we have to reference our items.phtml within this xml-File? And which directory do we put the items.phtml in?

We have understood lots of thing in Magento theme inheritance during the last weeks... but email templates seem to be the next stage :(


texts: Creating duplicate simple product will result to error in Magento 2

texts:
I'm working with a site built with magento 2.1.2.

The problem is when going to admin and when I open a simple product and create a duplicate of that simple product. It will result into this error.

Thanks,


texts: How to set 30% discount on all products in magento shop

texts: I want to set 30 % discount for all the product in my eshop, Is there any extension or any custom way i can made able to get this option.


texts: The way to renovate Mage site (live -> develop -> live)

texts:
we have some live sites since Mage 1.4 and are now @ 1.7

We want to upgrade/renovate the site by adding new modules, removing old, and changing the theme + CSS. Now I have always been wondering what the (best) techique is to make a copy of a live site, make changes, copy back to live + update the orders that were made in the meantime.

LIVE SITE -> BACKUP SITE + BACKUP SQL
Install on WAMP? or COPY SITE URL?
Make changes
Export orders made in meantime in LIVE site and make full backup
OVERWRITE LIVE SITE PHP + SQL DB
Import the orders

Is this the way to go?

I read many articles on GIT etc, but our ISP doesnt offer thesse kind of service


texts: Magento 1.9 Custom Module not activating

texts:
I have a custom module that I can't get to activate. I have the following in app/etc/modules/DBCustom_Quote:

<config>
    <modules>
        <DBCustom_Quote>
            <active>true</active>
            <codePool>local</codePool>
        </DBCustom_Quote>
    </modules>
</config>

And the following in app/code/local/DBCustom/Quote/etc/config.xml:

<config>
    <modules>
        <DBCustom_Quote>
            <version>1.0.0</version>
        </DBCustom_Quote>
    </modules>
    <global>
        <models>
            <dbcustom_quote>
                <class>DBCustom_Quote_Model</class>
            </dbcustom_quote>
        </models>
        <events>
            <ophirah_qquoteadv_admin_swith2Quote_after>
                <observers>
                    <dbcustom_sendemail>
                        <class>DBCustom_Quote_Model_Observer</class>
                        <method>sendEmail</method>
                        <type>singleton</type>
                    </dbcustom_sendemail>
                </observers>
            </ophirah_qquoteadv_admin_swith2Quote_after>
        </events>
    </global>
</config>

But it won't show up in Admin->Configuration->Advanced->Advanced. I have tried flushing the cache multiple times through the admin Cache Management page and through the CLI and none of it works. Is there something I'm missing?


texts: Magento 2.2: How to save data from custom field in sales_order_address table?

texts:
I added a custom field in checkout and want to save data in sales_order_address table. I successfully saved that data in quote, sales_order and sales_order_grid tables.

Here is my UpgradeSchema.php code:

<?php

namespace VendorName\ModuleName\Setup;

use Magento\Framework\Setup\UpgradeSchemaInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\SchemaSetupInterface;

class UpgradeSchema implements UpgradeSchemaInterface
{

/**
 * {@inheritdoc}
 */
public function upgrade(
    SchemaSetupInterface $setup,
    ModuleContextInterface $context
) {
    $installer = $setup;

    $installer->startSetup();

    $eavTable1 = $installer->getTable('quote');
    $eavTable2 = $installer->getTable('sales_order');
    $eavTable3 = $installer->getTable('sales_order_grid');
    $eavTable4 = $installer->getTable('sales_order_address');

    $columns = [
       'custom_field' => [
           'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
           'nullable' => true,
           'comment' => 'Custom Field',
       ]

    ];

    $connection = $installer->getConnection();
    foreach ($columns as $name => $definition) {
      $connection->addColumn($eavTable1, $name, $definition);
      $connection->addColumn($eavTable2, $name, $definition);
      $connection->addColumn($eavTable3, $name, $definition);
      $connection->addColumn($eavTable4, $name, $definition);
    }

    $installer->endSetup();
  }
 }

And here is my di.xml file:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
 <type name="Magento\Checkout\Model\ShippingInformationManagement">
  <plugin name="save_to_quote_table" type="VendorName\ModuleName\Plugin\Quote\SaveToQuote" sortOrder="10"/>
  </type>
 <virtualType name="Magento\Sales\Model\ResourceModel\Order\Grid" type="Magento\Sales\Model\ResourceModel\Grid">
    <arguments>
        <argument name="columns" xsi:type="array">
            <item name="custom_field" xsi:type="string">sales_order.custom_field</item>
        </argument>
    </arguments>
</virtualType>
<virtualType name="Magento\Sales\Model\ResourceModel\Order\Address" type="Magento\Sales\Model\ResourceModel\Address">
    <arguments>
        <argument name="columns" xsi:type="array">
            <item name="custom_field" xsi:type="string">sales_order.custom_field</item>
        </argument>
    </arguments>
</virtualType>
</config>

The custom_field column shows up in all 4 tables (quote, sales_order, sales_order_grid and sales_order_address), but only saves data in 3 of them (quote, sales_order and sales_order_grid). How do I save it in sales_order_address too ? What am I missing ?

And if I successfully save it in sales_order_address, can I use that field in Customer Configuration / Address Templates / HTML like this: {{depend custom_field}}Custom field:{{var custom_field}}{{/depend}} ?


texts: Magento 2 check customer is registered or not by using Id?

texts: Magento 2 how to check customer is registered or not by using Id?


texts: How to programmatically reindex product after update ex. price/stock quantity

texts:
how to programmatically reindex product after update ex. price/stock quantity using Magento ver. 2.3.2 API via Swagger? I do application in C# which sync my system with Magento. I have a lot of article, so I think migrate ex. Pirce using catalogBasePriceStorage. But after that, i must manually reindex from admin panel.
s there any way to execute reindex from Magento Api?


texts: How to get vendor wise order splitting in magento 2?

texts:
Hi Friends I am using Magento 2.2.4 version so i need one help so below i mentioned scenario so please help me

  I had to split orders based on the vendor/seller selling that product.

  Like, for example, if someone orders Product1, Product2 and Product3,
  where Product1 and Product2 are sold by Vendor1 and Product3 is sold
  by Vendor2.

  Then, 2 orders with different Order Ids must be created where the
  Order1 will have details regarding the order of Product1 and Product2
  and the Order2 will have the details regarding the order of Product3.

i saw this below link but its not working

Magento multiple order on one checkout or order splitting

Magento2 Split Order Based on Vendor

event i am using : checkout_submit_all_after


texts: Magento2 API update multiple inventory items

texts:
I'm developing integration with magento. My client want to update his inventory via REST or API, the problem is that he has thousands of products and it will take a lot of time to update them one by one. I didn't found the way to update many inventory items neither from SOAP nor from REST. (For previous versions i used catalogInventoryStockItemMultiUpdate)

How to update a lot of inventory items in 1 call?


texts: automatically email invoice and shipment after creating

texts:
How can I make magento automatically email invoice/shipment after I create them.

what happens now is that:

1) I a create the invoice/shipment and then

2) I open the invoice/shipment and press send email.

I don't want to do the second step, I want the email to be send once the invoice/shipment created.


texts: Magento 2 - Display all products on homepage

texts:
I'm trying to add a overview of all products with filter on the Homepage of my Magento store. I followed the following tutorial from PHP Cuong which I got up and running.

https://github.com/php-cuong/magento2-one-page-products

Currently I have a separate page with the following url "/phpcuong/product/onepage" which shows an overview of both the product filter and the products. But what I want to achieve is to have the content of this page (All products and the productfilter) to pop-up as part of my homepage.

I was not able to find any other thread about this topic. Most threads I found add products to the homepage with block shortcodes.


texts:
When updating my magento shop, I would like to redirect all IP except mine to maintenance page.

I used to do that with .htaccess file :

############################################
## enable rewrites

    Options +FollowSymLinks
    RewriteEngine on

RewriteBase /
RewriteCond %{REMOTE_HOST} !^1.2.3.4
RewriteCond %{REMOTE_HOST} !^5.6.7.8
RewriteRule .* http://www.google.fr [R=302,L]

It was working well, but I now have some problems. Sometimes it works, sometime not, and I have to disable redirection to access my site. Sometimes I can access the frontend but not the backend...

Any idea?

Thanks for your help,


texts: Get attribute text instead of id in custom customer grid

texts:
I want to show a custom attribute of a customer in the adminhtml customer grid.
I managed to do this by creating a new module, and extends the setCollection method of Mage_Adminhtml_Block_Customer_Grid

public function setCollection($collection)
    {
        $collection->addAttributeToSelect('x_customer_category');
        parent::setCollection($collection);
    }

And I add the column via observer to the view

/**
     * Adds column to admin customers grid
     *
     * @param Varien_Event_Observer $observer
     *
     * @return Mscg_TemplateOverwrite_Model_Customer_Observer
     */
    public function addCustomerGroupToGrid(Varien_Event_Observer $observer)
    {
        $block = $observer->getBlock();
        if (!isset($block)) {
            return $this;
        }

        if ($block->getType() == 'adminhtml/customer_grid') {
            /* @var $block Mage_Adminhtml_Block_Customer_Grid */
            $block->addColumnAfter('x_customer_category', array(
                'header' => 'x_customer_category',
                'type'   => 'text',
                'index'  => 'x_customer_category',
            ), 'email');
        }
    }

However, since this is a option-wise attribute I only get the id of the selected value for the customer but I do want the textvalue, not the entity value of given attribut.

How can I do that?


texts: Import products not escaping forward slash in category

texts:
I'm trying to import products into v2.2.7 but apparently this has been a problem since 2016 and has not been resolved until v2.3.x.

When importing to magento, some categories are like Socks/types a / b. When i import without changing anything, the structure is like the following:

Socks
`-- types a
    `--  b

If i use ascii, i end up with the right text visually in the backend, but my URL strings all are ascii and the back-end clean URL isn't correct using &#47; and products that should be nested under it do not get nested appropriately.

Socks
`-- types a / b

If I upload category looking like this Socks/types a \/ b, I end up with the following:

Socks
`-- types a \
    `--  b

The ascii and the escape option are discussed in an issue here. Escaping could be the perfect solution for import because I could easily handle the hundreds of records.

The solution suggested in this thread is the following:

// In \Magento\CatalogImportExport\Model\Import\Product\Category there is a function upsertCategory.

protected function upsertCategory($categoryPath)
{
    if (!isset($this->categories[$categoryPath])) {
        $pathParts = explode(self::DELIMITER_CATEGORY, $categoryPath);
        $parentId = \Magento\Catalog\Model\Category::TREE_ROOT_ID;
        $path = '';

        foreach ($pathParts as $pathPart) {
            $path .= $pathPart;
            if (!isset($this->categories[$path])) {
                $this->categories[$path] = $this->createCategory($pathPart, $parentId);
            }
            $parentId = $this->categories[$path];
            $path .= self::DELIMITER_CATEGORY;
        }
    }

    return $this->categories[$categoryPath];
}

However, i'm new to magento and don't see \Magento\CatalogImportExport in the directory structure. I looked in vendor and don't see CatalogImportExport there either.

I have a script that can replace all the / with \/. However, magento is not escaping the \/. The desired directory structure when importing
Socks/types a \/ b is:

Socks
`-- types a / b

Does anyone know how I can make this work in v2.2.x or especially v2.2.7?


texts: How to Change Magento 2.2 Customer Password Hash During the Account Creation

texts: I want to change magento 2 default customer hash password to compatible with some other applications related to registering customers. currently i'm using magento 2.2.5 and I was unable to got solution of covert password_hash to plain text. Are there any possibilities to do this ?


texts: Magento 2.3 - Unpredictable Error - Shipping Matrix Rate calculation partially working error

texts:
I am using webshop shipping matrix rate, if cart value below 50 then only showing shipping methods, above 50 not shown, how to solve this error?
Note: There is no relevant log error
Database : https://snipboard.io/linb4Y.jpg


texts: 503 Service Temporarily Unavailable Magento2 Error no flag

texts:
I was trying to print an order collection array (\Magento\Sales\Model\ResourceModel\Order\CollectionFactory), but it never gets printed, I know the reason.

Now when I reload my browser, I get a 503 Service Temporarily Unavailable everywhere, frontend and backend.

There is no maintenance.flag or even .maintenance.flag anywhere in var/ folder.

Mode - developer,
Hosted on NGINX, plesk (other sites on same server working). I tried deleting cache, indexing, static contents deploy everything.

The error in /var/log/nginx/error.log is:

  2018/02/22 11:36:56 [notice] 9870#0: signal process started
  2018/02/22 11:36:56 [error] 9870#0: open() "/var/run/nginx.pid" failed (2: No such file or directory)

Kindly help!


texts:
Magento 2.3.3 - JS not getting minified

Project in prodcution mode and js minified activate.

CSS minified working properly but not JS.

https://snipboard.io/RZwqmC.jpg

Thanks


texts: Magento 2: While running "vendor/bin/phpcbf" Uncaught Error: Class 'PHP_CodeSniffer\Runner' not found

texts:
I have faced issue in "vendor/bin/phpcbf" command for resolving custom extension coding standard.
I am using Magento ver.2.3.1
Running command in project root:

vendor/bin/phpcbf "app/code/Namespace/MyModule"

But while running command through below error:

PHP Fatal error:  Uncaught Error: Class 'PHP_CodeSniffer\Runner' not
found in /var/www/html/magento/vendor/bin/phpcbf:17 Stack trace:
0 {main}   thrown in /var/www/html/magento/vendor/bin/phpcbf on line 17

Any help would be appreciated. Thanks.


texts: local.xml Url Helper for skin/images folder

texts:
I have added a top.link and want to include an image inside the label. I'm not sure how to get the current_skin/images folder from within my local.xml though.

This is what I have so far

        <action method="addLink" translate="label title">
            <![CDATA[]]> Klantenservice
            <url>klantenservice</url>
            <title>Klantenservice</title>
        </action>


texts: How to show currency symbol and price in separate elements?

texts:
I want to show currency symbol and amount in separate html elements such as:
BD18.00

into this:

BD18.00

is it achievable?


texts: Magento 2 How to change the Order number sequence

texts:
How to change the Order number sequence in Magento2?

The default sequence 000000001, why there is no setting in Magento 2 CP to modify that?


texts:
I have been looking for a solution to display individual products on a CMS page.  I found this link on Magento exchange, and also this other link, but they both break the page!

Is there any other solution to add up to 8 products to a CMS page?


texts: How do I get a Simple Product Name of the Configurable into minicart

texts:
Edit DefaultItem.php file doGetItemData() function as below

vendor/magento/module-checkout/CustomerData/DefaultItem.php

protected function doGetItemData()
    {
    $imageHelper = $this->imageHelper->init($this->getProductForThumbnail(), 'mini_cart_product_thumbnail');

    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $productObject = $objectManager->get('Magento\Catalog\Model\Product');
    $sku = $this->item->getProduct()->getSku();
    $simpleProduct = $productObject->loadByAttribute('sku', $sku);

    return [
        'options' => $this->getOptionList(),
        'qty' => $this->item->getQty() * 1,
        'item_id' => $this->item->getId(),
        'configure_url' => $this->getConfigureUrl(),
        'is_visible_in_site_visibility' => $this->item->getProduct()->isVisibleInSiteVisibility(),
        'product_name' => $this->item->getProduct()->getName(),
        'simple_product_name' => $simpleProduct->getName(),
        'product_sku' => $this->item->getProduct()->getSku(),
        'product_url' => $this->getProductUrl(),
        'product_has_url' => $this->hasProductUrl(),
        'product_price' => $this->checkoutHelper->formatPrice($this->item->getCalculationPrice()),
        'product_price_value' => $this->item->getCalculationPrice(),
        'product_image' => [
            'src' => $imageHelper->getUrl(),
            'alt' => $imageHelper->getLabel(),
            'width' => $imageHelper->getWidth(),
            'height' => $imageHelper->getHeight(),
        ],
        'canApplyMsrp' => $this->msrpHelper->isShowBeforeOrderConfirm($this->item->getProduct())
            && $this->msrpHelper->isMinimalPriceLessMsrp($this->item->getProduct()),
    ];
}

Then you can use it in below file

app/design/frontend/Vendor/your-theme/Magento_Checkout/web/template/minicart/item/default.html

Replace this

From


texts: How to create or show popup while clicking "Next" button at checkout page in magento 2

texts:
I wish to create popup modal to show notification message while clicking 'Next' button at checkout page.
How to add this popup at checkout page ?
Please provide solutions


texts: can't call controller in magento2 2.0.0-rc?

texts:
i have custom module.  i can't call controller  in view of my module.
this url call

http://localhost/magento2-2.0.0-rc/index.php/namespace/modulename/product/view/custom/

Code file Custom.php in Namespace/Modulename/Controller

namespace Namespace\Modulename\Controller;
class Custom extends \Magento\Framework\App\Action\Action
{
    /**
     * Index action
     *
     * @return $this
     */
    public function execute()
    {
        $resultRedirect = $this->resultRedirectFactory->create();
        return $resultRedirect->setPath('/');
    }
}

This file Custom.php in Namespace/Modulename/Controller/Product/View

<?php
/**
 *
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
namespace Namespace\Modulename\Controller\Product\View;

class Custom extends \Namespace\Modulename\Controller\Custom
{

     protected $resultForwardFactory;

    protected $resultPageFactory ;
     protected $_coreRegistry;
    /**
     * @param \Magento\Backend\App\Action\Context $context
     * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
     */
    public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Magento\Framework\View\Result\PageFactory $resultPageFactory,
        \Magento\Framework\Controller\Result\ForwardFactory $resultForwardFactory,
        \Magento\Framework\Registry $registry

    ) {
        $this->resultForwardFactory = $resultForwardFactory;
        $this->resultPageFactory  = $resultPageFactory;
        $this->_coreRegistry = $registry;
        parent::__construct($context);
    }

    public function execute()
    {
        $data = $this->getRequest()->getPostValue();
        print_r($data); die('xx');
    }
}

Edit
 routes.xml in etc/frontend

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="standard">
        <route id="modulename" frontName="modulename">
            <module name="Namespace_Modulename" />
        </route>
    </router>
</config>


texts: How to add arguments in magento category URL

texts:
I want to add my custom arguments on categroy url. For example I have 3 custom filters (links) on the category page (red, green, yellow) and the category page url is like:

localhost/test/sale/accessories.html

Now when a customer clicks on "red" the url should be like:

localhost/test/sale/accessories.html?color=1

Please help me on this.

I have modified two files already: toolbar.phtml and list.phtml


texts: Observer when saving a Customer object that saves other Customer attribute - Infinite Loop

texts:
Whenever a new customer is created or modified, I want to add a new custom attribute into that customer.

I've created a customer observer but I'm obviously getting an infinite loop. When updating the customer, the observer is called and the new attribute is saved so the observer is called again and again...

These are my observers:

<events>
  <customer_save_after>
    <observers>
      <mycompany_customer_observer>
        <type>singleton</type>
        <class>mycompany_customer/observer</class>
        <method>addVisa</method>
      </mycompany_customer_observer>
    </observers>
  </customer_save_after>
  <customer_register_success>
    <observers>
      <mycompany_customer_observer>
        <type>singleton</type>
        <class>mycompany_customer/observer</class>
        <method>addVisa</method>
      </mycompany_customer_observer>
    </observers>
  </customer_register_success>
</events>

How can I store a new attribute in the customer whenever it's created or updated?


texts: How could I customize Magento 2.3.6 product detail page (for a specific product) to NOT allow a customer to Add to Cart unless the customer checked a minimum of 4 custom options checkboxes out of 10 possible custom option checkboxes?


texts: How can I get the email template ID by code? Magento 2

texts:
How can I get the template ID by its template name?

Thanks!


texts: Magento : Product Attribute Value Not Getting In Custom Model

texts:
I am trying to get some attribute value for product in my custom created model. However some values are getting and some not. Also those attributes values are getting for other products, but not for one product only. I checked in back-end , but values are stored for that product in back-end.

Please help me to get attribute value. Thanks


texts: how to display the customer name after confirming via email in magento 2

texts:
When confirming account via email getting this, it is not showing customer name

but it's shows only when I logged in (displaying customer name) .

I want to show customer name after confirming account via email.

how I can solve this ....


texts:
We set up a multistore with subdomain. Our problem is when we save or update a product we have an redirect to subdomain url. But the product is saved/updated.

Hope for help :)

PS: srry for my english


texts:
I would like to hide the voice "Tax" in the cart summary only for one store view.

I tried changing some combination in Admin > Configuration > Sales > Tax but it doesn't works.
What should I have to do? Thank you so much!!


texts: How to write Recurring scripts patch in Magento 2

texts:
How to create a data patch which execute every setup upgrade command.
We can run it after deleting from patch_list table but is there any other way ?


texts:
Using Magmi v.0.7.21 to upload images to products in Magento 1.7. I am having some issues while uploading new images to products that already has some images.

The issue is that, when I upload new images with new base image set, the old base image gets deleted. The behaviour I expect is to change the base image flag and keep the old base image in the gallery instead of completely removing the old image.

I am new to Magmi and I'm not sure what details are needed to figure out this issue. I can update the question if someone asks me for more specific details. Any help is much appreciated.


texts: Join attribute lable in product collection

texts:
I'm creating one grid which will have to below columns like SKU,Name and Color (Attribute)

So to achieve this We've to join color data to collection for that I've added _initSelect to collection class.

public function _initSelect()
    {
        parent::_initSelect();
         $select = $this->getSelect()->joinLeft(
            ['secondTable' => $this->getTable('catalog_product_entity_varchar')], //2nd table name by which you want to join
            'main_table.entity_id= secondTable.entity_id',
            ['value']
        );

        return $select;
    }

I stuck here how can I join attribute label based on its value and render that column to grid ?


texts: Magento 2.2.6 - Change the product name title

texts:
how I can change products name attribute. I create a new attribute second_name and I assigned to all products, now I want this attribute to replace the default name attribute. I need to change this on products view page.

I try to add something like this but is not working:

   namespace Company\Module\Helper;

    class Data extends \Magento\Framework\App\Helper\AbstractHelper
    {
        protected $registry;

        public function __construct
        (
            \Magento\Framework\Registry $registry
        ) {
            $this->registry = $registry;
        }

        public function getTitle()
        {
            $this->product = $this->registry->registry('product');
            $title = $this->product->getAttributeText('second_name');
            return $title;
        }
    }

and I add this code in catalog_product_view.xml

<referenceBlock name="page.main.title">
    <action method="setPageTitle">
        <argument name="title" xsi:type="helper" helper="Company\Module\Helper\Data::getTitle"></argument>
    </action>
</referenceBlock>

So in product view page instead Product Name I need to be my custom attribute.

Thanks


texts: What determines that Fallback Model starts with ?

texts:
What determines that Fallback Model starts with opening page.xml and <block type="page/html" name="root"..> ?

I mean, what differ this block from others that make it special, the name?


texts: Magento2 - i18n:collect-phrases override csv file

texts:
I've a Magento2 application with A LOT of texts and sometimes I have to add new phrases that need to be translated as well.

To wrap text that needs to be translated I use:

<?php echo __("Lorem ipsum ..")?>

Then I edit the csv file in i18n theme's folder.

In order to add new string to the file, I run magento i18n:collect-phrases, but it overrides the .csv output file in the theme directory, so I lose the old translations.

I think I'm not understanding how to correctly generate and use translation dictionaries, can you pls explain it here?


texts: Magento 2 module still working after dependent module is getting disabled

texts:
I'm trying to make a depend module A to module B using  tag in module's config file. But if I disabling module B, module A is still working. How one can fully define dependency in Magento 2?

In general:
what is the difference between "Soft Dependency" and "Hard Dependency" in Magento 2?


texts: Install attributes through the php installer of a custom module

texts:
Can anybody tell me how I can add multiple attributes in 1 install file of a custom module? In this case I also want to add them to the tab attributes but it doesn't work.

Just a beginner so I hope somebody can help me

enter link description here


texts: DHL Shipping Method not show on checkout page

texts:
DHL shipping method did not show on checkout while I put valid credential and it gives this error "This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us."
anybody help me I am using Magento 2.3.1


texts:
https://humveepart.com/full-restoration/

my  h3 tags are wrapping around the p tags and I can't find out what is causing this issue


texts: What is summaryQty Parameter in Item.php

texts:
In Item.php file in app/code/core/Mage/CatalogInventory/Model/Stock/ there is the function

checkQuoteItemQty($qty, $summaryQty, $origQty = 0) ...

What is different in qty parameter and summaryQty parameter.


texts: Edit order products after invoice, but before shipping. Code? or extension?

texts:
we sell clothing in sizes. Very often a customer emails 1 minute after placing the order "can i change the size". We ar enot looking for a full re-do of order management, grid etc. Just a way to quickly change the size of an order item. Or change the product from e.g. grey -> white shirt. Price is almost always the same.

can this be done easily through code? Or a simple extension?


texts:
I am using Magento 2.1.0, and i want  to create custom login page and registration page with custom group.

So I am trying  to override the customer login controller, and Phtml files.

But I don't understand what all changes needed their to assign the other group and MINI TUTORIAL: CREATE YOUR OWN LOGIN PAGE USING MAGENTO’S ACCOUNTCONTROLLER which all file need to override.

and will it work like as customer login?

I found this tutorial , But it is for magento 1.x and not for other group


texts: How to pass Data from a UI Component Form to a Controller?

texts:
Hey I'm beginner at Magento 2, and i don't know to much about UI component...
I'm creating a register form, and i want to pass Data of a UI Component Form to a Controller.
So i have a Form and i got a Button that i want to use it to get value from a dropdown field(combobox) of the Form.
I made the Block and the Controller, ok, the Block is calling the Controller right. But i don't know how to pass a specific value of the form to the controller. How can i do this?
I tried to use this command:  $this->getRequest()->getParams(); but only returns ID and KEY.
And when i tried this command: $this->getRequest()->getPostValue(); it just returns an empty array...
Any help is appreciated !
DeleteHeader.php (Controller):
 public function execute()
{
    $resultRedirect = $this->resultRedirectFactory->create();

    $id = $this->getRequest()->getParam('id');

    $this->save->getCombo();

    $txt = 'DELETE HEADER : ' .  $id;
    $this->logger->log('DEBUG', $txt);

    return $resultRedirect->setPath('api/data/edit/id/' . $id);
}

DeleteHeader Block (Button):
public function getButtonData()
{
    $url = $this->getUrl("api/data/deleteheader", ['id' => $this->getDataId()]);
    return [
        'label' => __('Delete Header'),
        'class' => 'custom-button-class',
        'data_attribute' => [
            'mage-init' => [
                'button' => ['event' => 'deleteheader'],
            ],
        ],
        'on_click' => "confirmSetLocation(' Certeza ? ','" . $url . " ')",
        'sort_order' => 80,
    ];
}


texts: Include CMS Block in Template includes HTML-Tag and Doctype

texts:
We have some problems when we include static cms blocks into the template with our Magento 1.7.0.1

We include the cms block this way:

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('cms-block-name')->toHtml() ?>

The problem is that the Doctype and HTML-Structure is included everytime with the cms block. We don't know how and can't find a way to fix it.


texts: How to override customer AccountController without modifying the core in magento?

texts:
I have overridden the AccountController of customer for a functionality which will redirect user to a specific page after checkout login.
For which I had to pass some parameter to the _loginPostRedirect() method as follows..

My override functions..

public function loginPostAction()
{
    if ($this->_getSession()->isLoggedIn()) {
        $this->_redirect('*/*/');
        return;
    }
    $session = $this->_getSession();

    if ($this->getRequest()->isPost()) {
        $login = $this->getRequest()->getPost('login');

        .......
        .......
        .......
        .......
    }
        .......
        .......
    $this->_loginPostRedirect($login); //here I have passed the parameter
}

protected function _loginPostRedirect($login)
{
    .....
    .....
    .....
    if(isset($login['isMobCheckout'])){
        $this->_redirectUrl($login['isMobCheckout']);
    }
    else{
        $this->_redirectUrl($session->getBeforeAuthUrl(true));
    }
}

So when I execute this the following error is coming..

  Strict Notice: Declaration of Newcustom_Customer_AccountController::_loginPostRedirect() should be compatible with Mage_Customer_AccountController::_loginPostRedirect()

So I have passed the same variable in the core functions even if there is no use, And then it works fine.

But I did modify the core file which will be a problem while upgrading the system.

Could anyone please suggest whether it will be alright or is there any other methods present for doing the above functionality to avoid modify in core methods ?


texts: How to fix "Unable to unserialize value. Error: Syntax error" Magento 2.3.2

texts:
Hello, Guys!

I get this error, please help me solve it...

String value:

  a:1:{s:14:"logotype_image";s:57:"/frontend/Alias/mysite/web/images/logo_grey.svg";}

And
json_last_error = 4

The string value comes from the database.

How to fix it?


texts: Magento 2 : var/Generation Magento Tutorial

texts:
Can you Suggest any tutorial for var/generation and Patterns in Magento 2.

Please Provide video Related materials.

Thanks


texts: Update behaviour in csv not working as expected

texts:
I have a custom table with columns :

And My product csv file has SKUs

SKU        (product_id from backend)

OUTIPCAM11 (98)

OUTIPCAM12 (99)

OUTIPCAM13 (100)

OUTIPCAM14 (101)

OUTIPCAM15 (102)

OUTIPCAM16 (103)

OUTIPCAM17 (104)

OUTIPCAM18 (105)

Now in Magento\CatalogImportExport\Model\Import\Product.php

  protected function _saveProducts()
{
    //$this->_init('Vendor\Module\Model\ResourceModel\Queue');
    $priceIsGlobal = $this->_catalogData->isPriceGlobal();
    $productLimit = null;
    $productsQty = null;

    while ($bunch = $this->_dataSourceModel->getNextBunch()) {
        $entityRowsIn = [];
        $entityRowsUp = [];
        $attributes = [];
        $this->websitesCache = [];
        $this->categoriesCache = [];
        $tierPrices = [];
        $mediaGallery = [];
        $uploadedImages = [];
        $previousType = null;
        $prevAttributeSet = null;
        $existingImages = $this->getExistingImages($bunch);

        //custom code

        //$tableName = $this->_resourceFactory->create()->getTable('tgs_queue');
            $tagmodel =  $this->_objectManager->create('Vendor\Module\Model\Queue');

        foreach ($bunch as $rowNum => $rowData) {
            if (!$this->validateRow($rowData, $rowNum)) {
                continue;
            }
            if ($this->getErrorAggregator()->hasToBeTerminated()) {
                $this->getErrorAggregator()->addRowToSkip($rowNum);
                continue;
            }
            $rowScope = $this->getRowScope($rowData);

            $rowSku = $rowData[self::COL_SKU];

            if (null === $rowSku) {
                $this->getErrorAggregator()->addRowToSkip($rowNum);
                continue;
            } elseif (self::SCOPE_STORE == $rowScope) {
                // set necessary data from SCOPE_DEFAULT row
                $rowData[self::COL_TYPE] = $this->skuProcessor->getNewSku($rowSku)['type_id'];
                $rowData['attribute_set_id'] = $this->skuProcessor->getNewSku($rowSku)['attr_set_id'];
                $rowData[self::COL_ATTR_SET] = $this->skuProcessor->getNewSku($rowSku)['attr_set_code'];

            }

            $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/_saveProducts.log');
            $logger = new \Zend\Log\Logger();
            $logger->addWriter($writer);
            $logger->info("Product_ids: [ ".$this->skuProcessor->getNewSku($rowSku)['entity_id']." ] ");
            //custom line
            $tagProductId = $this->skuProcessor->getNewSku($rowSku)['entity_id'];
            /* $getId =  $tagmodel->getCollection()
                                ->addFieldToFilter('entity_id',['in' => $tagProductId]); */

             $getId=$tagmodel->load($tagProductId);
                    //$logger->info("Tag Collection : [ ".$tagmodel->load($tagProductId)." ] ");

            if(!$getId->getId()) {
                $tagmodel->setEntityId($tagProductId);
                $tagmodel->save();
            }

         ....Rest is the core code....

Now im updating a single product sku say of the product id 98...
When i import the csv, All the SKU product_ids are getting saved(see the snap in entity_id column) even though i dint make any change to other products.

I want the id to be saved only for that product which i updated in csv.

Whats wrong in the custom code?


texts:
I have 2 ways to fetch a model object:

$orderId = 18;
/** @var \Magento\Sales\Model\Order $firstOrder */
$firstOrder = $this->_orderFactory->create()->load( $orderId);

/** @var \Magento\Sales\Model\ResourceModel\Order\Collection $orderCollection */
$orderCollection = $this->_orderCollectionFactory->create();
$secondOrder = $orderCollection->addFieldToFilter('entity_id', $orderId)->getFirstItem();

/** @var \Magento\Sales\Model\ResourceModel\Order\Collection $orderCollection */
$orderCollection = $this->_orderCollectionFactory->create();
$thirdOrder = $orderCollection->addFilter('entity_id', $orderId)->getFirstItem();

The first one is using load() method of model object.

The 2 last one use collection to fetch and then get the first item of those collections.

I know load() is deprecated, but as I can see Magento 2 core modules use it a lot.

Somebody, please tell me what option is better?

And by the way, what is the diffirent between addFilter() and addFieldToFilter().


texts: SOAP XML under Web Services - Magento 1.5.1.0

texts:
I have a client that I had to redo his website after he tried upgrading from 1.5.1.0 to 1.7.0.2.

I installed a fresh version of 1.5.1.0 and then copied bits and pieces over from the database like products, sales, categories and customers. I was unable to bring over any extensions without the site breaking. I got his site back up running just fine, but now he is saying that SOAP XML is missing from web services.

I am used to Magento 1.7 so I don't know much about version 1.5.1.0.

Does Magento 1.5.1.0 have SOAP XML under web services? If so why doesn't it show for me? If not how can I get it?


texts: Magento 2 How Sales Graph Work on Dashboard

texts:
Can anyone Explain How Sales graph on Magento Dashboard work.?

can anyone explain what the numbers are showing on this report?


texts:
I'm trying to use the inbuilt Magento (1.9) profiler to find some bottlenecks.
I've uncommented the line in the index.php and also enabled profiling under developer.
It's working as I'd expect in the admin area with large table of all the processes but on any page on the frontend it's just showing

[profiler]
Memory usage: real: 50855936, emalloc: 49801712
Code Profiler   Time    Cnt Emalloc RealMem

And that's all, no other data.  I've cleared cache and all that good stuff.  I've viewed source and it's not in there.

Any thoughts?


texts: Wrong file in vendor/magento/framework/Image/Adapter/Gd2.php:64 when i install magento 2.3

texts:
Please help me.

It's displayed below error when I have cloned and installed Magento 2.


texts: Adding Custom tabs along with description

texts:
i am facing problems while adding a custom tab on the PDP page along with the description.

what i have tried

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">

<referenceBlock name="product.info.details">
<block class="Magento\Catalog\Block\Product\View" name="tabbb.tab" template="Learning_Module::shipping.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Shipping Policy</argument>
</arguments>
</block>
</referenceBlock>

<referenceBlock name="product.info.details">
<block class="Magento\Catalog\Block\Product\View" name="ssssss" template="Learning_Module::delivery.phtml" group="detailed_info" >
<arguments>
<argument translate="true" name="title" xsi:type="string">Delivery</argument>
</arguments>
</block>
</referenceBlock>

</page>

shipping.phtml

<?php

$product = $block->getProduct();

?>
dxsdccdcsdc

delivery.phtml

<?php

$product = $block->getProduct();

?>
sdcfcd

afterall, this all am getting is only a single whereas the second tab is missing. prefer the image fro more details


texts: Export simple product using script in magento2

texts: How we get simple product collection with visibility 4 (catalog/search) with script in Magento 2?


texts: How to make billing address entry compulsory when Paypal is used?

texts:
When Paypal is used as the payment method, entry of the billing address becomes not compulsory.
You will see on the screenshot below, that the billing address is empty and the "Continue to Paypal" button is active.
How to fix this ?


texts:
Is it safe (or best practice) to run "composer update" on Magento 2?

On one hand, Magento has released a specific Magento version with specific dependencies. If those dependencies are upgraded (even to minor versions) it might break Magento or introduce a bug.

On the other hand, the point of composer is to keep dependencies updated with bug fixes etc. So it's preferable to be up-to-date based on Magento's composer.json.

For example, here's a list of updates on the latest version of Magento when running: composer update

 - Updating phpseclib/phpseclib (2.0.5 => 2.0.6)
 - Updating symfony/event-dispatcher (v2.8.21 => v2.8.25)
 - Updating symfony/process (v2.8.21 => v2.8.25)
 - Updating zendframework/zend-stdlib (2.4.11 => 2.4.12)
 - Updating zendframework/zend-eventmanager (2.4.11 => 2.4.12)
 - Updating zendframework/zend-code (2.4.11 => 2.4.12)
 - Updating zendframework/zend-di (2.4.11 => 2.4.12)
 - Updating zendframework/zend-modulemanager (2.4.11 => 2.4.12)
 - Updating zendframework/zend-loader (2.4.11 => 2.4.12)
 - Updating zendframework/zend-view (2.4.11 => 2.4.12)
 - Updating zendframework/zend-validator (2.4.11 => 2.4.13)
 - Updating zendframework/zend-escaper (2.4.11 => 2.4.13)
 - Updating zendframework/zend-uri (2.4.11 => 2.4.12)
 - Updating zendframework/zend-server (2.4.11 => 2.4.12)
 - Updating zendframework/zend-soap (2.4.11 => 2.4.12)
 - Updating zendframework/zend-console (2.4.11 => 2.4.12)
 - Updating zendframework/zend-servicemanager (2.4.11 => 2.4.12)
 - Updating zendframework/zend-text (2.4.11 => 2.4.12)
 - Updating zendframework/zend-i18n (2.4.11 => 2.4.12)
 - Updating zendframework/zend-config (2.4.11 => 2.4.12)
 - Updating zendframework/zend-math (2.4.11 => 2.4.12)
 - Updating zendframework/zend-json (2.4.11 => 2.4.12)
 - Updating zendframework/zend-serializer (2.4.11 => 2.4.12)
 - Updating zendframework/zend-log (2.4.11 => 2.4.12)
 - Updating zendframework/zend-crypt (2.4.11 => 2.4.13)
 - Updating zendframework/zend-http (2.4.11 => 2.4.13)
 - Updating zendframework/zend-filter (2.4.11 => 2.4.12)
 - Updating zendframework/zend-inputfilter (2.4.11 => 2.4.13)
 - Updating zendframework/zend-form (2.4.11 => 2.4.13)
 - Updating zendframework/zend-mvc (2.4.11 => 2.4.13)
 - Updating seld/jsonlint (1.6.0 => 1.6.1)
 - Updating symfony/finder (v3.3.0 => v3.3.5)
 - Updating symfony/yaml (v2.8.21 => v2.8.25)
 - Updating symfony/stopwatch (v3.3.0 => v3.3.5)
 - Updating theseer/fdomdocument (1.6.5 => 1.6.6)
 - Updating symfony/filesystem (v3.3.0 => v3.3.5)
 - Updating symfony/config (v3.2.9 => v3.2.12)


texts: Magento 2.2.5: How does Checkout Save data?

texts:
I am stucking at understand how checkout save the data.

I saw they use submit: setShippingInformation, so i follow this function and i got here:

  C:\xampp\htdocs\magento\vendor\magento\module-checkout\view\frontend\web\js\model\shipping-save-processor\default.js

And here is what i saw in default.js

if (!quote.billingAddress()) {
                selectBillingAddressAction(quote.shippingAddress());
            }

And i console.log(quote.shippingAddress()); and saw it render all the data from the shippingAddress form.
That is it. I dont know where to go next, the quote.shippingAddress() in quote.js doesn't show me anything at all.

  C:\xampp\htdocs\magento\vendor\magento\module-checkout\view\frontend\web\js\model\quote.js

Here is it (i guess):

shippingAddress = ko.observable(null)

Please give me advice on how to make the next move. I dont know what to do right now.


texts: Add/Remove class when scrolling over section / Sticky sidebar

texts:
I want to add the class 'sticky' when scrolling over the div with class="product-options-sidebar" and remove the 'sticky' class at the end of the
.

This so that the div will only contain the class for the height of the entire section. It should be a sticky sidebar as long as the
 element is.

How can I achieve this?

My current code works almost perfect but we already have a sticky header with a height of 120px. So top 0 should be -120px of the current sticky header. And it is also causing a console error: TypeError: undefined is not an object (evaluating 'c.position().top')

$(document).ready(function() {
  var $window = $(window);
  var $sidebar = $(".product-options-sidebar");
  var $sidebarHeight = $sidebar.innerHeight();
  var $footerOffsetTop = $(".product-collateral").offset().top;
  var $sidebarOffset = $sidebar.offset();

  $window.scroll(function() {
    if($window.scrollTop() > $sidebarOffset.top) {
      $sidebar.addClass("sticky");
    } else {
      $sidebar.removeClass("sticky");
    }
    if($window.scrollTop() + $sidebarHeight > $footerOffsetTop) {
      $sidebar.css({"top" : -($window.scrollTop() + $sidebarHeight - $footerOffsetTop)});
    } else {
      $sidebar.css({"top": "0",});
    }
  });

});

      INNER CONTENT

HP ProBook 450 G5 CTO

      INNER CONTENT


texts: Magento 1.9 cron jobs runs every 5mint but its configured for every 1 minute

texts:
Through cpanel I have configured cron.sh to run every 5 minutes (working).

I have added a custom module meant to run every 1 minute (code below).

The issue is that the cron is not running every 1 minutes as configured in module, but it is running every 5 mintutes as configured through cpanel. How I can configure to run per minute in this module?

<?xml version="1.0"?>
<config>
    <modules>
        <Atwix_Tweaks>
            <version>1.0</version>
        </Atwix_Tweaks>
    </modules>
    <frontend>
        <routers>
            <customtest>
                <use>standard</use>
                <args>
                    <module>Atwix_Tweaks</module>
                    <frontName>runcron</frontName>
                </args>
            </customtest>
        </routers>
    </frontend>
    <global>
        <blocks>
            <tweaks>
                <class>Atwix_Tweaks_Block</class>
            </tweaks>
            <catalog>
                <rewrite>
                    <product_list_toolbar>Atwix_Tweaks_Block_Product_List_Toolbar</product_list_toolbar>
                </rewrite>
            </catalog>
        </blocks>
        <models>
             <Atwix_Tweaks>
                <class>Atwix_Tweaks_Model</class>
            </Atwix_Tweaks>
        </models>
    </global>

 <crontab>
        <jobs>
            <Atwix_Tweaks>
                <schedule><cron_expr>*/1 * * * *</cron_expr></schedule>
                <run><model>Atwix_Tweaks/observer::test</model></run>
            </Atwix_Tweaks>
        </jobs>
    </crontab>
</config>


texts: CE 1.9.2 - Store custom data temporarily in the order object during checkout

texts:
I am trying to build a feature into an existing site that allows customers to earn loyalty points with a 3rd-party loyalty and rewards programme that they will need to be already registered with. The 3rd-party has already provided us with web-service documentation for Earn and Redeem.

My idea was to build an additional step into the checkout that (optionally) prompted the customer to enter in their mobile number and secret code into 2 textboxes. Upon clicking Validate an ajax call would be made to the web-service to verify the customer as a registered member.

The customer would then go about filling in their billing/shipping details, etc, and would then click on Place Order when they would then be redirected to a hosted credit card payment page. Upon successful payment, they will be directed back to the Checkout Success page (Order Status set to Processing), at which point I aim to submit the loyalty earn points data (only once the order has been successfully paid for).

I'd like to know what the best mechanism is for storing the customer's mobile number and secret code temporarily in the the order object? I'm thinking about custom order attributes, but don't want this data visible to anyone in the Manage Orders screen. I thank you in advance!


texts: Execute JavaScript code after swatches are displayed in category view

texts:
I'm trying to trigger custom event whenever Magento displays the product swatches in category view.

It looks like Magento uses ajax to load these swatches, they are not displayed on page load, they "pop" after a few moments. I need to add some custom JavaScript code after these swatches are actually displayed. So I thought the best way will be to trigger custom event just after Magento finishes to render the swatches. But I'm not sure how to do this correctly in Magento 2.

What I want to do is to trigger a custom event $(document).trigger('swatches-visible'); when a block of swatches is finally displayed on the page.

And then, an event handler will execute a function:

$(document).on('swatches-visible', function() {
    doSomething();
});

That function doSomething() is already added via RequireJS in one of the template files:

<script type="text/javascript">
    requirejs(['jquery'], function(jQuery) {
        function doSomething()
        {
            // Here make some layout changes of the products list...
        }
    });
</script>


texts: force customer to remove product from cart if not same type magento 2

texts:
if the same type of products is in the cart then force the customer to remove the products from the cart. Customers will not move on the checkout page till then cart having the same type of products.
Otherwise, an error will be displayed to remove products on the cart page


texts: M2: getBaseUrl() - StoreManagerInterface vs StoreConfigInterface

texts:
If someone asks for getting base URL, the answer is always to use StoreManagerInterface, like ...

protected $storeManager;

public function __construct(
    ...
    \Magento\Store\Model\StoreManagerInterface $storeManager
) {
    $this->storeManager = $storeManager;
    parent::__construct(...);
}
...
$this->storeManager->getStore()->getBaseUrl();

It works, but it breaks PHPStan code analyzation.

  104    Call to an undefined method
         Magento\Store\Api\Data\StoreInterface::getBaseUrl().

Question

Isn't it better to use StoreConfigInterface instead?

protected $storeConfig;

public function __construct(
    ...
    \Magento\Store\Api\Data\StoreConfigInterface $storeConfig
) {
    $this->storeConfig = $storeConfig;
    parent::__construct(...);
}
...
$this->storeConfig->getBaseUrl();


texts: Override Model from third party vendor in custom theme

texts:
I am trying to override a Model from a third Party vendor in a custom-theme. The original file was:
/vendor/3rdpartyompany/3rdpartymodule/Model/Formatter/BaseImage.php

I copied that file over to:
/vendor/customthemevendor/customtheme/Model/Formatter/BaseImage.php

and edited the namespace in that file:
namespace Customthemevendor\Customtheme\Model\Formatter;

Last I created a /etc/di.xml and set the preference:
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="3rdPartyCompany\3rdPartyModule\Model\Formatter\BaseImage" type="Customthemevendor\Customtheme\Model\Formatter\BaseImage" />
</config>

Magento2 doesn't seem to recognize my customization at all. (Basically, there is a resize image function with hardcoded values in the function, that I need to change).
Is the Overriding-process the same for themes and modules or am I missing something?


texts: Problem in accessing Cart Items at onepage checkout page

texts:
When I try to use get cart items in a onepage checkout block, It always leads to Allowed Memory Exhausted error. The code I am using:

Mage::getSingleton('checkout/session')->getQuote()->getAllVisibleItems();

Even just accessing Mage::getSingleton('checkout/session') leads to the same problem. The exact problem has been mentioned here http://nickwan.wordpress.com/2011/10/16/magento-deadly-loop/ but I could not find a solution to it.

I am using Magento CE 1.7.0.2 and have already tried with saving session data in file system/db.

PS: I believe this is some issue of circular reference. Suggest.


texts: Magento 2 - Configurable product price in frontend 0.00 - backend is ok

texts:
We have set up a shop with Magento 2.1.7, all products were imported via the Rest API and everything in the backend looks good. Prices are shown on parent and child products. But in the frontend the price from the configurable products is 0,00€ (grid and detail view), if we choose a variant like color and size the product price switches to the correct price.
Does anyone have a idea where to look?

Reindex was already made.

Configurable Product

Variant choosen

Update:
It seems that Magento will take a special price for rendering, but there is no special price for the product. See HTML

        Sonderangebot

    0,00 €
            <meta itemprop="priceCurrency" content="EUR" />

Normalpreis

    319,99 €


texts: Pass data to getChildHtml() or call method on child block

texts:
I want to be able to pass data to the getChildHtml() call.  The reason is, the output of the block is dependant upon a product type.  So i want to pass the product to the getChildHtml so that it can decide on the output.

I am doing this inside template/checkout/cart/item/default.phtml.

Ideally, the call would look like:

echo $this->getChildHtml('child_block_name', $_item);

Then my block can get the product type from the item and display the correct output.

Since it is definitely not possible to pass this data to getChildHtml - how else can this type of behaviour be achieved without having to rewrite the core block

The two solutions i currently have are as follows (neither very attractive):

1 - Create a helper and access the html output via the helper instead of letting a block and template render it ala $this->helper('my_module')->getItemHtml($_item);

2 - Access the child block and setData on it inside the template:

 $this->getChild('child_name')->setData('item', $_item);
 echo $this->getChildHtml('child_name')

I think in terms of the Magento architecture, number 2 is the lesser of two evils, but it is darn ugly looking inside a template.


texts: How to get Shipping Address from Create Order page?

texts:
I know how to get the customer's default shipping address information, but how can I get a "one-time" shipping address before the order is submitted?

Example

Customer from Georgia has default addresses in Georgia, but is shipping to Florida for this new order. If I want to know what their shipping address is for this case, how can I find out?

I need to this information for Tax Calculation purposes, so I can charge tax if the shipment is going to Florida. Is this even possible?

edit

Based on R.S.'s suggestion, I'm trying to get an observer set up but it isn't working as I expected. Here is what I have currently:

Config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Mbs_Tax>
            <version>0.1</version>
        </Mbs_Tax>
    </modules>

    <global>
        <events>
            <sales_quote_collect_totals_before>
                <observers>
                    <tax>
                        <type>singleton</type>
                        <class>Mbs_Tax_Model_Observer</class>
                        <method>salesQuoteCollectTotalsBefore</method>
                    </tax>
                </observers>
            </sales_quote_collect_totals_before>
        </events>
    </global>
</config>

Observer.php

class Mbs_Tax_Model_Observer {
    public function salesQuoteCollectTotalsBefore($observer) {
        $quote = $observer->getQuote();
        $address = $quote->getShippingAddress();
        $region = $address->getData('region');
        Mage::log("Address from salesQuoteCollectTotalsBefore: region ".$region,null,"tax.log");
        if(strtoupper($region)==="FLORIDA") {

            Mage::log("Shipping to Florida: ".print_r($quote->getShippingAddress()->getData('tax_amount'), true),null,"tax.log");
        }
    }
}


texts: Magento 2:- how to show selected value in ui components?

texts:
how to show selected value in edit form in Magento admin using UI component
 many-to-many relation

public function toOptionArray()
    {
        if (!$this->_options) {

               $postCollection=$this->itemCollectionFactory->create()->load();

            $items = $this->collection->getItems();
             foreach ($items as $id){
                 $recipes_id=$id['recipes_id'];

             }

            $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); // Instance of object manager
            $resource = $objectManager->get('Magento\Framework\App\ResourceConnection');
            $connection = $resource->getConnection();

            $values = $connection->fetchAll('SELECT * FROM `dac_recipes_category`,`dac_recipes_category_recipes_mapping` WHERE dac_recipes_category_recipes_mapping.recipes_id ='.$recipes_id.' AND dac_recipes_category.recipes_category_id=dac_recipes_category_recipes_mapping.recipes_category_id');

            foreach ($postCollection->getItems() as $da){

               foreach ($values as $selected){

                   if($selected['recipes_category_id']==$da->getRecipesCategoryId())
                   {
                       array_push($this->_options, ['value' => $da->getRecipesCategoryId(),'selectedOptions' => "selected", 'label' => __($da->getRecipesCategoryName())]);

                      break;
                   }
                   continue;
                }

                array_push($this->_options, ['value' => $da->getRecipesCategoryId(), 'label' => __($da->getRecipesCategoryName())]);

            }

Admin Form

 <field name="recipes_category_name">
            <argument name="data" xsi:type="array">
                <!-- Call to collection of 2nd module -->
                <item name="options" xsi:type="object">Dac\Recipes\Block\CategoryList</item>
                <item name="config" xsi:type="array">
                    <item name="dataType" xsi:type="string">text</item>
                    <item name="label" xsi:type="string" translate="true">Category</item>
                    <!--<item name="formElement" xsi:type="string">select</item>-->
                    <item name="formElement" xsi:type="string">multiselect</item>
                    <item name="source" xsi:type="string">mode</item>
                    <item name="dataScope" xsi:type="string">recipes_category_name</item>
                    <item name="sortOrder" xsi:type="number">17</item>
                    <item name="validation" xsi:type="array">
                        <item name="required-entry" xsi:type="boolean">true</item>
                    </item>
                </item>
            </argument>
        </field>

console log form

<select multiple="" class="admin__control-multiselect" data-bind="
    attr: {
        name: inputName,
        id: uid,
        size: size ? size : '6',
        disabled: disabled,
        'aria-describedby': noticeId,
        placeholder: placeholder
    },
    hasFocus: focused,
    optgroup: options,
    selectedOptions: value,
    optionsValue: 'value',
    optionsText: 'label'" name="recipe[recipes_category_name]" id="B2D6PC1" size="6" aria-describedby="notice-B2D6PC1"><option data-title="Category 1" value="1">Category 1</option><option data-title="Category 2" value="2">Category 2</option><option data-title="Category 2" value="2">Category 2</option><option data-title="Category 3" value="3">Category 3</option><option data-title="Category 3" value="3">Category 3</option><option data-title="Category 4" value="4">Category 4</option></select>


texts:
I have created a custom theme for Magento 2 production version. I have selected my theme from the back-end. But it renders only HTML. I deployed the static content but my theme is not in the

pub\static\frontend\Magento

directory so I get 404 for .css and .js files. I have tried setting file permissions but no luck. In the command line window after deploying luma theme it continues to deploy admin. Any help is appreciated.

file structure:

app/design/frontend/Muaw/mytheme:

|-etc
|   |-view.xml
|-media
|   |-preview.png
|-registration.php
|-theme.xml
|-composer.json
|-web
|   |-css
|   |-js
|   |-fonts
|   |-images
|-Magento_Theme
|   |-layout
|   |   |-default.xml

Files:

theme.xml:

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>My Theme</title> <!-- your theme's name -->
<parent>Magento/blank</parent> <!-- the parent theme, in case your theme inherits from an existing theme -->
<media>
    <preview_image>media/preview.jpg</preview_image> <!-- the path to your theme's preview image -->
</media>

composer.json:

{
"name": "magento/theme-frontend-luma",
"description": "N/A",
"require": {
    "php": "~5.5.0|~5.6.0|~7.0.0",
    "magento/theme-frontend-blank": "100.0.*",
    "magento/framework": "100.0.*"
},
"type": "magento2-theme",
"version": "100.0.1",
"license": [
    "OSL-3.0",
    "AFL-3.0"
],
"autoload": {
    "files": [
        "registration.php"
    ]
}
}

registration.php:

<?php
    /**
     * Copyright © 2015 Magento. All rights reserved.
     * See COPYING.txt for license details.
    */
    \Magento\Framework\Component\ComponentRegistrar::register(
        \Magento\Framework\Component\ComponentRegistrar::THEME,
        'frontend/Muaw/mytheme',
        __DIR__
    );

Thanks in advance. :)


texts: Magento 2 some urls redirected to specific store view

texts:
I have 2 websites and three store views set up in my mangento 2 :

domain.nl
domain.be
domain.be/fr/

I dont know for some reason,  some urls in front-end and back-end get redirected to domain.be/fr/. either its a product url, search result, admin grid url, or 404 page (not all urls) some of them get 302 redirect to FR site.

by the way, we dont have any special url rewrite about this from magento admin or server configuration.

has anyone ever experienced this?

environment :

Magento 2.2.9
nginx
php 7.0.33


texts: How can I create module in magento which will be adding my own phtml file to main page? Im really new in this :?


texts: Check for updates didn't work in Magento Connect Manager ver. 1.9.3.0

texts: I want to upgrade version magento from 1.9.3.0 to 1.9.3.1 via Magento Connect Manager. I press button Check for updates but on Debian 7 server it's do nothing. When i copy this on local computer it's work correctly. I check solution Solution to Magento Downloader 1.9.2 unknown cipher list but not find this string in my version.


texts: Add to cart not working in Magento 2.2.5 performance testing script "benchmark_2015.jmx" for customer account

texts:
In Magento2 - I am using Magento benchmark script "benchmark_2015.jmx" for a default Magento(v2.2.5) installation.

In Customer Checkout thread group >> "Add to cart" request(http://prntscr.com/mty00o) is failing to add a product in the cart, and redirected to the blank cart page.
Form key extracted in the following request: http://prntscr.com/mty0su

Guest checkout is working fine without any issue.


texts: In Magento 2, how to resolve "Required parameter 'theme_dir' was not passed" during migration from one server to another, without deleting the theme?

texts: I copied the database to my development machine, from the test server. I changed the env.php file and I can even go to admin, but on frontend, I am getting the message "Required parameter 'theme_dir' was not passed" in the report folder, in the beginning of the error report. How can I resolve this? I think it is due to the Ultimo Infortis theme, but I don't know why is it happening. How can I fix this?


texts: Tax changes incorrectly when changing billing country

texts:
We have a problem with tax/VAT settings on our 1.8.1.0 Magento store.

When we change the billing address in the checkout, the order lines and totals change, but incorrectly.

We have set different tax rates for the countries we ship to, for example 6% for Netherlands and 10% Austria. For every country (14) there is a separate storeview.

We have a product that costs €59,00, and when we add this to the cart in the Austrian store, the total without tax is €53,64 and with tax is €59,00. This is correct.
However, when we change the billing address to Netherlands, there is tax calculated, but based on the previous amount without tax, so €53,63 without tax and €56,85 with tax. The last one should be €59,00, this is the problem.

I can see how the NL totals are calculated on the Austrian storeview:
53.64 / 100 * 110 = 59 (Austria, correct)
53.64 / 100 * 106 = 56.85 (Netherlands, incorrect)
This last one should be 59, so the amount with tax should be leading, now the amount without is used for recalculating.

If I do the same on the NL storeview (change billing country to Austria), the opposite occurs:
55.66 / 100 * 106 = 59 (Netherlands, correct)
55.66 / 100 * 110 = 61.23 (Austria, incorrect)

I hope I'm clear enough..
How can I solve this?


texts: Default source and stock missing in MSI after re-enabled - Magento 2

texts:
We disabled all the below MSI extensions.
Magento_Inventory Magento_InventoryCatalog Magento_InventoryAdminUi Magento_InventoryApi Magento_InventoryBundleProduct Magento_InventoryBundleProductAdminUi Magento_InventorySales Magento_InventoryIndexer Magento_InventoryCatalogAdminUi Magento_InventoryCatalogApi Magento_InventoryCatalogSearch Magento_InventoryConfigurableProduct Magento_InventoryConfigurableProductAdminUi Magento_InventoryConfigurableProductIndexer Magento_InventoryConfiguration Magento_InventoryConfigurationApi Magento_InventoryDistanceBasedSourceSelection Magento_InventoryDistanceBasedSourceSelectionAdminUi Magento_InventoryDistanceBasedSourceSelectionApi Magento_InventoryElasticsearch Magento_InventoryGroupedProduct Magento_InventoryGroupedProductAdminUi Magento_InventoryGroupedProductIndexer Magento_InventoryImportExport Magento_InventoryCache Magento_InventoryLowQuantityNotification Magento_InventoryLowQuantityNotificationAdminUi Magento_InventoryLowQuantityNotificationApi Magento_InventoryMultiDimensionalIndexerApi Magento_InventoryProductAlert Magento_InventoryReservations Magento_InventoryReservationsApi Magento_InventorySalesApi Magento_InventorySalesAdminUi Magento_InventorySalesFrontendUi Magento_InventorySetupFixtureGenerator Magento_InventoryShipping Magento_InventoryShippingAdminUi Magento_InventorySourceDeductionApi Magento_InventorySourceSelection Magento_InventorySourceSelectionApi

We again enabled all the above MSI extensions for salable qty feature. After that we have checked in Admin -> Stores ->  Inventory -> Sources/Stocks, both sources and stocks are empty. Before disable we have default source and default stock.
please provide suggestions to restore the default source and stock?
Thanks in advance.


texts:
I'm having trouble getting my page to render properly.

At app/design/frontend/base/default/layout, I have the following local.xml file ...

<layout version="0.1.0">
    <helloworld_index_index>
        <block type="page/html" name="root" output="toHtml" template="magentotutorial/helloworld/simple_page.phtml" />
    </helloworld_index_index>
</layout>

At app/design/frontend/base/default/template/magentotutorial/helloworld I have the following in my simple_page.phtml file ...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>Hello, World!</title>
        <style type="text/css">
body {
    background-color: #f00;
    }
        </style>
    </head>
    <body>

    </body>
</html>

At app/code/local/Magentotutorial/Helloworld/controllers I have the following in my IndexController.php file ...

<?php

    class Magentotutorial_Helloworld_IndexController extends Mage_Core_Controller_Front_Action {

        public function indexAction () {

            $this->loadLayout ();

            $this->renderLayout ();

        }

    }

?>

And lastly (not sure if it matters) at app/code/local/Magentotutorial/Helloworld/etc, my config.xml has the following ...

<config>
    <modules>
        <Magentotutorial_Helloworld>
            <version>0.1.0</version>
        </Magentotutorial_Helloworld>
    </modules>
    <frontend>
        <routers>
            <helloworld>
                <use>standard</use>
                <args>
                    <module>Magentotutorial_Helloworld</module>
                    <frontName>helloworld</frontName>
                </args>
            </helloworld>
        </routers>
    </frontend>
</config>

According to the tutorial I'm following, this is supposed to create a blank page with a red background, and a page title of Hello, World! when I navigate to http://<mysite>/helloworld/index/index.

However, it does not.

My module is registered in my Magento installation, and I have made sure to clear both the Configuration and Layout caches after each respective upload.

What I get instead of what I am expecting is the normal site, minus any page-specific content. The page title is simply Magento Commerce.

My version of Magento is 1.7.0.2, and I have been following along with this tutorial (I know it's old, but it worked well up until this section).

Can anybody point me in the right direction to figure out what I am doing wrong?


texts:
What code would be required to get a complete list of cms blocks in Magento 2. What I mean is block collection like in Magento 1

I would try to keep to repository interfaces like this following:

$objectManager->get(\Magento\Cms\Api\BlockRepositoryInterface::class)

But I would need to also have Magento\Framework\Api\SearchCriteriaInterface passed and it starts to become over the top for just getting the block collection.

What is best and correct method for this simple job?


texts: Magento 2 checkout custom field validation

texts:
Magento2 checkout - what is the best method to add validation for my custom checkout field which depends on selected shipping method?

For e.g. I am adding field to address form in LayoutProcessor where I can specify validation rules. I need to make this field required if my custom carrier is selected.

My goal is to prevent the user from going to the next step if my custom field is not filled. I know I am able to add custom validations before order placement (Review & Payments step) but I need to validate it a step before.


texts: The search term shows SQL injection in magento 1.9

texts:
I have found below search term on my magento 1.9's admin panel:

epoxy) UNION ALL SELECT NULL,NULL,NULL,NULL,NULL,NULL,NULL-- QBrO

../../../../../../../../etc/passwd

AND 1=2 UNION SELECT 0x6461726b31636f6465,0x6461726b32636f6465,0x6461726b33636f6465,0x6461726b34636f6465,0x6461726b35636f6465,0x'

Any reference links to fix the search?


texts: How to move Wish List next to Qty input box in product detail page?

texts: I want to move ADD TO WISH LIST next to QTY Input box in product details page. Guide me how to achieve this


texts: What is the equivalent of Mage::app()->getResponse() in Magento 2?

texts:
We have a code Mage::app()->getResponse() in Magento1

  \app\code\core\Mage\Core\Model\App.php

/**
 * Retrieve response object
 *
 * @return Zend_Controller_Response_Http
 */
public function getResponse()
{
    if (empty($this->_response)) {
        $this->_response = new Mage_Core_Controller_Response_Http();
        $this->_response->headersSentThrowsException = Mage::$headersSentThrowsException;
        $this->_response->setHeader("Content-Type", "text/html; charset=UTF-8");
    }
    return $this->_response;

What is the equivalent code in Magento2 ? I want to use it in a observer.

I have a code snippet in the Magento1 like following.

if (!$customerSession->isLoggedIn()) {
   if ($action != 'noRoute') {
            $customerSession->setBeforeAuthUrl(Mage::helper('core/url')->getCurrentUrl());
        }
        Mage::getSingleton('core/session')->addError(Mage::helper('business')->__('some text'));
        Mage::app()->getResponse()->setRedirect(Mage::getUrl('business/portal/login', array('access' => 'denied')), 403);
        die(Mage::app()->getResponse());
 }


texts: How to fetch all products from one magento website and insert them into other using SOAP call?

texts:
I want to fetch all products from one magento website (CE 1.7) to insert them into other magento installation (EE 1.12), using SOAP api call (I know that'll be really slooooow). I'll break it into chunks as I only have access to api username and key.

What are all the information I have to fetch and insert?

I've gone through this link and got confused on which methods I should use and which are all the methods I can skip.

Can anyone streamline the ideas and give me a solution?

  note:

  categories have already been manually replicated.


texts: What is difference between filterable with result and Filterable with no result in magento Attributes

texts:
Basically why magento uses filterable with result and filterable with no result in magento attribute.
What is the benefit of that attribute if that is  Filterable with no result.
Basically, I created more attributes in magento and all are filterable with result.
Now I want to do some changes in my attributes Because its not indexing properly.
I created 300 attributes in magento.Now i need to change this because on flat product its, not indexing.


texts: Magento 2 get all product attributes without product id

texts:
I want to retrieve all product attributes those are available, then convert it to name & value for my select options field. In Magento 1 I can achieve it like this:

public function getMagentoAttributes()
{
    $values[] = array(
        'value' => '',
        'label' => 'Pick Product Attribute'
    );

    $categories = Mage::getResourceModel('catalog/product_attribute_collection')->getItems();

    foreach ($categories as $category) {
        if ($category->getFrontendLabel() != '') {
            $label = $category->getFrontendLabel();
        } else {
            $label = $category->getAttributecode();
        }

        $values[] = array(
            'value' => $category->getAttributecode(),
            'label' => $label
        );
    }
    return $values;
}

Is there a way in magento 2 to do the same thing?


texts:
I asked a question earlier about using subcategories thumbnails as links, but I looked back and saw that I explained myself quite badly. So I'll try again. Is it possible to make a thumbnail clickable in a dropdown menu? Like this:
http://i.gyazo.com/b1d0bbb65614076472a7a3f48ad08d88.png
So that you can click the image instead of the text below, and then remove the text so we only have an image to click. Hope that you will be able to help me.


texts: Best way to offer installation of products?

texts:
Just wondering if someone could help me out.

I'm wondering what the best way of offering installation of products is.

I thought of two ways: Making a configurable product with installation as an option (very time consuming to set up and you can't track sales of "installation") or doing it as a grouped product (also time consuming and cumbersome but can track sales).

Is there a better way? I couldn't find any extensions out there.


texts: How to remove product features for a specific category in Magento?

texts: I'd like to remove the product tabs, add to links and related products for a specific category in Magento


texts: Magento 2: Default Values for `system.xml` Configuration

texts:
In Magento 1, it was possible to

Configuration a user interface for the System Configuration section in etc/system.xml files
Set default values for those fields in the etc/config.xml files

Behind the scenes Magento would load data from core_config_data, and if nothing was set, would default to the values set globally in etc/config.xml. (simplified version — it's a little more complicated than that)

Can the same thing be done in Magento 2?  I know it's possible to configure UI elements via system.xml — but is it possible to set default values for these settings?  If so, where or how should these values be configured?


texts: Save Order attribute while creating order from admin

texts:
I have created order attribute
I also followed https://magento.stackexchange.com/a/236710/34850 & https://magento.stackexchange.com/a/302886/34850
which helped me creating custom field in admin create order form (phtml code below)
<input id="ponumber" name="order[ponumber]" value="" class="admin__control-text input-text" type="text" />

Now I want to save that value to order table for which I used below events
sales_model_service_quote_submit_before, sales_order_save_before & sales_order_save_after
But its not saving even tried printing logs, but logs didnt also worked on those observers
Can anyone please help me saving that attribute from admin create order form?


texts: Send auto email if customer chose definite payment method

texts:
I want to bring to the store a new payment method - lets call it payment2, but the new system after paying customer (redirect to third party site) and returned to the store not generated automatically email order.
I think about to do that - every order with payment2 will automatically sends your email (no matter whether the payment will be OK or not), i find line in file that normaly send email in:

app\code\core\Mage\Checkout\Model\Type\Onepage.php

  /**
                 * a flag to set that there will be redirect to third party after confirmation
                 * eg: paypal standard ipn
                 */
                $redirectUrl = $this->getQuote()->getPayment()->getOrderPlaceRedirectUrl();
                /**
                 * we only want to send to customer about new order when there is no redirect to third party
                 */
                if (!$redirectUrl && $order->getCanSendNewEmailFlag()) {
                    try {
                        $order->sendNewOrderEmail();
                    } catch (Exception $e) {
                        Mage::logException($e);
                    }
                }

Of course i copy that to app\code\local... now i wanna change line

 if (!$redirectUrl && $order->getCanSendNewEmailFlag()) {

To

  if ((!$redirectUrl && $order->getCanSendNewEmailFlag()) || ($order->getPayment()->getMethod() != 'name of payment2')) {

but it doesn't work ;/

PS I cannot write only
 if ($order->getCanSendNewEmailFlag()) {
bcs I have another payment method that send email if payemnt is OK, but dont send it otherwise


texts: Magento 2.2 removing horizontal menu from front page only

texts:
i am trying the following code :

<referenceContainer name="page.top">
        <referenceBlock name="main_menu" remove="true" />
</referenceContainer>

in the DESIGN TAB > Layout Update XML in my page.
but its not working.

my block's id is > 89
identifier is > main_menu
and title is > Home 01- main menu.
what else could i do to make this code work.
basically, i want to remove this block from the homepage.


texts: style-m.css style-m.css and print.css not in pub/static

texts:
I have seen this question a lot, and always with an answer to deploy content or a missing .htaccess in pub/static or to clear cache, processed files in var,

Did all of this without success.

I created a a custom them, or better copied the folder from another of my MAGENTO DIRECTORY.

Permissions and ownership seems alright, they have to be if on pub/static the Luma and Blank are creating files with no problem, I have also custom Js on my custom theme, all deployed  with no problem.

If I work with Grunt (uninstalled now) all LESS files are there, all but these 3 CSS files in the subject. They should be inherited by the Luma theme by configuration anyway.

any idea?


texts:
I'm using Magento 2.2.7, I enabled Captcha in Store->Configuration->Customer configuration->Captcha Enabled for create user and forgot password forms.

Captcha always displaying incorrect even I used correct letters. After I clicked reload captcha and try again it is working.

I know it is fixed in Magento 2.3.X. But I need to fix in Magento 2.2.7 version. Is there any way to fix this without using jQuery trigger click event.


texts: Using observer event to get updated customer info

texts:
I have an observer event that should get the customer when a customer is updated and write it to a var log

my config

<?xml version="1.0"?>
<config>
    <modules>
        <Mage_Customerupdate>
            <version>0.0.1</version>
        </Mage_Customerupdate>
    </modules>
    <global>
        <models>
            <Mage_Customerupdate>
                <class>Mage_Customerupdate_Model</class>
            </Mage_Customerupdate>
        </models>
        <events>
            <customer_save_after>
                <observers>
                    <Mage_Customerupdate>
                        <type>singleton</type>
                        <class>Mage_Customerupdate_observer</class>
                        <method>logUpdate</method>
                    </Mage_Customerupdate>
                </observers>
            </customer_save_after>
        </events>
    </global>
</config>

My module

<?xml version="1.0"?>
<config>
    <modules>
        <Mage_Customerupdate>
            <active>true</active>
            <codePool>local</codePool>
        </Mage_Customerupdate>
    </modules>
</config>

My Observer

<?php
class Mage_Customerupdate_Model_Observer {
    public function logUpdate(Varien_Event_Observer $observer){
        $customer = $observer->getEvent()->getCustomer();
        $name = $customer->getName();
        $telephone = $customer->getTelephone();
        Mage::log("{$name} ({$telephone}) updated", null, 'customerupdate.log');
    }
}

This is my first attempt at using the observer and so far nothing is happening. I will most likely need longer more specific answers as to how I get this to produce the customer information. at this point all I am trying to get is the name and phone number.


texts: Magento2: Import Export to update multiple product attribute settings?

texts:
Can I use Magento2 's Import or Export features under Settings in the Admin to make this change:
"Storefront Properties - Allow HTML tags on Storefront, change to Yes"
for multiple product attributes, instead of updating this manually for the list of product attributes?


texts: order confirmation email send twice for customer

texts:
When placing an order the customer receives two duplicate confirmation emails.

I found this solution:
New order email being sent twice
but I can't find anything in the database !!

I don't know what may be causing the problem or how to fix it. HELP!

Magento ver. 2.2.11


texts: Magento 2: How to remove Paypal Logo from MiniCart & Shopping Cart Page?

texts:
I'm using Magento 2 CE with Porto Theme.

Also referred but it's for Magento 1

How to remove paypal express checkout link from mini cart in right column

I have tried from Admin Paypal Settings. But logo is still displaying on

How to remove it from Mini Cart & Shopping Cart Page?


texts: How to remove ACCOUNT and CART from website?

texts: How to remove ACCOUNT and CART from website.  Is there a way by editing the styles.css to do this?  Thanks, -John


texts:
hello guys is there a way to transfer magento site from my local PC localhost to another PC in localhost ?

I want to transfer it from my PC to my laptop.

thanks inadvance

From windows 10 to windows 8


texts: Error while importing a csv file in the admin

texts:
My project had an extension called webshopapps product matrix

Which was copied from another project and had been configured . But now when I replace it with the new extension by placing its files and folders in its place, it shows error as :

  "An error occurred while saving this configuration: Invalid Product
  Matrix File Format Array"

in the admin section while importing a csv file.
What should I do ?


texts: Magento 2 - How to Hide/Show custom attribute based on customer group?

texts:
I want to hide/show custom attribute based on customer group value.
Can anyone suggest me how can I do this?

Any help would be appreciated.

Thanks in advance..!

I want to hide custom field 'Ware House',if customer group is
'General,Wholesale or Retailer.
If customer group is Test Group-1 or Test Group-2,then load sources
based on selected customer group


texts: Magento 2: How to generate backend url with key from frontend?

texts:
I need to generate backend url with key like this:
https://m2.com/admin/test/test/index/key/123XXXX

using URL builder
$this->getUrl('test/test/index')

how can i achieve this from the frontend side ?


texts: How to show Random products in category view page Magento2?

texts:
Here is my code -
Code of di.xml file -
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Catalog\Model\Layer">
        <plugin name="LayerPlugin" type="Vishal\ConfigPrice\Plugin\Model\Layer" sortOrder="1"/>
    </type>
</config>

Code of Model Plugin -
<?php

namespace Vishal\ConfigPrice\Plugin\Model;

use Magento\Catalog\Api\CategoryRepositoryInterface;
use Magento\Framework\Exception\NoSuchEntityException;
use Magento\Catalog\Model\ResourceModel\Product\Attribute\CollectionFactory as AttributeCollectionFactory;

class Layer
{
    /**
     * Product collections array
     *
     * @var array
     */
    protected $_productCollections = [];

    /**
     * Key which can be used for load/save aggregation data
     *
     * @var string
     */
    protected $_stateKey = null;

    /**
     * Core registry
     *
     * @var \Magento\Framework\Registry
     */
    protected $registry = null;

    /**
     * Store manager
     *
     * @var \Magento\Store\Model\StoreManagerInterface
     */
    protected $_storeManager;

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

    /**
     * Attribute collection factory
     *
     * @var AttributeCollectionFactory
     */
    protected $_attributeCollectionFactory;

    /**
     * Layer state factory
     *
     * @var \Magento\Catalog\Model\Layer\StateFactory
     */
    protected $_layerStateFactory;

    /**
     * @var \Magento\Catalog\Model\Layer\ItemCollectionProviderInterface
     */
    protected $collectionProvider;

    /**
     * @var \Magento\Catalog\Model\Layer\Category\StateKey
     */
    protected $stateKeyGenerator;

    /**
     * @var \Magento\Catalog\Model\Layer\Category\CollectionFilter
     */
    protected $collectionFilter;

    /**
     * @var CategoryRepositoryInterface
     */
    protected $categoryRepository;

    /**
     * @param Layer\ContextInterface $context
     * @param Layer\StateFactory $layerStateFactory
     * @param AttributeCollectionFactory $attributeCollectionFactory
     * @param \Magento\Catalog\Model\ResourceModel\Product $catalogProduct
     * @param \Magento\Store\Model\StoreManagerInterface $storeManager
     * @param \Magento\Framework\Registry $registry
     * @param CategoryRepositoryInterface $categoryRepository
     * @param array $data
     */
    public function __construct(
        \Magento\Catalog\Model\Layer\StateFactory $layerStateFactory,
        AttributeCollectionFactory $attributeCollectionFactory,
        \Magento\Catalog\Model\ResourceModel\Product $catalogProduct,
        \Magento\Store\Model\StoreManagerInterface $storeManager,
        \Magento\Framework\Registry $registry,
        CategoryRepositoryInterface $categoryRepository,
        array $data = []
    ) {
        $this->_layerStateFactory = $layerStateFactory;
        $this->_attributeCollectionFactory = $attributeCollectionFactory;
        $this->_catalogProduct = $catalogProduct;
        $this->_storeManager = $storeManager;
        $this->registry = $registry;
        $this->categoryRepository = $categoryRepository;

    }

    public function afterGetProductCollection(\Magento\Catalog\Model\Layer $subject, $result)
    {
        $result->setOrder('rand()');
        // echo "==-->>>==<pre>"; print_r($result->getData()); die;
        return $result;
    }
}

But no luck !!! Please help me....


texts:
I want to transfer to other server my store (new server have plesk panel ).

I wrote command in cli

bin/magento setup:backup --code --media --db

from old server with this method can i take those backups and reinstall magento  from start and put those backups again?
It will be fine will be all work fine?


texts: Incorrect Cart Price Calculation on Multi-Currency

texts:
Assuming the following values:

Product Base Price: 80 including tax
Tax: 10%
Conversion Rate to other currency: 4.5889

I still couldn't figure out why the cart item final price equals 333.74.

My computation:

Less the Tax from the Base Price:

(80 - 10%) = 72

Convert the Amount:

72 * 4.5889 = 330.4008

Final price should be 330.4008, so where does 333.74 come from. I have checked the tax rules, no other tax rule defined, no promotions defined.


texts: Magento 2 Class CoinGate\Merchant does not exist

texts:
I have installed the CoinGage_Merchant module in Magento 2.3 setup but when I fire di:compile command it is showing below error.
I set the generated folder permission 777 before compile command but still, it is giving an error.

  Class CoinGate\Merchant does not exist
    Class CoinGate\Merchant\Model\Payment\Interceptor generation error: The requested class did not generate properly, because the 'generated'
     directory permission is read-only. If --- after running the 'bin/magento setup:di:compile' CLI command when the 'generated' directory permission is set to write --- the requested class did not generate properly, then you must add the generated class object to the signature of the related construct method, only.

Does anyone has any idea, please share.

How to solve this issue?


texts: Error in magento 2.3 Class Does Not Exist in backend and frontend

texts:
I upload my magento 2.3 on my server, so when i navigate in the frontend the navbar is disappeared see the photo

so when change the mode to developer, to see the error in backend output print this error:
Class Magento\Catalog\Model\Category\ Attribute\Backend\Sortby does not exist
So What's going on?.


texts: Fotorama Gallery JS Errors With Magepack JS Bundling Enabled

texts:
We are using Magepack on a Magento v2.3.5-p2 website for JS bundling. See below:
https://github.com/magesuite/magepack
If we enable magepack JS bundling using the Luma or Blank theme it works fine without issue. However when we enable this using the clients implementation of porto theme it breaks the fotorama image gallery on the product pages. See error message that appears in the JS console below:
Uncaught TypeError: settings.$elementF.fotorama is not a function
When magepack JS bundling is disabled the image gallery works fine. It also works fine if the core Magento JS bundling is enabled. The issue is isolated to when magepack is enabled as far as we can tell.
Does anyone have any experience of this same issue when using Magepack JS bundling?
Does anyone know how to debug issues like this?
Is it something simple thing that we are missing like reordering the files in the magepack.config.js file?


texts: Magento Add Condition Rule In A Custom Form in magento 2

texts:
I want to add condition action in custom module admin form. How can I achieve this?

Refer link for Magento 1.9

Replacement of above link for Magento 2.


texts: Display Customer Groups Dropdown in admin system configurations in custom module of Magento 2

texts: I want to provide customer group based configuration in my custom group. So need to add customer group multiselect dropdown in system configuration at admin in Magento 2.x


texts: databse size of 1000mb file is not uploading completely

texts:
we have a  magento site

we have a large database of 1000mb for that site.

when we try to import database through phpmyadmin.

its not uploading full databse, lot of tables will miss after uploading.

we are getting this error :

Script timeout passed, if you want to finish import, please resubmit same file and import will resume

we have a godadddy cpanel and phhpmyadmin.

is there any way to upload a full database size of 1000mb completely.

i am planning to change php.ini settings as mentioned in this link :

https://stackoverflow.com/questions/16707532/how-to-solve-time-out-in-phpmyadmin

but i can not able to find php.ini file .

is i have to edit the defualt magento phi.ini.sample


texts: Magento 1: proper way to use transaction begin and rollback

texts:
So I'm working on some tests where I need to create fixtures data.

Basically I used to have the following pseudo code that worked fine:

public function setUp()
{
    // Programmatically create a coupon code
}

// Test methods

public function tearDown()
{
    // Programmatically delete the coupon code
}

On Vinai's recommendation, and to make my test easier to manage I decided to change that code to the following so I don't have to manually delete my fixture data anymore:

public function setUp()
{
    Mage::getSingleton('core/resource')->getConnection('core_write')->beginTransaction();
    // Programmatically create a coupon code
}

// Test methods

public function tearDown()
{
    Mage::getSingleton('core/resource')->getConnection('core_write')->rollBack();
}

However, with this code, my tests don't run properly anymore and I get the Zend_Db_Statement_Exception: SQLSTATE[23000]: Integrity constraint violation errors.

I was wondering if that's the right way of using transaction ?

Is the following order the right one ?

begin transaction
make DB changes (create DB data, and call the save() method)
rollback transaction

Do I need to call commit() before rollBack() ?


texts: Magento 2.4.1 Showing an Error No alive node found in you cluster while running upgrade Command

texts: When I try to run upgrade and reindex Command on terminal it's showing an error No alive node found in you cluster, I am not able to set up elasticsearch Configuration on backend showing an same error. sudo command also not working it's showing an command not found. I have attached snap of the error for you reference.