texts: Magento 2 : Overriding a Model file but not working

texts:
I am getting this error always

Fatal error: Uncaught Error: Cannot instantiate interface Magento\Sales\Model\Order\Email\Container\IdentityInterface in C:\wamp64\www\huf\vendor\magento\framework\ObjectManager\Factory\Dynamic\Developer.php on line 73

I am overriding a Model file which is

Magento\Sales\Model\Order\Email\Sender\OrderSender

My di.xml file

<!--

-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\Sales\Model\Order\Email\Sender\OrderSender" type="ABC\Listrak\Model\Order\Email\Sender\OrderSender" />
</config>

My OrderSender class

<?php
/**
 * Copyright © 2017-2018 Magento, Inc. All rights reserved.
 *
**/
namespace ABC\Listrak\Model\Order\Email\Sender;

class OrderSender extends \Magento\Sales\Model\Order\Email\Sender
{
    public function send(Order $order, $forceSyncMode = false)
        {
            $order->setSendEmail(true);

            if (!$this->globalConfig->getValue('sales_email/general/async_sending') || $forceSyncMode) {
                if ($this->checkAndSend($order)) {
                    $order->setEmailSent(true);
                    $this->orderResource->saveAttribute($order, ['send_email', 'email_sent']);
                    return true;
                }
            }

            $this->orderResource->saveAttribute($order, 'send_email');

            return false;
        }
}

Please if someone tell me what I am doing wrong.
Advanced thanks.


texts: Magento 1.8 emails not sending to customers after order is placed

texts: So recently my website hasn't been sending order confirmation emails to myself and my customers. I am lost with this and need some help. Has anyone else had this problem? Please help me out.


texts: MySQL Query for an export of all products?

texts:
Is there any way to find out a MySQL query that would give the same results as exporting all shop products?

The reason I need this. When trying to export, I get the error

  Message is added to queue, wait to get your file soon

But even after the cron is run it never appears.

Thanks in advance

Edit:
Running
MySQL 5.7.27 and Magento 2.3.2


texts: Magento 2 - Weird behavior during checkout

texts:
I developed a Magento2 webshop with a custom theme and some extensions. Now suddenly, the checkout page shows weird behavior.
When I go to /checkout I see the spinner indicating that the Magento is building the checkout page. But, then I only see the email field and the coupon box. All other steps and fields are there, but they are hidden by the steps js I think.
The Payment step is directly shown instead of the billing address step.

Does anyone know what's going on here?
You can find the store here: goo.gl/QLG3AS (Dutch)
Update
The problem only seems to happen when (only) a configurable product is added to the cart, for example: goo.gl/gB30Bd. But if I add a simple product, for example: goo.gl/3vrCRX (alone, or with a configurable product) the checkout seem to work just fine.


texts: Magento 2 : Add to cart product with custom option programmatically

texts:
I want to add to cart product with custom options. I added simple product, but can't able to add with custom options.

How to do it ?

Please help me.

Thanks.


texts: Add custom block layout to product page inside add to cart area, visible for all types of products

texts:
After struggling the whole week to create an simple extension for a project of mine, I thought I finished and covered everything. Turns out I was wrong. The thing that I cannot make it work properly is related to the frontend layout. I wanted to add a custom block to the layout inside the "add to cart" area. In order to do this I added the following xml code inside my extension's layout file (after searching docs and testing an entire day):

<layout>
    <catalog_product_view>
        <reference name="product.info.options.wrapper.bottom">
                <block type="catalog/product_view" name="my.foobar" before="addtocart" template="catalog/product/view/foobar.phtml"/>
                <action method="append">
                        <block>my.foobar</block>
                </action>
        </reference>
    </catalog_product_view>
</layout>

I thought this was it. That this will add my block to all products above the "add to cart" button area. As you can see I used "product.info.options.wrapper.bottom" as reference. The block appeared where I wanted to, I was happy. My mistake was that I tested on a product page of a configurable product. Today I saw that the "product.info.options.wrapper.bottom" block is not visible on all types of products, making my block to also not be displayed on all products, for instance on a simple product page (unfortunately). I tried different other blocks as a reference, but everything was in vain. I don't know why the original layout puts the "add to cart" container in different parts of the product sidebar. This causes my layout change not to work for all types of products.

Right now I don't know what to add/modify. Can anyone help me with this ?

edit: Here is an image to better reflect the area where I want my block to be positioned


texts: How to add custom js file in Magento 2 in custom theme without use module

texts:
I used custom theme in magento 2. I want to add custom js file for navigation in magento 2 but js file not work.

I add js link in default_head_block.xml but a js doesn't work.

<link src="js/menu.js"/>


texts: Why do Magento 2 extension installation instructions tell me to unzip their file to the root and then run command?

texts:
I'm not a developer, and I have learned Magento 2 (my store was installed with Magento 2.1.2 through Softaculous on Cpanel) in the past 3 weeks.  I don't mind learning.  I'm sure there are many others similar to me trying to install and run their own stores with no dedicated web infrastructure and huge budget.  So this is a question that will hopefully help my understanding as well as theirs.

I had to ask for help with installing several extensions in my store.  Some are free and some have been paid for. I followed the directions of these extensions and most tell me to:

"Unzip the file my-great-extension.zip into your Magento root folder".  I'm well aware that the root folder of the Magento 2 installation is the folder where your Magento 2 store is installed, the same folder containing the directories "app" and "pup" and "var" and "vendor".
The next step is usually a miffing "enable the extension".  Once in a while, they explain the command line code to enable the extension: bin/magento module:enable my-great-extensions-name but usually not.
Clear the cache, again not very specific to people that don't know Magento 2.

Usually, this ends up, if I followed the directions to the "T", in an error message at the command line:

"Unknown module(s): 'my great unknown module does not exist because i gave you the wrong installation instructions'"

THEN, I ask for help.  Now after the first time, I figured out that these instructions were either wrong or not applicable to my installation.  The upload was never to the root directory.  I was following instructions, but I was ACTUALLY supposed to the uploaded the unzipped files to the app -> code directory WITHOUT OVERWRITING OTHER FILES IN THERE and mimic the unzipped file structure.

So this is where the problem comes in along with my questions?

Firstly, are installation instructions different for every variation of the same Magento release store.  Meaning, are the installation methods different for every Magento 2.1.2 store?  Or IS THERE A STANDARD INSTALLATION PROCEDURE FOR MANUAL INSTALLS OF EXTENSIONS.
Are the installation instructions that I'm so often given by documentation for extensions even the CORRECT instructions?  Now not speaking about the free extensions, but it seems to me that this is a good way for extension developers to make a little extra money per installation, which I'm all for, but it should be stated like so, and not swindled. (no offense to the developers, we all love what you folks do and wish we could do it too).
Is my Magento installation incorrect?

Sorry for the slight rant, but I'd still like to find the right way to install extensions.  Some come with more then just the "code" folder in it, in those cases, am I supposed to copy over they others as well?  It's almost never that well documented.

EDIT  FOR THE DOWNVOTERS...if your an extension maker, it's probably a good idea to be clear about install instructions for your extensions. Just as the person that answered this was.


texts:
Magento 2.n.n

Started with composer to get metapackage. Following the command-line of

composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition <installation directory name>

How do you set pre-installation file system ownership and permissions on Windows?

Created a blank database. Magento_2
Setup v-host configuration for  magento-2.local
Used Google Chrome browser to install Magento 2 in the browser.
All steps completed successfully.

Everything okay at this point

Clicked on the 2 links on the success page.

http://magento-2.local

http://magento-2.local/admin

All Magento base JS, CSS and Magento images for dashboard not found.

Does anyone know what is the cause of this issue?


texts: minicart-count background does not disappear, even no items in cart

texts:
Add items into cart

Delete browser cache and cookies only [CTRL + SHIFT + DLETE]
Load the page again, it shows no count but cart-count background
does not disappear

How to debug what is the root causes of the problem?

update

as per this line in Magento_Checkout/templates/cart/minicart.phtml (take this from firebug)

<span data-bind="css: { empty: cart().summary_count == 0 }, blockLoader: isLoading" class="counter qty">

empty class added when cart count is zero, but it is never add empty class for the above scenario

If I remove item from minicart window instead of browser, it works and empty class also added.


texts: Event customer_register_success not calling?

texts:
I created an observer to update subscribers on mailchimp without using any mailchimp extension,

Below is my module which i tried.

app\etc\modules\HTD_Subscribers.xml

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

code\local\htd\Sms\subscribers\config.xml

<?xml version="1.0"?>
<config>
<modules>
    <HTD_Subscribers>
        <version>0.1.0</version>
    </HTD_Subscribers>
</modules>
<global>
    <models>
        <subscribers>
            <class>HTD_Subscribers_Model</class>
        </subscribers>
    </models>
    <events>
        <customer_register_success>
            <observers>
                <customer_register_successhtd_subscribers>
                    <class>htd_subscribers/observer</class>
                    <method>SubscribeCustomer</method>
                </customer_register_successhtd_subscribers>
            </observers>
        </customer_register_success>
    </events>
 </global>
</config>

code\local\HTD\Subscribers\Model\Observer.php

<?php
class HTD_Subscribers_Model_Observer extends Varien_Event_Observer
{
public function SubscribeCustomer($observer){

echo "here ";exit();
    //My code goes here
}
}

My observer is not called after customer successfully registered to the website.
Magento version is 1.9.
Is there any version conflicts for events?
Hope some one can find my mistake and help me on this.


texts: Way to have a different product attribute for different website languages

texts:
I want to upload product manuals to each product. Now that's done. What I want is to have a different manual for EN and different for another language...
Is there a way or module to do this?


texts: Forget Admin login/session on browser close?

texts:
Is there a setting in Magento CE that will cause it to forget a user is logged into the admin  if the browser is closed (and force them to re-enter their username & password)?

e.g. for use at a shared computer and not having to rely on the user remembering to log out.


texts: Magento2: Fatal error: Uncaught Error: Cannot instantiate interface

texts:
Got the error below:

Fatal error: Uncaught Error: Cannot instantiate interface Magento\Framework\Config\DataInterface in /var/www/html/public_html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php on line 73
( ! ) Error: Cannot instantiate interface Magento\Framework\Config\DataInterface in /var/www/html/public_html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php on line 73


texts: Custom Javascript in Checkout - Agreements Modal

texts:
We try to use a custom component in the agreement modal in the checkout like by including the following HTML (which works on CMS pages) into the agreement block:

