texts: Magento 1.9.x Custom attribute list in catalog/product list page

texts:
I'm definitely not a programmer, I struggle to program a television recording.

However I have to see a list of attributes in the short description of the magento 1.9 product list.

I created a custom attribute that has multiple variables that can be selected simultaneously.

Example:
Attribute title: Ingredients
values attrivuto, salt, oil, pepper, etc. etc.

This attribute is enabled to be visible in the front end.

After some research and various copy / paste and many attempts I came to this result.

I purposely used two different "get" that provide two different results

In the file list.html, inside the div class = "desc std" I entered the following code:

FIRST CUSTOMIZED example

 <? php echo $ _product-> getResource () -> getAttribute ('MIEI_ATTRIBUTI_1') -> getStoreLabel ()?>: <? php echo $ _product-> getAttributeText ('MIEI_ATTRIBUTI_1')?>

If it were just "salt" magento correctly returns "salt"
, but in this case there are more chosen variables and magento returns the word "Array" after the title
instead of writing "salt, pepper, oil etc etc"

SECOND CUSTOMIZED ATTRIBUTION

 <? php echo $ _product-> getResource () -> getAttribute ('MIEI_ATTRIBUTI_2') -> getStoreLabel ()?>: <? php echo $ _product-> getData ('MIEI_ATTRIBUTI_2')?>

In this case magento returns the "id" 1,2,3, etc., etc. instead of "salt, pepper, oil, etc."

sorry English I used google translator

How can I solve it?
Can you help me?
Thank you


texts:
We need a price rule so a customer can get a free item when they use the coupon code. That is simple if they just add any item within a category that is spec'd in the condition, and if they just add ONE of that item to the cart. Doing that, the coupon code works. But how do we set the condition or action to give them the one item free if they have additional items in the cart?

Currently, if they add more items to the cart, the code will not work.


texts: how to pass required variable in class using object manager magento2

texts:
I have a class

$class = new Abc\Cde\Efg('variable');

how can i implement this using object manager

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$class = $objectManager->create(Abc\Cde\Efg);

The variable value is required. Right now i have only one option to use new. but i dont want to use new keyword in magento2


texts: 3D secure card validation error on magento 1.7.0.2

texts:
We have installed Magento 1.7.0.2 and are using PayPal Payments Pro. When we enable 3D secure we get a popup error:

  This card has failed validation and cannot be used

We have registered on Cardinal and set profile and all things according to documentation. We have all settings in admin payment methods and payment services.

Can anybody help sort out this error?


texts:
We have 3 customer groups: General, Jobber, Wholesale
For some reason, when a customer create an account on frontend, no customer group is assigned.
In the backend we cannot create a new customer from the sales page because the customer group drop down is missing. I have to go to customer section to create a new customer and assign a group.
I did try to setup the automatic group assignment to general group, but then rule apply to wholesale group as if they were general.
Any idea how to assign all new customers to General while still being able to manually assign Wholesale from backend?
Thanks!


texts: update shipping address for shipping method change

texts:
I have create custom shipping method ("Store pickup").

When user fill address details at checkout page at that time shipping method showing.

Now if user select "Store pickup", i want to set store address as shipping address.

How can i set store address as shipping address when user select store pickup shipping method?

Anyone know can give some hint !


texts: How to update salable quantity of product from admin or programmatic in magento 2.3?

texts:
I have got salable salable quantity of product in magento 2.3 using object manager.

But we need to update quantity by programmatic or admin.

$getSalableQuantityDataBySku = $this->objectManager->create('\Magento\InventorySalesAdminUi\Model\GetSalableQuantityDataBySku');

$salable = $getSalableQuantityDataBySku->execute($sku);
                print_r($salable);

  Output like in below :

    Array
    (
        [0] => Array
            (
                [stock_name] => Default Stock
                [qty] => 0
                [manage_stock] => 1
            )

)


texts: How to enable CSS source Maps for Magento 2

texts:
How do you enable CSS source Maps for Magento 2's front-end  workflow.

I'm learning M2 and have created a custom theme, called "mytheme", inheriting from the out-of-box luma theme.  I'd like to use source Maps to navigate the maze of less files.

My local dev server compiles the LESS files but I've also set up grunt to compile LESS. I've also checked that dev/tools/grunt/configs/less.js has sourceMap: true,.

As you can see from the console output below, I cleared the cache, started the grunt watch process but still no CSS source map was generated. Am I missing something?

magento2$ php bin/magento cache:clean; php bin/magento cache:flush; rm -rf pub/static/frontend/Holy/mytheme/en_IE/ ; rm -rf var/view_pre
processed/
Cleaned cache types:
config
layout
block_html
collections
reflection
db_ddl
eav
customer_notification
full_page
config_integration
config_integration_api
translate
config_webservice
Flushed cache types:
config
layout
block_html
collections
reflection
db_ddl
eav
customer_notification
full_page
config_integration
config_integration_api
translate
config_webservice
magento2$ php bin/magento cache:clean; php bin/magento cache:flush; rm -rf pub/static/frontend/Holy/mytheme/en_IE/ ; rm -rf var/view_preprocessed/
Cleaned cache types:
config
layout
block_html
collections
reflection
db_ddl
eav
customer_notification
full_page
config_integration
config_integration_api
translate
config_webservice
Flushed cache types:
config
layout
block_html
collections
reflection
db_ddl
eav
customer_notification
full_page
config_integration
config_integration_api
translate
config_webservice

then...

magento2$ grunt watch
Running "watch" task
Waiting...
>> File "pub/static/frontend/Holy/mytheme/en_US/css/source/_extend.less" changed.
Running "less:mytheme" (less) task
File pub/static/frontend/Holy/mytheme/en_US/css/styles-m.css created: 333.74 kB → 574.02 kB
File pub/static/frontend/Holy/mytheme/en_US/css/styles-l.css created: 80.3 kB → 138.41 kB

Done, without errors.

Execution Time (2017-03-22 22:29:06 UTC-0)
loading tasks                3.3s  ▇▇▇▇▇▇▇▇▇▇ 7%
loading grunt-contrib-less  985ms  ▇▇▇ 2%
less:mytheme                   43.7s  ▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 91%
Total 48s

Completed in 51.030s at Wed Mar 22 2017 22:29:54 GMT+0000 (UTC) - Waiting...
^C

Execution Time (2017-03-22 22:28:52 UTC-0)
Total 1m 32.7s

then...

magento2$ find . -type f -name "*css.map"
./node_modules/convert-source-map/test/fixtures/map-file-comment.css.map
magento2$


texts: Review form stopped working (submitting)

texts:
I'm working on a Magento website wich is still in development. Work started somewhere in august previous year but for unforseen circumstances the work on this site has been on hold for several months. Last week we have started working on the site again and I have noticed that the review form, wich we have incorp[orated on the product page, has stopped working. When a review is being submitted the error message 'Unable to post the review' is being displayed and the review isn't submitted.

As the review form worked flawless for some montyhs ago my first thoughts were that the automatic Magento updates are the cause for the corrupted review form. Can this indeed be the case? Has there been any significant changes to the review form in the last updates?

I have googled for a solution but haven't found any leads. Does anybody has an idea where to lok for the cause of the problem? BTW, I don't get any errors in the logs.

With kind regards,
Erik


texts: Hide tab on custom form switching select values

texts:
I'm working on building a custom form where i need to show and hide other tabs of other form based on a select Value,

So pretty much i want, when switching on the second value to hide the second tab on the Left,
How can i do it, there's the part of the form Element that i'm working on:
<field name="season" sortOrder="40" formElement="select">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="source" xsi:type="string">box</item>
            </item>
        </argument>
        <settings>
            <validation>
                <rule name="required-entry" xsi:type="boolean">false</rule>
            </validation>
            <dataType>text</dataType>
            Season
            <dataScope>season</dataScope>
        </settings>
        <formElements>
            <select>
                <settings>
                    <options>
                        <option name="1" xsi:type="array">
                            <item name="value" xsi:type="string">1</item>
                            <item name="label" xsi:type="string">Estate</item>
                        </option>
                        <option name="2" xsi:type="array">
                            <item name="value" xsi:type="string">2</item>
                            <item name="label" xsi:type="string">Inverno</item>
                        </option>
                        <option name="3" xsi:type="array">
                            <item name="value" xsi:type="string">3</item>
                            <item name="label" xsi:type="string">Sempreverde</item>
                        </option>
                    </options>

-- Please Select --

                    <component>Magento_Ui/js/form/element/select</component>
                </settings>
            </select>
        </formElements>
    </field>

I was just guessing that i need to create custom component for the field so that can call a js file to change dinamically the Hide/show of the tabs, anyone have any clues?


texts: How to create categories wise landing page in magento?

texts:
i want to create category wise landing page in magento. i tried to create same with static block but nothing changing in my page. i already followed this url http://www.demacmedia.com/magento-commerce/mini-tutorial-how-to-add-a-category-landing-page/.

let's assume that i have categories like below

   Mens

 Clothes
Aviator

when i click on Mens i want to open landing page for this category. so how can i do this.


texts: Products deleted after Attribute set was deleted

texts:
Well, this is what happened:

I created a new Attribute set called "Nuevos Productos", then I added 20 products to that set. After that, I deleted the set by mistake and all the products were deleted too. How can I solve this!?

Thanks!


texts:
I've been getting slow page load times on my magento 2.3.1 site. I am still developing it and it is in developer mode, but i dont think switching to production mode will help too much. I have been developing a theme but it was slow before i noticed this and i have set it back to luma for further testing. Redis, varnish cache and elasticsearch 6 were all enabled, i have turned varnish and elasticsearch off but they did not make a difference and i heard that when using magento profiler you should turn off varnish.
I am running on a cloudserver with NGINX, PHP-FPM on Ubuntu 18.04. I have allocation of 4 cores and 4GB RAM. I use a plugin that will import most of my stock automatically from product feeds, i am currently using the sample data of just over 6000 products.

This is a link to my magento profiler data https://pastebin.com/SUM0u3aE

