texts: Show Payment Gateway error Message on checkout/custom/failure

texts:
I have a custom payment gateway, with custom controller and failure page.
I am trying to show the error message on checkout/custom/failure page, but I find it difficult and am thinking my flow maybe wrong.

How it works:
On payment selection in the checkout page, the order is created and you are redirected to the payment provider, if successful, all is good. If the card is declined or the user cancels or for whatever reason if fails, it redirects to my custom controller (with POST values with payment information), cancels the order, and then redirects to checkout/custom/failure. I want the error message from the $_POST array to show as a message in the checkout/custom/failure page.

What I have (related to failure scenario):

Block/Standard/Failure.php [1]
Controller/Standard/Failure.php [2]
Controller/Standard/Response.php [3]
view/frontend/templates/failure.php [4]

Code for [3]:

$params = $this->getRequest()->getPostValue();
if (!empty($params['ResponseCode']) && !empty($params['ReasonCode'])) {
    if ($params['ResponseCode'] == '1' && $params['ReasonCode'] == '1') {
        // Set status "paid" changeOrderStatus and redirect to checkout/standard/success
        $result_data['result'] = 'Success! ' . $params['ReasonCode'];
        return $this->resultRedirectFactory->create()->setPath('checkout/onepage/success');
    } else {
        // Set status "cancelled" changeOrderStatus and redirect back to cart
        $result_data['result'] = 'Failed! ' . $params['ReasonCode'];
        $this->cancelOrder($loadOrderId);
        return $this->resultRedirectFactory->create()->setPath('custompaymentgateway/standard/failure');

    }
} else {
    // Set status "cancelled" changeOrderStatus
    $result_data['result'] = 'Failed! ' . $params['ReasonCode'];
    $this->cancelOrder($loadOrderId);
    return $this->resultRedirectFactory->create()->setPath('custompaymentgateway/standard/failure');
}

[2] has a simple render Layout call:

public function execute() {
    $this->_view->loadLayout(['default', 'jccpaymentgateway_standard_failure']);
    $this->_view->renderLayout();
}

and lastly [4] has calls to block functions:

<?php if ($block->getRealOrderId()) : ?>

    <?php /* @escapeNotVerified */ echo __('Order #') . $block->getRealOrderId() ?>

<?php endif ?>
<?php if ($error = $block->getErrorMessage()) : ?>

<?php /* @escapeNotVerified */ echo $error ?>

<?php endif ?>

<?php /* @escapeNotVerified */ echo __('Click here to continue shopping.', $block->escapeUrl($block->getContinueShoppingUrl())) ?>

So with all this my question is, how can [4] print the response data from [3]?? Specifically $params['ReasonCode']


texts: How to fetch data from custom table with select query?

texts:
I have three columns in a table named id, wishlist_id and type and I want to fetch wishlist_id according to the type field into an array

I am using the follwing code:

$wishlistId = $mysql->getColumn("SELECT `wishlist_id` FROM `customer_wishlists` WHERE `type`='wishlist'");
print_r($wishlistId);

It is giving me only repeated value


texts: Redis and Magento Cache Management system

texts:
I have a little confusion here on how redis do the job in Magento exactly.

When redis and magento cache management enabled, are both running and work at the same time? Or, redis override all the magento cache management function at all?


texts: im trying to add images and media to my pages but the browse button and upload are missing

texts: i have more than 5000 products in my magento shop, since a week, all newls uploaded products dont have an image because of the missing browse and upload button. As well, under pages im trying to insert media and same problem.I have Magento ver. 1.9.0.1, Google Chrome Version 55.0.2883.87 m and adobe flash player is enabled.


texts:
I am saving a list of products via admin interface. Every time i enter a product, it takes a lots of time loading.

Is there any solution to this problem ? Is there any extension that accelarate the process of saving ?


texts: Magento 2 :- Custom Price Set issue on cart page

texts:
I have set custom product price using a controller and it works fine but when I go to cart page I see grand total not set to the zero.Because the summary section loads using the ajax after some time automatically.

I used this link in my controller :- I want to set custom price programmatically to the product Magento 2
Please see the screenshot I have attached below. first the order total and subtotal set to zero but after some time it loads automatically and set the price as default price.

foreach ($products_array as $value)
{
    $params['qty'] = 1;//product quantity
    $_product = $this->productRepository->getById($value);
    $_product->setPrice(0);
    $_product->setBasePrice(0);
    $quote->addProduct($_product,$params);
}


texts: Extensions charging more for enterprise?

texts:
Why are Magento extension providers charging extra for enterprise versions of their modules?

I have a pretty good idea that the codebase for both of the module versions will be identical so where does this extra cost come from?  In some cases i have seend > $100 for the enterprise version.

Is this:

An extra cost due to extra technical complexity (i cant see what that would be)
An extra cost due to Magento licensing somehow
Profiteering since enterprise clients are likely to be able to pay more
Something else?


texts: Identify weather the product is new or getting update on save

texts:
I have created an observer on "controller_action_catalog_product_save_entity_after" where I am getting the product which is being saved. what i want is to identify that the product which is being saved is it a new or old being update.

namespace Commersys\ZohoInventorySync\Observer;

use Magento\Framework\Event\ObserverInterface;

class NewProductSaveObserver implements ObserverInterface
{
    /**
     * @param \Magento\Framework\Event\Observer $observer
     */
    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $_product = $observer->getProduct();
        var_dump($_product->getData());
        die();
    }
}

in events.xml

<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="controller_action_catalog_product_save_entity_after">
        <observer name="newProductSaveObserver" instance="Commersys\ZohoInventorySync\Observer\NewProductSaveObserver" />
    </event>
</config>


texts: Magento2 - Commerce Cloud ElasticSearch not working

texts:
I have Magento2.3.5 Cloud Commerce project.
On Cloud Elasticsearch v 7.7 is not working and not return any product when I perform search.
Its working fine on my local environment (Elasticsearch v 7.10.1).
I tested on cloud that data is stored in elasticsearch but searching is not working.
PHP version is same for both environment(php7.3)
Please help me how can I debug this issue on cloud.
Thanks


texts: Magento 2 How to change label for Configurable Product "As low as"?

texts:
I want to change "As low as" Price label for Configurable products.

Can anyone know how to change this label?


texts: Magento1.8 - Restapi Custom Module - Return variable formatting issue

texts:
This is my first post so please let me know if I missed sharing any detail on my problem.

I have below files ready in Magento kept in app/code/community:

A. Autogen > Restapi > etc > api2.xml

B. Autogen > Restapi > etc > config.xml

C. Autogen > Restapi > Model > Api2 > Order.php

D. Autogen > Restapi > Model > Api2 > Order > Rest > Admin > V1.php

Below is the part of code written in V1.php:

protected function _retrieveCollection() {
    $return_variable = array();
    $page = $this->getRequest()->getParam('page');
    $limit = $this->getRequest()->getParam('limit');

    $collection = Mage::getModel('sales/order')->getCollection()
                                                ->setCurPage($page)
                                                ->setPageSize($limit);

    $return_variable['order_count'] = $collection->getSize();
    $order_counter = 0;
    foreach ($collection as $order) {
        $return_variable['order'][$order_counter]['order_id'] = $order->getId();
        $return_variable['order'][$order_counter]['increment_id'] = $order->getIncrementId();

        $order_counter = $order_counter + 1;
    }

    return json_encode($return_variable);   //I will refer this line again
}

When I hit restapi with Restclient, I get below output which is not fit for json_decode:

"{\"order_count\":2050,\"order\":[{\"order_id\":\"2282\",\"increment_id\":\"100003584\"},{\"order_id\":\"2281\",\"increment_id\":\"100003583\"},{\"order_id\":\"2280\",\"increment_id\":\"100003582\"},{\"order_id\":\"2279\",\"increment_id\":\"100003581\"},{\"order_id\":\"2278\",\"increment_id\":\"100003579\"},{\"order_id\":\"2277\",\"increment_id\":\"100003578\"},{\"order_id\":\"2276\",\"increment_id\":\"100003577\"},{\"order_id\":\"2275\",\"increment_id\":\"100003576\"},{\"order_id\":\"2274\",\"increment_id\":\"100003575\"},{\"order_id\":\"2273\",\"increment_id\":\"100003574\"},{\"order_id\":\"2272\",\"increment_id\":\"100003573\"},{\"order_id\":\"2271\",\"increment_id\":\"100003572\"},{\"order_id\":\"2270\",\"increment_id\":\"100003571\"},{\"order_id\":\"2269\",\"increment_id\":\"100003570\"},{\"order_id\":\"2268\",\"increment_id\":\"100003569\"},{\"order_id\":\"2267\",\"increment_id\":\"100003568\"},{\"order_id\":\"2265\",\"increment_id\":\"100003565\"},{\"order_id\":\"2264\",\"increment_id\":\"100003564\"},{\"order_id\":\"2263\",\"increment_id\":\"100003563\"},{\"order_id\":\"2262\",\"increment_id\":\"100003562\"}]}"

When I change (See commented line in above code) from "return json_encode($return_variable);" to "return $return_variable;", I get below output. This response is JSON fit for decode but I should receive more key-value pair instead of just 1:

{"order_count":2050,"order":[{"order_id":"2282","increment_id":"100003584"}]}

Please help me to get JSON fit for decode data with all key-value pair.

Your help is appreciated.

Magento Version 1.8


texts: Difference between root index.php and pub directory index.php in Magento2?

texts: Can any one tell me the logical difference between of using index.php in root directory and pub directory when we go live to point domain then which index.php should be pointed by domain?


texts: On opening Product Single page gave error from Admin in Magento 2?

texts:
I have 60 million Products in my Magento Store.
In my Magento 2 Admin When i go to admin panel and click on to view a product it gives me an error .
Class StripeIntegration\Payments\Model\Adminhtml\Source\BillingInterval does not exist but i didn't install any Stripe Plugin.

Any help is Appriciated.


texts: Why Success Message is not shown on mail sent in Magento 2?

texts:
I have create a custom module which send mail.
The mail functionality works perfectly but success message not show up.
mail code is :
<?php
namespace Codextblog\Customemail\Controller\Index;

use Zend\Log\Filter\Timestamp;
use Magento\Framework\App\Config\ScopeConfigInterface;
use Magento\Store\Model\ScopeInterface;

