texts: In Magento 2.2.5 The Custom attributes values are not coming in Collection

texts:
In Magento 2.2.5, I am creating a Custom Product and Customer attributes.
It is saving fine, but while retrieving, It is not coming in the Collection.
Here is my Code.
UpgradeData.php

 $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
 $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);
$eavSetup->addAttribute(\Magento\Catalog\Model\Product::ENTITY,'deal_start',['type' => 'varchar','backend' => '','frontend' => '','label' => 'Deal Start Date','input' => 'date','class' => '','source' => '','global' => 1,'visible' => true,'required' => true,'user_defined' => true,'default' => null,'searchable' => false,'filterable' => false,'comparable' => false,'visible_on_front' => false,'used_in_product_listing' => false,'unique' => false,'apply_to' => '','system' => 1,'group' => 'General','option' => array('values' => array(""))]);
$eavSetup->addAttribute(\Magento\Catalog\Model\Product::ENTITY,'deal_end',['type' => 'varchar','backend' => '','frontend' => '','label' => 'Deal End Date','input' => 'date','class' => '','source' => '','global' => 1,'visible' => true,'required' => true,'user_defined' => true,'default' => null,'searchable' => false,'filterable' => false,'comparable' => false,'visible_on_front' => false,'used_in_product_listing' => false,'unique' => false,'apply_to' => '','system' => 1,'group' => 'General','option' => array('values' => array(""))]);
$customerSetup->addAttribute(\Magento\Customer\Model\Customer::ENTITY, 'merchant_group', ['type' => 'varchar','label' => 'Merchant Group','input' => 'select','source' => 'Apptha\Customergroup\Model\Config\Source\Options','required' => true,'visible' => true,'position' => 333,'system' => true,'backend' => '']);
$attribute = $customerSetup->getEavConfig()->getAttribute('customer', 'merchant_group')->addData(['used_in_forms' => ['adminhtml_customer']]);
$attribute->save();


texts: $this->getLayout()->createBlock(.......) is not working

texts:
I have added a custom module to magento admin panel, my Controller is as following

    <?php
class ABC_Adminhello_AdminhelloController extends Mage_Adminhtml_Controller_Action
{
    public function indexAction()
    {
        $this->loadLayout();
        $this->renderLayout();

        $block = $this->getLayout()->createBlock('adminhello\adminhtml_export');

        $this->getLayout()->getBlock('content')->append($block);
        $this->_setActiveMenu('sales/order')
                ->renderLayout();
    }
}

and My block is like this

    <?php
class ABC_Adminhello_Block_Adminhtml_Export extends Mage_Adminhtml_Block_Widget_Form_Container
{
  public function __construct()
  {
    $this->setTemplate('export/order.phtml');
  }

}

The problem is that in my Controller

$this->getLayout()->createBlock('adminhello\adminhtml_export');

returns false, no block is crated, I am unable to find the reason.


texts: how can i remove Product count after category name?

texts: I want to remove product count from category in tree view.


texts:
Glad I was directed to this site. any help would be much appreciated!

I am developing my first Magento site.
I have a VPS server.
I copied my current website over to a /TEMP folder.
I have created a subdomain for the /TEMP folder store.mydomain.com

Magento is going to be installed on my main domain and /public_html folder

I would like to redirect anyone who visits mydomain.com and send them to store.mydomain.com

What is the best way to do this after I install magento?


texts: Can't update to 2.4 due to missing module magento/module-catalog-rule-graph-ql 100.4.0

texts:
When I try to run a composer update to update our magento 2.3.5-p1 project to magento 2.4 I get the following error:
Problem 1
- Installation request for magento/product-community-edition 2.4.0 -> satisfiable by magento/product-community-edition[2.4.0].

- magento/product-community-edition 2.4.0 requires magento/module-catalog-rule-graph-ql 100.4.0 -> no matching package found.

I've been looking high and low for some sort of package or github that I can add to our packagist but I can't find any. The only package I can find is 'module-catalog-graph-ql' which is missing the '-rule' part.
Anybody know which module I need and/or what I'm doing wrong?


texts: Add form fields to Checkout -> Payment&Review step

texts:
is there any tutorial, documentation or hints how to add a custom form to the Payment&Review step for my custom offline payment module in Magento2 checkout process and how to connect it to the database? I have seen some tutorials that describe how to add fields to the shipping address (e.g. https://sohelrana09.wordpress.com/2015/11/28/how-to-add-custom-field-to-shipping-address-form-in-magento-2-onepage-checkout/) but that is no option for me because the solution should work even for products without shipping. Any ideas?

Thanks a lot


texts: Naming convention of Layered Naviations layout file to override state.phtml Magento 2

texts:
How is this layout file named , i mean on what basis. (Since there is no controller and router xml)

Magento\LayeredNavigation\view\frontend\layout\catalog_category_view_type_layered.xml

If im correct, it references the Catalog modules Controller Category path.

But from where is : "view_type_layered" in the layout file name coming from?

What i want to achieve:  when we click on one of the filters the file which is responsible for the results is state.phtml . My custom filters on click are not filtering the results.

UPDATE
My current overridden layout file (catalogsearch_result_index) is for view:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceBlock class="Vendor\LayeredNavigation\Block\Navigation" before="-" name="catalogsearch.leftnav">
      <action method="setTemplate">
        <argument name="template" xsi:type="string">Vendor_LayeredNavigation::layer/view.phtml</argument>
      </action>
    </referenceBlock>

    <referenceBlock class="Magento\LayeredNavigation\Block\Navigation\State" before="-" name="catalogsearch.navigation.state" as="state">
      <action method="setTemplate">
        <argument name="template" xsi:type="string">Vendor_LayeredNavigation::layer/state.phtml</argument>
      </action>
    </referenceBlock>
</body>

1) Should i override state.phtml too?

2) If so, what is the layout file name:  is it catalog_category_view_type_layered or catalogsearch_result_index itself.


texts: What event should i trigger that works when a customer places an order?

texts: I'm new to Magento and the next step I want to learn is to listen to an event. So, I'm trying to find which event should I trigger that works after a customer has placed an order that also carries that order's information, including product SKUs, Order number, etc.?


texts: Magento 2.3 Add to cart not working only in chrome

texts: I am not able to add product in my website. There is no error and it works fine in firefox. Also the login is not working in all browsers. When login it redirects the login page itself and it repeats. I am really stuck here. Can anyone help please? my website is www.lacosy.com


texts:
Currently I struggle on a following problem. How can we have a url http://www.example.com/custom/custom/query which would point to http://www.yourwebsite.co.uk/custom/custom/index assuming that query can be anything. (without using .htaccess)

I did it in Magento 1 using url_rewrite in config.xml like this:

<rewrite>
    <fancy_url>
        <from><![CDATA[/custom\/custom\/(.*)/]]></from>
        <to><![CDATA[/custom/custom/index/]]></to>
        <complete>1</complete>
    </fancy_url>
</rewrite>

Is it possible (in anyway) in Magento 2?

Thanks


texts: Ignore website/store in search results, search all products from all shops

texts:
I would like to expand the search over all websites/stores in the installation.
In

Mage_CatalogSearch_Model_Layer

I tried to remove ->addStoreFilter() from the collection but this doesn't work...

Any hints where i should start looking for a solution?


texts:
I have created a sample product named hashtag ### example
I can find this product when searching it with hashtag, hash, example, ... but not with ###
the url looks like this: /catalogsearch/result/?q=%23%23%23
how can I make this work?
EDIT 1:
EDIT 2:
I also tried searching a product with the name %23%23%23 by putting ### in the search bar. but with no results. I also can't find that product when searching for %23%23%23


texts: Where is the code that sends an email when an account is being activated in the backend?

texts:
I'm working on shop where the customers will be imported by CSV, new customers will have NO password (password_hash = "").

The administrator will have to activate the new customers using the backend.

If a customer becomes activated, a random password should be generated and it should be included in the mail.

What I need to know is just where I find the code where the email will be sent.
The code of the email template is "customer_create_account_email_template".

It's not the sendNewAccountEmail() method in app/code/core/Customer/Model/Customer.php and it's not either successProcessRegistration() in app/code/core/Customer/controllers/AccountController.php.


texts: Magento 2.4 Elastic Search Categories Emptying

texts:
I have recently updated to Magento 2.4 and on my test site it works perfectly fine.
However, on my production site my categories randomly empty. To fix it, I manually run the bin/magento index:reindex and everything is back to normal.
I did initially have memory issues with the server where the memory would run out and the Elastic Search service would crash. I have since doubled memory and the service is no longer crashing, but I am still seeing issues with categories emptying.
I cannot see anything in the logs that indicates what the issue is.
I have also tried all indexes on 'Update on Save' and 'Update on Schedule'. When set on 'Update on Save' categories don't seem to empty as much.
Has anyone come across this?
My current Elastic Search health is yellow, and I have read I to get it to green I need to add an additional node, which I am hoping may resolve the issue.
Edit: Looks like its the catalog_product_attribute (EAV) index which is causing the issue. Re-indexing just this one sorts the error
**For anyone encountering this, turns out it was the CSP magento module which was sapping all the memory from the site. Disable the module and it works fine.
There is a thread on GIT for the issue: **
https://www.google.com/url?sa=t&source=web&rct=j&url=https://github.com/magento/magento2/issues/29964&ved=2ahUKEwjhquSO9KLtAhWMSsAKHXzdAK8QFjAAegQIBBAC&usg=AOvVaw0AJkr_XXkZRL6GsOTYs9fI


texts: What is the difference between $model->getOrigData(); and $model->getData();?

texts:
There are two methods which retrieve model data.

$model->getData();
$model->getOrigData();

Can anyone explain what is the difference between them ? Any help will be appreciated.


texts: Why magento serving Product- images from different paths

texts:
Product images are serving from different paths in view page & in sitemap.

1) product view page : media/catalog/product/W/i/image-name.jpg : link1

2) http://sitename.com/media/sitemap.xml : media/product/ee7/image-name.jpg : link2

but i want product images should serve from same path in both links:

media.phtml

<?php
    $_product = $this->getProduct();
    $_helper = $this->helper('catalog/output');
    $dexxtz = Mage::helper('productzoom');

    $dexxtz->getCss();
    $dexxtz->getJs();
?>

        <img class="etalage_thumb_image"
        src="<?php echo Mage::getModel('catalog/product_media_config')->getMediaUrl($_product->getImage()); ?>" />
        <img class="etalage_source_image" title="<?php echo $_product->getImageLabel(); ?>" src="<?php echo $dexxtz->getImageFeatured($this->helper('catalog/image')->init($_product, 'image'), true); ?>" />

    <?php
        foreach ($this->getGalleryImages() as $_image) {
            if(Mage::registry('current_product')->getImage() != $_image->getFile()) { ?>

                <img class="etalage_thumb_image" src="<?php echo $dexxtz->getImageFeatured($this->helper('catalog/image')->init($this->getProduct(), 'image', $_image->getFile())); ?>" />

                <img class="etalage_source_image" title="<?php echo $_image->getLabel(); ?>" src="<?php echo $dexxtz->getImageFeatured($this->helper('catalog/image')->init($this->getProduct(), 'image', $_image->getFile()), true); ?>" />

        <?php
            }
        }
    ?>


