texts: aroundSavePaymentInformationAndPlaceOrder plugin not working in magento 2

texts:
etc/di.xml

<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<!--  this plugin not working -->
    <type name="Magento\Checkout\Model\PaymentInformationManagement">
        <plugin name="save_order_comment_now" type="Order\Custom\Plugin\PaymentInformationManagementPlugin"/>
    </type>

<!-- this plugin is working-->
  <type name="Magento\Sales\Api\OrderManagementInterface">
        <plugin name="before_place_order_operation"
                    type="Order\Custom\Plugin\OrderManagement"/>
    </type>

that not working plugin class

    <?php

    namespace Order\Custom\Plugin;

    class PaymentInformationManagementPlugin
    {
    protected $orderRepository;

    public function __construct(
        \Magento\Sales\Api\OrderRepositoryInterface $orderRepository
    ) {
        $this->orderRepository = $orderRepository;
    }

    public function aroundSavePaymentInformationAndPlaceOrder(
        \Magento\Checkout\Model\PaymentInformationManagement $subject,
        callable $proceed,
        $cartId,
        \Magento\Quote\Api\Data\PaymentInterface $paymentMethod,
        \Magento\Quote\Api\Data\AddressInterface $billingAddress = null
    ) {

        $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/plugincheck.log');
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);
        $logger->info('Your text message');

//        $result = $proceed($cartId, $paymentMethod, $billingAddress);
//
//        if ($result) {
//            $orderComment =$paymentMethod->getExtensionAttributes();
//            if ($orderComment->getComment()) {
//                $comment = trim($orderComment->getComment());
//            } else {
//                $comment = '';
//            }
//
//
//            $history = $order->addStatusHistoryComment($comment);
//            $history->save();
//            $order->setCustomerNote($comment);
//        }
//
//        return $result;
        $proceed($paymentMethod, $billingAddress);
    }
}

why this plugin is not working??


texts:
I was hunting for the cause of some SimpleXMLElement errors in my log when I found out the culprit was some module in app/etc/modules called Mgt_Base. The errors showed up when I accessed the adminpanel

I'm trying to figure out whether I can just disable the module to stop the log errors or whether it's essential. Unfortunately I'm new to Magento so I'm having a hard time trying to find out exactly what this module does.

Does anyone know what this Mgt_Base module is supposed to do or how I can find out that information?


texts: Configurable Product image swapping with swatch image?

texts:
I want to know that if, we select any swatch color for configurable product it will add feature image of product but it also show the default image in thumbnail gallery.

Like i have one product "kids cloth"

Here you can find image:
https://www.screencast.com/t/IfIWhmbD

Now i had selected pink swatch from option, it will change the feature image but also showing default image of product in thumbnail gallery.

Here you can find image:
https://www.screencast.com/t/DQSwTrR2QpT

Is there any option to hide this image.

TIA


texts: Hide product options in email template for customer only not for admin

texts:
I want to customize email template for new order mail. I want to hide product options in mail for customers only, but want to show these product options in administrator mail. I am attaching a screen-shot for more clarification .

Please help me, how can I get done this task?

Thanks in advance!


texts:
I have to add bootstrap 3 or 4 to my custom theme (magento 2.2.5)
I tried this:
How to use bootstrap in my custom theme
and this
Bootstrap in magento 2 theme
but these ways don't work with magento 2.2.5

<head>
    <css src="css/bootstrap.css" />
    <css src="css/bootstrap.css.map" />
    <css src="css/bootstrap.min.css" />
    <css src="css/bootstrap.min.css.map" />
    <css src="css/bootstrap-grid.css" />
    <css src="css/bootstrap-grid.css.map" />
    <css src="css/bootstrap-grid.min.css" />
    <css src="css/bootstrap-grid.min.css.map" />
    <css src="css/bootstrap-reboot.css" />
    <css src="css/bootstrap-reboot.css.map" />
    <css src="css/bootstrap-reboot.min.css" />
    <css src="css/bootstrap-reboot.min.css.map" /></head>

default_head_blocks.xml (head section)

var config = {
paths: {
        'bootstrap':'Magento_Theme/js/bootstrap.bundle',
} ,
shim: {
    'bootstrap': {
        'deps': ['jquery']
    }
}

};

Magento_Theme/requirejs-config.js

<script type="text/javascript">
        require(['bootstrap']);
    </script>

Magento_Theme/templates/html/header.phtml
Also I added Bootstrap css flies at (vendor/my_theme/web/css)
and added Bootstrap js files at (vendor/my_theme/Magento_Theme/web/js)
I use bootstrap 4 and magento 2.2.5


texts: What is the best practice to save a product by its id ? Using factory or repository?

texts:
Save product by its id in magento 2.
What is the best practice in use ?


texts: Customer save takes long in production, any chance to improve?

texts:
Recently faced a problem of customer saving being too slow in production environment, especially while doing it as a mass-action. Production system has ~200 simultaneous users at the same time.

After some investigation on a mirror system found out the following:

I should switch indexes into "update on schedule" mode.
Looks like the save action of customer is slow (1-2 seconds)
Half of that save time is spend on clearing caches after save, see the code snippet below

// app/code/core/Mage/Core/Model/Abstract.php
/**
 * Remove model onject related cache
 *
 * @return Mage_Core_Model_Abstract
 */
public function cleanModelCache()
{
    $tags = $this->getCacheTags();
    if ($tags !== false) {
        Mage::app()->cleanCache($tags);
    }
    return $this;
}

/**
 * Processing object after save data
 *
 * @return Mage_Core_Model_Abstract
 */
protected function _afterSave()
{
    $this->cleanModelCache();
    Mage::dispatchEvent('model_save_after', array('object'=>$this));
    Mage::dispatchEvent($this->_eventPrefix.'_save_after', $this->_getEventData());
    return $this;
}

On live system that becomes even worse because cache cleanup on a system with quite some live users takes a lot of time, and actually this time is wasted.

So far I see the only solution is to disable the cache, perform customer mass-action and then enable the cache again. Though that sounds little insane and here comes the question:

Is there a way to speed up cache clean up or configure magento better to optimize model saving in production environment?

UPDATE: We are talking about Magento EE v.1.14.2.4, I believe the corresponding Magento CE have the same problem, I haven't checked though.

UPDATE2: Continued playing around and found out the following:
saving 885 customers as a mass-action takes:

with default magento cache - ~7 minutes
with default cache completely disabled - 4.3 minutes
with redis session, cache and fpc configured according to magento examples - 49 seconds

that doesn't solve the issue though, cause if the time proportion still stands we could shorten those 49 seconds to be 25-30 seconds.

see also this SO topic

UPDATE3: all the story is happening on the following machine

Intel® Xeon® E3-1275 v5 Quad-Core Skylake (12 cores visible to OS)
64 GB DDR4 ECC RAM
2 x 512 GB NVMe PCIe Gen3 x4 SSD (Software-RAID 1)
running Debian Wheezy with nginx 1.10 and PHP 5.5.33 via php-fpm


texts:
when I enter url http://magento.premierexports.co.uk/magento/admin
that time magento admin panel not open.
Instead of this when I enter url http://magento.premierexports.co.uk/magento/index.php/admin
  that time admin panel is open.
please provide solution


texts: getCustomAttribute() not working on collection items

texts:
If I pull a list of products with the repository I am unable to get any custom attributes.

    $searchCriteria = $this->searchCriteriaBuilder->addFilter('type_id', 'simple', 'eq')->create();
    $simpleProdSearch = $this->productRepository->getList($searchCriteria);
    $simpleProds = $simpleProdSearch->getItems();

    foreach($simpleProds as $product)
    {
        $cats = $product->getCustomAttribute('category_ids'); // null
    }

If I load the product by ID then it works:

    foreach($simpleProds as $product)
    {
        $fullProduct = $this->productRepository->getById( $product->getId() );
        $cats = $fullProduct->getCustomAttribute('category_ids');
    }

But this loads the product twice.  I am performing action on all products so I want this to be performant as possible.  Can I add the category IDs to the full collection of products?


texts: Grid collection issue after migrating magento 2.3.0 to 2.3.4

texts:
I had to upgrade magento 2.3.0 to magento 2.3.4 on the project I am working for.

I had the following issue that I don't really understand :

system.log :

[2020-05-26 10:15:46] report.ERROR: Type Error occurred when creating object: Magento\Rma\Model\ResourceModel\Grid\Collection\Interceptor [] []
[2020-05-26 10:15:49] report.CRITICAL: Type Error occurred when creating object: Magento\Rma\Model\ResourceModel\Grid\Collection\Interceptor, Argument 5 passed to Magento\Rma\Model\ResourceModel\Grid\Collection\Interceptor::__construct() must implement interface Magento\Framework\DB\Adapter\AdapterInterface or be null, string given, called in /var/www/magento/current/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 121 [] []
[2020-05-26 10:15:49] report.ERROR: Type Error occurred when creating object: Magento\Rma\Model\ResourceModel\Grid\Collection\Interceptor [] []

Magento\Rma\Model\ResourceModel\Grid\Collection is a virtual class defined here :

di.xml :

   <virtualType name="Magento\Rma\Model\ResourceModel\Grid\Collection" type="Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult">
        <arguments>
            <argument name="mainTable" xsi:type="string">magento_rma_grid</argument>
            <argument name="resourceModel" xsi:type="string">Magento\Rma\Model\ResourceModel\Rma</argument>
        </arguments>
    </virtualType>
    <virtualType name="Magento\Sales\Model\ResourceModel\Order\Grid" type="Magento\Sales\Model\ResourceModel\Grid">
        <arguments>
            <argument name="columns">
                <item name="relation_parent_real_id" xsi:type="string">sales_order.relation_parent_real_id</item>
            </argument>
        </arguments>
    </virtualType>
    <virtualType name="CreditmemoGridAggregator" type="Magento\Sales\Model\ResourceModel\Grid">
        <arguments>
            <argument name="columns">
                <item name="transaction_id" xsi:type="string">sales_creditmemo.transaction_id</item>
            </argument>
        </arguments>
    </virtualType>
    <type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory">
        <arguments>
            <argument name="collections" xsi:type="array">
                <item name="sales_order_view_rma_grid_data_source" xsi:type="string">Magento\Rma\Model\ResourceModel\Grid\Collection</item>
            </argument>
        </arguments>
    </type>

I understand there is a bad constructor call but what I had to change ?


texts: Get URL of the static content folder (for backend)

texts:
Inside a block class which is being used to render a button in the admin panel, how to get the URL of the static content folder? Specifically, URL of the folder with images?

For example, in Company_Helloworld module an image for a custom button is located here:

  app/code/Company/Helloworld/view/adminhtml/web/images/