<div class="agreements js-accordeon" data-mage-init='{"simple-accordeon": ""}'>

But the component is not initialized.

I guess this is because the modal is generated by JS components as well.

Is there a right, yet simple way to do run a custom javascript in the agreement modal at the end of the checkout?

EDIT
The widget looks like this:

define(['jquery'], function($){
    $(".js-accordeon").addClass("is-active");
    $(".js-accordeon-trigger").each(function(){
        var element = $(this);

        element.click(function(){
            element.toggleClass("is-current");
            element.nextAll(".js-accordeon-target").eq(0).toggleClass("is-current");
            console.log(element.nextAll(".js-accordeon-target")[0]);
        });
    });
});

And it is working on other CMS pages, just not in the checkout's modal popup.


texts:
I have been getting this Error via e-mail with the subject "Store Debug Information", And I can't figure out whats causing it.  I know it has something to do with Captcha!

How do you read this error? How can it be fixed?

  URL: https://MyDomainDOTcom:443/captcha/refresh/
  IP Address: 1.1.1.1
  Time: 2016-05-29 14:28:36 GMT
  Error:
  formId is mandatory
  Trace:
  #0 /home/public_html/magento/app/code/core/Mage/Core/Model    /Config.php(1354): Mage_Captcha_Model_Zend->__construct(Array)
  #1 /home/public_html/magento/app/Mage.php(463):     Mage_Core_Model_Config->getModelInstance('captcha/zend', Array)
  #2 /home/public_html/magento/app/code/core/Mage/Captcha/Helper/Data.php(72): Mage::getModel('captcha/zend', Array)
  #3 /home/public_html/magento/app/code/core/Mage/Captcha/controllers/RefreshController.php(45): Mage_Captcha_Helper_Data->getCaptcha(NULL)
  #4 /home/public_html/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Captcha_RefreshController->indexAction()
  #5 /home/public_html/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')
  #6 /home/public_html/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
  #7 /home/public_html/magento/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
  #8 /home/public_html/magento/app/Mage.php(684): Mage_Core_Model_App->run(Array)
  #9 /home/public_html/magento/index.php(91): Mage::run('', 'store')
  #10 {main}


texts: how to use preg_replace & how to enable code if in certain category

texts:
I am looking to add hreflang tags to a product page if it belongs to a certain category id, also I need to edit the output of the string using preg_replace to clean the url for the code.  here is what I have attained so far

<?php
foreach (Mage::app()->getWebsites() as $website) {
foreach ($website->getGroups() as $group) {
    $stores = $group->getStores();
    foreach ($stores as $store) {
        echo '<link rel="alternate" href="' . $store->getCurrentUrl() . '" hreflang="' . $store->getConfig('general/locale/code') . '"/>' . "\n";
    }
}
}

which gives an output of the proper url followed by a ? and extra characters, I need to get rid of those extra characters (.html?5498430jrgfdg30 need to get rid of the ? and everything after it.)  Anyone know how to do this? thanks for all of your help!


texts: Magento2 : How to override any product custom option price sorting in list page

texts:
I have one simple product it's price zero(0). it has a custom option with name and price like:

-------------------------
   Name           Price
-------------------------
 product A         10

 product B         00

 product C         30

 product D         20

by default price sort is working like 0,10,20,30. But i want to sort start from 10,20,30 while any custom product has 0 price.

Please check image.

thanks


texts:
I am trying to add a css class on body tag but not able to find any file, from where the body tag is rendered.

I need to add one css class on body tag such as others are coming  >
page-with-filter page-products page-layout-2columns-left myclasshere

in previous version below was the xml code to add class on body.

<reference name="root">
    <action method="addBodyClass">
        <classname>my-profile</classname>
    </action>
</reference>

I tried using this but it didn't worked.

I need to add one class with page-layout-2columns-left template only.


texts: How to Add Customer Group Name in Transactional Email (new order) on Magento 1

texts:
I try to add customer group name in new order transactional email but I can't find anything about this.

I found this link : http://www.justwebdevelopment.com/blog/transactional-emails-variable-magento/ but here it's not anything related to customer group name.

Does anyone know how can I do this?


texts: Which DBMS versions Magento 2.1.18 supports?

texts:
I am unable to find on Magento website or elsewhere, up to which versions of MariaDB and MySQL Magento 2.1.18 supports. I know it's old, but that's another topic.
I've found MySQL 5.6.x, I wonder if 5.7 is also fine?
https://github.com/magento/magento2/tree/2.1.18


texts: Fatal error: Call to a member function getId() on a non-object in Observer

texts:
I tried to change the attribute value once we click on Delete button present in cart page :

config.xml  :

<sales_quote_remove_item>
    <observers>
        <example_delete_from_cart>
            <class>Amasty_Example_Model_Observer</class>
            <method>DeleteFromCart</method>
        </example_delete_from_cart>
    </observers>
</sales_quote_remove_item>

app/code/local/Amasty/Example/Model - Observer.php

public function DeleteFromCart($observer)
{
    $product = $observer->getEvent()->getProduct();
    Mage::getSingleton('catalog/product_action')->updateAttributes(
        array($product->getId()),
        array('cart_status' => 0),
        $storeId = 0
    );
}

Result

  Fatal error: Call to a member function getId() on a non-object in line:@array($product->getId()),


texts: Set up theme after Magento 2 composer install

texts:
Sorry, but all the doc I found are referring to classic Magento 2 install.

The composer installation gives a different Magento file system, so theme tutorials looks useless.

I have tried a lot of hacks, including renaming default Luma theme, having changed of course theme.xml and registration.php settings, but at now it is impossible to have the new theme listed in admin panel.


texts: how show Out of stock product not show on list page in magento2


texts: Magento 2 Adding Total Due and Total Paid to PDF order

texts:
Hi I am trying to add total paid and total due lines on my Magento PDF Invoice. I have added these lines in the config file in sales/etc/config.xml.

I tried in order pdf i am not getting those fields
can some one pls share knowledge about how it will work


texts:
I've edited the Topmenu.php file so that it adds foundation classes to the drop down menus.  Works just fine, but it will probably get overwritten on an update. How do I enable it as a module?

How do I use local.xml to tell magento to use the new menu instead of the default one?


texts: How to add custom block to existing tab of product at admin side

texts:
I want to add custom messages to my custom created attributes on the product page by using Block and Phtml.
My problem can be illustrated as following:


texts: Is there a way to choose the lower priced shipping method of two carriers under a generic name?

texts:
So I will try to explain this as good as possible. We will ship with FedEx and UPS, and some items also with USPS. As we all know FedEx has the Express Saver which is comparable to UPS 3 Day Select. FedEx Ground is comparable to UPS Ground and so forth. What I would like to do is the following:

Display for shipping option something like this:

Ground $x.xx
3 Day  $x.xx
2 Day  $x.xx
1 Day  $x.xx

Not stating if it is UPS or FedEx, but simply use the lower priced service. So if FedEx Ground is cheaper than UPS ground then just show the FedEx Ground price as "Ground". If UPS 3 day is cheaper than fedex express saver then just show UPS 3 Day price as "3 Day $x.xx", etc. etc.

Do you know of such an extension?

Another question would be the display of the different shipping methods. For example UPS shows the word UPS in front of all of their methods in Magento, like: UPS Ground, UPS 3 Day Select, UPS 2nd Day Air, ....

However FedEx and USPS for example only show: Ground, Express Saver, Priority Mail, etc. etc.

Question: is there a way to show the all FedEx and USPS shipping option names with either FedEx or USPS in front of it?

Again, if anyone has any idea please let me know.


texts:
I have a Magento environment that runs on Magento 1.9.2.4 and I'm trying to submit a review. The review however doesn't show up in the list of pending (or all) reviews. I'm using the base so it should work fine.

What could be the problem?


texts: Notifications once product quantity reaches 0

texts:
I'm trying to send a notification when the product becomes out of stock.
This is the code I have on my Observer:

public function detectProductChanges($observer)
{
    $product = $observer->getEvent()->getProduct();

    if ($product->hasDataChanges()) {

        try {
            $oldStock = $product->getStockItem()->getOrigData('qty');
            $newStock = $product->getStockItem()->getData('qty');

            if ($newStock != '0' || $oldStock == $newStock) {
                return $this;
            }

            // send email...

        } catch (Exception $e) {
            Mage::log($e->getTraceAsString(), null, 'my_cute.log');
        }
    }

    return $this;
}

On the config.xml file I got the following:

<!-- ... -->
  <global>
    <events>
      <catalog_product_save_after>
        <observers>
          <reports_detect_product_changes>
            <type>singleton</type>
            <class>reports/observer</class>
            <method>detectProductChanges</method>
          </reports_detect_product_changes>
        </observers>
      </catalog_product_save_after>
    </events>
  </global>
<!-- ... -->

The thing is, if I edit a product on the admin side, everything's fine, but if I proceed to checkout a product, this event is not called, can you help please?


texts: Magento 2 multi store and multi domain - Notice: Undefined index: store;

texts:
I am trying to set up my local mac to have 2 stores in 1 magento instance

The main domain (www.mydomain.dev) is working as expected however the french domain (www.mydomain-fr.dev) is not loading and giving me

1 exception(s):
Exception #0 (Exception): Notice: Undefined index: store; in /Users/myuser/Sites/mydomain/vendor/magento/module-store/Model/StoreResolver/ReaderList.php on line 50

Please could anyone advise? My vhost.conf looks like the following if it helps

  <VirtualHost *:443>
            ServerName mydomain.dev
            ServerAlias *.mydomain.dev
            Include "/Users/myuser/Sites/ssl/ssl-shared-cert.inc"
            CustomLog "/Users/myuser/Sites/logs/dev-access_log" combinedmassvhost
            ErrorLog "/Users/myuser/Sites/logs/dev-error_log"

            VirtualDocumentRoot /Users/myuser/Sites/mydomain
        </VirtualHost>

     <VirtualHost *:443>
            ServerName mydomain-fr.dev
            ServerAlias *.mydomain-fr.dev
            Include "/Users/myuser/Sites/ssl/ssl-shared-cert.inc"
            SetEnv MAGE_RUN_CODE frenchstore_view;
            SetEnv MAGE_RUN_TYPE store;
            CustomLog "/Users/myuser/Sites/logs/dev-access_log" combinedmassvhost
            ErrorLog "/Users/myuser/Sites/logs/dev-error_log"

            VirtualDocumentRoot /Users/myuser/Sites/mydomain
        </VirtualHost>