texts: Custom Checkout Validation: two fields must have the same value validation

texts:
I created two custom password fields, the confirm field should check if the value is the same as .create-password-field. I saw that Magento 2 uses equalTo but I can't get that to work in a uiComponent template.

I copied password.html and editted it.

The template i use for the create field:

  password-overwrite.html

<input class="input-text create-password-field" type="password" data-bind="
value: value,
valueUpdate: 'keyup',
hasFocus: focused,
css: {focused: value() != '' && value() != ' '},
event: {
    keyup: validationSuccess
   },
attr: {
    name: inputName,
    placeholder: placeholder,
    'aria-describedby': getDescriptionId(),
    'aria-required': required,
    'aria-invalid': error() ? true : 'false',
    id: uid,
    disabled: disabled
}"/>

  password-overwrite-confirm-password.html

<input class="input-text" type="password" data-bind="
value: value,
valueUpdate: 'keyup',
hasFocus: focused,
css: {focused: value() != '' && value() != ' '},
event: {
    keyup: validatePassword
   },
attr: {
    name: inputName,
    placeholder: placeholder,
    'aria-describedby': getDescriptionId(),
    'aria-required': required,
    'aria-invalid': error() ? true : 'false',
    id: uid,
    disabled: disabled
}" data-validate="{equalTo:'.create-password-field'} />

But that doesn't actually do anything for me? Or does it have to do with the fact that I don't have the field required. Since they are activated by a checkbox i'm not able to set them as required because otherwise they will still be required even if it's unchecked.

Thanks in advance!


texts: how to get proper indian currency format for price in magento 2?

texts:
in magento front end its showing ₹7,765,000.00

But we need  ₹77,65,000.00

$objectManager = \Magento\Framework\App\ObjectManager::getInstance(); // Instance of Object Manager
    $priceHelper = $objectManager->create('Magento\Framework\Pricing\Helper\Data'); // Instance of Pricing Helper
    $price =  43200000; //Your Price
   echo $formattedPrice = $priceHelper->currency($price, true, false);

it should display ₹4,32,00000
but it it displaying ₹43,200,000.00


texts: Different links to ultimately the same page on Magento

texts:
I'm wondering if some of you could help me out a bit here as I'm a bit consfused.

the way it's setup is that you can get to the same page via 3 or 4 different routes as below:

https://tesorotiles.co.uk/type/wall-tiles/rho

https://tesorotiles.co.uk/by-area/bathroom-tiles/rho

and there another 2-3 pages which lead to the RHO range

These 3 are the exact same page and we've done it this way to make sure there is no break in the breadcrumb. Is this ok SEO wise or anyone have any recommendation.

Thanks in advance


texts: Custom Layout update not visible in admin in single store mode

texts:
So I'm well aware that the Custom Layout Update changed with update 2.3.4 so that you now need to create an XML file.
My Problem..
When Single Store Mode is switched to YES,  the file is not visible in the Category admin menu under Design: Custom Layout Update.
Switch Single Store Mode to NO, and the file is then able to be selected in Design: Custom Layout Update.
I am using the Olegnax Athlete 2 theme and the theme developer assures me there is nothing wrong with the theme. I'm including two screenshots of the stores config in Single Store mode below.
https://ibb.co/YTFv9pS
https://ibb.co/8jrq5zD
Notice in single store mode the store and store view are blank in the Content:design:configuration.  I believe this is normal in single Store mode.
Any help would be appreciated.


texts: Tax calculation after address (country) selected in checkout - going back to catalog - not logged in

texts:
This situation was highlighted to me by two separate clients, and I hope someone can clarify it a bit, or propose a workaround/fix.

The store is in australia, and has tax rules configured for australia.
When a customer views the catalog, all prices are correctly displayed as inclusive of tax (10.00)
Customer then ads item to cart, and proceeds to checkout. Prices are still inclusive of tax, and correctly displayed as such.
Customer then selects USA as delivery, and billing address (guest checkout, not logging in)

Now, in the review, prices are (correctly?) displayed excluding tax, thus magento is picking up the USA address and adjusting price display accordingly.
Customer decides they want another item, browse to catalog, but now catalog is showing prices including tax (so still as australian).
Cart and Top Cart displays excluding tax, thus taking into account address selected at checkout.

Is this a bug? (magento 1.7, and 1.12 EE)
The request is to have the catalog also adjust accordingly.

The complaint was that customer viewed the same product in catalog, than what they had in cart, and now prices differ....and complained about it.

One way I can think of fixing this is to adjust the catalog priceblock code to get the checkout address country, and adjust the prices accordingly. Is this the correct path to fix?

Any other suggestions on this?


texts: Magento 2 Adding custom attributes InstallData.php Error

texts:
I'm trying to add a few custom customer attributes, I've created a simple module to install the attributes but my InstallData.php file keeps failing.

Here's my code:

<?php
 namespace CustomModules\CustomerNewsletters\Setup;

 use Magento\Eav\Setup\EavSetup;
 use Magento\Eav\Setup\EavSetupFactory;
 use Magento\Framework\Setup\InstallDataInterface;
 use Magento\Framework\Setup\ModuleContextInterface;
 use Magento\Framework\Setup\ModuleDataSetupInterface;

 class InstallData implements InstallDataInterface {
   private $eavSetupFactory;

 public function __construct(EavSetupFactory $eavSetupFactory) {
    $this->eavSetupFactory = $eavSetupFactory;
}

public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context) {
    $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
    $eavSetup->addAttribute(
        \Magento\Customer\Model\Customer::ENTITY,
        'new_products_newsletters',
        [
            'type'         => 'int',
            'label'        => 'New Products Newsletter',
            'input'        => 'boolean',
            'required'     => false,
            'visible'      => true,
            'user_defined' => true,
            'position'     => 999,
            'system'       => 0,
        ],
        'exclusive_offers_newsletters',
        [
            'type'         => 'int',
            'label'        => 'Exclusive Offers Newsletter',
            'input'        => 'boolean',
            'required'     => false,
            'visible'      => true,
            'user_defined' => true,
            'position'     => 999,
            'system'       => 0,
        ],
        'discounts_sales_newsletters',
        [
            'type'         => 'int',
            'label'        => 'Discounts and Sales Newsletter',
            'input'        => 'boolean',
            'required'     => false,
            'visible'      => true,
            'user_defined' => true,
            'position'     => 999,
            'system'       => 0,
        ]
    );
    $newProductsNewsletter = $this->eavConfig->getAttribute(Customer::ENTITY, 'new_products_newsletters');
    $exclusiveOffersNewsletter = $this->eavConfig->getAttribute(Customer::ENTITY, 'exclusive_offers_newsletters');
    $discountSalesNewsletter = $this->eavConfig->getAttribute(Customer::ENTITY, 'discounts_sales_newsletters');

    // more used_in_forms ['adminhtml_checkout','adminhtml_customer','adminhtml_customer_address','customer_account_edit','customer_address_edit','customer_register_address']
    $newProductsNewsletter->setData(
        'used_in_forms',
        ['adminhtml_customer']

    );
    $exclusiveOffersNewsletter->setData(
        'used_in_forms',
        ['adminhtml_customer']

    );
    $discountSalesNewsletter->setData(
        'used_in_forms',
        ['adminhtml_customer']

    );
    $newProductsNewsletter->save();
    $exclusiveOffersNewsletter->save();
    $discountSalesNewsletter->save();

    $this->removeAttribute('customer', 'new_products_newsletter');
    $this->removeAttribute('customer', 'exclusive_offers_newsletter');
    $this->removeAttribute('customer', 'discounts_and_sales_newsletter');
}

}

The error I get when running php bin/magento setup:upgrade:

  Installing data... Notice: Undefined property: CustomModules\CustomerNewsletters\Setup\InstallData::$eavConfig in C:\xampp\htdocs\hooplaHooray\app\code\CustomModules\CustomerNewsletters\Setup\InstallData.php on line 55


texts: Magento use SSL/https for certain IP only

texts:
I need to put a check on IP. I want to use SSL/https only for my IP.

Where is the method that forms baseUrl with https or http?
Where can I do this?


texts: $this->getPriceHtml($_product, true) not working

texts:
I have a website and few days before it was working fine. But suddenly it stopped showing Price in catalog page and product page.

In product page it is using this code snippet:

$this->getPriceHtml($_product, false, '_clone');

And in catalog page it is using

$this->getPriceHtml($_product, true);

Anyone who can help. Its an urgent issue.


texts: Uncaught Type Error in magento 2 and 404 error

texts:
I've been attempting to set up Magento 2 on a WAMP server and have ran into a few errors. My Magento UI doesn't look right and I have 2 errors in the error log (When you F12 the page).

"Uncaught TypeError: require is not a function"

AND

"GET http://localhost/Magento2/pub/static/version1533909984/adminhtml/Magento/backend/en_US/requirejs-config.js 404 (Not Found)"

I have attempted to solve these errors by using several commands such as:

1.) php bin/magento dev:source-theme:deploy

2.) php bin/magento deploy:mode:set production

3.)  php bin/magento setup:static-content:deploy

however they have had no affect at all. If i'm not mistaken, I believe the error lies with setting up static content but I am probably wrong. Every command and change I have made has had no luck.

Any help would be greatly appreciated. Thanks in advance :)


texts:
What does this error mean and how can I fix it? I'm sure it is related to me upgrading to php7. Thanks

Error:

PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Mage_Adminhtml_Controller_Action::_addLeft() must be an instance of Mage_Core_Block_Abstract, boolean given, called in controllers/Adminhtml/ListController.php on line 29 and defined in Mage/Adminhtml/Controller/Action.php:63

From ListController.php:

        public function editAction()
        {
            $id     = $this->getRequest()->getParam('id');
            $model  = Mage::getModel('commentbox/comment')->load($id);
            if ($model->getId() || $id == 0)
            {
                $data = Mage::getSingleton('adminhtml/session')->getFormData(true);
                if (!empty($data))
                    $model->setData($data);

                Mage::register('comment_data', $model);
                $this->loadLayout();
                $this->_setActiveMenu('system/commentbox');
                $this->_addContent($this->getLayout()->createBlock('commentbox/adminhtml_list_edit'))
  line 29-->         ->_addLeft($this->getLayout()->createBlock('commentbox/adminhtml_list_edit_tabs'));
                $this->renderLayout();
            }
            else
            {
                Mage::getSingleton('adminhtml/session')->addError(Mage::helper('commentbox')->__('Specified Script was not found!'));
                $this->_redirect('*/*/');
            }
        }

From Action.php:

