texts: Unable to see "My Magento U" on left side navigation to access learning portal

texts:
I just bought Magento 2 training courses by registering at this link.

I got a mail with below information.

  Once logged into your account, go to http://training.magento.com to
  access your My Magento U training portal. (Alternatively, you may
  click the “My Account” link at top of page to access your Account page
  and then click on “My Magento U” on left side navigation to access
  your learning portal.)

I am Unable access training videos and unable to find My Magento U at -> my account -> left side.

Any one can help me on this query.


texts: Adding category on home page shows only 1 product

texts:
I have researched on this issue about Magento 1.9 not adding the category to the home page. So, I ended up adding:

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

To the home page content. It also shows up on the home page BUT: only with 1 product out of 5. Why is that and can this be changed?

I am still very new to Magento and I haven't changed anything at the layout bit.
I have seen this post: Same problem, but no one has answered (and I can't comment on it), I have followed these steps - but all of it didn't work.


texts: Attribute values not showing up in configurable product

texts:
I am having a little problem with a configurable product. The configurable product is a sofa with two attributes used to customize the sofa: fabric and color.

I created a new attribute set for Sofa and added those two attributes in an attribute group called Sofa Options.

I created a couple of simple products:

Sofa black velvet
Sofa blue velvet
Sofa red velvet
Sofa black microsuede
Sofa blue microsuede

And one configurable product sofa with all of those simple products as associated products.

Now when I go to the front end and I select color black for instance I would expect to see the fabric dropdown selectbox being populated with velvet and microsuede. However it only shows microsuede.
The same problem when I select blue. I only see velvet in the fabric dropdown box.

I double-checked all the simple products for the color and fabric attributes and they are all set correctly. I also flushed the cache and re-indexed. Any ideas what could be causing this behavior?

Edit:
Ooph, this is painful. Turns out those simple products had Status Disabled somehow. I still don't understand how I could have missed that and also unsure why they were set to Disabled to begin with, because I'm 100% sure that I did not disable them manually.

Anyway thanks for the suggestions and help.


texts: How to add jQuery to Magento 1 email templates

texts: Is it possible to add jQuery to Magento 1 email templates? I would like to modify some text in email templates with jQuery.


texts: How to add a sort order condition in magento

texts:
I placed a sort order condition in my product collection . I need to sort my products in the order of

Promotional products -> quantity available

In  promotional products, i need to sort based on promotion to date i.e the products with nearest expiry date should be sorted first.

I'm not getting the condition to sort the promotional products based on their promotion to date.

please help me...
Thanks in advance....


texts: Adding filterable 'Manage Stock' column to catalog admin grid

texts:
After reading many answers here (and a load of Google searches), I've gotten Magento to almost do what I want it to do.  Basically, I want to add a column to the 'Manage Products' page under Catalog.  Right now, I've been successful in adding the column where I want it, and with a drop down, but I have a couple of issues:

1) the drop down in the header is displaying the 'Attrib. Set Name' options instead of the 'Manage Stock' options

2) Nothing is showing up in the product listings for that column on that page

Below is my code and I'm hoping someone can spot my (obvious) mistake(s).  TIA.

EDIT: After a bit more reading, I'm thinking that I may need to do a 'joinTable' to get the value that I'm looking for, but still not quite there.  I've updated the code below, but I'm getting a fatal error in the protected function '_prepareColumns', on the array name value pair 'index' => 'manage_stock'.  The error in my Apache logs is: "PHP Fatal error:  Call to a member function getBackend() on a non-object"

EDIT 2: Made minor changes over the weekend but was unable to get it working.  Updated code is below; still producing the fatal error.

EDIT 3: Updated code per Yiorgos' suggestion, and the error went away, as well as something being populated in the field for the product.  However, I seem to have a poor understanding of how the options field of the array in the 'addColumnAfter' method in the '_prepareColumns' protected function.  No matter what I do there, the data shown in the column is whatever the first element of the array is, regardless of what the setting for the actual product is.  I've tried the following:

'options' => array (0 => 'No', 1 => 'Yes') --> All products show 'No'
'options' => array ('0' => 'No', '1' => 'Yes') --> All products show 'No'
'options' => array (0 => 'Yes', 1 => 'No') --> All products show 'Yes'
'options' => array ('0' => 'Yes', '1' => 'No') --> All products show 'Yes'

EDIT 4: Code has been updated below as per Yiorgos', but I'm still having some issue with it not filtering properly.  Example - when I filter for 'No', I still get products are are set to 'Yes' (says no in the category column) even though the product is set to 'Yes'.

Sample of catalog page, product example outlined in red:

Product inventory section of product from catalog page:

Updated Code:

<?php

class MyCompany_Catalog_Block_Adminhtml_Catalog_Product_Grid extends Mage_Adminhtml_Block_Catalog_Product_Grid
{
    public function setCollection($collection)
    {
        $store = $this->_getStore();
        $collection->joinField('manage_stock',
            'cataloginventory/stock_item',
            'manage_stock',
            'product_id=entity_id',
            '{{table}}.stock_id=1',
            'left');
        parent::setCollection($collection);
    }

    protected function _prepareColumns()
    {
        $store = $this->_getStore();
        $this->addColumnAfter('manage_stock',
                array(
                        'header'=> Mage::helper('catalog')->__('Manage Stock'),
                        'index' => 'manage_stock',
                        'type'  => 'options',
                        'options' => array (
                            '0' => Mage::helper('core')->__('No'),
                            '1' => Mage::helper('core')->__('Yes'),)
                ),
                'qty'
        );
        return parent::_prepareColumns();
    }
}


texts: How to get product rating using object manager in magento 2

texts:
i want to get products rating using object manager i tried below mention code but its not working for me please guide me

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$reviewFactory = $objectManager->create('Magento\Review\Model\Review');

$storeId = $this->_storeManager->getStore()->getId();
$reviewFactory->getEntitySummary($product, $storeId);

$ratingSummary = $product->getRatingSummary()->getRatingSummary();


texts:
I have a strange issue, I have deployed production mode with the command

  bin/magento deploy:mode:set production

it works perfectly, when I take a look at

  bin/magento deploy:mode:show

the result is Current application mode: production. (Note: Environment variables may override this value.) which is expected.

But in the backend I see a developer mode behavior :

Still have "Stores > Advanced > Developer" available (which is mainly not displayed in production mode).
And in "System > Cache Management" I still have the ability to enable/disable cache.

Files and database was developed in local machine, and I made dump of DB and files to put them in the production server, now I am stuck with this issue and I need your kind help.

Many thanks


texts:
I have an issue with Magento 2.3.0 where I can't upload a store logo image file. The upload button does not appear in the admin section under content->configuration.

Is there anyway to get this back.
I have a development server which is a duplicate of my live site and it shows fine.

Anyone know what is going on?


texts: Is Magento's Ship from Store flow available in Magento Open source

texts: If not is there an extension that helps in that usecase?


texts: Magento 2 Google recaptcha js load failed

texts:
Recently installed a demo, found Google recaptcha loading error, and open sometimes normal and sometimes wrong,
I tried it many times and still can't solve it. Have any friends encountered this problem, how to solve it.

GET https://www.google.com/recaptcha/api.js?onload=globalOnRecaptchaOnLoadCallback&render=explicit net::ERR_CONNECTION_TIMED_OUT

https://www.google.com/recaptcha/api.js?onload=globalOnRecaptchaOnLoadCallback&render=explicit


texts: Should community module template files be in base/namespace or just base

texts:
When creating a community module i know it is good practice to place template files in the base directory.

But, should they also be under a namespace directory.

For example with a namespace/module of MyCompany/MyModule would the template files be:

app/design/frontend/base/default/template/mycompany/myodule

or just directly under base as in:

app/design/frontend/base/default/template/myodule


texts: Magento Unable to find item to save issue

texts:
Weird issue.  We have our site on a local development server and everything works great.  We have the site on our live server environment as well and if we try to use any third party extension, we get the error Unable to find item to save when we try to add or modify.  We use GIT so the files are the exact same.  We dumped the live database, grabbed a copy of local, and replaced.  Same issue.  We've flushed cache and re-indexed.  Still get the error.

Live server is running nginx while local is running apache.

Any ideas?


texts:
I'm trying to install a new extension via the Web Setup Wizard but the page returns a 404 code.

I've tried the following so far:

Added a "test.php" file in the /setup/ folder to verify that we can access it, I can access "https://domain.com/setup/test.php" without issues
Added various checkpoints in the /setup/index.php file. Adding echo "test";die(); at any point in the file correctly returns "test" when visiting /setup/. If I add that at the end of the file (after \Zend\Mvc\Application::init(require _.... visiting /setup/ retuns 404 again.

Other solutions I've found for the issue do not seem to apply.

The website is served under the root folder (not /pub/)

Another solution I found suggests using files to store sessions instead of the database, we already do that.

Any suggestions on what the issue might be?


texts: Show only attributes from one particular Attribute Set group

texts:
So I have an Attribute Set called Tractor Parts and in that set I have a group called Manufacturers.

Currently I have 3 attributes in the group

allis_chalmers
Case
john_deere

What I am trying to do is list these attributes in a tab on the product view ONLY if the attribute has a value for this product.  I can pull the value off the attributes individually but this is not elegant at all, not to mention cumbersome...

I can get the attribute names from the group and get those to show in the tab. I am not sure how to go about getting the value of the attribute for the current product.

Here is the code I have at the moment

<?php
require_once 'app/Mage.php';
Mage::app();

$attributeGroupCollection = Mage::getResourceModel('eav/entity_attribute_group_collection');

foreach ($attributeGroupCollection as $attributeGroup) {
$attributeGroup->getAttributeGroupId();
}

  $attributeCollection = Mage::getResourceModel('eav/entity_attribute_collection')
    ->setAttributeGroupFilter($attributeGroup->getAttributeGroupId());
?>

        <col width="25%" />
        <col />

        <?php foreach ($attributeCollection as $attribute): ?>

                <?php echo $attribute->getStoreLabel() ?>
                <?php echo ***attribute value for product*** ?>

        <?php endforeach; ?>

The bold Italic part is what I can't figure out.  I think I need to load the product but not sure how.  Any help would be greatly appreciated!!


texts:
Is there a way to update this code to work with Magento2? I believe VarienForm has been depreciated in Magento2 but I can't find a similar JS constructor to get the object.
var AddToCartForm = new VarienForm('#my_form');


texts: Magento 2: How to validate phone number by their country?

texts: Hello i want to validate phone number in my checkout page but i want phone number validation by their country ,if customer select the USA as country then phone number should accept only usa number if customer select China as country then phone number accept only china number how can i do that?


texts: Magento 2: discount coupon not working ONLY on checkout page

texts:
In Magento 2.3.3 and I have noticed that the discount code is not working on the Checkout Page.

The weird thing is that, It is working on the Cart Page, but on the Checkout Page It doesn't do anything.

On top of that, the buttons don't even have any text. In order to click on the right button, I have checked using inspect the element in order to check which one is the Cancel and which one is the Apply button.

Here is a screenshot

How can I fix it? Any suggestions?

Thanks!


texts:
Our home page started showing up as a category page, rather than our normal home page (not a category page).

When I go to /cms I do see our normal home page.

I've checked the configuration and everything seems ok.  The layout files and template files haven't changed.

Can someone point me in a direction for this?  I can provide more info as needed.


texts: Magento Event for change of interface locale (or language locale)

texts: Is there any event dispatched when you change the interface locale ?


texts: Magento 2 Extension attribute to Payment method

texts:
I want to set Extension attribute to

V1/carts/mine/shipping-information

API response like below.

{
    "payment_methods": [
        {
            "code": "braintree_cc_vault",
            "title": "Stored Cards",
            "extension_attributes": {
                "test-data" : 1
            }

        },
        {
            "code": "braintree_paypal",
            "title": "PayPal",
            "extension_attributes": {
                "test-data" : 1
            }
        },

Anyone have idea how can i add ?


texts: SOAP v2 API occasionally ignores filters

texts:
I'm using the SOAP v2 API to pull a list of orders with the following filters:

$params = array(
    array('key' => 'state', 'value' => 'processing')
);
$complex_params =array(
    array('key'=>'created_at','value'=>array('key' =>'from','value' => $dateFrom)) // GMT
);
$orders = $this->client->salesOrderList($this->session, array('filter' => $params, 'complex_filter' => $complex_params));

This works 95% of the time. Once every couple of days the API will ignore the date range and state filters and return all the orders. This can cause problems as it will return all orders! It returns so many orders with some stores that it hits my PHP memory limit.

Has anyone else run into this before? Is there anything that can be done (other than raise the PHP memory limit)?

Follow up:

I never found a consistent solution to this. I've communicated with many different Magento installations over the years and only some had this issue but I was never able to pinpoint the root cause. For Magento I just always double check the result data.


texts: M2 2.3.1 White screen on Product page after compile

texts:
I'm experiencing a white screen of death on product detail pages (both simple & grouped) after running the php bin/magento setup:di:compile command. I've tracked it down to the global.php file in the generated/metadata folder. If I rename this file then the pages display absolutely fine. How can I troubleshoot this issue, ? So that global.php is generated correctly. The white screen gives no obvious error messages and IO cannot see any relevant entries in the log files..

Any help would be appreciated.

Thanks in advance..!


texts:
I have enabled merging for javascript and css from my magento 2 store admin panel. But I can still see all the css coming unmerged in my view source. Javascript merge is working fine and coming merged. Any help here would be appreciated.

I have already set magento to production mode.


texts:
I have created custom module, In that I have just override the Mage_Catalog_Block_Product class to get the getPrice(). But it's returning an error Call to a member function getProductId() on a non-object?

my php code is:

//controller

<?php
class Course_Mca_IndexController extends Mage_Core_Controller_Front_Action
{
    public function indexAction()
    {
        $this->loadLayout();
        $this->renderLayout();
    }
}

//block file

<?php

class Course_Mca_Block_Products extends Mage_Catalog_Block_Product
{
    public function getPrice()
    {
          return parent::getPrice();
    }
}

//web.phtml file

<?php echo $this->getPrice() ?>

//layout.xml file

<?xml version="1.0"?>
<layout version="0.1.0">
    <mca_index_index>
        <reference name="content">
            <block type="mca/products" name="mca_mca" template="mca/web.phtml"></block>
        </reference>
    </mca_index_index>
</layout>

//Course_mca.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Course_Mca>
            <active>true</active>
            <codePool>local</codePool>
            <depends>
                <Mage_Catalog/>
            </depends>
        </Course_Mca>
    </modules>
</config>

//config.xml

<blocks>
<!-- it's not working -->
        <!-- <catalog>
              <rewrite>
                  <product>Course_Mca_Block_Products</product>
              </rewrite>
          </catalog>-->
<!-- it's working -->
            <mca>
               <class>Course_Mca_Block</class>
           </mca>
    </blocks>

Can anyone tell me where I went wrong?

Thanks in advance.


texts: getConfig from extension to lib file, how?

texts:
I want to use value of config.xml and system.xml file from module in a file when located in "lib" directory in root of magento, but I don't know how!

Tried many searches but didn't find my answer, because all of them use in classes and models of self extension, I need read from app/community/Company/Mymodule/etc/config.xml ...


texts: Magento 2 Command line throw errors in developer mode

texts:
In production mode, my website is working fine. But as soon as I enable developer mode, I can not use command line any more.

In developer mode, if I use for example php bin/magento cache:flush, I'll get the following error.

Invalid Document
Element 'virtualType', attribute 'name': [facet 'pattern'] The value '01' is not accepted by the pattern '(\\?[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*)(\\[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*)*'.
Line: 23

Element 'virtualType', attribute 'name': '01' is not a valid value of the atomic type 'phpClassName'.
Line: 23

Element 'virtualType', attribute 'name': Warning: No precomputed value available, the value was either invalid or something strange happend.
Line: 23

This happens to every command I use in developer mode.
What happened?


texts: How to get json of products/storeConfig by making a request with an url?

texts:
I'd like to setup Magento so that if I make a request with an URL such as:
http://mymagento.com/api/storeconfig (actual url format not important)

would return json with the data requested. How can I achieve this? Here's how I'm retrieving the data:

public function getStoreSettings()
{
    //this successfully retrieves the value of my custom settings property
    $my_property= Mage::getStoreConfig('my_module/my_settings/my_property', 'default');

    $data = array('my_property'=>$my_property);
    $json = Mage::helper('core')->jsonEncode($data);

    //return json here
}

Where would the right place to add this code? How can I map an URL to call this function and return the response as json? I appreciate if anyone could point me in the right direction!


texts: How to change new subscriber pop-up message?

texts:
How do I change this popup text after a customer puts in their email to subscribe to the newsletter?
I have looked in the NewAction.php and its not there.
I am using magento version 2.3.4
Thanks


texts: Modification with Paypal Extension in magento2

texts:
I want to  use Paypal as the payment gateway in magento2.
Paypal doesn't support ZAR currency.
Is there any paypal extension for magento that will allow me to use ZAR currency.
Or What i have to do to change the core of the extension to achieve my goal.


texts:
I have this error :

  Refused to apply style from
  'http://www.portailclient-dev.com/pub/static/version1528816010/frontend/My/Theme/fr_FR/css/custom-m.css'
  because its MIME type ('text/plain') is not a supported stylesheet
  MIME type, and strict MIME checking is enabled.

In my default_head_blocks.xml, I have this (my theme extends luma) :

<head>
        <meta name="viewport" content="width=device-width, initial-scale=1"/>
        <css src="mage/calendar.css"/>
        <css src="css/custom-m.css"/>
        <script src="requirejs/require.js"/>
        <css src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css" src_type="url" />
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js" src_type="url" />
    </head>

I do i fix this?

EDIT

The solution :

change <css src="css/custom-m.css"/>
to <css src="Magento_Theme::css/custom-m.css"/>


texts: Adding my account url to top headers issue

texts:
I want to add to top header an url with myaccount if the user is logged in.
This is my xml

<block type="experius_linkmanager/link_list" name="linkmanager.topnav" as="topMenu">
    <action method="setIdentifier"><key>hoesjes-topmenu</key></action>
    <action method="insert"><blockName>cart_sidebar</blockName></action>
</block>

This is the code from header.phtml.

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


texts: can't save new category in magento2 admin panel

texts:
Magento2 admin panel adds new category save then error show.

  "Something went wrong while saving the category."

So give me a solution.


texts: How to sort options values for multiple select attributes?

texts:
I have a large list of option for the "manufacturer" multi-select attribute.

When I add a new manufacturer, it's going to be on top of the list. I'd like to sort all those options in alphabetical order so that when a store manager adds a new product, he will find it easily in the "Manufactures" drop down menu.


texts: Is it possible to update the order item quantity in Magento?

texts:
I want to update the ordered product quantity from the sales order view page (admin side). I have added a new button and actions for update order quantity. But I don't know what are the tables needs to updated for this. or else is there any other solution?(without creating new order concept).

I already gone through below one.

https://stackoverflow.com/questions/12563078/is-it-possible-to-update-order-items-quantity-in-magento

Thanks


texts: how to solve local wampserver windows 10 magento2.3.4 Invalid Form Key. Please refresh the page

texts:
local wampserver windows 10 magento2.2 to 2.3 Invalid Form Key. Please refresh the page. and Your session has expired errors click addtocart,wishlist,subscribe buttons. magento2.3.4 error i try following below:

php.ini &.htaccess &users php_value session.cookie_lifetime 86400
php_value session.gc_maxlifetime 86400
    php_value max_input_vars 700000
    php_value memory_limit 5G
    php_value max_execution_time 18000
and catch clear and flush and
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
php bin/magento indexer:reindex
php bin/magento setup:di:compile
removed var/* pub/static/*

and setting cookies life time 3600 http only yes
please help 'Invalid Form Key. Please refresh the page' solution


texts:
How can I redirect all my 404 routes to the home page without changing my .htaccess file?

I'd like to know some Admin configuration or module.

Thanks


texts: how to integrate magento minicart in wordpress

texts: I am in the process of implementing minicart in wordpress. How do we can call minicart of magento in wordpress .


texts: Magento 2 create Order programatically and set a custom date to it

texts: I have a order to create an order in magento 2. But the order it create is with the date when i run the script. I don't want to save the current date for the order. I want to set a certain date to the that order.


texts:
I have a product with a custom option. I also have 2 store views, 1 being English & 1 being German.

When I set the price in the store view for English or German it doesn't update. However if I set the price in the "Default Values" store view then it updates but it obviously updates for both English and German.

Is this a bug with Magento as the admin allows me to untick default and enter a new price but doesn't save it?


texts:
I've been battling this issue for a bit now and it's driving me crazy.

Essentially I'm trying to get the raw posted data sent to my controller (which extends \Magento\Framework\App\Action\Action).

In Magento 1.x you can fetch the raw request body in a controller by running the following in a controller method:

$data = $this->getRequest()->getRawBody();

Now that I'm trying to port a M1 module to M2 I've been unable to figure out the correct way to do this.

I've tried the following (and poked at a few other things to no avail):

$rawBody = $this->_rawBody;
$postValueData = $this->_request->getPostValue();
$postData = $this->_request->getPost();
$getData = $this->_request->getParams();

$this->logger->debug('$rawBody:');
$this->logger->debug(print_r($rawBody, true));
$this->logger->debug('$postValueData:');
$this->logger->debug(print_r($postValueData, true));
$this->logger->debug('$postData:');
$this->logger->debug(print_r($postData, true));
$this->logger->debug('$getData:');
$this->logger->debug(print_r($getData, true));

The output I get in my log file from this is the following:

[2018-06-15 07:09:03] main.DEBUG: $rawBody: [] []
[2018-06-15 07:09:03] main.DEBUG:  [] []
[2018-06-15 07:09:03] main.DEBUG: $postValueData: [] []
[2018-06-15 07:09:03] main.DEBUG: Array
(
)
 [] []
[2018-06-15 07:09:03] main.DEBUG: $postData: [] []
[2018-06-15 07:09:03] main.DEBUG: Zend\Stdlib\Parameters Object
(
    [storage:ArrayObject:private] => Array
        (
        )

)
 [] []
[2018-06-15 07:09:03] main.DEBUG: $getData: [] []
[2018-06-15 07:09:03] main.DEBUG: Array
(
)
 [] []

As you can see, not a lot of data there.

The way I'm testing this is by running the following from the command line:

curl -H "Content-Type: application/json" -X POST --data '{"orderReference": 000000001}' http://127.0.0.1:8080/my/controller/

I feel like I'm missing something obvious here...


texts:
I am trying to import reviews to our Magento 1.9V, so after finishing I noticed that stars aren't showing on product. I used this module to import reviews, also I edit extension to import stars in my custom rating option. And after I dig deep I found that:

1- In the Admin area:

Summary Rating  isn't Available

2- In the database product is exist in review table.

3-In the database product is not exist in rating_option_vote_aggregated table.

So how we can re-aggregated value of imported review?


texts: magento 2: override block Magento\CatalogSearch\Model\Layer\Filter\Category.php

texts:
How to override file Magento\CatalogSearch\Model\Layer\Filter\Category ?

In above file with one $private key available and its create issue to override.

I want to do modify function _getItemsData() from this file.

Code for i have done:

etc/di.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\CatalogSearch\Model\Layer\Filter\Category" type="Name\Module\Model\Layer\Filter\Category" />
</config>

Code for Name\Module\Model\Layer\Filter\Category.php

in construct i have to add category model,

<?php
/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
namespace Name\Module\Model\Layer\Filter;

use Magento\Catalog\Model\Layer\Filter\AbstractFilter;
use Magento\Catalog\Model\Layer\Filter\DataProvider\Category as CategoryDataProvider;

/**
 * Layer category filter
 */
class Category extends \Magento\CatalogSearch\Model\Layer\Filter\Category
{
    private $dataProvider;
    protected $categorys;
    public function __construct(
        \Magento\Catalog\Model\Layer\Filter\ItemFactory $filterItemFactory,
        \Magento\Store\Model\StoreManagerInterface $storeManager,
        \Magento\Catalog\Model\Layer $layer,
        \Magento\Catalog\Model\Layer\Filter\Item\DataBuilder $itemDataBuilder,
        \Magento\Framework\Escaper $escaper,
        \Magento\Catalog\Model\Layer\Filter\DataProvider\CategoryFactory $categoryDataProviderFactory,
        \Magento\Catalog\Model\Category $categoryFactory,
        array $data = []
    ) {
        parent::__construct(
            $filterItemFactory,
            $storeManager,
            $layer,
            $itemDataBuilder,
            $escaper,
            $data
        );

        $this->dataProvider = $categoryDataProviderFactory->create(['layer' => $this->getLayer()]);
        $this->categorys = $categoryFactory;
    }
    /**
     * Get data array for building category filter items
     *
     * @return array
     */
    protected function _getItemsData()
    {
        /** @var \Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection $productCollection */
        $productCollection = $this->getLayer()->getProductCollection();
        $optionsFacetedData = $productCollection->getFacetedData('category');
        $category = $this->dataProvider->getCategory();
        $categories = $category->getChildrenCategories();

        $collectionSize = $productCollection->getSize();
        //echo 'testes';exit;
        if ($category->getIsActive()) {
            foreach ($categories as $category) {
                if ($category->getIsActive())
                {
                    $this->itemDataBuilder->addItemData(
                        $this->escaper->escapeHtml($category->getName()),
                        $category->getId(),
                        1//custom add count
                    );
                }
            }
        }
        return $this->itemDataBuilder->build();
    }
}

After remove var folder and check in frontend,

Notice: Undefined variable: dataProvider in app/code/Name/Module/Model/Layer/Filter/Category.php on line 28
        #0 /var/www/html/mayvillagetrading-com/app/code/Name/Module/Model/Layer/Filter/Category.php(28): Magento\Framework\App\ErrorHandler->handler(8, 'Undefined varia...', '/var/www/html/m...', 28, Array)


texts: Magento 2 Functional Testing Framework Error!

texts:
I am having trouble installing Functional Testing Framework (FTF) on my Magento 2.

Here is the FTF Guide: http://devdocs.magento.com/guides/v2.0/mtf/mtf_introduction.html

But in this step: http://devdocs.magento.com/guides/v2.0/mtf/mtf_quickstart/mtf_quickstart_environmemt.html

It tells me to enter these on the terminal:

cd <magento2>/dev/tests/functional/utils
php generate.php

But then it throws an exception error:

$ php generate.php
PHP Fatal error:  Uncaught exception 'Exception' with message 'Invalid Document
Element 'server': This element is not expected.
Line: 23
' in <mymagento2path>/dev/tests/functional/vendor/magento/mtf/Magento/Mtf/Config/Reader/Filesystem.php:170
Stack trace:
#0 <mymagento2path>/dev/tests/functional/vendor/magento/mtf/Magento/Mtf/Config/Reader/Filesystem.php(129): Magento\Mtf\Config\Reader\Filesystem->_readFiles(Object(Magento\Mtf\Util\Iterator\File))
#1 <mymagento2path>/dev/tests/functional/vendor/magento/mtf/Magento/Mtf/Config/Data.php(96): Magento\Mtf\Config\Reader\Filesystem->read(NULL)
#2 <mymagento2path>/dev/tests/functional/vendor/magento/mtf/Magento/Mtf/Config/Data.php(36): Magento\Mtf\Config\Data->load()
#3 [internal function]: Magento\Mtf\Config\Data->__construct(Object(Magento\Mtf\Config\Reader\Filesystem))
#4 <mymagento2path>/dev/tests/functiona in <mymagento2path>/dev/tests/functional/vendor/magento/mtf/Magento/Mtf/Config/Reader/Filesystem.php on line 170

I have no idea what it is talking about! Please help me!


texts:
I am facing issue where price shown on list page is not same as shown on view page.

We usually update price via Magmi or using Wiser pricing tool. I am not sure why this thing happens, I usually run price indexer after updating prices.

Can this issue is because of Full Page Caching enabled? I use a third party FPC module for Full page caching.

I understood, that price are calculated on the fly on View page and for list page it is fetched from index tables. Can we calculate prices on fly for list page too?if yes, what are the drawbacks for doing this?

Thanks.


texts:
If you have store categories in the backend and do not specify a URL key, Magento automatically generates it.
However, Magento reacts with umlauts and special characters not as one expects.

From an "ä" an "a", from an "ö" an "o" and from a "ü" a "u". The same applies to the uppercase letters.

Example: [domain.com]/testö.html

I want like this: "ä" an "ae", "ö" an "oe", "ü" a "ue"

URL Example: [domain.com]/testoe.html


texts: add validation on qty box added with add to cart button on product list?

texts:
I have added a qty box with add to cart button on product list page like

<input type="number" min="1" name="qty" maxlength="12" value="1" title="<?php /* @escapeNotVerified */ echo __('Qty') ?>" class="input-text qty" data-validate="{'required-number':true,digits:true,'validate-greater-than-zero':true}"/>

How I can validate this?


texts: add store name dynamically to all product meta titles

texts: Tried adding {{store}} and {{store_name}} in the Mask for Meta Title to output the site name on each product in the Product Fields Auto-Generation. Any idea if possible or what the correct store name variable is?


texts: Displaying products on the front page does not work

texts:
Magento 1.9.3.7
Porto theme

I did a fresh install of Magento 1.9.3.7. I installed the Porto theme. The setup is identical to the one I have in Magento 1.9.1 but when I put the following code into the CMS home page - it does not show any products:

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

(I have included the correct category ID which is a subcategory of the root category. It does not work with the category ID of the root category either)

I've tried this code as well as all the codes in this post and none works:

https://stackoverflow.com/questions/4253389/magento-how-to-display-all-products-in-the-homepage

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

The code I have in my Magento 1.9.1 website is this (it does not work in my Magento 1.9.3.7 store either):

<p>{{block type="catalog/product_list" category_id="26" template="catalog/product/list.phtml"}}</p>

I noticed that on the page referenced - someone wrote: "I also had to allow the block on System/Permissions/Blocks" --) Would that have something to do with this and how do I find out the Block name and path to set the permission to?

What does work is displaying Featured products via this:

<style type="text/css">.main-container, .col-main{padding-top:0;padding-bottom:0}</style>
{{block type="filterproducts/featured_home_list" product_count="8" column_count="4" template="filterproducts/flex_grid.phtml"}}

We can't have that though as we really need to display products from a category so that we can sort them in a specific order.


texts: Disable Simple Product associated to configurable product when configurable product is disabled

texts:
Just wondering how do I disable a simple product automatically when a configurable product is disabled?

Some times the products we have, we want to disable on our website however a configurable product has over 5-8 simple products associated to it. When I disable configurable product, simple product still stays enabled!

Any suggestion to make it automatically disable associated product?

Thanks


texts:
I read many article on SE but excuse me for not having knowledge of servers. I have tried turning off "Use Web Server Rewrites", but no change. I get 404 page which says "Not found", to which i used my knowledge of SE posts, which said to use index.php before the url e.g

  www.abc.com/index.php/men/new

and this work, but i have to put index.php manually. Why is it happening and how can i fix it because my "use web server rewrites" is turned off too.


texts: Configurable product on back-end In Stock but in frontend showing Out of Stock

texts:
I have a strange problem. In the backend I configured a configurable product with a simple product and assigned stock to the simple product.

Also the product has the status In Stock

But the add to cart option is not displaying on the website. Any idea why ?


texts: whats is the purpose of magento for keeping hash code in image path?

texts:
Actually I am developing an API in other language and All I am getting using the database but issue lies with the images path. AS resize() function create cached image path and cached image path can differ for every product (mainly due to the hash code folder because its dynamically generated folder at run time). Now for developing API I need to keep generic path but as hash code folder are different I am unable to create generic path for the images. Therefore I need some information so that I can do the changes in my magento code.

1.)I need to know why magento use hash code in image path while resizing the image?

2.) Are we covering any scalability issue or Performance issue by keeping hash code in image cached path?

3.) Can we hard code the hash code in file so every there will be single hash code?