This section seems to be part of the issue

  ·  ·  ·  TEMPLATE:/var/www/clicksaveandprint.com/shop/vendor/magento/module-customer/view/frontend/templates/account/authentication-popup.phtml   0.001382    0.001382    1   75,552  0
  ·  ·  ·  TEMPLATE:/var/www/clicksaveandprint.com/shop/vendor/magento/module-catalog/view/frontend/templates/category/products.phtml 3.264447    3.264447    1   7,530,600   4,194,304
  ·  ·  ·  ·  EVENT:catalog_block_product_list_collection 2.471067    2.471067    1   6,501,048   4,194,304
  ·  ·  ·  ·  ·  OBSERVER:review  2.471036    2.471036    1   6,499,400   4,194,304
  ·  ·  ·  ·  ·  ·  EAV:load_collection   2.466872    2.466872    1   6,363,984   2,097,152

I have not edited the products.phtml. The product pages load better and with varnish on it is acceptable but the category pages are far from ideal.

Can anyone help narrow down the issue?


texts: We have Magento2 bookstore in development, but we want to add landing pages for certain attributes. Like attribute "publisher" with value "Swan" could resolve as /publisher/swan, for example. Is there anything like that already developed as add-on? Or which way would be the easiest way to develop such functionality?


texts:
How to add default values for system configuration  in magento 2.

I need to create and assign default values for system configuration(system.xml) for my custom module.

I have already created system configuations for my custom module.

In ui-form I have a field(flieuploader) namely small image which contains
 **backend system configuration which I have shown in below image**.

For below system configuartion

I have reffered to set system configuation like below using \Magento\Config\Block\System\Config\Form\Field\FieldArray\AbstractFieldArray.php and \Magento\Config\view\adminhtml\templates\page\system\config\form\field\array.phtml

Now,It works good and the configuation is also saved in DB. But I need **to create default values for my system configuration in config.xml. Please provide me a solution.

In core_config table My system config value is stored in below format
for  small image

  {"_1517563385604_604":{"width":"480","height":"300","imagesize":"25900"}}

For imagefile type

  jpg,jpeg,png,gif

How Do I give this value in config.xml which is in default configuration

System.xml

 <?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>

            XXXXX
            <tab>x_y_tab</tab>
            <resource>X_Y::config</resource>
            <group id="groupslide" translate="label" type="text" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">
                YYYYY
                <field id="small_image" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
                    Small Image
                    <frontend_model>X\Y\Block\Adminhtml\System\Config</frontend_model>
                    <backend_model>Magento\Config\Model\Config\Backend\Serialized\ArraySerialized</backend_model>

                </field>

                <field id="image_file_types" translate="label" type="text" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
                    Image File Types
                    <comment>Multiple values are seperated with comma</comment>
                </field>
            </group>

    </system>
</config>


texts: Magento 2 Add Customer Attribute Database

texts:
I've written a module to add a customer attribute. I then realised I needed another one. I thought it would be easier to add this via database.

I've added the required values to:

eav_attribute
customer_eav_attribute
customer_eav_attribute_website

And the attribute shows up lovely, but whenever I go to save it nothing happens.

I appreciate in hindsight this probably wasn't the smartest way to go about it, but what am I missing?


texts: Magento Multiselect attribute not saving

texts:
Magento 1.9.x

I have two attribute sets. Both sets have a lot of the same custom attributes. However, I have a multi-select attribute that will save values if its a product under one attribute set but if I have a product under a different attribute set that same value area will not save.


texts: How to restrict browser back button after success page magento

texts: how to restrict browser back button in success page


texts: Magento 2: Show different colors of same configurable product without colorswatch/configurable colors

texts:
I am looking for a solution for the following:
Example
2 Configurable products (sizes) of the Same T-shirt though different color:

Configurable product T-shirt A color Blue (size 1-10)
Configurable product T-shirt A color Red (size 1-10)

What is the best way to relate those products to eachother? I want for every color a different Page / URL.
How I would like to see is like this:
https://www.venroy.com.au/knitted-hoodie-grey-marl

You see different colours. And those colours are linked to different productpages / urls (so different configurable products).
How can i achieve this the best way?


texts: Display Product More Information In product Category Listing Page

texts:
i want to display product "More information" in catalog category page.

I copy that code from

  /magento/module-catalog/view/frontend/templates/product/view/attributes.phtml

    <?php $_additional = $block->getAdditionalData($_product);?>

<?= /* @escapeNotVerified */ __('More Information') ?>

                     <?php foreach ((array)$_additional as $_data): ?>

                         <?= $block->escapeHtml($_data['label']) ?>
                            <td class="col data" data-th="<?= $block->escapeHtml($_data['label']) ?>"><?= /* @escapeNotVerified */ $_helper->productAttribute($_product, $_data['value'], $_data['code']) ?>

                                        <?php endforeach; ?>

And add it in

  vendor/theme/Magento_Catalog/templates/product/list.phtml

But it not work, because it use different block than the list.phtml file.

What is the best solution to do that?


texts: Replicate category pages to show just sale products

texts:
In Magento 1.9.2.x I would like to create a custom module that will show all sale items (anything with a current special price) within a different section of the store but retaining the normal category hierarchy/structure and filtered navigation etc.

Example:

Standard category URLs showing non-sale items:

/books/
/videos/
/games/

New URLs showing only sale items within those same categories:

/sale/books/
/sale/videos/
/sale/games/

Previously we have done this by creating the "Sale" category and replicating the standard category tree beneath that and assigning products to those categories.

This quickly becomes un-manageable for a large catalogue, and when special prices end it is almost impossible to remember to remove the items from the Sale categories. A previous dev tried scripting the removal of products from sale categories but I don't feel that is the right approach either.

This guide from Inchoo looks like it will help me achieve most of what I want. The missing part is how I could implement the normal (/) and sale (/sale/) category URL structure.

Any ideas how I may handle this?


texts: How to get value from admin configuration for my custom module

texts:
I have created a custom module, and added values directly in my code like hardcode, how to get those values from the admin configuration and passed to my code.
Block:
<?php
namespace Zero\Customerreview\Block;

class Customerreview extends \Magento\Framework\View\Element\Template
{

     public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        array $data = []
     ) {

        parent::__construct($context, $data);
    }

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

    }

    public function getCustomerReview(){

        $authorization = "Authorization: Bearer nhuhtrbhuithtobtougbtgbigbrigboirubgurbgrbgibniutgtbgbuigbuobtrbntrhtrnijhiotgnbgnbhtrhnitgnbgibnrtshgtrnirtn'jhiotrtsnnioonrtrhtitrh";

        $url = 'https://mybusiness.googleapis.com/v4/accounts/123456789/locations/987654321/reviews';

        $ch = curl_init();
        //curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json' , $authorization ));
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($ch, CURLOPT_TIMEOUT, 10);
        $output = curl_exec($ch);
        $allData = json_decode($output, TRUE); // You will get all the data

        return $allData;
    }
}

