texts: Order confirmation observer in Magento 2 not working

texts:
I'm implementing extension for Magento 2. I've been trying to add observer for event sales_order_save_commit_after but for some reason the observer doesn't catch the event. I've added logging for the events based on these instructions: How to get events/observers in magento 2 and it seems the event gets fired but is not catched by the observer.

Here's the frontend/events.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="sales_order_save_commit_after">
        <observer name="my_dummy_observer" instance="My\Plugin\Model\Observers\Dummy" />
    </event>
</config>

And here's the observer

use Psr\Log\LoggerInterface;

class Dummy implements ObserverInterface
{
    protected $_logger;

    public function __construct(
        LoggerInterface $logger
    ) {
        $this->_logger = $logger;
    }

    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $event = $observer->getEvent()->getName();
        $this->_logger->info("\n" . '[OBSERVER EVENT CATCHED]: ' . $event . "\n");
    }
}

Any idea why the event is not catched with that configuration?


texts: How to limit the total cart/order weight?

texts:
Magento 2.1.

How can I limit the total cart/order weight so it does not exceed 7 KG?

I use "Table Rates" shipping method


texts: Custom Attribute Filter by option_id and not by label

texts:
I've got a very strange problem. I created a custom attribute named "taille_ecran" which mean in english "screen size". The labels of this attribute are numbers like 1.2, 1.6, 2, 5, 6, etc...

When I try to add a custom filter like this :

$_productCollection->addAttributeToSelect('taille_ecran');
$_productCollection->addFieldToFilter(array(
    array('attribute'=>'taille_ecran','lteq'=>$_GET['max_size']),
));

The filter filters by the option_id of thoses labels in "taille_ecran" instead of labels values. In fact, here is the ID of my labels :

31 => 1.2
41 => 5 etc...

When I tried to get the labels "lteq" under 7 there is no result and when I try 35 I get 1 result which is 1.2.

I try also to print this value in my products list :

echo $_product->getTailleEcran();

// print 31 when it's for 1.2...

It's very hard for me to explain clearly what is happening. I don't have this problem with other attribute.

Thanks in advance for your help !


texts: Magento 1.9.x Local.xml file what is the  tag for?

texts:
Ive been trying to find an explanation for the Model tag in the local.xml file in magento:

for example a magento project im working with contains:

<model><![CDATA[mysql4]]></model>

Im curious as to what magento is reading, is it behaving in a mysql4 manor? can I upgrade this?

Im not looking for DBA explanations on how magentos should be architected, im purely looking at this XML of model.


texts: Magento 2: 2 databases, only one with table_prefix

texts:
I have defined an additional custom database connection in etc/env.php:

'db' => [
    'table_prefix' => 'abc_',
    'connection' => [
        'default' => [
            'host' => 'localhost',
            'dbname' => 'db1',
            'username' => 'db1',
            'password' => 'pw1',
            'active' => '1'
        ],
        'custom' => [
            'host' => 'localhost',
            'dbname' => 'db2',
            'username' => 'db2',
            'password' => 'pw2',
            'active' => '1'
        ]
    ]
],

Tables inside the default connection all have the prefix abc_. The tables in the custom connection don't have a prefix. Unfortunately the table_prefix option seems to apply to all defined connections.

Is there a way to have this setting on a connection basis?


texts: Product 'new' tag/overlay with selection attribute in backend

texts:
So I am trying to create an option where I can select yes or no in the backend, and when it's set to yes, it adds an product overlay image with a 'new' tag. Here's what I have so far:

Created an attribute called new and made sure it's set to Visible on Product View Page and Used in Product Listing. Both set to yes.
Then I added this to my list.phtml file:

<?php $_collectionSize = $_productCollection->count() ?>
  <?php $_columnCount = $this->getColumnCount(); ?>
     <ul class="products-grid products-grid--max-<?php echo $_columnCount; ?>-col">
    <?php $i=0; foreach ($_productCollection as $_product): ?>
        <?php /*if ($i++%$_columnCount==0): ?>
        <?php endif*/ ?>

           <?php if ($_product->getAttributeText('new') == "Yes"): ?>
             <?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('new')->toHtml() ?>
              <?php endif; ?>

    <li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">

Then I created a static cms block called 'new' and added a div with a tiny 'new' label image to that. As follows:

So now I'm able to select yes or no in my backend with the products, and that works perfectly. However, the actual image is not showing up as an overlay on the products where I selected 'yes'.

What's missing?


texts: Which admin user added product in magento 2 backend

texts:
I have store with 200 products and 6 user roles in backend who are allowed to enter products.

Is there any way that I could know that specific product is added by which user.

As I always go through he-did/she-did situation when something went wrong in product entry.


texts: Changing the sitemap after SSL installation

texts:
I recently installed SSL and edited .htaacess file.( for proper redirection). Recently, I found that the XML sitemap is referring to the non-SSL version as in the picture.

Magento ver. 1.9.3.4

Is there any way to change these URLs?


texts: Magento 2.3.4 : How to add & play Vimeo embed video

texts: I have a Vimeo video URL. But, I can't able to add in my custom page. How to load and play on the custom page?


texts: Display Parent Category Title on Sub Category Page Title

texts: How to change Magento 2 Sub Category Page Title? I want to show parent category title when visiting sub-category.


texts: How to save custom table data in Magento 2?

texts:
I have created a table using a Controller and Model and in that file show some data.
But i don't know how to save that data in database i have created a table in Magento 2 db.
But don't understand how to get those data and save it.
Any help is appriciated.
When i click on send it reload the page and in network it goes to 302 Found.


texts:
I use a third-party theme, initially the theme included Jquery through default_head_blocks.xml. I wanted to use requireJS instead and I removed Jquery from default_head_blocks.xml.

Now I have this error:

  jQuery is not defined

I found that jquery is loaded after his plugins. How can I load jquery just after requirejs-config.js ?


texts: Trying to get CloudFront to work with Magento 2

texts:
My problem is that I upload all my products using the import function on Magento, it is easier to upload products in bulk using a CSV file in this way.

I have a field for images, and I upload all my images first on S3 bucket which I have set my origin in Cloudfront to fetch these images. So everything is setup fine regarding displaying the images on CloudFront if I add the absolute URL of the image path in the browser my image shows fine, so this is the image URL I add to my CSV file for Magento to find and upload my images according to each product.

So once I upload my products via a CSV file Magento fetches my images from S3 bucket and adds them to Magento folders. Now I have uploaded my images but they not showing from CloudFront rather from the same server as Magento. The next step I create the same folder structure as Magento for my images and CSS files and upload all the images and files to S3 bucket. Then I go to Magento backend and change the Base Site/Media URL to CloudFront, this now fetches my images and files from Cloudfront.

Now my file name for the images once fetched has the CloudFront URL I added in my backend and adds the absolute URL also as a filename from my CSV file I added, so the filename is terribly long and looks cumbersome.
Also now I have a duplication of images on my Magento server and S3 and every time I want to upload more images I have to copy all the folders and files from Magento server to S3, this is a long tedious process.

Please advice what I am doing wrong and if there is a way I can do this better and more efficient?


texts: What’s the best way to achieve this several options/quantities pricing model? (not tier)

texts:
We sell tours and activities, and often price for child is different from adult price.

Currently to achieve needed functionality we are creating 2 simple products for each product (productX-adult, productX-child) and put them in main bundle product (productX)

I am wondering is there a better way to do it?

We will need to add Senior option to some products in near future, so it will be 3 QTY selectors and each will have different price.

So with our current set-up we will have to create 3 simple products(productY-adult, productY-child, productY-senior) and 1 main bundle(productY) for each product.

What’s the better way to do this?