Test 1

I tried this:

$url = $this->getViewFileUrl('Company_Helloworld::images/icon.png');

But it tries to retrieve the image from the Magento/backend theme:

  http://example.com/pub/static/adminhtml/Magento/backend/en_US/Company_Helloworld/images/icon.png

while the image is not there, image is actually in the module's folder:

  app/code/Company/Helloworld/view/adminhtml/web/images/icon.png

Test 2

And this:

$url = $this->getViewFileUrl('images/icon.png');

But it also tries to retrieve the image from the Magento/backend theme, this time without module context:

  http://example.com/pub/static/adminhtml/Magento/backend/en_US/images/icon.png

Is there any way to put the image in the module and not in the backend theme?


texts: Label or sticker on product listing in magento

texts:
I want to show a custom label on product detail page as well as on product listing in magento 1.9.0.1

This label will be visible based on an attribute.(if I select an attribute to yes while creating product, only then this label should be visible.)

I am very new to magento so detailed instruction will be better.


texts: Magento 2 - Product Customizable Options is not showing on frontend

texts:
i create a product with Customizable Options but sometimes at frontend, the place which custom options should have appeared is now nothing

I'm not sure why it happen, but when i resaving the product seems to solve that.
Any idea what's the cause? How to prevent that? How to fix that for all products without resaving them all?


texts: Magento2: Custom Logout Observer with redirection

texts:
I'm implementing a SSO extension for Magento2. Right now I want to add an observer to the customer_logout event in order to execute a redirection to my custom logout endpoint.

I followed what is described at this other question, and also what I saw at CheckContactUsFormObserver class:.

I defined my event file (/etc/frontend/events.xml)

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
<event name="customer_logout">
    <observer name="{company_module}_customer_logout" instance="{Company}\{Module}\Observer\Frontend\CustomerLogOutObserver" />
</event>

I described my observer in {Company}{Module}\Observer\Frontend\CustomerLogOutObserver.php

namespace {Company}\{Module}\Observer\Frontend;
use Magento\Customer\Model\Session;
use Magento\Framework\App\Action\Action;
use Magento\Framework\App\ActionFlag;
use Magento\Framework\App\Response\RedirectInterface;
use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface;
use {Company}\{Module}\Helper\Data;

class CustomerLogOutObserver implements ObserverInterface
{
    protected $_customerSession;
    protected $_helper;
    protected $_redirect;

    public function __construct(
        Session $customerSession,
        Data $helper,
        ActionFlag $actionFlag,
        RedirectInterface $redirect
    ) {
        $this->_customerSession = $customerSession;
        $this->_helper = $helper;
        $this->_actionFlag = $actionFlag;
        $this->_redirect = $redirect;
    }

    public function execute(EventObserver $observer)
    {
        $controller = $observer->getControllerAction();
        $this->_actionFlag->set('', Action::FLAG_NO_DISPATCH, true);
        $this->_redirect->redirect($controller->getResponse(), 'sso/saml2/logout');
    }
}

But when I executed it, I got:

 Call to a member function getResponse() on a non-object

It seems that the getControllerAction returns nothing.

Why a similar code is supoosed to be working for the CheckContactUsFormObserver class and not for me?


texts: Error creating email template for custom module

texts:
I tried to create an email template in my custome module.In admin panel i got below error

  Fatal error:  Class 'Mage_Ayakil_Muja_Helper_Data' not found in
  C:\xampp\htdocs\mage19\app\Mage.php on line 547

How I tried is below.

<config>
<modules>
    <ayakil_muja>
        <version>0.1.0</version>
    </ayakil_muja>
</modules>
<global>
    <template>
        <email>
            <ayakilmuja_email_template1 module="muja">
                <label>ActiveCodeline custom email module</label>
                <file>ayakil_muja_custom_email1.html</file>
                <type>html</type>
            </ayakilmuja_email_template1>
        </email>
    </template>
</global>
</config>

Created the template file ayakil_muja_custom_email1.html in app\locale\en_US\template\email

My data.php file in the module Helper folder is like below

<?php
class Ayakil_Muja_Helper_Data extends Mage_Core_Helper_Abstract
{

}

If I remove module="muja" part in config.xml the error is not coming.
What is this module here in <template> section?

Since I am creating a new module, Why I am getting errors from Mage?
Can any one help me to fix this error and create the email template or suggest me a good practice way to create the email template for custom module.


texts:
After adding product to the cart when I check to cart page the shipping rate not showing which was showing earlier. I also checked mage shipping module & it is also enable.

Here is my tax settings

Tax Classes

  Tax Class for Shipping : Taxable goods

calculation setting :

  Tax Calculation Method Based On : Total

  Tax Calculation Based On : Billing Address

  Catalog Prices : Excluding tax

  Shipping Prices : Including Tax

  Apply Customer Tax : After Discount

  Apply Discount On Prices : Excluding tax

  Apply Tax On : Original

  Enable Cross Border Trade : No

Price Display Setting :

  Display Product Prices In Catalog : Excluding tax

  Display Shipping Prices : Including Tax

  shopping cart display setting :

  Display Prices : Excluding tax

  Display Subtotal : Excluding tax

  Display Shipping Amount : Including Tax

  Include Tax In Grand Total : No

  Display Full Tax Summary : No

  Display Zero Tax Subtotal : No


texts: JS and CSS file are not loading due to missing forward slash

texts:
My client moved to new server which nginx & percona server. Problem is the forward slash is being removed from end of the url. as you can see on the picture  http://imgur.com/8OAUQZb

therefor the design files such as js, css files are not loading or something it gives magento 404 not found page. it happens randomly.

on the database web/unsecure/base_url and web/secure/base_url are set with forward slash http://domain.com/

I'm assuming something wrong with nginx file. The rewrite rules might be wrong. I have tried every possible way that I found on this website and on google but nothing work. It might be something else. Could you please help?

This is nginx conf file for the domain

# Uncomment the server definition below should you wish to
# redirect from domain.com to www.domain.com
#server {
#    listen 192.168.92.247;
#    server_name domain.com;
#    #rewrite / $scheme://www.$host$request_uri permanent;
#}

#
# Change this backend name (and the socket pointer)
# as additional virtual hosts are added. This should
# point to the spawn-fcgi wrapper running as the
# appropriate user.
#
upstream domaincombackend {
        server unix:/var/run/php-fcgi-domaincom.sock;
}