line 63-->   protected function _addLeft(Mage_Core_Block_Abstract $block)
    {
        $this->getLayout()->getBlock('left')->append($block);
        return $this;
    }


texts: Loading data (fixtures) for PHPUnit tests from the database

texts:
I am following the latest official manual for EcomDev_PHPUnit with the latest version of that module and Magento CE.

I understand that a fixture is a set of data in a YAML format that is used to perform tests. However, how do I get the unit test to use the live database and not a fixture?

Thanks in advance for any help/tips/pointers.


texts:
Associated products do not show in the configurable product, don't know why... though My simple and configurable products are imported without errors but the simple are not attached to the configurable.

All conditions are checked by me..

visibilty = not show inidividually
stock = in stock
attribute set in simple =  same as configurable product
price =  set
status = enable

re-indexing -> done ...

I am using the DataFlow import tool..


texts:
Whenever I flush magento cache from backend

it redirects to login page

How do i solve this?


texts: Change the order of CSS files. Load module's CSS before theme's CSS

texts:
How can I change the order of CSS files to load module's CSS before theme's CSS? Here are some code examples:
Theme's CSS file (loaded on all pages) added in theme's local.xml:
<default>
    <reference name="head">
        <action method="addItem">
            <type>skin_css</type>
            <name>css/theme.css</name>
        </action>
    </reference>
</default>

Extension's CSS file (loaded only on category pages) added in module's XML layout file:
<catalog_category_layered>
    <reference name="head">
        <action method="addItem">
            <type>skin_css</type>
            <name>css/extension.css</name>
        </action>
    </reference>
</catalog_category_layered>

This is the order of loaded CSS files which I get on the category page, extension's CSS is loaded after theme's CSS:

/default/mytheme/css/styles.css
/default/mytheme/css/theme.css
/default/mytheme/css/extension.css

What I'm trying to achieve: extension's CSS is loaded before theme's CSS.
How can I force this order of CSS files:

/default/mytheme/css/styles.css
/default/mytheme/css/extension.css
/default/mytheme/css/theme.css

I've noticed that if I have many extensions installed, CSS of some extensions loads before theme's CSS and CSS of some other extensions loads after theme's CSS. I assume that it has something to do with the order of modules in Magento, but I don't understand how I can affect the order of CSS (or JavaScript) files on the frontend.
EDIT:
About philwinkle's answer:
but in this case I can't do something like this because it would add layout of the category page to all pages (that CSS file is needed only on category page):
<layout>
    <default>
        <update handle="catalog_category_layered" />
    </default>

    <catalog_category_layered>
        <reference name="head">
            <action method="addItem"><type>skin_css</type><name>css/extension.css</name></action>
        </reference>
    </catalog_category_layered>
</layout>

Can this solution be adjusted to my case somehow?


texts:
I need to override the class \Magento\Catalog\Model\Product\Link using preference, which is working fine,but the above mentioned class has a proxy class generated automatically \Magento\Catalog\Model\Product\Link\Proxy, which does not include the new methods added in the override. Is there any way we can inject those methods in the proxy class?

EDIT

I have tried to dig in to this and found that we can inject proxy using di.xml.
But when i tried to do that, i got an exception that the class Package\Module\Model\Class\Proxy Does not exist.
That means the new proxy i am trying to generate is not being generated automatically.


texts: How to display products which have same attribute value as related products in Product view page?

texts:
I have a requirement where, in product details (view) page, I need to display related products which are having the same color as of the product being viewed.

For example, I'm on a page which shows a "Red" Shoe, I should have a Red T-shirt, Red-Refrigerator, Red anything else to be displayed as related products (maximum 5 products).

I know this can be done easily in Enterprise edition, but how to do this in Community edition?

Any help please?

note:

  All products are simple products.


texts: How to get current product ids from this saveEntityFinish() function and insert to table

texts:
I want to insert product_id during product csv import from the below saveEntityFinish() function, just like how i am inserting 'sku'.

My table currently has:

sku column.

I want to add product_id column ans get the current products id from the function and insert.

public function getEntityTypeCode()
{
    return 'my_import';
}

protected function saveEntityFinish(array $entityData, $table)
{
    if ($entityData) {
        $tableName = $this->_connection->getTableName($table);
        $entityIn = [];
        foreach ($entityData as $id => $entityRows) {
                foreach ($entityRows as $row) {
                    $entityIn[] = $row;
                }
        }
        if ($entityIn) {
            $this->_connection->insertOnDuplicate($tableName, $entityIn,[
            self::SKU
        ]);
        }
    }
    return $this;
}


texts: how to exclude js form mediarox pagespeed

texts:
I have implemented pagespeed from mediarox.

Now i want to exclude jquery.min.js from the list, but in the documentation there it is nowhere mentioned how to do this.
how can i exclude only particulate js form list ?


texts: How to create multiple customer attributes in magento 2?

texts:
How to create multiple customer attributes in Magento 2 using InstallData or UpgradeData?

<?php

namespace DeviMage\CustomerAttribute\Setup;

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

class UpgradeData implements UpgradeDataInterface
{

    private $customerSetupFactory;

    public function __construct(
        CustomerSetupFactory $customerSetupFactory
    ) {
        $this->customerSetupFactory = $customerSetupFactory;
    }

    /**
     * {@inheritdoc}
     */
    public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context){

        $setup->startSetup();

        $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);

        if (version_compare($context->getVersion(), '1.0.6') < 0) {

            $customerSetup->addAttribute(\Magento\Customer\Model\Customer::ENTITY, 'designation', [
                'type' => 'varchar',
                'label' => 'Designation',
                'input' => 'text',
                'source' => '',
                'required' => false,
                'visible' => true,
                'position' => 333,
                'system' => false,
                'backend' => ''
            ]);

            $attribute = $customerSetup->getEavConfig()->getAttribute(\Magento\Customer\Model\Customer::ENTITY, 'designation')
                ->addData(['used_in_forms' => [
                    'adminhtml_customer',
                    'adminhtml_checkout',
                    'customer_account_create',
                    'customer_account_edit'
                ]]);
            $attribute->save();

            $customerSetup->addAttribute(\Magento\Customer\Model\Customer::ENTITY, 'landlinenumber', [
                'type' => 'varchar',
                'label' => 'Landline Number',
                'input' => 'text',
                'source' => '',
                'required' => false,
                'visible' => true,
                'position' => 333,
                'system' => false,
                'backend' => ''
            ]);

            $attribute = $customerSetup->getEavConfig()->getAttribute(\Magento\Customer\Model\Customer::ENTITY, 'landlinenumber')
                ->addData(['used_in_forms' => [
                    'adminhtml_customer',
                    'adminhtml_checkout',
                    'customer_account_create',
                    'customer_account_edit'
                ]]);
            $attribute->save();

        }
    }
}

What is Difference between InstallData & UpgradeData?


texts: Magento2 Admin UI Component: On fileUploader ajax completion in ui component, how can I reload the page it is on?

texts:
I have a grid that just shows a collection of a specific table.

below is a file upload component that I want to use for CSV upload, that will replace all old collection. Image reference is below:

When the file is uploaded, ajax completes, I need to reload the grid page so that new data is loaded and