texts: Suppose I reach to this page customer/account/login/, after I click on "Sign In" button and i found referer feature not working :(

texts:
How to echo or print the referer url(history page) from where I reached to that login page.
I have to implement something that after login user should not reach to dashboard instead he should re-direct to the same page from where he came after login.
Some blogs says its an inbuilt feature of magento , but i don't why this inbuilt feature is not working in my case and also i need to know the flow of the referer/key variable and its implementation to be successful.
I want to know the proper working or some good tutorial link for that referer implementation.
I tried this
My research page - https://www.rakeshjesadiya.com/get-referer-url-in-magento-2/


texts: I've inherited a site that was M1 and using system URLs. I have migrated the product data over to an M2 installation. Is there a way now to convert those system URLs to canonical URLs?


texts: how to store contact us form details in database programmatically magento 2?

texts:
I want to store contact us form details in database  programmatically
  magento 2 ?


texts: Getting error when open any order Exception occurred during order load in Magento 2.2.2

texts:
I am facing issue when click on view order link in admin.

  Exception occurred during order load

How can I fix the issue? I am working on Magento 2.2.2


texts: Magento 2.1.7 - Create a new product tax class

texts:
How to create a new product tax class in magento 2.1.7 and create two different tax rates for same region.

I am unable to find "Add new tax class" button under additional settings when creating new tax rule.


texts: How to truncate Magento newsletter template table

texts:
I like to delete the existing expired template in magento,i search the table in mysql, but i can not able to find the exact template table.

is there have any way to delete all the existing newsletter template query in magento.

Thanks in advance for your help.


texts:
I want to execute my code once when a customer is loaded in the admin area, I use the customer_load_after event to do that, the problem, I have the method is triggered three times, and I only need one.

I tried to use a flag protected $_firstTime, and I tried to put it in a contructor too, but nothing works because the class is instantiated every time.

didn't work either:

the register/registry
customer_load_before

I'm specifing in the oberser <type>singleton</type> But nothing works.

any idea?


texts:
I've seen this issue arise in many different threads but somehow none of the potential fixes have managed to work for me.

I've tried the popular:

<fieldset>
    <?php echo $this->getChildHtml('methods') ?>
</fieldset>

add id to fieldset

<fieldset id="checkout-payment-method-load">
    <?php echo $this->getChildHtml('methods') ?>
</fieldset>

But unfortunately this didn't want to work.

If you add a product to the cart from this website and proceed to the onepage checkout the website doesn't seem to load the first available option, be it 'Checkout Options' if you're a guest or 'Billing Address' if you're signed into an account on the website.

I was wondering whether anyone would have any other clues as to why it wouldn't work?

I have a hunch that it may be Prototype conflicting.

Any help appreciated.


texts: Allow duplicate E-mail for magento customer Registration

texts:
when customer registered with already existing email id it allowed to create account .
       for example existing email id:abc@gmail.com
        new customer register with the above email id it will create to account

 There is already an account with this email address. If you are sure that it is your email address, click here to get your password and access your account.'


texts: Magento 2 - Bug for url rewrite of subcategory

texts:
In my site in Magento 2.3.5 p1 the URL Rewrite of the categories and sub-categories does not work well.
I have two types of problems:

The first problem is on the Generate "category/product" URL Rewrites because when I try to save a category it generates a link with double slash and also does not translate the link for the different store.

The second problem is on the module that I installed to regenerate the url rewrite: OlegKoval module. When I launch the form to regenerate the links in the URL Rewrite it does not translate the category links by store language.

What could be the problem?
Thanks


texts: How to bypass CSRF validation for certain requests

texts:
I am trying to bypass the CSRF validation for my Controller. I had seen a few workaround in the below links.

Magento 2.3 upgrade breaks HTTP POST requests to custom module endpoint

But I need my Module compatible with both Magento 2.2 and 2.3. So, I had overridden a core file Magento\Framework\App\Request\Http like below

public function isAjax()
{
   if ($this->getRequestUri() == 'custom/url') {
        return true;
   }
    if ($this->isXmlHttpRequest()) {
        return true;
    }
    if ($this->getParam('ajax') || $this->getParam('isAjax')) {
        return true;
    }
    return false;
}

To bypass the validateRequest() function in Magento\Framework\App\Request\CsrfValidator

private function validateRequest(
    HttpRequest $request,
    ActionInterface $action
): bool {
    $valid = null;
    if ($action instanceof CsrfAwareActionInterface) {
        $valid = $action->validateForCsrf($request);
    }
    if ($valid === null) {
        $valid = !$request->isPost()
            || $request->isAjax()
            || $this->formKeyValidator->validate($request);
    }

    return $valid;
}

It was working fine. I want to know does it affect the technical review in the Magento Marketplace in any way (or) is there any other better way. Thanks in advance.


texts: How can i disable "my account" and my dashboard in magento?

texts:
How can I disable "my account" and "my dashboard" in magento?

We also don't want the link of "my account" in the top links beside log out/cart .


texts: Magento 2 Some products don't show price on frontend due to the product is not Salable?

texts:
Some of my products don't show prices on frontend. And when I diagnose the issue, I found this file,

vendor/magento/module-catalog/Pricing/Render/FinalPriceBox.php

And if I commented out the line 68, the Prices are displaying.

if (!$this->salableResolver->isSalable($this->getSaleableItem())) {
   // return '';
}

So this means that Magento doesn't think my products are saleable? or what was wrong?


texts: magento v1.9 catalog price rules doesn't work some times

texts:
We are using Magento version 1.9.2.3. We have cart price rules setup based on user's group and product's custom attribute. It sometimes doesn't work. And I am not sure what the reason is. I can't really replicate the issue as it is on and off type of issue.

Users are complaining about it for not getting discounts and i can verify it form their order but if i manually add same order for the specific user then i see the discount.

Has any one experienced this issue. I will really appreciate your help on this.


texts: Add attribute with "appy_to" parameter does not work

texts:
I am using the following function to add an attribute in an upgrade script:

$model->addAttribute('catalog_product', "LOAD TYPE", array(
    'type' => 'int',
    'input' => 'select',
    'label' => 'LOAD TYPE',
    'is_configurable' => '0',
    'user_defined'=>'1',
    'required' => false,
    'backend' => 'eav/entity_attribute_backend_array',
    'option' => array ( 'values' => array( 0 => 'white', ) ),
    'is_configurable' => false,
    'apply_to' => array('simple')
));

But apply_to does not work to select the product types.


texts: payment on paypal not matching amount in cart magento 2

texts:
Paypal «change» the amount that it's supposed to collect from the total basket of our website.
On our website we sell physical and downloadable products.
Everytime we have a «physical sale» which mean me need an address to send, everything is correct. The correct amount is «captured» by Paypal.
The problem occurs when a client buy mp3 which does not required a specific address.
Magento calculate the correct provincial taxes, so in the basket the amount is correct, once, the client click to pay, he still can see the correct amount but by the final stage of the payment process, the total withdraw from the customer account is not including the provincial tax.
Ex. MP3 is 9,95$ + 5% tx (0,50$). + 9,975% tx (0,99$) = 11,49$
In there's only mp3 in the basket, Paypal will charge only 10,45$
It seems to happen only for the client who use chrome and their Paypal account.
Any idea what could be done?


texts: How to move "addtocart" button to the left side in category view?

texts:
I'm pretty new to Magento2 and I'm trying to move elements inside category view.

I would move my add to cart button to the right of the screen in category view, and my quantity box too.

I've created the quantity box in the file :

  /var/www/html/vendor/magento/module-catalog/view/frontend/templates/product/list.phtml

by adding this to the form :

<input type="number" min="1" step="1" name="qty" id="qty"
style="width: 7em" maxlength="12"
value="<?php /* @escapeNotVerified */ echo '0' ?>"
title="<?php /* @escapeNotVerified */ echo __('Qty') ?>" class="input-text qty" />

I've tried to move an element in

  catalog_category_view.xml

in

  vendor/magento/module-catalog/view/frontend/layout/catalog_category_view.xml

but nothing change...

Thanks in advance..!


texts: Magento 2.2.3 - Call to a member function getProductCollection() on null

texts:
When I call to member function getProductCollection() It gives me a null error.

Error is:

  Fatal error: Method Magento\Ui\TemplateEngine\Xhtml\Result::__toString() must not throw an exception, caught Error: Call to a member function getProductCollection() on null in /media/webdata/var/www-data/html/ext_dev/m2/boughttogether/vendor/magento/module-ui/Component/Wrapper/UiComponent.php on line 0

My file is app/code/Vendor/BoughtTogether/Model/Product.php

<?php

namespace Vendor\BoughtTogether\Model;

class Product extends \Magento\Catalog\Model\Product
{
    /**
     * Retrieve array of bought type products
     *
     * @return array
     */
    public function getBoughttypeProducts()
    {
        if (!$this->hasBoughtTypeProducts()) {
            $products = [];
            $collection = $this->getBoughtTypeProductCollection();
                foreach ($collection as $product) {
                    $products[] = $product;
                }
            $this->setBoughttypeProducts($products);
        }
        return $this->getData('boughttype_products');
    }
    /**
     * Retrieve bought type products identifiers
     *
     * @return array
     */
    public function getBoughttypeIds()
    {
        if (!$this->hasBoughttypeProductIds()) {
            $ids = [];
            foreach ($this->getBoughttypeProducts() as $product) {
                $ids[] = $product->getId();
            }
            $this->setBoughttypeProductIds($ids);
        }
        return $this->getData('boughttype_product_ids');
    }
    /**
     * Retrieve collection bought type product
     *
     * @return \Magento\Catalog\Model\ResourceModel\Product\Link\Product\Collection
     */
    public function getBoughtTypeProductCollection()
    {
        $collection = $this->getLinkInstance()->useBoughttypeLinks()->getProductCollection()->setIsStrongMode();
        $collection->setProduct($this);
        return $collection;
    }
    /**
     * Retrieve collection bought type link
     *
     * @return \Magento\Catalog\Model\ResourceModel\Product\Link\Collection
     */
    public function getBoughtTypeLinkCollection()
    {
        $collection = $this->getLinkInstance()->useBoughttypeLinks()->getLinkCollection();
        $collection->setProduct($this);
        $collection->addLinkTypeIdFilter();
        $collection->addProductIdFilter();
        $collection->joinAttributes();
        return $collection;
    }
}

How can I solve this?


texts: which phtml file is used view shipping charges details under order items details

texts: I just want to know which file gets used to show shipping charges details under order items details. if its loaded from some helper or other please share details. check the attached screenshot here


texts: Magento 2 FPC invalidate homepage, specific product page and specific category cache in observer

texts:
I need to create on observer that should invalidate cache of the homepage, a specific product page and a specific category cache when a trigger occurs. Anyone can help ?

Thanks !


texts: Magento 2: publish changes from development env to production

texts:
I have two environments for my store developed in Magento CE 2.2.5, one is for development use (where I run the store in developer mode), the other is the production environment (where the I use the production mode).

I use the development environment to improve and add functionalities as well as doing JS/CSS changes. Everytime I want to move changes from development to production, after publishing the edited files (JS, LESS. ecc...), I need to remove the entire pub/static folder (except the .htaccess) and run the setup:static-content:deploy command.

Doing this leaves my site without CSS/JS files until the deployment is not finished. How can I avoid this? Should I deploy the static files in my development environment and publish the pub/static folder generated?


texts:
a few time per day i get the following error (as listed in the reports)

a:5:{i:0;s:124:"SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'catalog_url' for key 'UNQ_INDEX_PROCESS_INDEXER_CODE'";i:1;s:1900:"#0 /path-to-magento/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /path-to-magento/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /path-to-magento/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /path-to-magento/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `in...', Array)
#4 /path-to-magento/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `in...', Array)
#5 /path-to-magento/lib/Varien/Db/Adapter/Pdo/Mysql.php(1998): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `in...', Array)
#6 /path-to-magento/app/code/core/Mage/Index/Model/Resource/Setup.php(82): Varien_Db_Adapter_Pdo_Mysql->insertArray('index_process', Array, Array)
#7 /path-to-magento/app/code/core/Mage/Index/Model/Resource/Setup.php(45): Mage_Index_Model_Resource_Setup->_syncIndexes()
#8 /path-to-magento/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Index_Model_Resource_Setup->applyUpdates()
#9 /path-to-magento/app/code/core/Mage/Core/Model/App.php(417): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#10 /path-to-magento/app/code/core/Mage/Core/Model/App.php(343): Mage_Core_Model_App->_initModules()
#11 /path-to-magento/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#12 /path-to-magento/index.php(89): Mage::run('', 'store')
#13 {main}";s:3:"url";s:98:"/accessoires/peuter_80_98.html";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}

I have magento 1.8.1 CE.
Does anyone know what is wrong?


texts: Specialty pricing not displaying on product page (view.phtml)

texts:
I cannot seem to get the special price and the regular price with a strike through to display on the product page.  It displays everywhere else on the site, just except view.phtml.  I have gone through every forum I could find and tried all the solutions.  It is not theme based, as I tested another theme.  I did notice this javascript call in source code of the page which seems to give a clue.

    var optionsPrice = new Product.OptionsPrice({"productId":"70","priceFormat":{"pattern":"$%s","precision":2,"requiredPrecision":2,"decimalSymbol":".","groupSymbol":",","groupLength":3,"integerRequired":1},"includeTax":"false","showIncludeTax":false,"showBothPrices":false,"productPrice":1942.5,"productOldPrice":1942.5,"priceInclTax":1942.5,"priceExclTax":1942.5,"skipCalculate":1,"defaultTax":0,"currentTax":0,"idSuffix":"_clone","oldPlusDisposition":0,"plusDisposition":0,"plusDispositionTax":0,"oldMinusDisposition":0,"minusDisposition":0,"tierPrices":[],"tierPricesInclTax":[]});

I set all the attributes to the correct settings, made sure price.phtml is correct, cleared cache and emptied var cache to make sure that is not the issue.  Please let me know if anyone has run into an issue like this before or if there is any other info you need.  The site is currently blocked as it is client dev site, but I could add you IP to take a look.  Thanks!


texts: Admin logged out if autocomplete used in order create

texts:
We are getting logged out in the backend at sales > order > create if we use browser autocomplete in the billing address fields. To be more specific the loadBlock action returns ajaxExpired with and ajaxRedirect to the login page.

The actions that get triggered is a change event for every field in the form that's autofilled, which results in an ajax request for each of this fields, although the data transmitted is always the same.

In one of the responses we get the mentioned ajaxExpired. Replaying the requests with curl shows the adminhtml cookie that's most likely the reason, because it's changed after each ajax request and therefor yields a race condition with parallel requests.

Just debouncing the change event as a quick fix turned out to be complicated, because the event handler depends on the target element.

Any ideas how we can workaround the problem? Except not using form autocomplete.


texts:
As part of opening a Magento 2 CE 2.2.6 store on AWS, we would like to know if there is an official Docker image with an image deployment guide on AWS?

Thx


texts: My Created Custom controller not displaying in Magento?

texts:
I have created a controller to display the some text, but it's not displaying?

Can you any one tell me where I went wrong?

my code is

->local->Test->EasyLife->Block
//Template.php

<?php

class Test_EasyLife_Block_Template extends Mage_Core_Block_Template
{
    public function methodblock()
    {
        echo "Hello Bojjaiah!";
    }
}

->local->Test->EasyLife->controllers

//IndexController.php

<?php
class Test_EasyLife_IndexController extends Mage_Core_Controller_Front_Action
{
    public function indexAction()
    {
        //echo "Hello Bojjaiah!";
        $this->loadLayout();
        $this->renderLayout();
    }

    public function mamethodeAction()
    {
        echo "test mamethode";
    }

}

->local->Test->EasyLife->etc

//config.xml

    <?xml version="1.0"?>
<config>
    <modules>
        <Test_EasyLife>
            <version>0.0.1</version>
        </Test_EasyLife>
    </modules>
    <frontend>
        <routers>
            <testcontroller>
                <use>standard</use>
                <args>
                    <module>Test_EasyLife</module>
                    <frontName>display</frontName>
                </args>
            </testcontroller>
        </routers>
        <layout>
            <updates>
                <easylife>
                    <file>easylife.xml</file>
                </easylife>
            </updates>
        </layout>
    </frontend>
    <global>
        <blocks>
            <easylife>
                <class>Test_EasyLife_Block</class>
            </easylife>
        </blocks>
    </global>
</config>

->etc->modules->
//Test_EasyLife.xml

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

->default->test->layout

//easylife.xml

<?xml version="1.0"?>
<layout version="0.1.0">
    <default>
        <reference name="root">
            <action method="setTemplate"><template>page/3columns.phtml</template></action>

            <action method="setIsHandle"><applied>1</applied></action>
        </reference>
        <reference name="content">
            <block type="easylife/template" name="easylife.template" template="easylife/mytemplate.phtml">
            </block>
        </reference>
    </default>
</layout>

->default->test->template->easylife

//mytemplate.phtml

Hi Bojjaiah!

<?php $this->methodblock(); ?>

my output is

thanks in advance.


texts:
I'm newbie with Magento.
I have installed an extension with Magento Connect, the extension page says:

In this free version the following code must be manuallly pasted at XML custom layout update:

Actually I'm using RWD, I guess I have to past this code on layout.xml and I can't find it anywhere. Do I need to make this file myself?


texts: Migrate Magento From 1.9.3.4 to Magento 2.3.5 Upsell Products Block is not showing on Product View page

texts:
I have migrate magento1 to latest magento235 but i am not able to see related , upsell products
blocks in product view page becuase it is already showing in magento1 site perfect


texts: How can i get attribute option id in controller?

texts:
I try in my controller in following way

$newOption = $this->_objectManager->create('\Magento\Eav\Model\ResourceModel\Entity\Attribute\Option\Collection')
                         ->setPositionOrder('asc')
                         ->setAttributeFilter($attributeId)
                         ->setStoreFilter($storeId)->getItemByColumnValue("value", $data['title']);

            print_r($newOption['option_id']);exit;


texts:
I tried to make a custom grid with column in magento 2 like this:

<column name="referral_code">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="filter" xsi:type="string">text</item>
                    <item name="resizeEnabled" xsi:type="boolean">true</item>
                    <item name="label" translate="true" xsi:type="string">Referral Code</item>
                </item>
            </argument>
        </column>

it shows successfully, but the text default alignment for th and td is left, how can i make it in center?


texts: Mbstring installed, still getting "Call to undefined function mb_strtolower()"

texts:
My configuration details

PHP 7

Magento version 2.1

Also installed Mbstring extension,

but still getting error

Call to undefined function Magento\Framework\Event\mb_strtolower()

After throwing reindex command,

magento indexer:reindex


texts: Can't access the magento2.1.7 dashboard properly

texts: After the installation of magento 2.1.7 i can't access my dashboard properly and it was not responding.In the place of magento fevicon symbol it displays xampp symbol.


texts: How to display a configurable product associated simple products data

texts: I need to display attributes (additional information) of each simple product associated with the configurable product in Magento 1.9.


texts:
I asked my hosting site to update PHP so that I could configure Payzone to Magento 2. It seems that it may have upset something as when I try to go on the website, magento admin or File zilla I get an error message or Unable to retrieve deployment version of static files from the file system.

I've asked the hosting site to take a look, but they don't think that it's a problem at their end. Does anyone have any idea how I might fix this.


texts: How to set the product store view in magento2?

texts:
How to programmatically changes the product from default store view into all store view.

Thanks.


texts: Magento 1: how to properly redirect from an admin controller observer?

texts:
Ok, so I want to do some validations when submitting the mass update product attributes.

I've setup an observer like this:

<adminhtml>
    <events>
        <controller_action_predispatch_adminhtml_catalog_product_action_attribute_save>
            <observers>
                <fxcons_controller_action_predispatch_adminhtml_catalog_product_action_attribute_save>
                    <class>fxcons/observer</class>
                    <method>validateConsolidatedAttributesOnSave</method>
                </fxcons_controller_action_predispatch_adminhtml_catalog_product_action_attribute_save>
            </observers>
        </controller_action_predispatch_adminhtml_catalog_product_action_attribute_save>
    </events>
</adminhtml>

Then in my observer I do the following:

public function validateConsolidatedAttributesOnSave(Varien_Event_Observer $observer)
{
    // Get the controller action
    $controllerAction = $observer->getEvent()->getControllerAction();

    if (several checks here)
    {
        Mage::getSingleton('adminhtml/session')->addError(Mage::helper('fxcons')->__('Fail'));
        Mage::app()->getResponse()->setRedirect($controllerAction->getUrl('*/sales_order/'));
        Mage::app()->getResponse()->sendResponse();
    }
}

So the fail message is properly getting displayed but I never get redirected to the sales order grid and I also get the success "X products have been updated" message. On top of that the controller still updates the product and I don't want it to.

I have tried setting the "return_url" on the request param as well but didn't work.


texts: 'getFormattedPrice' undefined on checkout

texts:
I need to get a list under each product in the form:
 - Unit price
 - Amount
 - Amount based on price and quantity

Rewrite template:
vendor/magento/module-checkout/view/frontend/web/template/summary/item/details.html

my Template

code block

Must give a formatted price: 1.780,00 €

But on the front end, I see: 1780

I used the method: getFormattedPrice($parent.price)

but i was getting undefined


texts:
What will be the best way for multilingual footer links?
I have a shop with 2 languages (english and german). For the footer links I have 2 static blocks with the links in it. 1 block is for the german links (and they link to CMS Pages) and one for the english links (who link to other CMS Pages). So far this works great. The problem comes when you are on one of this CMS Pages and wanna switch the language. Cause the CMS Pages dont have the same url it can't switch to the other language version.

For example:

We have the link company that links to shop.com/company

And the same link in german would be Unternehmenthat links to shop.com/unternehmen

When you now are on one of this pages and wanna switch the language you will find yourself on the 404 page. 1 solution would be to give both CMS Pages the same URL with a different StoreView. But how would I do it if I wanna keep the url in the specific language?


texts:
Can you tell me expression for magento cron schedule to run script every 4 hours - every day. I tried:

<schedule><cron_expr>0 */4 * * *</cron_expr></schedule>

But job is not showing in cron_schedule table


texts: Magento keeps getting a 404 Not Found Error

texts: I am having the same problem as before.  I did an rsync with my prod site to make sure all files were exactly the same.  It shouldn't have overwritten my local.xml because I used the exclude option.  But once again I am getting the 404 not found error on any page I go to (on the dev site, which is in a subdirectory of the root)  I made sure the permissions were 755 on the local.xml, and all the connection specific info is correct.  What I did see is that it doesn't seem to be picking up the changes I made in the database to core_config_data to point the base url at the subdirectory.  What else would cause it not to be reading the local.xml?


texts: Ive changed a category to be an anchor category, but the products beneath this category are not showing on the category in list view as expected. What am I missing? Other categories marked as anchor ARE showing products.


texts: Add Layered Navigation to Custom results

texts:
I've got a store that is running 1.9.2.4 which was put together by someone else.  It seems they've used a "megabuzz.com" manufacturer plugin to add "brands" as a main navigational element.

Brands are then also added to the layered navigation.  This is fine as we use canonical to only allow layered navigation filters to canonical to the main category.

However, these megabuzz manufacturer pages display a sidebar with a list of brands with the code below in a sidebar.phtml.

<?php
if($brandurl == 'manufacturer'):
$manufacturers = $this->getManufacturers();
?>
<?php if (count($manufacturers)): ?>

        <?php echo Mage::helper('manufacturer')->getConfigTextLabe(); ?>

        <?php
            $i = 0;
            foreach ($manufacturers as $manufacturer): ?>
            <li class="<?php if ($i % 2 == 0): ?>left<?php else: ?>right<?php endif; ?>">
              <a href="<?php echo $this->getManufacturerUrl($manufacturer->getId()); ?>"
                 title="<?php echo $manufacturer->getName(); ?>">
                <?php //echo $manufacturer->getName();
                    $arraytitle = explode("-",$manufacturer->getName());
                    //print_r($arraytitle);
                    echo $arraytitle[0];
                ?>

            <?php $i++; ?>
          <?php endforeach; ?>

<?php endif; ?>

This isn't very user-friendly and would ideally like to add the layered navigation sidebar filters to the manufacturer pages to replace the above sidebar.

What's the best way to accomplish this?


texts:
I'm getting most viewed products with this code: But I want to filter simple products

$productCount = 3;
$storeId = Mage::app()->getStore()->getId();
$_mostViewed = Mage::getResourceModel('reports/product_collection')
        ->addAttributeToSelect('*')
        ->setStoreId($storeId)
        ->addStoreFilter($storeId)
        ->addViewsCount()
        ->setPageSize($productCount);

I researched and found this code ->addAttributeToFilter('type_id', array('eq' => 'simple')) They said it can filter by simple products. But it doesnt work. Is anyone know why?


texts: Database table for price/quantity (tier prices)?

texts:
Where is the table in tho database that manages the role product/quantity?

I need to synchronize this to another table in another database.


texts:
I have a configuration which is as follows: Notification->ReviewControllor->IndexAction

So I can access this url via: notification/review/index or notification/review

I want to make this work in such a way that: notification/review-vote should work.

How to I write my actionController name such that 'review-vote' gets me to the IndexAction method?


texts: Shipment Tracking displays Error in DHL Easylog Module

texts:
I am using a DHL EasyLog Shipping Module

I use DHL International and DPD international Shipping and when I enter the shipping information on the Order I choose DHL  (Deprecated) and enter the tracking number.

On the customers end or admin end when I click on the tracking number it brings the Pop-Up up and gives the following:

Tracking Information

Tracking Number:  xxxxxxxxxx
Carrier:   DHL (Deprecated)
Error:  Tracking information is currently not available. Please contact us for more information or email us at Support@.........

Please advise!


texts: Magento 2: Zip Validation on Checkout Page

texts: I want to add zip validation on my checkout page like right now if somebody put zip code like *6722 the order place I want some validation for special characters.


texts: Default meta title for product and category page

texts:
I want to set default meta title for product page,category page and for cms page. If I'm not setttin title in  admin panel I want to set my default title. But I don't know how to make this. I try override getMetaTitle but this does not  work for all titles, if I set title in panel admin too.

Do you have any hints?


texts: Can't remove VladimirPopov_WebForms from my server

texts:
Trying to remove VladimirPopov_WebForms from FTP.

Went to /app/etc/modules/VladimirPopov_WebForms.xml and put status to false.
Admin panel -> System - Configuration-< VladimirPopov_WebForms disabled
Removed all files from server
cleared cash
compilation is off

now, main page of admin panel is working but if I go to for example to Cache page Im getting this:

Fatal error: Uncaught Error: Class 'Mage_Webforms_Helper_Data' not found in /public_html/app/Mage.php:547 Stack trace: #0 /public_html/app/code/core/Mage/Adminhtml/Block/Page/Menu.php(325): Mage::helper('webforms') #1 /public_html/app/code/core/Mage/Adminhtml/Block/Page/Menu.php(144): Mage_Adminhtml_Block_Page_Menu->_isEnabledModuleOutput(Object(Varien_Simplexml_Element)) #2 /public_html/app/code/core/Mage/Adminhtml/Block/Page/Menu.php(98): Mage_Adminhtml_Block_Page_Menu->_buildMenuArray() #3 /public_html/app/code/community/Ess/M2ePro/Block/Adminhtml/Magento/Menu.php(23): Mage_Adminhtml_Block_Page_Menu->getMenuArray() #4 /public_html/app/design/adminhtml/default/default/template/page/menu.phtml(30): Ess_M2ePro_Block_Adminhtml_Magento_Menu->getMenuArray() #5 /public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/dscfilte/...') #6 /public_html/app/code/core/Mage/Core/Block/Template.php(272): in /public_html/app/Mage.php on line 547

Update: after returning everything back, I noticed that there is one table mag1_webforms and without this table nothing works, really confused now, dont know what I did wrong.


texts: Magento2 newsletter not sending the success mail

texts:
In my website newsletter email is not sending. when subscribe I'm not getting an email but unsubscribe i'm getting an email
can anyone please help me.

Thanks


texts:
I have a custom module and created etc/adminhtml/menu.xml

I want to open my menu item in new browser tab.

Is there any option available in magento to achieve this/set target="_blank" ?

Any help would be appreciated !!!


texts: Magento 2 product count in layer navigation for text swatches

texts:
I want to show the product count on layer navigation for text swatches.
By default Magento providing this feature for normal attributes(Text, Dropdown, and multi-select) in layer navigation but is not available for swatches.
Please see the below-attached screenshot for more clarity.
I Want like below

Magento by default providing for another attribute like text, dropdown

Please help on above issue.Any references or suggestions highly appreciated
Thanks


texts: How to trigger self.openFullScreen() function into my custom jQuery in Product details page

texts:
If we click on product image in the product details page, gallery full screen is coming to see the images in full screen.

I am trying to get the same functionality when click on my string Quick view in product details page added as an extension.

I have done so far:

I have added the below code in my template.

Quick view

I am using openFullScreen because i found openFullScreen related code at vendor\magento\magento2-base\lib\web\mage\gallery\gallery.js

Can any one tell me where i am doing wrong.

Help would be appreciated.


texts: Magento get best selling product list of child categories

texts:
I'm working on a code which retrieve Magento best selling products of a category. It works perfectly when a category has products. But the website has multiple category levels. when parent categories not have product it not shows best selling products.

But I need to show child categories best selling products when user in parent categories pages.

function getBestsellingProducts()
{
    // number of products to display
    $productCount = 10;

    // store ID
    $storeId    = Mage::app()->getStore()->getId();
    $categorycf=Mage::registry('current_category');
  echo   $currentCategoryId= $categorycf->getId();

  // $categoryx = Mage::getModel('catalog/category')->load(321);
//   $categoryx2 = Mage::getModel('catalog/category')->load(312);

    // get most viewed products for current category
    $products = Mage::getResourceModel('reports/product_collection')
                    ->addAttributeToSelect('*')
                    ->addOrderedQty()
                    ->setStoreId($storeId)
                    ->addStoreFilter($storeId)
                    ->addCategoryFilter(Mage::registry('current_category'))
                    //->addCategoryFilter($categoryx2)
                    //->addCategoryFilter($categoryx)
                    ->setOrder('ordered_qty', 'desc')
                    ->setPageSize($productCount);

    Mage::getSingleton('catalog/product_status')
            ->addVisibleFilterToCollection($products);
    Mage::getSingleton('catalog/product_visibility')
            ->addVisibleInCatalogFilterToCollection($products);

    return $products;
}

code for show products

$products = getBestsellingProducts();

    foreach ($products as $p) {
    $_product = Mage::getModel('catalog/product')->load($p->getId());
    echo $_product->getName();
    }

I notice "addCategoryFilter" function only support for one category. so is there any other way to get best selling products from a child categories of parent category.


texts: Why does Cm_RedisSession Seems to Disable `session_decode`

texts:
I'm running a Magento 1.9 system, and have Cm_RedisSession configured to store my sessions in a local redis instance.  For reasons that aren't entirely clear to me, it seems like the session_decode function no longer works.

The session_decode function is supposed to accept a session encoded string, and automatically populate the $_SESSIONS array with the data.  I'm working on a project where this is necessary.  When I'm using files or databases to save the sessions, my function works as expected.  However, with Cm_RedisSession active, it doesn't.

Does anyone know, (or can think of a reason), why?


texts: Magento 2.3 when Product export gets “Message is added to queue, wait to get your file soon" Not able to see export file in grid

texts: When i tried to export the product from admin of Magento 2.3.2, i am not able to see the exported csv in below grid


texts: Deploy installed extensions on magento 2 live

texts: I have installed magento 2 extension on local so now I want to deploy it on live server. I have made some changes in it aswell. So what is best way to do that ? just copy code there and run deploy command ?


texts:
By default, Magento uses the URL key 'home' for the CMS homepage. The problem is that the homepage now has 2 URL's. http://example.com/home and  http://example.com/. I don't like this behaviour, it also may affect SEO.

Magento doesn't allow changing the URL key to '/' or ''. Is there a decent method to resolve this without having to resort to canonical tags or 301 redirects?


texts: how to get wishlist id according to the product id?

texts:
I have a product id but i want to know the wishlist id according to that product id.
Is there any way to find that wish list corresponding that productid?


texts: How to create pagination in Magento 2 using Module?

texts:
I am creating a module with custom tab in Magneto 2 front end in which i have listed some product, now i want to create pagination for the same how would i do that.
Controller File :
<?php
namespace Vendor\Extension\Controller\Valuation;

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

class Index extends \Magento\Framework\App\Action\Action
{
protected $customerSession;
protected $urlInterface;
protected $resultPageFactory;

public function __construct(
    \Magento\Customer\Model\Session $customerSession,
    \Magento\Framework\UrlInterface $urlInterface,
    \Magento\Framework\App\Action\Context $context,
    PageFactory $resultPageFactory
) {
    $this->urlInterface = $urlInterface;
    $this->customerSession = $customerSession;
    $this->resultPageFactory = $resultPageFactory;
    parent::__construct($context);
}

public function execute()
{
    if(!$this->customerSession->isLoggedIn()) {
        $this->messageManager->addErrorMessage("You must be logged in to view product");
        $this->customerSession->setAfterAuthUrl($this->urlInterface->getCurrentUrl());
        $this->customerSession->authenticate();
        return;
    }
    $this->_view->loadLayout();
    $this->_view->renderLayout();
    $resultPage = $this->resultPageFactory->create();
    $resultPage->getConfig()->getTitle()->set(__('Custom Pagination'));
    return $resultPage;
}
}


texts: I try to install Magento2 in My local system but I got PHP Extension intl error


texts: Magento 2: Hiding a custom tab in backend

texts:
I have added a custom tab in Order view in backend. I need to hide the tab conditionally.

I have tried setting canShowTab() and isHidden() in by Module's Tabs Block to false and true respectively. But the tab still shows.

How can I hide this custom tab from my block ?

PS: I have tried clearing the cache, and have also done an upgrade.

namespace Company\Module\Block\Adminhtml\Order\View\Tab;

class Paymentdetails extends \Magento\Backend\Block\Template implements \Magento\Backend\Block\Widget\Tab\TabInterface
{
    /**
     * Template
     *
     * @var string
     */
    protected $_template = 'order/view/tab/paymentdetails.phtml';

    /**
     * Core registry
     *
     * @var \Magento\Framework\Registry
     */
    protected $coreRegistry = null;

    /**
     * Constructor
     *
     * @param \Magento\Backend\Block\Template\Context $context
     * @param \Magento\Framework\Registry $registry
     * @param array $data
     */
    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        \Magento\Framework\Registry $registry,
        array $data = []
    )
    {
        $this->coreRegistry = $registry;
        parent::__construct($context, $data);
    }

    /**
     * Retrieve order model instance
     *
     * @return \Magento\Sales\Model\Order
     */
    public function getOrder()
    {
        return $this->coreRegistry->registry('current_order');
    }

    /**
     * {@inheritdoc}
     */
    public function getTabLabel()
    {
        return __('Custom tab');
    }

    /**
     * {@inheritdoc}
     */
    public function getTabTitle()
    {
        return __('Custom tab');
    }

    /**
     * {@inheritdoc}
     */
    public function canShowTab()
    {
        return false;
        // return true;
    }

    /**
     * {@inheritdoc}
     */
    public function isHidden()
    {
        return true;
        // return false;
    }

    /**
     * Get Tab Class
     *
     * @return string
     */
    public function getTabClass()
    {
        return 'ajax only';
    }

    /**
     * Get Class
     *
     * @return string
     */
    public function getClass()
    {
        return $this->getTabClass();
    }

    /**
     * Get Tab Url
     *
     * @return string
     */
    public function getTabUrl()
    {
        return $this->getUrl('paymentdetails/*/paymentdetails', ['_current' => true]);
    }
}


texts:
I want to change the templates checkout/cart.phtml and checkout/cart/item/default.phtml respectively so that it shows the index of the item in the table (i.e. "Positions 1 through x").

I couldn't find a way to get the current index of the cart item in checkout/cart/item/default.phtml though. Is there any way to do this? Other than with a $GLOBALS variable.


texts: Magento admin product grid sorting is not working

texts:
In my Magento site, admin product grid sorting is not working.

Sorting is happening only with price. Other than that with any of other columns, sorting is not working. I have not overwritten the core files related to this grid.

Can anyone give me a solution for this?

Thanks in advanced.


texts: How can I move the Related Products to specific location on view page

texts:
I'm having trouble moving the related products block to a specific area on my view page.

I'd like to move the block right above the easy-tabs but when I try to specify either above=Mage_Catalog_Block_Product_View_Additional it appears as the header  and if I use * bellow=Mage_Catalog_Block_Product_View_Media" * it appears bellow the easytabs extension.

Here is a snippet of my catalog.xml:

            <block type="catalog/product_list_related" name="catalog.product.related" befo="Mage_Catalog_Block_Product_View_Additional" template="catalog/product/list/related.phtml"/>
    </reference>
  <reference name="right">
        <!--<block type="catalog/product_list_related" name="catalog.product.related" before="-" template="catalog/product/list/related.phtml"/>-->
    </reference>
</catalog_product_view>

Desired Result

How can I move the related products block above the easy tabs extension (or Product_View_Additional block)?


texts:
Hello!

I have a problem with editing the footer section of a Magento installation. Basically in the bottom right corner, there is a section of text, the one labelled as Company Information. And it might sound stupid, but I just can't find the file or section in either CMS or Configuration where that particular text can be edited.

Any ideas?


texts: I am recently install magento 2.0 but not good result

texts: Recently I installed magento 2.0 but I don't know it's not working. I dont know what is the mistake I made.


texts: Magento 2 configurable product on product list, prices all change

texts:
I have managed to get configurable product options to display on the product list page of a category. The add to cart function works correctly too and adds the correct product variation to the cart. My only issue is to do with the price of the configurable products. If I choose a product variance (that has a different price to the base price) from the configurable product dropdown all the configurable product prices change. I have managed to track down the code that is used to change the price ( module-catalog\view\base\web\js\price-box.js line 136) but cant seem to figure out how to restrict the other prices from changing. The code in question is below:

/**
     * Render price unit block.
     */
   reloadPrice: function reDrawPrices() {
        var priceFormat = (this.options.priceConfig && this.options.priceConfig.priceFormat) || {},
            priceTemplate = mageTemplate(this.options.priceTemplate);

        _.each(this.cache.displayPrices, function (price, priceCode) {
            price.final = _.reduce(price.adjustments, function(memo, amount) {
                return memo + amount;
            }, price.amount);

            price.formatted = utils.formatPrice(price.final, priceFormat);

            $('[data-price-type="' + priceCode + '"]', this.element).html(priceTemplate({data: price}));
        }, this);
    },

Any help with this would be much appreciated.


texts: Profiler not showing logs on Front-End but showing on Back-End on Magento 1.9.x

texts:
I have been trying to debug or troubleshoot my Magento Store (version 1.9.2.1) for a few days now. It's bottlenecking and hitting the server resource limits. But I am stuck on trying to get my profiler work. It's working and showing logs on the back-end but on front-end there's only empty columns and rows.

This is my Front-End -

And this is my Back-End -

I have tried to configure the debugger on my multilingual store views, but still not working. Is there any possible solution to it? Varien_Profiler::enable(); also uncommented on index.php.


texts: Not able to save product after disabling all Magento_Inventory* modules (MSI)

texts:
Running Magento 2.3.0 which is migrated from Magento 1. We have been running sometime with MSI enabled, but now want to stop using it. I disabled all Magento_Inventory modules. Now when I open a product and save it I get an http 500 error and find this in the error_log file:

    [05-May-2019 20:50:39 UTC] PHP Fatal error:  Uncaught Error: Cannot instantiate interface Magento\InventorySalesApi\Api\GetProductSalableQtyInterface in /home/villase1/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:116
Stack trace:
#0 /home/villase1/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Invento...', Array)
#1 /home/villase1/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(150): Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\\Invento...')
#2 /home/villase1/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(79): Magento\Framework\ObjectManager\Factory\Compiled->get('Magento\\Invento...')
#3 /home/villase1/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(150): Magento\Framework\ObjectManager\Factory\Compiled->create('KoekEnPeer\\Effe...')
#4 /home/villase1/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled in /home/villase1/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 116

[05-May-2019 20:50:45 UTC] PHP Fatal error:  Uncaught Error: Cannot instantiate interface Magento\InventorySalesApi\Api\StockResolverInterface in /home/villase1/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:116
    Stack trace:
    #0 /home/villase1/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Invento...', Array)
    #1 /home/villase1/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(150): Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\\Invento...')
    #2 /home/villase1/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(79): Magento\Framework\ObjectManager\Factory\Compiled->get('Magento\\Invento...')
    #3 /home/villase1/public_html/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\\Invento...')
    #4 /home/villase1/public_html/vendor/magento/framework/Interception/PluginList/PluginList.php(25 in /home/villase1/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 116

Below partial output from the php bin/magento module:status command:

List of disabled modules:
Magento_Inventory
Magento_InventoryAdminUi
Magento_InventoryApi
Magento_InventoryBundleProduct
Magento_InventoryBundleProductAdminUi
Magento_InventoryCatalog
Magento_InventorySales
Magento_InventoryCatalogAdminUi
Magento_InventoryCatalogApi
Magento_InventoryConfigurableProduct
Magento_InventoryConfigurableProductAdminUi
Magento_InventoryConfigurableProductIndexer
Magento_InventoryConfiguration
Magento_InventoryConfigurationApi
Magento_InventoryGroupedProduct
Magento_InventoryGroupedProductAdminUi
Magento_InventoryGroupedProductIndexer
Magento_InventoryImportExport
Magento_InventoryIndexer
Magento_InventoryLowQuantityNotification
Magento_InventoryLowQuantityNotificationAdminUi
Magento_InventoryLowQuantityNotificationApi
Magento_InventoryMultiDimensionalIndexerApi
Magento_InventoryProductAlert
Magento_InventoryReservations
Magento_InventoryReservationsApi
Magento_InventoryCache
Magento_InventorySalesAdminUi
Magento_InventorySalesApi
Magento_InventorySalesFrontendUi
Magento_InventoryShipping
Magento_InventorySourceDeductionApi
Magento_InventorySourceSelection
Magento_InventorySourceSelectionApi
Klarna_Core
Amazon_Core
Klarna_Ordermanagement
Magento_InventoryShippingAdminUi
Amazon_Login

Why are the Magento Inventory interfaces instantiated when the modules have been disabled?


texts: Magento 2 Cron job not running with constructor

texts:
I am currently developing a drop shipping module for our Magento 2.2.3 store.

For this I am creating a cron job to send a post request to my API that pulls in all the orders where a Magento 2 order hasn't been created. The cron job will then create magento 2 orders for these.

I have created a cron job that pulls orders to our database. this is working without a problem. The second cron job must then Create the orders.

<?php
namespace Vendor\DropShippingreceiver\Cron;
use \Psr\Log\LoggerInterface;

class CreateNewOrders {
protected $logger;
protected $_resource;
protected $curlClient;
protected $_storeManager;

public function __construct(
  \Magento\Framework\App\ResourceConnection $resource,
  LoggerInterface $logger,
  \Magento\Store\Model\StoreManagerInterface $storeManager,
  \Magento\Framework\HTTP\Client\Curl $curl,
  \Magento\Catalog\Model\Product $product,
  \Magento\Framework\Data\Form\FormKey $formkey,
  \Magento\Quote\Model\QuoteFactory $quote,
  \Magento\Quote\Model\QuoteManagement $quoteManagement,
  \Magento\Customer\Model\CustomerFactory $customerFactory,
  \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository,
  \Magento\Sales\Model\Service\OrderService $orderService
) {
    $this->curlClient = $curl;
    $this->logger = $logger;
    $this->_resource = $resource;
    $this->_storeManager = $storeManager;
    $this->_product = $product;
    $this->_formkey = $formkey;
    $this->quote = $quote;
    $this->quoteManagement = $quoteManagement;
    $this->customerFactory = $customerFactory;
    $this->customerRepository = $customerRepository;
    $this->orderService = $orderService;
}

 public function execute() {
  $this->logger->info("Creating new Orders-----------------------------");

  //Pull uncreated orders from DB. foreach( uncreated order) { create order }
//All other contents of this method have been commented out while testing.
//The only lines that i want to run are the two shown in this method:
//Log "finished creating" & Log "Creating new"

  $this->logger->info("Finished Creating new Orders---------------------");
 }
}

If i only add the Inject the following dependencies into the constructor, the cron job runs fine with no problems.

\Magento\Framework\App\ResourceConnection $resource,
LoggerInterface $logger,
\Magento\Store\Model\StoreManagerInterface $storeManager,
\Magento\Framework\HTTP\Client\Curl $curl

However, when i add the other dependencies, the Cron refuses to run at all.

Is there an issue with cron jobs regarding adding too many dependencies?
I require all of these to create an order programatically, to my understanding.

Although i mention creating orders, i am not asking how to do this as i already have the code set up for it.

'Why will my Cron job not run when i add the extra dependencies?' all i am trying to make it do for now is output to the logger.

Thanks

EDIT:

When i run the cron, this gets logged to the system.log and debug.log

[2018-06-08 10:36:06] main.INFO: Too late for the schedule Schedule Id: 37125 Job Code: dropshipping_createorders [] []
[2018-06-08 10:36:06] main.INFO: Too late for the schedule Schedule Id: 37128 Job Code: dropshipping_createorders [] []


texts: where is default template for link defined?

texts:
Please look at this screenshot:

Then look at "Mi cuenta" and "Crear una cuenta" links. As you see, those don't have templates defined, and in fact, when I saw the XML for layout, there is no en explicit template definition. so the question is, where is the default template for link defined?

I looked at module-theme/view/frontend/templates/link.phml but it seems it is not used.

Any help please?


texts: EComDev_PHPUnit EAV Attribute Fixture Yaml Format

texts:
I need to create a dummy customer attribute in the eav/attributes table using an fixture provided by EcomDev_PHPUnit.

I tried using the tables fixture also this is the data I need to provide, but this clears the entire table and only leaves my one fixture which is not of great use.

tables:
  eav/attribute:
    - attribute_id: 50000
      entity_type_id: 1
      attribute_code: "required_fixture_attr"
      backend_type: "varchar"
      frontend_input: "text"
      frontend_label: "Customer Fixture Attr"
      is_required: 1
      is_user_defined: 0
      is_unique: 0

I can't find any documentation on how to use the EcomDev_PHPUnit_Model_Fixture_Processor_Attributes in an acceptable YAML format.

Does anybody know the format, or have another method of adding an attribute to the eav_attributes table so I am not dependant on the default attributes shipped with Magento?


texts: Missing required argument $to of Magento\\Framework\\Mail\\EmailMessage. Magento 2.3.4

texts:
I was sending custom emails in magento version 2.3.2 successfully with below code:

$storeScope = \Magento\Store\Model\ScopeInterface::SCOPE_STORE;
        $stroreid = $this->_storeManager->getStore()->getId();
            $this->inlineTranslation->suspend();
            $error = false;
        $to = array($email);
            $transport = $this->_transportBuilder
                ->setTemplateIdentifier('template_name_here')
                ->setTemplateOptions(
                    [
                        'area' => \Magento\Framework\App\Area::AREA_FRONTEND,
                        'store' => $stroreid,
                    ]
                )
                ->setTemplateVars(['data' => $variable])
                ->setFrom($this->scopeConfig->getValue(self::XML_PATH_EMAIL_SENDER, $storeScope))
                ->addTo($to)
                ->getTransport();
            $transport->sendMessage();
            $this->inlineTranslation->resume();

But after upgrade to version 2.3.4, when this sendEmail() function is executed I am getting error:

  "message": "Missing required argument $to of
  Magento\Framework\Mail\EmailMessage.",

By comparing vendor folders of 2.3.2 and 2.3.4 I noticed

 Magento\Framework\Mail\EmailMessage

above class is new in 2.3.4 and has the following checks:

$mimeMessage = new ZendMimeMessage();
        $mimeMessage->setParts($body->getParts());
        $this->zendMessage->setBody($mimeMessage);
        if ($subject) {
            $this->zendMessage->setSubject($subject);
        }
        if ($sender) {
            $this->zendMessage->setSender($sender->getEmail(), $sender->getName());
        }
        if (count($to) < 1) {
            throw new InvalidArgumentException('Email message must have at list one addressee');
        }
        if ($to) {
            $this->zendMessage->setTo($this->convertAddressArrayToAddressList($to));
        }
        if ($replyTo) {
            $this->zendMessage->setReplyTo($this->convertAddressArrayToAddressList($replyTo));
        }
        if ($from) {
            $this->zendMessage->setFrom($this->convertAddressArrayToAddressList($from));
        }
        if ($cc) {
            $this->zendMessage->setCc($this->convertAddressArrayToAddressList($cc));
        }
        if ($bcc) {
            $this->zendMessage->setBcc($this->convertAddressArrayToAddressList($bcc));
        }
        $this->mimeMessageFactory = $mimeMessageFactory;
        $this->addressFactory = $addressFactory;

I am trying to solve the issue by successfully sending email in 2.3.4. Can somebody check it also!


texts:
I am trying to patch a Magento 1.7.0.2 with the

PATCH_SUPEE-6788_CE_1.7.0.2_v1-2015-10-27-12-00-16.sh

I have solved several line ending problems and missing .htaccess.sample ...

But these file cannot be patched:

patching file app/code/core/Mage/Core/Controller/Varien/Router/Admin.php
Hunk #1 FAILED at 131.
1 out of 1 hunk FAILED -- saving rejects to file
app/code/core/Mage/Core/Controller/Varien/Router/Admin.php.rej

patching file lib/Varien/Data/Collection/Db.php
Hunk #1 FAILED at 410.
Hunk #2 FAILED at 474.
2 out of 2 hunks FAILED -- saving rejects to file
lib/Varien/Data/Collection/Db.php.rej

I downloaded a fresh Magento 1.7.0.2 copy (from
https://www.magentocommerce.com/download) and tried to apply the patch on it but also failed.

Checked the lines mentioned on CLI (like FAILED at 131) but I did not found anything suspicious.

Also it did not write any .rej files

Any advise ?


texts: Magento 2: Checkout page error Failed to load the "ui/form/element/" template

texts:
I am getting error on checkout, I have remove all extension and try if this is cause of extensions but no luck.

[ERROR] Failed to load the "ui/form/element/" template requested by "checkout.steps.shipping-step.shippingAddress.shipping-address-fieldset.depotid".


texts: Every time i make changes in my template file i need to flush cache

texts:
I'm new to Magento ( 2.4.1 )
Every time i make changes in template files i need to flush cache every time usin php magento cache:flush in CMD ... this is too much time taking... Very slow development... Any solution?


texts: Magento 2.3.0 unable to insert images in tinymce content

texts:
I notice that I couldn't insert images when adding products in tinymce content part.
When I click on Insert Image button, I saw error as image below
I granted access to /media directory 777.

I followed the instruction Magento 2.3.0 "A technical problem with the server created an error." When uploading the logo image but it did not fix issue. I checked  var/log/system.log but the log did not show any text errors.


texts:
I am preparing for magento certification exam. I came across below question,

1. In magento, when is order refunded?
a. When items are not fully refunded
b. When total order is greater than 0
c. When there is a item which is invoiced but not refunded.
d. B and C

I am confused. According to me option b is correct. Because, if items are fully refunded still we can refund order. If there is a item which is invoiced and refunded still we can refund order.
What will be correct answer can anybody help me?


texts: Magento2 multi-store on different domain

texts:
I have created a sub-website, sub-store, and sub-store-view from magento2 admin and update sub-store base url from configuration setting.

After that I have created a subdomain (sub.example.com), but here I am little confused that subdomain will link to root directory or any sub directory, and what changes I have to make in index.php and .htaccess file?


texts: Magento2. More information about the Entity Manager?

texts:
A part from this question Magento 2.1: using the entity manager that was asked and answered a year ago, a lot can change in an year, I can't seem to find anything about the Entity Manager.

Should I start using the entity manager? Can anyone share some light on cases in which it should be used or not? What are the advantages of using it. And the disadvantages of not using it.


texts: View session expiration time from database in readable format

texts:
I want to see the session expires time in a readable format. The time is stored as an int. Is there a way to see it in a readable format? I couldn't find how Magento is deriving the int.

I tried the following query, which gave me a readable time, but the values didn't seem right.

select session_id, FROM_UNIXTIME(session_expires) as time from core_session ORDER BY time asc limit 20;

I tried ordering by both asc and desc, but neither gave values that seemed right. Is there another way?


texts: Displaying contact form under categories

texts:
I am not much familiar with many feature of magento but I know that to display form, we can use the following in pages.

{{block type="core/template" name="contactForm" form_action="/contacts/index/post" template="contacts/form.phtml"}}

but I have a requirement that needs me to put it under categories, how can I use the same code under "custom layout update" or code it in my template.


texts: Magento 2.3 PHP Parse error unexpected '?' in write.php

texts:
I want to Install cron with putty SSH. I use php bin/magento cron:install [--force] and get this error:

  PHP Parse error:  syntax error, unexpected '?', expecting variable
  (T_VARIABLE) in
  /www/htdocs/xxx/xxx/xxx/vendor/magento/framework/Filesystem/Directory/Write.php
  on line 35

Server run with PHP Version 7.2.11-nmm1. What can I do? Where I can begin to search for it?


texts: magento 2.1 create category attribute thumbnail

texts:
create category attribute thumbnail.
i create require file as per new magento 2.1
This is my category_form.xml

<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <fieldset name="content">
        <field name="thumbnail">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="dataType" xsi:type="string">string</item>
                    <item name="source" xsi:type="string">category</item>
                    <item name="label" xsi:type="string" translate="true">Thumbnail Image</item>
                    <item name="visible" xsi:type="boolean">true</item>
                    <item name="formElement" xsi:type="string">fileUploader</item>
                    <item name="elementTmpl" xsi:type="string">ui/form/element/uploader/uploader</item>
                    <item name="previewTmpl" xsi:type="string">Magento_Catalog/image-preview</item>
                    <item name="required" xsi:type="boolean">false</item>
                    <item name="sortOrder" xsi:type="number">30</item>
                    <item name="uploaderConfig" xsi:type="array">
                        <item name="url" xsi:type="url" path="catalog/category_image/upload"/>
                    </item>
                </item>
            </argument>
        </field>
    </fieldset>
</form>

when i upload image i show following error

{error: "The file was not uploaded.", errorcode: 666}
error: "The file was not uploaded."
errorcode: 666

i am not sure this is magento 2.1 bug ya something wrong in my code ?


texts: How to rewrite magento website to new domain

texts:
I have magento website in custom.com domain, and now I want to access complete frontend website content from one more domain also says custom1.com. Admin url will be same as custom.com/admin.

I have pointed new domain to custom.com server.

Is it possible to rewrite using htaccess rewrite rule, If yes then how?


texts:
In M2 dev docs there is this regarding auto increment:

  identity  Indicates whether a column is auto incremented.

Here's excerpt from my db_schema.xml:

<column xsi:type="int" name="entity_id" padding="11" unsigned="false" nullable="false" identity="true" comment="Entity ID"/>

No AUTO_INCREMENT in db is found. What am I doing wrong/missing?

Magento 2.3.4, MySQL 5.7

UPD. It seems like db_schema is cached somewhere. Nothing I do affects it, nor changing padding, nor anything else.

UPD2. Adding a column works. Moreso, even commenting old entity_id column and adding a dummy column with auto_increment works.


texts:
Error is "message": "Internal Error. Details are available in Magento log file. Report ID: webapi-5dee36e254394".

When you run http://localhost:8888/magento/rest/V1/position/1

Need to get result from "position" column.

Api is for retrieving a column field by given user input.

<?php
 namespace SimpleMagento\Custom\Model;

use SimpleMagento\Custom\Api\InfoLinkInterface;
use SimpleMagento\Custom\Model\ResourceModel\Info\CollectionFactory; //Collection file
use SimpleMagento\Custom\Model\InfoFactory; //Implemented getter setter model

class InfoLink implements InfoLinkInterface
{
   private $collection;
   private $infoFactory;
   public function __construct(CollectionFactory $collection,InfoFactory $infoFactory)
{
    $this->collection=$collection;
    $this->infoFactory=$infoFactory;
}
/**
 * @param int $id
 * @return \SimpleMagento\Custom\Api\Data\InfoInterface[]
 */

public function getInfo($id)
{

    return $this->infoFactory->create()->getCollection()->addFieldToFilter('entity_id',$id)->getData();
    //return $this->infoFactory->create()->getData('position')->addFieldToFilter('entity_id',1);

}
 }

?>

webapi.xml is

<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">

<route url="/V1/position/:id" method="GET">
    <service class="SimpleMagento\Custom\Api\InfoLinkInterface" method="getInfo"/>
    <resources>
        <resource ref="anonymous" />
    </resources>
</route>


texts: How to mass update product from array of products with unique data per product?

texts:
I'm looking for a better way to mass update product from an array of products with different data per product.

After some google searches I tested to use a function like this but I'm sure this can be done better.

/**
 * @param \Magento\Catalog\Api\Data\ProductInterface[] $products
 */
public function updateProductArray($products)
{
    /** @var $product \Magento\Catalog\Api\Data\ProductInterface */
    foreach ($products as $product) {
        try {
            $this->productRepository->save($product);
        }
        catch (\Exception $e){
            //LOG SOMETHONG
        }
    }
}

Does anyone have any ideas on how to speed this up?


texts:
I am new to Magento. According to other sites, Magento seems to be the best open source store software. Does anyone know how much files are in the latest Magento?

My hosting provider has a limit of 20000 inodes, so I need to know if I need to upgrade my plan or not.


texts: How do i insert line breaks in product description with a SQL query

texts:
How can I replace (\n) in SQL with a Line Breaks?
i want to do it with a SQL query,

I want in table: catalog_product_entity_text replace the value with Line Breaks instead of (\n)


texts: Magento 1.9 after clearing layout cache now have white screen

texts:
Ever since i cleared the layout cache in magento my website now has a blank white screen i've tried to find the error by adding the following in my index.php file but returns nothing.

  ini_set('error_reporting', E_ERROR);
  register_shutdown_function("fatal_handler");
   function fatal_handler() {
     $error = error_get_last();
     echo("<pre>");
     print_r($error);
   }


texts: Magento block is not showing any content but it the block is being displayed

texts:
I am new to Magento development so forgive me if I am missing a step, I created a .phtml file and I have called it inside one of my cms pages by using the following

{{block type="core/template" template="page/html/shop.phtml"}}

and inside my shop.phtml is

test

but nothing is showing even though it is recognizing it see below.


texts:
I move my magento project from localhost to shared server. Now since mod_version was not installed and the hosting provider said that enabling the module was not covered of the plan. So I followed the link below as a work around to make it run.

Magento 2: Apache mod version not enabled/installed/allowed by host, causes 500 error on all pages due to failing .htaccess files

After all the hard work, the magento now was running but I got the following error whenever I try to log out in admin side

[30-Aug-2018 01:09:57 UTC] PHP Warning:  Uncaught Exception: Warning: SessionHandler::open(): Cannot call session save handler in a recursive manner in /vendor/magento/framework/Session/SaveHandler.php on line 72 in vendor/magento/framework/App/ErrorHandler.php:61
#0 [internal function]: Magento\Framework\App\ErrorHandler->handler(2, 'SessionHandler:...', '/home/username...', 72, Array)
#1 /vendor/magento/framework/Session/SaveHandler.php(72): SessionHandler->open('host_here...', 'admin')
#2 [internal function]: Magento\Framework\Session\SaveHandler->open('host_here...', 'admin')
#3 /vendor/magento/framework/Session/SessionManager.php(189): session_start()
#4 /generated/code/Magento/Framework/Message/Session/Interceptor.php(50): Magento\Framework\Session\SessionManager->start()
#5 /vendor/magento/framework/Session/SessionM in /vendor/magento/framework/App/ErrorHandler.php on line 61
[30-Aug-2018 01:09:57 UTC] PHP Fatal error:  session_start(): Failed to initialize storage module: user (path:host_here:port_here) in /vendor/magento/framework/Session/SessionManager.php on line 189

Before I am using files to store session but I experiencing random/immediate logout whenever I do basic operations (add items, edit, etc.). Followed everything I find on google but no luck. Now I switched to memcached and it solved the issue. (I already experiencing the log out issue here.)

So now i using memcached to store session files. I assume that logout issue will be solve but when I tried to log out its still not redirecting and stuck in http://sub.domain.com/admin/admin/auth/logout/key/unique_key_here/ and error_log shows above error.

Didn't experience this on localhost. Im using v2.2.4. Please help anyone!


texts: Magento transactional email for new order sometimes using wrong output block

texts:
In my new order email, i have the line:

"layout area=\"frontend\" handle=\"sales_email_order_invoice_items\" invoice=$invoice order=$order":"Invoice Items Grid",

The majority of the time the email formats correctly using the correct template I've created in themename/default/template/email/sales/order/totals.phtml.  However, roughly 10% of the time, this template is not being used - I assume because $order is returning false and it's using "Invoice Items Grid" instead.

a) Is my assumption correct?

b) If so, what triggers $order to be false here?  I can't find any common theme with the customers who have received the incorrectly formatted emails.