server {
    listen 192.168.92.247:80;
    server_name punkyfish.com;
    root /var/www/vhosts/domain.com/htdocs;

    location / {
        index index.html index.php;
        try_files $uri $uri/ @handler;
        expires 30d;
    }

    location /app/                { deny all; }
    location /includes/           { deny all; }
    location /lib/                { deny all; }
    location /media/downloadable/ { deny all; }
    location /pkginfo/            { deny all; }
    location /report/config.xml   { deny all; }
    location /var/                { deny all; }

    location  /. {
        return 404;
    }

    location @handler {
       rewrite / /index.php;
    }

    location ~ .php/ {
        rewrite ^(.*.php)/ $1 last;
    }

    include "ssl_offloading.inc";
    location ~ .php$ {
        if (!-e $request_filename) { rewrite / /index.php last; }

        expires        off;
        fastcgi_pass   domain.combackend;
        fastcgi_param  HTTPS $fastcgi_https;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
#       fastcgi_param  MAGE_RUN_CODE default;
#       fastcgi_param  MAGE_RUN_TYPE store;
        include        fastcgi_params;
    }


texts: How to install a language pack for 3 or more languages in Magento 2?

texts:
I have 3 languages in my site English, Danish and Swedish.I have created i18n folder in Magento_root/app path and I have language.xml, composer.json, da_DK.csv and registration.php files inside da_DK folder inside Locale folder which is in i18n folder Magento_root/app/i18n/Locale/da_DK/.

Translation is working perfectly for Danish. Likewise I have created the same structure for Swedish, but unfortunately, it did not work for Swedish. Path for Swedish Magento_root/app/i18n/Locale/sv_SE/

  Magento_root/app/i18n/Locale/sv_SE/composer.json

{
"name": "Locale/language-sv_se",
"description": "Swedish Language",
"version": "100.0.2",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"require": {
"magento/framework": "100.0.*"
},
"type": "magento2-language",
"autoload": {
"files": [
"registration.php"
]
}
}

  Magento_root/app/i18n/Locale/sv_SE/language.xml

<?xml version="1.0"?>

<language xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/Language/package.xsd">
sv_SE
<vendor>locale</vendor>
<package>sv_se</package>
</language>

  Magento_root/app/i18n/Locale/sv_SE/registration.php

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

  Magento_root/app/i18n/Locale/sv_SE/sv_SE.csv

"SIGN UP","BLI MEDLEM"
"LOG IN","logga in"
"LOG OUT","LOGGA UT"

I don't know really why the same way is working for Danish and not for Swedish. Can anyone please help me out here?

My folder structure is in the above screenshot, I don't know what I did wrong, Can anyone please help me out here?


texts: How to hide recently viewed products from specific category

texts:
In my Magento v1.9.1.0 CE I want to edit the recently viewed file so that is does not show any recently viewed products from a specific parent category and all its sub categories.

Meaning say I have a parent category called 'Members only' category and a sub category in that parent category called 'tshirts'. If I then view any items in the 'Members only' or the 'tshirts' subcategory I do not want them to show up in that persons recently viewed items listing.

I am thinking I need to edit the file app/design/frontend/my_theme/default/template/reports/product_viewed.phtml file
to have an if statement that looks for the category id and then have an if statement that says if the category id == xyz then show an epty   tag else show the regular  tag with the product info.

However I am not sure how to get the category and or subcategory id from the product that would be showed.


texts:
In response variable, I am getting the last product only; not getting all products but in my log file, I am getting all products.

Here is my code:

class SalesOrderSaveAfter implements ObserverInterface {
    protected $scopeConfig;
    protected $date;
    public function __construct(\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Framework\Stdlib\DateTime\DateTime $date)
   {
      $this->scopeConfig = $scopeConfig;
      $this->date = $date;
      $this->orderData = $orderData;
   }

    public function execute(\Magento\Framework\Event\Observer $observer) {
        $enable=$this->scopeConfig->getValue('abc/orderconfig/mkt_order_integration', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
        if($enable){
            $order = $observer->getEvent()->getOrder();
            $status = 0;
            $name='';
            $data['Email'] = $order->getCustomerEmail();
            $data['FirstName'] = $order->getCustomerFirstname();
            $data['LastName'] = $order->getCustomerLastName();
            $response= $this->orderData->orderData($data,$status,$name);
            $res= json_decode($response, true);
            if($res['success']==1){
                $productobjectname= $this->scopeConfig->getValue('abc/orderconfig/productcustomobject', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
                $orderobjectname= $this->scopeConfig->getValue('abc/orderconfig/ordercustomobject', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
                $status = 1;
                foreach($order->getAllVisibleItems() as $item){
                    if($item->getData()){
                    $digits = 3;
                    $rndno= rand(pow(10, $digits-1), pow(10, $digits)-1);
                    $cname= $productobjectname;
                    $pdata['emailAddress'] = $order->getCustomerEmail();
                    $pdata['orderId']= $order->getIncrementId();
                    $pdata['incrementId'] = $order->getIncrementId().$item->getProductId();
                    $pdata['productId'] = $item->getProductId();
                    $pdata['productName'] = $item->getName();
                    $pdata['productAmount'] = $item->getPrice();
                    $pdata['productSku'] = $item->getSku();
                    $pdata['productQty'] = (int)$item->getQtyOrdered();
                    $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/orderData3.log');
                    $logger = new \Zend\Log\Logger();
                    $logger->addWriter($writer);

                    $logger->info($pdata);
                    $response = $this->orderData->orderData($pdata,$status,$cname);
                   }
                }

            }
        }
        return $this;
    }
}

Please check my code and guide me on how can I get all the products to the response variable?

Thanks!


texts: Magento how to reterive data after saving in observer

texts:
I am using this method.

public function saveProductTabData(Varien_Event_Observer $observer)
{
    if (!self::$_singletonFlag) {
        self::$_singletonFlag = true;
        $product = $observer->getEvent()->getProduct();
        try {
             $myFieldValue =  $this->_getRequest()->getPost('custom_field');
             $product->save();
        }
        catch (Exception $e) {
            Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
        }
   }
}

I want to know where is the data being saved in database (table name) and how to retrieve it.

The value that I get in $myFieldValue is saved in which column of db.

In short i want to make a dropdown of yes/no in custom tab of product edit admin page and then reterive the valuse (yes/no) which is selected after saving it.


texts: Magento CE Warning: simplexml_load_string(): Entity Parser Error

texts:
I am trying to resolve an error I see in the system.log file for Magento. However I can not figure out what the issue or or more importantly how to resolve it. I have looked at the update.php file line 450 and do not see any incorrect code?
Below is the actual error I am seeing:

Warning: simplexml_load_string(): Entity: line 12: parser error : Start tag expected, '<' not found  in app/code/core/Mage/Core/Model/Layout/Update.php on line 450
Warning: simplexml_load_string(): </customer_account_create-->  in app/code/core/Mage/Core/Model/Layout/Update.php on line 450


texts: Magento2 - Is cache invalidation supposed to work properly when index is on-schedule?

texts:
We have the following problem: Over the night, products are imported via REST interface. Now in the morning some categories are shown as empty.

Indexes are set on update-on-schedule, that means, the cache invalidation should happen once the indices are finished.

Is the cache for category pages invalidated via the schedule index or via the product save?


texts: Magento 2 - Automatic currency and manual currency

texts:
A client has a multistore. For convenience he has store A and store B. Store A uses the euro, which is also the base currency, and store B (UK) uses the British pounds.
(They are differentiated on website scope)
The store is currently setup so it automatically converts the euro's to british pounds. Now the customer wants to be able to set different prices for store B, based on the British pound, for only a handful of products.
Now to to that I switched the price scope to website (Config -> Catalog -> Catalog Price Scope). But after a reindex it now takes the value filled in on the default scope and sets it as the price value for store B. (So a product that was 10 euros, converted to 8 pounds for example, is now 10 euros and 10 pounds).
My question is:
Is there a way (or custom module you know of) to get the best of both worlds?
So

Per default it converts and sets the price for Store from Euro's to British pounds.
Only if the customer wants a different price for that UK store, it can adjust it and it will use that price instead of the price based on currency rates. He can do this within a product on the correct scope.


texts:
I have a magento 1.9 installation About 100k products on a dedicated server with the below specs. I am curious if installing Nginx with Apache 2.4 will give performance gains? If so how should it be configured? I am not looking to uninstall Apache and only run Nginx in case anyone might suggest.

Server Specs/Software:
Xeon E3-1271 v3 3.60GHz
250gb SSD raid 1
24gb ram
CentOs 6 - 64Bit (v6.6)
Apache (2.4)
Percona (MySQL) (v5.6)
PHP 5.5.25 (via PHP-FPM)
Using Opcace fcgi


texts: Get the Product URL in the Custom Module Controller File

texts:
I'm using this in my controller file to get the current product URL and insert it into database.

Tried this solution, but it works partially: instead of http://formodulecheck.dev/media/catalog/product/p/r/product.jpg it's returning http://formodulecheck.dev/index.php/catalog/product/view/

$product = Mage::getModel('catalog/product')->load($id);
$productUrl = $product->getProductUrl();

Version 2 - Also tried this:

$_product = Mage::getModel('catalog/product')->load($product_id);
$product_url=Mage::helper('catalog/image')->init($product, 'thumbnail');
echo $product_url." HERE IS THE PRODUCT URL";

And getting this error:

  Fatal error: Call to a member function getData() on null in app\code\core\Mage\Catalog\Helper\Image.php on line 166

How can I fix this?
(Thanks for the help)


texts: Magento 2.1.6 Conflicting components dependencies

texts:
with a fresh install of Magento 2.1.6, I'm trying to install any compatible extension, and I always get this message below:

  Check Component Dependency
  We found conflicting component dependencies. Hide detail

  For additional assistance, see component dependency help.

with no further explanation letting me know what's the problem

everything else seems to be working fine "Cron jobs", I tried everything on the web

expanded my memory.
managed users.


texts: Error on Product page: Call to a member function getConfig() on boolean in Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery/Content.php:50

texts:
This errors prevents me from going to admin product page at all:

Fatal error: Uncaught Error: Call to a member function getConfig() on boolean in /Applications/XAMPP/xamppfiles/htdocs/libraccio/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery/Content.php:50

This is what I tried:

Overwriting the app/code/core files from a fresh Magento 1.9.2 installation
Running everything on a different server, with PHP 5, instead of PHP 7

What else can cause this error to happen?


texts: Exclude parent Category path from subcategory urls - Magento 1.13.1.0

texts:
I was using Magento 1.12.0.2 and recently upgraded to Magento 1.13.1.0.

My Site urls were www.abc.com/category/, www.abc.com/subcategory/ , www.abc.com/product.html
After upgrade the urls for products are working fine but category urls are adding . automatically before the "/" , so as per the new URL structure i remove the suffix / from the magento admin configuration and its working fine now .
I also run  the URL migration  script but i still get he sub category url with parent category url included in URL like www.abc.com/category/subcategory

I check with core_url_rewrite table where the request_path is showing correct for all subcategory URLs where as in the newer version enterprise_url_reqrite ,subcategory urls are showing the request path as categoty/subcategory.

Is there any settings or code changes that can help me to fix the subcategory URLs that include only subcategory path and not include parent category path ? I also need "/" at the end to match my current URL structure. When i add "/" as a category url suffix in admin ,Magento 1.13.1.0 add "./" as a suffix for all category urls which leads to 404 page.

Thanks


texts:
i am trying to do composer update on my magento2 installation, which is at version 2.3.4
i am getting following error
  [Composer\DependencyResolver\SolverProblemsException]
  Problem 1
      - Installation request for composer/composer @alpha -> satisfiable by composer/composer[1.10.8].
      - composer/composer 1.10.8 requires composer/semver ^1.0 -> no matching package found.
    Problem 2
      - composer/composer 1.10.8 requires composer/semver ^1.0 -> no matching package found.
      - magento/product-community-edition 2.3.4 requires composer/composer ^1.6 -> satisfiable by composer/composer[1.10.8].
      - Installation request for magento/product-community-edition 2.3.4.0 -> satisfiable by magento/product-community-edition[2.3.4].

  Potential causes:
   - A typo in the package name
   - The package is not available in a stable-enough version according to your minimum-stability setting
     see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
   - It's a private package and you forgot to add a custom repository to find it

  Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

did anybode have similar problem ?
thanks


texts: Magento 2: How can I verify native captcha in a form via an ajax call to controller only?

texts:
I have an ajax customer registration form with native captcha. I am already returning ajax based response against other field validations. Only thing left is Captcha validation.

Please tell me how can I validate this captcha remaining with in the form posted controller.


texts: How to create a checkout session from order in Magento 2

texts:
I have created an order from the backend, now I want to let the user to make the payment for that order using regular check process.

So is there any way of connecting that order to a checkout session so the user can continue with paying for the order which created from admin, without duplicating or creating a new order.

Thanks


texts: how to configure product when select radio button then show dropdown

texts:
I am facing issue. i have add products to Magento 2, but i need functions like this

create a radio button on product page. e.g Upper and Lower
When user select upper then the Upper (dropdown menu needs to be appear for size selection)
if user select Lower then the Loweer (dropdown menu needs to be appear for size selection)

thanks


texts: Removing Header and Footer from Magento popup

texts:
With the reference from my yesterday question CODE, now I am able to show the send mail to friend in a popup with the below code in test.phtml( set it via local.xml)

test.phtml

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

<a href='#' onclick="return showCompare('<?php echo $this->helper('catalog/product')->getEmailToFriendUrl($_product) ?>');" class="link-email-friend" title="<?php echo $this->__('Email to a Friend') ?>"><?php echo $this->__('Email to a Friend') ?>

<?php endif; ?>

JS code( test.phtml)

Now the pop up is shown , but with whole page layout ie Header & Footer showing up, so I want here is to REMOVE the Header & Footer,

So After a careful inspection, I found out the particular block is residing in

  frontend/base/default/layout/sendfriend.xml

So What I did here is created a local.xml file to override( Header & Footer), with the below code

<layout version="0.1.0">
    <sendfriend_product_send translate="label">
        Catalog Product Email to a Friend
        <reference name="root">
            <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
        </reference>
        <reference name="head">
            <action method="addJs"></action>
        </reference>
        <reference name="root">
            <remove name="header"/>
            <remove name="footer"/>
        </reference>
        <reference name="content">
            <block type="sendfriend/send" name="sendfriend.send" template="sendfriend/send.phtml" />
        </reference>
    </sendfriend_product_send>
</layout>

But unfortunately its not working , but when I place the same piece of code in sendfriend.xml, it works (removing Header & Footer).

I am a bit lost, as how I am gonna put things up her, I mean how to do this in a standard way ?


texts:
Is it possible to have magento in a subdomain but have the main index.php in the main domain.

So I have www.mysite.com and users come to this url when they click on a menu link eg shoes they are taken to store.mysite.com


texts: UiComponent Ui Element Ui-select Not Properly Working

texts:
i m trying to create form using ui-component.
i want to create element SELECT like Product attribute set.

This field is created in my module but the searching is not displaying like below

uiComponent Form Element Field

<field name="product_id">
            <argument name="data" xsi:type="array">
                <item name="options" xsi:type="object">Magento\Catalog\Model\Product\AttributeSet\Options</item>
                <item name="config" xsi:type="array">
                    <item name="label" xsi:type="string" translate="true">Poduct</item>
                    <item name="componentType" xsi:type="string">field</item>
                    <item name="formElement" xsi:type="string">select</item>
                    <item name="component" xsi:type="string">Magento_Ui/js/form/element/ui-select</item>
                    <item name="elementTmpl" xsi:type="string">ui/grid/filters/elements/ui-select</item>
                    <item name="dataScope" xsi:type="string">product_id</item>
                    <item name="filterOptions" xsi:type="boolean">false</item>
                    <item name="showCheckbox" xsi:type="boolean">true</item>
                    <item name="chipsEnabled" xsi:type="boolean">true</item>
                    <item name="disableLabel" xsi:type="boolean">true</item>
                    <item name="multiple" xsi:type="boolean">false</item>
                    <item name="sortOrder" xsi:type="number">20</item>
                    <item name="listens" xsi:type="array">
                        <item name="newOption" xsi:type="string">toggleOptionSelected</item>
                    </item>
                    <item name="required" xsi:type="boolean">true</item>
                    <item name="source" xsi:type="string">conditions</item>
                    <item name="validation" xsi:type="array">
                        <item name="required-entry" xsi:type="boolean">true</item>
                    </item>
                </item>
            </argument>
        </field>

Did I forgot to add Some js liabrary In  ?


texts: How Mage::throwException($error) working in below code?

texts:
In magento 1.9.1
In class "Mage_Shipping_Model_Resource_Carrier_Tablerate"

consider below function uploadAndImport.
My question is : Mage::throwException($error) rollback transaction if there is error. But how? It is outside of try block? If we comment out code //Mage::throwException($error); then it will insert correct row data. And if we uncomment out then it will not insert any data ? how?

 public function uploadAndImport(Varien_Object $object)
{
    if (empty($_FILES['groups']['tmp_name']['tablerate']['fields']['import']['value'])) {
        return $this;
    }

    $csvFile = $_FILES['groups']['tmp_name']['tablerate']['fields']['import']['value'];
    $website = Mage::app()->getWebsite($object->getScopeId());

    $this->_importWebsiteId     = (int)$website->getId();
    $this->_importUniqueHash    = array();
    $this->_importErrors        = array();
    $this->_importedRows        = 0;

    $io     = new Varien_Io_File();
    $info   = pathinfo($csvFile);
    $io->open(array('path' => $info['dirname']));
    $io->streamOpen($info['basename'], 'r');

    // check and skip headers
    $headers = $io->streamReadCsv();
    if ($headers === false || count($headers) < 5) {
        $io->streamClose();
        Mage::throwException(Mage::helper('shipping')->__('Invalid Table Rates File Format'));
    }

    if ($object->getData('groups/tablerate/fields/condition_name/inherit') == '1') {
        $conditionName = (string)Mage::getConfig()->getNode('default/carriers/tablerate/condition_name');
    } else {
        $conditionName = $object->getData('groups/tablerate/fields/condition_name/value');
    }
    $this->_importConditionName = $conditionName;

    $adapter = $this->_getWriteAdapter();
    $adapter->beginTransaction();

    try {
        $rowNumber  = 1;
        $importData = array();

        $this->_loadDirectoryCountries();
        $this->_loadDirectoryRegions();

        // delete old data by website and condition name
        $condition = array(
            'website_id = ?'     => $this->_importWebsiteId,
            'condition_name = ?' => $this->_importConditionName
        );
        $adapter->delete($this->getMainTable(), $condition);

        while (false !== ($csvLine = $io->streamReadCsv())) {
            $rowNumber ++;

            if (empty($csvLine)) {
                continue;
            }

            $row = $this->_getImportRow($csvLine, $rowNumber);
            if ($row !== false) {
                $importData[] = $row;
            }

            if (count($importData) == 5000) {
                $this->_saveImportData($importData);
                $importData = array();
            }
        }
        $this->_saveImportData($importData);
        $io->streamClose();
    } catch (Mage_Core_Exception $e) {
        $adapter->rollback();
        $io->streamClose();
        Mage::throwException($e->getMessage());
    } catch (Exception $e) {
        $adapter->rollback();
        $io->streamClose();
        Mage::logException($e);
        Mage::throwException(Mage::helper('shipping')->__('An error occurred while import table rates.'));
    }

    $adapter->commit();

    if ($this->_importErrors) {
        $error = Mage::helper('shipping')->__('File has not been imported. See the following list of errors: %s', implode(" \n", $this->_importErrors));
        Mage::throwException($error);
    }

    return $this;
}


texts: Custom Email templates breaks some times

texts:
I have created a 'new order' email template. As well as I have updated the files in the following folder by moving them into the my custom theme.

  vendor/magento/module-sales/view/frontend/templates/email

When I placed an order Sometimes it is showing 'html' tags on the email body. (See the attached images).
If I resend the same email again from the admin backend I am getting the correct content. I can't figure out why this is happening. Any help highly appreciated.

I am using Mangeto 2.3.0 CE


texts:
$result->setMessage(
                sprintf(
                    $this->helper->getCartMessage(),
                    $this->stockStatus->getStockItem()->getProductName(),
                    $this->backordersQty * 1
                )
            );

I want to unset/remove this notice message from the cart. How can I do that?


texts: where to find the source code to edit title?

texts: where to edit and the find the source code of this.As magento codes are difficult to understand.


texts:
Class 'Mage_Amber_Localdev_Helper_Data' not found in /var/www/localdev.site/robert/bsr/app/Mage.php on line 547

is there 100% but won't find it.

            $this->addColumn('image', array(
            'header'  => Mage::helper('amber_localdev')->__('Image'),
            'width'   => '80px',
            'nullable'=> true,
            'index'   => 'image',
            'sortable'=> false,
            'renderer' => 'Amber_Localdev_Block_Adminhtml_Image_Grid_Renderer_Thumbnail'
        ));

Class rendering image

class Amber_Localdev_Block_Adminhtml_Image_Grid_Renderer_Thumbnail extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
{
    public function render(Varien_Object $row)
    {

        $val = Mage::helper('eav/entity_attribute_option')->init($row['option_id']);
        $out = "Name";
        $out = "Name".$val;
        $out .= "<img src=". $val ." width='50px'/>";
        return $out;
    }
}

My Config:

  <global>
<helpers>
  <localdev>
    <class>Amber_Localdev_Helper</class>
  </localdev>
</helpers>

...

My Helper: (empty, just a class name)

class Amber_Localdev_Helper_Data extends Mage_Core_Helper_Abstract{}


texts: createBlock() and setChild() in magento 2

texts:
createBlock() and setChild()

difference in magento2


texts: Cart page showing HTTP 500 Error and Not working

texts: I am using porto theme in magento 1.9.4.When user add products to cart then items added in cart but when user click to view cart or continue for checkout than gets 500 error. Any body know what might be the issue? Urgent Help needed! How to remove Http 500 error. Is it permission issue? Kindly Help


texts:
I have create a module and its working fine when compilation is disabled. Its getting below error when after compilation run.

  PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Magento\Customer\Model\Customer::__construct() must be an instance of Magento\Framework\Model\Context, instance of Magento\Framework\ObjectManager\ObjectManager given,

<?php

namespace Supravat\Customer\Helper;

class Customer extends \Magento\Framework\App\Helper\AbstractHelper
{
    protected $customerRepositoryInterface;

    public function __construct(
        \Magento\Framework\App\Helper\Context $context,
        \Magento\Customer\Api\CustomerRepositoryInterface $customerRepositoryInterface
    )
    {
        ...........
        parent::__construct($context);
        $this->customerRepositoryInterface = $customerRepositoryInterface;
    }

    public function getCustomerById() {
        $customer_id  = 1; // 1 is the magento customer id
        $customer = $this->customerRepositoryInterface->getById($customer_id);
        var_dump($customer->getData());
    }
}

Note: Compilation is generates code and dependency injection configuration successfully.


texts:
I want to show two Add To Cart button in view.phtml page. those buttons are following,

Add To Cart
Insta Buy

Add To Cart button working with normal functionality, It works fine.

But When user click Insta Buy directly redirect to checkout/onepage. I tried some code but it goes to checkout/cart page. That code is following

<button type="button" title="<?php echo $this->__('Insta Buy') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><?php echo $this->__('Insta Buy') ?></button>

  I want to redirect to checkout/onepage page. How can i do this.


texts: Shipping & Payment based on Customer Groups in magento 2

texts:
Is there a way so that we can restrict payment and shipping for various customer group in magento 2.3.5.
if anyone have tried this and can provide some guidance on how to approach this will be great.
Thanks in Advance!


texts: How to add products in cart and wishlist with external code outside Magento

texts:
How can I add products with PHP to the customer's cart. Having customer's id and login details.

The login is successful. Just need to update the cart with the products, quantity and prices that user can also check from the magento site also.


texts: Magento 2: Billing Address showing error in default checkout

texts:
In checkout page,while updating the billing address gives the strange error

Steps to reproduce this error:
Select the address from the address drop down and click on update button,it hides the address with same error but when we click on the other payment method it shows this error again

How to fix this ?
Magento version using 2.3.4 and PHP Version 7.3.18


texts: How to create api with magento step by step

texts:
I want to create SOAP API for mobile app

Product
Product List
Category List
Customer

I'm new to API and found many results none of extension works for me.

I have created Webservices user and role but don't how to use it.

Also suggest me urlhow to fetch data.
Thanks in advance


texts: Duplicate Predispatch event. What throwexception to use?

texts:
I've successfully created a Predispatch event to test some logic before you 'duplicate' a product in Magento.
However, I'm trying to stop the event, but continue on the same screen so the event could be fixed.

What I get right now is a white screen with the triggered messages.

Here is my testing code that works.

$productId = Mage::app()->getRequest()->getParam('id');$product = Mage::getModel('catalog/product')->load($productId);
$name = $product->getName();
if($name == 1)
{

Mage::throwException(Mage::helper('adminhtml')->__('Duplication Validation Testing Error Message'));
}

This throwException works on prevalidation before save, but not here. I have also tried, but it still fires the 'duplicate event' and then displays the error. I need a throwException like the pre validation of product save.

Mage::getSingleton('adminhtml/session')->addError(Mage::helper('catalog')->__('Test'));


texts: Credit Memo Missing in Invoice Magento 2.2.7

texts:
I'm using Magento community version 2.2.7 for a multi-store website and for a completed credit card order with a paid invoice when I open the invoice to do an online refund the credit memo button is missing.

Questions we have about this issue:

We were told Magneto 2 community versions do not have online credit memos, is that true?
Our payment processor on our new websites is APS Payments and our APS account is currently set to test mode in the APS portal. Would having our APS account in test mode cause the credit memo button in the invoice to not show?
How can this be fixed so we can issue online refunds/credit memos??


texts:
I am trying to get some code onto the success page for a Magento store. I know that it needs to be done through a custom module but I can't even seem to get a base module to register though. I have been through countless tutorials that all explain the same thing and stating that it is extremely easy but it does not seem to be so. I have tried inside app/code (note this folder didn't even exist, I had to create it), I have also tried in Vendor. I created a base module with the two required files:
VendorName/MyModule/registration.php:
<?php \Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE, 'VendorName_MyModule',
__DIR__
);

VendorName/MyModule/etc/module.xml:
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="VendorName_MyModule" setup_version="0.0.1">
</config>

Then ran these commands:
php bin/magento module:enable VendorName_MyModule
php bin/magento setup:upgrade
I was then told that I can run this command to verify it worked:
grep VendorName app/etc/config.php
but this is not returning anything indicating it is not working.
Any assistance on this would be appreciated. It is mind boggling how difficult this is, when all I am trying to do is add a few lines of code to one page.


texts: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento.eav_attribute' doesn't exist, query was: DESCRIBE `eav_attribute`

texts:
he migrado mi pag web magento de un servidor a otro, el problema surgio al momento de conectar la base de datos y me salta ese error.

Error in file:

  "C:\xampp\htdocs\fabri\app\code\core\Mage\Catalog\sql\catalog_setup\upgrade-1.6.0.0.19.1.2-1.6.0.0.19.1.3.php"
  - SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento.eav_attribute' doesn't exist, query was: DESCRIBE
  eav_attribute

Trace:

  0 C:\xampp\htdocs\fabri\app\code\core\Mage\Core\Model\Resource\Setup.php(644):
  Mage::exception('Mage_Core', 'Error in file: ...')

  1 C:\xampp\htdocs\fabri\app\code\core\Mage\Core\Model\Resource\Setup.php(437):
  Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade',
  '1.6.0.0.19.1.2', '1.6.0.0.19.1.5')

  2 C:\xampp\htdocs\fabri\app\code\core\Mage\Core\Model\Resource\Setup.php(320):
  Mage_Core_Model_Resource_Setup->_upgradeResourceDb('1.6.0.0.19.1.2',
  '1.6.0.0.19.1.5')

  3 C:\xampp\htdocs\fabri\app\code\core\Mage\Core\Model\Resource\Setup.php(235):
  Mage_Core_Model_Resource_Setup->applyUpdates()

  4 C:\xampp\htdocs\fabri\app\code\core\Mage\Core\Model\App.php(428): Mage_Core_Model_Resource_Setup::applyAllUpdates()

  5 C:\xampp\htdocs\fabri\app\code\core\Mage\Core\Model\App.php(354): Mage_Core_Model_App->_initModules()

  6 C:\xampp\htdocs\fabri\app\Mage.php(683): Mage_Core_Model_App->run(Array)

  7 C:\xampp\htdocs\fabri\index.php(83): Mage::run('', 'store')

  8 {main}


texts:
I would like to use the advanced search on my home page,  it works fine if I click the advanced search link in the footer at the bottom. But if I add

{{block class="Magento\CatalogSearch\Block\Advanced\Form" template="Magento_CatalogSearch::advanced/form.phtml"}}

to my home page, the search results are all 404?


texts:
Bit of a Magento newb, I am working on version 1.9.1.1

I know the question has been asked before, I have tried all of which I can find, but none of them see to work for me.

I just want to remove the Estimate Shipping and Tax Form so it just displays the various shipping rates on the Cart page.

Been pulling my hair out with this for 2 days :(

Thanks for any help in advance.


texts: Fatal error: Call to undefined function simplexml_load_string() in magento 1.7.0.2

texts:
Fatal error: Call to undefined function simplexml_load_string() in Magento 1.7.0.2  this error occurs when I am trying to set the site on the test server with PHP 5.6.

  error "Fatal error: Call to undefined function simplexml_load_string()
  /home/myforeig/public_html/lib/Varien/Simplexml/Config.php on line
  510"

I have check phpinfo  SimpleXML and XML extensions are enabled.


texts: How to get order Id in class Mage_Adminhtml_Block_Sales_Order_Create_Shipping_Method_Form?

texts:
How to get order Id in class Mage_Adminhtml_Block_Sales_Order_Create_Shipping_Method_Form ?

I tried out many ways such as, $this->getQuote->getId();, $this->getOrder->getId(); etc etc... But no Use. I am new in magento and extremely new to Its zend based module structure.

Any help will be appreciated.


texts: What is equivalent to local folder(magento1) in magento2 to override third party template file

texts: The file path is /app/code/Third partsparty/itsMoDULE/view/frontend/templates/product/list.phtml and I want to override this. I created the same file in app/design/frontend/MyTheme/theme/Magento_Catalog/templates/product/ but still reads from third party?


texts: Problem with checkbox uicomponent, has value doesnt 'check'

texts:
I'm having a trouble with UIComponent. Being precise it's a checkbox.

I'm sure it takes true as a value, but it doesn't appear as a checked one.

So it's propably something wrong with my structure.

'is_active' => [
                'arguments' => [
                    'data' => [
                        'config' => [
                            'label' => __('Active'),
                            'dataType' => 'boolean',
                            'formElement' => 'checkbox',
                            'componentType' => 'field',
                            'sortOrder' => 10,
                            'dataScope' => 'is_active',
                            'prefer' => 'toggle',
                            'valueMap' => [
                                'false' => 0,
                                'true' => 1
                            ],
                            'visible' => 1,
                        ]
                    ]
                ]
            ],


texts: Rewrite another module block issue in Magento1

texts:
This is my XML from my module X:

<global>
        <blocks>
.......
            <namespaceY_moduleY>
                <rewrite>
                    <subscription_grid>NamespaceX_ModuleX_Block_Adminhtml_Subscription_Grid</subscription_grid>
                </rewrite>
            </namespaceY_moduleY>
        </blocks>
...

In my module X I want to rewrite a block from module Y . What am i doing wrong? I put a syntax error in my NamespaceX_ModuleX_Block_Adminhtml_Subscription_Grid and i don't get it. This is my block from module X:

class NamespaceX_ModuleX_Block_Adminhtml_Subscription_Grid extends NamespaceY_ModuleY_Block_Adminhtml_Subscription_Grid
{
asdasdsa
}


texts: Magento2 : Not showing Meta title & description on category page

texts:
I'm getting issue with website meta info. If I will set the default meta info then it will display the same info tag for all the pages.
But when I'm trying to set the meta info for particular page then it will not display the Meta title & description.
I have set the Meta description & title for one category. In this case the Meta description & title tag showing for the same category page.
Solution I applied to display the both the tags for category pages:
I have created one observer & set the description for the current category. But when I tried to set the title then I got below error.

Recoverable Error: Object of class Magento\Framework\View\Page\Title
could not be converted to string in
/var/www/html/htdocs/vendor/magento/framework/View/Page/Config/Renderer.php
on line 125

I used below code to set the meta title & description.

$this->_pageConfig->setMetadata('title', 'some meta title');
$this->_pageConfig->setDescription($desc);
$this->_pageConfig->setKeywords($keyWrds);

Thanks for any help.


texts: Magento 2 - remove block if page layout is XY

texts:
I need to remove a block named "header_top_content" by using a layout xml file, but only on CMS sites with page layout set to "empty".
Is this possible via layout or not?
I tried it like this:
THEME\Magento_Cms\layout\cms_page_view.xml
<?xml version="1.0" ?>
<page layout="empty"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="header_top_content" remove="true"/>
    </body>
</page>

but it removes the block on ALL cms pages.


texts:
Hi I am trying to get ratings for each review. I am able to get the reviews for each product.
This is my review variable $_review but when I tried to get rating it doesn't work. The below code should work, but it returns Error filtering template: Warning: count(): Parameter must be an array or an object that implements Countable
<?php if (count($_review->getRatingVotes())) : ?>
Am I missing something here?


texts: Magento has become incredibly slow, timing out, errors, cpu abuse

texts:
I have been using Magento for around a month and it was never this troubled. I recently reinstalled it and put on a theme i bought, EM Gamewin. In order for this theme to work I needed to use the sample.htaccess file. My htaccess now has some 219 lines in the file. That got the theme going, but along with it caused massive issues.

I often lockup/timeout, and one error came up with a code error to do with zend caching (which i dont have any Mage Caching activated).
Fatal error: Maximum execution time of 30 seconds exceeded in /home/saltante/public_html/pcstore/lib/Zend/Cache/Backend/File.php on line 747

This issue has been causing my CPU (50% of a cpu) to max at 100% and results in my account being limited.

I also have issues of page timeouts when saving, yet the changes ARE saved.

I am wondering if anyone has had similar issues or knows if there are some htaccess lines that could be causing this.

Also Should i be using Magento caching as well as Cloudflare, I could not get fooman speedster working it produced errors so i ignored Mage caching.

Any answers on what may cause this would be greatly appreciated


texts: How can I import multiple select attributes in Magento 2.3.5?

texts:
I'm working with a new installation of 2.3.5.
I am unable to import a multi-select product attribute.
My attribute I'm trying to import is "Year" for auto parts.
I have tried importing with the column header "year", which is the attribute code. I have also tried importing with the column header "additional_attributes" with value "Year=1967|1968". Neither of these work.
When I manually set the "year" attribute on a product and export that product, it is exported via "additional_attributes" with value "Year=1967|1968".
I've tried importing exactly what is exported, but that doesn't work either. It doesn't give me any errors when importing, it just doesn't change any value on the product.
I've tried using a semicolon, a comma, etc. as field separator. I have "Fields enclosure" unchecked as well.
All attribute values I'm importing already exist within the "Year" attribute.
Any help would be greatly appreciated.
Thanks.


texts: Magento login custumer and add product to cart in chrome

texts:
After installation of magento 2.1.4, everything works very well on other browsers, except Chrome.

When a client registers, it is automatically connected but when it disconnects and tries to reconnect, nothing happens (redirection to the login page). I tried to lengthen the lifetime of cookies no change.
On the product display page when it clicks on Add to cart, an add notification is displayed but the product is not added to the cart.

I point out that everything walks nikel on other browsers.


texts: Checkout loader overlay not disappearing after page load completion

texts:
We've recently upgraded a magento 2 site to 2.1.2 and since doing so the /checkout/ page has a strange issue. Once the page has completely loaded the loader gif does not disappear - it just stays spinning on the page.

How would I go about fixing this issue?


texts:
I have to deal with a third party module that enthusiastically uses preferences for everything and breaks stuff with it.
For example:
<preference for="Magento\Sales\Model\Order" type="Censored\Censored\Model\Order"/>

To reduce the damage, I need to undo some of the preferences. Unfortunately they don't set the preferences for interfaces, but for concrete classes.
I've tried, in an own module:
<preference for="Magento\Sales\Model\Order" type="Magento\Sales\Model\Order"/>

But this results in an "Circular type preference" error. The Magento object manager will try to resolve the type again, find the preference, and so on.
What I actually need is a way to remove that original preference entry, without touching the files of the third party module.
Is this possible somehow?


texts: Magento 2 Show Text with Shipping Option

texts:
I have created a shipping option and wanted text to show if that option was selected. Right now it displays when the shipping method is selected but below all of the shipping options.  I want it to display with the method (not below all of them) if that method is selected.

frontend/layout/checkout_index_index.xml

<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="shippingAdditional" xsi:type="array">
                <item name="component" xsi:type="string">uiComponent</item>
                <item name="displayArea" xsi:type="string">shippingAdditional</item>
                <item name="children" xsi:type="array">
                    <item name="shipping-info-wrapper" xsi:type="array">
                        <item name="component" xsi:type="string">My_Module/js/view/customjs</item>
                        <item name="provider" xsi:type="string">checkoutProvider</item>
                        <item name="sortOrder" xsi:type="string">0</item>
                    </item>
                </item>
            </item>
        </item>
    </item>
</item>

js/view/customjs

define([
    'uiComponent',
    'ko',
    'Magento_Checkout/js/model/quote'

], function (Component, ko, quote) {
    'use strict';

    return Component.extend({
        defaults: {
            template: 'Matt6_PickUp/shipping-address/shipping-method-item'
        },

        initObservable: function () {
            var self = this._super();
            this.showFreeShippingInfo = ko.computed(function() {
                var method = quote.shippingMethod();

                if(method && method['carrier_code'] !== undefined) {
                    if(method['carrier_code'] === 'freeshipping') {
                        return true;
                    }
                }

                return false;

            }, this);

            this.showPickUpShippingInfo = ko.computed(function() {
                var method = quote.shippingMethod();

                if(method && method['carrier_code'] !== undefined) {
                    if(method['carrier_code'] === 'instorepickup') {
                        return true;
                    }
                }

                return false;

            }, this);

            return this;
        }
    });
});

web/template/customtemp.html

How can I show the info with the option when it is selected?

Thanks!


texts:
I am considering upgrading my current account with my Magento host, but I need some advice about the importance of RAM, or SSD for magento.

My current setup is 2GB RAM / 2 CPUs / 50 Processes, with SSD
But for the same price I can get 4GB RAM / 2 CPUs / 50 Processes with
regular RAID 1 HDD

Before I decided to go with SSD as I read that since magento DB accesses lots of things that its best to go SSD route, but I just wanted to know if anyone has some comments about this?

Thanks


texts: How to i can remove coupon code and Flat rate from checkout in Magento 2.3?

texts:
In Magento2 - I want to Remove / Disabled Flat rate and Discount from cart and Checkout page ?

How to i can do this ?

Please check below screenshot.

Thanks


texts: Magento 2 Custom module only for a specific storeview?

texts: I have a Magento 2.2.2 website with different storeviews. I have made som custom modules. Is that possible to have my custom modules only work for a specific storeview?


texts: Magento 2: How many tables required to change Order Status Programmatically?

texts:
Would like to change order status throgh Magento 2 MySQL Query

But Order Status belongs to so many tables like

sales_order
sales_order_grid

Need to use sales_order_aggregated_created & sales_order_aggregated_updated?

In sales_order_status_state what's difference between Status & State?

Example: Status is fraud, but Stat is payment_review.

Can use below method to update order status

$update = $collection->update('sales_order', [
                    'status' => 'complete',
                ], ["entiry_id = ?" => 1]
        );

In how many tables I have to change status? Will don't have like update in 1 table & changes will be applied in respective relational tables.

How to update multiple tables at same time

Example

$update = $collection->update('sales_order','sales_order_grid'


texts: How can I hide the errors session messages of my module?

texts:
In Magento 2, it shows an error which is really annoying for customers. How can we hide or remove showing those errors in the page?

Currently, the application is in the production mode. But still, the following error is shown.


texts:
I created an API endpoint to use for shipping rate estimates.

However it only works for flat rates, neither free shipping, nor table rates show up.

I've added a product to the cart, and using the same country and zipcode, all rates show correctly.

My endpoint:

 public function getShippingEstimateCEP($sku, $qty, $cep)
    {
        $product = $this->productRepository->get($sku);
        $out = 'api GET: $sku ' . $sku . $cep;
        if($product->isSaleable())  {
            $store=$this->storeManager->getStore();
            $quote = $this->quoteFactory->create();
            $quote->setStoreId($this->getStoreId());
            $quote->setWebsiteId($this->getWebsiteId());
            $quote->setStore($store);

            $quote->getShippingAddress()->setCountryId('BR');
            $quote->getShippingAddress()->setPostcode($cep);
            $quote->setIsMultiShipping(false);

            $quote->addProduct($product);
            $quote->collectTotals();
            $quote->getShippingAddress()->setCollectShippingRates(true);
            $quote->getShippingAddress()->collectShippingRates();
            $rates = $quote->getShippingAddress()->getShippingRatesCollection();

            foreach ($rates as $rate)
            {
                $out .= '[' . $rate->getPrice() . '||'.  $rate->getMethod() . '||'. $rate->getMethodTitle() . ']';
            }
        }

        return $out ;
    }


texts:
In another questions of mine, I was able to import multiple products, and change the language of them, based on the store and url_key settings like this:

sku;store;name;url_key;
test#001;english;car;car-key
test#001;german;auto;auto-key

and this allows me in Magmi to import 100s of products, which can be shown in native language when using the language switcher menu etc. Great.

However - I cannot manage the categories in the same way. If I do this:

sku;store;name;url_key;categories
test#001;english;car;car-key;english-cat-name
test#001;german;auto;auto-key;german-cat-name

.. using on-the-fly-categories, the categories themselves are visible from both the english and german views.

How can I manage this in Magmi - with 100s of categories, I don't want to have to adjust them by hand. I am hoping there's a way to automate this somehow?

Thanks.


texts:
I am getting below error on clicking on checkout button:

  Fatal error: Class 'SoapClient' not found in
  /home/insighw6/public_html/includes/src/Mage_Usa_Model_Shipping_Carrier_Fedex.php
  on line 134

Please help to fix.


texts: Automatically show in stock at top of listing, out of stock and no image products at bottom

texts:
In Magento 2.3.3. I want to show automatically in stock products at the top of product listing while out of stock products and products with no image should be at the bottom of product listing.
I have this code in app\code\MyApp\StockQuantity\observer\stocklast.php that currently only sorts by in stock/out of stock. Can it be amended to also put those products without images last?
<?php
namespace MyApp\StockQuantity\Observer;
use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\App\Config\ScopeConfigInterface;
use Magento\Store\Model\StoreManagerInterface;
use Magento\Framework\Event\Observer;
use Magento\Catalog\Block\Product\ProductList\Toolbar as CoreToolbar;
class StockLast implements ObserverInterface
{
   protected $scopeConfig;
   protected $_storeManager;
   protected $coreToolbar;
   public function __construct(
       ScopeConfigInterface $scopeConfig,
       StoreManagerInterface $storeManager,
       CoreToolbar $toolbar
   )
   {
       $this->scopeConfig = $scopeConfig;
       $this->_storeManager = $storeManager;
       $this->coreToolbar = $toolbar;
   }
   public function execute(Observer $observer)
   {
       $collection = $observer->getEvent()->getData('collection');
       try {
           $websiteId = 0;
           $stockId = 'stock_id';
           $collection->getSelect()->joinLeft(
               array('_inv' => $collection->getResource()->getTable('cataloginventory_stock_status')),
               "_inv.product_id = e.entity_id and _inv.website_id=$websiteId",
               array('stock_status')
           );
           $collection->addExpressionAttributeToSelect('in_stock', 'IFNULL(_inv.stock_status,0)', array());
           $collection->getSelect()->reset('order');
           $collection->getSelect()->order('in_stock DESC');
           //code for Filter Price Low to High or High to Low with stock filter.
           if ($this->coreToolbar->getCurrentOrder() == 'price') {
               $direction = $this->coreToolbar->getCurrentDirection();
               $collection->getSelect()->order("min_price $direction");
           }
       } catch (\Exception $e) {
       }
       return $this;
   }
}


texts: Find free extension for tracking order magento 2

texts:
Can you please help me find a free extension like this one :

https://www.mconnectmedia.com/track-order-magento-2.html

or other extensions free for tracking orders.


texts: Magento EE order comments not being saved when using Paypal

texts:
We are using Magento EE v 1.14.0.1 and we have a One Page checout plugin that aside from enabling us to have our checkout all on one page. It also has a order comments box.

Our issue is if the customer pays via Credit card (we use Authorize.net for this) the order comments are saved. However if the customer chooses to pay via Paypal then the system does not seem to save the order comments content?

Anyway suggestions what might be the issue or what file would need to be edited to get this to work?
I am using a one page checkout plugin
https://www.iwdagency.com/extensions/magento-one-step-checkout-module.html


texts:
In the account dashboard inside the placed orders (http://www.domain.com/sales/order/view/order_id/), we want to echo the tracking URL from the transactional order email.

The default tracking popup contains the wrong tracking URL and we do not want to use the popup.

We just want to echo the correct tracking URL.
Off course only when the order is shipped and really got a tracking URL.

How can we achieve that?


texts: Insert block before footer in single page cms

texts:
I need to insert a block before the footer in single page cms (magento 1.9).

I tried to do it by using layout.

I have added below code in my layout file :

<reference name="footer">
    <block type="cms/block" name="latte_asina_footer" before="-" >
           <action method="setBlockId"><block_id>latte-asina-footer</block_id></action>
    </block>
</reference>

but it is not working.

can you help me?


texts: Custom Product Attribute not applying in Promo Rules

texts:
I have a custom attribute set for my products named "item_category". I have set  Use for Promo Rule Conditions to yes for the attribute, and it is displayed in the catalog rule as well.

But the problem is, Even if I set a condition with the value(For ex.item_category is ABCD) and there is/are products with the attribute value(i.e. products whose item_category attribute value is "ABCD"), The rule does not get applied.

I have tried with built-in attribute category, If I set it to some existing category id. The rule gets triggered, but not with custom product attributes.

Edit1

I have googled for two days now, but no results. This is a feature supported by Magento itself, as I understand. Is it some kind of bug?

any help would be much appreciated.

If this helps:

I found the below lines for condition in the catalogrule table

1) This condition works for adding discount for all the products of category 232

'a:7:{s:4:"type";s:34:"catalogrule/rule_condition_combine";s:9:"attribute";N;s:8:"operator";N;s:5:"value";s:1:"1";s:18:"is_value_processed";N;s:10:"aggregator";s:3:"all";s:10:"conditions";a:1:{i:0;a:5:{s:4:"type";s:34:"catalogrule/rule_condition_product";s:9:"attribute";s:12:"category_ids";s:8:"operator";s:2:"==";s:5:"value";s:3:"232";s:18:"is_value_processed";b:0;}}}'

2) This condition is where I am trying to set the discount for products which have their attribute item_category custom value to MMRJ3

'a:7:{s:4:"type";s:34:"catalogrule/rule_condition_combine";s:9:"attribute";N;s:8:"operator";N;s:5:"value";s:1:"1";s:18:"is_value_processed";N;s:10:"aggregator";s:3:"all";s:10:"conditions";a:1:{i:0;a:5:{s:4:"type";s:34:"catalogrule/rule_condition_product";s:9:"attribute";s:12:"category_ids";s:8:"operator";s:2:"==";s:5:"value";s:3:"232";s:18:"is_value_processed";b:0;}}}'

Need some help guys!


texts: Images returning as placeholders - custom product collection

texts:
Im working on a module similar to the Magento2 swatch module. I have a custom collection of product and i'm trying to get an image from each product - however it always returns placeholder images.

Here is my block class :

    <?php

namespace Namespace\AlternativeColours\Block;

use Magento\Catalog\Block\Product\AbstractProduct as ProductAbstract;
use Namespace\AlternativeColours\Model\ResourceModel\AlternativeColours as AlternateResource;
use Magento\Framework\Event\ManagerInterface;
use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory as ProductCollection;
use Magento\Catalog\Helper\Image as ImageHelper;

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

    /**
     * @var \Magento\Framework\Event\ManagerInterface
     */
    protected $eventManager;
    protected $productAbastract;
    protected $productCollectionFactory;
    protected $imageHelper;

    /**
     * @var \Namespace\AlternativeColours\Model\ResourceModel\AlternativeColours $alternativeColoursResource
     */

    protected $alternativeColoursResource;

    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        AlternateResource $alternativeColoursResource,
        ManagerInterface $eventManager,
        ProductAbstract $productAbstract,
        ProductCollection $productCollectionFactory,
        ImageHelper $imageHelper,
        array $data = []
    ) {
        $this->alternativeColoursResource = $alternativeColoursResource;
        $this->eventManager               = $eventManager;
        $this->productAbastract           = $productAbstract;
        $this->productCollection          = $productCollectionFactory;
        $this->imageHelper                = $imageHelper;
        parent::__construct($context, $data);

    }

    public function getAlternativeProducts() {

        $productId = $this->productAbastract->getProduct()->getId();

        $productIds = $this->alternativeColoursResource->getAlternativeProducts($productId);

        $collection = $this->productCollection->create();

        $collection->addStoreFilter()
            ->addAttributeToSelect('swatch_image')
            ->addAttributeToSelect('url_key')
            ->addAttributeToSelect('small_image')
            ->addAttributeToFilter('entity_id',array('in' => $productIds));

        return $collection;

    }

    public function getImageHelper() {
        return $this->imageHelper;
    }
}

