texts: Attribute code error: null value - how to find which attribute code?

texts:
We ran into this exact error: Certain Magento Pages returning HTTP Error 500 after a payment was done with PayPal Express Checkout (PayPal redirects to our website after the transaction is completed, then the error 500 occurs).

But checking the error log didn't provide any information (see below for details). In the end, our developer used a workaround to resolve this issue, but he has to move on to more pressing matters, so I'm trying to get to the bottom of it instead.

The workaround is simply to return an empty value instead of a null value when Magento retrieves attribute codes. He changed this file:

vendor\magento\module-eav\Model\Validator\Attribute\Data.php

And changed this section of it:

    /**
 * Validate EAV model attributes with data models
 *
 * @param \Magento\Framework\Model\AbstractModel $entity
 * @return bool
 */
public function isValid($entity)
{
    /** @var $attributes Attribute[] */
    $attributes = $this->_getAttributes($entity);

    $data = [];
    if ($this->_data) {
        $data = $this->_data;
    } elseif ($entity instanceof \Magento\Framework\DataObject) {
        $data = $entity->getData();
    }

    foreach ($attributes as $attribute) {
        $attributeCode = $attribute->getAttributeCode();
        if (!$attribute->getDataModel() && !$attribute->getFrontendInput()) {
            continue;
        }
        $dataModel = $this->_attrDataFactory->create($attribute, $entity);
        $dataModel->setExtractedData($data);
        if (!isset($data[$attributeCode])) {
            $data[$attributeCode] = null;
        }
        if($data[$attributeCode] == null){
            $data[$attributeCode] = "";
        }
        $result = $dataModel->validateValue($data[$attributeCode]);
        if (true !== $result) {
            $this->_addErrorMessages($attributeCode, (array)$result);
        }
    }
    return count($this->_messages) == 0;
}

Any idea how we could identify the missing/faulty attribute code? There are no exception returned and Magento's debug log looked like this:

[2019-07-11 23:06:44] main.DEBUG: array (
  'ipn' =>
[PayPal API information]
  ),
  'postback_to' => 'https://ipnpb.paypal.com/cgi-bin/webscr',
  'exception' => 'The "order" authorizations aren\'t implemented.',
) [] []
[2019-07-11 23:06:44] main.CRITICAL: The "order" authorizations aren't implemented. {"exception":"[object] (Exception(code: 0): The \"order\" authorizations aren't implemented. at [root]/vendor/magento/module-paypal/Model/Ipn.php:363)"} []

I can only conclude that the source of the error really isn't in ipn.php...

Error log:

[ N 2019-07-11 04:27:36.5293 26283/T5 age/Cor/SecurityUpdateChecker.h:517 ]: Security update check: no update found (next check in 24 hours)

That was the only line for the day.


texts: Magent 2 : We can't initialize Express Checkout. error on paypal express checkout

texts:
I have checked on stackexchange but not found correct answer

I am using Magento version 2.3.1

In my site have multi website with klarna checkout

when i am choose paypal express checkout payment method in checkout

so its giving me error and redirect to cart page with cart empty

Error show in cart page : We can't initialize Express Checkout.

not order placed in backend as well.

anyone help here, thanks in advance.


texts: Rewrite OR add custom tab to the sales order view in magento

texts:
I want to add custom tab to sales order view form. I tried the following code, but nothing happend. (Link 1, Link 2).

My layout module.xml code is

 <adminhtml_sales_order_view>
        <reference name="sales_order_tabs">
            <action method="addTab"><name>my_tab</name><block>mymodule/Adminhtml_Sales_Order_View_Tabs</block></action>
        </reference>
</adminhtml_sales_order_view>

And my block class is :

class Mymodule_Block_Adminhtml_Sales_Order_View_Tabs  extends Mage_Adminhtml_Block_Sales_Order_Abstract
    implements Mage_Adminhtml_Block_Widget_Tab_Interface
{

    protected function _construct()
    {
        Mage::Log("Fraud created");
    }

    /**
     * Retrieve order model instance
     *
     * @return Mage_Sales_Model_Order
     */
    public function getOrder()
    {
        return Mage::registry('current_order');
    }

    /**
     * Retrieve source model instance
     *
     * @return Mage_Sales_Model_Order
     */
    public function getSource()
    {
        return $this->getOrder();
    }

    public function getTabLabel()
    {
        return Mage::helper('sales')->__('Fraud Detection');
    }

    public function getTabTitle()
    {
        return Mage::helper('sales')->__('Fraud Detection');
    }

    public function canShowTab()
    {
        return true;
    }

    public function isHidden()
    {
        return false;
    }
}

Any error in the above code ? thanks in advance


texts: Magento2: How to add extension attribute to rest/V1/products/attribute-sets/4/attributes

texts: I want to add extension attribute to the default API to identify the visual and text swatches http://localhost/m2.4/rest/V1/products/attribute-sets/4/attributes API.


texts: integrate my magento 2 store with different 20 ecommerce websites to sale products of that sites on my store

texts: i have magento2 store that is based on  purse and handbags ......i want to integrate my magento2 store  to top 20 e-commerce websites like amazon, e-bay, snap-deal, flip-kart....and sale inventory of  that sites like different types of bags only on my store is it possible.? then suggest me the procedure...I searched about this related issue on google but, got solution by adding the extension in the magento admin panel. Only alone the ebay extension costs $199, so for all 20 sites the cost will be too expensive and also i had only wanted purse and bags products from the inventory of these websites, but only thing is do these sites such as amazon provide inventory for only selective categories i.e. only for purse and bags. please any suggestion or guide. thank you..


texts:
When creating an attribute I get this error:

Argument 1 passed to Zend_Validate_InArray::setHaystack() must be an array, null given, called in   ....lib/Zend/Validate/InArray.php on line 96 and defined  in ..../lib/Zend/Validate/InArray.php on line 122

Can anyone advise why this is, I'm creating an attribute as normal, compilation off and cache cleared.


texts:
I've tried hiding the cart button in the top header area with multiple xml commands in the local.xml file, but non work.  I've tried <remove name="checkout_cart_link" /> nested under a <default> tag, as well as <reference name="top.links"> <remove name="checkout_cart_link" /> </reference>based off of THESE instructions.

I'd prefer to keep the edits in local.xml if possible.  Also, we have a quote add-on installed (cart2quote).


texts: To add category filter in Product grid magento2

texts:
I have tried to add Category column in Product grid admin area.I have added it successfully by below code.

<column name="category" class="Chilly\Productsgrid\Ui\Component\Listing\Column\Category">
    <argument name="data" xsi:type="array">
        <item name="options" xsi:type="object">Chilly\Productsgrid\Model\Category\Categorylist</item>
        <item name="config" xsi:type="array">
            <item name="filter" xsi:type="string">select</item>
            <item name="dataType" xsi:type="string">text</item>
            <item name="label" xsi:type="string" translate="true">Categories</item>
            <item name="sortOrder" xsi:type="number">50</item>
        </item>
    </argument>
</column>

In Chilly\Productsgrid\Ui\Component\Listing\Column\Category.php, prepareDataSource() method

$fieldName = $this->getData('name');
if (isset($dataSource['data']['items'])) {
    //$categories=array();
    foreach ($dataSource['data']['items'] as & $item) {
        $p_id=$item['entity_id'];
        $product=$this->_productloader->create()->load($p_id);
        $cats = $product->getCategoryIds();
        $objectManager   = \Magento\Framework\App\ObjectManager::getInstance();
        $categories=array();
        if(count($cats) ){
            foreach($cats as $cat){
                $category = $objectManager->create('Magento\Catalog\Model\Category')->load($cat);
                $categories[]=$category->getName();
            }

}
$item[$fieldName]=implode(',',$categories);
    }
}
return $dataSource;

Got Categories list in product grid. I have tried the following code for add filter,

<item name="filter" xsi:type="string">select</item>

and for add options to category filter dropdown,

<item name="options" xsi:type="object">Chilly\Productsgrid\Model\Category\Categorylist</item>

category dropdown came in filter section. But not add categories list to category dropdown. Have any idea, How to add category filter on product grid in magento2?


texts: Showing Customer Attribute in Customer Grid

texts:
I created the customer attribute in Magneto but it is not showing in Customer grid i need to show it without deleting the current attribute. How can i do it.

My code
InstallData.php

namespace Sm\CutomerNumberAttribute\Setup;

use Magento\Customer\Model\Customer;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;

class InstallData implements \Magento\Framework\Setup\InstallDataInterface
{
    private $eavSetupFactory;

    private $eavConfig;

    private $attributeResource;

    public function __construct(
        \Magento\Eav\Setup\EavSetupFactory $eavSetupFactory,
        \Magento\Eav\Model\Config $eavConfig,
        \Magento\Customer\Model\ResourceModel\Attribute $attributeResource
    ) {
        $this->eavSetupFactory = $eavSetupFactory;
        $this->eavConfig = $eavConfig;
        $this->attributeResource = $attributeResource;
    }

    public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
    {
        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);

        $eavSetup->removeAttribute(Customer::ENTITY, "customer_number");

        $attributeSetId = $eavSetup->getDefaultAttributeSetId(Customer::ENTITY);
        $attributeGroupId = $eavSetup->getDefaultAttributeGroupId(Customer::ENTITY);

        $eavSetup->addAttribute(Customer::ENTITY, 'customer_number', [
            // Attribute parameters
            'type' => 'varchar',
            'label' => 'Customer Number',
            'input' => 'text',
            'required' => false,
            'visible' => true,
            'user_defined' => true,
            'sort_order' => 500,
            'position' => 500,
            'system' => 0,
        ]);

        $attribute = $this->eavConfig->getAttribute(Customer::ENTITY, 'customer_number');
        $attribute->setData('attribute_set_id', $attributeSetId);
        $attribute->setData('attribute_group_id', $attributeGroupId);

        /*
        //You can use this attribute in the following forms
        adminhtml_checkout
        adminhtml_customer
        adminhtml_customer_address
        customer_account_create
        customer_account_edit
        customer_address_edit
        customer_register_address
        */

        $attribute->setData('used_in_forms', [
            'adminhtml_customer',
            'customer_account_create',
            'customer_account_edit'
        ]);

        $this->attributeResource->save($attribute);
    }
}
?>

Thanks in Advance :)


texts: Creating, then deleting, then creating product programmatically ends with stock not saved