c) What generates "Invoice Items Grid" instead, is it the Mage_Adminhtml_Block_Sales_Order_View block?

Thanks in advance for any insight!


texts: Elasticsearch Error - call_user_func_array() expects parameter 1 to be a valid callback

texts:
I have an M2 with Elasticsearch installed, with the Smile/Elasticsuite module.

These are my versions in composer.json:

"smile/elasticsuite": "2.5.15",
"elasticsearch/elasticsearch": "^2.2.3"

And in all the category pages, I have this error:

  Warning: call_user_func_array() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in /vendor/smile/elasticsuite/src/module-elasticsuite-virtual-category/Model/Layer/Filter/Category.php on line 153

There are the two lines related with this error :

$virtualRule = $category->getVirtualRule();
$data = call_user_func_array([$virtualRule, $callback], [$category]);

Somehow, the $virtualRule variable is NULL, and the function call_user_func_array doesn't like this if someone already saw this thing.

Feel free to answer, thanks!


texts: How to add PHP into Product description Tab?

texts:
I have a line of PHP that will determine where product videos appear on my site.  I would like for them to display in the product description tab, or possible in a custom Tab that I make, how would I do this as putting the php directly into the text field for that attribute doesn't work, and I can't find a place to drop this in the template files.   this is the php

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