I have a custom image type but for now i'm just using small_image so it's just wont problem at a time. Here is my template file :

<?php
/*
 * @var \Namespace\AlternativeColours\Block\AlternativeColours $block
 * @var $product \Magento\Catalog\Model\Product $product
 */
?>

<?php
    $_imageHelper = $block->getImageHelper();
    $_alternativeProducts = $block->getAlternativeProducts();
?>

<?php foreach($_alternativeProducts as $product) : ?>
    <?php $productImage = $_imageHelper->init($product, 'product_page_image_small')->getUrl(); ?>
    <a href="<?php echo $product->getUrlKey(); ?>" alt="<?php echo $product->getName();?>" title="<?php echo $product->getName();?>">
        <img src="<?php echo $productImage; ?>" />

<?php endforeach; ?>

The template file is added to the catalog_product_view page :

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

        <referenceContainer name="product.info.main">
            <block class="Namespace\AlternativeColours\Block\AlternativeColours" as="alternative.colours" template="Namespace_AlternativeColours::alternative_colours.phtml"/>
        </referenceContainer>

</page>

Does anyone out there know what's going on. Baring in mind that all other images on the product page work fine!


texts: how can I empty magento 2 orders, customer and products data reset to 1

texts:
how can I empty Magento 2

  order

  customers

  products data to reset 1

  how I can do this??