texts: SoapClient::__call() error inside Payment::capture()

texts:
Trying to implement custom payment using SOAP.
Payment system has working examples for php5 https://shop.nets.eu/web/partners/sample-code.

Soap works fine if I run this samples as plain PHP, but inside magento Soap fails.

When I send payment confirmation on checkout I Recieve error from magento REST:

http://mat24.dev/rest/default/V1/guest-carts/62398ebea871c954c98044c1fbe1da1f/payment-information

Status Code:400 Bad Request

{"message":"Unable to place order. Please try again later."}

Code fails at this string

$OutputParametersOfRegister = $client->__call()

Inside capture method I debugged all information and everything is ok, but I cannot see whats going on when I use Soap::__call()

My capture method is approximately looks like this:

public function capture(\Magento\Payment\Model\InfoInterface $payment, $amount)
    {

        try {
            $merchantId = $this->getConfigData('merchant');
            $token = $this->getConfigData('token');
            $wsdl = $this->getConfigData('wsdl');
            $terminal = $this->getConfigData('terminal');

            $InputParametersOfRegister = array
            (
                "token"      => $token,
                "merchantId" => $merchantId,
                "request"    => $RegisterRequest
            );

            $client = new \SoapClient($wsdl,
                    ['trace' => true, 'exceptions' => true]);

            $this->log->info("P A Y M E N T  before __call"); //this logging is visible
            // Following string causes some error
            $OutputParametersOfRegister = $client->__call('Register', ["parameters" => $InputParametersOfRegister]);
            $RegisterResult = $OutputParametersOfRegister->RegisterResult;

            $this->log->info("P A Y M E N T  after __call"); // this logging is invisible
            }
            catch (\Exception $e) {
                $this->log->error('PAYMENT ERROR : ' . $e->getCode() . ' ' . $e->getMessage());
                throw new \Magento\Framework\Validator\Exception(__('Payment capturing error.'));
            }
    }