texts:
I have created a script to create new products coming from a json file. The script sets product data and also sets the 'stock_data' when creating the product. This works fine when it's executed for the first time.
Because of my project requirements, sometimes I need to 'recreate' the product. To do that, I delete the product and create it again (in the same script).
The problem is that when I delete the product and recreate it again, all the data is saved except the stock_data. But, what is weirder, if I force the recreation again, the stock_data is saved. And if I execute it another time, then the stock_data is not saved... and on and on.
This is the script: https://gist.github.com/paugnu/ed3b10ea3d3613791c53c9e3719fce89
(deletion is on line 198)
I think there is something I don't take into account. It seems the product deletion, which should trigger the stock data deletion, don't go together. As a result, stock_data is not saved in the next saving action.


texts: how to use js and css in custom module in magento 2.3.5

texts:
I want to use css and js in custom module, I want to create collapse tabs in magento
so anyone can have idea please share with me.
Thank you in advance.


texts:
Group 2 existing sku's together as one 'set' and sell them at one price together that is less than each of them sold separately.

Example: X is $20 and Y is $30. Buy Z (both X +Y) for $40.

Need separate product page for combo product.

Please help me to achieve this functionality.


texts:
I am trying to start the cronjob via shell, as it does not execute via crontab.

When I type php5 cron.php
The output is only

X-Powered-By: PHP/5.5.26
Content-type: text/html

And no jobs are beeing executed.

What am I doing wrong?


texts: Magento 1.8 - Product problem solved saving again

texts:
I develop my own module to import products, and it works well, but there's some kind of problem with the search's extension, because, if you look for the products, that share part of the name, and we look for them in search input in the frontend, it shows less that the real count of them.

If i go to the product in the admin and saved it again, it been resolved.

Why?it can be that $product->save(), works worst than Magento save button


texts: Magento 2 : How to redirect Home page URL to your Custom module action

texts: How to redirect to my custom route (i mean whats the best way) ?


texts: Setup live Magento2 site on localhost Xampp

texts:
I need to setup live magento2 site on local host, below are the steps I am following.

Clone and downloaded the files from cloud.

Created and downloaded the database dump.

Placed the files in htdocs/magento_test directory

Used command "Composer Install" to get the Vendor and other files

Created a local database and uploaded the db dump in there.

Changed the urls in core_config_data to localhost

Now running site in browser throw this ERROR "An error has happened during application run. See exception log for details."

Log in exception log file-
[2020-09-29 13:05:06] report.CRITICAL: MySQL adapter: Missing required configuration option 'host' {"exception":"[object] (InvalidArgumentException(code: 0): MySQL adapter: Missing required configuration option 'host' at C:\xampp\htdocs\magento_test\vendor\magento\framework\Model\ResourceModel\Type\Db\Pdo\Mysql.php:105)"}
Please help me to resolve this issue.


texts:
I have created a cms page and try to add form in cms page using phtml. and i need a form action to a controller. but shows an error
app/code/Ventor/Pricebeat/view/frontend/templates/pricebeat.phtml

<form class="form" action="User/Post" method="post">

<fieldset class="fieldset">
    <legend class="legend"><?php /* @escapeNotVerified */ echo __('Test Form') ?></legend>

            <?php /* @escapeNotVerified */ echo __('Input') ?>

            <input type="text" id="number"
                   name="number"
                   class="input-text">

</fieldset>

        <button type="submit" class="action submit primary" title="<?php /* @escapeNotVerified */ echo __('Submit') ?>">
            <?php /* @escapeNotVerified */ echo __('Submit') ?>
        </button>

  </form>

app/code/Ventor/Pricebeat/Controller/User/Post.php

<?php

 namespace Ventor\Pricebeat\Controller\User;

 use Magento\Framework\App\Action\Action;
 use Magento\Framework\App\Action\Context;
 use Magento\Framework\View\Result\PageFactory;

 class Post extends Action
  {
protected $resultPageFactory;

public function __construct(Context $context, PageFactory $pageFactory)
{
    $this->resultPageFactory = $pageFactory;
    parent::__construct($context);
}

public function execute()
{
   echo "hello from the controller";
   exit();
    $resultPage = $this->resultPageFactory->create();

    return $resultPage;
}
}

app/code/Ventor/Pricebeat/etc/frontend/routes.xml

<?xml version="1.0"?>

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


texts: How to Get Base Url in Theme Custom JS file and how to return response in JSON format?

texts:
I have created a module in which all the things is done just 2 things are remaining .
How to add Dynamic base url in Magento 2 theme JS file. ex : http://127.0.0.1/projectname how to get that dynamically.
How to pass success or error in JSON format using Module -> Model
it would be really helpful.
<?php
namespace Namespcae\Modulename\Controller\Index;

use Magento\Framework\View\Result\PageFactory;
use Magento\Framework\App\Action\Context;

class Test extends \Magento\Framework\App\Action\Action
{
protected $_configReader;
protected $_pageFactory;
protected $customer;

public function __construct(
    \Magento\Framework\App\Action\Context $context,
    \Magento\Framework\App\DeploymentConfig\Reader $configReader,
    \Namespcae\Modulename\Model\Customer $customer,
    \Magento\Framework\View\Result\PageFactory $pageFactory)
{
    $this->_pageFactory = $pageFactory;
    $this->_configReader = $configReader;
    $this->customer = $customer;
    return parent::__construct($context);
}

public function execute()
{
   $productIds = [5];

    /** Contains the id of the store in which you would like to enable/disable the product */
    $storeId = 0;

    /**
     * You can put any number of product attributes here. However, in the scope of this code we are going to
     * only enable/disable the product.
     */
    $attributes = [
        'status' => Status::STATUS_ENABLED
    ];

    $this->productAction->updateAttributes($productIds, $attributes, $storeId);
}
}

How can i send response success or error in JSON format.


texts: Vendor is not recognized or extend command

texts:
I am trying to run to test but every time I run a command that is related to the vendor folder, it shows the following error 'vendor' is not recognized or extend command operable program or batch file in Magento

I do not know what I must do in the next step

Has anyone can help me a hand, please!


texts: Patch 6788 for Free Extension Kinento Payment Order Reminder

texts:
I have noticed that the well known and excellent free Payment Order Reminder Module Kinento see
https://github.com/Kinento/order-reminders has not been updated for Patch SUPEE-6788.

I have tried doing this manually without success.

The question is: does anyone know what I am doing wrong with following lines of code?

Path:

Kinento\Reminder\controllers\Adminhtml\Reminder\

SendController.php

class Kinento_Reminder_Adminhtml_Reminder_SendController extends Mage_Adminhtml_Controller_Action

ViewController.php

class Kinento_Reminder_Adminhtml_Reminder_ViewController extends Mage_Adminhtml_Controller_Action

Path:
Kinento\Reminder\etc\config.xml

<admin>
  <routers>
    <adminhtml>
      <args>
        <modules>
          <reminder before="Mage_Adminhtml">Kinento_Reminder_Adminhtml_Reminder</reminder>
        </modules>
      </args>
    </adminhtml>
  </routers>
</admin>

and

<menu>
  <sales>
    <children>
       <reminder translate="title" module="reminder">
         <title>Order Reminders</title>
         <sort_order>700</sort_order>
         <action>adminhtml/reminder/view_main</action>
       </reminder>
    </children>
  </sales>
</menu>

When trying to view the Order Reminders Grid I see only a blank page

Appreciate the Forum help.

Thanks

Phil


texts: Multi-Website, Multi-language switcher not working

texts:
I have 3 websites(.com/, .com/en/ and .com/eu/), each has one store view.
And I created Website Switcher using this method.

https://stackoverflow.com/questions/4270490/how-do-i-get-a-website-switcher-instead-of-store-switcher

<?php
$websites = Mage::app()->getWebsites();

if (count($websites) > 1): ?>

    <?php echo $this->__('Select Store:') ?>
    <select id="select-website" title="<?php echo $this->__('Select Store') ?>" onchange="location.href=this.value">
    <?php foreach ($websites as $website): // print out each website name and code as a dropdown box item ?>
        <?php $_selected = $website->getCode() == Mage::app()->getWebsite()->getCode() ? ' selected="selected"' : '' ?>
        <option value="<?php echo $website->getDefaultStore()->getBaseUrl()?>"<?php echo $_selected ?>><?php echo $this->htmlEscape($website->getName()) ?></option>
    <?php endforeach; ?>
    </select>

<?php endif; ?>

Now I want to add another language store view on .com/eu/.
However, language switcher is not working. I use the default language switcher.
The switcher shows up, but when I try to switch to the new store view, it redirects to the page of .com/ website.

How can I fix this?


texts: How to get item price BEFORE discount from Mage_Sales_Model_Order_Item

texts:
Magento CE 1.9.1.9

I'm in the process of modifying a custom module that gets item information form the Mage_Sales_Model_Order_Item model when an order is placed. Currently I'm getting pricing information like this:

    'sell_price' => $this->_getBaseAmt('row_total', $item),
    'original_price' => $item->getOriginalPrice(),

I'm attempting to get either the discount amount or if possible, the price before discount. Here is an example of my attempt:

'price_before_discount' => $item->getPrice(),

But all I can ever seem to return is the sale price (aka "special price"). Can someone provide an example of the correct way to get this information? I need the original price of item that has been ordered.


texts: Search product will give nothing in magento1.9

texts:
I am facing an issue that whenever I searched a sku (the attribute is searchable - yes), no result found.
My catalogsearch_query has Null for that query string "redirect" column.

https://prnt.sc/mltdym

Suggest how the "redirect value" set for this table's entry.
The url is present in the product and url_rewrite table as well.

Product visibility is catalog,search.

When I manually hit the product URL it is working fine.


texts: Catch errors from validation when saving product or category ($product->validate() or $category->validate())

texts:
I would like to validate the data before saving a product programatically because ->save() saves a product even if it doesn't have an sku.

If I do ->validate() I get the expected error:

[Magento\Eav\Model\Entity\Attribute\Exception]
  The value of attribute "sku" must be set

But I would like to catch that error and log it somewhere and let the script continue on another product.

This doesn't work:

try{
    $product->validate();
} catch(Exception $e){
}

If I look at the validate method it doesn't supply much info about where can I catch the error (except for that @todo):

\module-catalog\model\Product.php
    /**
         * Validate Product Data
         *
         * @todo implement full validation process with errors returning which are ignoring now
         *
         * @return array
         */
        public function validate()
        {
            $this->_eventManager->dispatch($this->_eventPrefix . '_validate_before', $this->_getEventData());
            $result = $this->_getResource()->validate($this);
            $this->_eventManager->dispatch($this->_eventPrefix . '_validate_after', $this->_getEventData());
            return $result;
        }

I imagine it is quite a common task. Does anyone have any solutions?


texts: Catalog URL Rewrites ReIndex - Observer Event