when i run in sql

MySQL said: Documentation #1146 - Table 'magento_db.gift_message' doesn't exist

but the table is there in the database


texts: Prepaid order creation from magento 2 backend

texts:
I added a custom payment option for Magento 2 admin. When using the payment option checkout from admin the order total showing as the total due.

How to make it as total paid instead of Total Due when i am using my custom payment option placing an order from admin

config.xml

<default>
        <payment>
            <adminpaymentmethod>
                <active>1</active>
                <title>Pay Online</title>
                <order_status>processing</order_status>
                <allowspecific>0</allowspecific>
                <preselect>1</preselect>
                <model>Vendor\AdminPaymentMethod\Model\AdminPaymentMethod</model>
            </adminpaymentmethod>
        </payment>
    </default>


texts:
I try to load url image to be display in slider.

I use this function :

Mage::helper('catalog/image')
            ->init($product, 'small_image', $file)
            ->resize($w, $h);

It works partially, on some products, no problem but for some others the website crash.
I mean after this line no more html code are generated. There is no error on nginx, php, exception.log or system.log.

So I try to do :

Mage::helper('catalog/image')
            ->init($product, 'WTFiswrong', $file)
            ->resize($w, $h);

Here I have errors everywhere (It's normal because it's true) : "Fichier image introuvable." (translate : image not found)