class Post extends \Magento\Framework\App\Action\Action
{
const XML_PATH_EMAIL_RECIPIENT_NAME = 'trans_email/ident_support/name';
const XML_PATH_EMAIL_RECIPIENT_EMAIL = 'trans_email/ident_support/email';

protected $_inlineTranslation;
protected $_transportBuilder;
protected $_scopeConfig;
protected $_logLoggerInterface;
protected $request;
protected $scopeConfig;
protected $messageManager;
protected $_customerSession;
private $logger;

public function __construct(
    \Magento\Framework\App\Action\Context $context,
    \Magento\Framework\App\Request\Http $request,
    \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation,
    \Magento\Framework\Mail\Template\TransportBuilder $transportBuilder,
    \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
    \Magento\Customer\Model\SessionFactory $customerSession,
    \Psr\Log\LoggerInterface $loggerInterface,
    \Psr\Log\LoggerInterface $logger,
    \Magento\Framework\Message\ManagerInterface $messageManager,
    array $data = []

    )
{
    $this->_inlineTranslation = $inlineTranslation;
    $this->logger = $logger;
    $this->_transportBuilder = $transportBuilder;
    $this->_customerSession = $customerSession->create();
    $this->scopeConfig = $scopeConfig;
    $this->_logLoggerInterface = $loggerInterface;
    $this->messageManager = $messageManager;
    parent::__construct($context);

}

public function getCustomerData() {
    if ($this->_customerSession->isLoggedIn()) {
        return $this->_customerSession->getCustomerData()->getEmail();
    }
    return false;
}

public function execute()
{
    $useremail = $this->getCustomerData();
    $toemail = $this->scopeConfig->getValue('trans_email/ident_support/email',ScopeInterface::SCOPE_STORE);
    $toname  = $this->scopeConfig->getValue('trans_email/ident_support/name',ScopeInterface::SCOPE_STORE);
    $post = $this->getRequest()->getPost();
    $template = 'customemail_email_template';
    $recipient_address = $toemail;
    $recipient_name = $toname;
    $from_address = [
        'name' => $useremail,
        'email' => $useremail
    ];
    //an array with variables, format is key = variable name, value = variable value
    $vars = [
        'name' => $post['name'],
        'email' => $post['email'],
        'ownnumber' => $post['ownnumber'],
        'heldcertificate' => $post['heldcertificate'],
        'subjectedtovat' => $post['subjectedtovat']
    ];
    //several variables in email template, i.e. storeName are generated based on store Id
    $storeId = \Magento\Store\Model\Store::DEFAULT_STORE_ID;

    $this->_inlineTranslation->suspend();

        $this->_transportBuilder->setTemplateIdentifier(
            $template
        )->setTemplateOptions(
            [
                'area'  => \Magento\Framework\App\Area::AREA_FRONTEND,
                'store' => $storeId,
            ]
        )->setTemplateVars(
            $vars
        )->setFrom(
            $from_address
        )->addTo(
            $recipient_address,
            $recipient_name
        );

    //create the transport
    if (!isset($transport)) {
        $transport = $this->_transportBuilder->getTransport();
    }

    //send the email
    try {
        $transport->sendMessage();
        $this->_inlineTranslation->resume();
        $this->messageManager->addSuccess('Email sent successfully');
        $this->_redirect('platevaluations/index/index');
    } catch (\Exception $exception) {
    //log failed email send operation
        $this->logger->critical($exception->getMessage());
    }
}
}


texts: Fatal error when using one module's controller action code in another module

texts:
We are allowing guest to create an account with help of below function