texts:
I need to hook into Magento and run some code after "Catalog URL Rewrites" has been re-indexed.

I've looked for a single event to hook into but cannot find any answers. I know how to set-up the observer etc, I just literally need the event to watch, and fire my code afterwards.

I've logged the dispatch event to see what is loaded when re-indexing, but unless I'm'm mistaken, no single event fires relating to the Catalog URL Rewrites.

Anyone know which event would be best?


texts:
all new to Magento, but just trying to see if it will work for me:

I've just installed Magento via Installatron with sample data.
The shop works but images are not visible. Even when I upload an image in the backend it is not visible in the frontend.

When I enter the link of the image in a new page I get this error:
"The server encountered an internal error or misconfiguration and was unable to complete your request" or via this link

I didn't change the settings of the files or directories, because there are no files or directories to change. It is a new install. Link to shop

Could this be an issue with the provider or with Installatron?

Regards, Peter


texts: Online Customers --> How is this checked?

texts:
So,

In this doc:

Online Customers

It is explained how Magento 2 checks if customers are online and how to set the interval to check this.

BUT

What is not so clear, is how Magento 2 does this. Look at the following sentence:

  The interval of time that customers are shown as currently online is set in the configuration, and determines how long the customer’s activity is visible from the Admin

Let's say the interval is 15 minutes. Does this mean Magento 2:

Checks ALL customers every 15 minutes AT ONCE which customers are online and compares them with the previous record of people who were online?

Or does Magento 2:

Checks every customer individually every 15 minutes (starting from their visiting time) to check wether they are still active on the website or not? So this would mean that Magento has to check A LOT when there are a lot of people are active on the webshop.

And my final question:

Does Magento 2 sees a customer as 'Online' when they have the paged opened in a tab, but are not currently active in that said tab? So they are active in another tab or are just doing something else on their devices?


texts: Magento2 phrases in some specific modules are not translated

texts:
I have installed arabic lang pack.
But phrases from Magento_Checkout module are not being translated.
these are the i18n files in my installation:

./app/i18n/Burooj/ar_SA/ar_SA.csv
./app/code/Burooj/Applinks/i18n/ar_SA.csv
./app/design/frontend/CzoneTech/fresh/i18n/ar_SA.csv

for an instance "Go to Checkout",شراء,module,Magento_Checkout in present in /app/i18n/Burooj/ar_SA/ar_SA.csv but the phrase is not translated in mini cart.

How can I debug this ?


texts: Magento 2 - remove postcode field on checkout

texts:
I have issues on removing the checkout postcode field on a default Magento 2.1 install.

I have tried by adding the componentDisabled node on the jsLayout object for the postcode component:

Created a new module with the following structure:

/
|etc
|___module.xml
|view
|___frontend
|______layout
|_________checkout_index_index.xml
|registration.php

The app/code/<VENDOR>/<MODULE>/view/frontend/layout/checkout_index_index.xml file contents:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="checkout.root" >
            <arguments>
                <argument name="jsLayout" xsi:type="array">
                    <item name="components" xsi:type="array">
                        <item name="checkout" xsi:type="array">
                            <item name="children" xsi:type="array">
                                <item name="steps" xsi:type="array">
                                    <item name="children" xsi:type="array">
                                        <item name="shipping-step" xsi:type="array">
                                            <item name="children" xsi:type="array">
                                                <item name="shippingAddress" xsi:type="array">
                                                    <item name="children" xsi:type="array">
                                                        <item name="shipping-address-fieldset" xsi:type="array">
                                                            <item name="children" xsi:type="array">
                                                                <item name="postcode" xsi:type="array">
                                                                    <item name="config" xsi:type="array">
                                                                        <item name="componentDisabled" xsi:type="boolean">true</item>
                                                                    </item>
                                                                </item>
                                                                <item name="postcode_test" xsi:type="array">
                                                                    <item name="config" xsi:type="array">
                                                                        <item name="componentDisabled" xsi:type="boolean">true</item>
                                                                    </item>
                                                                </item>
                                                            </item>
                                                        </item>
                                                    </item>
                                                </item>
                                            </item>
                                        </item>
                                    </item>
                                </item>
                            </item>
                        </item>
                    </item>
                </argument>
            </arguments>
        </referenceBlock>
    </body>
</page>

By inspecting the json returned by $block->getJsLayout() here, I find that the postcode node is overwritten by the one on the Magento_Checkout (this) module and the componentDisabled node from my module isn't used.

I am also noticing that my postcode_test note appears in this json.

Any help appreciated.


texts:
Create a button called Login to log in, but once you log in, the button doesn't disappear.

How do I get this button to switch to logout


texts: How to disable all optional modules in Magento 2.3?

texts:
I want to disable all third-party modules and Magento's optional modules, for example, DHL, Klarna, Temando, Vertex, etc.

I disabled via admin panel and CLI

There is a different way to exclude them?


texts: magento 2: get product name, price in product linked list in :sku/product endpoint rest api

texts:
In default api product links details are like
product_links": [
        {
            "sku": "02247",
            "link_type": "related",
            "linked_product_sku": "02320",
            "linked_product_type": "configurable",
            "position": 1
        }

How can I include the linked product name and price here?
Thanks


texts: how to remove all widgets in in user account dashboard?

texts:
It is required to totally clear the account dashboard page, to display custom layout which varies according to logged in customer's user group.
I did the following:

<customer_account_index translate="label">
    <reference name="root">
        <action method="setTemplate"><template>page/1column.phtml</template></action>
    </reference>
    <reference name="content">
        <block type="MyModule/Dashboard" name="block_Dashboard" template="customer/Dashboard.phtml" />
    </reference>
</customer_account_index>

I can see the output of 'customer/Dashboard.phtml', but how to remove all of these widgets?

Account Information
Contact Information
...

Can't find any layout handlers, nor the template reference for them in app/core/Mage/Customer/*

Where to dig ? Thanks!!!


texts: thumbnail image not show in magento 2.4.0

texts:
Unable to resolve the source file for 'adminhtml/_view/en_FR/Magento_Catalog/images/product/placeholder/thumbnail.jpg'

#1 Magento\Framework\App\StaticResource->launch() called at [vendor/magento/framework/App/Bootstrap.php:263]
#2 Magento\Framework\App\Bootstrap->run(&Magento\Framework\App\StaticResource#000000007f8096c3000000001da92c68#) called at [pub/static.php:13]


texts: Magento2 - How to get dynamically Order number?

texts:
File Path :

SR\DeliveryDate\view\adminhtml\templates\order_info_shipping_info.phtml

code:

        <?= $block->escapeHtml(__('Delivery Date Information')) ?>

            <?= __('Delivery Date') ?>
            <?= $block->getDeliveryDate() ?>

            <?= __('Comment') ?>:

            <?= $block->getDeliveryComment() ?>

            <?= __('Test') ?>:

            <?php
                $orderid = 33;
                $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
                $order = $objectManager->create('Magento\Sales\Api\Data\OrderInterface')->load($orderid);

                //fetch whole order information
                //print_r($order->getData());

                //Or fetch specific information
                //echo $order->getIncrementId();
                //echo $order->getGrandTotal();
                //echo $order->getSubtotal();
                echo $order->getDeliveryDropdown();
            ?>

Line No : $orderid = 33;

I want get dynamically order number after place order.

Can anyone help create block and call to phtml file?


texts: How to disable Paypal auto inovice generator in Magento 2

texts: i am using magento 2 where using paypal while order placed invoice generated automatically how to stop i want to generate it later from admin manually.


texts: Dynamic row autoincrement column Magento 2

texts:
I have a new module created by me.
Here, I've followed this tutorial:
https://devdocs.magento.com/guides/v2.4/ext-best-practices/tutorials/dynamic-row-system-config.html
In this table, I want a column that indicates the row number.
How can I do this?


texts: Online refunding in Magento 1.9.1.0 CE with custom payment method

texts:
I'm using Magento 1.9.1.0 CE and trying to implement payment method with online refunds.

My model looks like:

class X_Y_Model_Standard extends Mage_Payment_Model_Method_Abstract {

        protected $_canAuthorize = true;
        protected $_canRefund = true;
        protected $_canCapture = true;

        ...

        public function refund(Varien_Object $payment, $amount) {

            ...
            return parent::refund($payment, $amount);
        }

        ...

        public function capture(\Varien_Object $payment, $amount) {

            $payment->setTransactionId($myApiTransactionId);
            $transaction = $payment->addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH, null, true, "");
            $transaction->setIsClosed(true);

            return parent::capture($payment, $amount);
        }

        ...

        public function processInvoice($invoice, $payment) {

            $invoice->setTransactionId($myApiTransactionId);

            return parent::processInvoice($invoice, $payment);
        }

        ...
    }

After creating invoice I can only refund offline.

Any idea?


texts:
We are currently create tracking one by one by using POST rest/V1/order/:orderId/ship:
{
 "notify": true,
 "tracks": [
   {
     "track_number": "1234567890",
     "title": "DPDPRE",
     "carrier_code": "custom"
   }
 ]

}
it works fine,
But now we need to POST in Bulk, we have tried /bulk/V1/order/byOrderId/ship:
    [
    {
        "orderId": "284",
        "shipment": {
            "notify": true,
            "tracks": [
                {
                    "track_number": "1234567890",
                    "title": "CODE",
                    "carrier_code": "null"
                }
            ]
        }
    },
    {
        "orderId": "285",
        "shipment": {
            "notify": true,
            "tracks": [
                {
                    "track_number": "0987654321",
                    "title": "CODE",
                    "carrier_code": "null"
                }
            ]
        }
    }
]

it ends with no error, but nothing is updated, the following job remains in progress
Topic async.magento.sales.api.shiporderinterface.execute.post
Thanks for your help


texts:
I want to add the file uploaded in custom option (adminend).

In CustomOption modifier:

return [
        'arguments' => [
            'data' => [
                'config' => [
                    'label' => __('Image Uploader'),
                    'componentType' => 'fileUploader',
                    'formElement' => 'fileUploader',
                    'component' => 'Magento_Ui/js/form/element/file-uploader',
                    'elementTmpl' => 'Magento_Ui/components/file-uploader',
                    'dataScope' => 'file',
                    'fileInputName' => 'image',
                    'uploaderConfig' => [
                        'url' => $this->urlBuilder->addSessionParam()->getUrl(
                            'product/upload/image'
                        ),
                    ],

                    'sortOrder' => $sortOrder,
                ],
                [
                    'elementTmpl' => 'ui/dynamic-rows/cells/thumbnail',
]
            ],
        ]
    ];

  In Image Controller