Please, any ideas how to debug it or what is the issue?


texts:
As i believe you already know Google is retiring the Shopping Content API v1 at the end of February 2015. After this date  all API requests to the Content API v1 will no longer work and our products will no longer be visible in Product Listing Ads.

Do you know any good Google Shopping module that use Shopping Content API v2?


texts: Magento 1.9.3.4 : How to install sample data after magento setup?

texts:
I want to install sample data after successful magento setup.

What will be the process of installing sample data after magento installation in magento 1.9.3.4.

Thanks


texts: Magento 2: Server unable to read htaccess file, denying access to be safe

texts:
My Magento 2 development system started, at (seemingly) random, to display the following error for all my frontend JS files

  Server unable to read htaccess file, denying access to be safe

This error persists even after I (temporarily) chmod 777 all my .htaccess files

$ find pub -name .htaccess -exec ls -ld '{}' \;
-rwxrwxrwx  1 alanstorm  staff  5544 Nov 20 10:44 pub/.htaccess
-rwxrwxrwx  1 alanstorm  staff  72 Nov 20 10:44 pub/errors/.htaccess
-rwxrwxrwx  1 alanstorm  staff  3389 Nov 20 10:44 pub/media/.htaccess
-rwxrwxrwx  1 alanstorm  staff  31 Nov 20 10:44 pub/media/customer/.htaccess
-rwxrwxrwx  1 alanstorm  staff  31 Nov 20 10:44 pub/media/downloadable/.htaccess
-rwxrwxrwx  1 alanstorm  staff  31 Nov 20 10:44 pub/media/import/.htaccess
-rwxrwxrwx  1 alanstorm  staff  88 Nov 20 10:44 pub/media/theme_customization/.htaccess
-rwxrwxrwx  1 alanstorm  staff  3300 Nov 20 10:44 pub/static/.htaccess

What's the deal?


texts:
Is there a reliable way in magento to redirect to the last page.

I have a small form that i want to redirect to the previous page if an error occurred.

The form sits on the product page and redirects to another page when completed successfully.  However, I would like to redirect back to the product page if an error occurred.

My action url is /my/module/submit

Also when i say reliable, i mean that redirectReferer cant be relied on


texts:
I have magento 1.7.3 and have some 3rd party extensions like Fortis theme, easy lightbox, ...

my question is :

if compiler mode had issues, is it recoverable?


texts: I have an issue with Magento 1.9.I have created Simple Products programmatically and it's displaying in the backend, I have configured all necessary options, but not displaying in the categories.


texts:
I just installed Magento 2 on MAMP (MacBook Pro) without Composer, but it is extremely slow.

What should I do, step by step, please?
Also, how can I set PHP memory limit?


texts: How to hide price from Form when adding a product magento 2

texts: In my website i don't need the price information so how to do to hide the price from BO when adding a new product?? and if i make the price attribute optional is there a problem in the core of magento please i need your advice and your experience in that thanks in advance


texts: When I use --clear-static-content and after deploy static content doesn't load any more

texts: I'm using magento 2 and everytime I try to enable a module with --clear-static-content , after I upgrade , clean and deploy , but my static content doesn't load anymore. And when I do deploy , only the en_US content gets done , but not en_GB , and I am using en_GB. Any idea what it might cause this ?


texts: Frontend cookie not being set until first login attempt

texts:
I'm currently migrating a site from Magento 1.7.0.2 to 1.8.1. I'm following the instructions outlined on the Magento site, so I've created a development account and ported over my theme, extensions and a copy of the database.

I'm facing a strange problem in that the frontend cookie is not being generated until a user tries to login - so on first login attempt (successful or otherwise), Magento redirects to the login page. After the first attempt, login and other site functionality behave as expected.

I have been through my theme and ensured any forms I have feature the form key introduced in 1.8 - but my login template uses the the base default Magento 1.8 anyhow. I've also tried switching to the default theme, with same behaviour.

There are no core overrides in the install, and I've tried disabling all extensions. Same result.

I've tried playing with the cookie domain value in the admin area - leaving it blank, specifically the sub-domain or for the whole domain. Behaviour is the same.

If I visit the current 1.7.0.2 site I get frontend cookie set on first page load, as expected.

Any ideas what's happening or what I can do to fix it?


texts: How to update admin routers of custom module for patch SUPEE-6788

texts:
I'm not sure how to update custom modules to work with the SUPEE-6788 patch, the instructions are not very clear.

Based on Alan Storm's tutorial, I created a simple module in the generator www.silksoftware.com/magento-module-creator/ for testing. It has custom page in admin which works perfectly fine, but when I apply fixes required in SUPEE-6788, the admin page shows 404 error.

URL of the custom admin page is:

  localhost/index.php/admin/admin_adminhello/adminhtml_adminhellobackend/index/key/83f08ec4bddff37e47412e16acc8d3f6/

Here's the config of the module:

<config>
    <modules>
        <Pulsestorm_Adminhello>
            <version>0.1.0</version>
        </Pulsestorm_Adminhello>
    </modules>
    <global>
        <helpers>
            <adminhello>
                <class>Pulsestorm_Adminhello_Helper</class>
            </adminhello>
        </helpers>
        <blocks>
            <adminhello>
                <class>Pulsestorm_Adminhello_Block</class>
            </adminhello>
        </blocks>
    </global>
    <admin>
        <routers>
            <adminhello>
                <use>admin</use>
                <args>
                    <module>Pulsestorm_Adminhello</module>
                    <frontName>admin_adminhello</frontName>
                </args>
            </adminhello>
        </routers>
    </admin>
    ...

Here's the controller:

/app/code/local/Pulsestorm/Adminhello/controllers/Adminhtml/AdminhellobackendController.php

class Pulsestorm_Adminhello_Adminhtml_AdminhellobackendController extends Mage_Adminhtml_Controller_Action
{
    public function indexAction()
    {
        $this->loadLayout();
        $this->_title($this->__("My Test Page Title"));
        $this->renderLayout();
    }
}

Solution

I replaced the <routers> part based on instructions from the patch like this (probably incorrectly):

<routers>
    <adminhtml>
        <args>
            <modules>
                <admin_adminhello after="Mage_Adminhtml">Pulsestorm_Adminhello_Adminhtml</admin_adminhello>
            </modules>
        </args>
    </adminhtml>
</routers>

But now the URL just shows 404 error:

  localhost/index.php/admin/admin_adminhello/adminhtml_adminhellobackend/index/key/83f08ec4bddff37e47412e16acc8d3f6/

How to fix the module correctly for that new patch?
Do I just need to update config.xml or do I also need to change the admin page's URL after applying this patch?


texts:
we have some products which are a "Configurable Product" with SImple Products.

Here you can see:

I created a shopping cart rule "Take 5 get 1". Every option has its own sku. I added all the sku´s to the rule. When i put 6 form the same "Geschmack", it works. But when i put 4 of "Geschmack: Vanille" and 2 of "Geschmack: Schoko" the rule is not working. Why? Can´t Magento work with Configurable Products and different options??

Andre


texts: i am trying to install extension from magento marketplace display this error

texts: display this type error while install from magento marketplace


texts:
I created an e-shop on Magento ver. 2.0.6. Every product is simple with just a set of custom options for the size. The custom options field is required by the client.

Some orders come in right with their size and their status as: ordered. The problem is that some orders come with a "mixed" item status and no sizes selected.


texts: Show only products on a new category page which have a certain product attribute enabled

texts:
I want to create a new category page which shows all products which have a certain product attribute (speed_delivery) set to yes.

I was thinking about to create an empty category, catch its product collection via observer and modify it (filtering by the attribute)

Unfortunately this approach doesn't seem to work because it looks like there is no event to hook into the category product collection (https://www.nicksays.co.uk/magento-events-cheat-sheet-1-9/)

How would you solve it? Do I have to rewrite Mage_Catalog_Model_Category::getProductCollection(). I can't think of a better approach at the moment.

Thank you.


texts: Update qty for shipping address multishipping Magento 2

texts:
i want to update qty for shipping address, use multishipping
I have 2 shipping address : A & B
To address A : 1 qty

To address B : 2 qty

When i edit qty of address A to 4, it not update to old, but it create 4 new address
Like this
To address A : 1 qty
To address A : 1 qty
To address A : 1 qty
To address A : 1 qty
To address A : 1 qty

To address B : 2 qty

I checked in function _addShippingItem in Magento\Multishipping\Model\Checkout\Type\Multishipping.php
It can't getItemByQuoteItemId, return $quoteAddressItem = false
$quoteAddressItem = $quoteAddress->getItemByQuoteItemId($quoteItemId);
if ($quoteAddressItem) {
    $quoteAddressItem->setQty((int)($quoteAddressItem->getQty() + $qty));
} else {
    $quoteAddress->addItem($quoteItem, $qty);
}

Can someone help me ? I need getItemByQuoteItemId work :<


texts: How to Stop Magento2 Default Newsletter Subscription Email

texts:
I want to stop Default Newsletter subscription in magento2 because I am already using Ebizmarts_MageMonkey module for that functionality.

Currently I am using Plugin to override SendConfirmationSuccessEmail().

My code is etc/di.xml