I want to get $authorization and account id ( https://mybusiness.googleapis.com/v4/accounts/123456789)  details from admin configuration, and also how to pass that account id in URL?


texts:
I am trying to extend Mage_Core_Model_Email_Template_Filter class to add translate directive but I can't make it work.

Here my module:

  app/code/local/Company/Module/etc/config.xml

<config>
    <modules>
        <Company_Module>
            <version>1.0.0</version>
        </Company_Module>
    </modules>
    <global>
        <models>
            <core>
                <rewrite>
                    <email_template_filter>Company_Module_Model_Email_Template_Filter</email_template_filter>
                </rewrite>
            </core>
        </models>
    </global>
</config>

app/code/local/Company/Module/Email/Template/Filter.php

<?php

class Company_Module_Model_Email_Template_Filter extends Mage_Core_Model_Email_Template_Filter
{
    public function translateDirective($construction)
    {
        $params = $this->_getIncludeParameters($construction[2]);
        $text = $params['text'];
            return Mage::helper('page')->__($text);
    }

}

I can't figure it out why doesn't it work.
Any help?


texts: Magento 2 js library(Magento_Customer/js/customer-data) how to get custom product attributes in js

texts:
I've a little problem with an override of google tag manager in Magento 2 enterprise.

google-analytics-universals.js have some function that trigger the events: addToCart, removeFromCart.

To get the products details in addtocart function google tag manager(google-analytics-universals.js) use:

 'Magento_Customer/js/customer-data'

with the method:

   items = customerData.get('cart')().items;

Unfortunately this method don't retrieve product custom-attribute.

The question is: which is the best way to retrieve the custom attributes?

The js of google tag manager and the customer-data.js seems to haven't a phtml associated that I can use and however I have to get custom attributes only of the product triggered by addtocart event in js.

Any idea?


texts:
I am having problems with dynamic display store views which are grouped by their website and having selected values if I am editing existing data.

What I achieved,  displaying store views, and saving them to the database as an array of ids in the TEXT column.

I am new at Magento, so excuse me if this question is not very clear.

class StoreViews implements \Magento\Framework\Data\OptionSourceInterface
{
    protected $storeManager;

    protected $options = [];

    public function __construct(\Magento\Store\Model\StoreManagerInterface $storeManager)
    {
        $this->storeManager = $storeManager;
    }

    public function toOptionArray()
    {
        $collection = $this->storeManager->getStores();
        foreach ($collection as $item){
            $this->options[] = array('label' => $item['code'], 'value' => (int)$item['store_id']);
        }

        return $this->options;
    }
}

Here is UI COMPONENT

<field name="store_views">
            <argument name="data" xsi:type="array">
                <item name="options" xsi:type="object">Module\SubscriberSegment\Ui\Component\Form\StoreViews</item>
                <item name="config" xsi:type="array">
                    <item name="dataType" xsi:type="string">int</item>
                    <item name="label" xsi:type="string" translate="true">Store View</item>
                    <item name="formElement" xsi:type="string">multiselect</item>
                    <item name="source" xsi:type="string">page</item>
                    <item name="dataScope" xsi:type="string">store_id</item>
                    <item name="default" xsi:type="string">0</item>
                </item>
            </argument>
</field>

ADDING PICTURE FOR BETTER EXPLAINING THE PROBLEM

This multi-select store needs to be grouped by their website, and in case of a saved record, I need to multi-selected values that are saved  to be selected


texts: Old store redirecting to new one when same database is used for new magento

texts: I installed fresh magento 1.9.2.3 with same old database which i used for magento 1.9.2.2. Now when I open magento 1.9.2.2 it is redirecting to magento 1.9.2.3 home page. Is there anything i have to change inside the code?


texts: Magento 1.7.0.2: sql installer show error

texts:
I have create an extension ,which has a sql Installer,When i  am trying to  run  that extension,the installer show  Error

`a:5:{i:0;s:329:"Error in file: "/home/wwww/uat/app/code/local/Amit/Myoptimization/sql/myoptimization_setup/install-1.0.0.php"` -

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1";i:1;s:925:"#0 /home/seventy/www/uat/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
#1 /home/www/uat/app/code/core/Mage/Core/Model/Resource/Setup.php(421): Mage_Core_Model_Resource_Setup->_modifyResourceDb('install', '', '1.0.0')

Here the details of extension....

Amit>Myoptimization>etc>Config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Amit_Myoptimization>
            <version>1.0.0</version>
        </Amit_Myoptimization>
    </modules>

    <global>
        <resources>
            <myoptimization_setup>
                <setup>
                    <module>Amit_Myoptimization</module>
                </setup>
                <connection>
                    <use>core_setup</use>
                </connection>
            </myoptimization_setup>
            <myoptimization_read>
                <connection>
                    <use>core_read</use>
                </connection>
            </myoptimization_read>
            <myoptimization_write>
                <connection>
                    <use>core_write</use>
                </connection>
            </myoptimization_write>
        </resources>
    </global>
    <global>
        <models>
            <myoptimization>
                <class>Amit_Myoptimization_Model</class>
            </myoptimization>
        </models>
        <blocks>
            <myoptimization>
                <class>Amit_Myoptimization_Block</class>
            </myoptimization>
        </blocks>
    </global>
    <!-- start of rewrite class -->
    <global>
        <models>
            <catalog>
                <rewrite>
                    <product>Amit_Myoptimization_Model_Catalog_Product</product>
                </rewrite>
            </catalog>
        </models>
    </global>
</config>

SQL Installer:
local\Amit\Myoptimization\sql\myoptimization_setup\install-1.0.0.php

<?php
installer=$this;
$installer->startSetup();
$installer->run("ALTER TABLE my_ibanner_banner ADD INDEX  banner_id");
$installer->run("ALTER TABLE colorswatches ADD INDEX option_id");
$installer->run("ALTER TABLE colorswatches ADD INDEX colorswatches_id ");
$installer->run("ALTER TABLE color_relationship_product  ADD INDEX color_relationship_product");
$installer->endSetup();

Module File:
XMl File:

app/etc/modules/Amit_Myoptimization.xml

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

Can any one tell me ,what are the issue??


texts: Magento2 when same product in cart is added with different custom options update cart product

texts:
As per magento2 behaviour if I select same product second time with different custom options it add product second time.

I want that there should be only 1 product & product should be updated

Here first time I added product with test custom options to cart
Second time with teast2 custom options to cart

I want second time to be updated in cart not add product seperately

How can I achieve this?


texts: Show out of stock products based on attribute value in layered navigation

texts:
As the title states, in Magento 1.9.2.2 I need to show products out of stock if they have the value of a specific attribute (for example the custom attribute 'always_show') set to 1 in the layered navigation.

How do I accomplish that? Do I have to extend the Mage_Catalog_Block_Product_List class?


texts: Magento 2 : Steps to initiate return in Magento ver. 2.4.1

texts: How to initiate return in Magento ver. 2.4.1 ?


texts: Why maintenance mode doesn't allow my IP?

texts:
I had to put the Magento 2.3.1 in maintenance mode, but I used the command below to allow my domain, I checked in the var/.maintenance.ip file and it's correct, but I can't access the store yet.

bin/magento maintenance:enable --ip=192.0.0.10

My var/.maintenance.flag is empty and my var/.maintenance.ip has this content:

192.0.0.10

How could allow my IP to access?


texts: I was created admin module for manage supplier information, next I want to add supplier list drop down to product details ( catalog > manage product > Inventory >) How to do it ?


texts:
Any one idea about "Does the M2ePro list all products from Magento to Amazon?"

I have found this Link and step by step  i have configured but last step showing errors,Please see attached screenshots. let me know how to fix this issue


texts: How to clean cloudways Varnish cache after cleaning statics on magento 2 side

texts:
I wrote a class that works if I call it through pure php. It looks something like this
class CloudwaysAPIClient
{
    const API_URL = "https://api.cloudways.com/api/v1";
    ...
    public function purgeCache()
    {
        ...
    }
    ...
}

After that I call it with the necessary parameters
$apiClient = new CloudwaysAPIClient('...', '...');
$apiClient->purgeCache();

How can I call my class after cleaning static files through a button in the admin panel
System > Cache Management > Flush Static Files Cache


texts:
We have a Problem with differences in the total price of the order between our Magento Webshop and ERP.

For example Magento (in our case 1.9.4.0) calculates this way:

7.85 € (product price) - 5% (tier disc. for 5 pcs) = 7.4575 € => 7.46 € (will be rounded now)
7.46 € (tier price) x 100 pcs (qty) = 746.00 € (position total)

But our german ERP calculates this way:

7.85 € (product price) - 5% (tier disc. for 5 pcs) = 7.4575 €
7.4575 € (tier price) x 100 pcs (qty) = 745.75 € (position total) => 745.75 € (will be rounded now)

Result for the order item total:

Mage: 746.00 € => more or less 5% discount ( 4.97% )
ERP: 745.75 € => exactly 5% discount

My reflections:

It could be a solution to...

...increase the precision of the tier prices from 2 decimal places to X
...use percentage tier discounts instead of amounts.

Questions:

Is there a parameter in the magento configuration to increase the precision of the tier prices? ...or another easy way?
Do you have a recommendation for a module, which allows percentage tier discounts, calulates with all decimal places and rounds the item total at the end?
What are your thoughts?

Thanks and best regards,

Chris


texts: bundled product show additional attributed of sub products

texts: i wan to show additional attributes of subproducts in case of bundled products , how can i do it please guide


texts:
Trying to get to know how less work or better lib-css in partnership with it.

I have all styles generated on different element ending with :after going down to the same line of the _icon.less that generate the icon,

Now if I want to take the icon off just to a single div element how do I do?

Example:

@media all {
    .page-header .switcher .options .action.toggle::after, .page-footer .switcher .options .action.toggle::after {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        font-size: 12px;
        line-height: 22px;
        color: inherit;
        content: '\e622';
        font-family: 'luma-icons-entended';
        margin: 0;
        vertical-align: top;
        display: inline-block;
        font-weight: normal;
        overflow: hidden;
        speak: none;
        text-align: center;
    }
}

seems generated by _module.less on line 270

    .page-header,
    .page-footer {
.switcher {
                font-size: 12px;
                .options {
                    .lib-dropdown(
                    @_dropdown-actions-padding: 0,
                    @_dropdown-list-item-padding: 0,
                    @_dropdown-toggle-icon-content: @icon-down,
                    @_dropdown-toggle-active-icon-content: @icon-up,
                    @_icon-font-text-hide: true,
                    @_icon-font-size: 12px,
                    @_icon-font-line-height: 22px,
                    @_dropdown-list-min-width: 100px
                    );

                    ul.dropdown {
                        a {
                            .lib-link(
                            @_link-color: @color-gray20,
                            @_link-text-decoration: none,
                            @_link-color-visited: @color-gray20,
                            @_link-text-decoration-visited: none,
                            @_link-color-hover: @color-gray20,
                            @_link-text-decoration-hover: none,
                            @_link-color-active: @color-gray20,
                            @_link-text-decoration-active: none
                            );
                            display: block;
                            padding: 8px;
                        }
                    }

                }

and _icon.less on line 80

&:after {
    ._lib-icon-font(
        @_icon-font-content,
        @_icon-font,
        @_icon-font-size,
        @_icon-font-line-height,
        @_icon-font-color,
        @_icon-font-margin,
        @_icon-font-vertical-align
    );
}

but this last one seems to generate a lot of :after to different div element so eliminate this  means eliminate all other :after connected to it trough different div

How do I do so to display:none just on 1 single div, in this case

.page-header .switcher .options .action.toggle:hover::after, .page-footer .switcher .options .action.toggle:after


texts: SOLVED - Magento 2 Get product_options value from sales_order_item

texts:
In sales_order_item table, there's a column product_options to store some custom values.

I need to get the deliverydates from the following value (value from the db column product_options)

{"info_buyRequest":{"qty":"1","super_attribute":{"137":"2803","93":"17717"},"product":"37702","deliverydates":"2018-04-07"}}

I have tried the following code, but is not working.

    foreach ($this->order->getAllVisibleItems() as $orderItem) {
        $options = $orderItem->getProductOptions();
        #$options = $orderItem->getProduct()->getTypeInstance(true)->getOrderOptions($orderItem->getProduct());
        if(!empty($options['options'])) {
            foreach ($options['options'] as $option) {
                if ($option['label'] == 'deliverydates'){
                    $deliverydate = $option['value'];
                }
            }
        }


texts: Product collection based on "Set Product as New from Date"

texts:
I want product collection based on "Set Product as New from Date".I have specify date for filter this.
Below is code :

$todayDate  = Mage::app()->getLocale()->date()->toString(Varien_Date::DATETIME_INTERNAL_FORMAT);
$storeId    = Mage::app()->getStore()->getId();
$products = Mage::getModel('catalog/product_collection')
        ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
        ->addMinimalPrice()
        ->addUrlRewrite()
        ->addTaxPercents()
        ->addStoreFilter()
        ->addAttributeToFilter('news_from_date', array('date'=>true, 'to'=> $todayDate))
        ->addAttributeToFilter(array(array('attribute'=>'news_to_date', 'date'=>true, 'from'=>$todayDate), array('attribute'=>'news_to_date', 'is' => new Zend_Db_Expr('null'))),'','left')
        ->addAttributeToSort('news_from_date','desc');
    Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($products);
    Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($products);

    $products->setPageSize($this->getConfig('qty'))->setCurPage(1);
    $this->setProductCollection($products);

Now issue : query is filtering a table "catalog_product_flat_2" but date (Set Product as New from Date) I set for product is saved in "catalog_product_entity_datetime" hence I am not gettnig proper
data.


texts: Filter product collection to remove products missing an image

texts:
I can't find how to do this in Magento 2 (plenty of info on magento 1, but I don't know if it is the same code?).

In the product collection code, when adding addAttributeToFilter() - what code do I need to use to filter out products that are missing an image?

Something like this (from Magento 1 code) maybe?

->addAttributeToFilter('image', array("neq"=>'no_selection'))

Could someone confirm please?


texts: I just want override the user roles in the magento admin panel so that each store can have separate admin say Store Admin, Can anybody suggest a way to filter the stores for multiple Store Admins?


texts: Magento 2 : Remove Billing Address From Payment Step in Checkout

texts:
In the payment step under checkout in Magento 2, I'm trying to remove the address and the option: 'My billing and shipping address are the same
'. Because I have added billing address to shipping step.

I got a LayoutProcessor.php and I'm trying to edit the $jsLayout but I'm unsure if this is the way to go and what path to unset it at.

I currently got the following code which doesn't work yet. It's in the aroundprocess function.

if (isset($jsLayoutResult['components']['checkout']['children']['steps']['children']['billing-step']['children']['payment']['children']['payments-list'])) {
            $componentBilling = $jsLayoutResult['components']['checkout']['children']['steps']['children']['billing-step']['children']['payment']['children']['payments-list']['children'];
            foreach ($componentBilling as $keyBilling => $value) {
                if (preg_match('/-form/', $keyBilling)) {
                    unset($componentBilling[$keyBilling]['children']['form-fields']);
                }
            }
        }

Thanks in advance!

P.s. for anyone who is curious about how to move the billing address to the shipping step. I followed this guide.

Update: I did find this option: In admin under Stores -> Configuration -> Sales -> Checkout -> Checkout Options -> Display Billing Address On .. change it to Payment Page. And then add the following code

    unset($jsLayoutResult['components']['checkout']['children']['steps']['children']['billing-step']['children']['payment']['children']['afterMethods']);

But I would prefer a prettier option where no settings have to be changed in the admin, so if anyone knows anything?


texts: Dealing with attributes as filters in search and category level

texts:
So, i m really confused with creating attributes and sets in magento. The Problem is let conside size attribute. I have two type of Product subcategories "Shirts" and "Shoes" under one "Fashion Category" . Now since size attribute shud be different for "shoes" and "shirts" i created two version of it "shirt_size" and "shoes_size". Now the Problem is with Filter in Layered Navigation. On Main Category level, there are two SIZE filters available. (provided i have labeled both attributes as SIZE for frontend).
So this is confusing. I Really dont want to disable them as then they will stop showing at "shoes" or "shirt" category level too.

Same thing repeats for several other attributes like "Brand" etc (megastore project)

I have seen this thread Filter only in Last level , but i do want some of choosen filters like "Price" and other some to show up in both search and category filters.

What should be my solution approach? I m struggling to configure the store
Thanks


texts: addImageToMediaGallery copy the image file to media folder

texts:
i use addImageToMediaGallery to add images for products. Images are associated correctly but i've problem, the final path become /media/catalog/product etc etc. I've tried with

$product->addImageToMediaGallery($imgPath, null , false , false);

or

$product->addImageToMediaGallery($imgPath, null , true , false);

the result is the same.

How to add an image with a specific path?

Thanks at all.


texts: Magento2 confirm widget: Continue with url

texts:
I have an extension with a backend view where I have a button which routes to another url. When the user clicks the button I want to show a pop up which asks him a second time if he/she really wants to continue. I have the following code in my template:

<button class="action-third" type="submit" title="Reset" id="reset-all" onclick="setLocation('<?php echo $block->getUrl('some/url/reset') ?>')">
    Reset all
</button>

But that does not work. Here are my two questions:

What do I have to do so that the pop up shows up?
What should I insert in the confirm() and cancel() function so that if the user clicks OK, he gets to the route the button links to, otherwise not.


texts: Problem connecting to db after securing phpmyadmin with htaccess & htpasswd

texts:
I recently having an idea of securing my phpmyadmin portal, So i added htaccess and htpasswd to add another layer of protection
 [![enter image description here][1]][1]

And I realized that my web application is now no longer able to access the connection to my db , since I have added another layer of auth type. I notice that env.php are responsible for taking notes on credential to log in my web app to my db.

So what command line should I add into env.php to enable this authenticate the new layer I had created (.htaccess " auth type: basic ")

Btw my issue originated from (SQLSTATE[HY000] [2002] Permission denied)

  {"0":"SQLSTATE[HY000] [2002] Permission denied","1":"#1
  Zend_Db_Adapter_Pdo_Mysql->_connect() called at
  [vendor/magento/framework/DB/Adapter/Pdo/Mysql.php:406]\n#2
  Magento\Framework\DB\Adapter\Pdo\Mysql->_connect() called at
  [vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php:460


texts: Magento 2: Get store information in frontend files

texts:
I'm completely new (like 3 days in) to Magento Development so I apologise in advance if i'm asking a silly question!

I've really struggled to find a good magento course online so now i'm at the stage of trying to figure it out myself (which is probably a bad idea, but if someone can point me in the direction of a great course, i'm all ears)

I'm currently trying to access my store information inside a custom template file

myvendor/mytheme/Magento_Theme/templates/top_header.phtml

and i'm including it inside my default.xml file like this

<referenceContainer name="header.panel">
    <container name="custom.header.top" htmlTag="div" htmlClass="name-number">
        <block class="Magento\Framework\View\Element\Template" name="custom.header.top.content" template="Magento_Theme::top_header.phtml" before="-" />
    </container>
</referenceContainer>

I have had a look at guides online such as

https://www.mageplaza.com/devdocs/how-get-store-information-magento-2.html

The bits of courses I have done haven't even mentioned the code directory yet. How can I implement something like this to access my store information in my frontend folder?

If someone could explain to me how it works, i'll be forever in your debt!


texts: How do I add breaking points to my layout.xml?

texts:
I want to remove a certain block on my website but only for desktop resolutions.
How do I add a breaking point to my default.xml inside my theme?


texts: How can I use a link in string to translate at Magento 2?

texts:
In Magento 1 I use this code:

<?php echo $this->__('some text here', Mage::getUrl('some/url/here')); ?>

How can I use in Magento 2?


texts:
I am trying to get custom attribute value in frontend

I am trying below code in view.phtml , its working fine.

when i used the same code in other .phtml file its giving error :

Fatal error: Call to a member function getId() on a non-object in

<?php

$product_id = Mage::registry('current_product')->getId();
$_product=Mage::getModel('catalog/product')->load($product_id);
$attribute = $_product->getResource()->getAttribute('cod_available');
if ($attribute)
{
    echo $attribute_value = $attribute ->getFrontend()->getValue($_product);
}
?>


texts:
We installed SUPEE 10975 a while ago and more patches since.  Lately we are getting warnings that jQuery is out of date and I'm not quite sure what to do.

SUPEE-10975 - Failed.
Outdated JQuery library v.1.12.0 found (PRODSECBUG-2108), got '200'.

The patch was installed successfully.  The only thing I can think of at the moment is to grab the jQuery files from the latest Magento release and manually use them to replace the files on the server

Do you guys have any thoughts?

Thanks

Update - I replaced the jquery files with ones from the latest Magento 1.9 download and I'm still getting the same error when I do a security scan.


texts:
I have a custom module (backend) displaying some data rows with Magento grid, it successfully displays the data, but when i enter some text in filtering textfile and the pass enter, there is an error message

Fatal error: Call to a member function toHtml() on a non-object in

    C:\xampp\htdocs\folder\app\code\local\namespace\AdminLog\controllers\Adminhtml\AdminLogController.php on line 37

here is the relevant setting

public function gridAction()
{
    $this->loadLayout();
    $this->getResponse()->setBody(
        $this->getLayout()->createBlock('adminLog/adminhtml_adminlog_grid')->toHtml()
    );
}

what is the problem?


texts:
I have the theme, theme was applied (So I think? I've taken over this project from a partner) to the site and I'm using mega menu. In my menu I have ha dropdown menu for a specific category. In this dropdown I want to be able to have a picture in the bottom of the dropdown, like in this picture.

In my manage categories tab I have these options, and everywhere where I'm able to upload images it doesn't show in my dropdown.

How do I fix this?


texts:
I am unable to edit the CSS for the welcome email template in Magento2.

Please help me where to edit this.


texts: Left side bar is not displaying .after made changes in base folder's files

texts:
In my website Left side bar is not dislaying after deleted the code line
""

<img src="<?php echo $this->getSkinUrl($this->getImgSrc()) ?>"
<?php if(!$this->getLinkUrl()): ?>
title="<?php echo $this->__($this->getImgAlt()) ?>"
<?php endif; ?>
alt="<?php echo $this->__($this->getImgAlt()) ?>" /> """
,

In the path app/design/frontend/base/default/template/checkout/callouts/left_col.phtml.
After adding the same code then also its not displaying.
Once i tried the before the same i deleted and adding the same code that time its displaying properly.Now its not displaying.

If I do changes in base folder files will it affect like that?.

please anybody Help me out in this.


texts: Is there a way to print/log/capture query, once solr has been enabled for search in Magento2.0.x EE, when user does quick search/layered navigation/advance search etc.


texts: Magento 2 form xml visibility fieldset conditional

texts:
I have added a new fieldset tab on the Cart Price Rule.

But I would like to hide on a conditional, I've tried:

...<fieldset name="custom_rule" sortOrder="100">
        <settings>
            <collapsible>true</collapsible>
            <opened>false</opened>
            <label translate="true">Custom Rule</label>
        </settings>
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="visible" xsi:type="boolean">sales_rule_form.sales_rule_form.hide</item>
            </item>
        </argument>
       .....

DataProviderPlugin:

public function public function afterGetData(\Magento\SalesRule\Model\Rule\DataProvider $subject, $result)
{
    if(is_array($result)){
        foreach ($result as $key=>$item) {
            $item['hide'] = 1;
        }
    }
    //print_r($item);die;
    return $result;
}

I can see in print it has hide key set as 1.

I get Error:

  There has been an error processing your request Boolean value is
  expected, supported values: array (   0 => true,   1 => 1,   2 =>
  'true',   3 => '1',   4 => false,   5 => 0,   6 => 'false',   7 =>
  '0', ) Error log record number: 761245652727


texts: Magento 2: Is there any way to select multiselect field in admin grid in edit form?

texts: I have saved multi select field data using pipe '|'. but i also need to this value selected when edit form page.


texts: How prevent a model data save using _save_before event

texts:
I have create a model which has its own database table. For a customization I need to trigger save_before event of this model.

If one field value is not matched, then the data should not be saved.

My main target is preventing data save using "before save" event

My config.xml code:

<?xml version="1.0" ?>
<config>
    <modules>
        <Amit_Custommodule>
            <version>1.0.0</version>
        </Amit_Custommodule>
    </modules>
    <global>
        <models>
            <custommodule>
                <class>Amit_Custommodule_Model</class>
                <resourceModel>custommodule_resource</resourceModel>
            </custommodule>
            <custommodule_resource>
                <class>Amit_Custommodule_Model_Resource</class>
                <entities>
                    <custommodule>

custommodule

                    </custommodule>
                </entities>
            </custommodule_resource>
        </models>
        <resources>
            <custommodule_setup>
                <setup>
                    <module>Amit_Custommodule</module>
                </setup>
                <connection>
                    <use>core_setup</use>
                </connection>
            </custommodule_setup>
            <custommoule_read>
                <connection>
                    <use>core_read</use>
                </connection>
            </custommoule_read>
            <custommodule_write>
                <connection>
                    <use>core_write</use>
                </connection>
            </custommodule_write>
        </resources>
        <events>
            <custommodule_save_before>
                <observers>
                    <custommodule>
                        <type>singleton</type>
                        <class>custommodule/observer</class>
                        <method>customerSaveAfter</method>
                    </custommodule>
                </observers>
            </custommodule_save_before>
    </global>

</config>

Observer.php

<?php
class Amit_Custommodule_Model_Observer
{
public function customerSaveAfter($observer){

if($observer->getEvent()->getMyfield()==MatchWithMyLogic){
}
else
{
/*  i want prevent data base if my business logic is not match here */
}

}
}


texts: My subtotal calculating twice of total price not sure why?

texts: Why my subtotal showing wrong values on checkout page. When i am trying to add a product to cart. It is showing twice value of order.


texts: Magento 2 - How I can upload svg image from backend custom module's add/edit page?

texts:
I want to upload svg image using uploader from backend but it throws the error:

  disallowed extension

I have also change xml file <your magento dir>/vendor/magento/module-cms/etc/di.xml as:

<argument name="extensions" xsi:type="array">
    <item name="allowed" xsi:type="array">
        <item name="jpg" xsi:type="number">1</item>
        <item name="jpeg" xsi:type="number">1</item>
        <item name="png" xsi:type="number">1</item>
        <item name="gif" xsi:type="number">1</item>
        <item name="svg" xsi:type="number">1</item>
    </item>
    <item name="image_allowed" xsi:type="array">
        <item name="jpg" xsi:type="number">1</item>
        <item name="jpeg" xsi:type="number">1</item>
        <item name="png" xsi:type="number">1</item>
        <item name="gif" xsi:type="number">1</item>
    </item>
    <item name="media_allowed" xsi:type="array">
        <item name="flv" xsi:type="number">1</item>
        <item name="swf" xsi:type="number">1</item>
        <item name="avi" xsi:type="number">1</item>
        <item name="mov" xsi:type="number">1</item>
        <item name="rm" xsi:type="number">1</item>
        <item name="wmv" xsi:type="number">1</item>
    </item>
</argument>

Any suggestion please.


texts: Upgrade issue 2.2.3 to 2.2.10 Class argument is invalid: xxx\xxx\Ui\Component\DataProvider\DataProvider

texts:
I've got a store which has had a significant upgrade.

Gone from 2.2.3 to 2.2.10.  I've handled a lot of issues already.  The frontend seems fine.

Having a problem with backend. Getting errors when loading admin grids.  So just by logging in see errors like this:

Class argument is invalid: Magento\AdminNotification\Ui\Component\DataProvider\DataProvider

So I disable admin notifications via composer / CLI.

Then see similar error Magento\ReleaseNotification

So I disable release notifications via composer / CLI.

Can log in (or bypass dashboard) but then going to Catalog > Products for example

Class argument is invalid: Magento\Catalog\UI\DataProvider\Product\ProductDataProvider

So just generally seems to be an issue with admin grids

I've Googled and read about changes in XML syntax but surely I can't have an issue with all the core modules?

Has anyone experienced the same issue? Or can you point me in the right direction?


texts: Change magento theme but home page shows old theme

texts:
I am strucked in a strange issue. I change my website theme, all internal pages showing in new theme but Home page still showing old theme.
Well I am working on it since more than 2 hours but not resolved it.

I clear cache etc but not solving my problem.
Just want to know if there some other options in magento  to change theme template for home page.

Yes I am new in magento


texts: Where is the function when click on "Manage Categories" in admin panel

texts: I am checking in admin panel, when admin click on "Manage Categories" page is redirect to other location.I want to to know where is the function when click on "Manage Categories".


texts: Magento 2 Marketplace and Semantic Versioning

texts:
For folks who've purchased and downloaded extensions from Magento Marketplace, are the module's there using semantic versioning?  i.e. -- do the third party modules have a require section in their composer.json files that lists out the Magento components the third party module needs in order to work correctly?

I realize this is going to vary by vendor, but I'm trying to get a feel for how widely used the feature is.


texts:
I recently noted that the table core_session is growing very fast ( +400MB ) I'm quite sure this is something abnormal.

I have truncated it but after a couple of days, It is again very big.
If I switch to file systems backend the problem persists
I found out that about every second I get a new session

Test:

The session is behaving correctly:
I performed some test on our staging server ( protected by .htaccess ):

So far everything looks working fine: 1 access produce 1 session.

Cause:
On live site online customer (Magento backend) shows about 500 customers ( I think each row represent open sessions):

Some IP address are shown multiple times (20/30)
Checking those IP with https://www.ultratools.com/tools/ipWhoisLookupResult I found out they are from GOOGLE/Microsoft.

eureka: Bots/Crawlers do not store cookies so everytime the access to the site they produce a new session

Questions:

Is it normal those bots do 100/200 access/session each?
How can I limit the related session issue?


texts: How to completely disable a custom module

texts:
After a week of full hard work and coding i have successfully developed a magento extension which is working as expected but when i disable the module from magento admin config it still overriding the functionality, i have read about setting false in module global config files but don't getting how can i do this programatically.

Any one have any idea how this can be solve ?

Thanks


texts: Magento 2.2.2 customers receiving multiple shipment emails

texts:
I have problem on one the client magento site. For some reason customers were getting multiple shipment emails. They are getting it around 10 per order, and not all of them, only few random customers as I can see for now, so I can't figure it out why is that happening.
I can't find solution for it, and I looked everywhere. If you have any suggestion or possible solution please write.
Thank you!


texts: Magento2.2.5 - Amazon Seller channel Module error

texts:
We have a magento 2.2.5 based website and just tried installing the Amazon Sales Channel module (https://marketplace.magento.com/magento-module-amazon.html) however after installing it and running the Magento upgrade, compile and deploy command when we then go to login to our Magento admin and are presented with the below error.

I don't understand why I would have to downgrade our other Amazon modules in order to use this nor do I want to downgrade because I am concerned it will cause issues with other stuff on the site if I do.

Has anyone had this issue and if so any work around to getting it to work?

1 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): Please
upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory.
The following modules are outdated:
Amazon_Core schema: current version - 2.2.10, required version - 2.2.7
Amazon_Core data: current version - 2.2.10, required version - 2.2.7
Amazon_Login schema: current version - 2.2.10, required version - 2.2.7
Amazon_Login data: current version - 2.2.10, required version - 2.2.7
Amazon_Payment schema: current version - 2.2.10, required version - 2.2.7
Amazon_Payment data: current version - 2.2.10, required version - 2.2.7


texts: How to add Custom Tab in Magento Product Description Page

texts:
I am new in Magento, I want to add three custom tab in Megento Product description page after "Product Description" Tab

Also I have created an attribute with "Product Details" as Textarea, Specification as Textarea, Ware & Care as Textarea in admin panel.


texts: Show product sizes below product in frontend

texts:
How can I display the sizes, 'size' attribute, in the frontend? Like in the Magento demo store, both color and size are shown under the product, I just want to display the size.

Thanks!


texts: Commands are not working even when I tried to give permissions

texts: I am trying to run commands through ssh, but commands are not working. Please check the screenshot.


texts: Magento 2: Sorting / Filtering not work in my hardcore column of grid component

texts:
I try to put a hardcore column 'status' in to my product grid list.

Here is my column tag.

<column name="custom" class="AIS\Custom\Ui\Component\Listing\Column\Seller\Course\Status">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="filter" xsi:type="string">text</item>
                    <item name="add_field" xsi:type="boolean">true</item>
                    <item name="label" xsi:type="string" translate="true">Status</item>
                    <item name="sortOrder" xsi:type="number">40</item>
                    <item name="resizeEnabled" xsi:type="boolean">true</item>
                    <item name="resizeDefaultWidth" xsi:type="string">250</item>
                    <item name="indexField" xsi:type="string">entity_id</item>
                </item>
            </argument>
        </column>

And my column class

class Status extends \Magento\Ui\Component\Listing\Columns\Column
{
    public function prepareDataSource(array $dataSource)
    {
        if (isset($dataSource["data"]["items"])) {
            foreach ($dataSource["data"]["items"] as & $item) {
                $name = $this->getData("name");
                $item[$name] = "Completed";
            }
        }
        return $dataSource;
    }
}

It is success to show "Completed" in my grid component. However, sort the column or filter by column is not work for the column. Do I missing something need to modify ?


texts: How to convert magento 1.x module to magento 2.x module

texts:
I need to convert my modules from 1.9.X to 2.0.X,

Is there any way to convert, or we will start from scratch.?


texts:
I have removed all outdated products from my Magento 1.7.x website.
Now I have some empty configurable products.

How can I find all configurable products without connection to a simple product?
They should be deleted too.


texts: Varien File Uploader how to upload multiple files

texts:
Varien_File_Uploader I need to know how to upload multiple files, received with different name.

ex:

1-->

<input name="userfile" type="file">

2-->

<input name="coverimage" type="file">

my current code is able to receive only one file.

if (isset($_FILES['userfile']['name']) && $_FILES['userfile']['name'] != '') {
        try {
            $uploader = new Varien_File_Uploader('userfile');
            echo 'testing';
            $uploader->setAllowedExtensions(array('png', 'jpg','gif'));
            $uploader->setAllowRenameFiles(true);
            $uploader->setFilesDispersion(false);
            $currentTimestamp = Mage::getModel('core/date')->timestamp(time());
            $folder_name_date = date('Y_m_d', $currentTimestamp);
            $path = Mage::getBaseDir('media') . DS . 'uploads' . DS . $folder_name_date;
            if(!is_dir($path)){
                mkdir($path, 0777, true);
            }
            $uploader->save($path, $_FILES['userfile']['name'] );
            $newFilename = $uploader->getUploadedFileName();
            echo $path. DS .$newFilename;
        } catch (Exception $e) {
            echo "Error";
        }
    } else {
        echo 'File is not set';
    }


texts: Session or SessionFactory which one to Use in Magento 2?

texts:
I am have been working on a payment method where I need Current Quote
So I used
\Magento\Checkout\Model\SessionFactory $checkoutSession

and then get Quote from the Checkout session using
$this->_checkoutSession->create()->getQuote()

one of my fellow developer who was reviewing my code has told me to use Session instead of SessionFactory
I know some differences but I am not sure why he changed it and what you guys prefer to use
I have checked This Question but haven't got a satisfactory answer
Thank you


texts:
I'm facing a 'thousand years of pain' Magento deadlock issue on the last step of the checkout. Here's the exception:

exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction' in /var/www/app/code/community/Zend/Db/Statement/Pdo.php:258
Stack trace:
#0 /var/www/app/code/community/Zend/Db/Statement/Pdo.php(258): PDOStatement->execute(Array)
#1 /var/www/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#2 /var/www/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 /var/www/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#4 /var/www/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ma...', Array)
#5 /var/www/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ma...', Array)
#6 /var/www/app/code/core/Mage/Sales/Model/Resource/Order/Abstract.php(177): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `ma...')
#7 /var/www/app/code/local/Mage/Sales/Model/Abstract.php(51): Mage_Sales_Model_Resource_Order_Abstract->updateGridRecords('300151')
#8 [internal function]: Mage_Sales_Model_Abstract->afterCommitCallback()
#9 /var/www/app/code/core/Mage/Core/Model/Resource/Abstract.php(110): call_user_func(Array)
#10 /var/www/app/code/core/Mage/Core/Model/Resource/Transaction.php(79): Mage_Core_Model_Resource_Abstract->commit()
#11 /var/www/app/code/core/Mage/Core/Model/Resource/Transaction.php(169): Mage_Core_Model_Resource_Transaction->_commitTransaction()
#12 /var/www/app/code/core/Mage/Sales/Model/Service/Quote.php(189): Mage_Core_Model_Resource_Transaction->save()
#13 /var/www/app/code/core/Mage/Sales/Model/Service/Quote.php(249): Mage_Sales_Model_Service_Quote->submitOrder()
#14 /var/www/app/code/core/Mage/Checkout/Model/Type/Onepage.php(774): Mage_Sales_Model_Service_Quote->submitAll()
#15 /var/www/app/code/core/Mage/Checkout/controllers/OnepageController.php(512): Mage_Checkout_Model_Type_Onepage->saveOrder()
#16 /var/www/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Checkout_OnepageController->saveOrderAction()
#17 /var/www/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('saveOrder')
#18 /var/www/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#19 /var/www/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#20 /var/www/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#21 /var/www/index.php(87): Mage::run('', 'store')

I have tried:

reindex from shell
disable all local modules
https://gist.github.com/netalico/7917297
Philwinkle_DeadlockRetry
Increase lock timeout

with no success.


texts: Selling multiple products & accurate stock management

texts:
All of my competitors are selling the same products but in different inventory lots.  ie:

Cadbury Buttons - each
Cadbury Buttons - pack of 10
Cadbury Buttons - pack of 24
Cadbury Buttons - pack of 48

I want to do this with M2E Pro on Amazon.

What type of product type do I use to do this?  I want to have one overall product (Cadbury Buttons - each) and then have Magento accurately handle inventory.

Thanks


texts:
Is it possible to have the magento category menu available from anywhere in the phtml templates? I have searched for about an hour with no results.

There must be some global function to get the product category menu from anywhere in a html? Who can point me in right direction thank you!


texts: Basically I need to change the position of my community poll from the right side of the webpage to the left and I don't know how to do it


texts: Does the magento 1.9 schedule start reindexing?

texts:
Our customer uses a tool for importing products. This tool does not trigger reindexing on save.

When I look at the indexing modes of Magento 1.9 indexers I see real_time and manual.

Is there a way to schedule reindexing from Magento or am I ought to use a OS schedule/cron?


texts: How can I install Cybersource using composer?

texts:
I wanted to try and install the Cybersource package on Magento. On the marketplace, I had the option to download the package. When I did the only thing in the download was this composer.json-

{
"name": "cybersource/global-payment-management",
"description": "CyberSource Global Payment Management",
"version": "3.1.5",
"type": "metapackage",
"require": {
    "cybersource/module-3dsecure": "3.1.5",
    "cybersource/module-account-updater": "3.1.1",
    "cybersource/module-address": "3.1.2",
    "cybersource/module-applepay": "3.1.0",
    "cybersource/module-atp": "3.1.0",
    "cybersource/module-bank-transfer": "3.1.0",
    "cybersource/module-core": "3.1.2",
    "cybersource/module-echeck": "3.1.1",
    "cybersource/module-klarna": "3.1.1",
    "cybersource/module-paypal": "3.1.1",
    "cybersource/module-secure-acceptance": "3.1.5",
    "cybersource/module-tax": "3.1.2",
    "cybersource/module-visa-checkout": "3.1.0"
},
"license": [
    "proprietary"
]
}

I tried to use the require cybersource/global-payment-management when I did this is the error I got-

[InvalidArgumentException]
  Could not find a matching version of package cybersource/global-payment-management. Check the package spelling, your version constraint and that the package is available in a stability which matches your minimum-stability (stable).

I looked on packagist but didn't see the package. This is a really common product. How can I install this with the composer?


texts: Magento 2: How to set custom validation message?

texts:
I want to change Magento 2 validation message with my custom message.
on product detail page if I click add to cart button without selecting options than its shows This is a required field. but I want to change it with my custom message like Please select size.

Can anyone help me with this?
Thanks for your answer in advance.


texts:
I want to automatically delete comments in the programm code, mostly HTML.

Like:

Best would be a Plug-ins which leaves the comments as long its deactivated.

We are using Magento Speed from Potato Commerce and i thought the HTML minifi function would do this job. But its not.

Any ideas?


texts: Add Custom Product Tab in MAGENTO 1.9 CE

texts:
Version - 1.9

Theme : rwd

I followed this to add custom product tabs in product detail page. To add a new block I added below code in local.xml, but somehow it only works if I add it in catalog.xml

<catalog_product_view>
        <reference name="product.info">
            <block type="catalog/product_view_attributes" name="features_product_tab" as="features_tab" template="catalog/product/view/features.phtml">
                <action method="addToParentGroup"><group>detailed_info</group></action>
                <action method="setTitle" translate="value"><value>Features</value></action>
            </block>
        </reference>
        </catalog_product_view>

Adding the <block> in catalog.xml only, makes it appear as new tab.

In order to add content by admin, I have created an atrribute, assigned it to General group.

Created a CMS block at CMS > Static Blocks > Add New Block and in the create/edit product view, locating new attribute and populate it with the identifier of new CMS block. In my case, features_product_tab.

When I disable the Static Block, the tab still appears on product page. And even if the content is null, its shows on page. Maybe (as is often the case) CMS block is not strictly empty and contains hidden div or p tags?

The code in local.xml to display one of the tabs is

<block type="catalog/product_view_attributes" name="features_product_tab" as="features_product_tab" template="catalog/product/view/tabs/features.phtml">
                <action method="addToParentGroup"><group>detailed_info</group></action>
                <action method="setTitle" translate="value"><value>Features</value></action>
            </block>

Is it possible to check the Block Status from xml code, and show
it only if its enabled ?
How can the value of 'setTitle' be fetched from Block Title ?


texts: How to change attribute value in one product and save it only to this product?

texts:
I am doing a small external script site for my magento to get informations and do small tasks without navigationg through the magento backend (eg. show qty of all products).
What I want to do now is list a specified attribute value for all products and change it (so I don't have to go to all products and change it by hand).
Everything seems to work fine but when saving the new attribute value it updates the attribute on ALL Products. Via Ajax I pass an array (sku,attr_key,attr_value). Here my code:

public function newAttributesBySku($data){
    $products = Mage::getModel('catalog/product');
    $errors = array();
    foreach ($data as $array) {
        $product = $products->loadByAttribute('sku',$array['sku']);
        $save = $product->setData($array['attr_key'], $array['attr_array'])->getResource()->saveAttribute($product, $array['attr_key']);
        if(!$save) $errors[] = $save;
    }
}

I also tried with

$product->setData($array['attr_key'],$array['attr_value'])->save();

Which has the same effect. The attribute value gets saved, but now every product has the new value in the specified attribute.

Can anyone explain to me what I am doing wrong?
Thanks alot!


texts: Assign all the Order to related Customers on database

texts:
My website got hacked and all the customers were deleted, but the orders are still here.

I imported back the customers by CSV, but the orders are no longer assigned/linked to them. The only commun point is the email address in the orders details and the email address in customers accounts.

I need to know how I can assign again orders to customers in the database. Is it possible to find a way to link them again using the email?


texts:
I've created a Magento module which should hook into an event when a file is saved to cache. But it looks like there isn't any event like that, or am I missing something?

I currently hooked up with the

  category_product_gallery_upload_image_after

but then the file is edited by magento before writing to cache because it's resized. Therefor overwriting my file optimalisation.

Is there any way I can hook to an image before it's written to cache, or after the resizing?


texts: How to fetch data from a custom table in magento2 and show in home page

texts:
I have created a custom module with a custom table, now I need to fetch the data from the table and display in the home page. I achieved it by applying object manager I know it's not the correct method can anyone please tell me how to do it.

thank you


texts: Group Collection to Filter Unique Products Based on a Specific Attribute

texts:
Scenario:

A store catalog is populated with configurable products each having several children with different sizes and colors. As the goal is to show the different color variations, only the children's visibility is set to Catalog, Search while the configurable parents' visibility is set to Not Visible Individually.

Issue:

The catalog is currently showing every size variations for each color when ideally only a single variation per color should be showing.

Attempted Solution:

A unique attribute based on both the configurable parent SKU and color was created.

$collection->getSelect()->group($attribute);

This solution would be working correctly on a flat collection grouping, however it can cause conflicts with the different aliases used within EAV collection queries.


texts:
I installed Magento2 without composer. I would like to install a few extensions and another language but all tutorials I have seen use composer.

Is it possible to "add" composer when Magento is already installed ?
How do I have to proceed ?


texts: how to create a two column layout for header top links in magento 2

texts:
i use magento 2.1.1. i want to create a top links in left or right side above header.
  i attaching the following image of..
  i want to add a links like All flowers, All cakes, etc to left side and delivery, currency in right side at the top of header, but in Magento 2 layout overview link, display in right side.
  how i add a left side header links in magento 2...?
  please help...


texts: Not able to add Company Name in Customer grid during order creation

texts:
Please check attached screenshot of my code, I am able to show Company Name in Customer Grid but data is not showing. Please check attached screenshots.
File Paths are
1) Vendor\ModuleName\view\adminhtml\layout\sales_order_create_customer_block.xml

2)Vendor\ModuleName\Model\ResourceModel\Order\Customer\Collection.php

OutPut


texts: How can i solve the issue but category page redirect to 404 not found page

texts:
Error on Category Url

I couldn't find what's wrong with this, hope get solution for this error.


texts: Transactional e-mail: How to template 'sales_email_order_items' (or how to override adminhtml template)

texts:
In the transactional email code, I see this:

{{layout handle="sales_email_order_items" order=$order}}
{{var items_html}}

Which, I believe, refers to this template file:

/app/design/adminhtml/default/default/template/email/order/items.phtml

I've tried creating a new folder with our theme to avoid overwriting core files:

/app/design/our_theme/default/default/template/email/order/items.phtml

But this doesn't seem to work, is there a proper way to override this file without simply overwriting the core?


texts: Magento 2 - How to get the extension's configuration values in the phtml files?

texts:
I'm working with Magento 2 - beta.

But cannot find how to get the configuration values in the phtml files.

eg: I want to get my custom modules configuration values in Magento_Catalog/templates/product/list.phtml file.

Anyone know how to do this?


texts: Automatic discount coupon if purchase over 100 dollars

texts:
Is there a way to offer customer automatically a discount coupon if order is over 100 dollars? Better yet if the discount coupon could be emailed to customer with the order confirmation email.

Maybe there is some extension somewhere well hidden...?


texts: Magento 1.9.3 - PayPal Payments Pro Hosted - PSD2

texts:
Hope someone can let me know more info about using PayPal Payments Pro Hosted solution on Magento 1.9.3 for the PSD2 directive (3DS).

Currently when I am using the PayPal Payments Pro Hosted solution and the iFrame loads at the checkout page - I do not see any 3DS fields and I don't seem to see any configuration fields for it in the config.

Is it not active yet because it only comes into effect in Sept?
At which point it will appear?

Or do I need a new PayPal pro module for Magento?

Here's what PayPal say:

https://www.paypal.com/uk/webapps/mpp/psd2

Thanks for your help in advance!


texts:
Customer enters order with different shipping/billing addresses.

if we need to edit the order in admin it creates a new order, in the new order the shipping address defaults to 'same as billing' and the original shipping address is lost!

can anyone confirm if their installation does the same.
does anyone have a solution.


texts: Implementing Click Tracking for Transactional Emails

texts:
I'm building a module related to transactional emails, and one of the things that it does is add click tracking to transactional emails.

The way that it currently is doing that is by overloading the email template model (fully compatible with SMTP Pro), parsing links, and rewriting them to a controller of mine:

http://sitename.com/module/redirect/index/?link=http%3A%2F%2Fsitename.com/originallink/

I was thinking that perhaps a better approach would be to append query string variables to the original link:

http://sitename.com/originallink/?clicktrack=1&...

The nice thing about this is that it doesn't introduce a new dependency on my module.  So that if for some reason the module needed to be disabled, it could be done without emails that had already been sent out now having broken links in them.

I would need to add a controller_action_predispatch observer to check for the existence of the query string variables and perform the click tracking.

But there may be a couple of downsides:

Performance overhead - Not too concerned about this one - it takes under 10ms to perform a check in PHP for the query string variables
FPC / Varnish - this one I'm a bit more concerned about - if the page is already cached by the time the user hits it, then the predispatch may not even run.  The query string variables will be unique to the customer and the email they clicked on, so the URL itself will be reasonably unique, but if Varnish matches on the URL route and doesn't even care about the query string, then it will still get skipped.


texts:
I just took over a site from another programmer and I am trying to figure out what he has done.  I have multiple CMS pages to include the home page.  The homepage displays correctly, but several of the other CMS pages seem to be missing some code that the home page has.  Why this would be, I have no idea, as each page has the same config, design, ect. set when I create the page.  What I have found is the home page has two additional  tags that the other pages that are not working d not have.  How can this be if they should all be pulling from the same template.  If you would like to see what I am talking about here are the pages.  The problem I am seeing starts after the footer-container  tag

Non working page - http://precisiondelta.com/backupold/index.php/contact/?___store=default

Working page - http://precisiondelta.com/backupold/index.php/

Hopefully someone can show me the way, so I can finish this job...

Thank you in advance,
Tommy


texts:
I am attempting to override the file lib/internal/Magento/Framework/Model/AbstractModel.php itself, since there is code within one of its public functions that I wish to modify.

If I specify a preference in my di.xml to specify that the class is overridden, it is never used. This "preference" mechanism seems to be the method for extending the class somehow.
Since AbstractModel is an abstract class, all overrides/extensions of it are about actually making it a concrete class instead of an abstract.
That isn't what I want to do - I want to actually replace the base AbstractModel class itself and then all other classes (concrete instances of it, implementing its virtual methods) can use my new class.

How can I do this?

eg. in my di.xml I have this:
<preference for="Magento\Framework\Model\AbstractModel" type="My\Module\Model\AbstractModel"/>

....which is then never used.

Do I have to actually change the AbstractModel.php file itself? If so, this seems a Bad Idea as I am modifying the extremely fragile "core" code.

EDIT: To clarify, I do not want the original function to be called. The plugin system includes before, after and around calls (around = before + after) but in no circumstance does it exclude calling the original function. See https://devdocs.magento.com/guides/v2.3/extension-dev-guide/plugins.html where the sample scenarios for "replacing" Action::dispatch() always include the call to Action::dispatch() despite the before, after and around functionality.

In normal PHP with inheritance, if you override a base class method, the overridden method (and only the overridden method) will always be called. The child is under no obligation to call its parent, and therefore the parent overridden method may never be called. This is what I am trying to achieve - ordinary, sensible inheritance.

This Magento design seems to be contrary to this, where the base method is always called even if you "replace" it. This is different to every "inheritance" model in any OOP language I have ever encountered (C++, C#, Java, PHP etc. etc.). It appears to be a new definition of the word "replace"/"substitute" that doesn't exist in any language. It doesn't replace it at all - it simply calls functions around it. That isn't the same as substitution at all.


texts:
It's fairly well-known that (at least in 1.11 EE / 1.6 CE) you can bypass tax rates by utilizing a Zip + 4 (in USA) zipcode. I have tried to add a wildcard to the end of the 5-digit tax rate definition (which in my opinion should have worked) but that proved fruitless.

I found a suggestion to apply a core patch here which involved something to the effect of:

"app/code/core/Mage/Tax/Model/Resource/Calculation.php"

line 235 replace:

 $postcode = $request->getPostcode();

with

 $postcode = substr($request->getPostcode(),0,5);

Copying this to a local/Mage wouldn't be the end of the world - and would save us tax headaches. But I'm not a fan of that method.

How do you work around this issue?


texts:
I've imported some customers and the passwords could not be migrated. This is no big issue.
All the customers were notified to change their password.
But in the mean time, the Date of Birth field became mandatory, and the migrated customers did not have a birth date filled in.

Now the problem.

A customer requests a password change.
He receives an e-mail and clicks on the link for password reset.
He fills in his new password and submits the form.

Expected result
Password is changed.

Actual result
An error message appears at the top of the page: The Date of Birth is required..

Any pointers on how I can work around this and still keep the birth date mandatory for new customers?.

Issue appears on ce-1.7.0.2, but I have a feeling that the version is not important here.


texts: Magento 2 checkout - Move Email section to below Shipping address block

texts: I want to move the Email section into Shipping address block of the one page checkout. How can I do this?


texts: Setting the Store View programmatically in Magento 2

texts:
I need to have the functionality where if a customer has a VAT number added to their account then I need to change them to a trade store view.

I have the following code however the store view doesn't seem to change.

Could anyone advise where I am going wrong

<?php
namespace Vendor\Module\Observer;

use \Magento\Framework\Event\ObserverInterface;
use \Magento\Store\Model\StoreManagerInterface;

class CustomerLogin implements ObserverInterface
{
    protected $_storeManager;

    public function __construct(
        StoreManagerInterface $storeManager
    ) {
        $this->_storeManager = $storeManager;
    }

    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        //Get Customer
        $customer = $observer->getEvent()->getCustomer();

        if ($customer->getTaxvat() != '' ) {
            $this->_storeManager->setCurrentStore('trade_store_view');
        }
    }
}

I have the following in my events.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="customer_login">
        <observer name="customer_login_observer" instance="Vendor\Module\Observer\CustomerLogin" />
    </event>
</config>

I know the observer is firing as if I do var_dump tests I can see it gets into all the if statements


texts:
I want to show the customer ip in the sales order grid in admin section.

protected function _prepareCollection()
{

    $collection = Mage::getResourceModel($this->_getCollectionClass());
    $collection->getSelect()->join('sales_flat_order', 'main_table.entity_id = sales_flat_order_grid.entity_id',array('remote_ip') );
    return parent::_prepareCollection();
}

But its returns:-

  SQLSTATE[42S22]: Column not found: 1054 Unknown column
  'sales_flat_order_grid.entity_id' in 'on clause', query was: SELECT
  main_table.*, sales_flat_order.remote_ip FROM
  sales_flat_order_grid AS main_table  INNER JOIN sales_flat_order
  ON main_table.entity_id = sales_flat_order_grid.entity_id


texts: How to know if Mage::getModel('customer/customer')->load() succeeded?

texts:
I want to know what if a customer ID I was trying to load was invalid. When I do this:

$customer = Mage::getModel('customer/customer')->load(12345);

If this customer exists, I get the data.

The problem is, if the customer ID doesn't exist, I still get something:

array (size=2)
  'created_at' => string '2016-05-24T15:59:18+00:00' (length=25)
  'group_id' => string '1' (length=1)

I needed a way where I can sort of say,

if(!$customer) {....

or

if(count($customer) < 1) { ....

But since there is always something in the returned array, how can I really know if a customer exists in the database?


texts: magento 2 Grunt watch loads old css when changing imported css file

texts:
When I use Grunt Watch my less compile does not work as I expect it to be.
When I work directly in my theme. less file all perfectly changes and even with livereload works absolutely great.

But when I clean things up a put specific styles in their separate files things are getting weird.

This is my structure

Folder: app/design/frontend/Microdesign/Weldingmart/web/css

theme.less
components/header.less
components/footer.less
components/homepage.less

So first I need a static content deploy because I get errors like

FileError: 'components/header.less' wasn't found in pub/static/frontend/Microdesign/Theme/en_US/css/theme.less on line 8, column 1:

After that, all works what that's concerned but the content seems cached. only after a content deploy my content of the imported files are taking into account. so if I want to use livereload and watch I need to change the CSS in my theme.less and when I'm done I need to copy it into the appropriated field.

Of course, this is not what I want and like.


texts: How to show order status in Myaccount page?

texts:
I want to show the order status in MyAccount page when the customer login into Magento?

Is it possible to show them?


texts:
I've installed Magento 2 and under

  System -> Data Transfer

there are no options.
 Do I have to enable them somehow?


texts: Remove all products from one category programmatically

texts:
I just want to remove all products from given category,

for that I have tried below code which works absolutely fine , But it takes to much time ,

So I just want some code which works faster than this

$category = Mage::getModel('catalog/category')->load($categoryId);
$productCollection = $category->getProductCollection();
foreach($productCollection as $product){
    Mage::getSingleton('catalog/category_api')
         ->removeProduct($categoryId,$product->getId());
}


texts: Magento 2 - After invoice delete programatically can't create new invoice properly

texts:
I have used the code

if ($order->getInvoiceCollection()->count()) {
    $_invoices = $order->getInvoiceCollection();

    if ($_invoices) {
        foreach ($_invoices as $invoice) {
            $invoice->delete();
        }
    }
}

This is deleting invoice, but invoice button was not reappearing although invoice is deleted.

So, I have go through the database table and turns out order_items has item_invoiced column, I have used this code to set item invoiced value to 0

$items = $order->getAllItems();
foreach ($items as $k => $item) {
    echo $item->getId() . "\n";
    $item->setQtyInvoiced(0);
    $item->save();
}

After this code invoice button is appearing, but when I am creating invoice it is setting subtotal to negative like -1000


texts: How can I create a limited edition item with various sizes but, only sell 50 total?

texts:
I want to sell limited edition prints of a specific image.

I want to offer various sizes of that specific image.

I only want to sell 50 total prints, regardless of size, of that specific image.

Is it possible to create a limited edition item in this manner? To set the inventory for the parent product but, not the various options that are available for that product?

Thanks.


texts: Magento 2 - Set the maintenance mode with the custom page

texts:
I am about to make a server switch for my site https://www.magento2.com from Apache to Nginx and during for this operation i want set up maintenance mode. The server where I want to set up this mode is with Apache and my Magento version is 2.3.5 p1. How can I set maintenance mode and total redirect to my custom page: "maintenancepage.html"?
Thanks for any help


texts: Magento 2.1 - Deploy static view files without deleting pub/static

texts:
How can I deploy static view files over the CLI in Magento 2.1 WITHOUT deleting my complete pub/static/* dir.

Our Shop runs in an auto scaling enviroment.
Everytime when we want to deploy new style changes we have to take the complete shop offline for the whole deployment time.


texts: Magento 2 Pre populate checkout Shipping Address guest form

texts:
I've created a component to pre populate checkout Shipping Address form after document is loaded.

I've enter the city,postcode and country on the front end and first name and last name within quote.shippingAddress() e.g

quote.shippingAddress().firstname = 'John';
quote.shippingAddress().lastname = 'Doe';

But it seen that it ins't populating the form itself but it's populating the object fine. look screen shoot attached the form.

The object :

As you can see when I refresh the page the object get populated but the form on first name and last name is empty.

Does anyone know how can I achieve this?

Thanks.


texts:
We are currently having an issue with our checkout in Magento 2.1.5

If a user tries enough times, even though the order is "canceled", if there are enough rapid attempts, the order will go through and show as "Processing". However, there's no payment information. We are using Authorize.net only for transactions. We even get an email from Authorize.net stating the transaction is declined, but somehow it's making into Magento as a good order.

I don't think the problem is with Authorize.net as I can see the failed transactions and they're coming from a country where all transactions will be declined.

Does anyone know of a way to ban/block a user after "X" failed checkout attempts in Magento?


texts: Create Block Hide/Show Editor removes empty span

texts:
I created a new block in Magento 2.3 and want to use  to place some icons in front of a text.
I clicked on Hide/Show editor and pasted my code

Item 2
Reason 2 text

Changing back to the default editor it removes this empty .
If I replace the  with a
it will not delete this.

How can I use an empty  with my icons without inserting a &nbsp between the tags &nbsp;

Edit:

Sukumar Gorai suggested the workaround with a &nbsp;but it is only a workaround not a real solution.


texts: Magento2 display prices allways incl. tax - also customer has valid tax number

texts:
we have shop where european company can checkout without tax if they have valid tax-number.

Problem is, that prices are shown without tax if a cutomer is logged in and has valid vat number. But we have added information "prices incl. tax". So this is wrong if customer has valid vat.

How can I disable showing prices in catalogue without tax. Or can I detect if customer has entered valid vat number so I can switch text "prices incl. tax -> prices excl. tax".

Thanks for help!
Martin


texts: php -f bin/magento customer:hash:upgrade not works | Magento 2

texts:
I have import customers from magento 1 to magento 2 with admin tool

  System > Import

after import i run php -f bin/magento customer:hash:upgrade to upgrade password_hash from md5() to sha256() but it does not works

I check on db and password_hash are not changed


texts:
I set up a development environment for a magento instance. I cloned it to my local server, changed the URLs in Database, cleared cache and deleted old sessions.

If I want to login or reset my password, I always get this message:

 "Ungültiger Form Key. Bitte aktualisieren Sie die Seite."
 "Invalid Form Key. Please refresh the current Page."

I already checked other answers. I tried to set cookie_domain and cookie_path to empty value & also disabled the use_form_key with setting it to 0. Cleared cache, checked permissions etc.

Every time I get this error.

Any ideas what I could do more?


texts: Fatal error: Call to a member function rewrite() on a non-object after upgrade

texts:
We tried to upgrade our Magento installation from 1.7.0.2 to 1.8.0.0. Now we got the following error on all pages:

Fatal error: Call to a member function rewrite() on a non-object in /home/clientname/domains/domain.com/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php on line 165

We tried to clear all caches, disable and recompile the compiler and reindex the indexer. Earlier today everything went well on our local installation. This is the same installation except some orders and client data.

When the compiler is enabled the error changes in:

Fatal error: Call to a member function rewrite() on a non-object in /home/clientname/domains/domain.com/public_html/includes/src/__default.php on line 17761

How we can debug this error?


texts:
I'm trying to link to pub/media product images from inside an extension's .phtml so I can reuse them rather than duplicate them inside the extension. I tried...

<img src="<?php echo $block->getUrl('pub/media/catalog/product/t/e/')?>test.jpg"/>

For some reason it strips the "e/" when I view the source...

If I move test.jpg to "product/t" it works, but I need to access them from the correct location. I'm currently using Magento 2.1.9 but will be upgrading to 2.2 soon.


texts: Magento 2 Column names: "_super_attribute_price_corr" are invalid

texts:
I'm trying to do a Magneto 1 to magneto 2 import, using the built in Magento 2 importer. I keep receiving the error "Column names: "_super_attribute_price_corr" are invalid". Did the attribute name for _super_attribute_price_corr update?

Thanks,


texts: Magento2 How to get Store specific Category Id In custom page by using Category URL If same URL exist in both the stores?

texts:
I am having the same category in 2 stores and on the custom page, I need category detail as per current store id. I am using the below code to get a category by using the category URL.
In block
public function getCategoryId()
{
    $pfCategoryId = $this->categoryFactory->create()
        ->getCollection()
        ->addAttributeToFilter('url_key', 'category-url')
        ->addAttributeToSelect(['entity_id']);
    return $pfCategoryId;
}

In phtml
$categoryId =  $block->getCategoryId()->getFirstItem()->getEntityId();
Now I am having 2 stores. How to get store specific category id by using the category URL?


texts: How we can create unit tests to everything we have created for our custom module in Magento 2?

texts:
I have created a module in magento 2. And need to create the Unit tests for it.
I can see that Each core module has its own Test folder containing tests for each component like Controller, Block,Model,etc.

But they are hard to understand, and magento has not provided the tuttorial for the same. can anyone suggest any source where i can learn the unittesting framework from basics?

I got idea how to test it but I don't know how to create it.
http://devdocs.magento.com/guides/v2.0/mtf/mtf_update.html

Please help to do this stuff.


texts: How to create a main menu with various CMS pages in Magento 2

texts: How do I add pages and links to the main menu in Magento 2 ?