So what's happen in the first case ?

UPDATE :

<?php

define('MAGENTO_ROOT', getcwd());
$mageFilename = MAGENTO_ROOT . '/app/Mage.php';
require_once $mageFilename;

Mage::app();

$id = 397;

$x = 200;

$y = 100;
$product = Mage::getModel('catalog/product')->load($id);

echo Mage::helper('catalog/image')->init($product, 'small_image')->resize($x, $y);

exit (0);

?>

This display nothing, return 500 error code with no error in error log.

UPDATE 2 :

It seems to be a memory issue, problem solved.


texts: How to get order item details in magento 2.x email template

texts:
I have inserted a custom block into my email confirmation template, however some code I would have used in Magento 1.x does not return any order information and instead returns errors.
How can I return the product url, image url, product name and sku please in Magento 2.x inside the email template phtml?
Thank you
The lines of code that I'm having problems with are:
<?php $_item = Mage::getModel('catalog/product')->load($_ship->getProductId()); ?>
<?php $productsData .= ($i == 0) ? "{" : ",{" ?>
<?php $productsData .= '"productUrl": "'.Mage::getBaseUrl().$_item->getData('url_key').'.html",'; ?>
<?php $productsData .= '"imageUrl": "'.$_item->getImageUrl().'",'; ?>
<?php $productsData .= '"name": "'.$_item->getName().'",'; ?>
<?php $productsData .= '"sku": "'.$_item->getSku().'",'; ?>
<?php $productsData .= '}'; $i++;?> <?php endforeach; ?>