Thanks for the help


texts:
I am trying to send custom template using below function in localhost.

$transport = $this->_transportBuilder->setTemplateIdentifier('send_email_custom_template')
            ->setTemplateOptions(
                [
                    'area' => \Magento\Framework\App\Area::AREA_FRONTEND,
                    'store' => \Magento\Store\Model\Store::DEFAULT_STORE_ID,
                ]
            )
            ->setTemplateVars(['data' => $postObject])
            ->setFrom($sender)
            ->addTo($email_to)
            ->getTransport()->sendMessage();

But mail is not going so what changes i need to do in localhost to make it working or is there any other way.

Can any one please guide me for this?

Thanks in advance.


texts: How to convert php mysql install script so it can be used in phpMyAdmin

texts:
I'm having a little trouble getting Aoe Profiler to create the database tables.  I sometimes convert to mysql install scripts so I use use them to create the tables through the SQL query in phpMyAdmin.  But this script I don't know how:

$this->startSetup();

$this->getConnection()->dropTable($this->getTable('aoe_profiler/run'));

/**
 * Create table 'aoe_profiler/profile'
 */
$table = $this->getConnection()
    ->newTable($this->getTable('aoe_profiler/run'))
    ->addColumn('id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
        'identity' => true,
        'unsigned' => true,
        'nullable' => false,
        'primary' => true,
    ), 'Profile Id')
    ->addColumn('created_at', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(), 'Creation time')
    ->addColumn('stack_data', Varien_Db_Ddl_Table::TYPE_VARBINARY, Varien_Db_Ddl_Table::MAX_VARBINARY_SIZE, array(), 'Data')
    ->addColumn('route', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array(), 'Route')
    ->addColumn('url', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array(), 'Url')
    ->addColumn('session_id', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255, array(), 'Session ID')
    ->addColumn('total_time', Varien_Db_Ddl_Table::TYPE_FLOAT, null, array(), 'Total Time in seconds')
    ->addColumn('total_memory', Varien_Db_Ddl_Table::TYPE_FLOAT, null, array(), 'Total Memory in MB');