public function __construct(
        \Magento\Backend\App\Action\Context $context,
        \Magento\Catalog\Model\ImageUploader $imageUploader
    ) {
        parent::__construct($context);
        $this->imageUploader = $imageUploader;
    }

    /**
     * Upload file controller action
     *
     * @return \Magento\Framework\Controller\ResultInterface
     */
    public function execute()
    {
        $imageId = $this->_request->getParam(image);
        try {
            $result = $this->imageUploader->saveFileToTmpDir($imageId);
        } catch (\Exception $e) {
            $result = ['error' => $e->getMessage(), 'errorcode' => $e->getCode()];
        }
        return $this->resultFactory->create(ResultFactory::TYPE_JSON)
            ->setData($result);
    }

  In di.xml

<virtualType name="XXX\YYY\ImageUpload" type="Magento\Catalog\Model\ImageUploader">
<arguments>
    <argument name="baseTmpPath" xsi:type="string">option/images</argument>
    <argument name="basePath" xsi:type="string">option</argument>
    <argument name="allowedExtensions" xsi:type="array">
        <item name="jpg" xsi:type="string">jpg</item>
        <item name="jpeg" xsi:type="string">jpeg</item>
        <item name="gif" xsi:type="string">gif</item>
        <item name="png" xsi:type="string">png</item>
    </argument>
</arguments>
</virtualType>
<type name="XXX\YYY\Controller\Adminhtml\Upload\Image">
<arguments>
    <argument name="imageUploader" xsi:type="object">XXX\YYY\ImageUpload</argument>
</arguments>
</type>

But not working..
It throws

  Invalid parameter given. A valid $_FILES[] identifier is expected.

Thanks


texts: Magento not sending order confirmation emails to admin

texts:
I'm at loss on what to do.

This morning I configured cron and according to Aoe_Scheduler the emails in the queue are sent each 5 minutes. I don't, however, receive new order confirmations on my email account. I've triple checked whether I've configured the right confirmation address and I quadruple checked spam folders, but no emails there.

I'm worried that the customers didn't get any emails either. Does anyone recognize this problem? I ran 1.9.1 (and since a few minutes 1.9.2).

edit: Creating an account or requesting a new password on frontend does sent emails.


texts: Community edition, home screen show category list

texts:
Can anybody tell me if its possible to view my all my categories in the left column on the home page?

Being searching and trying things for a while, but still have not being able to get it working.

Tried this code, but its not showing anything. (added it in the editor)

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


texts: Magento 2 Set order status while placing an order

texts: In Magento 2.3.x, I want to set the (custom) order status while customer placing an order. How to achieve this using event observer or plugin.


texts: Give custom module's access to all in Magento 1.9

texts:
I have created a custom module for backend in Magento 1.9.

This module is applicable to all users and roles.

<menu>
    <videos module="videos">
        <title>Video Tutorials</title>
        <sort_order>900</sort_order>
        <children>
            <bitsvideo module="videos">
                <title>BITS</title>
                <sort_order>5</sort_order>
                <action>videos/adminhtml_videos</action>
            </bitsvideo>
        </children>
    </videos>
</menu>
<acl>
    <resources>
        <admin>
            <children>
                <videos module="videos">
                    <sort_order>900</sort_order>
                    <children>
                      <bitsvideo module="videos">
                          <title>BITS</title>
                          <sort_order>5</sort_order>
                          <action>videos/adminhtml_videos</action>
                       </bitsvideo>
                    </children>
                  </videos>
            </children>
        </admin>
    </resources>
</acl>

How do I write acl for this?

The above code is my acl. What do I need to change?

How can I write acl to give permissions to all users by default?


texts: Magento 2.3.4 ImageMagick 7.0.9-20 Q16 issue

texts:
Just testing upgrade form 2.3.3 to 2.3.4 and noticed there is an issue with ImageMagick display of product images. On category pages, some images are missing and on product view page no images are appearing at all. Reverting to the PHP gd image processor in backend resolves issue and all images appear correctly (apart from png image with transparent backgrounds which appear black - reason for using ImageMagick).
ImageMagick is correctly shown in phpinfo and seems to be working fine for 2.3.3 which installed on the same server.. any ideas? running PHP 7.2 on centos 6.


texts: Magento2 get variants of configurable products

texts:
I'm new to Magento2 and finding it difficult to get information.
I'm trying to read simple (variants) products of a configurable product on the view page.

I created my custom block that extends AbstractProduct.

Then I was able to get upsell product ids like this:

$product = $this->_coreRegistry->registry('product');
$upSellProductIds = $product->getUpSellProductIds();

Now, how to get variants(simple products).

In Magento 1.x, I used getUsedProductCollection()

Please help


texts: Retina Logo is switching sizes and disappears sometimes

texts: when visiting www.juwelier-leopold.de with a retina screen our logo keeps switching sizes. First you'll see a double size low-res logo, then it switches to the right size after a couple of seconds and sometimes it completely disappears.


texts: How many product details are loaded to a category page in Magento 2?

texts: When my user goes on one of our category pages, for each product in that category, the photo, the name of the product, the price of that product and I imagine the SKU of that product are all loaded by Magento. How many additional pieces of information are loaded for each product? Is this adjustable? Could I go in to Magento's code somewhere and change it so it only loads, say, the name of the product, the image and the price for every product on my category page?


texts:
Is there a way to remove the ACCOUNT editing the styles.css?  The ACCOUNT at the top of the page.  I don't know how to edit the .xml files.  I'm a total novice! Thanks,
                                                     -John


texts:
I want customers to answer a question before entering a category in Magento 1.8.1. For example, I want to ask a confirmation question like "Are you 18 or older?" if a customer clicked on a adult stuff category; he/she would allowed in if they answer yes.

I found this code and put it in app\design\frontend\base\default\template\catalog\category\view.phtml but it doesn't work:

<script type="text/javascript">
    $(document).ready(function(){
        var conf = confirm('are you 18 or more ?');
        if(conf == true) {
            return true;
        } else {
            document.location.href = 'http://google.com';
        }
    });
</script>

And this is my view.phtml : http://www.4shared.com/file/M9p259fvba/view.html

Which line should I put that code exactly?


texts:
i want to add custom block just below media view more on product detail page, see below image :http://159.8.132.20/Untitled2.png

i want to do it vai admin > category layout update or via mdoule :

below is my code:

<reference name="content">
    <block type="core/template" name="test" template="handtryon/a.phtml" after="product.info.media"></block>
</reference>

no i am able to see contents of a.phtml on product detail page but it show below product tabs i want it below media view more i think something to do with  after="product.info.media"


texts: How to render block layout from controller in magento 2?

texts:
I am tring to call block from the controller action but its not working and throwing me an error as

  Exception #0 (OutOfBoundsException): No element found with ID 'left'.

$this->_addContent($this->_view->getLayout()->createBlock('\Demo\Test\Block\Adminhtml\Method\Edit'));

$this->_addLeft($this->_view->getLayout()->createBlock('\Demo\Test\Block\Adminhtml\Method\Edit\Tabs'));

Can you please tell me how can i achieve above things?


texts:
Getting this error on Magento 1.7 when attempting to view a product page for any product on the site. We have recompiled, cleared all cache and reindexed the site with no solution.

  Invalid method
  Yoast_MetaRobots_Block_Catalog_Product_View::addAttribute(Array (
      [0] => warranty ) )

  Trace:
  0 [internal function]: Varien_Object->__call('addAttribute', Array)
  1 [internal function]: Yoast_MetaRobots_Block_Catalog_Product_View->addAttribute('warranty')

  2 /home/omegajui/public_html/app/code/core/Mage/Core/Model/Layout.php(348):
  call_user_func_array(Array, Array)

  3 /home/omegajui/public_html/app/code/core/Mage/Core/Model/Layout.php(214):
  Mage_Core_Model_Layout->_generateAction(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))

  4 /home/omegajui/public_html/app/code/core/Mage/Core/Model/Layout.php(210):
  Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))

  5 /home/omegajui/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(344):
  Mage_Core_Model_Layout->generateBlocks()

  6 /home/omegajui/public_html/app/code/core/Mage/Cms/Helper/Page.php(113):
  Mage_Core_Controller_Varien_Action->generateLayoutBlocks()

  7 /home/omegajui/public_html/app/code/core/Mage/Cms/Helper/Page.php(52):
  Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController),
  'no-route')

  8/home/omegajui/public_html/app/code/core/Mage/Cms/controllers/IndexController.php(75):
  Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController),
  'no-route')

  9 /home/omegajui/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(419):
  Mage_Cms_IndexController->noRouteAction()

  10/home/omegajui/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254):
  Mage_Core_Controller_Varien_Action->dispatch('noRoute')

  11 /home/omegajui/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(176):
  Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))

  12 /home/omegajui/public_html/app/code/core/Mage/Core/Model/App.php(354):
  Mage_Core_Controller_Varien_Front->dispatch()

  13 /home/omegajui/public_html/app/Mage.php(683): Mage_Core_Model_App->run(Array)

  14 /home/omegajui/public_html/index.php(86): Mage::run('', 'store')

  15 {main}


texts: So, I've been trying my best to remove this menu from my magento2 megamenu but I am unable to do so. Can't change the logo image either. This thing started to suck now. Can you help me with it? The theme I am using is Claue for magento2. Thanks


texts: Magento2: How to get custom comment for order in REST API?

texts:
I ve installed Infobeans OSComments. Module adds additional field on checkout page and save value to Order Page. Is it possible to have access to this comment via REST API ? Can this value cand be add to all data avaible when I use:
{{magento_url}}/rest/V1/orders/:id ?
<?php

/**
*/
namespace Infobeans\OSComments\Plugin\Checkout\Model;
class ShippingInformationManagement
{
// @codingStandardsIgnoreLine
protected $quoteRepository;
public function __construct(
    \Magento\Quote\Model\QuoteRepository $quoteRepository
) {
    $this->quoteRepository = $quoteRepository;
}

/**
 * @param \Magento\Checkout\Model\ShippingInformationManagement $subject
 * @param $cartId
 * @param \Magento\Checkout\Api\Data\ShippingInformationInterface $addressInformation
 */
// @codingStandardsIgnoreLine
public function beforeSaveAddressInformation(
    \Magento\Checkout\Model\ShippingInformationManagement $subject,
    $cartId,
    \Magento\Checkout\Api\Data\ShippingInformationInterface $addressInformation
) {
    $extAttributes = $addressInformation->getExtensionAttributes();
    $deliveryComment = htmlspecialchars($extAttributes->getDeliveryComment());
    $quote = $this->quoteRepository->getActive($cartId);
    $quote->setDeliveryComment($deliveryComment);
}

}
Is there easy way to do that ?