<type name="Magento\Newsletter\Model\Subscriber">
    <plugin name="my-subscriber" type="Custom\Module\Newsletter\Model\Subscriber" setOrder="1" disabled="false"/>
</type>

and php file Newsletter/Model/Subscribe.php code is,

namespace Custom\Module\Newsletter\Model;

use Magento\Newsletter\Model\Subscriber as MageSubscriber;

class Subscriber
{
    public function aroundSendConfirmationSuccessEmail(MageSubscriber $oSubject, callable $proceed) {}
}

This is working fine but it stopped developer mode. Can anybody tell me where I am doing wrong?

Thanks,


texts: More than one magento virtual hosts and nginx configuration

texts:
I am trying to set up a VM with different magento versions so it can be used for testing,

They are in the following paths :

/var/www/magento1
 /var/www/magento2
 /var/www/magento3

I would like to access them as https://dev.magento.com/magento1, https://dev.magento.com/magento2 and https://dev.magento.com/magento3 respectively. The configuration in my enabled site is as follows :

server {
 #listen 80 default;
 listen 443;
 server_name mage; ## Domain is here twice so server_name_in_redirect will favour the www
 ssl on;
 ssl_certificate    /etc/ssl/certs/self-signed.crt;
 ssl_certificate_key        /etc/ssl/private/self-signed.nopass.key;

root /var/www/;

location = /magento1{
    alias /var/www/magento1/;
}

location = /magento2{
    alias /var/www/magento2/;
}

location = /magento3{
    alias /var/www/magento3/;
}

location / {
    index index.html index.php; ## Allow a static html file to be shown first
    try_files $uri $uri/ @handler; ## If missing pass the URI to Magento's front handler
    expires 30d; ## Assume all files are cachable
}

## These locations would be hidden by .htaccess normally
location ^~ /app/                { deny all; }
location ^~ /includes/           { deny all; }
location ^~ /lib/                { deny all; }
location ^~ /media/downloadable/ { deny all; }
location ^~ /pkginfo/            { deny all; }
location ^~ /report/config.xml   { deny all; }
location ^~ /var/                { deny all; }

location /var/export/ { ## Allow admins only to view export folder
    auth_basic           "Restricted"; ## Message shown in login window
    auth_basic_user_file htpasswd; ## See /etc/nginx/htpassword
    autoindex            on;
}

location  /. { ## Disable .htaccess and other hidden files
    return 404;
}

location ~ .php/ { ## Forward paths like /js/index.php/x.js to relevant handler
    rewrite ^(.*.php)/ $1 last;
}

location ~ .php$ { ## Execute PHP scripts
    if (!-e $request_filename) { rewrite / /index.php last; } ## Catch 404s that try_files miss

    expires        off; ## Do not cache dynamic content
    fastcgi_pass   127.0.0.1:9000;
    #fastcgi_param  HTTPS $fastcgi_https;
    fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
    fastcgi_param  MAGE_RUN_CODE default; ## Store code is defined in administration > Configuration > Manage Stores
    fastcgi_param  MAGE_RUN_TYPE store;
    include        fastcgi_params; ## See /etc/nginx/fastcgi_params
}

}

So now I am able to access the front end fine...However I have the following issues:

If I set configuration to add "store code to URL" I get a 500 internal server error.
When I try to access the admin as "https://dev.magento.com/magento1/admin"(on all three) I get a 500 internal server error too...However, https://dev.magento.com/magento1/index.php/admin works fine. I would like to have it without "index.php".
Images, media files,js shows a lot of 404 :(

I am stuck here any help would be greatly appreciated. Thanks a lot for your time


texts:
Pessoal estou com este erro e infelizmente não consigo resolver o mesmo.

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://magento.cordeirosilva.adv.br/api/v2_soap?wsdl=1'

Meu codigo.

$proxy = new SoapClient('http://magento.cordeirosilva.adv.br/api/v2_soap?wsdl=1');
$sessionId = $proxy->login('xxxx', 'xxxxx'); $result = $proxy->catalogCategoryTree($sessionId); var_dump($result);

O que estou fazendo de errado.


texts: unable to update extension from composer

texts:
I am trying to update one of my payment gateway extension through composer and the command is
composer update razorpay/update
But I am getting the below errors
Problem 1
- guzzlehttp/guzzle 7.2.0 requires php ^7.2.5 || ^8.0 -> your PHP version (7.1.33) does not satisfy that requirement.
- guzzlehttp/guzzle 7.1.1 requires php ^7.2.5 -> your PHP version (7.1.33) does not satisfy that requirement.
- guzzlehttp/guzzle 7.1.0 requires php ^7.2.5 -> your PHP version (7.1.33) does not satisfy that requirement.
- guzzlehttp/guzzle 7.0.1 requires php ^7.2.5 -> your PHP version (7.1.33) does not satisfy that requirement.
- guzzlehttp/guzzle 7.0.0 requires php ^7.2.5 -> your PHP version (7.1.33) does not satisfy that requirement.
- Conclusion: don't install facebook/php-business-sdk 9.0.3
- Conclusion: don't install facebook/php-business-sdk 9.0.2
- Conclusion: don't install facebook/php-business-sdk 9.0.1
- Conclusion: remove guzzlehttp/guzzle 6.4.1
- Installation request for facebook/php-business-sdk ^9.0 -> satisfiable by facebook/php-business-sdk[9.0.0, 9.0.1, 9.0.2, 9.0.3].
- Conclusion: don't install guzzlehttp/guzzle 6.4.1
- facebook/php-business-sdk 9.0.0 requires guzzlehttp/guzzle ^6.5 || ^7.0 -> satisfiable by guzzlehttp/guzzle[6.5.0, 6.5.1, 6.5.2, 6.5.3, 6.5.4, 6.5.5, 7.0.0, 7.0.1, 7.1.0, 7.1.1, 7.2.0].
- Can only install one of: guzzlehttp/guzzle[6.5.0, 6.4.1].
- Can only install one of: guzzlehttp/guzzle[6.5.1, 6.4.1].
- Can only install one of: guzzlehttp/guzzle[6.5.2, 6.4.1].
- Can only install one of: guzzlehttp/guzzle[6.5.3, 6.4.1].
- Can only install one of: guzzlehttp/guzzle[6.5.4, 6.4.1].
- Can only install one of: guzzlehttp/guzzle[6.5.5, 6.4.1].
- Installation request for guzzlehttp/guzzle (locked at 6.4.1) -> satisfiable by guzzlehttp/guzzle[6.4.1]
Previously I am trying to install the Facebook Pixel extension due to some technical issues we didn't install.
After that when I am trying to install or update the extension I am getting the above error.
For reference please find the attached image.


texts: magento 1.x When a full refund complete of the order need to generate custom mail

texts: Please any one help me on this point ,i want to generate a custom mail when get full refund of the order.Any idea on this please help me.i m new in this field..


texts: Magento2 add order ID in custom UI Component button link

texts:
I want to add a view order button in form UI component of my custom module.
I've created a custom template for UI component link button but can't get the order id within URL.

The simple field for getting order id.

<field name="order_id">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="sortOrder" xsi:type="number">6</item>
            <item name="dataType" xsi:type="string">string</item>
            <item name="formElement" xsi:type="string">input</item>
            <item name="label" xsi:type="string" translate="true">Order ID</item>
            <item name="dataScope" xsi:type="string">order_id</item>
            <item name="valuesForOptions" xsi:type="array">
                <item name="text" xsi:type="string">text</item>
            </item>
        </item>
    </argument>
</field>

Link field for view order.

    <field name="order_view_button">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="sortOrder" xsi:type="number">7</item>
                <item name="formElement" xsi:type="string">input</item>
                <item name="elementTmpl" xsi:type="string">Vendor_Module/form/element/custom-link</item>
                <item name="elementId" xsi:type="string">order_view_button</item>
                <item name="dataScope" xsi:type="string">order_id</item>
                <item name="dialogUrl" xsi:type="url" path="sales/order/view">
                    <param name="order_id">value</param>
                </item>
                <item name="label" xsi:type="string" translate="true">View Order</item>
            </item>
        </argument>
    </field>

Custom ui template custom-link.html

    View Order

it is showing URL like this. but I want to show order id instead /value/

http://example.com/admin/sales/order/view/order_id/value/key/2949e62fd1786f738a8c1fda0cff5d784aae1fcf29a9fca93ab1abeecf19c69a/


texts: How to change order invoice pdf for a particular invoice in Magent 2.3.3

texts:
Here I want to design and change the invoice PDF of a particular Invoice.
I have added an observer to but it's creating a normal invoice. But I want to design and change the PDF of that particular invoice.
I also have access to invoice's ID but I do not have any idea how to design the PDF and assign it to that particular invoice.

Here is my Observer

use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\Event\Observer;

class GenerateInvoice implements ObserverInterface
{

    /**
     * @inheritDoc
     */
    /**
     * @var \Magento\Sales\Api\OrderRepositoryInterface
     */
    protected $_orderRepository;

    /**
     * @var \Magento\Sales\Model\Service\InvoiceService
     */
    protected $_invoiceService;

    /**
     * @var \Magento\Framework\DB\Transaction
     */
    protected $_transaction;

    protected $invoiceSender;

    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        \Psr\Log\LoggerInterface $logger,
        \Magento\Framework\App\ResourceConnection $resource,
        \Magento\Sales\Api\OrderRepositoryInterface $orderRepository,
        \Magento\Sales\Model\Service\InvoiceService $invoiceService,
        \Magento\Framework\DB\Transaction $transaction,
        \Magento\Sales\Model\Order\Email\Sender\InvoiceSender $invoiceSender,
        array $data = []
    )
    {

        $this->_orderRepository = $orderRepository;
        $this->_invoiceService = $invoiceService;
        $this->_transaction = $transaction;
        $this->_logger = $logger;
            $this->invoiceSender = $invoiceSender;
    }

    public function execute(Observer $observer)
    {

     $invoice = $observer->getEvent()->getInvoice();
    $order = $invoice->getOrder();
    $orderIncrementId = $order->getIncrementId();
    $date = date('d-M-Y');

    $entity_id=$invoice["order_id"];

        $order = $this->_orderRepository->get($entity_id);
        if($order->canInvoice()) {
            $invoice = $this->_invoiceService->prepareInvoice($order);
            $invoice->register();
            $invoice->save();
            $transactionSave = $this->_transaction->addObject(
                $invoice
            )->addObject(
                $invoice->getOrder()
            );
            $transactionSave->save();
            $this->invoiceSender->send($invoice);

            $invoiceId=$invoice->getId();
            $invoiceId=$invoiceId+1;

                $incrementId=$invoice->getIncrementId();
                $incrementId=$incrementId+1;

        $this->_logger->info("Latest Invoice id ".$invoiceId);
        $this->_logger->info("Latest Invoice increment ".$incrementId);

            $order->addStatusHistoryComment(
                __('Notified customer Custom about invoice #%1.', $invoice->getId())
            )
            ->setIsCustomerNotified(true)
            ->save();

        }

        }

    }