$this->getConnection()->createTable($table);

$this->endSetup();

Can someone help me out on this?


texts: Pulling credit memo from database using MySQL query

texts:
I'm trying to pull a credit memo from the directly from the database but i keep getting the below error

ERROR:

  You have an error in your SQL syntax; check the manual that
  corresponds to your MariaDB server version for the right syntax to use
  near 'FROM sales_flat_creditmemo as o LEFT JOIN
  sales_flat_creditmemo_grid AS i ON i.`' at line 1

Here is my query

SELECT
    o.`increment_id` as `Credit Memo #`,
    CONCAT(YEAR(o.`created_at`), '/', LEFT(MONTHNAME(o.`created_at`),3), '/', DAY(o.`created_at`), ' ', TIME(o.`created_at`)) AS 'Created At',
    i.`order_increment_id` as `Order number`,
    CONCAT(YEAR(i.`order_created_at`), '/', LEFT(MONTHNAME(i.`order_created_at`),3), '/', DAY(i.`order_created_at`), ' ', TIME(i.`order_created_at`)) AS 'Order Date',
    i.`billing_name` AS `Bill to Name`,
    j.`sku` AS `SKU`,
    j.`name` as `Description`,
    j.`qty` AS `QTY`,
    j.`price_incl_tax` AS `Item Value(incl)`,
    o.`creditmemo_status` AS `Status`,