$this->messageManager->addSuccess(__('Batch upload Success');

is displayed.

Please tell how can I do that.


texts: How to get only parent product with pagination using Magento2

texts:
I need to fetch only the parent products as per category ID using magento2 end point but as per my code I am getting also the children products. I am explaining my code below.

$quoteUrl ='https://example.com/index.php/rest/V1/products?searchCriteria[filterGroups][0][filters][0][field]=category_id& searchCriteria[filterGroups][0][filters][0][value]=2& searchCriteria[filterGroups][0][filters][0][conditionType]=eq&searchCriteria[pageSize]=8& searchCriteria[currentPage]=1&&searchCriteria[sortOrders][1][field]=created_at&searchCriteria[sortOrders][0][direction]=DESC';
$chQuote = curl_init($quoteUrl);
curl_setopt($chQuote, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($chQuote, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Authorization: Bearer " . json_decode($token)));
curl_setopt($chQuote, CURLOPT_RETURNTRANSFER, true);
$quote = json_decode(curl_exec($chQuote));
$array = json_decode(json_encode($quote), True);
echo json_encode($array);

Here I am getting also the children product but I need only the parent products of Category ID 2. The result should same what the below end points returns with pagination.

$quoteUrl ='https://example.com/index.php/rest/V1/categories/2/products';

The above API returns the parent product only so my requirement is I need to add the pagination to this API's result.


texts: Error in content deploy in magento 2.2.1

texts:
I have installed the magento 2.2.1 but on deploying static content it is giving following error

    PHP Fatal error:  Uncaught Error: Call to a member function getPackage() on null in /var/www/html/unicorn-magento/vendor/magento/module-deploy/Package/Processor/PostProcessor/CssUrls.php:215
Stack trace:
#0 /var/www/html/unicorn-magento/vendor/magento/module-deploy/Package/Processor/PostProcessor/CssUrls.php(109): Magento\Deploy\Package\Processor\PostProcessor\CssUrls->getValidExternalUrl('{{base_url_path...', Object(Magento\Deploy\Package\Package))
#1 /var/www/html/unicorn-magento/vendor/magento/module-deploy/Package/Processor/PostProcessor/CssUrls.php(80): Magento\Deploy\Package\Processor\PostProcessor\CssUrls->parseCss(Array, 'css/email-inlin...', 'frontend/Custom...', '@import url("{{...', Object(Magento\Deploy\Package\Package))
#2 /var/www/html/unicorn-magento/vendor/magento/module-deploy/Service/DeployPackage.php(147): Magento\Deploy\Package\Processor\PostProcessor\CssUrls->process(Object(Magento\Deploy\Package\Package), Array)
#3 /var/www/html/unicorn-magento/vendor/magento/module-deploy/Service/DeployPackage.php(103):  in /var/www/html/unicorn-magento/vendor/magento/module-deploy/Package/Processor/PostProcessor/CssUrls.php on line 215

I have removed view_processed content, pub/satatic and tried multiple times but this error is showing. Please help to resolve this. Thanks


texts: Want to change store language drop down to store language flags?

texts:
I am getting store languages in drop down format, while i want to show flags instead of store language drop down..

The child element i am using to call is :

$this->getChildHtml('store_language');

What do i have to need in the code so i can get the flags instead of drop down...

I am new in magento, so have not much idea..

please help me..

Thanks in advance...


texts: Multi Conditionals (OR, AND) in addAttributeToFilter

texts:
I am trying to to achieve some thing like

SELCT * FROM xyz WHERE ( open_date >= $fromDate AND open_date<= $toDate = ) OR (closed_to_date >= $fromDate AND closed_to_date<= $toDate =)

What I am doing is,

$fromDate = Mage::getModel('core/date')->date("Y-m-d");
$toDate = date("Y-m-d", strtotime("+2 week"));

        $addressCollection->addAttributeToSelect('*')->addAttributeToFilter(
                array(
                    array('attribute' => 'open_date', 'gteq' => $fromDate),
                    array('attribute' => 'closed_to_date', 'gteq' => $fromDate),
                )
        );

        $addressCollection->addAttributeToSelect('*')->addAttributeToFilter(
                array(
                    array('attribute' => 'open_date', 'lteq' => $toDate),
                    array('attribute' => 'closed_to_date', 'lteq' => $toDate),
                )
        );

sql query for above magento query is

(string) SELECT `e`.*, `at_open_date`.`value` AS `open_date`, `at_closed_to_date`.`value` AS `closed_to_date` FROM `customer_address_entity` AS `e`
 INNER JOIN `customer_address_entity_datetime` AS `at_open_date` ON (`at_open_date`.`entity_id` = `e`.`entity_id`) AND (`at_open_date`.`attribute_id` = '553')
 INNER JOIN `customer_address_entity_datetime` AS `at_closed_to_date` ON (`at_closed_to_date`.`entity_id` = `e`.`entity_id`) AND (`at_closed_to_date`.`attribute_id` = '384') WHERE (`e`.`entity_type_id` = '2') AND ((at_open_date.value >= '2017-01-19 00:00:00') OR (at_closed_to_date.value >= '2017-01-19 00:00:00')) AND ((at_open_date.value <= '2017-02-02 00:00:00') OR (at_closed_to_date.value <= '2017-02-02 00:00:00'))

But what I want is

SELECT `e`.*, `at_open_date`.`value` AS `open_date`, `at_closed_to_date`.`value` AS `closed_to_date` FROM `customer_address_entity` AS `e`
 INNER JOIN `customer_address_entity_datetime` AS `at_open_date` ON (`at_open_date`.`entity_id` = `e`.`entity_id`) AND (`at_open_date`.`attribute_id` = '553')
 INNER JOIN `customer_address_entity_datetime` AS `at_closed_to_date` ON (`at_closed_to_date`.`entity_id` = `e`.`entity_id`) AND (`at_closed_to_date`.`attribute_id` = '384') WHERE (`e`.`entity_type_id` = '2') AND ((at_open_date.value >= '2017-01-19 00:00:00') AND (at_open_date.value <= '2017-02-02 00:00:00')) OR ((at_closed_to_date.value >= '2017-01-19 00:00:00') AND (at_closed_to_date.value <= '2017-02-02 00:00:00'))

For more clarification, want to change condition

From

AND ((at_open_date.value >= '2017-01-19 00:00:00') OR (at_closed_to_date.value >= '2017-01-19 00:00:00')) AND ((at_open_date.value <= '2017-02-02 00:00:00') OR (at_closed_to_date.value <= '2017-02-02 00:00:00'))

To

AND ((at_open_date.value >= '2017-01-19 00:00:00') AND (at_open_date.value <= '2017-02-02 00:00:00')) OR ((at_closed_to_date.value >= '2017-01-19 00:00:00') AND (at_closed_to_date.value <= '2017-02-02 00:00:00'))

Update:-1
Came with a solution, but not a magento way.

$addressCollection = Mage::getResourceModel('customer/address_collection');
$addressCollection1 = Mage::getResourceModel('customer/address_collection');

$addressCollection->addAttributeToFilter('open_date', array('gteq' => $fromDate));
$ids1 = $addressCollection->addAttributeToFilter('open_date', array('lteq' => $toDate))->getAllIds();

$addressCollection1->addAttributeToFilter('closed_to_date', array('gteq' => $fromDate));
$ids2 = $addressCollection1->addAttributeToFilter('closed_to_date', array('lteq' => $toDate))->getAllIds();

$result = array_merge($ids1, $ids2);
$final_result = array_unique($result);

Any suggestion to improve this?


texts:
I have created Contact template but not display header and footer. below my code for contact html.

{{template config_path="design/email/header_template"}}

        {{trans "Name: %name" name=$data.name}}

        {{trans "Email: %email" email=$data.email}}

        {{trans "Phone Number: %telephone" telephone=$data.telephone}}

        {{trans "Comment: %comment" comment=$data.comment}}

{{template config_path="design/email/footer_template"}}


texts: Magento2 : user define customer attribute not save value while create / save from admin

texts:
I have created two customer attribute one "abc" and second is "xyz" this two attribute display properly in customer admin. also attributes are created in database table "eav_attribute". But while save new customer with this field data are not save this into database. And also can not able to get this custom attribute value in frontend header side. plz check file.

  app/code/Test/CustomerAttribute/Setup/InstallData.php

<?php
namespace Test\CustomerAttribute\Setup;

use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;

class InstallData implements InstallDataInterface {

    private $customerSetupFactory;
    public function __construct (
        \Magento\Customer\Setup\CustomerSetupFactory $customerSetupFactory
    ) {
        $this->customerSetupFactory = $customerSetupFactory;
    }
    public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
    {
        /** @var CustomerSetup $customerSetup */
        $customerSetup = $this->customerSetupFactory->create(['setup'=> $setup]);
        $setup->startSetup();
        $customerSetup->addAttribute('customer', 'account_id', [
            'label' => 'Account Id',
            'type' => 'varchar',
            'input' => 'text',
            'required' => false,
            'visible' => true,
            'position' => 105,
            "unique"  => false,
            'user_defined' => true,
            'system' => 0,
            'visible_on_front' => true,
            'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL,
            'is_used_in_grid' => true,
            'is_visible_in_grid' => true,
            'is_filterable_in_grid' => true,
            'is_searchable_in_grid' => true,
        ]);
        $loyaltyAttribute = $customerSetup->getEavConfig()->getAttribute('customer', 'account_id');
        $loyaltyAttribute->setData('used_in_forms',['adminhtml_customer','adminhtml_customer_address','customer_account_edit','customer_address_edit','customer_register_address','adminhtml_checkout']);
        $loyaltyAttribute->save();

        $customerSetup->addAttribute('customer', 'amount_spend', [
            'label' => 'Amount Spend',
            'type' => 'varchar',
            'input' => 'text',
            'required' => false,
            'visible' => true,
            'position' => 106,
            "unique"  => false,
            'user_defined' => true,
            'system' => 0,
            'visible_on_front' => true,
            'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL,
            'is_used_in_grid' => true,
            'is_visible_in_grid' => true,
            'is_filterable_in_grid' => true,
            'is_searchable_in_grid' => true,
        ]);
        $amount_spend = $customerSetup->getEavConfig()->getAttribute('customer', 'amount_spend');
        $amount_spend->setData('used_in_forms',['adminhtml_customer','adminhtml_customer_address','customer_account_edit','customer_address_edit','customer_register_address','adminhtml_checkout']);
        $amount_spend->save();

        $setup->endSetup();

    }
}

If you have any idea plz share it

thanks


texts: Magento 2.3.5-p2 3D Secure to Braintree not working Too many decimal places in amount field

texts:
I am having a problem getting 3DSecure to work on my site. I get the following error.
The JSON request I am getting back a 422 error from api.braintree.com
{
   "error":{
      "message":"Amount can be any number of digits optionally followed by a decimal point `.` and up to two decimal places following the decimal point. Commas `,` are not allowed."
   },
   "threeDSecureInfo":{
      "liabilityShifted":false,
      "liabilityShiftPossible":false
   }
}

This is the request data
{
   "_meta":{
      "integration":"custom",
      "integrationType":"custom",
      "merchantAppId":"xxxx.com",
      "platform":"web",
      "sdkVersion":"3.48.0",
      "sessionId":"3df9a6aa-46d1-494b-bff3-7a850a6ff13d",
      "source":"client"
   },
   "additionalInfo":{
      "billingCity":"xxxx",
      "billingCountryCode":"xx",
      "billingGivenName":"xxx",
      "billingLine1":"xxxxx Road",
      "billingPhoneNumber":"xxx-xxx-xxxx",
      "billingPostalCode":"xxxx",
      "billingState":"xx",
      "billingSurname":"xxxx",
      "shippingCity":"xxxx",
      "shippingCountryCode":"xx",
      "shippingGivenName":"xxxx",
      "shippingLine1":"xxx Road",
      "shippingPhone":"xxx-xxx",
      "shippingPostalCode":"xxxx",
      "shippingState":"xxx",
      "shippingSurname":"xxxx"
   },
   "**amount":12.0499**,
   "authorizationFingerprint":"eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiIsImtpZCI6IjIwMTgwNDI2MTYtcHJvZHVjdGlvbiIsImlzcyI6Imh0dHBzOi8vYXBpLmJyYWludHJlZWdhdGV3YXkuY29tIn0.eyJleHAiOjE1OTYyMTA2NDQsImp0aSI6IjcxNTQxYzA0LTZkNDItNDlhZi1iODc2LTBmZjA1ZWEwNDRhMSIsInN1YiI6ImJqcXY3cGpqbXJrajc4cHIiLCJpc3MiOiJodHRwczovL2FwaS5icmFpbnRyZWVnYXRld2F5LmNvbSIsIm1lcmNoYW50Ijp7InB1YmxpY19pZCI6ImJqcXY3cGpqbXJrajc4cHIiLCJ2ZXJpZnlfY2FyZF9ieV9kZWZhdWx0IjpmYWxzZX0sInJpZ2h0cyI6WyJtYW5hZ2VfdmF1bHQiXSwic2NvcGUiOlsiQnJhaW50cmVlOlZhdWx0Il0sIm9wdGlvbnMiOnsibWVyY2hhbnRfYWNjb3VudF9pZCI6ImxlZHJvcGVsaWdodHNDQUQifX0.naHfA02qt5clJXYGGg7xxTfKKdaJOMFR0NZCfDbTxUR_f6vk1skBe8BH0afOYpwXsEf4Iz8YGDy1an7vLN33sg",
   "braintreeLibraryVersion":"braintree/web/3.48.0",
   "clientMetadata":{
      "cardinalDeviceDataCollectionTimeElapsed":3,
      "requestedThreeDSecureVersion":"2",
      "sdkVersion":"web/3.48.0"
   },
   "dfReferenceId":"0_3767710b-425b-4ba7-83a1-6d72a4619ff4"
}

The problem is that Magento is passing amount":12.0499 which has 4 decimal places. The Braintree API is expecting only 2. My system is displaying the correct number of decimal places as 2 on the frontend. I am not sure how to force Magento to send only 2 decimal places?
Thank you for your help.


texts: Update product stock based on store id Magento 2

texts: I have created a multi-store view for my Magento site. In my custom extension I've successfully load store id and product, now I want to update the product quantity for specific store id, is there a way to do this?


texts:
we need to set rewrite rule for some images in Magento 2.2.5 using .htaccess rules or nginx conf

Example 1

Request Path:

  https://www.example.com//media/catalog/product/cache/1/thumbnail/543x403/db978388cfd007780066eaab38556cef/n/u/number1.png

Response Path:

  https://www.example.com/pub/media/catalog/product/cache/543x403/n/u/number1.png

Example 2

Request Path :

  https://www.example.com/media/catalog/product/cache/1/thumbnail/543x403/db978388cfd007780066eaab38556cef/l/e/legal_slide01.jpg

Response Path :

  https://www.example.com/pub/media/catalog/product/cache/543x403/l/e/legal_slide01.jpg

Here the l/e/ directories are set according to the first two characters of image name here: legal_slide01.jpg

Thank you


texts: How to add cancel order on customer account page magento 2

texts:
How to add cancel order functionality on myaccount page of customers so lease do the needful

please do the needful


texts: How do display the firstItem/Maximal Price in Configurable products? Anyone? programmatically Magento 2.2.3

texts:
so I have Configurable products with associated simple products, and the Configurable product displays the least expensive simple product within each configurable product associated in Catalog.

So how could I modify that behavior to either show the FirstItem Price or the Highest price from the associated Configurable product within the Configurable Product, instead of the least priced simple product?

Here is a few screenshots of the problem in question:


texts: How to add cms page on magento default footer links?

texts: I want to move Customer loyalty program from right side of footer. please see below image?


texts: prevent brute force attacks on the discount codes

texts: Is there a way to prevent brute force attacks on the discount code input eg limit the number of discount codes a customer can enter a day?


texts: In the admin panel, how to change the sidebar block template for specific category?

texts:
In the admin panel I am editing a category and have set the "Custom Layout Update" to:

<reference name="widget.support">
    <action method="setTemplate">
        <template>custom/widget-tradeclearance.phtml</template>
    </action>
</reference>

widget.support is defined in my catalog.xml:

<default>
    <reference name="left">
        <block type="core/template" as="widget.support" template="custom/widget-tradespecials.phtml" />
    </reference>
</default>

But this is not changing the template when I view the category page. How do I update the sidebar widget widget.support to show the other template?


texts: My core_session DB table is getting to heavy very quick

texts: Few months back my website sessions use to get recorded in var/session folder. Suddenly one day I was not able to delete that folder. I also tried using commands but It didnt work. Because of this my indoes level went high and website ended up crashion. So I have shifted my session files to DB, where I can easily truncate if required. But since few days my Website suddenly gets super slow, maybe because I am also upgrading my website to Magento 2.0 and its in the same server. But when I check my DB tables the core_session file size is increasing my 400 mb each day. I dont know where I am going wrong or the cron job settings are wrong. Please if anyone can help me on this.


texts: Magento 2.3. changing form validation options loses validation messages translations

texts:
I am running Magento 2.3. In the customer create account form I changed the way validation form errors are shown in this way:

var dataForm = $('#form-validate');

dataForm.mage('validation', {
    errorPlacement: function(error, element) {
        ... custom functionality ...
    }
}

Doing this all the validation messages lose their translations and are shown in English. If I comment out this piece of code the messages are shown in the current store language.

Anyone had this behaviour before?


texts: Change "elementTmpl" zip code field element in billing checkout Magento 2

texts:
How I can change "elementTmpl" for zip code field element in billing checkout Magento 2.

I have already been able to change the shipping by xml but I can not change the billing


texts: SUPEE 6788 - What do I need to do with overrides

texts:
Looking at the actually .sh patch I can see it updates files such as

/app/design/frontend/base/default/template/customer/form/register.phtml

I have my overridden the .phtml with my own in my theme I would need to apply the same changes the releveant files?

/app/design/frontend/rwd/[my theme name here]/template/customer/form/register.phtml

Obviously this is just an example of 1 file that the patch changes so if I do need to update them too, I presume I would need to review what files have been changed and update accordingly?


texts: dont add Product to cart when we click on ADD TO CART

texts:
By Default , ADD TO CART will do 2 things.

1)Add Item to cart

2)Create new row in sales_flat_quote_item_option Table in Value column.

But We want to remove first feature & want to keep only 2nd one when we click on ADD TO CART.

current code :

<?php $buttonTitle = Mage::helper('core')->quoteEscape($this->__('Add to Cart')); ?>

<button onclick="productAddToCartForm.submit(this)"><?php echo $buttonTitle ?></button>

I tried replacing onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')" but still Product is adding to cart when we click on ADD TO CART.

But we dont want to add Product to cart when we click on ADD TO CART

Edit : skin/frontend/base/default/js/msrp.js

var cartButton = $('map-popup-button');
            if (typeof this.cartLink != 'undefined') {
                if (typeof productAddToCartForm == 'undefined' || this.notUseForm) {
                    Catalog.Map.setGotoView(cartButton, this.cartLink);
                    productAddToCartForm = $('product_addtocart_form_from_popup');
                } else {
                    if (this.qty) {
                        productAddToCartForm.qty = this.qty;
                    }
                    cartButton.stopObserving('click');
                    cartButton.href = this.cartLink;
                    Event.observe(cartButton, 'click', function(event) {
                        productAddToCartForm.action = this.href;
                        productAddToCartForm.submit(this);
                    });
                }
                productAddToCartForm.action = this.cartLink;
                var productField = $('map-popup-product-id');
                productField.value = this.product_id;
                $(cartButton).show();
                $$('.additional-addtocart-box').invoke('show');
            } else {
                $(cartButton).hide();
                $$('.additional-addtocart-box').invoke('hide');
            }


texts: unfortunately your browser is not supported. please try another one

texts:
I just went live this morning and got that message suddenly when opening the website. It appears every time you go to another page. Clients are getting annoyed by it. Does any of you have a clue of why we are receiving this pop-up message?

Thanks in advance for your help,
Pablo.


texts: Edit .phtml file without have to run setup:upgrade

texts: I'm running on Magento 2 version 2.1.7, but everytime i change my .phtml file content i need to run php bin/magento setup:upgrade to see the change. I already set my magento 2 to developer mode


texts:
I tried installation with browser as follows

a. url/install.php

b. but at after db setting in installation wizard, browser gives 504 Gateway error
So I tried with terminal and tried following command,

php -f install.php -- --license_agreement_accepted yes --locale en_US --timezone "America/Los_Angeles" --default_currency USD --db_host localhost --db_name magento1x --db_user user --db_pass 123123 --db_prefix mage_ --url "http://base_url/" --use_rewrites yes --use_secure yes --secure_base_url "http://base_url/" --use_secure_admin yes --admin_lastname Lname --admin_firstname Fname --admin_email "abc@xyz.com" --admin_username username --admin_password 123123123

but I am getting following exception,

SQLSTATE[HY000] [1045] Access denied for user 'user'@'localhost' (using password: YES)


texts: Get collection with ordered quantities for admin grid

texts:
I added a custom grid in admin panel which shows all the Best seller product collections. (configurable products). The admin grid has the following columns:

entity_id     product_name    sku      ordered_qty

I am getting the Best seller product collection by using Mage::getResourceModel('reports/product_collection'); but while filling the admin grid, I am changing the product collection to related to catalog product collection. as shown below:

protected function _prepareCollection()
{
    $from = /* some date */;
    $to = /* some date */;

    $collection = Mage::getResourceModel('reports/product_collection')
        ->addAttributeToSelect('*')
        ->setStoreId($storeId)
        ->addOrderedQty($from, $to)

    $common_ids = array();

    foreach($collection as $product) {
        $common_ids[] = $product->getId();
    }

    $collection = Mage::getResourceModel('catalog/product_collection')
        ->addFieldToFilter('entity_id', $common_ids)
        ->addAttributeToSelect('*')
        ->addAttributeToSort('created_at', 'desc');
    $this->setCollection($collection);
    parent::_prepareCollection();
    return $this;
}

As you can see in the above code, I am getting the product collection twice because the "reports/product_collection" is not filling the admin grid. So, I did "catalog/product_collection" again to the collection which is filling the admin grid.

But "catalog/product_collection" is not filling the column ordered_qty because the ordered_qty column values are being prepared by "reports/product_collection".

How should I get the values for ordered_qty ?


texts: How to print collection mysql query in magento 2?

texts:
There is getSelect()->__toString(); is available in Magento 1 for print query of collection. like below example
$products = Mage::getModel(‘catalog/product’)
 ->addAttributeToFilter(‘status’, array(‘eq’ => 1));
echo $products->getSelect()->__toString();

Is there any method available in Magento 2?
I have found this ->printLogQuery(true); but doesn't work for me.
Update:
below is the code. I am trying to get the best seller products. It works perfect but I want to print a query for debugging.
$this->_collection->getSelect()
                  ->joinLeft(
                'sales_order_item',
                'e.entity_id = sales_order_item.product_id',
                array('qty_ordered'=>'SUM(sales_order_item.qty_ordered)'))
                ->group('e.entity_id')
                ->order('qty_ordered '.$this->getCurrentDirectionReverse());


texts:
how to show custom configure message in cod payment method in magento2..

already refer these link....
How to display instructions for custom payment method

Magento 2: add html in custom Payment method

How to do this....Thanks


texts: magento 2 captcha not rendering if I override layout xml

texts:
I am trying to override contact us page from one column to 2-columns-left

what I have did is copy contact_index_index.xml from vendor\magento\module-contact\view\frontend\layout\

to

app\design\frontend\namespace\themename\Magento_Contact\layout\

and change layout to  layout="2columns-left" so my xml is like bellow

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <title>Contact Us</title>
    </head>
    <body>
        <referenceContainer name="content">
            <block class="Magento\Contact\Block\ContactForm" name="contactForm" template="Magento_Contact::form.phtml">
                <container name="form.additional.info" label="Form Additional Info"/>
            </block>
        </referenceContainer>
    </body>
</page>

everything working fine and it changes template to 2 columns left but some how captcha is not rendering. Is it bug or I am doing something wrong ?


texts: How to export selected products to xml in admin product grid

texts:
i need to export selected product to xml form admin product grid.

i have refer this to export selected product to csv.

Can anyone help for this.


texts: ResourceModel->delete() not deleting row in custom table

texts:
I am writing a module which imports additional product information into a custom table with SKU as the PK.
If there is already a row in the custom table regarding the SKU, i have to delete the old row first, otherwise an Error "Unique Constraint violation found" is thrown.
However, when i call ResourceModel->delete(), nothing seems to happen on my custom table.
I can see in the Model object regarding that SKU, that the isDeleted flag is now true and storedData is now length 0.
Then i tried ResourceModel->save(), got a new empty Model object from the Factory, add the new Data for the SKU to it and save() using ResourceModel or transaction->save(). This only prevented the error,but the row in the custom table stayed the same.
How do I delete from my custom table in the right way?
This is the current code with a workaround, which is not using the ResourceModel to delete:
$stockImportModel = $this->stockImportFactory->create();
                                                $this->stockImportResourceModel->load($stockImportModel, $sku);
                                                if(!$stockImportModel->isEmpty()) {
//                                                    Delete with Model/ResourceModel not working. Delete condition in ObjectRelationProcessor empty.
//                                                    $this->stockImportResourceModel->delete($stockImportModel);
                                                    $connection  = $this->resourceConnection->getConnection();
                                                    $tableName = $connection->getTableName(self::SAP_INVENTORY_TABLE);
                                                    $whereConditions = [
                                                        $connection->quoteInto('SKU = ?', $sku),
                                                    ];
                                                    $connection->delete($tableName, $whereConditions);
                                                }
                                                $stockImportModel = $this->stockImportFactory->create();
                                                $stockImportModel->addData([

ResourceModel:
 protected function _construct() {
        $this->_init('Vendor\Module\Model\ResourceModel\ResourceModelName');
    }

Model:
    protected function _construct() {
        $this->_init('catalog_product_advanced_information', 'sku');
        $this->_isPkAutoIncrement = false;
    }


texts: Magento 2 How to add rich snippets code on products using Schema.org tags?

texts:
I am looking to add Google snippets schema organization code on product page in Magento 2.2.I have searched on forums but didn't get any exact answer.
I have implemented in Magento1 but not idea how to do same in Magento 2.

Please help me if anyone have any idea and implemented before.

Thanks,


texts: Add Column to a grid (observer) - Column ‘store_id’ in where clause is ambiguous issue

texts:
I'm adding a column to the order grid using observer approach:

On the event -> sales_order_grid_collection_load_before I'm adding a join to the collection
On the event -> core_block_abstract_prepare_layout_before I'm adding a column to the grid

EDIT More Info:

On Event (1):

   public function salesOrderGridCollectionLoadBefore($observer)
{
    $collection = $observer->getOrderGridCollection();
    $collection->addFilterToMap('store_id', 'main_table.store_id');
    $select = $collection->getSelect();
    $select->joinLeft(array('oe' => $collection->getTable('sales/order')), 'oe.entity_id=main_table.entity_id', array('oe.customer_group_id'));

}

On Event (2):

public function appendCustomColumn(Varien_Event_Observer $observer)
{
    $block = $observer->getBlock();
    if (!isset($block)) {
        return $this;
    }

    if ($block->getType() == 'adminhtml/sales_order_grid') {
        /* @var $block Mage_Adminhtml_Block_Customer_Grid */
        $this->_addColumnToGrid($block);
    }
}

protected function _addColumnToGrid($grid)
{

    $groups = Mage::getResourceModel('customer/group_collection')
        ->addFieldToFilter('customer_group_id', array('gt' => 0))
        ->load()
        ->toOptionHash();
    $groups[0] = 'Guest';

    /* @var $block Mage_Adminhtml_Block_Customer_Grid */
    $grid->addColumnAfter('customer_group_id', array(
        'header' => Mage::helper('customer')->__('Customer Group'),
        'index' => 'customer_group_id',
        'filter_index' => 'oe.customer_group_id',
        'type' => 'options',
        'options' => $groups,
    ), 'shipping_name');
}

Everything work fine until I filter the grid with store view filter:
Column ‘store_id’ in where clause is ambiguous issue

I have printed the query:

SELECT `main_table`.*, `oe`.`customer_group_id`
FROM `sales_flat_order_grid` AS `main_table`
LEFT JOIN `sales_flat_order` AS `oe` ON oe.entity_id=main_table.entity_id
WHERE (store_id = '5') AND (oe.customer_group_id = '6')

As you case see store_id miss main_table alias.

To accomplish this I just need to set the filter_index for store Id column but through the observer
So the question is how can I do it on the fly ?
Without overriding the block class ? ( otherwise the observer approach is useless )


texts:
I'm trying to add a new container into root.
I've tried placing the code to empty.xml, default.xml, 1column.xml.
I've checked with changing another element in the same file if the file is loaded and parsed.
But whatever I do I just can't add the container.
This is the code:

<referenceContainer name="root">
    <referenceContainer name="header.container" htmlId="header"/>
    <container name="header.container.mobile" as="header_container_mobile" label="Page Mobile Header Container" htmlTag="header" htmlId="header_mobile" htmlClass="navbar navbar-fixed-top" after="header.container"/>
</referenceContainer>

So it will add the html id "header" to the "header.container" which appears as <header ...> in the page. (I have moved this container to root elsewhere).
But it doesn't add the container "header.container.mobile". (I have tried other names too)

How can I add the container?


texts: How to get wishlist customer mail address in magento

texts: How to get customer mail address who have added the product to their wish list in Magento. I don't want session customer mail id.? please help me.


texts: I am trying to find a way to display a different shipping price depending on the Order total amount ?


texts:
$fieldset->addField('media_gallery', 'note',
        [
            'label' => '',
            'title' => __('Media Gallery'),
            'name'  => 'media_gallery',
            // 'required' => true,
            'text'      => $this->getContentHtml(),
        ]
    );

i have a tab like this. how can I duplicated it in a custom module.


texts: Wierd issue with https on second website

texts:
I'm currently setting up a Magento install with two websites, one called wholesale with a store view of bsc, and one called general with a store view of bombmtl

I've configured both to use https regardless of context, and yet for some reason, while https works fine for the wholesale website, if you go to https for the general store it redirects back to non https - the site displays fine, so it's all working, but it's refusing to load on https.

I've rechecked my Web config, and everything looks right to me:

Default:
 - Add Store Code to URLs: No
 - Base URL: https://wholesalestoredomain.com
 - Base URL (Secure):  https://wholesalestoredomain.com

(The wholesale website then uses 'Use Default' for everything).

General Website:
- Base Url: https://generaldomain.com
- Base Url (secure): https://generaldomain.com

As I mentioned above, the wholesale website works fine, but if you go to https://generaldomain.com, it then redirects to http://generaldomain.com - it shows the correct (ie. Non default) website, so it's getting the right store code, but it's redirecting back to http even through the settings are 100% for it not to.

I can also confirm it's being caused by Magento - if I put a die() call in index.php right before Mage::run, then it stays on https and shows whatever message I've put in the die statement, so it's not that the server (or htaccess etc) is causing it.

I've cleared the cache and re-indexed (going so far as manually deleting all the cache files via SSH and using the shell/indexer.php to reindex), and I'm still not getting a positive result.

Hopefully someone can give me some idea of where to look next!!


texts: How can I add products in bulk in magento 2?


texts:
I am getting Fatal error:

Call to undefined method Mage_Catalog_Model_Resource_Category_Flat::loadAllAttributes() in \app\code\core\Mage\Catalog\Model\Category.php on line 301 error.

When I turn on Flat Catalog and index I get the error. The site has been upgraded from 1.3


texts: hello when i'm installing magento this error appeared what shall i do?

texts: I got this error when trying to install magento what shall I do?


texts:
Within the Magento web component wizard, when we try to install extensions, we receive the following error during the Readiness Check:

Check Cron Scripts
Cron script readiness check failed. Hide detail

Error from Updater Application Cron Script:
Cron job has not been configured yet

For additional assistance, see cron scripts help.

We've configured and setup the cron tasks according to the magento documentation, with our resulting cron file looking like this:

From the CLI, we are able to run the cron successfully with magento cron:run so, am I missing something here? Obviously, the cron jobs have been configured, and have been ran, so are there any other potential causes for the readiness check failing with this error?


texts: Magento Catalog Product Flat can not index

texts:
I got the following error, when I want to reindex my catalog_product_flat.

Product Flat Data index process unknown error:
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs in /lib/Zend/Db/Statement/Pdo.php:228

How can I change this / solve this problem?


texts: Why is there a base_row_total variable in Quote and Order models?

texts:
I'm trying to understand the purpose of base_row_total property in Quote and Order sales models.

I still haven't found an example in which it's different from row_total.

Can anyone clarify ? I think it's there for tax calculations ?


texts: Having a Cron issue when enabling extensions, can anyone help?


texts: Server redirect issue in checkout sagepay magento2

texts:
I have installed the Sagepay payment method.

Getting below error after place order button is clicked.

  5006: Unable to redirect to Vendor's web site. The Vendor failed to provide a redirection URL

I have checked the below link, but this doesn't solve the issue for me.

https://www.sagepay.co.uk/support/error-codes?keyword=5006

Can anyone help me to solve the error, please?

Thanks


texts: Unsuccessful place order stock levels decrease

texts: I have been creating an observer that fires after an order gets placed. When creating the code I accidentally added the wrong syntax for Mage::log, so when I pressed the "Place order" button, Magento tried to create the order (gif rotates "place order" button disappears)but then stops. I have noticed that If I keep pressing the place order button the stock levels for the products in the order decreases, but obviously no order is created. If I then fix my observer and refresh the order page then select place order, my order number is not sequential from the other orders. So does this mean that Magento will assign the stock to be deducted to the order first, then if the order doesn't get processed the order gets deleted so there is no way to return the stock levels to Magento as there is no longer an order. If this is the case is there any way round this process in case any issue arises that could prevent the order from being generated?


texts:
Realized that a lot of bots are coming from countries the shop does not ship to. Some are harmless crawlers (e.g. Russian, Chinese Search Engine bots) but often a lot of vulnerability search crawlers access site.

What is the BEST way to block majority of countries?
Is there a suggested list of such countries ?
Are there future BAD implications due to blocking a bunch of countries?


texts: Notice: Array to string conversion when calling soapV2 with complexfilter

texts:
I want to get the orderList by using soap, the code like the following

<?php

    $cs = getSesstion();

    $fromDate = date('Y-m-d'. ' 00:00:00', strtotime('-1 days'));
    $todayDate = date('Y-m-d'. ' 00:00:00');
    $params = array('complex_filter'=>
        array('key'=>'created_at','value'=>array('key' =>'gteq','value' => $fromDate)),
        array('key'=>'created_at','value'=>array('key' =>'lteq','value' => $todayDate)),
    );

    $result = $cs['client']->__call('salesOrderList',$params);

    //var_dump($result);

    function getSesstion() {

        //$client = new SoapClient('http://example.com/index.php/api/v2_soap/?wsdl');
        $client = new SoapClient('http://example.com/index.php/api/v2_soap/?wsdl');

        $username = 'test';
        $apikey= 'Abcd1234';

        $session = $client->login($username, $apikey);
        $cs = array();
        $cs['client'] = $client;
        $cs['session'] = $session;
        return $cs;

    }
?>

The error message is

Notice: Array to string conversion in D:\xampp\htdocs\test\soap\call_getorder.php on line 13

Fatal error: Uncaught SoapFault exception: [5] Session expired. Try to relogin. in D:\xampp\htdocs\test\soap\call_getorder.php:13 Stack trace: #0 D:\xampp\htdocs\test\soap\call_getorder.php(13): SoapClient->__call('salesOrderList', Array) #1 {main} thrown in D:\xampp\htdocs\test\soap\call_getorder.php on line 13

Anyone know what is the problem?


texts: Uncaught Error: Mismatched anonymous define() module in magento 2 .?

texts:
I have use mCustomScrollbar jquery plugin but there some error have come & error like:

  Uncaught Error: Mismatched anonymous define() module..

Help appreciated.

Thanks.

My mCustomScrollbar jquery plugin code:

define([
    'jquery',
    'mCustomScrollbar',
    'jquery/ui'
], function ($, mCustomScrollbar) {
    'use strict';

    /*mcustomScrollbar plugin code here...*/

});


texts: currency symbol not showing in pdf invoice

texts: the first digit is cancelled and the currency symbol isn't showing. how can i resolve this issues


texts: While I was working with magento I got stuck on a strange problem, Magento freezes everytime I try to add more then one attribute value at once. To use the layered navigation in magento for filtering the 350 types of brands I was creating dropdown attribute options. After 240 options magento wouldn’t save any new values and freezes on Please Wait…


texts: Trying to update stock on Magento OMS using API

texts:
I am trying to test out updating stock on the Magento OMS API by using the magento.inventory.source_stock_management.update method. The first step of getting the authentication token from the https://auth-stg.bcn.magento.com/oauth/token URL is working fine.

After that, I am doing a POST request on the service bus http://api-stg.mcom.magento.com (with the previously acquired token in the Authorization header). I am using the POST body format as given in the Inventory Snapshot example on https://omsdocs.magento.com/en/integration/introduction/

However, I am consistently getting the "404, URL not found" method. I tested the URL http://api-stg.mcom.magento.com and it is functional. Can anyone assist? Please note that I am trying with both a C# client as well as CURL.


texts:
I have some questions regarding the sales banners on sample data Magento sites. For example the below banner

In the blocks editor, the html code for this block looks like this:

Women’s Deals
Pristine prices on pants, tanks and bras
Shop Women’s Deals

Where do i find and use these kinds of banners? Are they included by default in every Magento installation or are they something implemented at the theme level with the sample data?


texts: phtml template is not loading from controller

texts:
I am new to magento and learning Magento Extension Development. I am trying to load phtml template from controller but it is not loading.

Here is my code:
app/code/local/MasteringMagento/Example/etc/config.xml

<?xml version="1.0"?>
<config>
  <module>
    <MasteringMagento_Example>
      <version>1.0</version>
    </MasteringMagento_Example>
  </module>

  <global>
    <models>
      <example>
        <class>MasteringMagento_Example_Model</class>
      </example>
    </models>
    <blocks>
      <example>
        <class>MasteringMagento_Example_Block</class>
      </example>
    </blocks>
    <helpers>
      <example>
        <class>MasteringMagento_Example_Helper</class>
      </example>
    </helpers>
  </global>

  <frontend>
    <routers>
      <example>
        <use>standard</use>
        <args>
          <frontName>example</frontName>
          <module>MasteringMagento_Example</module>
        </args>
      </example>
    </routers>

    <layout>
      <updates>
        <example>
          <file>example.xml</file>
        </example>
      </updates>
    </layout>

  </frontend>

app/code/local/MasteringMagento/Example/controllers/HelloController.php

<?php

  class MasteringMagento_Example_HelloController
      extends Mage_Core_Controller_Front_Action{

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

  }

?>

app/design/frontend/base/default/layout/example.xml

<?xml version="1.0"?>
<layout version="1.0">
  <example_hello_world>
    <update handle="page_two_columns_right">
  </example_hello_world>

  <refrence name="content">
    <block type="core/template" name="example" template="example/welcome.phtml" />
  </refrence>

</layout>

app/design/frontend/base/default/template/example/welcome.phtml

Hello World

Please point out that where I made mistake. Thank you


texts: Magento 2 Layered Navigation on Advanced Search Result Page

texts:
I am able to enable 'Layered Navigation' on Catalog Search Result-Page "http://127.0.0.1/catalogsearch/result/index/" (see image below) by just enabling the storefront properties 'Use in Search Results Layered Navigation' of my two attributes.

How can I enable same 'Layered Navigation' also on Catalog Search ADVANCED Result-Page "http://127.0.0.1/catalogsearch/advanced/result/" ?

ps: I have tried the solution from "Magento 2 Layered Navigation in Advance Search Result"  but it gives me an error:

My Catalog Search ADVANCED Result-Page looks now (after trying above solution) like this:

As you can see the layered navigation price-filter shows all items from inventory, instead of just the 4 items that were found as result (see arrows).

When I click on a price-filter option like '€0.00 - €999.99 (5)', Magento displays an error:


texts: Magento 2.4.2 How to customise product custom option drop-down value?

texts:
I have added a product option with a percentage discount. check the below screenshot.

And it is showing perfectly on the front end. check the below screenshot.

By default, Magento applies custom option price to base price. but I want to apply the custom option price to the final price, not to the base price.
For Ex: I have 2 custom option Option X and option Y, option X has 2 value 345 and 410(product default base price is 345) And Option Y has 2 value 0.00(percent) and 15.00(percent)
Now when I select the value of option X = 410 then product price is 410 and then select option Y value = 15.00(percent) then it will apply the 15% to base price(345) not the final price 410, so I want to apply the custom option price to the final price(410) not the base price(345).
So can anyone help me out this how can I achieve this thing? Any help would be appreciated!
==========================================================================
EDIT :
@Marius
It is doesn't matter what is the order of select the custom options. actually, I want to calculate the percentage of the final price of the product after selected the custom option.
For Ex:
I have 2 custom options:

Option A[Fixed amount] (which have 2 values)

345
410

Option B[Percent amount] (which have 2 values)

0%
15%

Now in the case when select option A = 345 and option B = 15% then product price will display (345 X 15/100 = 51.75)+(345) = 396.75
And in the case when select option A= 410 and option B = 15% then product price should be display (410 X 15/100 = 61.5)+(410) = 471.5 but it is displaying (345 X 15/100 = 51.75)+(410) = 461.7
Because by default Magento calculates the custom option percentage to the base price(345) of the product not the final price(410) of the product.
So basically how many options you have selected and what is the order of selected custom option it doesn't matter. But I just want when I select the percentage custom option then I want to calculate the final price (which is displaying after selecting options) of percentage.


texts: In Customer Account Dashboard Page i have added link

texts:
I have Created a link in account dashboard it is visible as shown in screen

shot below

when I click on the link it is showing just like these in the screenshot below

http://www.awesomescreenshot.com/image/2552811/5e81668539016e4f9622033455c999d0

But I need on clicking my custom link I need show the content as shown in the

screen shot below

http://www.awesomescreenshot.com/image/2552815/afa2f32d0f2be63d2596e75ae53626c1

Layout Xml File

  app/code/Custom/Customerdashboard/view/frontend/layout/customerdashboard_index_index.xml

code:

<page layout="2columns-left" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="content">
            <block class="Custom\Customerdashboard\Block\Index\Index" name="customerdashboard_index_index" template="customerdashboard_index_index.phtml"/>
        </referenceContainer>
    </body>
</page>

Please can Anyone help Me

Thanks In advance.


texts:
Hi today i have noticed my website crashes always . so i have seen many kind of errors in website (An error has happened during application run. See exception log for details. Could not write error message to log. Please use developer mode to see the message.). To solve this error i am taking my EC2 instance in aws and then reboot the instance after i run the following code php bin/magento cache:clean after running this code then the website working perfectly . But the problem is every 10 or 20 minutes the website is crashing . I have to run this command again and again . So now i am really worry about this situation .

Please see the list of errors i am facing in my logs

**1) Exception log-->** 2020-05-22 08:53:58] main.CRITICAL: The element 'product.info.options' already has a child with alias 'date' {"exception":"[object] (Magento\\Framework\\Exception\\LocalizedException(code: 0): The element 'product.info.options' already has a child with alias 'date' at /var/www/html/vendor/magento/framework/Data/Structure.php:611)"} []

2) **system.log-->** [2020-05-22 09:37:08] main.INFO: Cron Job sales_send_order_creditmemo_emails is successfully finished. Statistics: {"sum":0.00060582160949707,"count":1,"realmem":0,"emalloc":1208,"realmem_start":148897792,"emalloc_start":146366248} [] []

3) **magento.cron.log-->** Stack trace:
#0 [internal function]: Magento\Framework\App\ErrorHandler->handler(2, 'fwrite(): SSL o...', '/var/www/html/v...', 324, Array)
#1 /var/www/html/vendor/magento/zendframework1/library/Zend/Mail/Protocol/Abstract.php(324): fwrite(Resource id #2942, 'QUIT\r\n')
#2 /var/www/html/vendor/magento/zendframework1/library/Zend/Mail/Protocol/Smtp.php(385): Zend_Mail_Protocol_Abstract->_send('QUIT')
#3 /var/www/html/vendor/magento/zendframework1/library/Zend/Mail/Transport/Smtp.php(144): Zend_Mail_Protocol_Smtp->quit()
#4 [internal function]: Zend_Mail_Transport_Smtp->__destruct()
#5 {main}
  thrown in /var/www/html/vendor/magento/framework/App/ErrorHandler.php on line