But its just generating Invoice I want this invoice's design to be done and changed.

How can I do this?

Small Help will be greatly appreciated.

Thanks in Advance :)


texts: setTemplate doesn't override default layout

texts:
Default customer account page is using page/2columns-left.phtml and I want to override it using page/2columns-right.phtml.

In my app/design/frontend/theme/custom/layout/local.xml, I added a new line:

<customer_account>
    <reference name="root">
        <action method="addBodyClass"><className>customer-account</className></action>
        <!-- I added below line to override "page/2columns-left.phtml"-->
        <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
    </reference>
    <reference name="right"> <!-- I changed "left" to "right" -->
        <!-- Remove cart from the left column -->
        <action method="unsetChild"><name>cart_sidebar</name></action>
    </reference>
</customer_account>

It's a dev environment so all cache are disabled but I still flushed Magento cache but the customer account page is still using the 2columns-left layout.
I also duplicated the addBodyClass line and added test class name which immediately works. 2columns-right.phtml exists.


texts: how can i get Invoiced Qty in transactional email

texts:
When I ordered 5 items, "Total Qty" in order confirmation mail is correct.
But if I invoiced only 3 items, "total Qty" in invoice mail says 5.

so i wanted to make "Total Ordered Qty" and "Total Invoiced Qty" separately
how can i get the invoiced qty in total.phtml ???

path : base / default / template / sales / order / totals.phtml

        Total Invoiced Qty

       <?  **i don't know what to put in here. please help me**   ?>


texts: Magento 2: Media url issue url like "example.com/media/a.png" not working

texts:
I migrated my website from nginx to apache, my media url of nginx are not working now.

For example below url used to work earlier

example.com/pub/media/blog-banner.jpg
example.com/media/blog-banner.jpg

But after migration only pub/media one work : example.com/pub/media/blog-banner.jpg

can you tell what should i do to fix issue


texts: Developer mode on production environment

texts:
I was recently contacted by a client to evaluate their Magento store. I realized that the store (even though running in production) had developer mode enabled in their index.php file:

if (isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) { //the variable is set.
    Mage::setIsDeveloperMode(true);
}

They've been running this store in production for over 2 years. I restored the earliest revision of the file which was from 2013-02-09 and it still had developer mode set to true.

After reading this article by Alan Storm: PHP Error Handling and Magento Developer Mode I can't really think of a reason to recommend that the client disabled developer mode.

Are there any detrimental aspects of having it enabled in production?

Alan Storm's wrap-up:

  Developer Mode will help you write cleaner code without subjecting your users to awkward PHP errors when something goes wrong

Seems pretty positive for me. As a rule of thumb, I previously just didn't subject production environment to developer mode.


texts: custom form in admin grid not showing data in magento2

texts:
hello everyone I want to show product name in the custom form in admin grid after adding this code form is not displaying
info.php

 $fieldset->addField(
        'entity_id',
        'text',
        [
            'name'        => 'entity_id',
            'label'    => __('product name'),
            'values' => $objectManager->get('\Magneto\BookFreeLayout\Model\Source\Products')->toOptionArray()

        ]
    );

Products.php

<?php

  namespace Magneto\BookFreelayout\Model\Source;

  use Magento\Eav\Model\Entity\Attribute\Source\AbstractSource;
  use Magento\Eav\Model\Entity\Attribute\Source\SourceInterface;
  use Magento\Framework\Data\OptionSourceInterface;
  use Magento\Framework\Option\ArrayInterface;

   /**
   * Item status functionality model
   */
  class Products implements ArrayInterface
 {
protected $_customerFactory;

public function __construct(
    \Magento\Customer\Model\ResourceModel\Customer\CollectionFactory $customerFactory
) {
    $this->_customerFactory = $customerFactory;
}

/**
 * Get customer collection
 */
public function getCustomerCollection()
{
    return $this->_customerFactory->create();
}

/*
*   Option getter
*   @return array
*/
public function toOptionArray()
{
    $arr = $this->toArray();
    $ret = [];
    $ret[] = ['value' => 0, 'label' => 'All Customers'];
    foreach ($arr as $key => $value) {

        $ret[] = [
            'value' => $key,
            'label' => $value
        ];
    }

    return $ret;
}

/*
*   Get options in "key-value" format
*   @return array
*/
public function toArray()
{
    $customers = $this->getCustomerCollection();

    $customersList = array();
    foreach ($customers as $customer) {

        $customersList[$customer->getEntity_Id()] = __($customer->getName());
    }
    return $customersList;
}
 }

after removing values line from fieldset  rest data is coming product name is not coming


texts: Checkout shipping address - customer first name and last name prefilled

texts:
I have a request from a customer, he wants, when adding a new address during checkout, to stop magento to fill in First Name and Last Name with the Customer Information.

I went through all files from Magento_Checkout I cant find the place where first name and last name are set onto the shipping address.

in onepage.phtml a script grabs customer data

    window.checkoutConfig = <?= /* @escapeNotVerified */ $block->getSerializedCheckoutConfig() ?>;
    // Create aliases for customer.js model from customer module
    window.isCustomerLoggedIn = window.checkoutConfig.isCustomerLoggedIn;
    window.customerData = window.checkoutConfig.customerData;

I even tried to manipulate the data here and replace first name and last name with "" but nothing happens.


texts: Magento 2 how to add product grid in custom module using ui component

texts:
Magento 2  : I have add product grid from the below refferance Once I edit then save again the records at that time assigned products are not saving into the database, does anyone know why?
Magento 2 : How to add a product grid in custom module using ui component?


texts: Magento 2 custom module jQuery loading issue

texts:
My custom module:
app\code\Zero\my_module\view\frontend\web\js\changezipcode.js
define(['jquery'], function ($) {
    'use strict';
        $(document).ready(function()
        {
            $('#form').hide();
                 $("#changeButton").click(function() {
                     $("#form").toggle('slow');
                 });

                 $("#submit").click(function() {
                    var zipcode= $("#zipcode").val();
                    alert("Value: " + zipcode);
                });
        });
});

app\code\Zero\my_module\view\frontend\requirejs-config.js
var config = {
    map: {
        '*': {
            changezipcode:   'Zero_my_module/js/changezipcode',
        },
    }
};

Onclick event not triggered.


texts: How to Add Product Specification Section Under Product Info in Magento 2?


texts:
First of all it is maybe an already answered question but I did not find anything about that subject.

It is not an issue but a question about the best way to manage the file config.php in Magento 2.
Actually our config.php is not versioned (by default in M2 .gitignore file) so it is not in our repository. The problem is when someone install the project he doesn't have this file but he already have the database so he can't run bin/magento setup:install ... to generate the file.
We are aware that the bin/magento setup:upgrade add non declared modules to config.php but only if the file exists and the bin/magento module:enable can add modules but we would like to avoid to launch that every time we deploy or install the project.

My question(s) :
 - Do we have to remove config.php from .gitignore and version it ?
 - Do we have to add it the first time in the repository and let it in the .gitignore after ?
 - What is the best way to manage this file ?


texts: Passing array from one template to another in magento2

texts:
I have used two template for homepage(template inside another template)
I am calling product template inside category template.
Now my case scenario is

  1. I am declaring one array in category template

  2. I want to pass this empty array to product template.

  3. Add elements in that array in product template.

  4. Pass the array back to category template.

How can i do that.

Let me know if there is any confusion.


texts: Want to Override the Attribute Swatch Description in Configurable Product Page Magneto 2.3

texts:
I want to Override the Product Attribute in Configurable Product page. Want to Like

Edit This Field in Configurable Product Attribute Selection Page.


texts:
I'm having many performance issues because of my cron jobs, I suspect that it may be caused by two modules, Yotpo and Scconnector, both have options in the system > configuration.

I'd like to know how could I configure it via these options below to get them having a delay?


texts: MAC OS Magento 2.4.1. PWA Studio 8.0.0 Local Setup Steps and Bugfix

texts:
MAC OS Magento 2 setup
NVM INSTALLTION
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash

vim .zshrc

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "\$NVM_DIR/bash_completion"

Reload the shell configuration by using the following command
source ~/.zshrc

nvm install v12.18.0

nvm use v12.18.0

nvm alias default 10.16.3

brew install nginx
brew install php@74
brew install mysql

composer create-project --repository-url=https://repo.magento.com/ magento/project-enterprise-edition=2.3.3 /usr/local/var/www/html/

php bin/magento sampledata:deploy

php bin/magento setup:install \
--base-url=https://m2pwa.local \
--db-host=localhost \
--db-name=m2pwa \
--db-user=root \
--db-password=password \
--admin-firstname=fn \
--admin-lastname=ln \
--admin-email=username@gmail.com \
--admin-user=admin \
--admin-password=***** \
--language=en_US \
--currency=USD \
--timezone=America/Chicago \
--use-rewrites=1

php bin/magento maintenance:disable

php bin/magento s:up && php bin/magento s:di:c && php bin/magento s:s:d -f

mkcert "*.m2pwa.local" m2pwa.local

Magento Admin and Frontend is ready with sample data and SSL

git clone --branch v8.0.0 https://github.com/magento/pwa-studio.git

cd pwa-stdio

yarn install

yarn buildpack create-project ./packages/pwa-sample --template "venia-concept" --name "pwa-sample" --author "username<yourname@domain.com>"  --backend-url "https://pwabackend.demo.ubertheme.com/" --braintree-token "sandbox_rzknz7v7_dbw5pyvbpn4bwhw9" --npm-client "yarn"

 Open the file pwa-studio/package.json and find the lines:

"packages/venia-ui"
and replace it with:

"packages/venia-ui",
"packages/pwa-sample"

next step is to add a new run script for your custom PWA project in the same package.json file:
Find:
"venia": "node ./packages/pwa-buildpack/bin/buildpack load-env ./packages/venia-concept && yarn workspace @magento/venia-concept",
Replace it with:

"venia": "node ./packages/pwa-buildpack/bin/buildpack load-env ./packages/venia-concept && yarn workspace @magento/venia-concept",
"pwa-sample": "node ./packages/pwa-buildpack/bin/buildpack load-env ./packages/pwa-sample && yarn workspace pwa-sample",

yarn run buildpack create-custom-origin packages/pwa-sample/

yarn pwa-sample build

yarn pwa-sample watch

yarn pwa-sample start

Compiled Successfully . But why getRouteComponent.js 404 error. Please help


texts:
I have around 500+ categories in my csv.

I'm trying to import only categories using csv.

Can anyone knows how to import only categories in magento 2 using csv?


texts: regular price only when sppecial price is not set in configurable product magento2

texts:
I am able to show the regular price and special price for the configurable product but when special price is not set than the regular price is showing two time
I am using magento2, please help to resolve this issue


texts: Set Magento 2 search terms to no index no follow