FROM sales_flat_creditmemo as o
LEFT JOIN sales_flat_creditmemo_grid AS i ON i.`entity_id` = o.`entity_id`
LEFT JOIN sales_flat_creditmemo_item AS j ON j.`entity_id` = o.`entity_id`
WHERE date(o.`created_at`) >= ADDDATE(LAST_DAY(ADDDATE(now(), INTERVAL -2 MONTH)), INTERVAL 1 DAY)
AND date(o.`created_at`) <= LAST_DAY(ADDDATE(now(), INTERVAL -1 MONTH))
AND date(i.`order_created_at`) >= ADDDATE(LAST_DAY(ADDDATE(now(), INTERVAL -2 MONTH)), INTERVAL 1 DAY)
AND date(i.`order_created_at`) <= LAST_DAY(ADDDATE(now(), INTERVAL -1 MONTH))
AND i.`parent_item_id` IS NULL AND state IN ("complete", "processing", "canceled" , "pending_payment")
ORDER BY o.`created_at` DESC

Can someone please help where i'm wrong?

PS: using magento 1.9


texts: Where is the settings to check Use default Value in magento 2?

texts:
We have a Multiple website Magento 2 setup, We add product data in All store view and only change product price in individual store views.

Now the problem is when we switch to store view, we have to check the Use Default value checkbox for all attributes. we want this check box to be checked by default. check attached image.


