texts: Why isn't my Novaworks theme design updating on front end after I edit and save configuration?

texts:
First off, let me apologize and thank you for the pain you may endure with my amateur explanation.

I have a custom theme set up on Magento, that gives me the option of editing the theme design, i.e. color of font, background, button hover, menu drop down, etc.  I've successfully managed to change it a few times- although the change would only work in, lets say, Google Chrome on some computers but not in Firefox or Internet Explorer- vice versa.  This time around, I changed it from purple to blue but it doesn't work in any of the web browsers, yet for some reason it's working when I view it from my phone.. sigh.

Something even more painful is that when I view the front end from another computer (I'm in an office with 10 computers that I bounce around to) it still has the color theme (red) that I had set 2 changes ago.

I've flushed Magento cache & cache storage, refreshed all cache storage management, re-entered the color hex and saved the configuration, enabled the Load Custom CSS option in customization settings, I thought maybe enabling the WYSIWYG editor would help but that didn't do anything either..

I've googled everything and either I don't understand or my question hasn't been asked before or I'm just not searching properly- either way, somebody please help me. I'm turning into Cartman from the stress of searching and searching and searching...

Thank you !!


texts: How to add custom Js code in a "dynamic-rows" component?

texts:
I'm creating a module that uses a dynamic-rows component similar to the one used for advanced pricing in the product add/edit form.

I need to add some custom javascript code when the new row is added to the list of existing rows (Add button is clicked).

A simple alert('Good Job!') should do it. I can take it from there.
I don't want to bore you with my custom code because that's not important for now.
So I am asking...

How can I add a js alert when pressing the add button?
I don't mind if your recommendations suggest a core edit. I know how to adapt it to my own module (I think).
I just need a place to start.

[Edit].
I realized I didn't add any code.
The code for the advanced pricing dynamic rows can be found here


texts: Using 2 instances of the same class as dependencies for an other class

texts:
I've built a CRUD module in Magento2.
My Save admin controller has 2 dependencies that are basically the same classes, with different settings.
But when I run the static tests php bin/magento dev:tests:run static I get an error message saying that this is wrong. I should not the same class as a dependency twice for one class.

Data set: array (
  0 => '\\Sample\\News\\Controller\\Adminhtml\\Author\\Save',
)
Argument type duplication in class Sample\News\Controller\Adminhtml\Author\Save in /[ROOT]/app/code/Sample/News/Controller/Adminhtml/Author/Save.php
Multiple type injection [\Sample\News\Model\Uploader]

But I kind of need it like that.
I have to upload 2 things into my entity. An image and a file.
The upload for these 2 behave the same up to only one point, so I have a common class for them, but they are a bit different.
So my controller constructor looks like this:

public function __construct(
    ...
    \Sample\News\Model\Uploader $fileUploader,
    \Sample\News\Model\Uploader $imageUploader,
    ....
)
{
    ....
    $this->fileUploader = $fileUploader;
    $this->imageUploader = $imageUploader;
    ...
}

and in di.xml I have the difference between these 2 classes.

<virtualType name="SampleNewsAuthorImageUploader" type="Sample\News\Model\Uploader"><!-- Virtual type for uploading images -->
    <arguments>
        <argument name="baseTmpPath" xsi:type="const">Sample\News\Model\Uploader::IMAGE_TMP_PATH</argument>
        <argument name="basePath" xsi:type="const">Sample\News\Model\Uploader::IMAGE_PATH</argument>
        <argument name="allowedExtensions" xsi:type="array">
            <item name="jpg" xsi:type="string">jpg</item>
            <item name="jpeg" xsi:type="string">jpeg</item>
            <item name="gif" xsi:type="string">gif</item>
            <item name="png" xsi:type="string">png</item>
        </argument>
    </arguments>
</virtualType>

<virtualType name="SampleNewsAuthorFileUploader" type="Sample\News\Model\Uploader"><!-- virtual type for any file upload -->
    <arguments>
        <argument name="baseTmpPath" xsi:type="const">Sample\News\Model\Uploader::FILE_TMP_PATH</argument>
        <argument name="basePath" xsi:type="const">Sample\News\Model\Uploader::FILE_PATH</argument>
        <argument name="allowedExtensions" xsi:type="array" />
    </arguments>
</virtualType>

<type name="Sample\News\Controller\Adminhtml\Author\Save">
    <arguments><!-- assigne above classes as dependencies for my controller -->
        <argument name="fileUploader" xsi:type="object">SampleNewsAuthorFileUploader</argument>
        <argument name="imageUploader" xsi:type="object">SampleNewsAuthorImageUploader</argument>
    </arguments>
</type>

Is there a way to avoid the duplication of the same dependency or is there an annotation I can use so I won't see the error when I run the tests?
Similar to @SuppressWarnings(PHPMD.ExcessiveMethodLength).
(basically I want to hide the dirt under the rug if I cannot do it properly).


texts:
Reading from another Magento stack overflow thread, everything seems pretty straightforward. Found here: How to add new facebook tracking pixel to magento site?

My question is for this one:

fbq('track', 'CompleteRegistration');

This can be done as part of your event or observer using customer_register_success event

Does this mean I can throw a <script>fbq('track', 'CompleteRegistration');</script> into that page or I actually have to integrate it into observer method?


texts: Can we add cities list without module in magento 2.x

texts:
I am looking to add the cities list for the India in magento 2.x by custom js. Like storing cities list in array. when the state field is selected

for example :-

  Maharashtra I want to display its cities by storing the cities in
  array. Can that be achieved.

I am unable to find any free extension to implement city dropdown.


texts: How I can add custom block to layout using php in Magento 2

texts:
I have created a custom block, as I want to add this layout to my current layout.

Following is my block:

<referenceContainer name="sidebar.main">
        <block class="Vendor\ModuleName\Block\Frontend\Block" name="ucTntlZsQVjVytW4xjtfdypv9LTzRsFP" template="Vendor_ModuleName::myBlock.phtml"/>
    </referenceContainer>

I want to add this block to my current block for that I created following event:

  core_layout_render_element

Now how can I add this block to layout using PHP

Need Help!!


texts: Load Product Qty by sku in Magento 2 Controller

texts:
public function execute()
{
    // Product Colletion
    $collection = $this->_productCollectionFactory->create();
    $collection->addAttributeToSelect(['name', 'special_price', 'entity_id']);
    $productColl = [];
    foreach ($collection as $product) {
        // check simple products only
        if ($product->getTypeId() == 'simple') {

            $productX = $this->_productRepository->get($product->getSku());
            $stockItem = $productX->getExtensionAttributes()->getStockItem();
            $qty = $stockItem->getQty();
            print_r($qty);

            $sku = $product->getSku();
            // code for Qty

        }
    }
}

How to get product Qty using SKU In Controller


texts:
I am trying to get a report about the total sales for a specific product.

More specific, I get the total sold items for this product but I want to get the total revenue too. However, I observe that the final price of product could be change because sometimes the product has been sold with sale price.

How can I get the total revenue of a product based on completed orders?
or how can I get the average price which has been sold a product?


texts: How do you get attributes from multiple groups?

texts:
I hope somebody can help with this, i need a way of getting all the attributes from multiple groups and sets. I have accomplished getting the attributes from a single group.

public function getRoomDetails()
    {
        $cache = Mage::app()->getCache();

        $attributeSetId     = Mage::getModel('eav/entity_attribute_set')
            ->getCollection()
            ->addFieldToFilter('attribute_set_name', 'Room')
            ->getFirstItem()
            ->getAttributeSetId();

        $temp = $cache->load ('room-details-'.$attributeSetId);
        if($temp === false) {
            $eavcollection = Mage::getModel('eav/entity_attribute_group')->getCollection();
            $eavcollection->addFieldToFilter('attribute_set_id',array('eq'=>$attributeSetId));

            $propertydetails = $eavcollection
                ->addFieldToFilter('attribute_group_name', array('eq' => 'Features'))
                ->getFirstItem()->getId();
            $cache->save(serialize ($propertydetails),'room-details',array(),3600);
            return $propertydetails;
        }else
        {
            return unserialize ($temp);
        }
    }

But i need to get attributes from another group and another set.


texts: Magento 2.3.4 Custom Module Backend Admin fileUploader (MIME Type) Strict check is enable

texts:
I've created a custom module for MG2.2.2 and add file uploader the same as the product file uploader functionality.

I've now installed on 2.3.4 and there is an error when I load the form:

Refused to execute script from '<URL>' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

Further look I've found out that the file: vendor/magento/module-backend/view/adminhtml/templates/media/uploader.phtml contains extra Key pair value in data-mage-init

which is "isResizeEnabled": <?= /* @noEscape */ $block->getImageUploadConfigData()->getIsResizeEnabled() ?>

When comparing with the 2.2.2 file it doesn't have it therefore removing it everything start working BUT I cannot remove from core files however I would like to work around it, does anyone knows or have faced this issue that can give some guide to a fix.?


texts: Magento 2 app/code and app/design difference

texts:
I'm curious what should be the proper way of using these two folders. Normally when I create my own module. I include everything (php, phtml, css, js, images) under my app/code module. Which somehow works and easy to navigate into.

But I have a feeling I'm misusing this. Can someone enlighten me? Can't find anything from the documentation discussing how this two directories should be treated.

Thanks!


texts: magento2 Mysql count number customers who ordered more then once in a specific date range

texts:
I have a Magento 2.2.5 based website and I want to get a list of emails of customers who have made more than 2 orders within a specific date range.

I know I can do the below MySQL query to list number times ordered and how many customers. not sure how to maybe alter this MySQL query.

SELECT num_orders AS OrderCount, count(customer_id) as CustomerCount
FROM (
       SELECT
          COUNT(1) AS num_orders,
          sfo.customer_id
          FROM sales_order_grid AS sfo
          WHERE sfo.status='completed_on_sap' AND sfo.created_at BETWEEN '2018-01-01' AND '2018-12-25'
       GROUP BY sfo.customer_id
     ) AS T
GROUP BY num_orders
ORDER BY 1


texts: Configurable product will not redirect to product view page after click on add to cart

texts:
if a customer forgets to choose the product option of the configurable product on the product listing page and click "add to cart" it is redirecting you to the product view page with the message: "You need to choose options for your item."

I just want to show this message in a popup without redirecting on the product view page.

I found out the controller and makes the change, but it's not working as per expectations.

File: Add.php

File Path:

  \Magento\Checkout\Controller\Cart\Add

protected function goBack($backUrl = null, $product = null)
  {
    if (!$this->getRequest()->isAjax()) {
  //  return parent::_goBack($backUrl);?>
               <script type="text/javascript">
                                       require(['jquery', 'Magento_Ui/js/modal/alert'], function ($, alert) {
                    function callpopup() {
                        alert({
                            title: $.mage.__('Some title'),
                            content: $.mage.__('Some content'),
                            actions: {
                                always: function () {
                                }
                            }
                        });
                    }
                });
        </script>
  <?php  }

    $result = [];

    if ($backUrl || $backUrl = $this->getBackUrl()) {
        $result['backUrl'] = $backUrl;
    } else {
        if ($product && !$product->getIsSalable()) {
            $result['product'] = [
                'statusText' => __('Out of stock')
            ];
        }
    }

    $this->getResponse()->representJson(
        $this->_objectManager->get(\Magento\Framework\Json\Helper\Data::class)->jsonEncode($result)
    );
  }

1.it is still redirecting, even after I commented major line of the function.

2.it is throwing an error: "Uncaught ReferenceError: require is not defined".

Any help, suggestions or advice for any other way to achieve this functionality will be appreciated.


texts: Cant access magento connect after migrating to a new server

texts:
After migration of a magento 1.3 CE installaion to a new server, whenever Im trying to open magento connect manager, Im getting a page with the following message:

Fatal error: Class 'Exception' not found in /home/mysite/public_html/lib/Varien/Exception.php on line 29

The error page url looks like this:
http://[MYSITE.COM]/index.php/admin/extensions_local/index/key/[SOMEID]/

The site itself and the admin runs fine.


texts: Magento 2.2.8 upgrade - Problem with "Unable to unregister protocol phar" during compile

texts:
First, some background.  I have 6 Magento 2.2.x sites on a development server.  4 of the 6 upgraded just fine.  I used the same standard composer upgrade process on all of them.  They're on a single apache/php environment via virtualhosts so they all have the same resources.

On 2 of them, I get this error when trying to compile (edited to remove the domain):

  [Exception]
  Warning: stream_wrapper_unregister(): Unable to unregister protocol
  phar:// in [DOCUMENT ROOT PATH]/html/app/bootstrap.php on line 11

I can't seem to get any further information about where the issue actually is.  I've reset the files & database to pre-upgrade state and it compiles fine (one is 2.2.7, the other is 2.2.5) -- but if I repeat the upgrade, then it errors again.

Any information about how to troubleshoot further would be greatly appreciated.


texts:
Magento 2.2.6

The attribute 'color' had, for as long as I can remember, no "Is Default" value selected.

A few days ago, I add a new color to the color value. Upon saving, there is now a color value selected as "Is Default".

I try to un-check "Is Default", but there's no effect. Then I try to change the "Is Default" to the top color value and save. But the "Is Default" is still check for the value 'Yellow', which is at the bottom of the sort.

I had to add a new size value and the same thing happened, the last value for 'size' now shows "Is Default". Same behavior if I try to change the 'Is Default', will revert back to the last sorted value. Even if I change the sort, the 'Is Default' will always be the last value of the attribute.

Does anyone have any idea what may be causing this issue? I may be after the 2.2.6 upgrade, but I hadn't added a color or size in some time, so I'm not sure.

And my system.log shows nothing but a LOT of cron jobs.

EDIT: When no 'Size' is selected, the last value in the sorted order for size will show.

What ends up making this so annoying is the sizes are going to the product feed and I can't seem to get rid of it.


texts: I would like to add the SKU to the product name in "edit product" at the admin-side. Is this possible?


texts: How to add custom category rule tab in form in admin side in magento 2.3.5

texts: Hello Friends I want to add new tab in form for applying rule for specific category in magento 2.3.5.


texts: How to set GrandTotal in the magento 2.3 via controller?

texts: Kindly give me an example about how to set GrandTotal via the controller in magento 2.3. I am new to Magento.


texts: customer/session isLoggedIn() returns false

texts:
I was testing our site after working on a new feature and found that some pages showed the customer as not logged in even though it was. For example, the welcome message would show "Welcome to the Site!" instead of "Welcome [customer name]!". I hooked an observer to the controller_action_predispatch event and started printing the results for:

$session = Mage::getSingleton('customer/session');
echo $session ? 'set' : 'not set';
echo $session->isLoggedIn() ? 'logged in' : 'not logged in';

and I found that the session singleton is always set, but the isLoggedIn() method returns false in some of the pages in the site. I also found that it wasn't that the session had been closed, because if I returned to a different page, isLoggedIn() returned true again; I didn't have to log in again.

What could be causing this?

I have a custom module that creates a custom session object as well, but that has been working well for a while (it's in production). I don't know if that has anything to do with it. I realized that that session (mymodule/session) has sort of the same problem. I declared a protected variable inside the custom session class and defined getter and setter public methods to access it. At times the value is null even though the variable is never unset.

I can only think there's something wrong with the way Magento is handling sessions; one may be interferring with the other?


texts: Magento 1: how to use the DataFlow import view with a custom import?

texts:
So I have a custom module that imports entities from various sources (CSV, XML, API).

At the moment, it's working perfectly fine, however I would like to improve user experience with the module by making it use the Magento DataFlow Import view:

I know some 3rd party modules are using it so I'm wondering how can I do to use it ?

I didn't posted any code as I simply expect a good explanation on how this view works and how the data are being dealt between this view and the controller handling the data import (I assume that's how it works).


texts: Magento2 visual swatch won't change product image

texts:
Created a configurable product with 20 different colors in the configuration process. I added different images for each color variation but when switching from colors on the front-end the ajax script always loads the image of the first configuration.

Two examples of the ajax requests triggered after a swatch change:

  Request URL:http://domain.com/swatches/ajax/media/

Request data

product_id:553
attributes[kies_uw_kleur]:13
isAjax:true

response data:

{
"large":"http:\/\/domain.com\/pub\/media\/catalog\/product\/cache\/1\/image\/e9c3970ab036de70892d86c6d221abfe\/b\/e\/bed2-sneeuw_1.jpg",
"medium":"http:\/\/domain.com\/pub\/media\/catalog\/product\/cache\/1\/image\/700x560\/e9c3970ab036de70892d86c6d221abfe\/b\/e\/bed2-sneeuw_1.jpg",
"small":"http:\/\/domain.com\/pub\/media\/catalog\/product\/cache\/1\/thumbnail\/88x110\/beff4985b56e3afdbeabfc89641a4582\/b\/e\/bed2-sneeuw_1.jpg",
"gallery":{
    "1094": {"large":"http:\/\/domain.com\/pub\/media\/catalog\/product\/cache\/1\/image\/e9c3970ab036de70892d86c6d221abfe\/b\/e\/bed2-sneeuw_1.jpg",
             "medium":"http:\/\/domain.com\/pub\/media\/catalog\/product\/cache\/1\/image\/700x560\/e9c3970ab036de70892d86c6d221abfe\/b\/e\/bed2-sneeuw_1.jpg",
             "small":"http:\/\/domain.com\/pub\/media\/catalog\/product\/cache\/1\/thumbnail\/88x110\/beff4985b56e3afdbeabfc89641a4582\/b\/e\/bed2-sneeuw_1.jpg"
             }
         }
}

Request data

product_id:553
attributes[kies_uw_kleur]:23
isAjax:true

response data:

{
"large":"http:\/\/domain.com\/pub\/media\/catalog\/product\/cache\/1\/image\/e9c3970ab036de70892d86c6d221abfe\/b\/e\/bed2-sneeuw_1.jpg",
"medium":"http:\/\/domain.com\/pub\/media\/catalog\/product\/cache\/1\/image\/700x560\/e9c3970ab036de70892d86c6d221abfe\/b\/e\/bed2-sneeuw_1.jpg",
"small":"http:\/\/domain.com\/pub\/media\/catalog\/product\/cache\/1\/thumbnail\/88x110\/beff4985b56e3afdbeabfc89641a4582\/b\/e\/bed2-sneeuw_1.jpg",
"gallery":{
    "1094": {"large":"http:\/\/domain.com\/pub\/media\/catalog\/product\/cache\/1\/image\/e9c3970ab036de70892d86c6d221abfe\/b\/e\/bed2-sneeuw_1.jpg",
             "medium":"http:\/\/domain.com\/pub\/media\/catalog\/product\/cache\/1\/image\/700x560\/e9c3970ab036de70892d86c6d221abfe\/b\/e\/bed2-sneeuw_1.jpg",
             "small":"http:\/\/domain.com\/pub\/media\/catalog\/product\/cache\/1\/thumbnail\/88x110\/beff4985b56e3afdbeabfc89641a4582\/b\/e\/bed2-sneeuw_1.jpg"
             }
         }
}

So no matter the attributes id in the requested data the image of the first configured product is returned. All the different images are shown correctly in the backend.

Magento version: 2.0.5

Update:

Changing the settings of "Visible on Catalog Pages on Storefront" & "Used in Product Listing" in the color attribute fixed the bug... no matter the value of the two settings.


texts: getTableName not adding table prefix for custom module table only

texts:
We have a prefix in our Magento DB: prefix_
I am trying to get table name with prefix but it is not getting correct table name with prefix.
the code i m using is magento standard code but still not getting table name with prefix only for my custom table only. Rest is working fine.
I have install my custom module after install magento.
Here is the code how i am fetching table with prefix.
    <?php

namespace Vendor\Module\Plugin;

use Magento\Framework\App\ResourceConnection;
use Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory;
use Magento\Sales\Model\ResourceModel\Order\Invoice\Grid\Collection as SalesOrderInvoiceGridCollection;

class SalesInvoiceGridCollection {
    const SALES_ORDER_INVOICE_GRID_DATA_SOURCE = 'sales_order_invoice_grid_data_source';

    private $collection;

    public function __construct(SalesOrderInvoiceGridCollection $collection, ResourceConnection $resource) {
        $this->collection = $collection;
        $this->resource = $resource;
    }

    public function aroundGetReport(CollectionFactory $subject, \Closure $proceed, $requestName) {
        $result = $proceed($requestName);
        $connection = $this->resource->getConnection();
        $tableName = $connection->getTableName('my_custom_table');
        if (self::SALES_ORDER_INVOICE_GRID_DATA_SOURCE == $requestName) {
            if ($result instanceof $this->collection) {
                $select = $this->collection->getSelect();
                $select->joinLeft(
                    ["gstinv" => $tableName],
                    'main_table.entity_id = gstinv.invoice_id',
                    ['increment_id_with_prefix']
                );

                return $this->collection;
            }
        }

        return $result;
    }
}


texts: main.CRITICAL: Block order_create_billing_form throws exception and cannot be rendered. - Where is this logged?

texts:
Can anyone please enlighten me where I can find this exception logged?

  main.CRITICAL: Block order_create_billing_form throws exception and
  cannot be rendered. [] []

The context is a custom payment gateway, which works 100% in front.

But, when I try and use it from admin, placing order via admin, I get the noted error logged in system.log, and that is about it.

So, I am told there is an exception, but not what it is....

Any pointers appreciated.


texts: Magento 2: Successful oAuth/Integration Flow

texts:
Does anyone have or know of working PHP code to complete an oAuth API integration request flow?  I've gotten past the activation step, and my application has the following information

    [oauth_consumer_key] => x...0
    [oauth_consumer_secret] => j...l
    [store_base_url] => http://magento.example.com/
    [oauth_consumer_secret] => 5...n

According to the docs, I'm supposed to use this information to make an oAuth request to

/oauth/token/request

for a temporary request token, and then use that temporary request token to fetch a longer term access token from

/oauth/token/access

and this longer term access token can be used to make API requests.

Or -- so I assume.  The docs are a bit cryptic on this.

For example, this section makes mention of the parameters to use for the request to /oauth/token/request, but doesn't provide what the oAuth version should be, nor how the oauth_signature parameter should be generated.   It's also a little confusing when talking about the values you need to send once you have your tokens -- as I'd expect to see a secret in there.

Finally, the checklogin.php code from dev docs makes use of two classes, OAuth\Common\Consumer\Credentials and OauthClient.

$credentials = new \OAuth\Common\Consumer\Credentials($consumerKey, $consumerSecret, $magentoBaseUrl);
$oAuthClient = new OauthClient($credentials);

The first seems to be part of the lusitanian/oauth composer package, which is easy enough to use.  However -- the OauthClient seems to be part of Magento's API testing framework, which makes it not trivial or  obvious how to use it.

I know I can also use my admin username or customer session as API credentials.  I'm specifically interested in API Integrations.


texts:
I am creating a custom checkout step in Magento to allow customers to pick a delivery date based on their postcode,

I have already created the extra step, but I want to be able to pass the postcode that the customer enters from step 1 to step 2 so I can then give a shipping date option based on the customer's postcode,

just wondered what's the best way to pass the data from step 1 to step 2 $_post $_session? cookie?


texts: Pincode based shipment restriction for each product

texts:
Help me to set the pin code based shipping for each product.

Example:

Product A - shipment available in xxx pin code
but Product B - shipment not available in xxx pin code.

Suppose user add both the product A & B then user place the order the product B automatically remove or alert the shipment unavailable product.

How to set the above requirement?


texts: Magento 2: Web Setup Wizard error Setup 401 Unauthorized Access

texts:
My Magento version is 2.2.3

When i open web setup wizard from admin

It gives error like

  Welcome to Magento Admin, your online store headquarters. To use the
  Magento setup wizard sign into your Admin account and navigate to
  System => Tools => Web Setup Wizard

http://prntscr.com/johlaz

ill try all the solution but not getting success.


texts: 1.9 - Fatal error: Call to a member function on boolean

texts:
I've created a custom module for SSO with Discourse.

Exact error:

  Fatal error: Call to a member function setSecret() on boolean in /home/website/public_html/app/design/frontend/theme/path/template/custompages/sso.phtml on line 9

I'm using the following template sso.phtml:

<?php

$sso = Mage::app()->getLayout()->createBlock('namespace/ssohelper');

$secret = "secret_phrase";
$sso->setSecret($secret);

// load payload
$payload = $_GET['sso'];
$signature = $_GET['sig'];

// validate payload
if(!($sso->validatePayload($payload,$signature))) {
  // invalid, Deny
  header("HTTPS/1.1 403 Forbidden");
  echo("Bad SSO request");
  die();
}

$nonce = $sso->getNonce($payload);

$loggedIn = Mage::getSingleton('customer/session')->isLoggedIn();
 if($loggedIn) {
  $sess = Mage::getSingleton('customer/session');
  $username = $sess->getCustomer()->getUsername();
  $email = $sess->getCustomer()->getEmail();
  $external_id = $sess->getCustomer()->getId();

  $extraParameters = array(
     'username' => $username,
     'name' => $username,
    'avatar_url' => $avatar
   );
}

// build query string and redirect back to forum
$query = $sso->getSignInString($nonce, $external_id, $email, $extraParameters);
header('Location: https://forum.website.come/session/sso_login?' . $query);
exit(0);

My config.xml:

<?xml version="1.0"?>

<config>
    <modules>
        <Namespace_SsoHelper>
            <version>0.1.1</version>
        </Namespace_SsoHelper>
    </modules>
    <global>
      <blocks>
        <ssohelper>
            <class>Namespace_SsoHelper_Block</class>
        </ssohelper>
      </blocks>
    </global>

  </config>

My SsoHelper.php with Block:

<?php

use Namespace\SsoHelper\Exception\PayloadException;

class Namespace_SsoHelper_Block_SsoHelper extends Mage_Core_Block_Template
{
  public function __construct(){
    parent::__construct();
    # getting default settings
  }

private $secret;

public function setSecret($secret)
{
    $this->secret = $secret;

    return $this;
}

/**
 * @param $payload
 * @param $signature
 * @return mixed
 */
public function validatePayload($payload, $signature)
{
    $payload = urldecode($payload);

    return $this->signPayload($payload) === $signature;
}

/**
 * @param $payload
 * @return mixed
 * @throws PayloadException
 */
public function getNonce($payload)
{
    $payload = urldecode($payload);
    $query = array();
    parse_str(base64_decode($payload), $query);
    if (!array_key_exists('nonce', $query)) {
        throw new PayloadException('Nonce not found in payload');
    }

    return $query['nonce'];
}

/**
 * @param $payload
 * @return mixed
 * @throws PayloadException
 */
public function getReturnSSOURL($payload)
{
    $payload = urldecode($payload);
    $query = array();
    parse_str(base64_decode($payload), $query);
    if (!array_key_exists('return_sso_url', $query)) {
        throw new PayloadException('Return SSO URL not found in payload');
    }

    return $query['return_sso_url'];
}

/**
 * @param $nonce
 * @param $external_id
 * @param $email
 * @param array $extraParameters
 * @return string
 */
public function getSignInString($nonce, $external_id, $email, $extraParameters = [])
{

    $parameters = array(
            'nonce'       => $nonce,
            'external_id' => $external_id,
            'email'       => $email,
        ) + $extraParameters;

    $payload = base64_encode(http_build_query($parameters));

    $data = array(
        'sso' => $payload,
        'sig' => $this->signPayload($payload),
    );

    return http_build_query($data);
}

/**
 * @param $payload
 * @return string
 */
    protected function signPayload($payload)
    {
        return hash_hmac('sha256', $payload, $this->secret);
    }
}

This is my first time creating a custom module using a Block class.


texts: My product images are 500px but eBay export still complains image is <500px

texts:
I've done A Horrible Thing and bulk resized all images less that 500px up to a minimum of 500px by doing this:

find -type d \( -path ./cache -o -path ./placeholder \) -prune -o  -type f -regextype posix-egrep -iregex '.*\.(jpg|gif|tif)$' -exec identify {} \; | awk '{ split($3, wh, /x/); } wh[1] < 500 && wh[2] < 500 { print $1; }'  | while read i; do convert $i -resize 500 -quality 90 $i ; done

I've then deleted the 100x100 resized images with:

find ./ -name "resized*" -exec rm {} \;

That worked perfectly on the filesystem.
I delete the Magento image cache (confirmed at filesystem level)

Unfortunately when I try running M2EPro to revise the eBay listings, it receives an error back that the image is < 500px.

If I take the raw image and re-save it using the Magento Admin it will be accepted and revised correctly without error.

My question is does Magento somehow store or cache the image dimensions somewhere on upload? How can I flush or get Magento to recalculate this for all images?


texts: Magento 1.9.3 CE : Custom page layout for products from specific category

texts:
I have a web shop with 4 different categories and I need all the products from 2 categories to be opened in custom page layout!

For example:

All the products from category 1 and 2 to be opened with (template/page/custom-view-one.phtml).

And, all the products from category 3 and 4 to be opened with (template/page/custom-view-two.phtml).


texts: Displaying total number of products sold in frontend

texts:
Hello I am trying to display the total number of products sold in magento frontend to be precise in the header section.

$from ='2014-07-07';
$to =date('Y-m-d',time());
$_productCollection = Mage::getResourceModel('reports/product_collection')->addOrderedQty($from, $to, true)
 ->addAttributeToFilter('sku', 'Sample Product')->setOrder('ordered_qty', 'desc');
   echo "<pre>";
   print_R($_productCollection->getData());
   exit;

This is the code that I am using in the phtml file and calling it from a static block in magento admin panel however nothing is appearing.
The outcome I would like to achieve is:

If anyone would be able to help me I can provide more information.
Thank you


texts: Catalog Listing Widget - We're sorry, an error has occurred while generating this content

texts:
When I want to use the Catalog Listing Widget I get the following message on the front page:  "We're sorry, an error has occurred while generating this content."
Can anybody help me out with this problem?

This is the code which was created by Magento. I'm using the community edition 2.1.14

{{widget type="Magento\CatalogWidget\Block\Product\ProductsList" title="f" show_pager="0" products_count="10" template="product/widget/content/grid.phtml" conditions_encoded="a:2:[i:1;a:4:[s:4:`type`;s:50:`Magento|CatalogWidget|Model|Rule|Condition|Combine`;s:10:`aggregator`;s:3:`all`;s:5:`value`;s:1:`1`;s:9:`new_child`;s:0:``;]s:4:`1--1`;a:4:[s:4:`type`;s:50:`Magento|CatalogWidget|Model|Rule|Condition|Product`;s:9:`attribute`;s:12:`category_ids`;s:8:`operator`;s:2:`==`;s:5:`value`;s:2:`45`;]]"}}

Thanks in Advance


texts: Magento 2.4.1: Class Magento\PageCache\Observer\SwitchPageCacheOnMaintenance does not exist

texts: While running php bin/magento maintenance:enable after upgrading Magento to 2.4.1, I find the error message Class Magento\PageCache\Observer\SwitchPageCacheOnMaintenance does not exist How to fix this?


texts:
when changing anything in the xml of the checkout cart index.xml file, the price next to the freight stops appearing in magento 2.3.5. I'm trying to organize the layout of the content but in any case the price of freight simply disappears when changing anything. Has anyone had this problem?
I tried to replace the Magento_checkout folder in: vendor / magento / module-checkout / view / frontend / layout / checkout_cart_index.html, for: app / design / frontent /  /  / Magento_Checkout / layout / checkout_cart_index. html, But even so when trying to edit the checkout_cart_index file, the value that is next to the freight disappears. I do not know what to do :/ . Help me please is urgent.


texts: Need to Add Custom Button and Related action in System->Config->Custom section as field

texts:
I am Adding Custom Section in System->Config Tab.

I need to add Button as Field and its related action which I need to perform. But I cannot find on google for button all example provide other field option but hard to get button example.

Other Section Working fine but I am not able to add button and related action (filepath) which call on click.

<fields>
  <goldprice translate="label">
    <label>GoldPrice</label>
    <frontend_type>text</frontend_type>
    <sort_order>0</sort_order>
    <show_in_default>1</show_in_default>
    <show_in_website>1</show_in_website>
    <show_in_store>1</show_in_store>
    <comment>Gold Price per 1gm</comment>
  </goldprice>
  <run translate="label">
    <frontend_type>button</frontend_type>
    <frontend_model>/adminhtml_system_config_customfield</frontend_model>
    <sort_order>30</sort_order>
    <show_in_default>1</show_in_default>
    <show_in_website>1</show_in_website>
    <show_in_store>1</show_in_store>
  </run>
</fields>

My Config File Like Below

<?xml version="1.0"?>
<config>
  <modules>
    <LetsNurture_CustomGrid>
      <version>0.1.0</version>
    </LetsNurture_CustomGrid>
  </modules>
  <global>
    <blocks>
      <customgrid>
        <class>LetsNurture_CustomGrid_Block</class>
      </customgrid>
    </blocks>
    <models>
      <class>LetsNurture_CustomGrid_Model</class>
    </models>
    <helpers>
      <customgrid>
        <class>LetsNurture_CustomGrid_Helper</class>
      </customgrid>
    </helpers>
    <events>
      <admin_system_config_changed_section_gold> <!-- identifier of the event we want to catch -->
        <observers>
          <customgrid>
            <type>model</type>
            <class>LetsNurture_CustomGrid_Model_Observer</class>
            <method>UpdatePrice</method>
          </customgrid>
        </observers>
      </admin_system_config_changed_section_gold>
    </events>
  </global>
</config>

And Customfiled.php like below

class LetsNurture_CustomGrid_Block_Adminhtml_System_Config_Customfield extends Mage_Adminhtml_Block_System_Config_Form_Field
{
    protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
    {
        $url = $this->getUrl('catalog/product'); //

        $html = $this->getLayout()->createBlock('adminhtml/widget_button')
                    ->setType('button')
                    ->setClass('scalable')
                    ->setLabel('Run Now !')
                    ->setOnClick("setLocation('$url')")
                    ->toHtml();

        return $html;
    }
}

But it gives me Warning like this "failed to open stream: No such file or directory"

Thanks,
Yogesh


texts:
As I know, google accept only one sitemap.
So we have a multi store like:

https://www.outdoorequipped.com/ <- entry page
https://www.outdoorequipped.com/active/
https://www.outdoorequipped.com/outdoor/
https://www.outdoorequipped.com/fashion/
https://www.outdoorequipped.com/work/

How do I set up or create a correct sitemap?


texts:
I need to redirect the whole website to a specific url
i.e to

 domain.com/customer/account/create.

using htaccess?
How I can do that. I tried the following stuff it it show redirection loop

    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule !^/?(customer/account/create|.*\.css|.*\.js)$   http://local.com/customer/account/create [R=302,L]

    RewriteRule ^([A-Za-z0-9]+)$ $1.php
    RewriteRule ^home\.php$ index.php
    RewriteRule ^home$ index.php


texts:
getting the following error when compiling

MiBPHP Fatal error:  Cannot redeclare class Less_Version in /home/public_html/app/code/Plazathemes/Layout/Block/lib/Less/Version.php on line 9

Version.php code

<?php

/**
 * Release numbers
 *
 * @package Less
 * @subpackage version
 */
class Less_Version{

        const version = '1.7.0.10';                     // The current build number of less.php
        const less_version = '1.7.0';           // The less.js version that this build should be compatible with
        const cache_version = '170';            // The parser cache version

}

I am using PHP 5.6.11-1ubuntu3.4 on Ubuntu 15.10

Currently running Magento 2.1


texts: What is the proper way to remove madisonisland.css?

texts:
The new Madison Island theme for Magento CE 1.9/EE 1.14 comes with several theme specific CSS files, madisonisland.css and madisonisland-ie8.css.

According to the Magento documentation (http://www.magentocommerce.com/knowledge-base/entry/ee114-ce19-rwd-dev-guide#remove-sample-content ) the way to do this would be via local.xml with the following code:

<layout version="0.1.0">
<default>
    <reference name="head">
        <action method="removeItem"><type>skin_css</type><name>css/madisonisland.css</name></action>
        <action method="removeItem"><type>skin_css</type><name>css/madisonisland-ie8.css</name></action>
    </reference>
</default>
</layout>

However, when testing this it does not remove the two CSS files as they both still load on the frontend (and yes of course the caches have been cleared).  I assume that the reason they are not removed is because they are coded into head.phtml.

<link rel="stylesheet" type="text/css" href="<?php echo $this->getSkinUrl('css/madisonisland.css'); ?>" media="all" />

Instead of being loaded via: <?php echo $this->getCssJsHtml() ?>
Is that correct?

Of course they can be easily removed by copying head.phtml to custom_package/custom_theme/template/page/html/ and removing those lines from the template file itself but is this the best method or should there be an alternative XML way to do this?


texts: Magento 2 & Angular & RequireJS: Firing angular.bootstrap with injected controllers etc

texts:
I am looking at implementing angular into the Magento 2 layout structure using requirejs and for individual page dependencies to be injected where required (which requirejs handles very well). The issue is that these dependencies will need to be included before the angular.bootstrap call, and I need some way of loading this after the dependencies have loaded without knowing which.

What I think I need is some kind of callback or event that triggers once all requirejs modules have been loaded, but I can't see that this exists in the documentation?

Example: Product Page

Load js/dependency/angular.js

Load js/app.js:

define(['angular'], function(angular)
{
    var testApp = angular.module('testApp', []);
    return testApp;
});

Load js/controller/product.js

define(['testApp','angular'], function(testApp, angular)
{
    testApp.controller('ProductController', ['$scope', function($scope)
    {
        $scope.product = [...]
    }]);
});

All the above makes sense, and the ProductController could have a dependency added for an angular directive which handles the tabs, or the product image gallery or anything at all, which is all taken care of by requirejs.

The issue is that the above will change depending on the page loaded, so how would I get requirejs to know that all the required resources for this particular page have loaded and only then bootstrap the app?

Load js/app/bootstrap.js

define(['angular'], function(angular)
{
    angular.element(function()
    {
        angular.bootstrap(document, ['testApp']);
    });
});


texts: Can I check if people are viewing/using my Magento store instantly?

texts: I realise I can use Google Analytics to check this retrospectively, but it would be great if I could instantly see how many people are visiting our Magento store at any given moment, and ideally the page/product they are viewing.  Our old osCommerce site had this in the tools menu, and it was very interesting as well as useful, especially if we were about to take the site offline for a few minutes. Not sure if it matters, but we are using the Ultimo theme.  Any advice gratefully received!


texts: Magento 2 - Transactional email templates

texts:
How I can get Sales Representative Contact Email in a transactional email templates?

I try to add something like this but the href is not display:

    {{trans
        "If you have any questions please feel free to contact us at ' {{config path="trans_email/ident_sales/email"}} ', by phone."
}}

Maybe is something wrong in my code?

Thank you


texts: How to disable search by SKU (for specific store)?

texts:
For a specific store i want an remove search results, if search query matches our SKU pattern.

disable "searchable" in attribute config is no solution
rewrite core files is not wanted

So, what i need is an event which let me manipulate the search query or product collection for search result page.

I tried following events.

catalogsearch_searchable_attributes_load_after ... not triggered
catalogsearch_query(_load_before/after) ... also not triggered
and some others ... ;)

... but without success.

Working solutions so far ... using catalog_product_collection_load_before with following observer:

public function test(Varien_Event_Observer $observer)
{
    // some logic for check current store
    // ...

    $action = Mage::app()->getFrontController()->getAction()->getFullActionName();
    if ($action === 'catalogsearch_result_index') {
        $query = Mage::app()->getRequest()->getParam('q');
        if (preg_match("/my regex/", $query)) {
            // force empty collection with invalid entity_id
            $observer->getCollection()->addFieldToFilter('entity_id', false);
        }
    }
}

.but this looks like an ugly hack to me and shouldn't be final.

Hope you have some better approaches - maybe an more suitable event, that's no triggered for every product collection?

Update 1:

Regex check isn't really good, because partial search still works.

Preferred solution would be to disable SKU from searchable fields without disbale it globally from attribute configuration.

Update 2:

Instead of using regex i switched over to this, because it seems more correct if sku pattern is part of name/description/... and sould be searchable:

$observer->getCollection()->addFieldToFilter('sku', array('nlike' => "%{$query}%"));


texts: Adding products to cart programmatically, sets item's price to zero. First time Only

texts:
Certain products I have in my store have an attribute called setup_fee_sku.

If the product has this attribute I grab the value (which is a sku)  load it, and add it to the cart programatically.

But the price is always set to 0 the first time its added, no matter what kind of sku it is.

After the item is in the cart for the first time, any other time it is added it contains the correct price.

I am doing my logic in an observer for event  checkout_cart_add_product_complete

This is what my codes looks like

$setupSku = $product->getSetupFeeSku();
//Add setup fee to cart if it exists
if($setupSku != null){
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $setupProduct = $objectManager->create('Magento\Catalog\Api\ProductRepositoryInterface')->get($setupSku);
    $formKey = $objectManager->create('\Magento\Framework\Data\Form\FormKey')->getFormKey();

    $params = array(
        'formKey' => $formKey,
        'product' => $setupProduct->getId(),
        'qty' => 100
    );

    $this->cart->addProduct($setupProduct, $params);
    $this->cart->save();
}


texts: any live examples of ecommerce for fast food restaurants developed in Magento

texts:
Are there any live examples of the websites in the fast food industry which are developed in Magento ? I am looking forward to search the websites but i didn't find any website in fast food industry in any country which are developed in Magento. Secondly i have also noticed that the modern fast food industry require different business processes (i-e you have to select store and type of service like self collect or delivery before you add item to the cart etc or have to restrict adding item to the cart after the store operational hours) which out of the box are not supported in Magento.
So any live examples of the fast food restaurants in Magento will be highly appreciated.


texts: Magento 2 Send email after order is canceled

texts:
I searched the internet and founded nothing.

I need to send an email to customer when the order is canceled. I've founded the trigger order_cancel_after when the order is canceled, but that' all i founded.


texts: Doubt about attributes (getting the brand)

texts:
I am a little confused about attributes whether they are simple eav attributes or not.

I dont fully understand when an attribute has option or option value. How can i check it?

So, for example in this case i am trying to obtain the brand name so i did this query:

SELECT main.sku, option_value_ez_catalog_product_brand.value AS ez_catalog_product_brand, code_status.value AS code_status
LEFT JOIN eav_attribute attribute_code_status ON attribute_code_status.attribute_code = 'status' and attribute_code_status.entity_type_id = 4
LEFT JOIN eav_attribute attribute_ez_catalog_product_brand ON attribute_ez_catalog_product_brand.attribute_code = 'ez_catalog_product_brand' and attribute_code_status.entity_type_id = 4

LEFT JOIN catalog_product_entity_int code_status ON main.entity_id = code_status.entity_id and code_status.attribute_id = attribute_code_status.attribute_id
LEFT JOIN catalog_product_entity_int ez_catalog_product_brand ON main.entity_id = ez_catalog_product_brand.entity_id and ez_catalog_product_brand.attribute_id = attribute_ez_catalog_product_brand.attribute_id
LEFT JOIN eav_attribute_option option_ez_catalog_product_brand on option_ez_catalog_product_brand.attribute_id = ez_catalog_product_brand.attribute_id and option_ez_catalog_product_brand.option_id = ez_catalog_product_brand.value
LEFT JOIN eav_attribute_option_value option_value_ez_catalog_product_brand on option_ez_catalog_product_brand.option_id = option_value_ez_catalog_product_brand.option_id

Is that okay? How can i know if an attribute is simple or not?

What about other attributes like : manufacturer, volume, description, prices and so on?

Could you please help me?


texts: Responsive Theme for Magento Admin Panel

texts:
I am new to Magento. I wanted to know if it is possible to create a responsive theme for Magento Admin Panel. To be clear I am not asking responsive theme for the Store Front. I know there are plenty of those available out there. I need a responsive theme for the Backend admin panel. Is it possible to create such theme? Are there any such base theme (paid or free) available out there which I can use as a starting point for customization?

Thanks for your help.


texts: Magento 2: Override di.xml in custom theme

texts:
I have a module in vendor/company/module. I have created the following folder to override files.
/vendor/theme/theme-frontend-default/Company_Module.

I am able to override files in view folder but I also want to override model and maybe di.xml if required. Creating di.xml in /vendor/theme/theme-frontend-default/Company_Module/etc/frontend/di.xml does not override. Is there a different way to override di.xml or models?


texts:
I added below code my list.phtml on change it will show the div. First product it's working fine. if i change 2st product 1st product value only change

<Select id="colorselector-<?php echo $_product->getId()?>">
                           <option value="red">Red</option>
                           <option value="yellow">Yellow</option>
                           <option value="blue">Blue</option>
                        </Select>

 red...

 yellow..

 blue..


texts: How to list attributes for all SKUs in the system? My code only shows half products

texts:
I am running code below to list out custom options for each product in the system.  If I run code below as is I get about half SKUs in the system. However, if I comment out the line between "fetch...end fetch" then I get a list of products (of course without custom store attribute.)

I need custom options for the entire product list. We are running Magento 1.4.

<?php
    require_once('../app/Mage.php');
    umask(0);
    set_time_limit(0);
    Mage::app('default');
    Mage::app ()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
    $productModel = Mage::getModel('catalog/product');
    $productCollection = $productModel->getCollection();
    $count = 1;

    foreach($productCollection as $_product)
    {
        //fetch & display attributes
        $product = Mage::getModel('catalog/product')->load($_product->getEntityId());
        $custom_option_store_array = $product->getAttributeText('custom_option_store');

        if (is_array($custom_option_store_array)) {
            $custom_option_store = implode(',',$custom_option_store_array);
        } else {
            $custom_option_store = $custom_option_store_array;
        }

        echo $count.' Sku '.$_product->getSku().' custom_option_store : '.$custom_option_store;
        echo "
";
        // end fetch and display.
        echo $count.' Sku '.$_product->getSku();
        echo "
";
        $count++;
    }
?>


texts: I want to filter the products, listed on a particular category page by an attribute value

texts:
I want to filter the product collection on a category page by the user_id of the current user. I have created an attribute 'user_id' which is linked to the product when it is created with the current id of the user(here products are created by the user). I have created a category 'User Products' also when directed to userproducts.html all the products are shown, I want to filter it by user_id of the current user.

Edit 1.
I tried overriding catalog_category_view in my module as suggested by @MohitRane but it is not loading from my module. This is the screenshot


texts: how to override list.phtml for custom theme in Magento 2

texts:
I have been trying to override

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

in my custom theme but with no success.

What I've tried: copied list from above and paste/modified in

  app/design/frontend/myvendorfolder/mythemefolder/Magento_Catalog/templates/list.phtml

After that i run php bin/magento cache:clean and

  rm -r pub/static/frontend/

  var/view_preprocessed/

  var/cache/

  var/page_cache/

clear my browser cache but it didn't work.

Is this the right way to do it? I have successfully modified Magento_Contact form exactly the same way.

can anyone help please?

thank's in advance.


texts: How to remove the theme from a cms page?

texts: I am trying to create a cms page that only includes the header and the footer. The rest of the content in the middle I code. Right now there are a bunch of divs that have a width limitation being put in there by the theme. I would like to remove them. Whether it is the div that is removed or the class I am ok with. I have tried to see what I can do with layout xml but that seems to only let me remove blocks.


texts:
Does anyone know what table or tables to clean when testing setup script?

I don't want to add an upgrade script, this is only for testing purposes.

Thanks!


texts: Magento 2 - Order # 000000094 (The order confirmation email is not sent) - Order Placed Successfully but confirmation email is not sent

texts:
I am facing this issue many times. when i place any order from front-end side,  the order placing successfully and it's show order number. but when i check this order on my back-end admin it show this (The order confirmation email is not sent) message.  and nothing on my mail box. i send this order mail manually pressing "send email"  button.

Other mails are working fine(REGISTRATION,SUBSCRIPTIONS AND OTHER ORDER STATUS MAIL ) and as a time. but just only order confirmation email is not working.

is that any setting from back-end to solved this issue?


texts: Stock Availbility not changing after cancel order Magento 1.9

texts: Stock Availability not changing after cancel order, qty is updating but availability status not changing.


texts: Magento 2 API Product Search Option Attributes

texts:
I'd like to be able to search products via the API but in my experiments so far I've found that if I am searching for a value of an option attribute (e.g. drop-down list) then I have to specify the ID of the option value. If I search by the text of the option then no records are returned. For example:

searchCriteria[filter_groups][0][filters][0][field]=size&
searchCriteria[filter_groups][0][filters][0][value]=S&
searchCriteria[filter_groups][0][filters][0][condition_type]=eq

Returns no results whereas:

searchCriteria[filter_groups][0][filters][0][field]=size&
searchCriteria[filter_groups][0][filters][0][value]=177&
searchCriteria[filter_groups][0][filters][0][condition_type]=eq

Does return results. Here 177 is the ID of the option value for size 'S' in the sample data set.

I'd rather that my API clients didn't have to know the IDs of option values in order to formulate queries so is there a way to search on the text of an option attribute?


texts: The proper way to move the sections/navigation block inside Magento 2 header block

texts:
I'm attempting to move the entire navigation block within the page-header div inside Mage 2. I haven't found much documentation on specific block names so I have been guessing how to call each block. Below is what I have attempted.

<move element="catalog.topnav" destination="top.links"/>

This moves the navigation links but leaves the section div. It also adds the element within top links which not what I'm trying to achieve. Using page.header as the destination fails to do anything.


texts:
Is it possible to force a customer to change their password on next sign in?

Just to be clear, I don't mean sending them an email to reset it - rather when they log in they are prompted to do so.


texts: How can I update values in database table using an upgrade script?

texts:
I am trying to UPDATE values inside of the directory_country table using a data-upgrade script but hit a brick wall with the syntax for updating a table using this method as I am trying to avoid using direct SQL.

Here's what I have so far but it doesn't work at the moment:

<?php
$installer = $this;
$installer->startSetup();

$installer->run("
UPDATE `{$installer->getTable('directory_country')}` SET (`country_id`, `iso2_code`, `iso3_code`, `restriction_set`) WHERE
('GG', 'GG', 'GGY', '0'),('AD', 'AD', 'ADY', '7'),('AI', 'AI', 'AIA', '7'),('AG', 'AG', 'ATG', '7');
");

$installer->endSetup();

Could anyone suggest the best way to do this  please?


texts:
When upgrading from M2.3.5 (empty) to M2/4 what is the best way to go?
We are 'already' on php 7.4.x Centos8 with Elastic and Redis/
Route 1 would be to ignore all that we have and run the following?
rm composer.lock
rm -rf vendor/*
wget https://github.com/magento/magento2/blob/2.4/composer.json
composer update --ignore-platform-reqs

I use --ignore-platform-reqs if you are already on php 7.4 with some code that still needs 7.3 and can jam the complete upgrade.
Although it looks like the default composer.json via https://github.com/magento/magento2/blob/2.4/composer.json is different from https://github.com/magento/magento2/blob/2.4-develop/composer.json?
In addition there are a lot of items in the "replace" clause, what to add what to take over? I am getting a little lost upgrading up and up coming from 2.2. What is the best "require" and "replace" clause for M2.4 and M2.4.1. in some weeks?
Route 2 would be to run the above, but add my configured repositories and extension to composer.json before running composer update
Route 3 would be to use the following sequence
composer require magento/composer-root-update-plugin=~1.0 --no-update
composer update
cp composer.json composer.json.bak
composer remove magento/product-community-edition --no-update
composer require magento/product-community-edition=2.4.0 --no-update
composer update --ignore-platform-reqs

This sequence is giving numerous dependency issues and just does not work.
So my question is: How do I upgrade to Magento 2.4 - assuming I have a basic M2.3.5 installation with only some url config to work - and have all the composer goodie goodies so it is lean mean and fast but with all the basics to make it work
thx


texts: How to configure Magento 2 Theme/Design via the Command-Line?

texts:
I'm doing some server configuration related tasks and was looking for a way to configure the theme of a store/website via the command-line.

I'm setting up a store with a custom theme (e.g. "Vendor/code") and I would like to activate it without entering the adminhtml website but set the theme on the command-line / in the shell / bash script.


texts: magento 2 add owl carousel to recently viewed products

texts:
I am trying to add owl carousel to recently viewed products in product detail page by making custom theme and creating viewed_grid.phtml in

app/design/frontend/_YOUR_VENDOR_/YOUR_THEME/Magento_Reports/view/frontend/templates/widget/viewed/content and requirejs.config.js

in

app/design/frontend/_YOUR_VENDOR_/YOUR_THEME/Magento_Reports .

But still I am not able to get slider.


texts: I would like to add custom css to shopping cart page. Where can I place the custom less file and where can I add the link to that file?


texts: How to make the product info column wider without changing image position?

texts:
In Blank theme product pages the product-info-main class has the value width:43%. If this value is set to any number greater than 43, the product image moves to the bottom of the page.
I've tried changing the size image in the file mytheme/etc/view.xml but does not work. Even when I set the image size to 20px, it goes to the bottom of the page.


texts:
is there any magento2 frontend customer login two step Authentication available modules or extensions. If there please share.

like gmail login using security code (get Sms)

How we implement in magento2 customer login

can anyone please help me.


texts: Importing customer with names in Japanese - Required attribute 'firstname' has an empty value for all rows

texts:
I am trying to Import customers with their names in Japanese(katakana). It shows following error in validation results (On linux machine)

Required attribute 'firstname' has an empty value in rows: 1,2,3,and so on

The values are there in the column for firstname, but still it says empty value. If I enter English characters instead of Japanese, it accepts and does not show any error.

If I do the same thing on Windows OS, same file with Japanese characters works perfectly.

Not sure, if its a Magento's bug or I need to do something differently?

If anyone has a solution or any suggestion, please let me know

File format is .csv, Encoding utf-8

The contents of the file are:

email,_website,_store,firstname,lastname,password_hash,created_in,store_id,group_id,website_id,prefix,middlename,suffix,dob,taxvat,confirmation,gender,created_at,rp_token,rp_token_created_at,disable_auto_group_change,password,_address_firstname,_address_lastname,_address_country_id,_address_region,_address_postcode,_address_city,_address_street,_address_telephone,_address_fax,_address_company,_address_prefix,_address_middlename,_address_suffix,_address_vat_id,_address_default_billing_,_address_default_shipping_
john.doe@example.com,base,default,金魚,金魚,2049484a4020ed15d0e4238db22977d5:eg,,1,1,1,,,,,,,,"2007-08-31 00:23:13",,,0,,,,,,,,,,,,,,,,,


texts: Finding and changing text under logo 1.9 ce

texts:
I have existing text under my logo in magento im having trouble finding where to edit this, under the source code its showing the text is under div class="header_content".

I tried looking in the backend but the logo img alt and welcome message does not match what my current text is. If anyone can point me in the right direction to edit this, Thanks!


texts: In magento quick search the exact product match is displaying in third page and ordering by product title

texts: Suppose I'm searching product using 'Celebrating Silence' which pulls all product whose description, search keywords and product name contains the above phrase. But first I want to display the product whose product name is 'Celebrating Silence' exactly matching and then the other keyword matches. The actual product name 'Celebrating Silence' is showing in 5th page.


texts:
in our magento application we have somehow a 302 redirect from /customer/account into /connexion. I would like to change it into a 301 one. No idea how to process this.
This seems to be handled in a specific plugin
di.xml
<type name="Magento\Framework\Url">
    <plugin name="custom_login_url" type="Cpy\MyModule\Plugin\Framework\Url" disabled="false" />
</type>

Url.php
<?php

namespace Cpy\MyModule\Plugin\Framework;

class Url
{
    public function aroundGetUrl($subject, $callable, $routePath = null, $routeParams = null)
    {
        if($routePath == 'customer/account/login') {
            $routePath = 'connexion';
            $routeParams = null;
        }
        return $callable($routePath, $routeParams);
    }
}

Any ideas ?
EDIT :
<?php

namespace Cpy\MyModule\Controller\Index;

class Index extends \Magento\Framework\App\Action\Action
{
    public function execute()
    {
        $this->_forward('login', 'account', 'customer');
    }
}


texts:
I'm building a module where it needs the Customer ID to filter some data in a table.

I currently have my Block class set up like this:

namespace TreyBake\Garage\Block;

use Magento\Framework\View\Element\Template;

class Garage extends Template
{
    protected $garageCollectionFactory;
    protected $customerSession;

    public function __construct(
        Template\Context $context,
        \TreyBake\Garage\Model\ResourceModel\Garage\CollectionFactory $garageCollectionFactory,
        \Magento\Customer\Model\Session $customerSession
    )
    {
        $this->garageCollectionFactory = $garageCollectionFactory;
        $this->customerSession = $customerSesssion;

        parent::__construct($context);
    }

    public function getGarageCollection()
    {
        return $this->garageCollectionFactory->create();
    }

    public function getCustomerID()
    {
        return $this->customerSession->getCustomer()->getId();
    }
}

and I try to echo it out in my template file like this:

ini_set('display_errors', 1); ini_set('display_startup_errors', 1);
error_reporting(-1);

$collection = $this->getGarageCollection();
$collectionCount = count($collection);

echo $this->getCustomerID();

but this outputs nothing:

weirder yet, if I remove that echo $this->getCustomerID(); my other content loads e.g. there's an if statement based on $collectionCount - this outputs the correct string. When the echo is there it doesn't output anything (as displayed in the img above).

What am I doing wrong?

if you need more code/files - lemme know.

Edit:

I've adjusted my Block code to this:

public function getCustomerID()
{
    $customer = $this->customerSession->create();
    return $customer->getCustomer()->getId();
}

still nothing displayed :S


texts:
I need to know how magento 2 Routing Works...
I want to know that when we request for any task in magento 2 then how its process to controller...
Like I used command line console...'
Then how my request is routing to controller.....
Is it based on Zend Framework 2 concept or any else...
in this code
I want to know about the routing process of Magento2..like how its routing works...when we request for any task..from front end...
please give answer


texts: Image not displaying in Algolia search magento2

texts:
I have installed Algolia search extension in our magento2 store.

The extension is working properly but one issue is that images are not displaying when the search is made.

In all other pages like list page, detail page and search result page products are displaying correctly.

I have followed below help link from the extension providers.

https://www.algolia.com/doc/integration/magento-2/troubleshooting/general-faq/#missing-images-during-search

I make sure all the settings are configured correctly, but still images are not loading for me.

If anyone have faced the same issue, please look into it and help me to resolve the error.

Thanks


texts: How can we import products data in magento2 programmatically

texts:
How can we import products data from third party in magento 2 programmatically ?
We have some feeds for products , categories. We need to store in to magento


texts: Magento2 soap/rest api for third-party consumer

texts: I'm trying to create a webservice client for Magento2 api. I would like to know whether Magento2 supports oauth2 or oauth1.0. Could someone clarify if Magento2 SOAP API also requires oauth process?


texts: We have a website created on magento cms. It is on server located in Russia. Now we want this site to work in China. But our chinese partners say that their internet is slow and our site will be very slow. That's why they want our site to work also on their hosting (in China) but at the same time it has to be synchronized with our site (catalog, customers,orders). Is this a good idea? Or maybe there is a the best decision of this?


texts:
For some reason when I run custom cron groups I get the following error (note this is using IIS on Windows which is not officially supported).

php bin/magento cron:run --group=custom

  Windows cannot find 'C:\Program'. Make sure you've typed the name correctly

and

  start /B "magento background task" C:\Program Files
  (x86)\PHP\v7.0\php.exe "c:\dev\bin/magento" cron:run
  --group=custom --bootstrap=standaloneProcessStarted=1 2>&1

If I run the cron tasks which are part of this group as the default group I do not get this error.


texts: Product image wont load and dropwon wont populate

texts:
My product images keep uploading forever and dropdowns won't populate in the Product page.

Here it is: http://dosanto.com.br/loja/camiseta-omolu-obaluaie.html


texts: Magento 2 How to set value to UI component hidden field using Jquery or Javascript

texts:
I want to fill value in to ui component hidden field using Jquery or Javascript.

Below is my code.

  Namespace/Modulename/view/adminhtml/ui_component/sampleimageuploader_image_form.xml

<field name="image_data">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="dataType" xsi:type="string">number</item>
                <item name="label" xsi:type="string" translate="true">Image Data</item>
                <item name="formElement" xsi:type="string">hidden</item>
                <item name="source" xsi:type="string">image</item>
                <item name="dataScope" xsi:type="string">image_data</item>
            </item>
        </argument>
    </field>

I have included custom JS in my module and it's working fine.

I have tried using this $('input[name="image_data"]').val(Data);  and it is set value to hidden field. and value will be showing like below in inspect element.

<input class="admin__control-text" type="hidden" data-bind="
    value: value,
    hasFocus: focused,
    attr: {
        name: inputName,
        placeholder: placeholder,
        'aria-describedby': noticeId,
        id: uid
}" name="image_data" aria-describedby="notice-IDBKWA1" id="IDBKWA1" value="39.375,51,169.625,169.625">

Value is fill complate (You can check above my value is like this value="39.375,51,169.625,169.625" ) but when i submit form value is not store in to database because when i print post data value is getting blank, i don't understand why this value is getting blank? does anything i am missing or something is wrong in my code. please help to solve out my problem.

Is this possible to archive this using knockout js, if yes then how?

Any help would be Appreciated!


texts: How can I remove Customer View tab for particular member group?

texts:
I'm new to Magento, and I'm having a hard time understanding a layout/rendering issue:

On the Customers -> Manage Customers -> Click on a customer page, it shows a list of tabs on the left side, one of which is called "Customer View". But when I look at Mage_Adminhtml_Block_Customer_Edit_Tabs::_beforeToHtml, I see that the function call to addTab() is commented out for the "Customer View" tab.

So where is the "Customer View" tab being added from? How can I remove "Customer View" tab for particular member group?


texts:
I installed Magento in XAMPP, and the installation is fully complete. However, when I go to Fontend and Backend, the loading is very long, also all the thumbnails crash. I tried install again, but the same problem is still here.

I find out a error on console, it seems no any file in the directory:

Here is my backend, all the thumbnail crash and the loading is unstopptable.

How can I solve the infinitely-loading and the thumbnail problem?


texts:
I am trying to split the order based on vendor during checkout process. If there are two products in cart from different vendor, order needs to be split based on vendor.  I have followed the answer mentioned here and here. Here is the code.

use Magento\Quote\Model\Quote as QuoteEntity;
class QuoteManagement extends \Magento\Quote\Model\QuoteManagement
{

    public function submit( QuoteEntity $quote, $orderData = []) {
        $sortedItems = array();
        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $logger = \Magento\Framework\App\ObjectManager::getInstance()->get('\Psr\Log\LoggerInterface');
        $logger->debug('Quote overriden');
        foreach ($quote->getAllItems() as $item) {
            $product_id = $item->getProduct()->getId();
            $logger->debug($item->getName());
            $product = $objectManager->get('Magento\Catalog\Model\Product')->load($product_id);
            $vendor=$product->getResource()->getAttribute('vendor')->getFrontend()->getValue($product);
            if (!isset($sortedItems[$vendor])) {
                $sortedItems[$vendor] = $item;
            }
        }

        $logger->debug(json_encode($sortedItems));
        foreach ($sortedItems as $vendor => $items) {
        foreach ($quote->getAllItems() as $item) {
            $quote->getItemsCollection()->removeItemByKey($item->getId());
        }
        foreach ($items as $item) {
            $quote->addItem($item);
        }
        $quote->setTotalsCollectedFlag(false)->collectTotals();

       parent::submit($quote, $orderData);
    }

        return $this;
    }
}

For some reason the $sortedItems returns vendor in key and value is empty and checkout redirects back to cart page.

Any help on splitting the order during the checkout would be appreciated.


texts: Restricted role for user that handles shipping only?

texts:
I need to create a user that only is allowed to handle shipping of orders.

We're moving our stock to a fulfillment location that handles picking, packing & shipping for us. Basically they only need to see orders with order status "Ready for shipping" so that they can print labels and packaging slips and set the order to Completed.

It appears to me that I can't arrange this with the standard roles. I've seen some extensions for 'Advanced Permissions' (e.g. Amasty) but that don't seem to offer a solution for this.

So, ideally I need to create a user that:

Can login
Can see orders with status 'Ready for shipping'
Can print packaging slips & labels
Can change order status to 'Completed'

Nothing more, nothing less.

Any best practices for this?


texts:
I create a Coupon code from
magento2.2 - programmatically create coupon this code now I have some questions

1) how can I test this code that is it working or not .

2) How can I get this coupon code like I want to send this code in Email to customer .

3) How can I fix the price of the specific product like let suppose one product price is 30$ n I want to fix that product price to 15$.

4) And How can I apply this on specific Product.

5) Where to create this code in my module in which folder I need to create this


texts: Magento 2 Tracking shipment with carrier URL

texts:
I would like to know how to show the URL of a carrier to redirect the customer to carrier's tracking site, if it's possible with the tracking number in the URL.

This pal did it but for Magento 1
How to modify tracking link target

However I cannot edit the phtml template, because this module is intended to work in different stores, so if I use app/design the purpouse of using just the module will be lost.

Here there would be an extra field called URL

Thank you and regards!


texts: M2 | How to get value of dynamic generated rows values created at system configuration into template?

texts:
I have created dynamic rows in configuration, same in SS:

When I save value and check in:

  core_config_data

the value it is not what I am saving instead its like

  "{"_1556026243400_400":{"productcost":"7"}}"

in the corresponding value column.

This is my system.xml field:

<group id="prices" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
            Voucher Prices Setting
            <field id="add_item" translate="label" sortOrder="15" showInDefault="1" showInWebsite="1" showInStore="1">
                Dropdown Prices
                <frontend_model>Vendor\Module\Block\Adminhtml\Menu\Field\AdditionalItem</frontend_model>
                <backend_model>Vendor\Module\Block\Adminhtml\Menu\Config\Backend\AdditionalItem</backend_model>
            </field>
</group>

Update:

Here is frontend model:

namespace Vendor\Module\Block\Adminhtml\Menu\Field;

use Magento\Config\Block\System\Config\Form\Field\FieldArray\AbstractFieldArray;

class AdditionalItem extends AbstractFieldArray
{
protected $_typeblockOptions;
protected $_cmsblockOptions;
/**
 * {@inheritdoc}
 */
protected function _prepareToRender()
{

    $this->addColumn(
        'productcost',
        [
            'label' => __('Product Cost'),
            'size' => '200px',
            'class' => 'required-entry'
        ]
    );

    $this->_addAfter = false;
    $this->_addButtonLabel = __('Add');
}
}

Can somebody figure what is missing ? Thanks


texts:
Tried filtering with option_id and value_id but it is looking for value and when I change it to catalog_product_entity_int.value_id or at_manufacturer.value_id it returns syntax error.

Trying to filter with code

$productcollection = $this->collectionFactory->create()->addAttributeToSelect('manufacturer')->addFieldToFilter('something here',['eq'=>'value id or option_id here']);

https://i.imgur.com/gq5W37L.png

query looks like that when debugging

SELECT `e`.*, `at_manufacturer`.`value` AS `manufacturer` FROM `catalog_product_entity` AS `e`
 INNER JOIN `catalog_product_entity_int` AS `at_manufacturer` ON (`at_manufacturer`.`entity_id` = `e`.`entity_id`) AND (`at_manufacturer`.`attribute_id` = '81') AND (`at_manufacturer`.`store_id` = 0) WHERE (at_manufacturer.value = 'LG')

How to filter that properly?


texts: Magento 2: Invoice capture programmatically not working in magento 2.2

texts:
I am trying to capture payment online but it's not capturing. I am working with Magento 2.2. Not sure why this code does not work even the same code works with the latest version of Magento.
 public function createInvoice($order, $requireCapture = false)
 {
  if (filter_var($requireCapture, FILTER_VALIDATE_BOOLEAN) === true) {
   $captureType = Invoice::CAPTURE_ONLINE;
  } else {
   $captureType = Invoice::CAPTURE_OFFLINE;
  }

  if (!$order->getInvoiceCollection()->count()) {
   $invoice = $this->invoiceService->prepareInvoice($order);
   $invoice->setRequestedCaptureCase($captureType);
   $invoice->register();
   $invoice->getOrder()->setCustomerNoteNotify(false);
   $invoice->getOrder()->setIsInProcess(true);
   $transaction = $this->transactionFactory->create()->addObject($invoice)->addObject($invoice->getOrder());
   $transaction->save();
  }
 }


texts: Order Status not changed in the sales order grid Magento 2

texts:
I am using the fedex shipping method and after generating the shipment,status shows completed in the order view page.But there is still showing 'processing' status in the sales order grid.
Please check following screenshot.
Can you guys help me!!!!

This order was placed using authorize.net payment method.I have set the processing status when someone place order using authorize payment method.
So, How can i set the complete status in the admin grid.Please help!!!!!


texts:
I'm trying to get an instance of Magento\Cms\Api\GetBlockByIdentifier, however I am receiving a value of null.

I notice the CMS module defines a preference for this interface

vendor/magento/module-cms/etc/di.xml:13:
<preference for="Magento\Cms\Api\GetBlockByIdentifierInterface" type="Magento\Cms\Model\GetBlockByIdentifier" />

so I believe this is the correct way to go about getting an instance of Magento\Cms\Api\GetBlockByIdentifier.

Here is my code:

<?php
namespace Company\Module\Block\Product;

use
    Magento\Catalog\Block\Product\View\AbstractView,
    Magento\Store\Model\StoreManagerInterface,
    Magento\Cms\Api\GetBlockByIdentifierInterface as BlockGetter,
    Magento\Framework\View\Element\Context as ElementContext;

class MyBlock extends AbstractView
{
    private
        $_oStoreManager,
        $_oBlockGetter;

    public function __constructor(
        StoreManagerInterface $oStoreManager,
        BlockGetter $oBlockGetter,
        ElementContext $context,
        array $data = []
    ) {
        $this->_oStoreManager = $oStoreManager;
        $this->_oBlockGetter  = $oBlockGetter;

        parent::__construct($context, $data);
    }

    /**
     * Look on the product to see if there is a value in the
     * 'dynamic_block' attribute. If it is, use that value to search
     * for a static block with that as an identifier. If found, return the
     * markup from the static block. Otherwise return the empty string.
     */
    public function toHtml()
    {
        $staticBlockId = trim($this->getProduct()->getData('dynamic_block'));

        if($staticBlockId == '') {
            return '';
        }

        try {
            $storeId      = $this->_storeManager->getStore()->getId();
            //----------------------------------------------------------
            /// XXX $this->_oBlockGetter is null ...
            $staticBlock  = $this->_oBlockGetter->execute($staticBlockId, $storeId);
            return $staticBlock->getContent();
        } catch(\Exception $e) {
            return '';
        }
    }
}


texts: can virtual types be used as cronjob instances

texts:
I tried to use a virtual type in cronjob as instance but without any success. When I use a real class it works as expected. Is there any hint to get virtual types working in cronjobs?

crontab.xml:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
    <group id="mygroup">
        <job name="myjob" instance="Vendor\Package\MyClass" method="execute">
            <schedule>* * * * *</schedule>
        </job>
    </group>
</config>

di.xml:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <virtualType name="Vendor\Package\Model\VirtualLoggerHandler" type="Magento\Framework\Logger\Handler\Base">
        <arguments>
            <argument name="fileName" xsi:type="string">/var/log/virtual.log</argument>
        </arguments>
    </virtualType>

    <virtualType name="Vendor\Package\Model\VirtualLogger" type="Magento\Framework\Logger\Monolog">
        <arguments>
            <argument name="name" xsi:type="string">virtual</argument>
            <argument name="handlers" xsi:type="array">
                <item name="debug" xsi:type="object">Vendor\Package\Model\VirtualLoggerHandler</item>
                <item name="error" xsi:type="object">Vendor\Package\Model\VirtualLoggerHandler</item>
                <item name="critical" xsi:type="object">Vendor\Package\Model\VirtualLoggerHandler</item>
            </argument>
        </arguments>
    </virtualType>

    <virtualType name="Vendor\Package\MyClass" type="Vendor\Package\BaseClass" shared="true">
        <arguments>
            <argument name="logger" xsi:type="object">Vendor\Package\Model\VirtualLogger</argument>
        </arguments>
    </virtualType>
</config>


texts:
We upgraded to Magento 2.4 and exec recompile
All is OK no warning
Only when I open the frontend I see the error below Magento 2 Composer error - The contents from the "/vendor/magento/module-media-gallery-synchronization-api/etc/module.xml" file can't be read
Did we forget something? is some package missing? I was looking for module-media-gallery-synchronization-api in composer but cannot find it

1 exception(s):
Exception #0 (Magento\Framework\Exception\FileSystemException): The contents from the "/vendor/magento/module-media-gallery-synchronization-api/etc/module.xml" file can't be read. Warning!file_get_contents(/vendor/magento/module-media-gallery-synchronization-api/etc/module.xml): failed to open stream: No such file or directory

Exception #0 (Magento\Framework\Exception\FileSystemException): The contents from the "/home/sohbv/public_html/m2_dev/vendor/magento/module-media-gallery-synchronization-api/etc/module.xml" file can't be read. Warning!file_get_contents(/home/sohbv/public_html/m2_dev/vendor/magento/module-media-gallery-synchronization-api/etc/module.xml): failed to open stream: No such file or directory
<pre>#1 Magento\Framework\Module\ModuleList\Loader->getModuleConfigs() called at [vendor/magento/framework/Module/ModuleList/Loader.php:83]
#2 Magento\Framework\Module\ModuleList\Loader->load() called at [vendor/magento/framework/Module/ModuleList.php:72]
#3 Magento\Framework\Module\ModuleList->getAll() called at [vendor/magento/framework/Module/ModuleList.php:91]
#4 Magento\Framework\Module\ModuleList->getOne() called at [vendor/magento/framework/Module/DbVersionInfo.php:144]
#5 Magento\Framework\Module\DbVersionInfo->isModuleVersionEqual() called at [vendor/magento/framework/Module/DbVersionInfo.php:59]
#6 Magento\Framework\Module\DbVersionInfo->isSchemaUpToDate() called at [vendor/magento/framework/Module/DbVersionInfo.php:103]
#7 Magento\Framework\Module\DbVersionInfo->getDbVersionErrors() called at [vendor/magento/framework/Module/Plugin/DbStatusValidator.php:119]
#8 Magento\Framework\Module\Plugin\DbStatusValidator->getGroupedDbVersionErrors() called at [vendor/magento/framework/Module/Plugin/DbStatusValidator.php:53]
#9 Magento\Framework\Module\Plugin\DbStatusValidator->beforeDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:121]
#10 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/mirasvit/module-cache-warmer/src/CacheWarmer/Plugin/Debug/OnHitPlugin.php:147]
#11 Mirasvit\CacheWarmer\Plugin\Debug\OnHitPlugin->aroundAroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135]
#12 Magento\PageCache\Model\App\FrontController\BuiltinPlugin\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#13 Magento\PageCache\Model\App\FrontController\BuiltinPlugin\Interceptor->___callPlugins() called at [generated/code/Magento/PageCache/Model/App/FrontController/BuiltinPlugin/Interceptor.php:26]
#14 Magento\PageCache\Model\App\FrontController\BuiltinPlugin\Interceptor->aroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135]
#15 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#16 Magento\Framework\App\FrontController\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:26]
#17 Magento\Framework\App\FrontController\Interceptor->dispatch() called at [vendor/magento/framework/App/Http.php:116]
#18 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:24]
#19 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:263]
#20 Magento\Framework\App\Bootstrap->run() called at [pub/index.php:40]
</pre>


texts:
I am looking for a way to hide several dynamic rows columns (the same way setVisibilityColumn() method in dynamic-rows.js does) on checkbox value being changed. Checkbox is located on adminside custom options table, in option row like here:
The columns I want to hide are both in option and  value rows ("TO HIDE #")
Currently I have made a component for checkbox and listen to onChecked event but I don't know how exactly should I access the dynamic rows to hide those columns.


texts: I have to add color swatch in custom order attribute in order grid

texts:
I have to add a color swatch in the custom order attribute column in the order grid column.
I have added a custom order attribute in the order grid from this link.
https://www.yereone.com/blog/magento-2-how-to-add-new-order-attribute/
now I have to add a color swatch like this in the order grid


texts: is it posible to create mulitple attribute in one attribute set for configurable product?

texts:
I have two attributes.

Color
Size

My attribute set name is red.I have added the sizes in my configurable product, but when i try to add the color in Associated products, it shows the error which is shown below:

Even after set the scope field as Global
How to rectify this?I'm completely new to Magento.


texts: How to combine and minify all loaded css into two files: critical.css and remainder.css? Critical.css should be loaded in the header, remainder.css should be included in the end of the page.


texts: Login issue on onepage checkout on Magento 1.8.1

texts:
I have an issue on my Magento 1.8.1 in the onepage checkout during the customer login. Instead to keep on checkout page he is redirect to login form without to be logged and when ask to insert the credential and click login is redirect on customer dashboard.

I checked all missed formkey in all files need to add this code but I didn't find where it is missed.

More over I followed this solution: Onepage checkout: Already registered customer login redirects to create an account or login page but without success


texts: not able to render phtml file magento 1.7

texts:
this is my config file

<?xml version="1.0"?>
<config>
    <modules>
        <Ilogix_Regionbased>
            <version>0.1.0</version>
        </Ilogix_Regionbased>
    </modules>
    <frontend>
        <routers>
            <regionbased>
                <use>standard</use>
                <args>
                    <module>Ilogix_Regionbased</module>
                    <frontName>ilogix_regionbased</frontName>
                </args>
            </regionbased>
        </routers>
    </frontend>
    <admin>
        <routers>
            <regionbased>
                <use>admin</use>
                <args>
                    <module>Ilogix_Regionbased</module>
                    <frontName>ilogix_regionbased</frontName>
                </args>
            </regionbased>
        </routers>
    </admin>
    <global>
        <helpers>
            <regionbased>
                <class>Ilogix_Regionbased_Helper</class>
            </regionbased>
        </helpers>
        <blocks>
            <ilogix_regionbased>
                <!-- Set a block definition and lookup directory -->
                <class>Ilogix_Regionbased_Block_Adminhtml_Regionbased</class>
            </ilogix_regionbased>
        </blocks>
    </global>
    <adminhtml>
        <layout>
            <updates>
                <regionbased>
                    <file>ilogix/regionbased.xml</file>
                </regionbased>
            </updates>
        </layout>
        <menu>
            <catalog module="adminhtml">
                <children>
                    <regionbased module="regionbased">
                        <title>Regions</title>
                        <sort_order>181</sort_order>
                        <action>ilogix_regionbased/adminhtml_index</action>
                    </regionbased>
                </children>
        </catalog>
        </menu>
    </adminhtml>
</config>

this is my block file /app/code/local/Ilogix/Regionbased/Block/Adminhtml/Regionbased.php

class Ilogix_Regionbased_Block_Adminhtml_Regionbased extends Mage_Core_Block_Template
{
    public function __construct()
    {
        parent::__construct();
    }
}

this is my layout xml file

<?xml version="1.0" ?>
<layout>
        <regionbased_adminhtml_index_index>
        <reference name="content">
            <block type="core/template"  name="regions" template="regionbased/index.phtml"/>
        </reference>
    </regionbased_adminhtml_index_index>
</layout>

Here when I use block type="core/template" it perfectly renders my phtml file but when I try to use block type="regionbased/adminhtml_regionbased" it does not render the phtml file . not sure what am I doing wrong here . Please help!

Thanks


texts: Magento 2 How to get simple product name of a configurable product in sales_order_item table

texts:
Using the SKU as a guide (sales_order_item.sku), how can I get the simple product name of the configurable product?

This code gets the configurable product name (should be simple)

public function applyBaseFilters($collection)
{
    $this->joinCategoryTable($collection);
    $collection->getSelect()
        ->reset(\Zend_Db_Select::COLUMNS);

   $collection->getSelect()
       ->columns([
           'total' => 'SUM(sales_order_item.base_row_total)',
           'qty' => 'FLOOR(SUM(sales_order_item.qty_ordered))',
           'sku' => 'sales_order_item.sku',
           'name' => 'sales_order_item.name',
           'order_id' => 'CONCAT(sales_order_item.order_id,\''.$this->createUniqueEntity().'\')'
       ])
   ;
}

This code gets the correct simple product name but the quantity is not correct

public function applyBaseFilters($collection)
{
    $this->joinCategoryTable($collection);
    $collection->getSelect()
        ->reset(\Zend_Db_Select::COLUMNS);

    $collection->getSelect()->join(
        ['catalog_product_entity' => $this->getTable('catalog_product_entity')],
        'catalog_product_entity.sku = sales_order_item.sku',
        []
    )->join(
        ['catalog_product_entity_varchar' => $this->getTable('catalog_product_entity_varchar')],
        'catalog_product_entity_varchar.entity_id = catalog_product_entity.entity_id',
        []
    );

    $collection->getSelect()
        ->columns([
            'total' => 'SUM(sales_order_item.base_row_total)',
            'qty' => 'FLOOR(SUM(sales_order_item.qty_ordered))',
            'sku' => 'sales_order_item.sku',
            'name' => 'catalog_product_entity_varchar.value',
            'order_id' => 'CONCAT(sales_order_item.order_id,\''.$this->createUniqueEntity().'\')'
        ]);
}


texts: Magento 2 How to override Magento\Catalog\Block\Adminhtml\Product\Attribute\Edit\Tabs

texts:
I want to add new tab for product attribute configuration....Tab name is
manage icon and quantity range status show in screenshot.


texts: filter_url_params in magento 2 Ui component is not working properly anybody have solution

texts:
I want to show data according to id that is shown in my URL.....
my URL is

  http://dev.magento.com/admin/customer/index/edit/id/1/key/06ae49324c0bb7e328bc5bd4bb75954fcc787d538a59cb97ce4e1809a1a17ff3/#

my code is

<item name="filter_url_params" xsi:type="array">
                    <item name="customer_id" xsi:type="string">id</item>
                </item>

When i call this it treat "id" as a string and matches "id" as a string in my table column "customer_id" rather then its value.

when i call "*" instead of "id" it give me full database record
when i call specific value like "2" it return me records of customer_id "2"
when i call "id" it returns me values of customer_id "0"

kindly someone please help!!!


texts:
During guest checkout, when customer places order, he gets two emails - first one is email confirmation ("Please activate your account") and second one - information about order.

Is there any way to programatically log in this new user on a site directly after the checkout? (so after the checkout he can go to customer/account without having to log in)

In Mage_Checkout_Model_Type_Onepage, there is function:

protected function _involveNewCustomer()
{
    $customer = $this->getQuote()->getCustomer();
    if ($customer->isConfirmationRequired()) {
        $customer->sendNewAccountEmail('confirmation', '', $this->getQuote()->getStoreId());
        $url = Mage::helper('customer')->getEmailConfirmationUrl($customer->getEmail());
        $this->getCustomerSession()->addSuccess(
            Mage::helper('customer')->__('Account confirmation is required. Please, check your e-mail for confirmation link. To resend confirmation email please click here.', $url)
        );

        // WHAT SHOULD I PUT HERE TO LOGIN CUSTOMER?
        // I tried: $this->getCustomerSession()->loginById($customer->getId()); , but it doesn't work and just redirects to cart page

    } else {
        $customer->sendNewAccountEmail('registered', '', $this->getQuote()->getStoreId());
        $this->getCustomerSession()->loginById($customer->getId());
    }
    return $this;
}


texts: Magento 2 Get Cart total in the controller / JS?

texts:
I am integrating the custom module of custom payment gateway. I need the cart total on the checkout page for the price conversion before the payment.

How can I get the Cart total in JS or in the custom controller? Thanks in advance.


texts: What are the things we need to revert if the order was returned - magento 2

texts:
I created return & cancel option in customer account page. What are the things we need to revert? If the customer return the order After successful checkout process.

I doubt may be it still present in sales report or somewhere else.

e.g

Customers buy 5 products (checkout process completed), after that they return one product. I am expecting all the sales report in admin have 4 not 5.

  note: This question have raised based on my doubt. I want to make sure about admin reports don't have any invalid data.


texts: System Error/Success messages are not displaying in custom theme

texts:
I have created a simple custom theme which has dependency on Magento/blank

Everything in my theme works good except that whenever I add any error/success messages to the messageManager in my custom module and do a redirect to the custom page displaying a form.

It doesn't display those messages.

What I Did

\Magento\Framework\Message\ManagerInterface $messageManager is injected in the constructor

$this->messageManager->addError('Invalid details provided.'); added this in my controler action's execute method

$this->_redirect('myorders/uploadorder/index'); doing a redirect to the page where the form is displayed

What I have already refereed in stack exchange

Magento 2 : success messages are not showing

How to use messageManager to show an error after redirect

Magento 2: Ensure Message Manager Messages Show Up After a Redirct