4)**update.log-->** [2020-05-22 09:48:01] update-cron.ERROR: Cron readiness check failure! Found non-writable paths:    /var/www/html/.github   /var/www/html/.htaccess.sample  /var/www/html/.php_cs.dist  /var/www/html/.travis.yml   /var/www/html/.user.ini [] []

5) **update.cronlog-->** update-cron: Please check var/log/update.log for execution summary.

6) **setup.cron.log-->**setup-cron: Please check var/log/update.log for execution summary.

Please help.


texts: Magento load inside loop behavior / voodoo

texts:
After reading Marius' answer on this post:

Product loop giving incorrect images

I am concerned about how exactly Magento's load() function works on product / other models. Marius mentions:

  If you use the same variable $obj for loading products you get issues
  like yours, because the objects are passed as reference.

However, the behavior I experienced when using ->load(); outside a loop was not exactly as mentioned there. I was trying to get the product final pricing within a loop.

$product = Mage::getModel('catalog/product');
foreach ($product_id_array as $product_id){
    $product = $product->load($product_id);
    echo $product->getName() . " - " . $product->getFinalPrice . "<br/>";
}

When declaring the model outside the loop, name would display correctly, but final pricing would not. If I put it inside the loop, it would function as intended.

What is the reasoning behind this? I understand that it can be a performance kill using load within a loop, but:

How else are you meant to retrieve product final pricing? (Special pricing / special to-&from- dates taken into account), and
Howcome only some variables malfunction like that? (I.E ->getFinalPrice(); and not ->getName();)


texts: Magento 2.3 example of where proxy is used but not explicitly requested in constructors

texts:
I'm trying to find an example in M2 repo where a proxy is used but not explicitly requested in a constructor.  Can anyone point me in the right direction?

This is in response to phpcs Magento2 ruleset error

Proxies and interceptors MUST never be explicitly requested in constructors.


texts: fatal error: Call to a member function getCode() on boolean

texts:
It's not duplicated one I think.

Because what I found similar is a little different from the path.

Fatal error: Call to a member function getCode() on boolean in /MagentoProject/app/code/core/Mage/Customer/Model/Session.php on line 71

The code that error message says is that line :

$namespace .= '_' . (Mage::app()->getStore()->getWebsite()->getCode());

How could I solve this? I didn't do anything...

I set the environment

brew install redis
brew install homebrew/php/php56
homebrew/php/php56-mcrypt homebrew/php/php56-opcache
    homebrew/php/php56-redis
Set virtual host 'ln -s
    ../sites-available/linkshops2 .'

Is there any specialist at magento who can help me and give me a solution?

UPDATE
the point of error is below function __construct()