texts: Category page not working Magento 2 with more than 13 million products

texts:
I am stuck in an issue with Magento 2 has more than 13 million products. We have managed to upload 13 million products although is slow and it works like indexing, product page, and search page.

My frontend category page isn't opening now after waiting almost 2 minutes getting memory exhausted we have tried to allocate 18GB memory but it gets stuck on this query and through error memory exhausted.

  SELECT 1 AS status, e.entity_id, e.attribute_set_id, e.type_id, e.created_at, e.updated_at, e.sku, cat_index.position AS cat_index_position, stock_status_index.stock_status AS is_salable FROM catalog_product_flat_1 AS e
   INNER JOIN catalog_category_product_index_store1 AS cat_index ON cat_index.product_id=e.entity_id AND cat_index.store_id=1 AND cat_index.category_id='4'
   INNER JOIN cataloginventory_stock_status AS stock_status_index ON e.entity_id = stock_status_index.product_id AND stock_status_index.website_id = 0 AND stock_status_index.stock_id = 1 WHERE (stock_status_index.stock_status = 1)

Can anyone please suggest me how can I overcome this issue or speed up the processes and MySQL queries what architecture level changes should I do to make it work the category list page on frontend. I know this is huge data but it's our requirement to have this much products. We have a pretty good server

Intel Xeon E5-2689v4
128 GB RAM
1200 GB Datastores