<form action="<?php echo $this->getUrl('productlike/index/create',
 array('_secure'=>(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS']==='on')))
  ?>" method="post" id="ajaxlogin-create-form">

  controllers

app/code/local/Outthink/ProductLike/controllers - Indexcontroller.php

class Outthink_ProductLike_IndexController extends Mage_Core_Controller_Front_Action  {
public function createAction(){  }
}

we are using same function code in another module as below, but its not working

<form action="<?php echo $this->getUrl('example/Amasty/create1',
     array('_secure'=>(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS']==='on')))
      ?>" method="post" id="ajaxlogin-create-form">

app/code/local/Amasty/Example/controllers - Amastycontrollers.php

class Amasty_Example_AmastyController extends Mage_Core_Controller_Front_Action {
public function create1Action(){  }
    }

Is this right way ? I dont want to rewrite same controller action because i need some other feature with the functions.

  update

Fatal error Call to undefined method Amasty_Example_AmastyController::_getCustomer() in line $customer = $this->_getCustomer();

public function create1Action()

    {
        // Clear the messages each time we call it
        Mage::getSingleton('core/session')->getMessages(true);

        $session = Mage::getSingleton('customer/session');

        if ($session->isLoggedIn()) {
            return;
        }

        $session->setEscapeMessages(true); // prevent XSS injection in user input
        if (!$this->getRequest()->isPost()) {
            return;
        }

        $result = array(
            'success' => false
        );

        $customer = $this->_getCustomer();

        try {
            $errors = $this->_getCustomerErrors($customer);

            if (empty($errors)) {
                if (version_compare(Mage::getVersion(),"1.9.1.0",">="))
                {
                    // Only from 1.9.1.0
                    $customer->cleanPasswordsValidationData();
                }
                $customer->save();
                Mage::dispatchEvent('customer_register_success',
                    array('account_controller' => $this, 'customer' => $customer)
                );
                $result['redirect'] = $this->_successProcessRegistration($customer);
                $customerId = Mage::getSingleton('customer/session')->getCustomerId();
                 $productId=$this->getRequest()->getPost('product_id');
                    $likeProduct=Mage::getModel('productlike/productlike')->getCollection()
                        ->addFieldToSelect('fav_id')
                        ->addFieldToFilter('product_id',$productId)
                        ->addFieldToFilter('customer_id',$customerId)->load();
                     /*

                    */
                $result['success'] = true;
            }

        } catch (Mage_Core_Exception $e) {

        }

        catch (Exception $e) {

           // $result['error'] = $this->__('Cannot save the customer.');
        }

        $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
    }


texts: Magento2: Redirect issue from the Observer

texts:
I facing issue while redirect from observer file.
Actually code worked on localhost but on the server it's not working.
Here is the code

public function execute(\Magento\Framework\Event\Observer $observer)
{
    $route = $this->request->getControllerName();
    $url = $this->url->getUrl('customer/account/login');
    if($this->getStoreCode() == 'default'){
        if (!$this->customerSession->isLoggedIn()) {
            if($this->_state->getAreaCode() != 'adminhtml') {
                if(strpos($this->request->getPathInfo(), '/customer/account/') !== 0 || $route == 'noroute') {
                    $observer->getControllerAction()->getResponse()->setRedirect($url);
                }
            }
        }
    }
}

It is not working while controller is noroute.
Can anyone please suggest if faced same issue.


texts: Get order data afterPlaceOrder on checkout page

texts:
Im trying to get the order increment id after success place order is triggered. This is my method-renderer file:
define(
[
    'Magento_Checkout/js/view/payment/default',
    'Magento_Checkout/js/model/quote',
    'Magento_Customer/js/model/customer',
    'Magento_Checkout/js/model/full-screen-loader',
    'Magento_Checkout/js/model/totals',
    'Magento_Checkout/js/action/redirect-on-success',
    'Magento_Ui/js/model/messageList',
    'mage/url',
    'mage/translate',
],
function (Component, quote, customer, fullScreenLoader, totals, redirectOnSuccessAction, messageList, url, $t) {
    'use strict';

    return Component.extend({
        defaults: {
            template: 'Module_MyModule/payment/custom_module'
        },
        afterPlaceOrder: function () {
            // HERE I WANT THE ORDER INCREMENT ID
        },

        successPlaceOrder: function () {
            fullScreenLoader.stopLoader();
            this.placeOrder();
        },
        placeOrder: function() {
            let context = this;
            context.successPlaceOrder();
        }
    });
  }
);


texts: Get Filtered attribute collection using getFilterableAttributes()

texts:
using below code i can able to get all filterable attributes for a category,

    $json = array();

    $layer = Mage::getModel("catalog/layer");

    $category = Mage::getModel("catalog/category")->load(3); // Jeaan Category

    $layer->setCurrentCategory($category);

    $attributes = $layer->getFilterableAttributes();

    foreach ($attributes as $attribute) {
    $filterBlockName = 'catalog/layer_filter_attribute';
    $result = Mage::app()->getLayout()->createBlock($filterBlockName)->setLayer($layer)->setAttributeModel($attribute)->init();
        foreach($result->getItems() as $option) {
        $json[$attribute->getAttributeCode()][] = array(
            'attribute_name' => $option->getLabel(),
            'attribute_value' => $option->getValue()
    );
        }
    }
   return $json;

Now i'm trying to set an filter and get it's related attribute's i.e,. need to fetch it's second level of visible attributes after filter.

did anyone have any hint to solve this ?


texts: Magento2 : How to add layered navigation in CMS Home page?

texts:
I need to add layered navigation on my home page. It is available on other pages but not in Homepage. I have tried this one too -> Magento 2 How to show Layered Navigation on home page? , but it is not working for me.

How to add this to the homepage?


texts: Add Custom Validation Street Address Field in backend Magento 2

texts:
I Want To Set Minimum Length Value For Street Address Field On Admin Side

I want to set min_text_length = 5 For Street Address Field In Customer Address Form

  I am Trying To Update Attribute but Not Working

public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
    {
        if (version_compare($context->getVersion(), '1.0.1', '<')) {
            $customerSetup = $this->customerSetup->create(['setup' => $setup]);
            $customerSetup->addAttribute(
                'customer_address',
                'street',
                [
                    'type' => 'static',
                    'label' => 'Street Address',
                    'input' => 'multiline',
                    'backend' => \Magento\Eav\Model\Entity\Attribute\Backend\DefaultBackend::class,
                    'sort_order' => 70,
                    'multiline_count' => 4,
                    'validate_rules' => '{"max_text_length":255,"min_text_length":5}',
                    'position' => 70,
                ]
            );
        }
    }

In Database Already Set {"max_text_length":255,"min_text_length":5} But Validation not Working

Note :- Admin Side Not Frontend Side.


texts:
As per the deployment policy, I need to programatically set design exception rules in admin for the mobile theme. I noticed on core_config_data, the value looked like:

a:1:{s:18:"_1380154833505_505";a:2:{s:6:"regexp";s:111:"iPhone|iPod|BlackBerry|Palm|Googlebot-Mobile|Mobile|mobile|mobi|Windows Mobile|Safari Mobile|Android|Opera Mini";s:5:"value";s:6:"mobile";}}

Which makes it quite a headache to figure out how to write a setup/installation script for it. Any advice is appreciated.


texts: Magento 2.2 - How can I pass the color attribute from the category list to the product detail page?

texts: Example: A user is on a category list page that has several products that all have different color options. He chooses a color on one product that nicely changes to the color he selected. Then clicks to go to its detail page. How can I pass that color attribute to the product detail page so that the user still sees the proper product color he originally selected? (by default, the product detail page shows the default product image(s) and you have to reselect your product color).


texts: Home Page Show 404 in PWA Magento Ver. 2.3.2


texts:
How can u upgrade 1.9.3.3 To 1.9.3.4 through FTP. I am on shared hosting so i don't have ssh access.
Which are the fires and folder do i need to replace ?

Please Any one can give me a step by step procedure...

Thank you


texts:
I am working on a Magento 2 site where we are using a Warehouse management system that manages stock. With it being an old system the only way to obtain latest stock is running a CSV from it at periods through the day. This export includes ALL stock, here lies the problem.

When using the Magento 2 import functionality and using add/update it is adding all the products on the original CSV into the database. Ideally all we want is an 'update' option, is this possible?

So ideally the csv could have a number of different SKU's that may or may not be on the site currently. If they are the Stock value gets updated, if not then it simply skips over it.

Any help would be greatly appreciated.

Thanks


texts: Magento 2 Checkout.Validate current form

texts:
I have additional input and select fields in shipping method.

In checkout at shipping step all forms validates by this code:

module-checkout/view/frontend/web/js/view/shipping.js

            saveNewAddress: function () {
                var addressData,
                newShippingAddress;

            this.source.set('params.invalid', false);
            this.source.trigger('shippingAddress.data.validate');

            if (!this.source.get('params.invalid')) {
                addressData = this.source.get('shippingAddress');
                // if user clicked the checkbox, its value is true or false. Need to convert.
                addressData.save_in_address_book = this.saveInAddressBook ? 1 : 0;

                // New address must be selected as a shipping address
                newShippingAddress = createShippingAddress(addressData);
                selectShippingAddress(newShippingAddress);
                checkoutData.setSelectedShippingAddress(newShippingAddress.getKey());
                checkoutData.setNewCustomerShippingAddress(addressData);
                this.getPopUp().closeModal();
                this.isNewAddressAdded(true);
            }
        }

This code triggers all inputs and selects on shipping step

            this.source.set('params.invalid', false);
            this.source.trigger('shippingAddress.data.validate');

I want to validate only

          <!-- ko foreach: getRegion('address-list-additional-               addresses') -->
            <!-- ko template: getTemplate() --><!-- /ko -->
            <!--/ko-->

in shipping.html

This is UiClass  registry.get('index = address-list-additional-addresses');

Code

            this.source.set('params.invalid', false);
            this.source.trigger('address-list-additional-addresses.data.validate');

Fires nothing.

Thanks for your answers:)


texts: Magento : How to Get Related Attributes of a Collection

texts:
My question is pretty simple. I have a collection like below.

$collection = Mage::getModel('catalog/product')->getCollection();
$collection->addAttributeToSelect(array('sku','name','price','thumbnail'));
$collection->setStoreId(1)->addCategoryFilter($categoryObj);

So above code returns all the products from a particular category.

I need to get all the attributes related to this collection, like layered navigation. Our way of generating layered navigation.

My output will be

Array 1 - All the products in the collection

Array 2 - Product related attributes values like below sample

Brands
Nike
Addidas
Under Armour
__________
Gender
Male
Female
Unisex
_________
Age Group
5-10 Years
10-15 Years
Big kids

Please advise


texts:
In Magento log I see something like these:

2015-12-06T18:11:38+00:00 ERR (3): Warning: include(/app/design/frontend/..../..../template): failed to open stream: No such device  in /app/code/core/Mage/Core/Block/Template.php on line 241
2015-12-06T18:11:38+00:00 ERR (3): Warning: include(): Failed opening '/app/design/frontend/..../..../template' for inclusion (include_path='/app/code/local:/app/code/community:/app/code/core:/lib:.:/usr/share/pear:/usr/share/php') in /app/code/core/Mage/Core/Block/Template.php on line 241
2015-12-06T18:11:50+00:00 ERR (3): Warning: include(/app/design/frontend/..../..../template): failed to open stream: No such device  in /app/code/core/Mage/Core/Block/Template.php on line 241
2015-12-06T18:11:50+00:00 ERR (3): Warning: include(): Failed opening '/app/design/frontend/..../..../template' for inclusion (include_path='/app/code/local:/app/code/community:/app/code/core:/lib:.:/usr/share/pear:/usr/share/php') in /app/code/core/Mage/Core/Block/Template.php on line 241
2015-12-06T18:24:58+00:00 ERR (3): Warning: include(/app/design/frontend/..../..../template): failed to open stream: No such device  in /app/code/core/Mage/Core/Block/Template.php on line 241
2015-12-06T18:24:58+00:00 ERR (3): Warning: include(): Failed opening '/app/design/frontend/..../..../template' for inclusion (include_path='/app/code/local:/app/code/community:/app/code/core:/lib:.:/usr/share/pear:/usr/share/php') in /app/code/core/Mage/Core/Block/Template.php on line 241

In Template.php I see

 try {
            $includeFilePath = realpath($this->_viewDir . DS . $fileName);
            if (strpos($includeFilePath, realpath($this->_viewDir)) === 0 || $this->_getAllowSymlinks()) {
                include $includeFilePath;
            } else {
                Mage::log('Not valid template file:'.$fileName, Zend_Log::CRIT, null, null, true);
            }

        } catch (Exception $e) {
            ob_get_clean();
            throw $e;
        }

In 241 row -> include $includeFilePath;

Any idea what that warning is meaning?


texts: Magento funnel in google analytics, place order clicked very high (no counted as success)

texts:
we have conversion funnel on checkout in analytics

We see the below in last step

11 out of 20 succesful
place order clicked, but?? did not visit the succes URL

Question: now what is? and what is causing the high place order clicked %?

Can this be the people that clicked cancel on the (external) payment page? (but we dont have so many cancellations

Or can it be the people that do the payment, but before the succes url can load they click away?


texts: Magento 1.9.3.1 Stop auto invoicing of paypal orders

texts:
I am using magento CE 1.9.3.1 and I would like to disable auto invoicing of orders placed by paypal. Tax point purposes I would like to invoice them manually in the magento backend myself like I do for the Purchase order orders.

Doing some research (Googling!) I found this:

stop auto-invoice of paypal orders

Now, this is nearly three years old from 2014 so is this still a viable solution for 1.9.3.1 ?

Or is there a more reliable solution ?

Update

I went and amended the registerCaptureNotification function in payment.php from prasantas answser below to the following:

 $status = true;
$letsEmail = false;
if ($this->getIsTransactionPending()) {
    $message = Mage::helper('sales')->__('Capturing amount of %s is pending approval on gateway.', $this->_formatPrice($amount));
    $state = Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW;
    $letsEmail = true;
    if ($this->getIsFraudDetected()) {
        $message = Mage::helper('sales')->__('Order is suspended as its capture amount %s is suspected to be fraudulent.', $this->_formatPrice($amount, $this->getCurrencyCode()));
        $status = Mage_Sales_Model_Order::STATUS_FRAUD;
        $letsEmail = false;
    }
} else {
    $message = Mage::helper('sales')->__('Registered notification about captured amount of %s.', $this->_formatPrice($amount));
    $state = Mage_Sales_Model_Order::STATE_NEW;
    $letsEmail = true;
    if ($this->getIsFraudDetected()) {
        $state = Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW;
        $message = Mage::helper('sales')->__('Order is suspended as its capture amount %s is suspected to be fraudulent.', $this->_formatPrice($amount, $this->getCurrencyCode()));
        $status = Mage_Sales_Model_Order::STATUS_FRAUD;
        $letsEmail = false;
    }
}

$transaction = $this->_addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE, $invoice, true);
$message = $this->_prependMessage($message);
$message = $this->_appendTransactionToMessage($transaction, $message);
$order->setState($state, $status, $message);
if ($letsEmail === true && !$order->getEmailSent()){
     $order->queueNewOrderEmail()->addStatusHistoryComment(
            Mage::helper('paypal')->__('Notified Customer')
        )
        ->setIsCustomerNotified(true)
        ->save();
}

This is now sending order confirmation emails.

Update 2

I now have an order where customer paid via paypal and then it showed pending-payment, which changed to cancelled and back to pending.

I cannot cancel the order, ship, invoice or nothing. only options we have are to edit,hold or delete order.

Update 3

I have also noticed that paypal orders at random get cancelled.

Below is a screenshot of an orders status history and as it illustrates an order goes to pending payment first then to pending. From here 3 seconds later it is set to cancelled. Why is this ?

I enabled debug but nothing at all was recorded in the /var/log location. Looking at transaction history and and ipn history on paypal I can see that the payment has come through successfully and ipn was confirmed/completed.

  I would now just like to know why sporadically (1 in 4 or so) the
  paypal orders get cancelled even though paypal order was successfully
  placed and paid for and payment information passed back to magento?


texts: rest api invoice capture does not save entry to transaction log

texts:
Magento faithfully logs the transaction detail when I manually capture an  invoice within the Magento store interface. I assume that Magento would likewise generate the same transaction detail entry when I programmatically capture an invoice through the Magento REST API. Unfortunately, this is not the case, as my automated script does not trigger whatever Magento process logs a successful credit card transaction.

I believe my Authorize.net account is set up properly. After I receive an order I can see that the customer's credit card has been auth checked. I can then use the Magento online interface to create an invoice and manually capture the credit card payment. This creates a beautiful transaction log entry within the order.

My goal has been to automate this process using the Magento 2 REST API. My automation uses the following REST endpoints:

use order to create invoice

POST /rest/v1/order/{order_id}/invoice
RETURNS integer {invoice_id}

use invoice to capture payment

POST /rest/v1/invoices/{invoice_id}/capture
RETURNS string true

I receive a string value response of true from the invoice capture, and I can log into my Authorize.net account and see that the credit card transaction has been settled. Unfortunately, this transaction detail is not logged in Magento against the order. The capture transaction entry is simply missing. I would rather not have to log into my Authorize.net account to verify the successful settlement of each transaction. I would rather that information be visible within Magento itself.

Is there another step I need to take to force the transaction capture entry to appear in the Magento order transaction history?


texts:
Tracing dependencies for: mage/bootstrap Error: ENOENT: no such file
  or directory, open 'C:/wamp64/www/Project
  /pub/static/frontend/Hiddentechies/custom/en_US/mageTranslationDictionary.js'
  In module tree:
      mage/bootstrap
         Magento_Ui/js/lib/knockout/bootstrap
           Magento_Ui/js/lib/knockout/bindings/bootstrap
            Magento_Ui/js/lib/knockout/bindings/i18n
               mage/translate

  Error: Error: ENOENT: no such file or directory, open
  'C:/wamp64/www/Project/pub/static/frontend/Hiddentechies/custom/en_US/mageTranslationDictionary.js'
  In module tree:

  mage/bootstrap

  Magento_Ui/js/lib/knockout/bootstrap

  Magento_Ui/js/lib/knockout/bindings/bootstrap

  Magento_Ui/js/lib/knockout/bindings/i18n

  mage/translate

at Object.openSync (fs.js:440:3)

Getting this error after running the bundling command.


texts: "404 error: Page not found" after restoring the site to a new location

texts:
I am trying to restore the current running magento 1.6.x to a new location for upgrade, however I am experiencing some issues with 404 with restored site from backup.

Old server is using Apache, new server is using Nginx, and it should ignore all .htaccess from old site, but as you can see http://www.dev.bestinnature.ca/ on both front and backend showing 404, I do not see any error other than 404 from nginx access or error log

Here are steps I've taken

setup a Nginx server, by using this environment I am enable to install a new Magento 1.9 without any issue
backup MySQL DB and entire old site files
restore MySQL DB, change unsecure and secure URL to http://www.dev.bestinnature.ca/
restore site files to new location
remove var/*
change local.xml to new MySQL DB
checked url rewrite from core_config is 0

There must be something from old site configuration that not recognizing the environment since any new install program works on this environment other than this backup.

I don't know what else to look for at this point, anyone can point me out any direction?


texts:
This how it should be, but what it looks like the frontend is:

This the Code for that specific attribute, that works like the description.

 <?php echo $_product->getData('sizechartadvanced') ?>


texts: Customer "Sign In" button not working anymore

texts:
I have run into a problem where the Customer "Sign In" button stopped working after a few uses.  Everything else so far about the store seems to be working as expected.

I am using a clean install of Magento 2.2.0 Open Source version, that was installed using Softaculous at my web hosting service.

Steps taken to produce the error:

In the store, I add a virtual, downloadable item to the cart.

I click the cart icon in the top right of the screen.

I click on the "View and Edit Cart" link in the small window that opens.

I click the "Proceed to Checkout" button on the right side of the screen.

The account popup form appears, and I put my credentials into it.

I click the "Sign In" button, and it turns a darker color of gray.

Nothing happens afer that, but the "Create Account" button on that same popup works though.

I tried using Internet Explorer and Opera browsers with a clean browser cache, but the result is still the same.

I posted the bug on the Magento 2 github page, but they haven't replied with a fix, and neither is there a fix listed as of today on their release page at https://magento.com/tech-resources/download

The reply that I did get on their github page is "The issue is already fixed in develop branch, 2.2.0",  but since I am still a newbie when it comes to using Magento 2,  I don't know what a develop branch is or how or where I am supposed to fix the problem.

Below is the Opera browser console output. These errors are only shown after the Sign In button is clicked:

  JQMIGRATE: Logging is active

  /pub/static/version1507935652/frontend/Magento/luma/en_US/Magento_Customer/js/view/authentication-popup.js:76

  Uncaught TypeError: Cannot read property 'currentTarget' of undefined

  at UiClass.login
  (/pub/static/version1507935652/frontend/Magento/luma/en_US/Magento_Customer/js
  /view/authentication-popup.js:76)

  at HTMLFormElement.
  (/pub/static/version1507935652/frontend/Magento/luma/en_US/knockoutjs/knockout
  .js:4241)

  at HTMLFormElement.dispatch
  (/pub/static/version1507935652/frontend/Magento/luma/en_US/jquery.js:5226)

  at HTMLFormElement.elemData.handle
  (/pub/static/version1507935652/frontend/Magento/luma/en_US/jquery.js:4878)

Attached below is the image of what I am talking about.

Any help is appreciated.  Thank you very much.


texts: how to set via or server name in magento in all emails

texts:
for example my website is url is www.xyz.com and it is hosted on a company server url is www.abcd.com . when i tried to place order then i am  getting in email  via  abcd.com. i am using WHM cpanel.how  i can set  via xyz.com in email.
please help me[![enter image description here][1]][1]


texts: Local.xml not loading after disabling theme

texts:
I installed a theme and after completely disabling the theme module by removing the etc/modules/.xml file. Then resetting the design back to default package and default theme in admin, the local.xml in default/default/layout doesn't load anymore.

What could the theme module change that would cause this?


texts:
How can I retrieve the category image (url) in the list.phtml file?

I am currently using this to get the current category:

<?php $category = $_objectManager->get('Magento\Framework\Registry')->registry('current_category'); ?>

But I don't know how to get the image url using $category?


texts: Echoing SERVER HTTP_REFERER in Magento 2

texts:
In native php we can display url referrer by echo $_SERVER['HTTP_REFERER'];.

Now by Magento 2 i want to do the same thing, i have tried echo $this->getRefererUrl();, but it gives me page not found without error.

What is the proper way to display referer url in Magento 2?


texts: Magento 2 formkey validator is not working properly in my custom module, return a 500 page

texts:
I have an issue that i can not use formkey Validator in my custom module, the module is working fine for me if i am just echoing some text messages, but if i construct the $formKeyValidator or the $formKey then will just return the 500 page, and the route url is correct for me

class Index extends \Magento\Framework\App\Action\Action
{
    protected $formKey;
    protected $formKeyValidator;

    public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Magento\Framework\Data\Form\FormKey\Validator $formKeyValidator,
        \Magento\Framework\Data\Form\FormKey $formKey
    )
    {
        $this->formKeyValidator  = $formKeyValidator;
        $this->formKey           =  $formKey;
        return parent::__construct($context);
    }

    public function execute()
    {

        echo 'Hello Magento 2! We will change the world!';
        exit;
    }
}

Thank you


texts:
I want to add my custom.phtml file on the top of all pages.

How can I do this using custom module ?

Any suggestion would be appreciated.

Thanks


texts: How call magento2 commands inside magento

texts: How I can call magento 2 commands inside magento 2? I just want to call a command in the UpgradeData.php.


texts: How to edit for existing shipping addresses in checkout page magento2?

texts:
How to edit the existing shipping address in checkout page. Magento2 have edit address option for only new added shipping address.

  Magento\Customer\view\frontend\web\js\model\customer\address.js

 isEditable: function ()
 {
 return true;
  },

Edit button is showing for existing shipping addresses. Please find the screenshot.

Display existing shipping address data in popup when click on respective existing shipping address Edit button.

But new shipping address is displaying instead of existing shipping address when click on existing shipping address.

How to resolve this issue. Thanks in advance.


texts: turn off url rewrites from sql / database

texts:
I have a mage install with url rewrites turned on, but the server does not do rewrites, so I need to turn rewrites off just to get into admin!

I deleted core_url_rewrite, but did not help.

It would not make sense that this was not possible but I have not found reference to such a table online?


texts: Magento 2 How to update SKU after saving product from admin panel?

texts:
I want to update product sku after save product.
I had used this event :- catalog_product_save_after
In Observer,

public function execute(\Magento\Framework\Event\Observer $observer)
    {
        try {
            $productId = $observer->getProduct()->getId();
            $product = $observer->getProduct();

            $product = $observer->getProduct();

            $sku = 'TestSku';
            $productFactory = $this->_objectManager->create('\Magento\Catalog\Model\ProductFactory');
            $otherproduct = $productFactory->create()->load($productId);
            $otherproduct->setSku($sku);
            $otherproduct->save();
       }
   }

But while saving product, it gives

  No Data Found Error

Please help me to fix it.


texts:
For some reason when i log in to the admin panel It's not loading the CSS and possibly JS.

Has anyone encountered this issue, could it be related to these errors?

  main.CRITICAL: Cannot gather stats! Warning!stat(): stat failed for /home/xxxxxx/public_html/xxx/pub/static/frontend/xxxx/xxx/en_GB/mage/requirejs/mixins.js {"exception":"[object] (Magento\Framework\Exception\FileSystemException(code: 0): Cannot gather stats! Warning!stat(): stat failed for /home/xxxxxx/public_html/xxxx/pub/static/frontend/xxxx/xxx/en_GB/mage/requirejs/mixins.js at /home/xxxxxxx/public_html/xxx/vendor/magento/framework/Filesystem/Driver/File.php:71)"} []
  [2018-04-24 17:04:01] main.CRITICAL: Cannot gather stats! Warning!stat(): stat failed for /home/xxxxxx/public_html/xxx/pub/static/frontend/xxxx/xxx/en_GB/mage/requirejs/mixins.js {"exception":"[object] (Magento\Framework\Exception\FileSystemException(code: 0):

Thanks


texts: Magento 2: How to translate payment module

texts:
I want to translate this text in payment module:

in file magento2-payment/i18n/pl_PL.csv I found that this text is translated. Just why does not it appear on the frontend?

https://github.com/dotpay/magento2-payment/blob/master/i18n/pl_PL.csv


texts: Error on sidebar's checkout button URL with IWD OPC extension

texts:
I have installed the IWD One Page Checkout extension on Magento 1.7.0.2, default theme.
The url in the sidebar checkout button URL isn't correct: it send to the default magento checkout ("../checkout/onepage").
Instead, the "top link" checkout link and the "checkout" button in the "cart" page works fine (sends to "../onepage"): the layout file "iwd_opc.xml" overwrite the checkout cart link.
Maybe I need something like this also for the sidebar's checkout button?

ps: changing template/sidebar.phtml from

<button type="button" title="<?php echo $this->__('Checkout') ?>"    class="button" onclick="setLocation('<?php echo $this->getCheckoutUrl() ?>')"<?php echo $this->__('Checkout') ?></button>

to

<button type="button" title="<?php echo $this->__('Checkout') ?>" class="button" onclick="setLocation('<?php echo $this->__('../onepage') ?>')"><?php echo $this->__('Checkout') ?></button>

It resolve the problem, but it's not an elegant solution...

thanks (I accept every suggestion..)


texts: Magento 2.4 deploy command does not creating minify file when I am in production mode

texts:
Magento 2.4.0: The static content deployment command does not create minify file when I am in production mode.
Getting error on below file. It's not creating so Magento cannot read it.
pub/static/adminhtml/Magento/backend/en_US/requirejs-min-resolver.min.js

It's making some all other files minified except requirejs-min-resolver.js and requirejs-config.js.
Does anyone have any idea how to fix it?


texts: Magento 2: Proper way to call a model from another extension that might not be installed

texts:
I'm looking for the proper way to reference a model or helper from another extension that might not be installed.

Normally I could just inject the helper or model into the construct such as the following:

namespace Company\Module\Controller\Process;

use Magento\Framework\App\Action\Action;
use Magento\Framework\App\Action\Context;

use AnotherCompany\AnotherModule\Helper\Data;

class Index extends Action
{

    protected $someHelper;

    public function __construct(Context $context, Data $someHelper)
    {
        $this->someHelper = $someHelper;
        parent::__construct($context);
    }

    public function execute()
    {

        $this->someHelper->getSomeValue();

    }

}

The problem is I can't guarantee that AnotherCompany\AnotherModule\Helper\Data exists in the installation when I craft the construct injection. Since using ObjectManager directly is considered to be inappropriate what would be the correct way to achieve something as follows? I'm injecting Magento\Framework\Module\Manager to check for the extension being enabled.

namespace Company\Module\Controller\Process;

use Magento\Framework\App\Action\Action;
use Magento\Framework\App\Action\Context;

use Magento\Framework\Module\Manager;

class Index extends Action
{

    public function __construct(Context $context, Manager $moduleManager)
    {
        $this->moduleManager = $moduleManager;
        parent::__construct($context);
    }

    public function execute()
    {

        if($this->isModuleEnabled('AnotherCompany_AnotherModule')):

            //Inject helper or model here from AnotherCompany_AnotherModule without using ObjectManager directly

        endif;

    }

    public function isModuleEnabled($moduleName)
    {
        return $this->moduleManager->isEnabled($moduleName);
    }

}


texts: magento 1.9 have issue with URL Rewrite Management and backlink from the same domain

texts:
I have a jewellery store site "finestgold.ca/store", there are approx 800 products, but in the URL Rewrite section it is showing "41701 records found" do I need to worry about site SEO ? if that much redirect cause problem?

Moreover, on Google webmaster my site showing

Top 14 pages linked from: finestgold.ca

Total links : 334,992 Total linked pages : 152

Can someone suggest how to fix this?


texts: How to properly extend Model in Magento 2?

texts:
Can someone show me how to properly extend this core Magento 2 model?

vendor/magento/module-eav/Model/Entity/Attribute/AbstractAttribute.php


texts: Magento 2 how to show shipping method between shipping address and payment?

texts:
i need to show shipping methods in next steps
1st step should be shipping address with "Next button",when user click on Next button then it should come in 2nd steps which is shipping method then after select shipping method then after click Next button then it should come in 3rd step which is payment.

like this -

how can we do ?

And i am able to create new step but i want to show shipping method in 2nd step.


texts: Product with Zero Salable quantity shows add to cart on listing page in magento 2

texts:
In my magento 2.3.3. One product with Salable quantity zero, shows Add to cart on listing pages.
https://prnt.sc/w7m8yo https://prnt.sc/w7m97d
When we click on product to open the product detail page, it shows Out of stock https://prnt.sc/w7m9t7
How to resolve this? Please help.


texts: Magento 2.4 : Frontend/Backend Not working

texts:
I am using below configuration :
Magento 2.4.x
PHP 7.4
Composer 2.0
Frontend and Backend is not working. All .htaccess files are there in required folder.
But still,I am getting below log in apache
GET /magento2/static/version1619677973/frontend/Magento/luma/en_US/Magento_Theme/favicon.ico HTTP/1.1" 404 39962 "http://127.0.0.1/magento2/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.72 Safari/537.36"
OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.41 (Ubuntu) (internal dummy connection)"
GET /favicon.ico HTTP/1.1" 404 488 "http://127.0.0.1/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.72 Safari/537.36"

Also notice in console that, pub folder is not considered.
Need Help.


texts: Magento: Free shipping with Tablerates and Discount

texts:
I'm currently using Magento 1.9.2.4 and have problem with free shipping with Tablerates in combination with discount code.

In the System -> Configuration -> Sales -> Tax I use:

Apply Customer Tax - After Discount

Apply Discount on Prices - Including Tax

That's working fine with everything I need. The problem is, that the discount amount is with tax and the value of the cart is without tax. For example:

I have free shipping from 39 €, the product costs 79,90 €, the coupon has a 50% discount and the product has 7% tax. In the Tablerates.php:

$request->getPackageValueWithDiscount() // 34.72 € - wrong!!! tax is subtracted from 79.90 and not from 39.95

after that I add the tax:

if (Mage::helper('tax')->priceIncludesTax()) {
   foreach ($request->getAllItems() as $item) {
      $request->setPackageValue($request->getPackageValue() + $item->getTaxAmount());
   }
}

and the final value of the cart is:

$request->getPackageValue() // 37.33 €

which is wrong. Because the value is under 39 € the shipping costs will be added :(

Any ideas how to solve the problem? I cannot change the tax configuration because the tax display in the frontend would be wrong.

Thank you!


texts: How can I add a footer block to all the pages?

texts:
I have been had a little problems by customizing luma's default footer, for that, I decided to delete it and in its place add a new block that i created in the admin.

I deleted the footer (not entirely, I left the copyright bar) via XML by doing

<referenceContainer name="footer" remove="true"/>

and created its substitute via admin, in where i added it to my home.

I want the block to be in all the pages as my old footer was.
What can i do?


texts: Magento 2.2.5 tax import - says successful but nothing in the tax rules or the SQL table - where are errors logged?

texts:
I have tried importing tax rules and although it says successful via the system>import tax module - nothing has been imported.  Checked the table to make sure but nothing is there.  I have looked in the normal log files to see if I can see any errors but nothing visible.

I tested by exporting the existing tax rates (this is a clean 2.2.5 install so just the standard 3 US rates available) - changed the name and rates and imported.  Still says imported successfully but nothing to be seen.

Any advice on where I might find the errors or is the command line option I can try where I will see any errors?

Any clues or advice very welcome.

Code Country State Zip/Post Code Rate Zip/Post is Range Range From Range To default

US CA * Rate 2 US CA * 9.1
US NY * Rate 2 US NY * 9.2
US MI * Rate 2 US MI * 9.3


texts:
How to create custom admin grid using block without using ui component in magento2.2.5?

Any help would be appreciated.


texts: Wrong product unit price in the cart when changing to a stock quantity not available

texts:
Whenever you try to change quantity from the cart and that quantity is not available in the inventory, unit price is wrong.

Example: I add Product A in the cart (simple product), first time I choose a quantity 1 from product detail page.

After that, I decide to change cart quantity to 3 and press Update button in the cart. In my inventory there are only 2 stock units of Product A.

Magento throw correctly a notice that is not possible to add 3 stock units in the cart for Product A but if you see under the unit price column, its price has been changed.

With a quantity of 2, unit price is 41,50 Euro, with a quantity of 3 unit price become 18,59 Euro. If I change quantity to 4, unit price become 9,37 Euro. So every time quantity is changed, it seems that unit price has been recalculated for some reason.

Is there a logical explanation to this strange behaviour?

Magento installed version: 1.9.3.1


texts: Custom module causing "Circular dependency" error after upgrading to Magento 2.3.2

texts:
I have a custom module with a plugin for Magento\Framework\Encryption\Encryptor that seems to be causing issues after upgrading to Magento 2.3.2 (from 2.3.1.) When I disable the module, everything works fine. When I enable it, I get "No commands in the  namespace" for any namespace I try to use.  When I run bin/magento list I get a more detailed error message:

In ServiceManager.php line 1130:

  An abstract factory could not create an instance of magentosetupconsolecommandbackupcommand(alias: Magento\Setup\Console\Command\BackupCommand).

In ServiceManager.php line 941:

  An exception was raised while creating "Magento\Setup\Console\Command\BackupCommand"; no instance returned

In Di.php line 865:

  Missing instance/object for parameter maintenanceMode for Magento\Setup\Console\Command\BackupCommand::__construct

In ServiceManager.php line 1130:

  An abstract factory could not create an instance of magentoframeworkappmaintenancemode(alias: Magento\Framework\App\MaintenanceMode).

In ServiceManager.php line 941:

  An exception was raised while creating "Magento\Framework\App\MaintenanceMode"; no instance returned

In Developer.php line 55:

  Circular dependency: Magento\Framework\Logger\Monolog depends on Magento\Framework\Cache\InvalidateLogger and vice versa.

I'm fairly certain that it's the plugin on Encryptor causing this, because when I remove that plugin from di.xml the error goes away.

I've also tried commenting out all of the methods from the plugin, so that it's just an empty class, but the error persists.  It appears to be the bare fact that there is a plugin registered for that class that is causing the error.

Any ideas why this might be? I'm not sure why enabling a plugin would appear to cause an error somewhere else entirely, especially when that plugin doesn't even have any methods in it.  It worked perfectly well in 2.3.1, as well.


texts: uicomponent form add new button for modal

texts:
I have build a custom form using uicomponent I want to add a button and on click want to open a modal with product grid.

How can I achieve this using uicomponent form ?


texts: IsSaleable always true for all products in Wishlist and Compare

texts:
I have certain products that I want as in store only, so I added a boolean attribute to them and modified the IsSaleable check to look for that. This works fine in the product view but for the Wishlist and Compare pages the add to cart button still shows up and $product->isSaleable() always returns 1. For the compare page it even lets the customer add the product to the cart (in wishlist it just puts up a red error).

I'm looking at the /template/catalog/product/compare/list.phtml and /template/wishlist/item/column/cart.phtml files and I know they are the right ones since commenting out the button in them works on the site.


texts: different color and size but same price. configurable product needed?

texts:
I've both color and size attribute but no change in price.

What method I've to follow if the product just need to list the color and size as drop down in front end and need to be imported these attributes as I upload product csv.

Need to add it as configurable product? Is there any other option?


texts:
I'm using magento 2.

Can you help me to edit Product info tabs content show one page and click the tab will scroll, same url below?

https://marketplace.magento.com/swissup-easytabs.html#product.info.description


texts: How to add search result page In all page as it 's magento 2

texts:
As per our requirement in magneto 2,
User can search any item in site and get the result as per search and that's working fine.
But that result stays and showing on all pages in magneto 2.
If user doesn't search any item then it's showing previous search result,
Search result page gets bounded on top of page, when user search, previous results are shown,
It's some difficult functionality for Me in  magento 2,
So, can anyone doing this one so Please comment, and suggest
related solution and share link for this,
Thanks you.


texts: Magento2 Get product custom options on product list page

texts:
$customOptions = $objectManager->get('Magento\Catalog\Model\Product\Option')
    ->getProductOptionCollection($_product);

if (empty($customOptions)) { //check if product has custom options. If it doesn't go to the next product
    continue;
}

foreach($customOptions as $option) {
    $values = $option->getValues();
    if (empty($values)) { //check if option has values (Option can have values only if option type is checkbox, radio, multiselect or drop-down)
        continue;
    }

    foreach($values as $value) {
        $valueData = $value->getData(); //do whatever you want will value data
    }
}

I try this code but not working ?!


texts:
Magento 2 extension_attributes not update generate after comple
Bellow is extension code:

<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Api/etc/extension_attributes.xsd">
    <extension_attributes for="Magento\Customer\Api\Data\AddressInterface">
        <attribute code="distance" type="string"/>
    </extension_attributes>
</config>

Bellow is genarated file:

<?php
namespace Magento\Quote\Api\Data;

/**
 * Extension class for @see \Magento\Quote\Api\Data\AddressInterface
 */
class AddressExtension extends \Magento\Framework\Api\AbstractSimpleObject implements AddressExtensionInterface
{
    /**
     * @return \Magento\SalesRule\Api\Data\RuleDiscountInterface[]|null
     */
    public function getDiscounts()
    {
        return $this->_get('discounts');
    }

    /**
     * @param \Magento\SalesRule\Api\Data\RuleDiscountInterface[] $discounts
     * @return $this
     */
    public function setDiscounts($discounts)
    {
        $this->setData('discounts', $discounts);
        return $this;
    }

    /**
     * @return \Magento\Framework\Api\AttributeInterface[]|null
     */
    public function getCheckoutFields()
    {
        return $this->_get('checkout_fields');
    }

    /**
     * @param \Magento\Framework\Api\AttributeInterface[] $checkoutFields
     * @return $this
     */
    public function setCheckoutFields($checkoutFields)
    {
        $this->setData('checkout_fields', $checkoutFields);
        return $this;
    }
}

I remove generate file and also run di:compile But not working,
I use addressinterface:

<?php
namespace Danielozano\CustomerAttribute\Model;
use Magento\Checkout\Api\Data\ShippingInformationInterface;
use Magento\Framework\View\Element\Template;
use Magento\Framework\View\Element\Template\Context;

class AddressInterface extends Template {

    /**
     * @var ShippingInformationInterface
     */
    private $_addressInformation;

    /**
     * @param Context $context
     * @param ShippingInformationInterface $addressInformation
     * @param array $data
     */
    public function __construct(
        Context $context,
        ShippingInformationInterface $addressInformation,
        array $data = []
    ) {
        $this->_addressInformation = $addressInformation;
        parent::__construct($context, $data);
    }

    /**
     * Get custom Shipping Charge
     *
     * @return String
     */
    public function getShippingCharge()
    {
        $extAttributes = $this->_addressInformation->getExtensionAttributes();
        return $extAttributes->getDistance(); //get custom attribute data.
    }
}

Log error on shipping:

[2020-03-08 02:41:07] main.CRITICAL: Report ID: webapi-5e645b43bf0dc; Message: Property "Distance" does not have accessor method "getDistance" in class "Magento\Quote\Api\Data\AddressExtensionInterface". {"exception":"[object] (Exception(code: 0): Report ID: webapi-5e645b43bf0dc; Message: Property \"Distance\" does not have accessor method \"getDistance\" in class \"Magento\\Quote\\Api\\Data\\AddressExtensionInterface\". at /home/scyllat6/public_html/sla/m2/vendor/magento/framework/Webapi/ErrorProcessor.php:208, LogicException(code: 0): Property \"Distance\" does not have accessor method \"getDistance\" in class \"Magento\\Quote\\Api\\Data\\AddressExtensionInterface\". at /home/scyllat6/public_html/sla/m2/vendor/magento/framework/Reflection/NameFinder.php:100)"} []

I try to create a address attribute in Magneto 2.3.4 CE From Bellow link
https://devdocs.magento.com/guides/v2.3/howdoi/checkout/checkout_new_field.html


texts: Doing simple Ajax call - ajax URL not outputting anything

texts:
app/etc/modules/Custom_Customajax.xml

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

app/code/local/Custom/Customajax/controllers/AjaxController.php

<?php
class Custom_Customajax_AjaxController extends Mage_Core_Controller_Front_Action {

    public function indexAction() {
        $this->loadLayout();
        $this->renderLayout();
    }
}

app/code/local/Custom/Customajax/etc/config.xml

<?xml version="1.0"?>
<config>
  <modules>
    <Custom_Customajax>
      <version>0.1.0</version>
    </Custom_Customajax>
  </modules>
  <frontend>
    <routers>
      <Customajax>
        <use>standard</use>
        <args>
          <module>Custom_Customajax</module>
          <frontName>customajax</frontName>
        </args>
      </Customajax>
    </routers>
    <layout>
      <updates>
        <customajax>
          <file>customajax.xml</file>
        </customajax>
      </updates>
    </layout>
  </frontend>
</config>

mytemplate/layout/customajax.xml

<?xml version="1.0"?>
<layout version="1.0">
  <customajax_ajax_index>
    <block type="customajax/customajax" name="root" output="toHtml" template="customajax/customajax.phtml" />
  </customajax_ajax_index>
</layout>

mytemplate/template/customajax/customajax.phtml

<?php

echo 'test';

Ajax call

$('.submit-form').click(function(e) {
    e.preventDefault();
    $.ajax({
        url: "/mysite/customajax/ajax/index",
        type: "POST",
        success: function(data) {
            if(data.success) {
                $('#results').html(data.message);
            }
        }
    });
});


texts: How to load the specific country name dropdwon in admin side magento 2?

texts:
Basically when i add below code in system.xml file it load all the countries in admin side

<field id="showmethod" translate="label" type="select" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="0">
                    <label>Show Method if Not Applicable</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                    <frontend_class>shipping-skip-hide</frontend_class>
                    <depends>
                        <field id="active">1</field>
                    </depends>
                </field>

but i want to get only one country in dropdown .Is there any way to do this?


texts: Change Product Rankings in Category View

texts: I'm trying to change the order of products that appear on the category view page. The searchindex_weight attribute works to reorder searches, but it has no bearing on the listing in the category view. So far, I've come up with nothing that I can change that will affect it. Any ideas?


texts:
I am facing an issue with customizable options.
When I add a custom option to a product, I receive an error on the product page:

1 exception(s):
Exception #0 (Exception): Notice: Array to string conversion in web/.../public_html/app/design/frontend/../Magento_Catalog/templates/product/view/form.phtml on line 53

Here is the form.phtml code:

<?php
/**
 * Copyright © 2016 Neoxero. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

/**
 * Product view template
 *
 * @var $block \Magento\Catalog\Block\Product\View
 */
?>

<?php /* @escapeNotVerified */ //  print_r( $block->getJsonConfig()); ?>

<?php $_helper = $this->helper('Magento\Catalog\Helper\Output'); ?>
<?php $_product = $block->getProduct(); ?>

    <form action="<?php /* @escapeNotVerified */ echo $block->getSubmitUrl($_product) ?>" method="post"
          id="product_addtocart_form"<?php if ($_product->getOptions()): ?> enctype="multipart/form-data"<?php endif; ?>>
        <input type="hidden" name="product" value="<?php /* @escapeNotVerified */ echo $_product->getId() ?>" />
        <input type="hidden" name="selected_configurable_option" value="" />
        <input type="hidden" name="related_product" id="related-products-field" value="" />
        <?php echo $block->getBlockHtml('formkey')?>
        <?php echo $block->getChildHtml('form_top'); ?>
        <?php if (!$block->hasOptions()):?>
            <?php // echo $block->getChildHtml('product_info_form_content'); ?>
        <?php else:?>
            <?php if ($_product->isSaleable() && $block->getOptionsContainer() == 'container1'):?>
                <?php echo $block->getChildChildHtml('options_container') ?>
            <?php endif;?>
        <?php endif; ?>

        <?php if ($_product->isSaleable() && $block->hasOptions() && $block->getOptionsContainer() == 'container2'):?>
            <?php echo $block->getChildChildHtml('options_container') ?>
        <?php endif;?>
        <?php echo $block->getChildHtml('product_cart_wish_compare'); ?>
        <?php echo $block->getChildHtml('form_bottom'); ?>
    </form>
<script>
    require([
        'jquery',
        'Magento_Catalog/js/price-box'
    ], function($){
        var priceBoxes = $('.catalog-product-view [data-role=priceBox],.modal-dialog [data-role=priceBox]');

        priceBoxes = priceBoxes.filter(function(index, elem){
            return !$(elem).find('.price-from').length;
        });

        priceBoxes.priceBox({'priceConfig': <?php /* @escapeNotVerified */ echo $block->getJsonConfig() ?>});
    });
</script>

Any suggestion to solve this issue? Thanks in advance.


texts: How to use a library using composer in a Magento 2 module

texts:
At the moment I'm developing a module for Magento 2. I'm using a third party library ("twizo/lib-api-php") and installed it using composer. When I use a class from this library, Magento gives me the error "Class Twizo\Api\Twizo' not found". How can I autoload the files from this vendor directory? My composer.json file looks like this now:

{
  "name": "twizo/authentication",
  "type": "magento2-module",
  "version": "0.1.0",
  "autoload": {
    "psr-4": {
      "Twizo\\Authentication\\": ""
    },
    "files": [
      "registration.php"
    ]
  },
  "require": {
    "twizo/lib-api-php": "^0.10.0"
  }
}

When I remove the files section of composer.json it works. But according to the Magento package validation tool each module's composer.json file has to contain a field section so that's no really an option.

If I require the autoload.php file manually like this: require __DIR__ . '\..\..\..\vendor\autoload.php';, Magento gives the error that my module is already defined, so I think it will do the autoload twice.
How can I fix this?

Module 'Twizo_Authentication' from 'C:\xampp\htdocs\magento\app\code\Twizo\Authentication' has been already defined in 'C:/xampp/htdocs/magento/app/code/Twizo/Authentication'.


texts: Magento product page image load very slow on chrome browser

texts: My store product page images load very slow in chrome browser and it load fast in Firefox.


texts: Ran into case of catalog price rules only applying on Save and Apply

texts:
I imported a large number of products yesterday with Store Manager for Magento and and just waited for the cron that night to apply the price rules. Price rules apply on a custom attribute.

The next morning the special prices aren't there. Cron monitor says catalogrule_apply_all ran this morning at 4:50am and catalog_product_index_price_reindex_all ran at 5:45am.

I looked at the catalog_product_price table to see what prices were assigned to one of the imported products:

SELECT
    cpe.sku,
    cpp.rule_price,
    cw.name
FROM catalogrule_product_price cpp
LEFT JOIN catalog_product_entity cpe
    ON cpe.entity_id = cpp.product_id
LEFT JOIN core_website cw
    ON cw.website_id = cpp.website_id
WHERE cpe.sku LIKE 'SKUPATTERN%'
GROUP BY cpp.website_id, cpp.rule_price

And what I discovered was that there weren't any: if I edit the price rule and click Save and Apply, entries begin to show up here in this table with the proper price. (Save and Apply takes maybe 30-50 seconds to run for each rule)

And they begin to show up on the front end as well.

Clicking Apply Rules in Promotions > Catalog Price Rules doesn't put any new entries into catalogrule_product_price nor do they show up in the front end.

Similarly, re-indexing all the indexes doesn't do anything.

I try explicitly running the catalogrule_apply_all etc. cron jobs manually via AOE Scheduler (http://www.fabrizio-branca.de/magento-cron-scheduler.html) to no effect.

I tried a few different variations on external scripts (https://stackoverflow.com/questions/8655913/cant-apply-catalog-price-rule-programmatically) to apply the price rules programmatically/manually (which I'm more or less doing from the front end already), but without success.

Anyone have any ideas on what's going wrong? I know the cron job normally takes care of everything. Maybe what went wrong this time was that the imported products was set to Disabled. Maybe that makes the price rules engine ignore them. I feel like if I could just find out what Magento does at night when it works its price rule magic and call it manually, everything would work.

I've been saving and applying for a few hours now while simultaneously trying other solutions. Saving and applying it is the only thing that seems to build the associations between the rules and products.

I'm supposing that Store Manager did the import via SQL only and because of that it doesn't build the associations that get built when you add a product by hand. Does that mean all SQL imports like what Store Manager does won't apply price rules?

This is Magento CE 1.6.0.0. Some similar reports:

www.magentocommerce.com/boards/viewthread/79931
www.magentocommerce.com/boards/viewthread/227080

One said that the Magento Team "fixed" the bug, without saying what it was, back in 1.4.2.

Even if I had a way to programmatically run Save and Apply on each rule one right after the other from the command line, it would be better than what I have now.


texts: Magento 2.3 - Always show reviews on pageload

texts:
I use the tab-view on the product page for mobile devices, but I show all the tabs open at once on the desktop view.

This causes a problem with the reviews. The form for adding a review is shown, but the existing reviews themselves don't show.

I realise they must be getting loaded by Knockout when normally you click the tab. But me having all the tabs open onload means the reviews never get shown. It does work however, if I add #reviews to the product.

review.phtml is loaded, but the JS in there doesn't seem to fire, I think this is the cause of this issue. Anyone got a lead on how to modify this so it does fire on page load?

<script type="text/x-magento-init">
{
    "*": {
        "Magento_Review/js/process-reviews": {
            "productReviewUrl": "<?= $block->escapeJs($block->escapeUrl($block->getProductReviewUrl())) ?>",
            "reviewsTabSelector": "#tab-label-reviews"
        }
    }
}
</script>


texts: how to create a custom tree similar to the back office category one in Magento 2?

texts:
I'm trying to create a left menu like the category one in a custom module to display my own hierarchy. I want to use a custom model from a custom table.

I was able to get the category tree in my module by adding the following files :

vendor/magento/module-catalog/view/adminhtml/templates/tree.phtml
Magento\Catalog\Block\Adminhtml\Category\Tree.php

Now I want to edit the content and I can't find how.
I tried to modify the getSuggestedCategoriesJson() method with no success.

Can anyone help me?


texts: getFinalPrice() on associated simple product returns base price not parent product special price

texts:
I have 2 products one is configurable and has a special price of 100 and the associated product has no special price assigned and Final Price is not being returned on the associated product.

I am programmatically loading these...

How do I get the typical "cart" behavior that would assign the associated product the final price value of 100?

$configurable_product = Mage::getModel('catalog/product')->load(1);

$configurable_product->getFinalPrice(); // returns 100

$associated_product = Mage::getModel('catalog/product')->load(2);

$associated_product->getFinalPrice(); // returns 200


texts:
I used this command  to dump all of the customers:

n98-magerun db:dump --strip="@customers"

This works fine, but this generates me a file where I have the create/drop queries. I don't need that. Is there a way to generates only insert queries ?

Thx


texts:
When is it more appropriate to create a .phtml file and place it via local.xml, and when is it more appropriate to create a widget and place it in a static block via the backend?

For example, I once had my custom main navigation as a widget/block on the backend, but moved it into a .phtml file and included it with my local.xml so that I could more easily make changes, use version tracking, etc.

My main concern is the impact it could have on performance, since my main navigation includes a list of dozens of Magento categories.

So whats 'best practice'? Does it matter? Does it impact performance?


texts: How to get next and previous product on detail page in Magento 2?

texts: I am new to Magento 2 and I can not find view.phtml file in Catalog. I want to show previous and next product from the category of the current product in Product detail Page, do any on know how can I do this?


texts: Magento 2: Error in magento2 product list when i have reviews with rating

texts:
I'm new developer and I'm trying to learn magento.
I have installed Magento 2 CE (with sample data, but I removed them and I have only a few products) on Debian 9.
The mode is the developer and I have activated debug

If I have review with rating, magento stop listing products at product which has rating and displays:

  [Sun Jun 24 10:05:56.838062 2018] [:error] [pid 2112] [client
      192.168.1.2:61078] PHP Fatal error:  Uncaught Error: Call to a member function getReviewsCount() on string in
  /var/www/html/mg/vendor/magento/module-review/Block/Product/ReviewRenderer.php:97\nStack
  trace:\n#0
  /var/www/html/mg/vendor/magento/module-review/view/frontend/templates/helper/summary_short.phtml(14):
  Magento\Review\Block\Product\ReviewRenderer->getReviewsCount()\n#1
  /var/www/html/mg/vendor/magento/framework/View/TemplateEngine/Php.php(59):
  include('/var/www/html/m...')\n#2
  /var/www/html/mg/vendor/magento/framework/View/Element/Template.php(270):
  Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Review\Block\Product\ReviewRenderer),
  '/var/www/html/m...', Array)\n#3
  /var/www/html/mg/vendor/magento/framework/View/Element/Template.php(300):
  Magento\Framework\View\Element\Template->fetchView('/var/www/html/m...')\n#4
  /var/www/html/mg/vendor/magento/framework/View/Element/AbstractBlock.php(667):
  Magento\Framework\View\Element\Template->_toHtml()\n#5
  /var/www/html/mg/vendor/magento/module-review/Block/Product/ReviewRenderer.php(77):
  in
  /var/www/html/mg/vendor/magento/module-review/Block/Product/ReviewRenderer.php
  on line 97, referer: http://debdev.loc/men.html

If I disable ratings, the product list appears normally with the link "n reviews" below its name.

What I'm doing wrong?

Thanks


texts: Help identifying which controller is currently in use

texts:
I've been asked to make a couple of seemingly simple changes to a Magento (version 1.7.0.2) admin page however I'm brand new to Magento and a bit bewildered. I can identify the controller that is responsible for the page that I need to change and I can make simple changes to the text and add variables to display (using $GLOBALS in the controller - is this bad practice?). That's about all I think I need to do.

The page I need to change is:

www.mywebsite.com/index.php/admin/sales_invoice/view/invoice_id/1559/key/1dsdfuy9etc/

And the relevant controller file is app/code/core/Mage/Adminhtml/controllers/Sales/Order/InvoiceController.php

The following page I cannot track down so well:

www.mywebsite.com/index.php/webforms/adminhtml_webforms/index/key/9313313cd8etc/

How do I track down this controller? I want to find out how this page gets it's data and then try and add one or two bits of it to the first page. I've ran find / -type d -name webforms via ssh and it turned up the following results (which don't seem to reveal what controller is controlling the page):

/home/die/public_html/app/locale/ru_RU/template/email/webforms
/home/die/public_html/app/locale/fi_FI/template/email/webforms
/home/die/public_html/app/design/frontend/base/default/template/webforms
/home/die/public_html/app/design/adminhtml/default/default/template/webforms
/home/die/public_html/skin/frontend/base/default/webforms

Any pointers welcome!


texts:
I am running magento 1.9.1 website on AWS EC2 Ubuntu machine. Customer registration emails are going out but transnational emails are not going.

I configure SMTP by AWS SES service with SMTP Pro extension. I got below error on email sending

2017-07-29T06:54:31+00:00 ERR (3):
Zend_Mail_Protocol_Exception: Must issue a STARTTLS command first
 in /var/www/html/lib/Zend/Mail/Protocol/Abstract.php:431
Stack trace:
#0 /var/www/html/lib/Zend/Mail/Protocol/Smtp/Auth/Login.php(91): Zend_Mail_Protocol_Abstract->_expect(Array)
#1 /var/www/html/lib/Zend/Mail/Protocol/Smtp.php(217): Zend_Mail_Protocol_Smtp_Auth_Login->auth()
#2 /var/www/html/lib/Zend/Mail/Transport/Smtp.php(200): Zend_Mail_Protocol_Smtp->helo('localhost')
#3 /var/www/html/lib/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Smtp->_sendMail()
#4 /var/www/html/lib/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#5 /var/www/html/app/code/local/Aschroder/SMTPPro/Model/Email/Template.php(132): Zend_Mail->send(Object(Zend_Mail_Transport_Smtp))
#6 /var/www/html/app/code/core/Mage/Core/Model/Email/Template.php(508): Aschroder_SMTPPro_Model_Email_Template->send('sharma.sdaf...', Array, Array)
#7 /var/www/html/app/code/core/Mage/Core/Model/Email/Template/Mailer.php(83): Mage_Core_Model_Email_Template->sendTransactional('sales_email_ord...', 'sales', Array, Array, Array, '1')
#8 /var/www/html/app/code/core/Mage/Sales/Model/Order.php(1354): Mage_Core_Model_Email_Template_Mailer->send()
#9 /var/www/html/app/code/core/Mage/Sales/Model/Order.php(1369): Mage_Sales_Model_Order->queueNewOrderEmail(true)
#10 /var/www/html/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php(139): Mage_Sales_Model_Order->sendNewOrderEmail()
#11 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_Sales_OrderController->emailAction()
#12 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('email')
#13 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#14 /var/www/html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#15 /var/www/html/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#16 /var/www/html/index.php(87): Mage::run('', 'store')
#17 {main}

cron_schedule table is also empty


texts: First session add to cart action empties cart / clears session

texts:
I'm running an Nginx sandwiched Varnish backed magento 2.3.6 shop in development mode, set up like:
Frontend nginx port 443, varnish port 80, backend nginx port 8080, plus redis for session cache. Nothing strange, fairly common setup.
Been developing my shop without varnish, but now after enabling varnish it seems that when I start my site with a clean magento cache, clean redis, clean varnish, and visit my site, add a product to the basket, after ~2 seconds I can see the cart being emptied.
After reading the entire internet, I'm at a loss. Disabling Varnish fixes this issue. Disabling Redis does not.
I've discovered that in my session storage ALL _session_validator_data have a remote_addr of 127.0.0.1, which seems wrong. Also the x-forwarded-for value is empty in all sessions.
After the first occurence, it does not happen again. When I enter production mode, it also doesn't happen.
Anyone has some pointers on the fix? Or some pointers on the troubleshooting? I've been looking for some 'advised' setup with Nginx SSL offloading in combination with Varnish, but the ones I can easily find on the interwebs seem to do the same as I'm doing....
thx in advance.


texts: Is there a way to have all options in the admin panel expanded all the time? (magento 2.1)

texts:
I'm wondering if there is a simple way to have all sub-options loaded in the expanded view all the time?

For example, every time I need to work with a category in the category tree, all of its config options are always collapsed. I would LOVE if there was a way to see all the options in default expanded view mode (all the time). It sounds ridiculous, but the amount of unnecessary clicks is getting really annoying.


texts:
I am using magento 2.3.2 and installed the theme and enable the theme module but i am not able to run the php bin/magento setup:upgrade command.
please check the below image

Any Solution please
Note: var and pub folders permissions are changed to 777


texts:
I have big problems with my payment methods on my website. When I adda to cart one product and proceed to checkout, on the second step where i need to(as a guest) fill the fields with informations name , adress etc., when I click on the continue button  and magento does some loading but finishes and stays on the page. I cant complete a simple shopping! any ideas? i'm using a downloaded theme, but I dont think tahat is the reason.

Help guys!


texts:
My categories are displayed this way:
- Main Category
  - Product type
    - Brand

I want to display the image of the third level category on the homepage.
Can anyone help me?


texts: Running Indexer gives Permission denied error

texts:
I am trying to run indexer. but when i enter command CLI shows this error
http://prntscr.com/ntzzlt

also i always need to give permission to generated folder, Pub folder and Var Folder after running Setup Upgrade

  sudo chmod 777 -R generated, pub, var


texts: How do I export all of my store images for download? This is a very old site (V1.9.2.1) which a client wants me to shut down but we need those images. Thanks so much.


texts: Magento - 2.2.4 Community Edition : How to create two separate admins for separate websites in one admin panel?

texts:
How to create two separate admins for separate websites in one admin panel?

I created websites for Vizag and for Hyderabad as domain.com/vizag and domain.com/hyd.

We want to create two admins for Vizag and Hyderabad.

Vizag website and Hyderabad website are two different websites under single magento installation.

Means, worked on multiple websites. Vizag store wants to see only vizag website and hyderabad store wants to see hyderabad website only. but main admin can see both website's actions.


texts: Unable to display a Google Sitelinks Search Box for my site

texts:
I have added below code in my homepage

    <![CDATA[
     <script type="application/ld+json">
     {
         "@context": "http://schema.org",
         "@type": "WebSite",
         "url": "https://www.example.com/",
         "potentialAction": {
         "@type": "SearchAction",
         "target": "https://www.example.com/catalogsearch/result/?q=
         {search_term_string}",
         "query-input": "required name=search_term_string"
         }
      }
</script>
]]>

Though not able to display google sitelinks search box while searching in google. Is there any change to be done.?


texts:
How can I override this file on my theme?

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

I'm a newbie to M2


texts: how to display custom extra fee charges on frontend at orders, invoice, print totals in magento

texts: I have made an module which adds the discount and extra fee charges in the orders, invoice, print totals without overriding collect() and fetch(), I have used observer to calculate at sales_quote_collect_totals_after, but I am not able to figure out from where to make this free charges appears in the calculations of orders, invoice, print totals in front end.


texts:
how to update downloadable product quantity in shopping cart in magento thuough php

$_product = Mage::getModel("catalog/product")->load($p_id);
$quote = Mage::getSingleton('checkout/session')->getQuote();
$item = $quote->getItemByProduct($_product);
$quote->updateItem($item->getId(), array( 'qty' => $p_qty)); getCart()->save();


texts: Magento Template Tag Output (storeDirective)

texts:
I'm adding a textearea to the Catalog > Manage Categories > General Information tab in which I can put additional description for the category page. In the frontend this needs to appear at the bottom of the category, below the category collection. I want to do this in the form of a custom module and so far everything works, except for one tiny little issue.

I want to use Magento Template Tags in the backend textarea, like the {{store direct_url=''}} storeDirective, but this doesn't work in the frontend. Somehow the output for those tags is not correct. It gives www.domain.com/category/%7B%7Bstore direct_url''%7D%7D

I've read that the value comes from the Mage_Core_Model_Email_Template_Filter class and therefore I have created a Mynamespace_Mymodule_Model_Template_Filter class which contains

class Mynamespace_Mymodule_Model_Template_Filter extends Mage_Core_Model_Email_Template_Filter
{
}

But this doesn't work. I'm stuck now and would really appreciate any help.

Thank you!


texts: Hide Attributes and Other Fields in Product Edit Backend

texts:
To make editing of products (and maybe also categories) for the shop owner easier, we would like to hide some unnecessary tabs and fields from some users in the admin backend.

This means: Hiding some attributes, but also tabs like "customer reviews", "cross-selling" etc.

How can this be done?


texts: magento related product tab on admin panel not visible

texts:
in my magento Product Information page on admin panel .related product link not visible.
I try reindexing clear cache and basic thing to fix this but no results.
I haven't any idea why this happen.


texts: Adding classes for active progress on one page checkout

texts: I would like to have an active class for the current step I am in in the progress.phtml file but there seems to be no way of knowing which step I'm in inside that file. How can I achieve this?


texts: M2 Circular dependency: CalculateOrders\Metric depends on CalculateOrders\Metric and vice versa

texts:
how can I fix this error ?

**Circular dependency**:

Heckfy\Health\Model\Metrics\CalculateOrders\Metric depends on Heckfy\Health\Model\Metrics\CalculateOrders\Metric

and vice versa

I have class metric manager where I try to init my metric object like this:

$this->metric = $this->objectManager->create('Heckfy\Health\Model\Metrics\CalculateOrders\Metric');

I guess the problem in my metric class:

class Metric extends AbstractMetric
{
 public $collectionFactory;
 public function __construct(
        \Magento\Sales\Model\ResourceModel\Order\CollectionFactory $collectionFactory
    )
    {
        $this->collectionFactory = $collectionFactory;
    }
}

Because without constructor it works well.
I tried debug it and found this part of code inside method create().

if (isset($this->creationStack[$requestedType])) {
            $lastFound = end($this->creationStack);
            $this->creationStack = [];
            throw new \LogicException("Circular dependency: {$requestedType} depends on {$lastFound} and vice versa.");
        }

Looks like magento already init this class and put it to $this->creationStack. But how?

What I am doing wrong ?


texts: Can use of a coupon be shown in order information?

texts: I have created a coupon which I called click&collect, enabling customers to avoid paying freight by collecting their order from our physical shop. I would like the use of this coupon to show up on the order information, so I know that the order is special and I don't need to ship it. Can Magento do this?


texts: Categories links in breadcrumbs have empty title attribute in Magento 2

texts:
On my site, title attributes of breadcrumbs links are empty. Only home page breadcrumb link has a title attribute. I need it for seo optimization.
How to add a title for categories breadcrumbs links?


texts: Can you still update extension via Magento Downloader?

texts:
In mid September magento has switched to magento Marketplace and shut down Magento Commerce website. I have several extensions that I originally installed via Magento Commerce key and they show the update is available for them when I check in the Magento Downloader

Can I update these extensions via Magento Downloader? My only concern is that Magento Commerce website is no longer available I am not sure how the update will go.


texts: On my website I have homepage, Page 1, Page 2 and Page 3. Now there are subpages in Page 1 and Page 2 which I want visitors to first login (by site registration or through social media account)and then view further content. After logged-in, they can view all the subpage's content of only Page 1 and Page 2. For Page 3 different loginID is required. How to do it? is there any plugin to control that?


texts: How to set allow decimal qty to yes for all products magento 2

texts: I need to set this configuration to yes for all product is there a way to do it once fo all products ?? any idea please


texts: Weird Error "error: error in [unknown object].fireEvent()"

texts:
I'm getting this error on selecting customer name from manage customer section in magento admin panel

error: error in [unknown object].fireEvent():
event name: address_country_changed  error message:
cannot read property 'show' of undefined.


texts: Login link add as dropdown into my account magento 2.1.x

texts:
I want to show My account menu as drop-down and add Login/Logout link in it.

Currently it shows as separate menu link in top.links >> header.links

here is my default.xml
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="3columns" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<update handle="default_head_blocks" />
<body>
      <referenceBlock name="top.links">
           <block class="Magento\Wishlist\Block\Link" name="wish-list-link" before="my-account-link">
                <block class="<vendor_name>\<module_name>\Block\WishlistCollection" name="wishlist_header" as="wishlist.header" template="<vendor_name_<module_name>::wishlist_items.phtml"/>
           </block>
      </referenceBlock>
      <referenceContainer name="header.panel">
           <block class="Magento\Cms\Block\Block" name="header_top_text" after="-">
                <arguments>
                     <argument name="block_id" xsi:type="string">header_top_text</argument>
                </arguments>
           </block>
      </referenceContainer>

    <move element="top.links" destination="header-wrapper" after="minicart" />
    <move element="authorization-link" destination="top.links" after="-"/>
        <referenceBlock name="register-link" remove="true" />
        <referenceBlock name="authorization-link" remove="false" />
        <referenceBlock name="header" remove="true"/>  <!-- remove welcome msg   -->
        <referenceBlock name="footer_links" remove="true" />
        <referenceBlock name="report.bugs" remove="true" />
        <referenceBlock name="catalog.compare.link" remove="true"/>
       <!-- <move element="copyright" destination="before.body.end" />   -->
   </body>
  </page>

Any Suggestions how to set Login/Logout in my accountstrong text as drop-down.

Note : It's Custom theme with parent theme as blank so don't give suggestion with luma theme.


texts: Magento 2: why we use cache mechanism at a block level?

texts:
I have a doubt that I see some cache codes in layout xml like below
 <referenceContainer name="store.menu">
            <block class="Vendor\Megamenu\Block\Megamenu"
                name="megamenu"
                template="Vendor_Megamenu::Vendor/Megamenu/megamenu.phtml"
                before="-" ttl="3600">
                 <arguments>
                    <argument name="cache_lifetime" xsi:type="number">3600</argument>
                </arguments>
             </block>
        </referenceContainer>

So I do not define cache at block level so Magento 2 Full page mechanism will get that block in cache automatically ,so My question is if Magento 2 already do full page in cache blocks so why we define block level cache ?


texts: Magento 2 add product to cart with custom price from the custom controller?

texts:
I have a created a product with price: 0, Now i would like to add a product with custom price from my custom controller. since i am submitting a custom form in the customer dashboard to my controller. i have placed code as shown below. please suggest me how i can achieve this.

Screenshot:

<?php
    namespace CompanyName\ModuleName\Controller\Customer;
    use Magento\Framework\Controller\ResultFactory;
    use Magento\Framework\App\Action\Action;
    use Magento\Framework\App\Action\Context;
    use Magento\Framework\View\Result\PageFactory;

class Paytradecommission extends \Magento\Customer\Controller\AbstractAccount
{

    protected $resultPageFactory;
    protected $formKey;
    protected $request;

    public function __construct(
    Context $context,
    \Magento\Framework\Data\Form\FormKey $formKey,
    PageFactory $resultPageFactory,
    array $data = [])
    {
        $this->formKey = $formKey;
        $this->resultPageFactory = $resultPageFactory;
        parent::__construct($context);
    }

    /**
     *
     * @return \Magento\Framework\View\Result\Page
     */
    public function execute()
    {

        $selectedOrdersList=$this->getRequest()->getParam('orderinc');

        $resultPage = $this->resultPageFactory->create();
            $params = array(
                'form_key' => $this->formKey->getFormKey(),
                'product' =>2047,//product Id
                'qty'   =>1,//quantity of product
                'price' =>100 //product price
            );

            $this->_redirect("checkout/cart/add/form_key/", $params);
        /** @var \Magento\Framework\View\Result\Page $resultPage */
        return $resultPage;

    }
}

Conditions:

1. I am able to add a product to cart but it shows '0' but unable to add custom price.

2. After add a product it should redirect to checkout page.