texts: Magento 2.2.2 - Remove default welcome message and show username post login

texts:
I need to remove default welcome message from header but display username after successful login. Tried below to hide welcome message but it also removes username
after login

<referenceBlock name="header">
    <arguments>
        <argument name="show_part" xsi:type="string">other</argument>
    </arguments>
</referenceBlock>

Also tried below

<referenceBlock name="top.links">
   <referenceBlock name="header" remove="true"/>
</referenceBlock>

How do I achieve above using xml and without overriding template file ?


texts: Magento 2.4.0 upgrade from Magento 2.3.5 not updating

texts: when i upgrade to 2.4.0 from admin area. i get all green check mark, it goes through the next step, I skip the backup process. next step it goes through normal process after couple minutes into it, it shows success! but the magento version is still 2.3.5. not updating. any idea ?


texts: Adding block to product.info on  in local.xml

texts:
In local.xml, the following block exists. This does not insert the block into the product.info block (IE getChild('addtolinks') returns false). Inserting the same snippet in catalog.xml works just as expected. I don't believe the issue is with the handle (catalog_product_view) or reference (name="product.info") because <remove name="something.in.product.info" /> in the same scope as the block works just fine. Any ideas?

<layout>

  <catalog_product_view>

    <reference name="product.info">

      <block type="my_catalog/addto_links" name="product.info.addtolinks" as="addtolinks" template="page/template/links.phtml">

        <action method="setProduct">
          <product helper="catalog/getProduct" />
        </action>

        <action method="addLink">
          Add to Wishlist
          <helper>wishlist</helper>
          <title>Add to Wishlist</title>
        </action>

        <action method="addLink">
          Add to Compare
          <helper>catalog/product_compare</helper>
          <title>Add to Compare</title>
        </action>

      </block>

    </reference>
  </catalog_product_view>
</layout>

Thanks for reading!

Update: Just tested adding a core/text block in the same reference with expected success:

  <block type="core/text" name="testy">
    <action method="setText"><text>hi</text></action>
  </block>

Update 2: Even more intriguing, the block works in local.xml if I change the type to page/template_links (the parent class of my_catalog/addto_links), the block comes into being! Of course, the links are all wrong, because addLink has special powers in my block class. Normally, I'd say that the my_catalog/addto_links piece was wrong, but it works in catalog.xml.


texts: Magento 2.1.4 Add text next to search bar

texts: I'd like to add some text as the screen shows, I'm into the form.mini.phtml file, but so far I've managed to place it up or down from the search bar, not on the left. Any ideas?


texts: when i place order successfully and try to shop again by adding product to cart it show asked to login again

texts:
When i place order successfully and try to shop again by adding product to cart it show asked to login again in magento2.2.4.
It was happen in Api.


texts:
I need to develop a module that manage content created by users (recipes in this case), but the store have multi languages. Since the content isn't static I can't use __() function.

I thought in these solutions to solve this problem:

Solution 1:
The simplest is create a column in the database and store the store id, but it is not a good solution, because I'll have multiple records on the "same" content.

Solution 2:
Create a table to store the key-value content of entity, so, if we have a entity called Recipe, we would have something like this in database:

entity_id, key, value, store_id
1, title, Helado de fresa, 3 #spanish
1, title, Strawberry ice cream, 4 #english

Are there any other solution for this problem?


texts: Magento error pages don't load styles/images

texts:
I have Magento (1.9.2.1) installed in a subdirectory and turned "maintenance mode on". Unfortunately, it doesn't load styles/images (e.g. "http://example.com/errors/default/images/logo.gif" is 404 Not Found) for error pages, in this case "Error 503: Service Temporarily Unavailable" page. Basically, an incorrect path produces 404 because it doesn't include a subdirectory. How can I fix this?

Related to: Error page styles not loading


texts: It's possible to protect a website built with magento to the scan activity of some CMS detector, like Wappalyzer?


texts: magento 2 Change the font and color of the product title?

texts: can anyone help me how to change the font and color of the product title? I don't have any theme? just installed the default Magento 2 product page


texts: Call to undefined method Magento\Framework\Logger\LoggerProxy::setHandlers magento 2.4.2

texts:
In my custom Magento 2 module I added a custom logger
\Vendor\App\Logger\Logger.php
<?php

namespace Vendor\App\Logger;

class Logger extends \Monolog\Logger
{
}

\Vendor\App\Logger\Handler.php
<?php

namespace Vendor\App\Logger;

use Magento\Framework\Filesystem\DriverInterface;
use Monolog\Formatter\LineFormatter;
use Monolog\Handler\StreamHandler;
use Monolog\Logger;

class Handler extends \Magento\Framework\Logger\Handler\Base
{
    protected $loggerType = Logger::INFO;
    public $fileName = '';
    public $customfileName = 'NO_PATH';
    protected $_localeDate;

    public function __construct(
        DriverInterface $filesystem,
        \Magento\Framework\Filesystem $corefilesystem,
        \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate,
        $filepath = null
    ) {
        $this->localeDate = $localeDate;
        $corefilesystem = $corefilesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem\DirectoryList::VAR_DIR);
        $logpath = $corefilesystem->getAbsolutePath('log/');
        $filename = 'f24_trace_'. Date('d_m_Y'). '.log';
        $filepath = $logpath . $filename;
        $this->customfileName = $filepath;
        parent::__construct(
            $filesystem,
            $filepath
        );
        //$this->setFormatter(new LineFormatter('%message%'. PHP_EOL, null, true));
    }
}

\Vendor\App\etc\di.xml
...

     <type name="Vendor\App\Logger\Logger">
            <arguments>
                <argument name="name" xsi:type="string">VendorLogger</argument>
                <argument name="handlers"  xsi:type="array">
                    <item name="system" xsi:type="object">Vendor\App\Logger\Handler</item>
                </argument>
            </arguments>
        </type>

...

\Vendor\App\Helper\Data.php
<?php
namespace Vendor\App\Helper

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

public function __construct(
    ...
    \Vendor\App\Logger\Handler $handler,
    ...
) {
...
 $this->logger->setHandlers ( [$this->handler] );
...
}

When I try to install the module in Magento 2.4.2 environment I get this error in Magento logs:
 Call to undefined method Magento\Framework\Logger\LoggerProxy::setHandlers() in /var/www/html/app/code/Vendor/App/Helper/Data.php:52

any suggestions?
Thanks


texts: How can I extend the category products Rest API?

texts:
/V1/categories/(cat ID)/products

This API provides very less detail of all the products.

{
    "sku": "Nike 3 color half sleeve tshirt",
    "position": 1,
    "category_id": "3"
  },
  {
    "sku": "Louis Phillipe Blue Jean Size 32",
    "position": 1,
    "category_id": "3"
  },
  {
    "sku": "Louis Phillipe Shirt Size M",
    "position": 1,
    "category_id": "3"
  },
  {
    "sku": "UCB shirt Size ",
    "position": 1,
    "category_id": "3"
  },

I can use the sku in a search filter to get all the produts with these sku's. But is there a better way around ?


texts: magento2 one step checkout page payment error

texts:
one step checkout page

When Enter debit card details then below error display

"There is an error in payment processing.Error Message From Payment Gateway is Call Voice Center"

So help me.


texts: Issue with Magento 301 redirect on Nginx

texts:
As the subject states, I have some issues with my redirects.
I have setup 301 to redirect non-www to www and changed it from the Magento EE admin panel too. For the root domain non-www works absolutely fine so for example, if I typed mywebsite.com, it'd redirect me to www.mywebsite.com which is fantastic but if I type mywebsite.com/mycategory, it redirects me to the home page instead of www.mywebsite.com/mycategory. It'd want it to redirect to www.mywebsite.com/mycategory/

I am on Nginx server and 301 redirects are enabled on the server too. I am using Cloudflare as well but no redirect blocking rules are setup there.

Any help is highly appreciated.


texts: Where is the method "setIsHandle" is defined?

texts:
I am unable to find the setIsHandle method ie defined inside action tag in page.xml under the node page_one_column.

<action method="setIsHandle"><applied>1</applied></action>

And what is purpose of using this ?

Comments state that it  "Mark root page block that template is applied"


texts: How do I translate the "All categories" text in the search field?

texts:
I have a Magento 2 setup with a danish language package installed and porto theme.
But the search fields text "All categories" is not translated:

I tried to add a i18n folder in my theme. Both in the the root "porto_child" and in the Magento_Search.

The content of da_dk.csv:
"All categories", "Alle kategorier"

But I can't get it to translate.
I saw this post How to properly transalte All Categories to another language?
But I don't have a vendor/mageplaza folder, though the danish translation is from Mageplaze. I don't know where that translation lives?


texts: Magento 1.7.0.0 Paypal IPN Returning 200 Response Code

texts:
i'm trying to get paypal standard with the auto return back to my website setup however my orders are stuck at pending payment. When I check in the IPN history i'm getting a 200 response. Does anyone have any help they can offer in debugging this? I have logs turned on but nothing regarding IPN comes into the var folder, only a file called:

payment_paypal_standard.log

That looks like this:

        [return] => http://www.mywebsite.com/paypal/standard/success/
        [cancel_return] => http://www.mywebsite.com/paypal/standard/cancel/
        [notify_url] => http://www.mywebsite.com/paypal/ipn/

I have read a few forums saying they have further logging specifically around IPN. Any help would be greatly appreciated.


texts: Magento 2: Set value of Yes/No custom attribute programmatically

texts:
I created a custom Yes/No attribute for products and assigned it to default attribute group. I have to save value of Yes/No attribute programmatically.
is it possible? if Yes, How can I manage product value programmatically?


texts: Custom Form Call using CMS page will not show Magento 2 Captcha code

texts:
When i call form using direct URL
http://192.168.1.35/m234/customemail/index/index OR http://192.168.1.35/m234/customemail/ it will show Captcha code but when i call this same form using CMS page like

{{block class="My\Customemail\Block\Customemail" template="My_Customemail::customemail_index_index.phtml"}}

it will not show captcha.
I have an issue in My Latest Magento 2 version 2.3.4.


texts: How to call Magento SOAP API using Jquery?

texts:
I would like to call magento SOAP using Javascript or Jquery to list the products.
Anyone know how to do this?


texts: How to display custom attribute to admin product edit page

texts:
I have created a custom product attribute in my install script using addAttributeGroup() method.

How to display this attribute on product edit page tabs programmatically?


texts: Make "Pick up at store" function in checkout layout file

texts:
I'm about to override checkout phtml file and also make a javascript file which allows the change of shipping method when a customer choose "pick up at store".