texts: How to change database config magento 2.2.x?

texts: I have created new database and want change current store to new database, where i can change ?


texts: Magento 2 EE considerably slower that Magento 2 CE

texts:
Our developers are complaining that Magento2 EE is considerably slower that the CE version. Is there a reason for this?

Is there an ideal local work environment that is recommended with Magento2 EE?

For example: Core i5/ 8gb?


texts: Magento 2.4.0 Issues using docker with MariaDB

texts:
Has anyone else encountered this error?
I am using docker-compose.yml file with mariadb:10 image.
Schema creation/updates:
Current version of RDBMS is not supported. Used Version: 10.5.5-MariaDB-1:10.5.5+maria~focal. Supported versions: MySQL-8, MySQL-5.7, MariaDB-(10.2-10.4)


texts:
since load and save methods are deprecated, which should be the correct way to update an order, for example:
Lets say we have a cron running that gets a collection and then u do something like
foreach ($collection as $order)
{
$order->setState(Order::STATE_Whatever)
->SetStatus(Order::STATE_WhateverStatus);
$order->Cancel();
$order->addStatusToHistory($order-getStatus(), $statusMessage, true);
$order->save();
}

In this example is just cancels, but whatever, which would be the correct way to do this now?
I did some googling and found about OrderManagementInterface to get data, and ResourceModel to save, but im not sure thats the intended way now. I would be happy to get some clarification.
Thank you :)


texts: Change the position of fields in new address option of magento 2

texts:
Can anyone please suggest, how to reorder the fields in the Overview and payment page, while adding a new billing and shipping address. Please refer the image below.

Any help would be greatly appreciated.


texts:
What is the difference between the sales_order_invoice_register, sales_order_invoice_save_after and sales_order_place_after events?

I'd like to run a method after the payment capture for the invoice is carried out. Which event is best to hook to?

Thanks!


texts: Cannot disable frontend plugin "product_identities_extender"

texts:
I wanted to disable the frontend plugin "product_identities_extender" from the module ConfigurableProduct, because this plugin generates too big headers for apache servers.
Which results in the known issue Magento 2.3.1 - Issue with catalog search when using php7.2-fpm
I tried to add a module /MyVendor/MyModule to not overwrite Magento core code.
In /etc/frontend/di.xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Catalog\Model\Product">
        <plugin name="product_identities_extender" disabled="true"/>
    </type>
</config>

I'm not sure why the plugin wasn't disabled. Do I need something else to disable a Magento plugin?


texts:
How do I access $_REQUEST, $_POST or $_GET inside Magento CE modules?
When I try they all return nothing, so where did the $_REQUEST data disappear to?


texts: Removing a product from a category or setting the product categories programatically - Magento 2

texts:
I am trying to programatically remove a product from a category but it isn't working.

I have tried:

Using $product->setCategoryIds($categoryIds); and then saving with
$productRepository->save($product);
Removing the category using
$this->categoryLinkRepository->deleteByIds($categoryId,
$productSku);,
Using $categoryLinkManagement->assignProductToCategories($productSky, $categoryIds) (should remove categories not in the list)

I have also tried manually reindexing after every attempt, but with all of these methods the product still stays in the category I don't want it to be in.


texts: Increase Prices According to Customer Group including Tier Prices

texts:
So magento doesnt support this and its often asked about.

My customer enters all their prices as Trade pricing, but wants anyone with out that type of account ie not in a particular customer group to only see and buy at Retail price.

Trade get 20% off in my example.

I also use tier pricing.


texts:
I want to make SKU# visible on website. I found directions to update list.phtml and view.phtml.

It says to go to app\design\frontend\rwd\default\template\catalog\product\view.phtml.

Please advise where JAVA files are located? I have never done before. Thanks.


texts: how to add product edit link on product name in admin grid

texts:
hello everyone I want to add product edit link on product name which is showing in admin grid
below code is for the display product name
index.xml

<column name="entity_id" class="Magneto\SampleRequest\Ui\Component\Listing\Column\Products">
        <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
        <item name="visible" xsi:type="boolean">true</item>
        <item name="label" xsi:type="string" translate="true">Products Name</item>
        </item>
        </argument>
        </column>

products.php

<?php
      namespace Magneto\SampleRequest\Ui\Component\Listing\Column;
    use \Magento\Catalog\Api\ProductRepositoryInterface
  use\Magento\Framework\View\Element\UiComponent\ContextInterface;
  use \Magento\Framework\View\Element\UiComponentFactory;
  use \Magento\Ui\Component\Listing\Columns\Column;
   class Products extends Column
       {
      protected $_ProductRepository;
  public function __construct(
     ContextInterface $context,
    UiComponentFactory $uiComponentFactory,
   ProductRepositoryInterface $ProductRepository,
    array $components = [],
     array $data = [])
       {
      $this->_ProductRepository = $ProductRepository;
    parent::__construct($context, $uiComponentFactory, $components,
   $data);
   }
       public function prepareDataSource(array $dataSource)
       {
if (isset($dataSource['data']['items'])) {
    foreach ($dataSource['data']['items'] as $key => $items) {
        $product = $this->_ProductRepository->getById($items["entity_id"]);
        $dataSource['data']['items'][$key]['entity_id'] = $product->getName(); //to get product name
    }
}
return $dataSource;
    }
     }

now i want to display product edit link on product name click


texts:
I have created the Magento 2.4.1 project in my local system.
Now I have to set up this project on Github. I have created an account on Github.
Can someone tell me the steps to set up this on Github? Which files and directories should be upload on Github? What should be in the gitignore file?