EDIT

If I update the index.php in root from:

$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER);

To

$params = $_SERVER;
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = 'default';
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = 'store';
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $params);

Then the french domain works. Am I meant to be editing the index.php?

The store hierarchy is the following

Main website     UK Store        UK Store View
Main website     French Store    French Store View


texts:
I have this working SQL query :

select prd_brand.* from prd_brand
inner join
(
    select distinct value from catalog_product_entity_int
    where
    rowid in (select rowid from catalog_product_entity_int where attribute_id = 97 and value = 1)
)t
on prd_brand.brand_id = t.value

How can I nest this select query in the join in Magento 2 ?

I did it like this :

$subquery = new \Zend_Db_Expr('SELECT DISTINCT value from catalog_product_entity_int where  rowid in (select rowid from catalog_product_entity_int where attribute_id = 97 and value = 1)');
    $brandCollection->join(array(
                        'cpei' => 'catalog_product_entity_int'),
                        'cpei.value = main_table.brand_id',
                    array('subquery' => $subquery));

But it gives this query :

    SELECT `main_table`.*,
SELECT DISTINCT value from catalog_product_entity_int
where rowid in
(select rowid from catalog_product_entity_int where attribute_id = 97 and value = 1) AS `subquery`
FROM `prd_brand` AS `main_table`
INNER JOIN `catalog_product_entity_int` AS `cpei` ON cpei.value = main_table.brand_id


texts:
How can I dynamically change the url of a product?

Now I got this url

www.domain.com/product-name.html

I need to add SKU, to my url like this:

www.domain.com/product-name-SKU.html


texts: Magento 2: create listing grid using ui component without database

texts: How to create a listing grid using UI component in the backend without a database ?


texts:
I have installed fresh magento 2.1.6. When I click Go to checkout I get the popup to register. I am not able to proceed as guest.

My configuration is set Yes for allow guest Checkout.

Stores > Configuration > Sales > Checkout > Checkout Options

Why can I proceed as a guest and place an order ?


texts: In Compilation what task performed by magento

texts:
I bought many extension from somewhere.In whole document they mentioned compilation process.
Basically I want to know that magento compilation , what the mean of that and what task being done by magento during compilation process..


texts:
I am in a position where I have no ssh access and no admin access. A cron is set up to be fired every 5 minutes, but sometimes it gets executed twice at almost the same time.

Cron name is ddg_automation_abandonedcarts

And below you'll see that cron is set up to be executed every 5 mins.

I know it sucks, but I won't get access. Any ideas what could potentially be causing this issue? Maybe this happened to you before? Any advice appreciated!


texts: Get 3 or more level categories in magento2

texts:
i'm getting the sub category for the below code,but still i want more categories which mean it  has sub categories of more levels how can i get this.

 foreach($categories as $category) {

            $cat = $this->getCategoryModel()->load($category->getId());
            $array[$category->getLevel()][$cat->getId()]= array('id' => $cat->getId(), 'level' => $cat->getLevel(), 'name' => $cat->getName(), 'url' => $cat->getUrl(), 'display_mode' => $cat->getDisplayMode(), 'image' => $cat->getImageUrl('wizard_icon'), 'description' => $cat->getWizardQuestion(), 'categories' => [] ); //In this line we get an a link for the product and product count of that category
            if($category->hasChildren()) {  //if category has children or not. If yes then it proceed in inside loop.
                 $children = $category->getChildrenCategories(); // $children get a list of all subcategories
                $array[$category->getLevel()][$cat->getId()]['categories']=  $this->get_categories($children); //recursive call the get_categories function again.
                }

        }
    return  $array;


texts: Error when using command setup:di:compile .Sm/CartQuickPro

texts:
Repositories code generation... 1/7 [====>-----------------------]  14% < 1 sec 70.0 MiB
Fatal error: Interface 'Magento\Framework\App\Action\HttpPostActionInterface' not found in /var/www/html/app/code/Sm/CartQuickPro/Controller/Product/Compare/Remove.php on line 19

and use Magento\Framework\App\Action\HttpPostActionInterface as HttpPostActionInterface;
 is used 3 times in module . I have magento2.2.4 and I am using https://i.imgur.com/cHLvKD2.png marked one but it countains

use Magento\Framework\App\Action\HttpPostActionInterface as HttpPostActionInterface;

I think it's exactly the same as it is in 2.3.4 folder.
what can I do ?


texts: Duplicated cron jobs at same `scheduled_at` from different `created_at` times

texts:
What makes a cron job to be scheduled multiple times on the same scheduled_at time but by at different created_at times? See below. I'm having problems with repeated jobs never finishing.

Cron settings are as follow:


texts: Magento 2 filter products by price from Rest API

texts:
Magento-2 we would like to filter the products from REST API

I have filtered product by price in the frontend please check the result in the below  screenshot

(24-MB02 price and special price we set at admin end)

Screenshot:-

But API Level:-

the same product 24-MB02 is missing

Api Url:- /rest/V1/products/

  http://10.0.0.55/ma221/rest/V1/products/?searchCriteria[filterGroups][0][filters][0][field]=category_id&searchCriteria[filterGroups][0][filters][0][value]=4&searchCriteriafilterGroups[filters][0][field]=price&searchCriteriafilterGroups[filters][0][value]=40&searchCriteriafilterGroups[filters][0][condition_type]=gteq&searchCriteriafilterGroups[filters][0][field]=price&searchCriteriafilterGroups[filters][0][value]=50&searchCriteriafilterGroups[filters][0][condition_type]=lteq

But result we are getting 4 products

output:-

Please help on this. Thanks. How to achieve this?

/vendor/magento/module-catalog/Model/ProductRepository.php

public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria)
    {
        /** @var \Magento\Catalog\Model\ResourceModel\Product\Collection $collection */
        $collection = $this->collectionFactory->create();
        $this->extensionAttributesJoinProcessor->process($collection);

        $collection->addAttributeToSelect('*');
        $collection->joinAttribute('status', 'catalog_product/status', 'entity_id', null, 'inner');
        $collection->joinAttribute('visibility', 'catalog_product/visibility', 'entity_id', null, 'inner');

        $this->collectionProcessor->process($searchCriteria, $collection);

        $collection->load();

        $collection->addCategoryIds();
        $searchResult = $this->searchResultsFactory->create();
        $searchResult->setSearchCriteria($searchCriteria);
        $searchResult->setItems($collection->getItems());
        $searchResult->setTotalCount($collection->getSize());

        foreach ($collection->getItems() as $product) {
            $this->cacheProduct(
                $this->getCacheKey(
                    [
                        false,
                        $product->hasData(\Magento\Catalog\Model\Product::STORE_ID) ? $product->getStoreId() : null
                    ]
                ),
                $product
            );
        }

        return $searchResult;
    }


texts: Area code is already set: while set:upgrade command in RecurringData.php magento 2

texts:
Hi all, i am facing this error while setup:upgrade command  in
  RecurringData.php file magento 2.

  I tried all code mentioned in below link

  Git hub link

  Please guide me,if you have any idea related this topic

  Please check below bin\magento file

#!/usr/bin/env php
<?php

echo "\n";
if (PHP_SAPI !== 'cli') {
    echo 'bin/magento must be run as a CLI application';
    exit(1);
}

try {
    require __DIR__ . '/../app/bootstrap.php';
} catch (\Exception $e) {
    echo 'Autoload error: ' . $e->getMessage();
    exit(1);
}
try {
    $handler = new \Magento\Framework\App\ErrorHandler();
    set_error_handler([$handler, 'handler']);
    $application = new Magento\Framework\Console\Cli('Magento CLI');
    $application->run();
} catch (\Exception $e) {
    while ($e) {
        echo $e->getMessage();
        echo $e->getTraceAsString();
        echo "\n\n";
        $e = $e->getPrevious();
    }
    exit(Magento\Framework\Console\Cli::RETURN_FAILURE);
}


texts: Some Magento2 Customer's login takes too much time

texts:
We have magento2 community edition 2.2.6

We are having issues with customer login for some users,

Their login takes too much time, and in database it goes in sleep queries which remains their for like 5-10 15 minutes
Even if there are no past orders or anything, it takes forever to load and times out

this happens to some of the users, and we don't know what is cause of this issue,
we tried to find from logs and slow query logs, but didn't find the issue,

can any body help in look in this to resolve?


texts:
I got an issue with the site. I started getting the errors like:

  File does not exist: /mage/translate.js
  File does not exist: /mage/cookies.js
  client denied by server configuration: /lib/ccard.js

So there is no js in the path because it should be /js/mage/translate.js

Also site started redirecting to index.php and url became
http://example.com/index.php/index.php/

Everything became broken.

I cleared the var/cache folder manually on the server and site is up again.

Anyone knows what was the reason of this issue and how to reproduce it?

Magento ver. 1.14.2.1

All caches are enabled.


texts: Magento2.4 mysql to make all products a product type of simple

texts:
I imported all products into Magento2.4 using a plugin and just noticed 100 or so products have no product type which is causing them not to show on the website.
How can I run a query on the database directly to mark all products as simple products ?


texts: Magento2: Bundle product not displaying in frontend

texts: I clean cash and reindex.But Doesn't work for me.


texts: Magento Unable to load my custom layout through controller

texts:
I have created a module with controller and model. But I am now trying to load a custom view where I can stuff all my PHP,css,js code into that PHTML file.

Here is my Block of Code

app\code\local\Soumen\Testmodule\controllers\IndexController.php

IndexController file

          public function indexAction()
          {
              echo "This is default";
           }

          public function sayHelloAction()
          {
              Mage::log('im in Controller');

              $this->loadLayout();
              $this->renderLayout();
             Zend_Debug::dump($this->getLayout()->getUpdate()->getHandles());
          }

Config file

    app\code\local\Soumen\Testmodule\etc\config.xml

<config>

     <frontend>
        <routers>
              <Soumen_Testmodule>
                 <use>standard</use>
                 <args>
                      <module>Soumen_Testmodule</module>
                      <frontName>testmodule</frontName>
                 </args>
              </Soumen_Testmodule>
        </routers>

        <layout>
            <updates>
                <testmodule>
                    <file>testmodule.xml</file>
                </testmodule>
            </updates>
      </layout>
     </frontend>
</config>

app\design\frontend\base\default\layout\testmodule.xml