public function __construct()
{
    $namespace = 'customer';
    if ($this->getCustomerConfigShare()->isWebsiteScope()) {
        $namespace .= '_' . (Mage::app()->getStore()->getWebsite()->getCode());
    }

    $this->init($namespace);
    Mage::dispatchEvent('customer_session_init', array('customer_session'=>$this));
}


texts: filter_condition_callback having issues if value is backslash "\"

texts:
My filter_condition_callback is working fine in sales_order_grid

protected function _phoneColumnFilter($collection, $column)
{
    if (!$value = $column->getFilter()->getValue()) {
        return $this;
    }

    $orderCollection = Mage::getResourceModel($this->_getCollectionClass());
    $resource = Mage::getSingleton('core/resource');

    $orderCollection->getSelect()->join(
            array('address' => $resource->getTableName('sales/order_address')),
            'main_table.entity_id=address.parent_id AND address.address_type = "billing"',
            array('telephone' => 'GROUP_CONCAT(address.telephone)')
        )->group('main_table.entity_id')->having('telephone = "'. $value .'"');

    $filteredOrderIds = array();
    foreach($orderCollection as $order){
        $filteredOrderIds[$order->getId()] = $order->getId();
    }

    $collection->addFieldToFilter('entity_id',array('in' => $filteredOrderIds));

    return $this;
}