Let me show you what i am supposed to make.

1. I will make a button for pick up at store right next to shipping address section on checkout page

2. Below the shipping methods, there are still 2 shipping methods. But when a customer choose real shipping address like first and second one, i want to show them only flat rate. But if a customer choose pick up at store, only free shipping method should be shown as a shipping method. And it is made with free shipping based on megento basic function.

I think that a javascript file needs in this part. I'm so pooor at js tho.

What should i do first in order to implement this process. Any ideas?

Thanks a lot.


texts: How does Magento 2.1.x remove item from cart?

texts:
In Magento 2.1.8, for minicart, inside Magento_Checkout/web/template/minicart/item/default.html around line 96, there's a chunk of code which shows the 'Remove' button.

But, it's not clear how this button sends data to the controller to delete selected item.

Could someone explain this knockout please?

Cheers


texts:
As magento2, provides rest service to generate token for customer

rest/V1/integration/customer/token

Token expiration is provided from here

We are planning to use headless magento approach, with frontend web as a seperate app. If i use this token for validating session, how to keep different timeout for mobile and web?


texts: How can i get collection of custom module in magento 2

texts:
I have created a custom module: Ashore_Faq

My module structure is:

Ashore
└───Faq
    │   registration.php
    │
    ├───etc
    │       module.xml
    │
    ├───Model
    │   │   Custom.php

    │   │
    │   └───ResourceModel
    │       │   Custom.php
    │       │
    │       └───Custom
    │               Collection.php
    │
    ├───Setup
    │       InstallSchema.php
    │
    │
    └───view
        └───frontend
            │___Template
            │       Faq
                        Index.php
            ├───layout
            │       faq_faq_index.xml
            │

After creation of module, I have written below code but it's not working.

Below is code with folder structure:

  /block/Faq/Index.php

<?php

namespace Ashore\Faq\Block\Faq;
use Ashore\Faq\Block\BaseBlock;

class Index extends BaseBlock
{
    //public $hello='Hello World';

    protected $mymodulemodelFactory;
    public function __construct(
    \Ashore\Faq\Model\ResourceModel\Custom\CollectionFactory $mymodulemodelFactory,
    )
    {
        $this->mymodulemodelFactory = $mymodulemodelFactory;
    }
    public function getCollection()
    {
        $collection = $this->mymodulemodelFactory->create();
        return $collection;
    }

}

AND

get collection data folder structure:

  /View/Frontend/Template Faq.Index.php

echo $block->getCollection();

but it's not working. After running the code it displays the blank page.

Please suggest a solution?


texts: How to add a value to the final product that would not be multiply by the number of products from the basket?

texts:
How to add a value to the final product that would not be multiplied by the number of products from the basket?

If I have for example a wedding invitation that I want to sell on my website and the price is 2 euros and I want to include somehow a value of 20 euro that it will be added to the final price. Is that possible?

Thanks


texts: Failed to load API definition error in magento 2 swagger

texts:
I am hitting magento 2 swagger UI but getting 500 error
Failed to load API definition

http://'website_name'.com/swagger/


texts: What is the correct way to modify core column value in Magento 2?

texts:
I have a requirement to remove firstname, lastname as required field from registration page which I can achieve by modifying eav_attribute table directly

UPDATE 'eav_attribute' SET 'is_required' = 0 WHERE 'entity_type_id' = 1 && 'attribute_code' = 'lastname';

(Similarly I'll update firstname and remove firstname, lastname input field from the phtml file.)

I know modifying the core tables directly is not a good practice. What are alternatives through which I can achieve the above stated requirement?

After reading Modify core tables vs custom tables and joins,  I see it's recommended to create a custom table and use joins. Can someone share any example how that is done ?


texts: Why does ORM `hasDataChanges()` behave incorrectly?

texts:
I'm confused by the way Magento's ORM behaves when editing/saving an object; see the example below:

$model = Mage::getModel('vendor/model')
    ->setData(array(
        'name'        => 'Test,
        'description' => 'Info',
    ))
    ->save();

I now have a new record in the table, however this is where i'm confused.

$model = Mage::getModel('vendor/model')->load(1);
$model->setName('Test');  // THIS IS THE SAME
$model->setDescription('Info'); // THIS IS THE SAME

var_dump($model->hasDataChanges()); // returns true! (i expect false)
var_dump(($model->getData() !== $model->getOrigData())) // returns false (expected)

Surely the latter is how Magento should behave? Unless i'm missing something.


texts:
This is my code of email

$this->inlineTranslation->suspend();
$transport = $this->transportBuilder->setTemplateIdentifier($template)
                 ->setTemplateOptions($templateOptions)
                 ->setTemplateVars($temp_vars)
                 ->setFrom($from)
                 ->addTo($supplier_email)
                 ->getTransport();
$bodyMessage = $transport->getMessage()->getBody()->getPartContent(0);
print_r($bodyMessage);
exit;

and output of the code

  =0A=0A=0A=0A=0A=0A=0Aa:visited{color:#1979c3;text-decoration:none}a:hov=
  er{color:#006bb4;text-decoration:underline}a:active{color:#ff5501;text-d=
  ecoration:underline}=0A=0A=0A= =0A=0A=0A=0A=0A
  =0A =0A=0A=0A <= /tr>=0A=0A=0A =20= =0A=0A=0A =0A=
  =0A =0A =0A
  =0A =0A =0A=0A
  =0A =0A=0A=0A =20= =0A=0A=0A <= /tr>=0A=0A=0A = =0A=0A=0A =0A=0A=0A =0A
  =0A =20= Thank you=0A =20=

  =0A = =0A =0A =0A

after upgrade


texts:
I am new to Magento2 and our organisation has just get the EE licence. I have installed it on my local machine and the default template spits out the following mixed in with HMTL:

<script type="text/x-magento-init">
{
    "*": {
        "Magento_Ui/js/core/app": {
            "components": {
                "customer": {
                    "component": "Magento_Customer/js/view/customer"
                }
            }
        }
    }
}
</script>

And calls like

<script type="text/x-magento-init">
{
"*": {
    "Magento_Ui/js/core/app": {
        "components": {
                "messages": {
                    "component": "Magento_Theme/js/view/messages"
                }
            }
        }
    }
}
</script>

Is this to do with KnockoutJS or RequireJS? What are these calls and what is this new script tag <script type="text/x-magento-init">


texts: Order created but Paypal has no record of payment

texts:
We have received a number of orders which have come through to us but sitting at "Payment Pending". For each we have learned to check our PayPal account to see if the payment has processed, but not been pulled through to Magento.

Some of these payments have actually processed correctly, but the majority of these orders have no payment information in PayPal.

I can understand if a payment goes through correctly but Magento doesn't pick it up, but how can an order be created with no payment into PayPal? Also, some customers, where we have received no payment into PayPal for the order, have reported that they have had money taken from their account. I have followed this up, asking for transaction details, etc, whereupon they have not responded so I assume they were mistaken, but this is not good from a customer service standpoint.

We are using Magento Community 1.7.0.2 and default PayPal integration. (See below) Any ideas?


texts: Magento 2 Retrieved core_config_data value is null

texts:
I am having similar problem as this stackexchange post. I have looked that the database table core_config_data contains the value i need to retrieve. But $configValue=$this->_scopeConfig->getValue(path, \Magento\Store\Model\ScopeInterface::SCOPE_STORE) query returns null. (The error outputs while running unit test "Failed asserting that null matches expected".) I have tried the module code in Magento 2.1.0 and 2.0.7 versions getting same results.

I am suspecting that the problem might be in some missing etc file in my module or settings that is needed to retrieve db value in module?

My etc contains: module.xml, adminhtml/routes.xml and adminhtml/system.xml.
Also system.xml:

   <field id="username" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Username</label>
    </field>

SQL query: SELECT * FROM core_config_data a WHERE a.'path' LIKE '%eepohs_erply/account/username%'


texts:
When viewing the Total Ordered Report I'm getting the following error message

  This report depends on timezone configuration. Once timezone is changed, the lifetime statistics need to be refreshed.

I have my /app/etc/config and it has the following

<general>
<locale>
    en_GB
    <timezone>Europe/London</timezone>
</locale>

This matches what is set in the admin system under System->Configuration->General->Locale options.

I have tried to refresh the lifetime stats but this message still appears.

Please could someone advise


texts: Need event observer for the import product save row controller

texts:
how can i catch import product Mage_Catalog_Model_Convert_Adapter_Product model saverow() event using observer.

Mage::dispatchEvent('catalog_product_import_profile_after', array('adapter'=>$this));

i use this one but not getting success.

This is my code: in my \app\code\community\Compnyname\ImportProduct\controllers\Adminhtml\RunProfileController.php

class Compnyname_ImportProduct_Adminhtml_RunProfileController extends Mage_Adminhtml_Controller_action
{
    protected function _initAction()
    {
        .....
    }
    public function indexAction()
    {
         ........
    }
    public function runAction()
    {
        ...........

    }

    public function batchRunAction()
    {

        $currentUrl = Mage::helper('core/url')->getCurrentUrl();
        $ids = explode("/", $currentUrl);
        $id=$ids[11];
        $file=explode("?",$id);
        $file_name =  $file[0];
        $path = Mage::getBaseDir('var') . DS . 'import' . DS ;
        $filepath =$path.$file_name;
        $header=array();
        $header1=array();
        $i = 0;
        if(($handle = fopen("$filepath", "r")) !== FALSE)
        {
            while(($data = fgetcsv($handle, 1000, ",")) !== FALSE)
            {
                if($i==0)
                {
                     $header1[$i]=$data;
                }
                else
                {
                     $header[$i]=$data;
                }
                $i++;
            }
            $array1=array();
            $array2=array();
            for($kd=1;$kd<=count($header);$kd++)
            {
                $jk=0;
                foreach ($header1[0] as $key => $value)
                {
                    $array1[$value]=$header[$kd][$jk];
                    $jk++;
                }

                 $this->updateData($array1);
            }
        }

        return true;
    }
    public function updateData($data)
    {
        //$importData=$data;

        $collection = Mage::getModel('importproduct/convert_adapter_product')->saveRow($data);
        if($collection)
        {
          $this->batchFinish();
        }else{
          $this->batchError();
        }
        //$j = $j + 1;
        //return "hello";
    }

    public function batchFinish()
    {
        //$batchId = $this->getRequest()->getParam('id');

        Mage::dispatchEvent('catalog_product_import_profile_after', array('adapter'=>$this));
        //Mage::dispatchEvent('catalog_product_prepare_save', array('adapter'=>$this));
        //catalog_product_prepare_save
    //echo "hello".$var;
        echo "batchfinish....";

    }
    public function batchError()
    {
    echo "error";
    }

    function testAction()
    {
    echo "testing...";
    }
}

?>

app\code\community\Compnyname\ImportProduct\Model\Convert\Adapter\product.php

class Compmyname_ImportProduct_Model_Convert_Adapter_Product extends Mage_Catalog_Model_Convert_Adapter_Product
{
 .....
  public function saveRow(array $importData)
  {
    code for save raw
  }
......
}

I want to call observer during import product process is running and observer call after when one row is import. For example if in csv there is 500 product then observer call 500 time.

Please help to solve this problem.


texts: Magento 2: Why block initialized but template not rendered?

texts:
I have a page that I want to add content to it. My problem is that my block is initialized and setTemplate is called but my template never rendered. I tried adding module name to layout (Vendor_Test::) but it made no difference. When I edit my layout, I change the title and clean the cache, so I can see that new title is applied.

Here is my files:

Controller:

<?php
namespace Vendor\Test\Controller\Exec;

use Magento\Framework\App\Action\Context;
use Magento\Framework\View\Result\PageFactory;
use Magento\Framework\App\ResponseInterface;

class Bank extends \Magento\Framework\App\Action\Action
{
    protected $resultPageFactory;
    public function __construct(
        Context $context,
        PageFactory $resultPageFactory
    )
    {
        $this->resultPageFactory = $resultPageFactory;
        parent::__construct($context);
    }
   public function execute()
    {
        $page = $this->resultPageFactory->create();
        return $page;
    }
}

My layout:

<?xml version="1.0"?>
<page layout="3column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <title>Bank Page Title</title>
    </head>
    <body>
        <block class="Vendor\Test\Block\Date" name="vendor.test.date" template="date.phtml"   >
            <arguments>
                <argument name="something" xsi:type="string">Value</argument>
            </arguments>
        </block>
    </body>
</page>

My Block:

<?php
namespace Vendor\Test\Block;

class Date extends \Magento\Framework\View\Element\Template
{
    /**
     * @param \Magento\Framework\View\Element\Template\Context $context
     * @param array $data
     */
    public function __construct(\Magento\Framework\View\Element\Template\Context $context, array $data = [])
    {
        parent::__construct($context, $data);
    }

    public function getDate()
    {
        return date('m/d/Y H:i:s');
    }
}

My template:

<div class="Something" >
    <?php  echo $block->getDate();?>
</div>

Output:


texts: How to disable magento 2 extension in store view (multistore)

texts:
I have an extension called Amasty - Xnotif (Out of Stock Notification), but for some reason, this extension refuses to be disabled from my store view even when I disable it from the settings.

So the big questions is, how do I disable this extension from my Store view.

Other information:

Disabled in STORES -> CONFIGURATION -> ADVANCED -> ADMIN.
When disabled from the list it disappears from CONFIGURATION -> Amasty EXTENTIONS, but is still visible on products that don't have stock.
Magento 2 installation has two stores, so its a multistore and I wish to disable this extension only on one of the stores.
Cache is not in use.
I have cleared browser cache.
Iv run setup:upgrade and setup:static-content just to be sure everything is updated.


texts: Adding Product to Cart,Got Error Please specify the product's option(s)

texts:
In magento, i have rewrite the Mage_Checkout_Model_Cart class for adding the dispatch event checkout_cart_product_add_before,
Due to this simple product added to the cart without problem, but while adding configurable products to the cart i got the error Please specify the product's option(s).

I have selected required options, even though i got this error.

when i remove checkout_cart_product_add_before event, this problem has been solved.
but i need checkout_cart_product_add_before event, how to overcome this problem.

Here is my code for adding checkout_cart_product_add_before event,

Config file for Rewriting "Mage_Checkout_Model_Cart",

<config>
    <global>
        ..
        <models>
            <checkout>
                <rewrite>
                    <cart>Att_Membership_Model_Checkout_Cart</cart>
                </rewrite>
            </checkout>
        </models>
        ..
    </global>
</config>

and model class file as below,

class Att_Membership_Model_Checkout_Cart extends Mage_Checkout_Model_Cart
{
    public function addProduct($productInfo, $requestInfo=null)
    {
        $product = $this->_getProduct($productInfo);
        Mage::dispatchEvent('checkout_cart_product_add_before', array('product' => $product));

        return parent::addProduct($productInfo, $requestInfo=null);
    }
}

obeserver:

   public function checkLogin($observer)
   {
      if (!Mage::helper('customer')->isLoggedIn())
      {
         echo Mage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl('customer/account'));
         exit();
      }
   }

any solution?

thanks.


texts:
I need to create a custom page to the homepage of my ecommerce. In it, I will insert static blocks and html content.

Can anyone tell me what to do to create a PHTML or XML template and call it on the homepage?


texts: Magento2 error after adding color swatches in related products

texts:
Error: Call to a member function getShowSwatchTooltip() on null

I keep o getting the above method error, because I have added color swatches for related products.
How do I solve this error?
Code for adding swatches
 <?php
if($_item->getTypeId() == \Magento\ConfigurableProduct\Model\Product\Type\Configurable::TYPE_CODE){

$swatchBlock = $this->getLayout()->createBlock("Magento\Swatches\Block\Product\Renderer\Listing\Configurable")->setTemplate("Magento_Swatches::product/listing/renderer.phtml");
 echo $swatchBlock->setProduct($_item)->toHtml();
}
?>


texts: Magento 1.9.3 Removing Add to Compare / Add to List in Product view

texts:
Need help removing the following from beneath the Add to Cart.
Thanks.

        <?php if (!$this->hasOptions()):?>

                <?php if($_product->isSaleable()): ?>
                    <?php echo $this->getChildHtml('addtocart') ?>
                    <?php if( $this->helper('wishlist')->isAllow() ||
                $_compareUrl=$this->helper('catalog/product_compare')-
                >getAddUrl($_product)): ?>
                        <?php echo $this->__('OR') ?>

                    <?php endif; ?>
                <?php endif; ?>
                <?php echo $this->getChildHtml('addto') ?>

            <?php echo $this->getChildHtml('extra_buttons') ?>
        <?php elseif (!$_product->isSaleable()): ?>

                <?php echo $this->getChildHtml('addto') ?>

        <?php endif; ?>


texts: CC Payment method's form not loading in magento 1.7

texts:
One of our site is running on Magento-1.7, on Checkout page's payment method section credit card payment method is showing but it's form is not coming.

getPaymentMethodFormHtml() returning "string(0)", respective function $this->getChildHtml('payment.method.' . $method->getCode()) not returning required phtml file content.

Please suggest what can be the reason for this.

Thanks


texts: Default page in System Config? Everything displays but the main content

texts:
Can someone explain me, which page is shown as default when entering the system configuration in the backend? What is the logic behind it?
Is there a cookie based "remember the last system config page you visited and show it when you come back" function or did it exist in the past? I thought there was but I am not sure anymore.

The reason I am asking is, when I enter the System Configuration, I see a blank content page and I am not sure but I think there was content there before. It seems I messed up something :)
But every page in the system config that I click works as expected.