<?xml version="1.0"?>
<layout version="0.1.0">
    <testmodule_index_index>
        <reference name="content">
            <block type="testmodule/test" name="test" template="testmodule/test.phtml" />
        </reference>
    </testmodule_index_index>
</layout>`

app\code\local\Soumen\Testmodule\Block\Test.php

class Soumen_Testmodule_Block_Test extends Mage_Core_Block_Template
    {
         public function getContent()
         {
             return "Hello World";
          }
     }

app\design\frontend\base\default\template\testmodule\test.phtml

<?php  echo $this->getContent();?>

Now when I call http://magento/testmodule... Then it displays the dufault page,
 but should show Hello World . Can Someone help me out , that what wrong I am doing


texts:
I just new installed Magento 2.2.3. Import product CSV problem gave me a headache for 2 days. The import file only just test file contains 5 rows. I try to import on localhost is work properly. But on server is always stop on "Please Wait" screen. The Web server is Centos7. I already changed on /etc/php.ini

  max_execution_time=500, max_input_time=1200, max_input_vars = 3000, memory_limit=500M

Any configure I missed?

import csv


texts: Magento 2 : How to add progessive bar(>) after next button in checkout page

texts:
I want to change text name of next button in checkout page

<button data-role="opc-continue" type="submit" class="button action continue primary">

</button>

My shippig.phtml file path is : /var/www/html/choice-brands/pub/static/frontend/Kensium/Choicebrand/en_US/Magento_Checkout/template/shipping.html

I wrote code in shipping.html

     <button data-role="opc-continue" type="submit" class="button action continue primary">

</button>

but nothing change.

I did static content everything but not coming and in inspect element its not shows nothing what i am adding class.

Any suggestion?


texts: How to add fieldset in Magento custom admin form when field select value changed

texts:
I have a select field like this in my costum magento admin form

$fieldset->addField(
    'category_id',
    'select',
    array(
        'id'    => 'lazadaCategory',
        'label'  => Mage::helper('test_sellercenter')->__('Category '),
        'name'   => 'status',
        'values' => Mage::helper('test_sellercenter/dropdown')->getLazadaCategories(),
        'class' => 'required-entry',
    )
);

and when the select value change i need to add another fields below this select field (not like toogle show/hide just add), for example like this field

$fieldset->addField(
    'listing_name',
    'text',
    array(
        'label' => Mage::helper('test_sellercenter')->__('Listing Name'),
        'name'  => 'listing_name',
        'required'  => true,
        'class' => 'required-entry',

    )
);

is there a way to do this in magento? for example like this add field example


texts: Magento 2 : Copy "Related Product" functionality in custom module

texts:
I just want to select some products on the edit page and show them on the product page. It should be the same function, as in Related Products, Up-sells, and Cross-Sells.

Can I simply copied some files for create a custom module? Or maybe someone know a suitable extension?

Thanks!


texts:
The native catalog search box does not display. I have it added to the local.xml file as

    <reference name=“left”>

    <block type="core/template" name="top.search" as="topSearch" template="catalogsearch/form.mini.phtml"/>

So it displays in my sidebar. However it does not show.


texts: I have installed magento2.1.7 as a standard installation. And installed with SSl certificate, the frontend is loading but admin is showing 404, we have enabled the .htaccess. Any thoughts for this?


texts: Product with the url_key attribute already exists when update product image using API

texts:
I want to update product image label for specific store view using API v1.
First, I've created product

$res = $client->call($session, 'catalog_product.create', array(
'downloadable',
47,
'standardapiv1_' . uniqid(),
array(
    'websites' => array(2),
    'name' => 'Standard api v1',
    'description' => 'Product description',
    'short_description' => 'Product short description',
    'weight' => '10',
    'status' => '1',
    'visibility' => '4',
    'price' => '100',
    'tax_class_id' => 1,
    'meta_title' => 'Product meta title',
    'meta_keyword' => 'Product meta keyword',
    'meta_description' => 'Product meta description'
),));

and added product image to this product

$res2 = $client->call($session, 'product_media.create', array(
    $res, array(
        'file' =>$newFile,
        'label'=>'standard api',
        'types'=>array('thumbnail'),
        'exclude'=>0
    )
));

Product was successfully created.
When I run this request to API

$res =$client->call($session, 'product_media.update', array(
1047,
'/i/m/image_10.jpg',
array(
    'file'=>$newFile,
    'label'=>'update lbl',
),
'2'));

I got this error Product with the 'standard-api-v1' url_key attribute already exists.
If last parameter is not set - storeView - everything works well, so source of problem is looks like be here:
\app\code\core\Mage\Catalog\Model\Product\Attribute\Media\Api.php line 256:

try {
    $product->save();
    } catch (Mage_Core_Exception $e) {
        $this->_fault('not_updated', $e->getMessage());
    }

Does anyone know, what am I doing wrong?
I've made some research, and found answers, that it was a bug in EE 1.13


texts: Magento 2: Call a static block using xml

texts:
How i include a static block in a page using xml. For example i created a static block with identifier promo. In magento 1 we include a static block using below code

     <block type="cms/block" name="Promo">
          <action method="setBlockId"><block_id>promo</block_id></action>
     </block>

I want to do exactly same in magento 2


texts: add a link separator or a small icon between the categories in main menu

texts:
Actually i have two question regarding the categories being added in the menu in the header.

I want to add a / sign between the menu categories. As these categories are begin added from the admin panel how can i achieve this. how to.
On hover it completely change the background. I only want to show a small black base on hovering the category.

Any kind of help would be much appreciated. i am using ultimo theme.


texts: Magento 2 Override view/adminhtml/ui_component XML file of third party Module

texts:
I am using Third Party Module for Admin section which used UI component to display data.The file path is
Vendoname/Modulename/view/adminhtml/ui_component/news_data_listing.xml file
.I want to override that file in our Custom module and display some more columns.
I have used same path and just copy paste that file and make some changes but these changes are not getting reflecting.
in Our Moudle file path is:
Vendoname/Mymodule/view/adminhtml/ui_component/news_data_listing.xml

What should Used to override the Extension file.If anyone have idea please share me.


texts: magento2 get category name in post category page

texts:
In file phtml i want to select category name. If i use
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$category = $objectManager->get('Magento\Framework\Registry')->registry('current_category');
echo $category->getParentCategory()->getName();

I will have error: Call to a member function getParentCategory()
And when i use:
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$category = $objectManager->get('Magento\Framework\Registry')->registry('current_category');
if (method_exists($category, "getParentCategory")){
    echo $category->getParentCategory()->getName();
}

Don't have ouput Only a white screen
Please help me!


texts:
I'm trying to add a product from cart page through ajax, I need to require the default JS : 'Magento_Customer/js/customer-data' so that I can update the cart totals.
But as soon as I place this code on my page :

<script>
    require([
'jquery',
'Magento_Customer/js/customer-data',
'Magento_Checkout/js/action/get-totals'],
function($, customerData, getTotals) {
   //MY LOGIC
}
</script>

I'm getting the error :

Cannot read property 'sectionLoadUrl' of undefined

Is there any way to fix this ? I tried to use 'domReady!' but it's not working.


texts: Where can I find the specific "performance improvements" for the latest versions of Magento?

texts:
I'm running on Magento 1.9.0.1 and looking into what the Performance benefits of upgrading to the latest version.
I'm having trouble finding specifics:
http://merch.docs.magento.com/ce/user_guide/Magento_Community_Edition_User_Guide.html#magento/release-notes-ce-1.9.2.html

Other Performance Improvements
• Addressed performance degradation with downloadable products.
• Numerous performance enhancements.1 and 2
.....
Acknowledgments
We’d like to thank the following members of the Magento Community for their contributions to this release:
1 Performance enhancements, Thomas Birke
2 Performance enhancements, Ivan Chepurnty

What specifically are these "performance enhancements" that were included in the latest version?


texts: Set template in XML layout file based on URL

texts:
I have the following lines in an XML layout file to set a blank template for the product_list block (we do this to hide the product listing on some anchor categories):

<reference name="product_list">
  <action method="setTemplate">
    <template>dummy/dummy/blank.phtml</template>
  </action>
</reference>

But I only want the above code to run if ?viewall=1 is not set in the URL.

How can I implement this conditionally?


texts: how to extend .js and .html files in Magento 2

texts:
I'm extending customer address for these I have to modify/extend vendor/Magento/module-ui core files.

i.e

root/vendor/magento/module-ui/view/base/web/js/form/components/collection.js

and

root/vendor/magento/module-ui/view/base/web/templates/form/components/collection.html

When I have modified core files it's working fine, But this is not good procedure/idea to extend.

So I have created the vendor name as Magento in root/app/code/ and I have placed modified above files to same folder in local.

i.e

root/app/code/magento/module-ui/view/base/web/js/form/components/collection.js

and

root/app/code/magento/module-ui/view/base/web/templates/form/components/collection.html

After placing those files I have cleared the cache. But still it's not showing my changes.

I have ran php bin/magento setup:static-content:deploy command also but no luck.

Could you please suggest me how to do this?


texts: can i run magento2 on top of a mysql5.0 version?

texts: Am i able to run and build magento2 on top of a mysql 5.0 stack without downgrading the version of magento2?


texts: I can only add one command in one module

texts:
I have created a command the class is
Vendor\CreateProduct\Command\CreateProduct. It could be found when I type: php bin/magento

But when I create another command which class is Vendor\CreateProduct\Command\UpdateProduct. It could not be found when I type: php bin/magento.

The di.xml is like follows:

<?xml version="1.0"?>
    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
        <type name="Magento\Framework\Console\CommandList">
            <arguments>
                  <argument name="commands" xsi:type="array">
                      <item name="vendor_createproduct_command_createproduct" xsi:type="object">Vendor\CreateProduct\Command\CreateProduct</item>
                      <item name="vendor_createproduct_command_updateproduct" xsi:type="object">Vendor\CreateProduct\Command\UpdateProduct</item>
                </argument>
            </arguments>
        </type>
 </config>

Can anyone help this?

Thanks

the string in setName function is $this->setName("zhouzi:product:update") and $this->setName("zhouzi:product:create");


texts:
I am currently running Magento 1.9.2.4 + Redis.
And I want to dubbel check my current settings.

Therefore I changed my local.xml with <full_page_cache><backend>Cm_Cache_Backend_Redis</backend></full_page_cache>.

But after that I wrote that it is better for Magento 1.8+ to use <full_page_cache><backend>Mage_Cache_Backend_Redis</backend></full_page_cache> am I right?

Should I enable Cm_RedisSession.xml inside app/etc/modules?
Because that is disabled by default.

Thanks for any help!


texts: How to add sales order table custom value to magento 2 report from a custom module

texts:
I created a custom module to check the ad code (measure the marketing traffic) value from the url and add to the order. I added a column to the sales order table and save the ad value when user place the order.

Now I need to show this value in the sales report.

Can someone help me how to achieve this?


texts: porto theme settings not reflecting magento 2.3.3

texts: I update Porto theme and add all the patches as per the documentation, but none of the existing block or changes is visible. I tried to reinstall but still the same. Please help


texts: Magento 2. Use ui form component without a data source

texts:
I wish to create a form in admin.
The purpose of the form is not CRUD.
Using blocks for creating forms is marked as deprecated in favor of ui_component forms
Is it possible to use a ui component form without a data source?


texts:
I am trying to reload the topCart after an item has been deleted in order to list the remaining contents of the cart.

When removing an item from the mini basket no further data is requested so if there's have 5 different items you can only remove 3 of them before having to reload the entire page to gain access to the final 2

I have tried to use jQuery for this but haven't had any luck with it

In my removeItem function which gets the response from the server:

removeItem: function(el) {
    var cart = this;
    cart.hideMessage();
    cart.showOverlay();
    $j.ajax({
        type: 'POST',
        dataType: 'json',
        data: {form_key: cart.formKey},
        url: el.attr('href')
    }).done(function(result) {
        cart.hideOverlay();
        if (result.success) {
            cart.updateCartQty(result.qty);
            cart.updateContentOnRemove(result, el.closest('#minicart_content'));
        } else {
            cart.showMessage(result, el.closest('#minicart_content').attr('id'));
        }
    }).error(function() {
        cart.hideOverlay();
        cart.showError(cart.defaultErrorMessage);
    });
},

When the remove link is pressed I would like to reload the miniCart so that the next item is included in the list.

Can anyone suggest a better approach?

All items are being removed using getAjaxDeleteUrl from Checkout/Block/Cart/Item/Renderer.php

public function getAjaxDeleteUrl()
{
    return $this->getUrl(
        'checkout/cart/ajaxDelete',
        array(
            'id'=>$this->getItem()->getId(),
            Mage_Core_Controller_Front_Action::PARAM_NAME_URL_ENCODED => $this->helper('core/url')->getEncodedUrl(),
            '_secure' => $this->_getApp()->getStore()->isCurrentlySecure(),
        )
    );
}

And here's my ajaxDeleteAction inside my  CartController.php

public function ajaxDeleteAction()
{
    if (!$this->_validateFormKey()) {
        Mage::throwException('Invalid form key');
    }
    $id = (int) $this->getRequest()->getParam('id');
    $result = array();
    if ($id) {
        try {
            $cart = $this->_getCart();
            $cart->removeItem($id)->save();

            $result['qty'] = $this->_getCart()->getSummaryQty();
            $result['subtotal'] = Mage::helper('checkout')->formatPrice($this->_getCart()->getQuote()->getSubtotal());

            $result['success'] = 1;
            $result['message'] = $this->__('Item was removed successfully.');
        } catch (Exception $e) {
            $result['success'] = 0;
            $result['error'] = $this->__('Can not remove the item.');
        }
    }

    $this->getResponse()->setHeader('Content-type', 'application/json');
    $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
}

What I need to do is refresh the mini cart to load the other products that wer not visible in the cart.

Please help, headbanging on desk!


texts: Not able to disable block cache without affecting Magento FPC

texts:
I have created a custom block where I am showing the number of items in the cart and also loggedin the customer name. I am getting correct count and customer name on checkout page.But not on any other pages such as Product page, home page etc.
This is because I have enabled full page caching. If I disable FPC then everything works fine. But I want to keep FPC and also need to show this count on other pages. How it can be done?
I have already tried many codes like  $this->_isScopePrivate = true; in constructor. But it's not working. I am using Magento 2.3.1.
Below is sample code:

class ShoppingCart extends \Magento\Framework\View\Element\Template
{
    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Checkout\Model\Session $checkoutSession,
        array $data = []
    ) {
        $this->_checkoutSession = $checkoutSession;;
        parent::__construct($context, $data);
        $this->_isScopePrivate = true;

    }

    /**
     * Get quote object associated with cart. By default it is current customer session quote
     *
     * @return \Magento\Quote\Model\Quote
     */
    public function getQuoteData()
    {
        $this->_checkoutSession->getQuote();
        if (!$this->hasData('quote')) {
            $this->setData('quote', $this->_checkoutSession->getQuote());
        }
        return $this->_getData('quote');
    }

    public function getMyCustomMethod(){
        return "test function callecd";
    }
}

and calling in logo.phtml page as.

$blockObj= $block->getLayout()->createBlock('Rbj\Customer\Block\ShoppingCart');
$quote =  $blockObj->getQuoteData();
$itemsCount = $quote->getItemsCount();
$itemsCount = $blockObj->getMyCustomMethod();

Please advice. Thanks in advance.


texts: Magento Admin Panel graphics not showing

texts: So after upgrading Magento to 1.9.1 the Admin panel is working but in displaying a white background with the URL links. It seems to appear like a site map of the admin panel. Does anyone know how to fix this?


texts: Magento 2 :- Custom module menus are not showing in another user account

texts:
I want to show a menu to another user.
acl.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
    <acl>
        <resources>
            <resource id="Magento_Backend::admin">
                <resource id="Tyres_Faq::tyres_faq" title="Faq" sortOrder="51">
                    <resource id="Tyres_Faq::index" title="Index" sortOrder="10"/>
                    <resource id="Tyres_Faq::tyres_faq_configuration" title="Configuration" sortOrder="99" />
                </resource>
                <resource id="Magento_Backend::stores">
                    <resource id="Magento_Backend::stores_settings">
                        <resource id="Magento_Config::config">
                            <resource id="Tyres_Faq::tyres_faq_config" title="Faq"/>
                        </resource>
                    </resource>
                </resource>
            </resource>
        </resources>
    </acl>
</config>

Menu.xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../Backend/etc/menu.xsd">
    <menu>
        <add id="Tyres_Faq" title="Faq" module="Tyres_Faq" sortOrder="90" resource="Tyres_Faq::sample"/>
        <add id="Tyres_Faq::tyres_faq" title="Items" module="Tyres_Faq" sortOrder="10" parent="Tyres_Faq" action="tyres_faq/items/" resource="Tyres_Faq::items"/>
    </menu>
</config>

Menus are not showing in another user account.


texts:
Can we use  2 different modules(say CatalogSearch and LayeredNavigation) in a single custom overridden vendor.

ie) I have

Vendor/MyCatalogSearch and

Vendor/MyLayeredNavigation

both the modules under single "Vendor"

Or should i use as below?

Vendor1/MyCatalogSearch

Vendor2/MyLayeredNavigation


texts: Is it possible out of stock items should still be able to be purchased in Magento 2?

texts:
Any idea

Out of stock items should still be able to be purchased and should not be deactivated or the buy button taken away.


texts:
I have a problem with my magento installation.
I'm using the M CE 1.7.0.2
I tried to do a System Backup inside the admin, and I closed the browser page by mistake.
After that, when I tried to access the website again, I got an 503 error.
After some research I've deleted the maintanence.flag file.

After that, the website got up in the air once again, but now it takes more than 5 minutes to load a page.

Anyone had this problem before? How can I solve it.

Many thanks.


texts:
When I have to override a method of a class that is used as extends in many modules I have to copy the class path and put it under app
/local/Mage/.../Core_Class_Extended_ManyTimes.php.

But there is no way to pull me inside the parent class and extend it in turn so as to override a single method even if there are no namespaces? so as to be slightly safer in case of updates of the core?

es: app/local/Mage/.../Core_Class_Extended_ManyTimes.php:

class Core_Class_Extended_ManyTimes extends SOMETHINGS_ORIGINAL_Core_Class_Extended_ManyTimes


texts: Magento 2. Get discount end date from product model

texts:
I have a module, that output's products with discounts (discounts provided by catalog price rules).

How get each product (\Magento\Catalog\Model\Product) discount end date? What should I inject into constructor?


texts: Magento 2 - Load html of a template from PHP class

texts:
I have a php class where I am generating some HTML and returning it.
private function _generateNote($expressRule)
{
    if ($expressRule["hasNotAllowedCategories"]) {

        $note  = "";
        $items = $expressRule["itemsWithNotAllowedCategories"];

        $message = "Das folgende Produkt ist nicht mit Express lieferbar und wird stattdessen mit der Standard Versandmethode verschickt:"; // @todo, aus settings laden
        if (count($items) > 1) {
            $message = "Die folgenden Produkte sind nicht mit Express lieferbar und werden stattdessen mit der Standard Versandmethode verschickt:"; // @todo, aus settings laden
        }

        $note .= "
";
        $note .= "    $message";
        $note .= "

";

        $note .= "
";
        foreach($items AS $key => $data) {
            $note .= "
" . key($data) . "
";
        }
        $note .= "
";

        $note .= "    * Hinweis: Folgende Produktkategorien sind nicht mit Express lieferbar:";
        $note .= "

";

        $note .= "
";
        foreach($expressRule["notAllowedCategories"] AS $notAllowedCategory) {
            $note .= "
$notAllowedCategory
";
        }
        $note .= "
";

        $note .= "
";
    }

    return $note;
}

I want to outsource this html to a template file, so that I just have to call it like this:
Pseudo Code:
private function _generateNote($expressRule)
{
    return $this->$_block->loadHtml($expressRule);
}

How can I outsource my script to a template?


texts: Magento 2 - What case I use di.xml and How to use di.xml for module?

texts:
In Magento 2, What case I use di.xml and How to use di.xml for module?

Anyone knew, please show me step by step.


texts: Previously in my Magento store I had set the Qty for Item's Status to Become Out of Stock in the inventory to 5 so that if the quantity of the products reaches to 5 or below it should show as out of stock and it was working properly. Now I want the quantity to be displayed according to the exact number and hence I changed the value of Qty for Item's Status to Become Out of Stock from 5 to 0. But even after changing the products are still showing out of stock when the count reaches 5. I have reindexed all the data and I have even cleared the cache after changing the value. Kindly let me know what should I do to enable the products to show in stock even if the count reaches 5 or below.


texts: Magento2 Copy data from one to another magento installation

texts:
I want to copy all data from one to another magento installation.

Wants to copy products,product-attributes,category,category-attributes,customers,cms-block,pages,rules everything except orders.
I can do it by take DB from one and setup it in new installation,but we have many modules and their data stores in DB and I'm not going to use so much modules for it.

So what will be best practice to achieve it without errors?
Old version : 2.2.2 to
latest version 2.3.2

  Note : I don't want it happen by Upgrading Magento version.


texts: How can I add brands and flavors in navigation menu with categories?

texts: I want to show categories of items also want to show the brands and flavors of item according to the parent it has.


texts: Magento customer login doesn't work after adding SSL

texts:
I'm using magento version: 1.9.2.1. And faced a problem with customer login with ssl certificate. I tried adding session domain and path. Doesn't help. When i try to login it just says welcome, and after refresh it says that i'm not logged in.

Anyone know how to fix this issue?

It only happens with SSL certificate enabled. If i remove it. It starts to work.


texts:
I have developed ajax addtocart functionality with a dropdown box that displays the item along with it's picture, price, etc.  It also has 'close' and 'go to cart' buttons.

After the addition of an item no apparent error is raised.  When I click the cart button on the main page the cart page does not display an error either.  However, when I click the dropdown box's 'go to cart' button this is triggered on the next pageview (on the cart page).

               <?php if ($_rate->getErrorMessage()): ?>

<?php echo $this->escapeHtml($_rate->getErrorMessage()) ?>

And, again, there is no error message that is displayed.  It merely generated a list with the class of 'error-msg'.

Any idea as to why this might happen?

The button in question is:

<button id="checkout-btn" name="checkout-btn" type="button"><?php echo $this->__('Checkout') ?></button>

And the javascript function that handles it's onclick event is:

if(document.getElementById('checkout-btn').addEventListener){
    document.getElementById('checkout-btn').addEventListener('click',function(){
        setLocation('<?php echo Mage::helper('checkout/url')->getMSCheckoutUrl(); ?>');
    },false);
}
else if(document.getElementById('checkout-btn').attachEvent){
    document.getElementById('checkout-btn').attachEvent("on"+'click',function(){
        setLocation('<?php echo Mage::helper('checkout/url')->getMSCheckoutUrl(); ?>');
    })
}

I've even tried to remove all error messages in the session in the controller before the ajax response is sent back to the user:

Mage::getSingleton('checkout/session')->getMessages(true);
$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($response));


texts: Magento2: How to implement ENUM datatype?

texts:
Working on custom extension and need to implement ENUM datatype.

In Magento1, we use to implement in this way,

$installer->run("
ALTER TABLE `{$this->getTable('catalog_product_option_type_price')}` CHANGE `price_type` `price_type` ENUM( 'fixed', 'percent', 'absolute' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'fixed'
");

How to make this work for Magento2?


texts: Declaration of ... must be compatible with

texts:
I have this module enabled, and when I try to run setup:di:compile I get this error

Fatal error: Declaration of Mirasvit\Helpdesk\Ui\Component\DataProvider\FulltextFilter::apply() must be compatible with Magento\Framework\View\Element\UiComponent\DataProvider\FilterApplierInterface::apply(Magento\Framework\Data\Collection $collection, Magento\Framework\Api\Filter $filter) in /home/magento2/public_html/app/code/Mirasvit/Helpdesk/Ui/Component/DataProvider/FulltextFilter.php on line 27

This is the original Magento 2 class

namespace Magento\Framework\View\Element\UiComponent\DataProvider;

use Magento\Framework\Data\Collection\AbstractDb;

interface FilterApplierInterface
{
    public function apply(AbstractDb $collection, \Magento\Framework\Api\Filter $filters);
}

And this is the extended class in module

namespace Mirasvit\Helpdesk\Ui\Component\DataProvider;

use Magento\Framework\Data\Collection\AbstractDb as DbCollection;
use Magento\Framework\Api\Filter;

class FulltextFilter implements \Magento\Framework\View\Element\UiComponent\DataProvider\FilterApplierInterface
{

    protected function getFulltextIndexColumns(DbCollection $collection, $indexTable)
    {
        $indexes = $collection->getConnection()->getIndexList($indexTable);
        foreach ($indexes as $index) {
            if (strtoupper($index['INDEX_TYPE']) == 'FULLTEXT') {
                return $index['COLUMNS_LIST'];
            }
        }

        return [];
    }

    public function apply(DbCollection $collection, Filter $filter)
    {
        $columns = $this->getFulltextIndexColumns($collection, $collection->getMainTable());
        if (!$columns) {
            return;
        }
        $collection->getSelect()
            ->where(
                'MATCH('.implode(',', $columns).') AGAINST(?)',
                $filter->getValue()
            );
    }
}

What could be causing this issue?


texts: Magento 2 Container renders outside of parent container

texts: I have the container page-wrapper, and inside is footer-container.  When I check the rendered HTML, the footer container is actually outside the page-wrapper div.  How do I keep it inside of the parent div?


texts: Programmatically create a configurable product and assign the simple product to configurable product in Magento2 product

texts:
This is what I've done so far. The simple and configurable products are created. The problem is I cannot assign the simple product to configurable product.
Here is the code (ids and attributes works with default sample data).

    //simple product
    $simple_product = $this->_objectManager->create('\Magento\Catalog\Model\Product');
    $simple_product->setSku('test-simple');
    $simple_product->setName('test name simple');
    $simple_product->setAttributeSetId(4);
    $simple_product->setSize_general(193); // value id of S size
    $simple_product->setStatus(1);
    $simple_product->setTypeId('simple');
    $simple_product->setPrice(10);
    $simple_product->setWebsiteIds(array(1));
    $simple_product->setCategoryIds(array(31));
    $simple_product->setStockData(array(
        'use_config_manage_stock' => 0, //'Use config settings' checkbox
        'manage_stock' => 1, //manage stock
        'min_sale_qty' => 1, //Minimum Qty Allowed in Shopping Cart
        'max_sale_qty' => 2, //Maximum Qty Allowed in Shopping Cart
        'is_in_stock' => 1, //Stock Availability
        'qty' => 100 //qty
        )
    );

    $simple_product->save();

    $simple_product_id = $simple_product->getId();
    echo "simple product id: ".$simple_product_id."\n";

    //configurable product
    $configurable_product = $this->_objectManager->create('\Magento\Catalog\Model\Product');
    $configurable_product->setSku('test-configurable');
    $configurable_product->setName('test name configurable');
    $configurable_product->setAttributeSetId(4);
    $configurable_product->setStatus(1);
    $configurable_product->setTypeId('configurable');
    $configurable_product->setPrice(11);
    $configurable_product->setWebsiteIds(array(1));
    $configurable_product->setCategoryIds(array(31));
    $configurable_product->setStockData(array(
        'use_config_manage_stock' => 0, //'Use config settings' checkbox
        'manage_stock' => 1, //manage stock
        'is_in_stock' => 1, //Stock Availability
        )
    );

    $configurable_product->getTypeInstance()->setUsedProductAttributeIds(array(152),$configurable_product); //attribute ID of attribute 'size_general' in my store
    $configurableAttributesData = $configurable_product->getTypeInstance()->getConfigurableAttributesAsArray($configurable_product);

    $configurable_product->setCanSaveConfigurableAttributes(true);
    $configurable_product->setConfigurableAttributesData($configurableAttributesData);

    $configurableProductsData = array();
    $configurableProductsData[$simple_product_id] = array( //[$simple_product_id] = id of a simple product associated with this configurable
        '0' => array(
            'label' => 'S', //attribute label
            'attribute_id' => '152', //attribute ID of attribute 'size_general' in my store
            'value_index' => '193', //value of 'S' index of the attribute 'size_general'
            'is_percent'    => 0,
            'pricing_value' => '10',
        )
    );
    $configurable_product->setConfigurableProductsData($configurableProductsData);

    $configurable_product->save();

    echo "configurable product id: ".$configurable_product->getId()."\n";


texts: magento 404 error when display a product

texts:
In my magento website and since this morning when I open a page to display a product it shows me a 404 not found page (and for the group deals page it's empty and I can't even pass an order).

I don't know what it causes this problem because it was working yesterday.

PS: All the products display a 404 not found page and my magento version is 1.8.1


texts:
I can't login to downloader with the error: Unable to write to the configuration file.

file permission of downloader/config.ini is 666,
any idea?


texts: Check Out Process with Braintree - Error 400 bad request - Intermittent - Magento 2.1

texts:
We have our store up and running in production, we have some customers placing orders without problem, however, everyday we got people calling and saying that they cannot place an order the system shows: (Most of them I thought was declining payment)

Unable to place the order. Please try Again later.

We have checked on Braintree those who says that got this error, their attempt don't even show there with any issue (e.g. Declined or something like that).

So I went to investigate and I realize that sometimes, not always, the payment returns 400 bad request, as you can see on image below:

Some months ago we were getting the same issue for ALL orders and based on some other instructions we have changed our sales_invoice_grid table adding one new column as you can see on image below: (It fixed most of the issues)

But making many tests today I could see that sometimes it happens again. I have no prefix in our Magento database installation.

Some extra info:

PHP Version 5.6.28

Server: Centos 7 (PVHVM)

I have Apache + NGINX + Varnish running together.

Checkout only with Braintree activated.

Any help will be much appreciated.


texts: Magento 2.3.2 : Check for Changing Product Description to Custom Attribute

texts:
Using Magento 2.3.2.
I'm using the following code in attribute.phtml to replace the 'description' on the product page, with the attribute 'website description`
$_call = $block->getAtCall();
$_code = $block->getAtCode();
$_product->getAttributeText('website_description');