texts:
I forgot to edit my robot.txt so over 500 search terms are index by google. I set op my robot.txt now like this:

User-agent: *

# Directories
Disallow: /app/
Disallow: /bin/
Disallow: /dev/
Disallow: /lib/
Disallow: /phpserver/
Disallow: /pkginfo/
Disallow: /report/
Disallow: /setup/
Disallow: /update/
Disallow: /var/
Disallow: /vendor/

# Paths (clean URLs)
Disallow: /index.php/
Disallow: /catalog/product_compare/
Disallow: /catalog/category/view/
Disallow: /catalog/product/view/
Disallow: /catalogsearch/
Disallow: /checkout/
Disallow: /control/
Disallow: /contacts/
Disallow: /customer/
Disallow: /customize/
Disallow: /newsletter/
Disallow: /review/
Disallow: /sendfriend/
Disallow: /wishlist/

# Files
Disallow: /composer.json
Disallow: /composer.lock
Disallow: /CONTRIBUTING.md
Disallow: /CONTRIBUTOR_LICENSE_AGREEMENT.html
Disallow: /COPYING.txt
Disallow: /Gruntfile.js
Disallow: /LICENSE.txt
Disallow: /LICENSE_AFL.txt
Disallow: /nginx.conf.sample
Disallow: /package.json
Disallow: /php.ini.sample
Disallow: /RELEASE_NOTES.txt

# Do not index pages that are sorted or filtered.
Disallow: /*?*product_list_mode=
Disallow: /*?*product_list_order=
Disallow: /*?*product_list_limit=
Disallow: /*?*product_list_dir=

# Do not index session ID
Disallow: /*?SID=
Disallow: /*?
Disallow: /*.php$

# CVS, SVN directory and dump files
Disallow: /*.CVS
Disallow: /*.Zip$
Disallow: /*.Svn$
Disallow: /*.Idea$
Disallow: /*.Sql$
Disallow: /*.Tgz$

But how do I setup no index no follow for the 500 search terms that are already indexed by google?


texts: Magento 1 : hide price for guest when price is 0

texts:
I want the price of some products on the site to be displayed only to users who have logged in
To do this, I want to say that if the price of the product was 0 and the user did not loged in, write the following text
Log in to view prices
I use the following code which only checks the login and displays the text for all users
if(!Mage::getSingleton('customer/session')->isLoggedIn()){
echo 'Login to See Price
';
return;
}
?>```


texts: How can I move all customers to a different Website in Magento2?

texts:
I migrated all customer data to my new Magento2 store, but a new Website and Store View was created. I have already built out all of my products, design, etc on an original Website/Store View.

I know I can update accounts individually, but is there a way to move all of these customer accounts to the correct Website and Store View in bulk?

Ideally, I would like to avoid sending any "welcome" notifications when this is done.

Thanks for any help!


texts: on load more click show more products of same category in search in magento2

texts: I have load more button in search after user search that load more button is coming on that click show that category products in magento2


texts: Magento 2.3.2: Product View page does not load

texts:
The entire product view page does not load and the spinner keeps on loading infinity.

Error on the console:

  The resource from “/pub/media/mgs/fbuilder/css/blocks.min.css” was
  blocked due to MIME type (“text/html”) mismatch
  (X-Content-Type-Options: nosniff). The resource from
  “/pub/media/mgs/fbuilder/css/blocks.min.css” was blocked due to MIME
  type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
  nhd-0108bz-fsy-ybw-33v3.html

How can we solve this problem? I am not able to move forward(Add to cart) because of this.


texts: Table rates unable to import excel file for Belize country

texts:
I am trying to import the table rates file. I want the different rates based on Belize districts. I found district codes on google :
https://en.wikipedia.org/wiki/ISO_3166-2:BZ
Tried these codes but the error is : The region or state in row number "3" is incorrect. Please verify region or state.
Also tried these codes : https://en.wikipedia.org/wiki/List_of_FIPS_region_codes_(A%E2%80%93C)#BH:_Belize
But the same issue and Belize is also not supporting the Zip/Postal codes. If anyone know how I can differentiate the 6 districts of the Belize country please help me.


texts: Override Block to render my custom Template

texts:
I'm trying to override native block Magento\Catalog\Block\Product\View.php, because i want to render my custom(copied) template addtocart.phtml and use my custom methods on this template.

Here is my DI - Wodev\Guestcheck\etc\di.xml

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\Catalog\Block\Product\View" type="Wodev\Guestcheck\Block\Product\View" />
</config>

Here is my block - Wodev\Guestcheck\Block\Product\View.php

    <?php

namespace Wodev\Guestcheck\Block\Product;

use Magento\Catalog\Api\ProductRepositoryInterface;

class View extends \Magento\Catalog\Block\Product\View
{
    private $_helper;

    public function __construct(
        \Wodev\Guestcheck\Helper\Data $helper,
        \Magento\Catalog\Block\Product\Context $context,
        \Magento\Framework\Url\EncoderInterface $urlEncoder,
        \Magento\Framework\Json\EncoderInterface $jsonEncoder,
        \Magento\Framework\Stdlib\StringUtils $string,
        \Magento\Catalog\Helper\Product $productHelper,
        \Magento\Catalog\Model\ProductTypes\ConfigInterface $productTypeConfig,
        \Magento\Framework\Locale\FormatInterface $localeFormat,
        \Magento\Customer\Model\Session $customerSession,
        ProductRepositoryInterface $productRepository,
        \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency,
        array $data = []
    ) {
        $this->_helper = $helper;
        parent::__construct($context,$urlEncoder,$jsonEncoder,$string,$productHelper,$productTypeConfig,$localeFormat,$customerSession,$productRepository,$priceCurrency,$data);
    }
}

Here is my layout - Wodev\Guestcheck\view\frontend\layout\catalog_product_view.xml

<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="product.info.form.content">
            <referenceBlock name="product.info.addtocart" remove="true" />
            <block class="Wodev\Guestcheck\Block\Product\View" name="custom.addtocart" template="Wodev_Guestcheck::product/view/addtocart.phtml"/>
        </referenceContainer>
    </body>
</page>

My template is not rendering. Please,help to find out why?


texts: Newsletter subscription mail not sending

texts:
I'm having an issue with newsletter email and customer account conformation mail. Whenever someone subscribes to my website or creates an account, my web does not send any mail to the customer.
Is there any enable/disable system in Magento by means of which the mails are not being sent?

Any help is appreciated


texts: How to add prefix before category url in Magento2?

texts:
My all categories are assigned in default category. Now I have urls like that:

www.magentoShop.com/category_name/

And I want to add prefix "something" it should look this way:

www.magentoShop.com/something/category_name/

Any ideas how to achieve it?


texts:
I don't know if there are more occurrences of base_to_quote_rate column in the database. But my question is:

What is the purpose of base_to_quote_rate column in sales_flat_quote table?


texts: Magento 2.3.3 An error occured on the server, and nosuchentityexception on checkout

texts:
I have this problem with the magento checkout, when placing an order the first try will return an error, but the second will work.
the error is

  A server error stopped your order from being placed. Please try to
  place your order again.

  "trace":"#0
  /home/uhdcusr/httpdocs/cr-store/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Checkout\Model\PaymentInformationManagement->savePaymentInformationAndPlaceOrder(147...

and also a critical log is thrown in exceptions.log

[2020-01-14 20:19:22] main.CRITICAL: DateTime::__construct(): Failed to parse time string (15/01/2020 00:00) at position 0 (1): Unexpected character {"exception":"[object] (Exception(code: 0): DateTime::__construct(): Failed to parse time string (15/01/2020 00:00) at position 0 (1): Unexpected character at /app/vendor/magento/framework/Stdlib/DateTime.php:58)"} []
[2020-01-14 20:20:53] main.CRITICAL: Aucune entité avec customerId = 120 {"exception":"[object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): Aucune entité avec customerId = 120 at /app/vendor/magento/framework/Exception/NoSuchEntityException.php:50)"} []

the exception is thrown in PaymentInformationManagement in savePaymentInformationAndPlaceOrder

 $this->savePaymentInformation($cartId, $paymentMethod, $billingAddress);
    try {
        $orderId = $this->cartManagement->placeOrder($cartId);
    } catch (\Magento\Framework\Exception\LocalizedException $e) {
        throw new CouldNotSaveException(
            __($e->getMessage()),
            $e
        );
    } catch (\Exception $e) {
        $this->getLogger()->critical($e);
        throw new CouldNotSaveException(
            __('A server error stopped your order from being placed. Please try to place your order again.'),
            $e
        );
    }

and the critical log is in model/Session at getQuote

i found an issue on github https://github.com/magento/magento2/issues/23411
but they only talked about the critical log not the checkout error.
any ideas or help will be really appreciated. thanks


texts: Magento 2 core functionalities and structure - difference between vendor/magento/framework and vendor/magento/module-* namespace code?

texts: What is the difference and when to use vendor/magento/framework code, and when to use the vendor/magento/module-* code?


texts: New order notification mail not received by admin mail

texts: When customer placed order acknowledge send to customer, but admin can't get new order by mail.


texts: Product view attribute value different on two store views

texts:
I have a Magento website which uses the value of an dropdown (Yes/No) attribute in a if statement condition. The problem I'm having is based on one store view I'm getting '1' and the other is '0' (where '1' is the correct value in this instance).

For example I have this code:

if($_product->getData("lookinsideactive") == 1):
      if(Mage::app()->getStore()->getId() == 1):
                    echo "Store message 1";
                elseif(Mage::app()->getStore()->getId() == 12):
                    echo "Store message 2";
      endif;
endif;

When I go to store ID 1 the message doesn't appear, but in the store id 12 the message 'Store message 2' appears so the first if statement condition is true.

If I print these:

echo $_product->getData("lookinsideactive");

I get '0' in store ID 1 and '1' in store ID 12.

I've tried:

echo $_product->getAttributeText('lookinsideactive');

Where store ID 1 shows 'No' and store ID 12 shows 'Yes'.

Another thing is these conditions work perfectly fine on other products on both store views its just this one product that this result is showing.

So overall the result should be either '1' on both store views for that product or '0' on both store views.

I have checked the attribute set with this problem product and another working product and they both are using the same attribute set, with the same attribute value 'lookinsideactive'.

I am unsure if I've missed something simple but need some advice on a possible cause or some advice to debug this.

Any help is much appreciated, thank you.


texts:
I have a front end module that I have developed, which I want to restrict to logged in users only. Stressing this is front end users, not admin users we are talking about.

I assume this can be done through ACL settings in much the same way the admin modules do - however I can't find the answer anywhere.

Is this possible or is it necessary to check on every action that they are logged in (I want to avoid doing this as it has a large margin for error - I simply only want logged in users to access said pages)?


texts:
I am using $j(this) in my jquery change function. But the $j(this) locate the windows, instead of the changing function.

Jquery:

$j('#id').on("change", function () {
    var $this = $j(this);
    console.log($this);
});

what i get is,

[Window]

But its wrong. It should console #id's functions. why this error occurring. Is $j(this) correct or not? Please help me.. I am totally stuck at this.


texts: How to get all available shipping method of a quote

texts:
I am creating an extension which will remove one shipping method if another one is available.

For that i need to know all of available shipping method for that current quote!

How can i get that??

In rewrite shipping class i am using this code which removing shipping very well. But i want to remove this is free shipping is avilable

My code

<?php
class Karmick_Hideshipping_Model_Shipping_Shipping extends Mage_Shipping_Model_Shipping
{
    public function collectCarrierRates($carrierCode, $request)
    {
        if (!$this->_isAvailable($carrierCode, $request)) {
           return $this;
        }
        return parent::collectCarrierRates($carrierCode, $request);
    }

    /**
     * @param string $carrierCode
     * @param Varien_Object $request
     * @return bool
     */
    protected function _isAvailable($carrierCode, $request)
    {
        $regionCode = $request->getDestRegionCode();
        switch ($carrierCode) {
            case 'tablerate':
                return FALSE;
                break;
        }
        return true;
    }
}