This yeilds this sql string:

  SELECT main_table.*, GROUP_CONCAT(address.telephone) AS telephone
  FROM sales_flat_order_grid AS main_table  INNER JOIN
  sales_flat_order_address AS address ON
  main_table.entity_id=address.parent_id AND address.address_type =
  "billing" GROUP BY main_table.entity_id HAVING (telephone =
  "123456")

The problem occurs when user tries to search by \ (backslash).

The query string:

  SELECT main_table.*, GROUP_CONCAT(address.telephone) AS telephone
  FROM sales_flat_order_grid AS main_table  INNER JOIN
  sales_flat_order_address AS address ON
  main_table.entity_id=address.parent_id AND address.address_type =
  "billing" GROUP BY main_table.entity_id HAVING (telephone = "\")

Above throws this error:

  Syntax error or access violation: 1064 You have an error in your SQL
  syntax; check the manual that corresponds to your MySQL server version
  for the right syntax to use near '"\")' at line 2

How do I prevent this?


texts: Magento 1.8 and varnish cache 4.0.5 get 404 product page issue randomly

texts:
I have used varnish cache for awhile on my Magento 1.8. It worked well for a long time until now I'm having an issue that some product URL got 404 error. It's randomly, not specify any product. And the product worked again after I flushed the varnish cache.
Note that I haven't changed the VCL since the day the site started and The extension Nexcessnet_Turpentine was updated to 0.7.3. I updated all the magento security patch.
What should I do to debug/solve this issue?


texts: How to automatically add a fixed tax in cart

texts:
I have been struggling to find a solution two days now... and it seems just impossible. All I want to do is to let the customer know about the shipping tax which is a fixed tax I've set ( flat rate, 19.84 RON ).

The thing is now.. every customer needs to go all the way to step 5 in the checkout page in order to see "wait, there's a shipping tax of 20RON ) which may or may not be unexpected for some.

I've been searching and looking on google for examples, but didn't manage to find anything for this case. I'm a starter with magento so I can't really "code" anything for it ..

I've made a cart rule for subtotal = 0 and subtotal >= 200 RON ( shipping tax = 0 ). So... I've thought there's a way to add the fixed rate right when the first product is added.

I'm not sure I explained it correctly but hopefully you understand what I want..


texts: Targeting multiple layout handles in layout XML

texts:
I have a custom controller accessed at the path /custommodule/customer/info which is loading the 2columns-left.phtml template on the root node as follows:

<custommodule_customer_info>
    <reference name="root">
        <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
    </reference>
</custommodule_customer_info>

What I would like to do is update the root template for customers who are not logged in, something such as:

<customer_logged_out>
    <custommodule_customer_info>
        <reference name="root">
            <action method="setTemplate"><template>page/1column.phtml</template></action>
        </reference>
    </custommodule_customer_info>
</customer_logged_out>

I understand that I can't target multiple layout handles in this fashion, but the intent should be clear; update the root template for this layout handle while customers are not logged in.

I had thought that I could target my controller's handle with the following:

<customer_logged_out>
    <reference name="custommodule_customer_info">
        <reference name="root">
            <action method="setTemplate"><template>page/1column.phtml</template></action>
        </reference>
    </reference>
</customer_logged_out>

This indeed does update the root template with the 1column.phtml template, but it is doing so on what appears to be all pages instead of just the page targeted in my reference node.

I have tried several permutations of this layout update, but none seem to work. How can I target this one layout handle while at the same time using the customer_logged_out layout handle?

-- edit --
To be clear, this is actually a third-party module.


texts: Product EAV index exception: SQLSTATE[HY000]: General error: 1478 InnoDB: Tablespace `innodb_system` cannot contain TEMPORARY tables.,

texts:
When we are rebuilding the index we are getting the following error.
Product EAV index exception: SQLSTATE[HY000]: General error: 1478 InnoDB: Tablespace innodb_system cannot contain TEMPORARY tables., query was: CREATE TEMPORARY TABLE IF NOT EXISTS catalog_product_index_eav_temp LIKE catalog_product_index_eav_tmp


texts: How To Change HTML Structure of Shipping Form(cart page) in Magento 2?

texts:
I have to change HTML of shipping form in Cart page. When I turned on template path hint, i got that the file is coming from Shipping.phtml file in the theme directory. But when I tried to open and edit the file, I found that the form field is not there. The form was rendering by the <script>.

I am not understanding where the form is coming from in the front-end. Please anyone help me to find the file, in which i can change the HTML structure of the form.

Thanks


texts: How to modify the collection of options in step 2 when creating product configurations magento 2

texts:
I have overrided this template module-config product/view/admin/templates/catalog/product/edit/attribute/steps/attributes_values.phtml

now i can't understand where options com from in the file and  i want to filter the values of options for example i want just to load values related to the current product. just to know my attribute of configration is created with dynamic options so can any one explain to me this code and what's the origin of options

thanks in advance


texts:
have a magento site i click on all links and they rewrite fine. Only one issue, I have some links that look like this assume my domain name is somesite.com

http://www.somesite.com/?htm/147 and i want it to redirect to http://www.somesite.com/someplace/ of course homesite is replaced with my real domain. assume i am using https://github.com/nexcess/magento/blob/master/.htaccess.sample renamed to .htaccess

i add this to .htaccess but it has no affect

Redirect 301 /?htm/147 http://www.somesite.com/someplace/ ideas?


texts:
I am importing 60,000 customers and I would like to completely disable email validation as email addresses like name.surname@something.nhs.uk is not passing tests.

I am not really bothered about email validation I would rather leave it up to the end user to correctly enter in their email address


texts: is gene braintree (4.0.4) supports magento2.4.0?


texts: How to create custom mobile site (theme) for magento store?

texts:
I need to do a mobile site for the magento store. I am not permitted to use any extension. So I have to create a custom mobile theme .
 As I haven't much experience , I think it can be done in two ways..

1.copy the magento's default iphone theme and try to modify its layout and templates.

2.copy the current magento's theme (not for mobile) and modify its css and images.

Are these methods correct ?
Which one will be good and can be done in a minimal time ?
Is there any other methods that can I follow ?

Kindly suggest. Thank you.


texts:
quick description: I got products which are not allowed to be put online with discount.
so I need to find a different solution to offer the customers the lowest price (see example from my product vieuw bellow)

My idea: I can put an extra button on the product view which will say something as: quotation or ask for special price And link it to a new / special form. Instead of the crossed AVP price with my big red price  as shown on the picture bellow.

Does someone have an better idea? Or got some info what I can read to get the extra button done and or the extra form? (I am a newbie on this but if I got the right information I can make it)


texts: Prevent Magento to empty cart after failed payments

texts:
How can I stop Magento to empty cart after the customer fails to pay with a card?

The customer can use a different card but the cart already becomes empty and he/she needs to put all the items back into card again which makes the site loose customer.


texts: Topmenu override declaration error Magento 2.3

texts: Topmenu override declaration getting error in  Magento 2.3


texts: Setup of Magento 2.1 with fails on file permission check

texts:
I created a Magento 2.1 project successfully in a Jailkit jail.  Running the html setup Readiness Check, the file permissions fail, because Magento is trying to use the root user's path, rather than the jail path.

"/var/www/clients/client0/web10/web/magento2/app/etc" - Not writable, change the permissions. Show details
"/var/www/clients/client0/web10/web/magento2/var" - Not writable, change the permissions. Show details
"/var/www/clients/client0/web10/web/magento2/pub/media" - Not writable, change the permissions. Show details
"/var/www/clients/client0/web10/web/magento2/pub/static" - Not writable, change the permissions. Show details

(Actual path is: "/web/magento2/...")

How can I set the actual Magento base path?

The command "pwd" responds with the correct path, "/web/magento2", but Magento is clearly looking at the ROOT user's path, rather than the jail's path.

I already tried setting permissions, and since we're in a jail, none of the jail users can use the full path either.


texts: Creating Custom Category Pages design in Magento

texts: I need the "Main Categories" should have their own landing pages. For example, I am clicking on "Category 1" then it should take me to the landing page for categoriy 1 and should have its own design accordingly. Think of it as a "home page" for category 1.


texts:
I am trying to install instamojo payment gateway to my magento2 store, as per the instructions givne by instamojo page https://docs.instamojo.com/page/instamojo-integeration-for-magento-2

i tried the command using CLI (ssh) at my ubuntu host

composer update instamojo/instamojo-magento-2

  Loading composer repositories with package information

  Updating dependencies (including require-dev)

  Killed

I searched Google and found that , it happens because composer runs out of memory, but how could i increase the memory at remote server (I am running the website on live server at Godaddy)

Is there any other way of doing this ??


texts: Magento 2 Fedex Integration Issue with restricted proxy - "Shipping method unavailable"

texts: I tried integrating the shipping method in my personal laptop and it is working there without any network configuration. But when I'm using different proxy on another PC, I can't get the shipping method working. I tried almost everything to bypass the localhost requests across the restricted proxy but nothing seem to work and I'm still searching ways to make it work somehow..Here's the picture of debug.log :   Message on frontend :


texts: Magento 1.9.X: How to assign data to quote?

texts: I need to assign data to quote, how can I do this?