if($_code == "description") {
    $objectManager =  \Magento\Framework\App\ObjectManager::getInstance();
    $storeManager  = $objectManager->get('\Magento\Store\Model\StoreManagerInterface');
    $storeCode     = $storeManager->getStore()->getCode();
if($_code == "description") {
    $_call = 'getWebsiteDescription'    ;
    $_code == "website_description";
}

}

This works fine, but any product with an empty 'website description' attribute doesn't have a description (obviously).
Is there a way of adding a check into this code that if 'website description' is not empty then to make the change, but if 'website description' is empty then to keep 'description'.
I have tried adding a 'strlen' expression, but it's not working. I'm no PHP expert.
Any help would be greatly appreciated.


texts: I can't access my store after disabling all modules in Magento 1.9x

texts:
I was trying to find an origin to an issue on my backend and I had the brilliant idea to disable all modules from the advanced/advanced tab in configurations.

Now my store is offline and cant access my backend.

I already tried to clear all info in core_config_data with this query

UPDATE `core_config_data` SET `value` = 0 WHERE `core_config_data`.`path` LIKE '%modules_disable_output%';

I already Tried to delete all this info with delete instead Update
Cleaned the cache folder

Still get no result.
What can I do?

Thanks in advance.


texts:
I need to insert a value into the database. The table already exists, just insert one more