texts: Cannot upload Fixed Product Taxes with CSV file

texts:
I'm struggling to upload fixed product taxes on Magento 2.3.5.
I followed the following link: https://firebearstudio.com/blog/how-to-add-and-import-magento-2-fixed-product-tax.html
I have created a fpt attribute

But the upload file does not seem to work.
When I upload it, no FPT is set on my products.
Please note that I'm in a multi-website context
Here is an snippet of my file
sku;product_type;wee_tax_variations
64605;simple;name=fpt,country=IT,state=*,website=pr_italy_website,value=3.526666667
62629;simple;name=fpt,country=IT,state=*,website=pr_italy_website,value=4.188333333
62809;simple;name=fpt,country=IT,state=*,website=pr_italy_website,value=4.188333333

Thanks


texts: Magento CE paypal website payments pro hosted solution

texts:
I have setup a sandbox Website Payments Pro Hosted Solution in my website. I'm using one page checkout.
When I select my payment method to Payment by cards or by PayPal account a message shows below the radio button saying You will be required to enter your payment details after you place an order.
But after I place the order shows a PayPal error This transaction can't be processed. Please pay with another card and do not show a place to enter payment details such as credit card details.

Step 1

Step 2

Please help!


texts:
How can we override setstate in Magento 2.0?

Please help me.

Advance Thanks,
Prabaharan.S.


texts: Toggle menu/accordion menu doesn't work?

texts:
I have been trying to add accordion menu on the left side bar on our new magento ecommerce site. I tried most of the methods mentioned on Magento website forums but nothing seems to work. I even tried the plugin called Codewix for accordion menu plugin, it did not work and even crashed my whole site.

I also tried various scriptalicious accordions and they all had issues. I want to do it in jQuery since I had enough with all the other ones. Can I know which js file is save to remove from Magento front end, I do not want to mess up big time.

It would be highly appreciated if you could share any method for accordion menu that works for you in 1.7.0.2 version.

Thanks in advance.


texts: M2 - How to include my custom font in custom theme?

texts:
How to apply adobe laca font, https://fonts.adobe.com/fonts/laca

How to apply?
I am created custom theme inherit from blank theme.
Custom font declaration :
app\design\frontend\Myrwd\mytheme\web\css\source\ _typography.less
& when (@media-common = true) {
    .lib-font-face(
    @family-name: @font-family__base,
    @font-path: '@{baseDir}fonts/Laca-Regular',
    @font-weight: 400,
    @font-style: normal,
    @font-display: swap
    );
    }
    @font-family__base: 'laca, sans-serif' !important;