Thanks in advance! :-)


texts: Does anyone have any experience with MAGMI and Magento 1.8? Either the .7.x branch or the .8beta branch?


texts: Invoice: How to highlight quantity > 2 items?

texts:
how can I draw a red circle (for example) on items with more than 1 quantity?

Many Thanks!


texts: Magento: Custom Shipping Method email notification to user and admin

texts:
i just created my custom shipping method.

i created custom module.

now what i want to do is if user select custom shipping method and submit the order ,

user and customer both will get one additional email. user will recieve the text written by admin and admin will receive the user's info.

i have created shipping method describe here:

http://inchoo.net/ecommerce/magento/custom-shipping-method-in-magento/

now what i am looking for is if user select the custom shipping methods and place the order, admin and user both will get one additional email which will be handle by admin.

how can i do that?

any hint?


texts: how to set payment method to new order by code

texts:
I  have payment method:

$paymentmethods = Mage::getModel('marketplace/paymentmethods');
            $paymentmethods->load(1);

and new order:

$order = Mage::getModel('sales/order')
    ->setIncrementId($reservedOrderId)
    ->setStoreId($storeId)
    ->setQuoteId(0);

how can i add payment method information with id = 1, to my new order? is it possible?


texts:
How to save programatically attribute option value in  Default Store View in attribute in magento 1.9?

public function saveAttributeValueAction()
    {
        $arg_attribute = 'ram';
        $file_handle = fopen('/var/www/dev/attributedata.csv', 'r');
        while (!feof($file_handle) )
        {
            $array_keyword_value[] = fgetcsv($file_handle, 1024);
        }
        fclose($file_handle);
        foreach ($array_keyword_value as $key1 => $value1) {
            $key_data[] = $value1[0];
        }
        $setup = new Mage_Eav_Model_Entity_Setup('core_setup');
        $attr_model = Mage::getModel('catalog/resource_eav_attribute');
        $attr = $attr_model->loadByCode('catalog_product', $arg_attribute);
        foreach($key_data as $key_value)
        {
         $option = array();
         $arg_value = trim($key_value);
         $attr_id = $attr->getAttributeId();
         $option['attribute_id'] = $attr_id;
         $option['value']['any_option_name'][0] = $arg_value;
         $setup->addAttributeOption($option);
        }
    }

I have to save value in attribute but not save in default store view. Please help me how to save it?


texts: Everytime I try to install a module through Magento Connect I get sent back to the login screen, but inside Magento connect.


texts:
I am trying to do compilation of Magento 2.2.2 installation and I am getting errors as shown below.
Kindly assist in how to resolve it.
Thanks in advance.
[root@www html]# bin/magento setup:di:compile
Compilation was started.
Interceptors generation... 4/7 [================>-----------]  57% 17 secs 310.0 MiBPHP Fatal error:  A void function must not return a value in /var/www/html/generated/code/Magento/Framework/App/Request/CsrfValidator/Interceptor.php on line 24
Below it the content of the file
<?php
namespace Magento\Framework\App\Request\CsrfValidator;
/**
 * Interceptor class for @see \Magento\Framework\App\Request\CsrfValidator
 */