And I need Insert 9 newcode newcode_title
I created new file

  mysql4-upgrade-0.7.9-0.8.0.php

And it includes

<?php

$installer = $this;

$installer->startSetup();

???????????
$installer->endSetup();


texts: Can we reschedule the Magento certification exam which is already rescheduled once?

texts:
Can we reschedule the Magento certification exam which is already
  rescheduled once ?

Due to Medical emergency I rescheduled my friend's Magento certification exam with $95 charge.

But the now the case is as doctors said he won't be recover till the new rescheduled date, Can I reschedule it again in No charge ?


texts: Credit Memo - default to 0 products returned

texts:
My typical use case for credit memo is price adjustments (adjust shipping, courtousy discount, etc.).  It is rare that I'm using it for total return.

It is odd to me that the default behavior of Magento is that a CreditMemo is returning all products and refunding all shipping.   Even when there are returns, it is rare the shipping is also refunded.

It would be better (and safer) if the CreditMemo defaults to $0 (no products refunded, and no shipping refunded) so admins are explicit about what is being refunded (nothing by default).   Otherwise it is too easy to, for example, create a credit memo intended to refund shipping but refund the entire order!

Is there any configuration, or customization, that would support defaulting a CreditMemo to $0?


texts: Magento 1.9 var/session directory not generating any files