texts: Create product with custom option (Field type ) using rest api not saving

texts:
I am trying to create simple product with custom option(Field type) using rest api but custom option is not saving with product endpoint rest/V1/products.
request body
    {
    "product": {
        "sku": "test_simple_product3",
        "name": "Test Simple Product",
        "attribute_set_id": 4,
        "price": 25,
        "status": 1,
        "visibility": 1,
        "type_id": "simple",
        "weight": "0.5"
    },
    "custom_attributes": [
        {
            "attribute_code": "has_options",
            "value": 1
        },
        {
            "attribute_code": "required_options",
            "value": 1
        }
    ],
    "options": [
        {
            "product_sku": "test_simple_product3",
            "title": "Add Your Name (Max 15 Characters)",
            "type": "field",
            "sort_order": 1,
            "is_require": false,
            "price": 10,
            "price_type": "fixed",
            "sku": "Personalized",
            "max_characters": 15
        }
    ]

}


texts: Background URL showing "checkout/cart" in Home page Magento 1.9.3

texts:
When I am loading my website url
https://www.logomatology.com/
 then I am seeing in background https://www.logomatology.com/checkout/cart
I have checked all files but I am not able to fix this issue?
Have any one idea? How to fix this issue?


texts: Not able to complete Magento 2 installation

texts:
During Magento 2 installation it reach 65% and stuck with below error:

Installing user configuration...

[ERROR] Exception: Warning: SessionHandler::read(): open(/var/lib/php/session/sess_dut4kvc67t0gvapfoo399b65d1, O_RDWR) failed: Permission denied (13)..

permission is 777 to var folder, i'm using plesk 12.5.30 with php 7

what could be the issue?


texts:
I get my products from external API and send them to Magento, the problem is, the quantity is not synced with the API, so I want to update the quantity after the user click on place older.

I don't know where to start, I know theres observers but I never tried it.


texts: Cannot reindex Catalog URL Rewrites in magento 1.7

texts:
Went to
system->index management ,
checked on (Catalog URL Rewrites),when i clicked on submit to Reindex Data , i get an error message

Cannot initialize the indexer process.

I also tried to reindex data using terminal with the command

sudo php shell/indexer.php --reindexall

got error

Catalog URL Rewrites index process unknown error:
exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1139 Got error 'this version of PCRE is compiled without UTF support at offset 0' from regexp' in /respective-installaton-location/lib/Zend/Db/Statement/Pdo.php:228

also tried

sudo php -f ./shell/indexer.php -- -reindex catalog_url

got same error message

Catalog URL Rewrites index process unknown error:
exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1139 Got error 'this version of PCRE is compiled without UTF support at offset 0' from regexp' in /respective-installaton-location/lib/Zend/Db/Statement/Pdo.php:228

Please suggest what should be done, Any help would be appreciated.
I need to reindex catalog url as i made some changes in
system->configuration->catalog->Search engine optimisation->Use Categories Path for Product URLs


texts: Magento 2 show captcha at contact us form block section

texts:
I use below code to show cms block in cms page
{{block class="Magento\Contact\Block\ContactForm" name="contactForm" template="Magento_Contact::form.phtml"}}


texts: "Decoding Failed: Syntax Error" after Magento 1.9.3 upgrade

texts:
I've had a few issues since updating our Magento site from 1.9.2.4 to 1.9.3.

When we try to save attributes in the backend, we get a "Decoding Failed: Syntax error" message in red at the top of the backend.

We tried the new SUPEE-8788 patch on a different branch, and get the same issue.

Has anyone experienced this or know a fix?


texts: After Importing Products, Products are not editable and also not visible

texts:
its me again. My question was not solved yesterday after working a lot of hours figuring it out i could import products without errors. But the new error now is, those imported products are shown under it's subcategory but i can't access it and in the frontend it shows only for the category how much products are in there but none is visible.

Backend View:

Frontend View:

Import without error:

In the Backend under Manage Products there is no product of the imported ones visible.
What should i do?


texts: Why core/session is not setting inside __constructor in Magento?

texts:
class Mymodule_Product_Block_Adminhtml_Product extends Mage_Adminhtml_Block_Widget_Grid_Container {

    public function __construct() {
        $this->_controller = "adminhtml_product";
        $this->_blockGroup = "product";
        $this->_headerText = Mage::helper("product")->__("Product Manager");
        $this->_addButtonLabel = Mage::helper("product")->__("Add New Product");
        $form_key = 123;
        Mage::getSingleton('core/session')->setFormKeyCustom($form_key);
        $this->_addButton('import', array(
            'label' => Mage::helper('product')->__('Import'),
            'onclick' => "uploadDoc('" . $this->getBaseUrl() . "product/csvupload/index/key/" . $form_key . "');",
            'class' => 'add',
            'after_html' => '',
        ));
        parent::__construct();
    }

}

Why I am not able to get that session in a frontcontroller action ?? I am getting blank Mage::getSingleton('core/session')->getFormKeyCustom();


texts: Translate Maintenance mode per website in multiwebsite-multidomain setup

texts:
Translate Maintenance mode per website in multi website-multi domain setup

What is the proper way of translating (localisation) Maintenance page in a multi-website and multi-domain environment?

Setup's made into:

MAGENTO_ROOT/index.php
MAGENTO_ROOT/uk/index.php
MAGENTO_ROOT/us/index.php
MAGENTO_ROOT/somecode/index.php

Let's assume that the stores are accesible through:

http://MagentoExample.com/index.php (default)
http://MagentoExample.uk/ (uk)
http://MagentoExample.us/ (us)
http://MagentoExample.com (somecode)

I can easily see few solutions for it but all of theem seems to be more of a workaround than actual nice, clean solutions.

How do you solve this issue?


texts: Configurable not showing thumbnail on product view page

texts:
Here is an example (it should be showing 2 images).
I'm using Magento 1.9.2.

The site has 2000 products, and on the product view page at every single configurable product, only the main image is shown, no thumbnails. They just disappeared overnight.

Basically in the media.phtml file 'count($this->getGalleryImages())' returns 0 or null, that is why they are missing.

I have removed my template (used Ultimo-infortis), but same happening in RWD.
Have tried to disable modules, but no avail.

I have uploaded some products through Magento import. Could that produce this error?

Please advise!
Thanks!


texts: Magento 2 Grid custom column value in Ui Listing

texts:
I followed this link How to display Yes/No values in admin grid (Magento2)?
to get the dynamic custom column value where the column field in grid was

  app/code/Vendor/Theme/view/adminhtml/ui_component/your_ui_grid.xml

<column name="instock" class="Vendor\Module\Ui\Component\Listing\Column\InStock">
<argument name="data" xsi:type="array">
    <item name="config" xsi:type="array">
        <item name="sortOrder" xsi:type="number">60</item>
        <item name="label" translate="true" xsi:type="string">InStock</item>
        <item name="component" xsi:type="string">Magento_Ui/js/grid/columns/select</item>
        <item name="dataType" xsi:type="string">select</item>
    </item>
</argument>

The file in Ui is:

  app/code/Vendor/Module/Ui/Component/Listing/Column/InStock.php

<?php

namespace Vendor\Module\Ui\Component\Listing\Column;
use Magento\Framework\View\Element\UiComponentFactory;
use Magento\Framework\View\Element\UiComponent\ContextInterface;
use Magento\Ui\Component\Listing\Columns\Column;

class Status extends Column
{
public function __construct(
    ContextInterface $context,
    UiComponentFactory $uiComponentFactory,
    array $components = [],
    array $data = []
) {
    parent::__construct($context, $uiComponentFactory, $components, $data);
}

public function prepareDataSource(array $dataSource)
{
    if (isset($dataSource['data']['items'])) {
        foreach ($dataSource['data']['items'] as &$items) {
            // $items['instock'] is column name
            if ($items['instock'] == 1) {
                $items['instock'] = 'Yes';
            } else {
                $items['instock'] = 'No';
            }
        }
    }
    return $dataSource;
}
}

The column value in prepareDataSource(array $dataSource) is received fine , but when I apply the condition and return $dataSource - It does not display in the grid colum . Can any one figure out the issue?


texts: Magento 2 - Observer for shipping address change

texts:
is there a way to create an observer which is listening to changes on the shipping address?

Thanks! :-)


texts: Uri is getting removed when removing https?

texts:
If I open the URL www.mypage.de/katalog-bestellen in Chrome then the url is automatically changed to "https://www.mypage.de/katalog-bestellen" and the correct site loads.

But If I open the same URL in Edge, then I get redirected to the startpage at https://www.mypage.de/.

The uri katalog-bestellen is always cut off!

I figured out that changing Auto Redirect to Base URL in System -> Configuration -> Web -> Url Options to No works, but my SEO professional co-worker told me that this is not a good idea, since google will think that there are two identical websites (www.mypage.de and https://www.mypage.de) and google would see this as "duplicate content" which is bad.

How else can I solve this?


texts:
I'm looking for how to change module icon. As I can see, the Dashboard,Product,Sales,Marketing have the icon like this.

And my own module icon (GiftRegistry) like this:

I want to change my default icon. How can i do that?


texts: Magento 2 checkout not loading on production environment

texts:
Magento 2 local development installation is working fine, however the production installation has some issues regarding the checkout. Certain files are not loaded, resulting in an endless spinning wheel load screen.

Looking up the missing files, I found out a lot of js files are not being deployed to the static folder on the live server. They are being deployed on the local environment however. Thoughts or tips would be welcome!


texts: Not getting product image urls of all products in json file?

texts:
public function productDataToJson(Varien_Event_Observer $observer)
{
    // $product = $observer->getProduct();
    $products = Mage::getModel('catalog/product')->getCollection();
      foreach ($products as $_product) {
          array($_product->getData());
      }
    $jsonData = Mage::helper('core')->jsonEncode($products->getData());
    echo $jsonData;
    file_put_contents("c_node.json", $jsonData);exit;
}


texts: Magento : Check if two conditions are true (category view)

texts:
I am trying to check if two conditions are true in the Magento category view file. Specifically if parent id = 1 and if category name = Nike.

Can someone please suggest how I can update the code below to get this working?

<?php if ($_category->getParentCategory()->getId() == 1) && ($_category->getName() == 'Nike'): ?>

Then show this

<?php endif; ?>


texts: Add links to the header navigation menu?

texts:
I am using Magento 2.3.5 version, I have installed a new theme to the Magento eCommerce platform. now I am unable to change the redirection links to the specific pages from the header navigation menu. Can you please help me where can I change?
Please find below is the screenshot of my website along with the header after the theme installation.