class Interceptor extends \Magento\Framework\App\Request\CsrfValidator implements \Magento\Framework\Interception\InterceptorInterface
{
    use \Magento\Framework\Interception\Interceptor;
    public function __construct(\Magento\Framework\Data\Form\FormKey\Validator $formKeyValidator, \Magento\Framework\Controller\Result\RedirectFactory $redirectFactory, \Magento\Framework\App\State $appState)
    {
        $this->___init();
        parent::__construct($formKeyValidator, $redirectFactory, $appState);
    }
    /**
     * {@inheritdoc}
     */
    public function validate(\Magento\Framework\App\RequestInterface $request, \Magento\Framework\App\ActionInterface $action) : void
    {
        $pluginInfo = $this->pluginList->getNext($this->subjectType, 'validate');
        if (!$pluginInfo) {
            return parent::validate($request, $action);
        } else {
            return $this->___callPlugins('validate', func_get_args(), $pluginInfo);
        }
     }
}


texts: Magento2: How to trigger own javascript function in price change

texts:
In Magento you can define product price depending on e.g. product options. When the customer chooses product options, the price in product page is updated automatically.

I have added some code that displays installment amount and some other information, all depending on the price. Now when the product price changes, I should be able to the change the installment data as well.

How can I trigger my own javascript after the price has been changed?


texts: sqlstate "Integrity constraint violation" error when customers place an order

texts:
My customers getting the error bellow when they place an order. Orders go through, payments being taken but not inventory. Inventory stays same. Result of this customers order again. But then they are able to order without an error.

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '691-0-1' for key 'PRIMARY'

I tried to repair tables, clean the cache, full index but this error comes back. This wasn't happening before. I checked catalog_product_entitiy table for entitiy_id 691 it looks normal.

This happens with two different payment method. Paypal and realex. I have checked almost everything.

magento 1.8.1 CE


texts: Magento2.3.1: How to display all attributes of product on a product page?

texts:
How to display all attributes of a product like default and custom attributes on a product view page at just right side to the product.

Note: I don't want to display at tab or anywhere.


texts: Is there anyway to add an uneditable field in magento 2 admin form?

texts:
IS there anyway to add an uneditable field in magento 2 admin form?

$fieldset->addField(
            'giftcard_comment',
            'textarea',
            [
                'label' => __('Comment'),
                'title' => __('Comment'),
                'name' => 'giftcard_comment',
                'required' => false,
                'editable' => false
            ]
        );


texts: Programmatically create api user does not persist apikey

texts:
For an extension I need to create an api user programmatically using php.
I use the following code:

 $apiKey = '12345678';
 $user = Mage::getModel('api/user');
    $user->setData(array(
    'username' => 'api_consumer',
    'firstname' => 'fist',
    'lastname' => 'last',
    'email' => 'magento-apiconsumer@mail.com',
    'new_api_key' => $apiKey,
    'api_key_confirmation' => $apiKey,
    'is_active' => 1,
    'user_roles' => '',
    'assigned_user_role' => '',
    'role_name' => '',
    'roles' => array($role->getId())
    ));
    $user->save()->load($user->getId());

When I look in the database the api_key field is not filled, it has the value 'NULL'.

Is it possible to persist the api key?

I madfe a casing mistake, above code works, but I changed

'new_api_key' => $apiKey,

to

'api_key' => $apiKey,


texts: porto theme - critical.css file is not evaluated

texts:
Magento 2.3.6. We are trying to increase the pagespeed of the porto magento theme and we got recommendations to use critical css path.
We followed up the instructions for critical css path:
https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/css-topics/css-critical-path.html
In short, we did this:

echo '.test {}' > app/design/frontend/Smartwave/porto/web/css/critical.css
bin/magento config:set dev/css/use_css_critical_path 1
bin/magento c:f
bin/magento setup:static-content:deploy -f --jobs 4 en_US en_GB
bin/magento c:c; bin/magento c:f

We tried to add a critical.css file in porto main theme:
$ cat app/design/frontend/Smartwave/porto/web/css/critical.css
.test {}

Instead of the expected .test {} (regardless of the critical.css content, happens even with a critical-css-generated content) in the html's <style> </style>, we get a different content than the expected one.
This makes me think the porto theme has a different filePath for critical.css?
Magento 2 docs recommend placing it as web/css/critical.css
Where should we place the critical.css file for porto theme? Or does it required some extra configuration to be applied?
Thanks


texts:
I'm having an issue with COD not being displayed in the Sales -> Order grid.

All payment methods are being displayed here except for COD. I'm not sure why I also tried filtering by "Pending" status but it's still not displaying the order. I also tried to search the order by its order number but no luck.

Any idea why it's not displaying? Are there any certain rules that need to be met for it to be displayed?

I want to know what are the options I can choose if I placed a COD order like will I be able to print slip or something. The best way to know this is to view the order but I can't view it in sales -> order. Does anyone know how to fix this?


texts: Send checkout link after order placed by Magento Backend Admin

texts:
I'm using Magento 2.3.5 for B2B sales. My "Sales Man" needs to create an order using Magento backend (admin panel) and after que creation of the order, get a link of checkout to send to the customer. So the customer will enter on checkout link and just make the payment.
Is possible to create a module for this ? Or are there any extesion available on market for this ?
How can i do that ?
Thanks.


texts: how to add offline or online payment method for customer group in magento 1.9

texts:
I have add offline or online payment method for customer group  add to admin in back-end
EX:
Offline : Check/money order
Online  : Paypal


texts:
How Mage Report Checks the security patch is updated or not? On what basis it shows the result for Magento 1.9.3.1?

Thanks.


texts: How to hide country field in Shipping address?

texts:
I tried,

app/design/frontend/test/testing/Magento_Checkout/layout/override/base/checkout_index_index.xml

      <item name="country_id" xsi:type="array">
        <item name="visible" xsi:type="boolean"<name />false</item>
        <item name="sortOrder" xsi:type="string">115</item>
      </item>

But it is not working.


texts: Open footer block link in new tab/window

texts:
I've customized one of the footer link blocks within Magento 2's Luma theme in the default.xml file (htdocs/app/design/frontend/Ouho/outwardhound/Magento_Theme/layout/default.xml) with an external link:

<block class="Magento\Framework\View\Element\Html\Link\Current" name="external-link">
  <arguments>
    <argument name="label" xsi:type="string">External Link Name</argument>
    <argument name="path" xsi:type="string">http://example.com</argument>
  </arguments>
</block>

My question is, how can I get this link to open within a new tab using the xml/block/argument structure? I've seen mention of using <aParams>target="_blank"</aParams> elsewhere but it doesn't seem to function no matter where i place it within the code here.


texts: Magento2 : How to install patch CE-MAGETWO-67805.patch

texts:
Today CE-MAGETWO-67805.patch patch has released by Magento for resolve Image Resize Issue with Magento version 2.1.6

Image Resize Issue with Magento version 2.1.6

How can I install the patch? I can't find out any instruction for how to install patch. If any one have solution, please suggest to me.


texts: Change display for Shipping Address Custom Attribute field

texts:
I am trying to change the display to show the label of a custom attribute in the shipping address summary when i got to the billing address form.  Or would like to remove this field from showing in the rest of the checkout process
setup:
Layout Processor Plugin
$fieldCheckbox = [
            'component' => 'Magento_Ui/js/form/element/abstract',
            'config' => [
                'customScope' => 'shippingAddress.custom_attributes',
                'template' => 'ui/form/field',
                'elementTmpl' => 'ui/form/element/checkbox',
                'options' => [],
                'id' => 'field_checkbox',
            ],
            'dataScope' => 'shippingAddress.custom_attributes.field_checkbox',
            'label' => 'label text;,
            'description' => 'description',
            'provider' => 'checkoutProvider',
            'visible' => true,
            'checked' => false,
            'validation' => [],
            'sortOrder' => 100,
            'id' => 'field_checkbox',
        ];

        $jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']['shippingAddress']['children']['shipping-address-fieldset']['children']['field_checkbox'] = $fieldCheckbox;

frontend di.xml
<type name="Magento\Checkout\Block\Checkout\LayoutProcessor">
    <plugin name="custom-checkout" type="Module\Vendor\Plugin\CheckoutLayoutPlugin" sortOrder="10"/>
</type>

require-config.js
config: {
    mixins: {
        'Magento_Checkout/js/action/set-shipping-information': {
            'Module_Vendor/js/action/set-shipping-information-mixin': true
        }
    }
}

On the shipping address form it looks like:

When i go to the billing address, i just see the value true but i would like to add a label infront of it, is this possible?  I'm saving this in the backend already but really trying to get a better display than just the word true if the value is checked:


texts: admin order shipment not save with tracking number

texts:
When I'm using with payment method COD than shipment is working fine, but when I'm using with Authorize.net than getting below error.

Fatal error: Uncaught exception 'Exception' with message 'User Error: Some transactions have not been committed or rolled back in /vendor/magento/framework/DB/Adapter/Pdo/Mysql.php on line 3767' in /vendor/magento/framework/App/ErrorHandler.php:61
Stack trace:
#0 [internal function]: Magento\Framework\App\ErrorHandler->handler(256, 'Some transactio...', '...', 3767, Array)
#1 /vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(3767): trigger_error('Some transactio...', 256)
#2 [internal function]: Magento\Framework\DB\Adapter\Pdo\Mysql->__destruct()


texts: Magento Component Manager: Signin Issue :SSL certificate problem: unable to get local issuer certificate in Wamp server

texts: I know this question is already asked but the given answers only for XAMPP. I am using WAMP Server.I am using magento2.1.5.Now my question is i have signin to the Magento Component Manager i got error like SSL certificate problem: unable to get local issuer certificate. i have attached screen below for the reference.  Any one help me


texts:
I would have a large number of two types of products. Shirts and prints. There is a one to many relationships where one shirt can have multiple prints. The prints cannot be ordered separately but are customizable (in terms of color, price, and location). I also need to track inventory and currently have them as simple products.

Is the best way to do this in magento2 to create bundles on the fly?

Creating bundle products seems like a lot of overhead for all the different combinations. I really want to tie one simple to many for one complete product.

My thinking is when the user adds the complete product to the cart I create the bundle (based on their selections) and add that to the cart.


texts:
First, I reset password for account A => Success
After 5 seconds, I reset password for account B => Failed, error message is "We received too many requests for password resets. Please wait and try again later or contact abc@email.com"
If I reset password for account B after about 5 minutes => Success
I found that when the time between 2 reset password processes is too short, the exception called SecurityViolationException appeared
I want to able to reset password for account B after 5 seconds from reset password for account A, can I fix to do that?


texts:
While I am studying the Magento Basic Tutorial, there is a question confused me.

I noticed that in the /template/page/html/header.phtml rendered a child block called 'topSearch'.

<?php echo $this->getChildHtml('topSearch') ?>

However, I opened the layout associated file (page.xml), that child block was not defined under the header block. And my understanding from Magento documentation Layout Chapter, that child block would not be rendered.

  a Block can only render a child Block if the child Block is included as a nested Block in the Layout XML file.