texts:
I don't know whats going wrong with my Magento 1.9 setup. From last few days I have seen my /var/session directory remains same with no files generated. It's showing empty content.

My

Configuration -> Web -> Session Cookie Management
Has below data

Cookie Lifetime : 3600

Cookie Path :

Cookie Domain : .domain.com

Use HTTP Only : Yes

Cookie Restriction Mode : No

Please suggest how to resolve this issue or this is not a problem. It's working fine.


texts: How to create Rest API for the Magento 1.9 hosted in local machine

texts:
I have followed the below steps for authentication for REST API

http://inchoo.net/magento/configure-magento-rest-and-oauth-settings/

Then I have tried to access this link

http://127.0.0.2/magento/api/rest/

The error response which I got is

<magento_api>
<messages>
<error>
<data_item>
404
<message>Request does not match any route.</message>
</data_item></error>
</messages>
</magento_api>

Please help us how to make it up & reachable , how to get response from the request,
which is the url to access the rest api.

Let me know if I missed anything in the above configuration.


texts: List of table affect when a order is placed

texts: Need to know all the table that are affected when a order is placed.


texts: How to add a custom CSS file in Magento 2

texts:
Is there a way to create my own CSS file that loads last in the cascade?

If so, how and where do I add my custom CSS file?


texts: Magento2: Where in admin product review can be managed

texts:
In Magento2.0 admin side, where we can manage the product reviews.

I got some spam reviews which I want to delete them but cant able to find a place at admin side to manage the reviews.


texts:
I'm trying to display the newest Products on a CMS page, but it doesn't work. I've tried several codes ({{block...), but none of them would work. I have read about issues with the RWD-Theme but couldn't find a fix to it.

No server error, only blank space.

Right now I'm using this code:

{{block type="catalog/product_new" name="home.catalog.product.new" column_count="3" products_count="8" alias="product_homepage" template="catalog/product/new.phtml"}}


texts:
I managed to create an own magento theme. So far all is working nice. Now I've got a question about dynamic content on a custom *.phtml file. I'm creating a kind of configurator for cloth/materials. I'm successfully loading the products of a specific attributeset via php.

<?php
//Fetch attribute set id by attribute set name
    $attrSetName = 'massanfertigung';
    $attributeSetId = Mage::getModel('eav/entity_attribute_set')
            ->load($attrSetName, 'attribute_set_name')
            ->getAttributeSetId();

//Load product model collecttion filtered by attribute set id
    $products = Mage::getModel('catalog/product')
            ->getCollection()
            ->addAttributeToSelect('*')
            ->addFieldToFilter('attribute_set_id', $attributeSetId);
    ?>

Then I build a dropdown which shows all the product names:

<

MATERIAL

                <select id="selektor" onchange="updateData();">
                    <?php foreach ($products as $product) { ?>
                        <option value="<?php echo $product->getImageUrl(); ?>"
                                ><?php echo $product->getShortDescription(); ?></option>
                            <?php } ?>
                </select>

On selection of one of them the updateData() function is called - it updates the image of the currently selected material via javascript. But this only works because the images are already loaded.

I want to change the operation method to a proper one. What would be the right way to realize the following behavior:

I load via PHP the products, as already mentioned. But not with all attributes, just the short description and the ID. I know how to do that.
On a dropdown select I want a request to be sent to Magento to load the image for the given product ID.

Which technologies do I need for this? JS? JQuery? ReactJS? Ajax? What I need to understand is how can I send dynamic requests to Magento backend and display/update the data - in this case the picture. There would be other attributes to be shown, but I just want to understand the techniques.


texts: Is it possible to echo message form config.xml?

texts:
I am trying to echo a message from my config.xml in an alert javascript.

Is this possible with magento?


texts: My Magento site pointing towards localhost

texts:
Hi I am using amazon ec2 linux instance and i have transferrd my site using to the instance using filezilla and imported the database and everything went fine.

The problem is when i try to connect to my site using my instance public ip it redirects to my localhost and  displays the site.I have changed the file permissions to 777 and the same problem exists.

If i type my public ip in browser it displays the default apache page but once if i type my public ip/magento it points towards my localhost.

Someone please guide me how to solve this issue,how do i point my public ip to display my site without redirecting to my localhost.

Sorry Iam new to linux i do know where to change my localhost and make it point towards my public ip.


texts: Magento query how to get category, description and product url

texts:
This query work ok:

SELECT
    CONCAT(address.firstname,' ', address.lastname) AS Name,
    address.email AS Email,
    items.created_at AS Date,
    items.name AS Description,
    items.store_id AS Logon,
    items.name AS Category,
    items.store_id AS FeedbackDate,
    items.sku AS ProductSearchcode,
    items.order_id AS Orderref

FROM sales_flat_order AS orders
    JOIN sales_flat_order_item AS items
    ON items.order_id = orders.entity_id
    LEFT JOIN sales_flat_order_address AS address
    ON orders.entity_id = address.parent_id

WHERE
    items .created_at BETWEEN  '2014-04-15 00:00:00' AND '2014-07-30 00:00:00'
    AND orders.status = 'complete'

But, I also need to get item category, description and url to product?


texts: how to do in line translation for transactional emails?

texts:
i have an email which is sent at some point after an order is made on magento.

The email only contains a few lines of text.

The template was added to magento using an upgrade script in the core_email_template when the module was installed.

i would like to be able to change the content of the text of the email based on the store (i.e - german).
How can i implement translation for this email?


texts: How to set install sample data during Magento 2 installation trough CLI?

texts:
I am installing magento2 in a LEMP stack, trough composer and command line.

Follow is the code I am using to install:

bin/magento setup:install
--backend-frontname="adminlogin" \
--db-host="localhost" \
--db-name="magentodb" \
--db-user="magentouser" \
--db-password="magentouser@" \
--language="en_US" \
--currency="USD" \
--timezone="America/New_York" \
--use-rewrites=1 \
--use-secure=0 \
--base-url="http://www.newmagento.com" \
--base-url-secure="https://www.newmagento.com" \
--admin-user=adminuser \
--admin-password=admin123@ \
--admin-email=admin@newmagento.com \
--admin-firstname=admin \
--admin-lastname=user \
--cleanup-database

Is there any parameter to force magento to install sample data?


texts:
Is it possible in magento to redirect existing site one page to another website?

Like. http://magento-website/demo to http://magento-website-2/demo

Without using htaccess and php header function.

Using magento code standard


texts: Newsletter Checkbox on contact us page in magento 2

texts:
How to add newsletter checkbox in contact us form in magento 2.1.6 same like customer create account  page.

i tried to use same block

            <input type="checkbox" name="is_subscribed" title="<?php /* @escapeNotVerified */ echo __('Sign Up for Newsletter') ?>" value="1" id="is_subscribed"<?php if ($block->getFormData()->getIsSubscribed()): ?> checked="checked"<?php endif; ?> class="checkbox">
            <?php /* @escapeNotVerified */ echo __('Sign Up for Newsletter') ?>

but its give error:

  Fatal error: Call to a member function getIsSubscribed() on null in /home/schoolin/public_html/demo/app/design/frontend/Sm/furnicom/Magento_Contact/templates/form.phtml on line 72

How to fix this ???


texts: How to product add to cart using custom module(Tabs) in magento 2.3.5-p1

texts:
How to product add to cart using text-area. I want to create text-area in which customer can add product-sku,qty and clicking on add to cart button then that product will be  add to cart.

How to add multiple items add to cart using clicking on products.

How to product add to cart by uploading csv file.

Please anyone have idea, please share with me.
Thank you in Advance.


texts: Get Out of Stock products to show in magento 2.3

texts:
I'm trying to get options which are out of stock to be passed to the frontend js renderer.

However I've found that getJsonConfig() does not return attribute data (attribute labels and other data) for the options array that I pass it.

// I have found that the configurable $options data is initially set here
// I have made it so that this returns the entire array of attribute codes and product numbers -
//  - for the configurable regardless of stock status
/* @var \Magento\ConfigurableProduct\Helper\Data $this->$helper */
$options = $this->helper->getOptions($currentProduct, $this->getAllowProducts());

Note that the $options[array] correctly contains all out of stock attribute ids => product ids

This $options array is passed to a function that attempts to serialize/add extra data that is required buy the js renderer such as labels.

$attributesData = $this->configurableAttributeData->getAttributesData($currentProduct, $options);