texts: Choosing Greater Discount in Magento Cart

texts:
We have an extension that creates a bundle discount in the user's shopping cart. This is an overall discount, not a discount on the item level. On the product page, it shows buy x with y and save $40. If a user hits add to cart, it adds both items, but only signifies the discount in the grand total area.

However, the customer is allowed to still put in a discount code that would further discount the total value. While there isn't an option to stop further rules processing in the extension, I don't want to do that anyway so the customer can still discount items not part of the bundle.

That being said, is there a way to apply whichever discount is greater between the two? For instance, if the Bundle Discount was $100 and the Discount Code was $80, it would only keep the Bundle Discount. If the Discount Code was $100 and the Bundle Discount was $80, it would remove the Bundle Discount and APPLY the discount code.

Any help would be greatly appreciated!


texts:
I have a link in my Magento 1 site

  http://beautyshop.com/index.php/hair-care.html

If I click on it,it redirects to

  http://beautyshop.com

But if I take a new tab in browser and paste the URL

  http://beautyshop.com/index.php/hair-care.html

then it is working perfectly.

My configuration in Admin Panel is configuration>web> Search Engines Optimization > Use Web Server Rewrites > Yes

How can I solve the issue ?


texts: Magento module updates in load balanced environment

texts:
We are shortly moving to new server infrastructure which will have 2 webservers behind a load balancer that are deployed using Capistrano.  The only area of concern I have is how to handle module updates (especially ones that modify the database using setup scripts).

If the two servers are hit at the same time the update scripts will trigger at the same time before sore_resource has been updated potentially causing Magento to crash.

I'm considering setting up an admin site on one server (separate copy of the codebase with it's own vhost) that is deployed to first and an update_modules script run to carry out the modifications of the DB and then deploying out to the live webservers.

Can anyone see any issues with this or have any other suggestions as to the best way to handle DB updates?


texts: Magento 2 : Add Product functionality in frontend

texts: Does anyone know about module availability/custom module implementation which allows me to add product same as admin panel from frontend, as i have a requirement to implement it in frontend as per the client specification.


texts:
In Magento 1.9 I want to add a custom block to the homepage, but nothing happens. I have these files:

app/design/frontend/[mytheme]/default/layout/local.xml

<?xml version="1.0" encoding="UTF-8"?>
<layout>
    <default>
        <reference name="root">
            <block type="core/text_list" name="customblock" as="customblock" translate="label">
                Custom Block
            </block>
        </reference>
        <reference name="customblockreference">
            <block type="core/template" name="customblock" template="customblock.phtml" />
        </reference>
    </default>
</layout>

In homepage.phtml

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

in
app/design/frontend/[mytheme]/default/template/customblock.phtml

test

Where am I doing wrong?


texts:
I'm trying to re-write wishlist controller using following
config code

<frontend>
        <routers>
            <wishlist>
                <args>
                    <modules>
                        <Retailon_Wishlist before="Mage_Wishlist">Retailon_Wishlist
                        </Retailon_Wishlist>
                    </modules>
                </args>
            </wishlist>
        </routers>
</frontend>

controller

<?php
   require_once Mage::getModuleDir('controllers', 'Mage_Wishlist') . DS . 'IndexController.php';
class Retailon_Wishlist_IndexController extends Mage_Wishlist_IndexController  {

  Mage::log("arg", null, 'wish.log');
    protected function _addItemToWishList()
    {
        Mage::log("arg2", null, 'wish.log');
// code snippets ...

But this controller is not being called though my module is enabled.


texts: invert show content magento 2 editor by mysql

texts: I was migrating some products to magento 2, and I was doing it manually, when I realized I had not clicked show / editor and now my html code of the descriptions are appearing in the front-end, you can change this via the database table Dice?


texts: Remove price from category page in magento 2

texts: In magento2 - I want to remove price from category page ( product listing ) in magento enterprise version.


texts: I've created a custom footer template inside my theme folder app/design/Vendor/Module/Magento_Email/email/footer.html , the problem is i need to get base url inside this html file.


texts: How to override items.phtml in module ? (Magento 2)

texts:
I am trying to override module-sales/view/frontend/templates/email/creditmemo/items.phtml file but no changes appearing.
Is their any way i can override it in my module ?
Thankyou


texts: joinLeft escape string from ON condition

texts:
I am wondering if it is possible to escape string inside ON condition, something like binding params inside where condition. This is my code

$this->getSelect()->joinLeft(
                array('notcountries' => $countriesTable),
                "main_table.page_id = notcountries.page_id AND notcountries.country_id='$countryId'",
                array()
        )
        ->where("notcountries.country_id IS null");

$countryId is received from user and can be potentially harmful string. What is a proper way to make $countryId safe string?


texts: Issue when adding new top menu using admin panel

texts:
I created a CMS page from the adminpanel.

After that i created a CMS block using the admin panel.
Both worked fine.
Then i created a new Category and inside the category form i added the previous generated CMS Block in the "Add CMS Block" Dropdown. In "Display Mode" i selected "Static block only".

The static Block and the Top menu is created like expected, but the Category Title is displayed below of the CMS Block. I want to show the Category Title above the CMS Block.

How can i achieve this ?


texts: Getting custom attributes in PDF Invoices from different shops

texts:
Friends,

i have read a lot about this part.
Lots of people want to have some custom attributes in the PDF invoices and on the adminHtml part.

I am not able to get it work on the PDF.
it works on the Cart, Checkout, adminHtml but not on the pdf.

I modify (rewrite):
app/code/local/Mage/Sales/Model/Order/Pdf/Items/Invoice/Default.php
different ways.

The attribute i try to call is "vpe" and is located after // custom options
All I get is an empty value.
By the way: the attribute must be called from the correct shop.
In shop A i do not use this VPE.
The invoice is from shop B and VPE is used on all products (its visible on the AdminHtml page)
These ways did not work:

1)

  $product = Mage::getModel('catalog/product')->loadByAttribute('sku', $this->getSku($item), array('vpe'));
     if ($product) {
          $lines[][] = array(
               'text'  => 'vpe:'.$product->getData('vpe'),
               'feed'  => 34
          );
     }

2)

$_item = $this->getItem();
$_item->setStoreId($_item->getInvoice()->getStoreId());

$storeId =  $_item->getStoreId();
$productId = $_item->getProductId();
$product = Mage::getModel('catalog/product')->load($productId);

$_vpe = $product->getData('vpe');

$attributes = $product->getAttributes();
$dispAttribs = array('vpe');
foreach ($attributes as $attribute) {...
        $attributeCode = $attribute->getAttributeCode();
        if(!in_array($attributeCode, $dispAttribs)) continue;
        $label = $attribute->getFrontend()->getLabel($product);
        $value = $attribute->getFrontend()->getValue($product);

            $_vpe = $value;
}

$lines[][] = array(
    'text' => Mage::helper('core')->__('vpe: ') . $_vpe,
    'feed' => 34
);

Using Magento 1.7.0.1

EDIT:

I found another way to try:

$product = Mage::getModel('catalog/product')->setStoreId($item->getStoreId())->loadByAttribute('sku', $this->getSku($item));
$attribute = $product->getResource()->getAttribute('vpe');
if ($attribute)
{
    $_vpe = $attribute ->getFrontend()->getValue($product);
}
$lines[][] = array(
     'text'  => 'vpe:'.$_vpe,
     'feed'  => 34
);

After inserting this i get some VPE but from the wrong shop.
any ideas?


texts: Backup Data Rollback failure Issue in magento 1.9.3.4

texts:
I have deleted all the database from /var/backups folder. but I  have  a copy of those database in my local hard drive so I copy database and paste in /var/backups
Now Database is showing in admin but when i try to rollback it shows loading but nothing happens.

It also showing wrong date of database and when i add more database in var/backups folder
it shows error


texts: Is the apache ab tool sufficient enough for benchmark testing a Magento server?

texts:
I'm working to improve the load time of my Magento installation but obviously I need something accurate to show me what actually works and doesn't work.

I started using the ApacheBench ab tool and running the server without any cache, with cache and a FPC show the improvements I was expecting.

I don't know that the LestiFPC is the best module available, while it works well I'm sure load times can be better. None of the paid FPC's have run any testing against each other or have any hard numbers to backup their claims so I need something indisputable that is recognized.

Is the ApacheBench tool sufficient to test load times of a Magento installation or are there other more recognized tools that would be better suited for this purpose?


texts: Hiding prices from certain countries using GeoIP

texts:
My website is going to be viewed worldwide, but I want only certain countries to be able to view prices/purchase goods.

In total there will be 5 different regions that will be able to view prices/buy products, but the product ranges will vary depending on region.

I thought about using GeoIP to determine where the customer is based, but how do I do this using different stores/store views?

Thanks


texts:
How would I go about adding a custom field (image upload, specifically) to the CMS Page section? I'm looking to have a field where the client can upload an image, which then you can access it in a phtml file and call it in every cms page.

I've done this before in Magento 1 with a module, but not sure where to begin in Magento 2.

Any help would be greatly appreciated.

Thanks!


texts:
is it possible to override Magento addError($this->__()); with prototype javascript?

My plan is to create validation before the user clicks the submit button for the re-captcher form. this is what i'm trying to override:

catch (Exception $e) {
        if (strlen($e->getMessage()) > 0) {
         $session =  Mage::getSingleton('core/session')->addError($this->__($e->getMessage()));
            $e =  Mage::getSingleton('core/session')->setFormData($post);
            $e->addSuccess($session);
        }
        if ($redirectUrl = Mage::getSingleton('review/session')->getRedirectUrl(true)) {
            $this->_redirectUrl($redirectUrl);
            return;
        }
        $this->_redirectReferer();
        return;
    }