/**
     * Get product attributes
     *
     * @param Product $product
     * @param array $options
     * @return array
     */
    public function getAttributesData(Product $product, array $options = [])
    {
        $defaultValues = [];
        $attributes = [];
        $productInstance = $product->getTypeInstance();
        $productEnabledAttributes = $productInstance ->getConfigurableAttributes($product);
        foreach ($productEnabledAttributes as $attribute) {
            $attributeOptionsData = $this->getAttributeOptionsData($attribute, $options);
            if ($attributeOptionsData) {
                $productAttribute = $attribute->getProductAttribute();
                $attributeId = $productAttribute->getId();
                $attributes[$attributeId] = [
                    'id' => $attributeId,
                    'code' => $productAttribute->getAttributeCode(),
                    'label' => $productAttribute->getStoreLabel($product->getStoreId()),
                    'options' => $attributeOptionsData,
                    'position' => $attribute->getPosition(),
                ];
                $defaultValues[$attributeId] = $this->getAttributeConfigValue($attributeId, $product);
            }
        }
        return [
            'attributes' => $attributes,
            'defaultValues' => $defaultValues,
        ];
    }

However getAttributesData does not obey the $options param. A sub call function must unwittingly run a filter operation. Observe below how the return $attributesData has filtered attribute "138"

From the getAttributesData() function, I'm suspecting getConfigurableAttributes() to be the cause of out of stock options not displaying in magento 2.3, this function retrieves data from a cache that was generated a few clock cycles ago.

/**
     * Retrieve configurable attributes data
     *
     * @param  \Magento\Catalog\Model\Product $product
     * @return \Magento\ConfigurableProduct\Model\Product\Type\Configurable\Attribute[]
     */
    public function getConfigurableAttributes($product)
    {
        \Magento\Framework\Profiler::start(
            'CONFIGURABLE:' . __METHOD__,
            ['group' => 'CONFIGURABLE', 'method' => __METHOD__]
        );
        if (!$product->hasData($this->_configurableAttributes)) {
            $configurableAttributes = $this->getConfigurableAttributeCollection($product);
            $this->extensionAttributesJoinProcessor->process($configurableAttributes);
            $configurableAttributes->orderByPosition()->load();
            $product->setData($this->_configurableAttributes, $configurableAttributes);
        }
        \Magento\Framework\Profiler::stop('CONFIGURABLE:' . __METHOD__);
        return $product->getData($this->_configurableAttributes);
    }

Here's a stack trace to help show where I'm up to.


texts: The 24hr Hour Dashboard is not working - while other ranges (7 days, YTD etc). are working fine. I've tried clearing cache to no avail, and also refreshed statistics. Still not working. any ideas?


texts:
Does anyone know of a way in which the allowed countries can be overwritten in the phtml files of the adminhtml?

We have a specific set of allowed countries on the front end, which we set using the option in the config. If someone phones up to place and order, we would like the advisers to be able to pick any country when creating an order in the backend/admin panel.

Previously we had a separate store set up, solely for phone orders - but this was creating issues with indexing being too big.

Thank you


texts: Magento225 Default Shipping Methods Are not showing in frontend

texts:
i have unable magento225 default shipping method knows ans flatrate,
but it is not showing on frontend.
does anyone have idea ,how i can show ? below is the settings
https://i.stack.imgur.com/VROSE.png


texts: Magento2.3 SetTemplate is not working first time ajax

texts:
I would like to add additional some field info in sales_order_create_index.xml
I used setTemplate:

<referenceBlock name="data">
        <action method="setTemplate">
            <argument name="template" xsi:type="string">Custom_Custom::order/create/data.phtml</argument>
        </action>

    </referenceBlock>

If I create order from sales > order > create order > select customer > go to create order page. It still get template in core magento.

Once I reload that page or reorder, it load correct my template.
Anyone know that problem


texts: Magento 2 Error on setting deployment mode to production

texts:
I enabled vendor's list of modules & setup upgrade them. I changed deploying mode from developer to production. During that i encounter an error

sagar@sg2 public_html]$ php bin/magento deploy:mode:set production
Enabled maintenance mode
Starting compilation
Something went wrong while compiling generated code. See the error log for details.
Command returned non-zero exit code:

/opt/cpanel/ea-php56/root/usr/bin/php -f /home/ghema/public_html/bin/magento setup:di:compile


texts: Issue with magento 1.9 bulk configurable product import

texts:
I have more than 1700+ configurable products with my csv. I had prepared & Tested the csv import format for magento successfully. It's working great.

The import csv have more than 8500 rows and had tried to import with magento import/export. It's not able to import all the product in single shot.
Then i had split each 25 products in one csv and uploaded it it's work. After 300 products uploaded now the import process supporting only for 1 or 2 products in single time.

I don't have a idea, how to import more than 1500+ in single shot.

Thanks


texts: Can't get module to show in static block

texts:
Using Magento 2
I created a cms static block that points to
{{block class="Inchoo\ModalOverlay\Block\etc" template="modal_overlay.phtml"}}
I followed this guide on how to create the modal
https://inchoo.net/magento-2/magento-2-how-to-display-static-block-content-in-modal-overlay/
but once its saved I get a error msg "We're sorry, an error has occurred while generating this content."
turned on developer mode and I dont get any other details about the error.


texts: Arabic language is not showing in Invoice PDF its showing squares instead magento 2

texts: I have a arabic store in magento 2. When I am trying to print invoice from magento  admin it's not supporting Arabic language it's showing squares all over Arabic language. I do not want to add any extension. Is there any simple technique without installing or creating any extension


texts: How to get associated(child) product id, name and other details using configurable product id in Magento 2

texts:
I need to get all the child products details like id, name, color from a configurable product id in a custom phtml page.

    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();

    $product = $objectManager->get('Magento\Framework\Registry')->registry('current_product');//get current product

    $productTypeInstance = $product->getTypeInstance();

    $usedProducts = $productTypeInstance->getUsedProducts($product);

    echo $product->getId(); //Main configurable product ID
    echo $product->getName(); //Main Configurable Name

    foreach ($usedProducts  as $child) {
        echo $child->getId()."
"; //Child Product Id
        echo $child->getName()."
"; //Child Product Name
    }

Used the above code. But error occurs for getUsedProducts. please help me to find a solution.


texts: I want to know how to translate Magento 2 mail templates

texts:
I am providing English and Japanese in Magento 2 project.

We respond so that customers can inquire about products.

I'd like to make the mail template of that module correspond to Japanese, but it will not be translated.

Please tell me how to resolve.

{{trans "Dear"}} {{var data.1}}!

{{trans "We received your question about Product: %product_name" product_name=$data.product_name}}

{{trans "We respond to you as fast as possible."}}


texts: Save grouped product : Requested product doesn't exist

texts:
I am getting an error in a external script when I am trying to save a grouped product : something goes wrong with product save method, the exception is "Requested product doesn't exist".

Doing unit test for one grouped product, get all associated products for this one and then rebuild links. Then save the grouped product.

//START TEST
$productId = 7986;
$associated = array();
$position = 0;
$productRepository = $objectManager->get('\Magento\Catalog\Model\ProductRepository');

$product = $productRepository->getById($productId);
$childrenProducts = $product->getTypeInstance()->getAssociatedProducts($product);

foreach($childrenProducts as $item) {
  $position++;

  $childrenId = $item->getId();
  $linkedProduct = $productRepository->getById($childrenId);

  //@var \Magento\Catalog\Api\Data\ProductLinkInterface $productLink
  $productLink = $objectManager->create(\Magento\Catalog\Api\Data\ProductLinkInterface::class);
  echo $linkedProduct->getSku().'
';
  echo $linkedProduct->getTypeId().'
';

  $productLink->setLinkType('associated')
    ->setLinkedProductSku($linkedProduct->getSku())
    ->setLinkedProductType($linkedProduct->getTypeId())
    ->setPosition($position)
    ->getExtensionAttributes();

  $associated[] = $productLink;
  $j++;
}

$product->setProductLinks($associated);
$product->save();
$i++;
//END TEST

Started from this script : http://www.w3solver.com/magento-2-add-a-grouped-product-programmatically/#

Please note :

The grouped product has an SKU and is active
Run reindex and refresh cache didn't change nothing

What's going wrong ?

Magento CE 2.2.2


texts:
I am facing this error message "The CSS Style is not supported because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled ". Done with run upgrade compile and deploy command but still not result

Refused to apply style from 'http://13.251.235.211/pub/static/version1591722900/_cache/merged/3d04894622aa9431c93107ff82b415dc.min.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.


texts: Hide Layered Navigation Attribute if only 1 available

texts:
My store has numerous attributes in my layered navigation to allow customers to refine the product views/searches. On some of my categories i only have 1 attribute present.
For example one of my categories - women > accessories > belts

has:

- 1 price option ($10.00 and above)
- 3 colour options (brown, tan, black)
- 1 brand option (Levi's)

How can I hide any filters that only have 1 value present. So in this case instead of the above i would only want:

- 3 colour options (brown, tan, black)

to show in the layered navigation


texts: Magento 2 Images Slider for Custom Theme

texts:
I have just started playing around with Magento 2 and I've created a new theme based on Blank.

I now need to add an image slider which I want to show in my homepage.

It doesn't seem like maento 2 comes with one?

Is there any recommended images sliders that I can use?


texts: how to display dropdown on cart page based on category?

texts:
This is my cart page

Here i have added 3 dropdown list which is static and i want to show first 2 dropdown based on category "rings"

any solution?


texts:
I have a strange issue on magento multi-store setup. This is how our stores are setup.

Each stores have separate folders with their own .htaccess and index.php files.

The issue is, when my PO and Client access some category pages in chrome, they get 404 but everything is fine in all other browsers.

I created 404 logger to capture request data and found out (seems), it's looking page in different store.
e.g. instead of looking page at:
url.com.au/home-solutions/category-page (au/home-solutions store view) it's looking in url.com/category-page (global store view) and sometimes in url.com.au/business-solutions/category-page (au/business-solutions store view)

As that category is assigned to 'home-solutions' (au/nz), it will be 404 for other stores.

Currently, there is no actual domain, we are testing with IP address and "Australia Website" only. Not sure if this issue will be resolved once we go live with actual domain.

It would be appreciated to get some views from some Magento top minds.

Magento ver. 1.7.0.2

UPDATE

Found how to replicate issue myself on my machine. If I access url.com.au/home-solutions/category-page?___store=au_business then every category page from au_home store returns 404 on that browser.


texts: Getting region id on onestepcheckout page

texts: I want to get region id on onestepcheckout ajax page on payment_method template when it is refreshed. I want to hide credit card for some regions.


texts: show numbers of orders on home page in magento2

texts:
in the home page show, the number of orders that are placed and when the user placed the order that number should increase in home page
for eg the current order placed are 500 and when user place the order it should 501 shown in home page in magento2