texts: How to get different store value from core_config_data table in magento 2

texts:
I have two store available in Magento

Default store View
German Store

In Default Store View I have one tab Blog => General => Store Information. I stored value from this field and it will be store in General => General => Store Information.

But in German Store View which value i fill in Blog=> General => Store Information that will be not stored in General => General => Store Information.

How it is possible that I can store value in General => General => Store Information which I fill in Blog => General => Store Information in German Store View?

Please help me...

Model/Observer/Storeinfo.php

$store = $this->_request->getParam('store');
if($store == '1')
{

 $showTemplateHint =  $this->_scopeConfig->getValue('general_tab/general/display_text', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
 echo "Default :- ".$showTemplateHint;
 exit;
 $this->resourceConfig->saveConfig('general/store_information/name', $showTemplateHint, 'default', 0);

}
if($store == '2')
{
    $showTemplate =  $this->_scopeConfig->getValue('general_tab/general/display_text', 2);
    echo "German :- ".$showTemplate;
    exit;
    $this->resourceConfig->saveConfig('general/store_information/name', $showTemplate, 'stores', 2);
}


texts: Magento 2 Vue Storefront How to get product images?

texts:
I have implemented the vue storefront successfully. But in category and product, the detail page product image is not appearing. Can you please tell me how to render the product images?

I have selected the custom URL for image endpoint:

  http://127.0.0.1/mage/pub/media/catalog/product

please check the attached screenshot:


texts: How to adding Custom Attributes to Magento 2 Quotes and Orders

texts:
I have followed this:

https://www.siphor.com/adding-custom-attributes-to-magento-2-quotes-and-orders/

It works well when creating custom attributes and adding data quote but after checkout, quote is not saved in table sales_orders_item.

Please help me ! I have been thinking a lot but the problem is still not resolved.

Thanks very much


texts:
Dealing with a client who uses Magento Enterprise ver. 1.12.0.2.  I'm not a developer, but I do have a team that manage the issues/website.  Anyways, the client has been reporting that whenever they add custom options to a particular simple product they seem to disappear.

I've heard of this happening back in '09 for community edition, but I wasn't sure if this issue may have been related.  I wanted to ask your help for fixing the problem or possibly replicating it, if you've heard of it before.  I can't see what the client is talking about because the issue hasn't occurred for me.

Methods I've tried:

Duplicating the product, setting custom options.
Jumping around tabs when creating the product in the backend then saving.
Resetting cache countless times and creating new products with custom options and monitoring them on the front end.

Hopefully someone can help and that this is formatted correctly.  Let me know if there are any questions that need to be answered before you can give me a response.

Edit: It DOES seem like its related to the old custom options issue reported back in '09.  Apparently if you don't click directly on the custom options tab when making other changes and saving...it deletes the custom options occasionally or they disappear.  Any ideas?


texts: How to change different Magento backend language for sub-admins?

texts:
We got multi-lingual team, and couple of members do not speak each others languages. Is it possible to set Magento backend in separate languages for corresponding users?

Looking for same like below link but didnt find solution: https://stackoverflow.com/q/7088830/949003


texts: Magento 2.X: Display save price of configurable product

texts:
I am working in Magento 2 I have display save the price of the simple product in category page, the home page, product page but I can not display save the price of configurable product

example: regular price: 50, special price = 25  so now I want to display in "you save 25 and saved 50%"

screenshot link: https://www.screencast.com/t/8StnVLywdW

Thanks in advance


texts: Localhost install stuck at 57% Module 'Magento_Catalog':

texts:
Everything on the installation is fine until this part. It has been 1 hour it has been sitting at 53% and no errors in the console.

I am using Xampp.


texts: Get new field address in the payment module (capture function). M2.2.4

texts:
I added a new field (neighborhood) at the client's address. Everything is working.

But, I need to get this value from my payment module. I created the capture ($payment) function.

With the $payment->getOrder()->getShippingAddress() object I can not get the getData->('neighborhood').

To add the "neighborhood" field, I created a module using "extension_attributes".

The getShippingAddress uses the "Magento\Sales\Model\Order\Address". I need to add the getData('neighborhood') or getExtensionAttributes->getNeighborhood()

Can someone help me?

Magento 2.2.4


texts: How to get the simple product of the configurable product from Order?

texts:
I'am using Magento 1.9. I have to make return process in magento.

For that I'm listing all items of order. But for the configurable product I need to take the ID of the simple product to make the return request, since I need to process the return request for corresponding simple product.

Using the below code all the configurable items. But I could not get the actual simple product related with that item.

foreach ($orderItems as $item){

if ($item->getParentItemId())
   continue;
   $productId = $item->getProductId(); //It gives only the configurable product Id
if ( $item->getProductType() == 'configurable' ) {
    $productId = $item->getOptionByCode('simple_product')->getProduct()->getId(); // It is not working
            }
    }

Can anyone help on this?


texts: Showing Out of Stock variants(simple) when all variants are out of stock?

texts:
I need the ability to show Out of Stock variants when all variants(simple/children) under a configurable are out of stock. The default bahavior I am trying to overcome is to remove the product-options all together.

I've made the following code adjustment as a local edit to app\code\core\Mage\Catalog\Block\product\View\Type\Configurable.php to ensure out of stock variants show when the Show Out of Stock option (System > Admin > Inventory > Show Out of Stock) is set to 'Yes':

public function getAllowProducts()
{
    // check OoS display value (admin > config > inventory > stock options > display out of stock products)
    $showOos = Mage::helper('cataloginventory')->isShowOutOfStock();
    if (!$this->hasAllowProducts()) {
        $products = array();
        $skipSaleableCheck = Mage::helper('catalog/product')->getSkipSaleableCheck();
        $allProducts = $this->getProduct()->getTypeInstance(true)
            ->getUsedProducts(null, $this->getProduct());
        foreach ($allProducts as $product) {
            // if OoS display 'Yes' show all variants
            if ($showOos === true) {
                $products[] = $product;
            // if not, filter out OoS variants
            } else if ($product->isSaleable() || $skipSaleableCheck) {
                $products[] = $product;
            }
        }
        $this->setAllowProducts($products);
    }
    return $this->getData('allow_products');
}

This works great so long as at least one variant is in stock. If all of them are set to out of stock, product-options disables at the configurable level.
A few notes:

I started by manipulating the hasOptions() function, with no luck. I also removed this as an if condition on the view.phtml page around my 'container1' and 'container2' getChildChildHTML declarations. (originally 'if ($_product->isSaleable() && $this->hasOptions())', now commented out solely for the test) This returns the product options container itself, but does not generate the variants list.
Running a $product->getOptions() foreach for a configurable in view.phtml with all out of stock variants returns nothing.

I have a feeling there is something deeper I am missing. Anyone dealt with this before?


texts: Duplicate Content in WMT even with rel canonical

texts:
I am desperate to find a solution for this problem.

I've read most of the posts here and on almost all related forums/sites on Magento Duplicates. I just cant find a solution for my problem.

We have a baby products online shop and run on Magento 1.9.1.
I have set all of the Magento SEO built in optimization features. We don't have any SEO extensions.

My issue is with configurable products, like clothes and shoes.
I have set rel canonical for the products as directed by most people here, 301 redirect in case of accessing a child /variation. Only the main configurable is visible.
But Google insists in poing these child products are duplicates for title and description in WMT.
I've done all indicated to fix the problem, but the list of duplicates simply doesn't decrease. Right now I have about 2500 duplicates in WMT.

My volume of organic visits is ridiculous compared to my competitors of the same size, we are up and running since 2010, but moved to Magento by end of 2014. Decision was made based on Magento SEO features, but until today we had no luck growing organic visits.

I am desperate and if these visits don't grow we may be in trouble...  :-(

I am using this forum as my last chance to keep my shop up and running.

Thanks in advance


texts: Magento 2 : Remove  tags from shipping address fields on the checkout page and cart page

texts:
I am trying to remove all the Label tags and add placeholder from a shipping address form on the checkout page.but not working.
Any guidance would be appreciated.


texts: Magento2 - addAttributeToFilter wrong pagination

texts:
I'm creating an extension that filters the product collection. The filter works perfect, but it looks like pagination is not updated. I see 6 pages, but on page 2 the page is already empty.

Here's my code:

Register the plugin:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <type name="Magento\Catalog\Model\ResourceModel\Product\Collection">
        <plugin name="sidebarFilters" type="Silvan\Sidebar\Model\Plugin\SidebarFilter"/>
    </type>
</config>

The plugin:

public function aroundAddFieldToFilter(ProductCollection $collection, \Closure $proceed, $fields, $condition = null)
{
    if ( $fields === 'category_ids' )
    {
        // Get brand
        $brands = isset($_GET[ 'brands' ]) ? $_GET[ 'brands' ] : false;

        if ( $brands )
        {
            $brands = array_map(function($brand) {
                return urldecode($brand);
            }, $brands);

            $collection->addAttributeToFilter('brand', ['in' => $brands]);
        }
    }

    /** Do not try to pass empty $fields to addFieldToFilter, it will cause exception */
    return $fields ? $proceed($fields, $condition) : $collection;
}

Does anyone have a clue?


texts:
I just started to create a custom theme having as parent Magento/blank no when I try to deploy static-content I get variable @addto-color is undefined. How to debug this issue.

static structure

Vendor
--Theme
---web
----css
-----source
------- _themes.less //empty no css yet
------- _extend.less //empty no css yet

theme is registered and when I run  bin/magento setup:static-content:deploy fails with

Compilation from source:
frontend/Vendor/theme/de_DE/css/styles-l.less
variable @addto-color is undefined

looking  on https://github.com/magento/magento2-samples/tree/master/sample-module-theme everything looks the same as my theme but on deploy no variables getting inherited


texts: How to create a custom API in magento 2 which can be accessed by all the customers only?

texts: I need to create a custom API which can be accessed by all the customers only in magento 2 . Please help.


texts:
I'm building a collection of products with a few filters.  I select a custom attribute, price data, and add a filter for the custom attribute.

$pCollection = Mage::getModel('catalog/product')->getCollection()->setStoreId(1)
    ->addAttributeToSelect('name')
    ->addAttributeToSelect('custom')
    ->addAttributeToFilter('custom',array('in' => array(1,2,3,4)))
    ->addMinimalPrice()
    ->addFinalPrice()
    ->addTaxPercents();

This code is in a method in an observer model, and will be called on a cron schedule.  If I call it through a shell script to test (i.e. Mage::getModel('my/observer')->method()) it generates a proper SQL query for the collection, as follows:

SELECT
    `e`.*,
    IF(at_custom.value_id > 0, at_custom.value, at_custom_default.value) AS `custom`,
    `price_index`.`price`,
    `price_index`.`tax_class_id`,
    `price_index`.`final_price`,
    IF(price_index.tier_price IS NOT NULL, LEAST(price_index.min_price, price_index.tier_price),
    price_index.min_price) AS `minimal_price`,
    `price_index`.`min_price`,
    `price_index`.`max_price`,
    `price_index`.`tier_price` FROM `catalog_product_entity` AS `e`
INNER JOIN `catalog_product_entity_varchar` AS `at_custom_default` ON (`at_custom_default`.`entity_id` = `e`.`entity_id`) AND (`at_custom_default`.`attribute_id` = '464') AND `at_custom_default`.`store_id` = 0
LEFT JOIN `catalog_product_entity_varchar` AS `at_custom` ON (`at_custom`.`entity_id` = `e`.`entity_id`) AND (`at_custom`.`attribute_id` = '464') AND (`at_custom`.`store_id` = 1)
INNER JOIN `catalog_product_index_price` AS `price_index` ON price_index.entity_id = e.entity_id AND price_index.website_id = '1' AND price_index.customer_group_id = 0 WHERE (IF(at_custom.value_id > 0, at_custom.value, at_custom_default.value) IN(1,2,3,4))

This brings back the expected results.  However, when it runs due to the cron schedule triggering it, a different set of results is returned.  I debugged it and found that the same method when run by cron produces the following SQL:

SELECT
    1 AS `status`,
    `e`.`entity_id`,
    `e`.`type_id`,
    `e`.`attribute_set_id`,
    `e`.`name`,
    `price_index`.`price`,
    `price_index`.`tax_class_id`,
    `price_index`.`final_price`,
    IF(price_index.tier_price IS NOT NULL, LEAST(price_index.min_price, price_index.tier_price), price_index.min_price) AS `minimal_price`,
    `price_index`.`min_price`,
    `price_index`.`max_price`,
    `price_index`.`tier_price` FROM `catalog_product_flat_1` AS `e`
INNER JOIN `catalog_product_index_price` AS `price_index` ON price_index.entity_id = e.entity_id AND price_index.website_id = '1' AND price_index.customer_group_id = 0

There's no mention or filter on the custom attribute.  The attribute is setup properly to be visible on the frontend and collections, and filterable.  Not sure what I'm missing, or why just changing what calls the method alters the result so much.


texts: Magento 2 : How to check if we are on a search result page?

texts:
Is there a way to check that we are on search result page in Magento 2?

Any help would be greatly appreciated!


texts: How can i Import Magento Site All category?

texts:
I export all category with tree path my Magento site using following script:

//Import Magento  All category script
define('MAGENTO', realpath(dirname(__FILE__)));
require_once MAGENTO . '/app/Mage.php';
Mage::app();

$category = Mage::getModel ('catalog/category');
$tree = $category->getTreeModel();
$tree->load();
$ids = $tree->getCollection()->getAllIds();
$categories = array();
$x = 0;

if ($ids) {
//Need Create import directory if not exist
    $file = "var/import/catwithid.csv";
    file_put_contents($file,'"id","name","path","path_ids","url"' . PHP_EOL);
    foreach ( $ids as $id ) {
        $url_key = Mage::helper('catalog/category')->getCategoryUrlPath($category->getUrlPath(), true);
        $path = explode('/', $categories[$id]['path']);
        $fpath = '';
        foreach ($path as $pathId) {
            $fpath .= $categories[$pathId]['name'] . '/';
        }

        $path_ids = implode(',', $path);
        $string = '"' . $id . '","' . $category->load($id)->getName() . '","' . $fpath . '","' . $path_ids . '"' . $url_key . '"' . PHP_EOL;

        file_put_contents($file,$string,FILE_APPEND);

    }
}

Now I want to Import another fresh install magento site.


texts: Javascript translation not working properly

texts:
I've translated some text in a javascript file with translation.js, I've done it the following way:

I've defined the translator.

define([
'mage/translate',
];

After that, I translated my text.

 $.mage.__('excl. VAT')

And added the translation in the CSV file.
The strange thing is, that sometimes it get's translated and sometimes not...

Did I miss something?


texts: Magento 2 : How to create a dynamic menu in magento 2

texts: guys, my question is how I create menu dynamic because I don't know how to create menu dynamically in Magento 2


texts:
I created 1:1 copy of Magento 1.9.1 on localhost for development purposes. Everything works fine, but the breadcrumbs are missing category trail:

Hosting environment on the left, localhost on the right.
Category "ODKURZACZE" is missing.

What is the reason and how can I solve it?


texts: Magento 2 - Add a custom field to Product Categories

texts:
There's a question I asked here before, but got no answers.
Please tell me if this tutorial (which I can't get it to work) is complete or not.

Thanks for your helps in advance.


texts: Magento upgrade conflicts 1.9.2.2 to 1.9.2.3

texts: I try to update Magento through the Magento Connect tool, however, everything seems to conflict with everything, and I get a huge list of errors in the output console. What is the correct way / order to upgrade Magento?


texts:
I want to disable the cache for a particular CMS page I have hours and hours search through the internet and gained nothing. I know that an observer load pages and so i can ban cache for the particular page but I don't know exactley how to do that. I have seen this problem and the solution

I didn't know how to relate it to CMS pages so I went to the controller of the CMS page:
Mage_Cms_Controller_Router

and I wrote this function:

public function processPreDispatch(Varien_Event_Observer $observer)
{
    $action = $observer->getEvent()->getControllerAction();

    // Check to see if $action is a Product controller
    if ($action instanceof Mage_Catalog_ProductController) {

        $cache = Mage::app()->getCacheInstance();

        // Tell Magento to 'ban' the use of FPC for this request
        $cache->banUse('full_page');
    }
}

then in the setting of the cms page layout update I did the following:

which is:

<config>
<frontend>
<events>
    <controller_action_predispatch>
        <observers>
            <page_cms_myid>
                <class>Mage_Cms_Controller_Router</class>
                <method>processPreDispatch</method>
            </page_cms_myid>
        </observers>
    </controller_action_predispatch>
</events>
</frontend>
</config>

this is not working and still the cache of the page is enabled.
I really need help

UPDATE:I created the module with two pages observer.php and config.xml:

<?php
class SmashingMagazine_LogProductUpdate_Model_Observer
{
    Mage::log("test here");
public function processPreDispatch(Varien_Event_Observer $observer)
{
    $action = $observer->getEvent()->getControllerAction();

    // Check to see if $action is a Product controller
    if ($action instanceof Mage_Cms_PageController) {

$cache = Mage::app()->getCacheInstance();

        // Tell Magento to 'ban' the use of FPC for this request
        $cache->banUse('full_page');
    }
}
    public function logUpdate(Varien_Event_Observer $observer)
    {
        $product = $observer->getEvent()->getProduct();
        $name = $product->getName();
        $sku = $product->getSku();

        Mage::log("{$name} ({$sku}) updated", null, 'product-updates.log');
    }
}

config.xml:

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <SmashingMagazine_LogProductUpdate>
            <version>0.0.1</version>
        </SmashingMagazine_LogProductUpdate>
    </modules>
    <global>
        <models>
            <smashingmagazine_logproductupdate>
                <class>SmashingMagazine_LogProductUpdate_Model</class>
            </smashingmagazine_logproductupdate>
        </models>
        <events>
        <controller_action_predispatch>
        <observers>
            <page_cms_myid>
                <class>SmashingMagazine_LogProductUpdate_Model_Observer</class>
                <method>processPreDispatch</method>
            </page_cms_myid>
        </observers>
    </controller_action_predispatch>
        </events>
    </global>
</config>

but how to add the custom module to the CMS page


texts: Extend/hook into where Magento decides if a product can be shown/sold

texts:
I have a problem i'd like to have some opinions on. I'm totally new with Magento, but not with programming.

Background:

I've built a small module to import stock quantites from a couple of our suppliers. It adds this to every product, mapped by supplier_sku and supplier_id. When a match occurs, product get supplier_qty. It still has its own "qty" which i from now own simply will call qty.

I'd like to have following logic (please note its pseudocode and i don't actually asks how the get a yellow icon)

//If we have it in stock, let's just sell it as usual
if (qty > 0) {

    //product is shown, can be bought
    //and on product detail "In stock (green icon)" is shown

} else { //here we don't have item in stock, so lets check if supplier has

    if (supplier_qty > 0) {
        //supplier has item in stock!
        //this product is shown everywhere, and can be bought
        //it still shows In stock, but now with a yellow icon.
    }

    if (supplier_qty < 1) {
        //supplier has not item in stock (and neither do we)
        //this time product is not shown anywhere, and can obviosuly not be bought
    }

    if (supplier_qty == null || supplier_id == null) {
        //at this point we actually do not know actual quantities at suppliers
        //or we might not even have a supplier attached to product
        //maybe this product should be sold? Idk, just want to make sure
        //this use case is taken in account
    }
}

There is some obvious ways to do it. One is, during/after import, set allow_backorder, is_in_stock and all that stuff based on logic above. It does feel dirty though. I don't believe that this is "single responsibility principle" to let some importer decide this.

I rather have SOMEWHERE to hook in when Magento decides what to show in category/search/etc and so on. I've tried to track isSalable() and isAvailable() down but litte to no success. This logic of course might be expensive performance wise, to I guess it has to be cached.

So. Questions
1) What is the best way to make sure this logic is followed (and stable)
2) Does isSalable() and isAvailable() used before caching?

Thanks in advance!
Christoffer


texts: Payment methods "Wrong content type" after upgrade Magento from 1.6 to 1.9.1.1

texts:
I've just upgraded magento version from 1.6 to 1.9.1.1. I go to system/configuration/sales/payment methods and got the following error:

I have tried to debug by going to this function on app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/International.php:

public function getAllowedMethods()
    {
        $contentType = $this->getConfigData('content_type');
        $allowedMethods = array();
        if ($this->_isDomestic) {
            $allowedMethods = array_merge(explode(',', $this->getConfigData('doc_methods')),
                explode(',', $this->getConfigData('nondoc_methods'))
            );
        } else {
            switch ($contentType) {
                case self::DHL_CONTENT_TYPE_DOC:
                    $allowedMethods = explode(',', $this->getConfigData('doc_methods'));
                    break;
                case self::DHL_CONTENT_TYPE_NON_DOC:
                    $allowedMethods = explode(',', $this->getConfigData('nondoc_methods'));
                    break;
                default:
                    Mage::throwException(Mage::helper('usa')->__('Wrong Content Type.'));
            }
        }
        $methods = array();
        foreach ($allowedMethods as $method) {
            $methods[$method] = $this->getDhlProductTitle($method);
        }
        return $methods;
    }

I tried to var_dump($contentType) add get NULL value. What's wrong here ?

UPDATE:

My Content Type config in admin panel:


texts: How to make 4 column layout file in magento

texts:
I want to make custom layout like 4 column to show on front end.

it gives default
 1 column ,2 columns with right bar,2 columns with right bar and  3 columns.

which types of changes in xml file??


texts: Magento 1.8 Allow Same Email for 2 or More Customer Accounts

texts:
I´m using magento as POS for travel services, so the user only fills in the customer create account and my sale people finish the sale from backend.
Since sometimes we have a family traveling together but all contracts (for legal purposes) are individual, however most times one person is responsible for filling in the form (I´m using create account page for that) and paying, I have the same email for 2 or more customers.
And here is the problem, since magento does not allow to create 2 accounts with same email.
Does anyone have an idea on how to allow it to create different accounts with same email address?
(remember, I don´t allow customers to login to the system so it´s not a problem future password retrieve or login attempts).


texts:
A website I am working on has two drastically different designs for mobile and desktop. For this reason I chose to make 2 different themes, and have the mobile detect module (https://github.com/EaDesgin/magento2-mobiledetect) detect whether the mobile or desktop version should be loaded.

This fixes the problem for displaying a different theme on mobile devices, but it does not take browser resizing into account.

How can I make my Magento 2 website load the other theme from, lets say, 768 pixels and down?

I plan to use a preloading effect for the transition. (https://tympanus.net/Tutorials/PagePreloadingEffect/index.html)


texts:
I'm trying to understand how caching actually works and which caching system should I use, but the more I read the more confused I am.

Using default cache in my magento store (1.9.2) doesn't realy work. After a few weeks my cache folders are more than 10gb and becouse of that website started to work very slow. I have to clear cache folders every few days or so to make it work reasonably.

My hosting provider allows me to change caching to APC or XCache. I can also buy memcached (64mb), but I'm not sure if it will work becouse its size?

Could someone explain to me what those cache systems actually do, and which one of them should I use to make my magento work fast? Or maybe combining two of them is a way to go?

EDIT: How often should I clean cache catalogs via cronjob? What's the point of using second-level cache ( /var/cache/ folder ) if I'm going to clear it quite often to prevent slow working (what's the point of caching at all if it makes my website slow)


texts: AED-SAR and SAR-AED currency Switching magento 2.1.7

texts: I have 4 currency (AED, USD, GBP, SAR) in my store AED is my base and i have 2 store (English and Arabic). All the currencies working properly but when i change AED to SAR or SAR to AED it's not working.


texts: How to stop / redirect loading of insecure scripts

texts:
I have a google font / stylesheet being loaded over http, how do I change it to https?

Its causing error messages to crop up on my secure pages like this:

  Mixed Content: The page at 'https://www.mydomain.co.uk/customer/account/' was loaded over HTTPS, but requested an insecure stylesheet 'http://fonts.googleapis.com/css?family=Open+Sans:600italic,300,700,400,600'. This request has been blocked; the content must be served over HTTPS.


texts: Finding where CSS and JS injection is called from

texts:
In my development site, I added an extension that I have since decided to remove.
Having removed all the files from the site structure, I am still seeing the css and js include files being included in the head of my page - at least the call to those files is there, as I have removed the actual files being called!

My assumption was that those css and js files would be added to the head via the xml files of the extension, and having removed those files, they would stop being added to the head, but they are still there??

I have not got cache running on the dev site (so sloooooooooow!!), but I still have flushed it anyway, several times!

Now I am scratching my head trying to figure out where these injections are coming from - if indeed I am not just seeing "ghosts" due to some other caching perhaps?

Is there some way to check what file requested the injection of a css or js file into the head of my page, so I can try to track it down and remove the offender?

Cheers!


texts: Magento2 - Product Attribute Not reindex error

texts: I can't get SKU name for the title tag because of the not index product attribute?


texts: Programatically Add multiple simple product to cart not working

texts:
I am trying to add multiple product to cart at the same time.

But it always add only single item with multiply of other product qty

suppose to be

Product id            qty
4                     6
5                     5
6                     4

it will add product id 4 with 15 qty.

Here is my code

    <?php
namespace Kite\Boxes\Controller\Category;
 class Addpack extends \Magento\Framework\App\Action\Action {

         /**
          * @var \Magento\Checkout\Model\Cart
          */
         protected $cart;
         /**
          * @var \Magento\Catalog\Model\Product
          */
         protected $product;
         protected $resultPageFactory;

         public function __construct(
             \Magento\Framework\App\Action\Context $context,
             \Magento\Framework\View\Result\PageFactory $resultPageFactory,
             \Magento\Catalog\Model\Product $product,
             \Magento\Checkout\Model\Cart $cart
         ) {
             $this->resultPageFactory = $resultPageFactory;
             $this->cart = $cart;
             $this->product = $product;
             parent::__construct($context);
         }
         public function execute()
         {
             try {
                $postedData = $this->getRequest()->getPostValue();
                //echo "<pre/>";print_r($postedData['multi_add']);exit;
                foreach ($postedData['multi_add'] as $productId => $qty) {
                  if($qty>0){
                     $params = array();
                     $params['qty'] = $qty;//product quantity
                     $_product = $this->product->load($productId);
                       if ($_product) {
                           $this->cart->addProduct($_product, $params);
                           $this->cart->save();
                        }
                   }
                }

                 $this->messageManager->addSuccess(__('Add to cart successfully.'));
             } catch (\Magento\Framework\Exception\LocalizedException $e) {
                 $this->messageManager->addException(
                     $e,
                     __('%1', $e->getMessage())
                 );
             } catch (\Exception $e) {
                 $this->messageManager->addException($e, __('error.'));
             }
             /*cart page*/
             $this->getResponse()->setRedirect('/checkout/cart/index');

         }
    }


texts: MasterCard internet Gateway Service (MiGS) & Virtual Payment Client (VPC) Extension needed

texts:
I need a MasterCard internet Gateway Service (MiGS) & Virtual Payment Client (VPC) Extension for magento 1.9.2.4. Its needed for Bank to Magento integration you can suggest any good extension please.

Thank you


texts:
I bought a theme that has an issue with the shopping cart preview layout.
Here is an example: http://bannerbag.de/test2layer.html

Add a product to the shopping cart and hover the mouse over the cart.

If you click on the cart it does however display products correctly.

I am new to magento and I dont know how to fix this .. the seller also didn't respond to emails.


texts: Catalogsearch sidebar navigation not showing only for specific query string

texts:
In my magento store I am facing a very weird case, in catalogsearch/result page sidebar navigation appearing correctly for all query string but for a specific query string it is not appearing.

When I debug it I found that for this search $this->canShowBlock() function in catalog/layer/view.phtml file return false.

When I try to log something inside this function in Mage/Catalog/Block/Layer/View.php as :

public function canShowBlock()
{
        Mage::log(print_r('hello', 1), null, 'debug.log');
        return $this->canShowOptions() || count($this->getLayer()->getState()->getFilters());
}

It is not print anything in debug.log file only for specific query search, but for other all query string this function print hello in debug.log file.

What is the problem here?


texts: How to convert this object data into array?

texts:
I have this Data Object value.

Magento\Customer\Model\Data\AttributeMetadata Object
(
    [_data:protected] => Array
        (
            [frontend_input] => boolean
            [input_filter] =>
            [store_label] => Verified Buyer
            [validation_rules] => Array
                (
                )

            [multiline_count] => 0
            [visible] => 1
            [required] =>
            [data_model] =>
            [options] => Array
                (
                )

            [frontend_class] =>
            [user_defined] => 1
            [sort_order] => 90
            [frontend_label] => Verified Buyer
            [note] =>
            [system] =>
            [backend_type] => int
            [is_used_in_grid] =>
            [is_visible_in_grid] =>
            [is_filterable_in_grid] =>
            [is_searchable_in_grid] =>
            [attribute_code] => verified_buyer
        )

)

I converted this to

  $array =  (array) $customAttr;

But still I am reciving the object

Array
(
    [*_data] => Array
        (
            [frontend_input] => boolean
            [input_filter] =>
            [store_label] => Verified Buyer
            [validation_rules] => Array
                (
                )

            [multiline_count] => 0
            [visible] => 1
            [required] =>
            [data_model] =>
            [options] => Array
                (
                )

            [frontend_class] =>
            [user_defined] => 1
            [sort_order] => 90
            [frontend_label] => Verified Buyer
            [note] =>
            [system] =>
            [backend_type] => int
            [is_used_in_grid] =>
            [is_visible_in_grid] =>
            [is_filterable_in_grid] =>
            [is_searchable_in_grid] =>
            [attribute_code] => verified_buyer
        )

)

I am expecting output like

Array
(
            [frontend_input] => boolean
            [input_filter] =>
            [store_label] => Verified Buyer
            [validation_rules] => Array
                (
                )

            [multiline_count] => 0
            [visible] => 1
            [required] =>
            [data_model] =>
            [options] => Array
                (
                )

            [frontend_class] =>
            [user_defined] => 1
            [sort_order] => 90
            [frontend_label] => Verified Buyer
            [note] =>
            [system] =>
            [backend_type] => int
            [is_used_in_grid] =>
            [is_visible_in_grid] =>
            [is_filterable_in_grid] =>
            [is_searchable_in_grid] =>
            [attribute_code] => verified_buyer
)

Above all is Magento Customer custom attributes data.

  Note : I am using REST API


texts: What exactly does the admin install script do?

texts:
I have been facing a strange issue with the magento 2 CLI installer and, after some investigation a doubt came up:

While using magento 1 it was totally possible to have your codebase copied over to a server, a mysql dump imported, app/etc/local.xml adjusted and the shop would be up and running.

But magento 2 seems to be different. While trying to bypass the install process, I have taken the following steps:

  Copy codebase, adjusted permissions
  Composer update and install
  Adjustments made to app/etc/env.php
  Enabled modules through CLI command
  Imported DB dump, adjusting urls

After these steps, even though all modules were enabled, the shop was not installed according to error messages found in the log. Also, some very basic functions such as cache cleaning and reindexing are not available through the CLI.

I have gone through the contents of the files under app/etc/, comparing it with a running store, and the contents are identical. The codebase between these two shops are the same, btw.

What am I missing from this manual install process?

Gabriel


texts: Magento MSI; add custom attribute to Sources in M2

texts:
we want to use multiple sources using Magento Multistock MSI.

2 of our 5 stock locations are called 'virtual'. They have stock that is not readily avilable but can be sold.

OUr idea is to mark these 2 warehouse as 'virtual'. Orders based on items from these locations should inherit the 'virtual' attribute.

question: how can we add a new attribute to Magento Multistock MSI Sources and show it under Sources configuration as a two options element?

thanks, Sean


texts: How to Getting all custom options of a product in Magento

texts:
$productss = Mage::getModel("catalog/product")->load($product_id);

$theoptions = $productss->getOptions();

foreach($theoptions as $opkey=> $opval){

echo $opval->getOptionId().'|'.$opval->getTitle().'<br>';

}

This Code does not get all options for the product I need all options with 'option_type_id', 'option_id' etc...


texts:
I see there are several CSS files loading on the page after Magento 2 merge. Is it possible to have only one merged CSS file? Any details how Magento 2 merge works appreciated.

<link  rel="stylesheet" type="text/css"  media="all" href="https://domain.biz/static/_cache/merged/5af932c28d9dc7c83a71486116da185c.min.css" />
<link  rel="stylesheet" type="text/css"  media="screen and (min-width: 768px)" href="https://domain.biz/static/frontend/Codazon/fastest_westylejewelry/en_US/css/styles-l.min.css" />
<link  rel="stylesheet" type="text/css"  media="print" href="https://domain.biz/static/frontend/Codazon/fastest_westylejewelry/en_US/css/print.min.css" />
<link  rel="stylesheet" type="text/css"  media="all" href="https://domain.biz/static/_cache/merged/eb7dcc152973e076bb2b4c94f76fe412.min.css" />


texts: API - Redirecting user to magento instance to view their cart

texts:
I am writing a web app that communicates with Magento API for reading product data and then allowing the user to add to cart products they wish to purchase.

All API calls are done using a login I added via the admin site.

When the user finishes the selection process are redirected to the shopping cart on the Magento instance and complete the purchase.

And that's the tricky bit - calls to the API are done using a specific admin user, under this user session. The cart is also added to this admin session. When my user is redirected to the site they won't see anything there, since it's not their session - they are arriving to the site as guests.

One way to solve this would be to make the add to cart from JS and not server side, because this will associate the cart with the browser and not with my server side logic, but I'm not aware of a way to do this. Not to mention cross-domain JS issues.

So - Is there somewhere in the API something that can help me do something like retrieve a URL I can redirect the user to - this URL will associate the cart with the user who is redirected to this URL and then they can see the cart.

This sounds like a reasonable requirement and I believe it should be available one form or another in the current API. At least I hope so.. :)

I prefer to avoid (if possible) writing custom APIs for this.

Any help would be much appreciated!

Thanks!


texts: How to install ssl in magento 2 ubuntu 16.04

texts:
I need help with installing SSL in my VPS.
I am stuck in apache2 Magento configurations.
I have changed all the options from Magento 2 backend and now the site is not working
Kindly help with apache config and how can I redirect the site to https
This is what I am using

< IfModule mod_ssl.c>
<VirtualHost *:443>
        ServerName spalding.co.in
        ServerAlias    www.spalding.co.in
        DocumentRoot /var/www/html/spalding
        <Directory /var/www/html/spaldng/>
        DirectoryIndex index.php index.html
        Options FollowSymLinks
        AllowOverride all
        Require all granted
        </Directory>
         ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

SSLCertificateFile /etc/apache2/ssl/5195fdcb4d95bdda.crt
SSLCertificateKeyFile /etc/apache2/ssl/spalding.key
SSLCertificateChainFile /etc/apache2/ssl/gd_bundle-g2-g1.crt
</VirtualHost>
</IfModule>

and I am confused about editing default-ssl.conf file do I need to edit this?


texts: Overriding a .phtml file to remove comparison feature

texts:
I would like to remove the comparison feature from catalog pages. I enabled developer hints for the template and found that the file containing the comparison icons was located at:

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

I then went ahead and created a file in my theme directory as follows:

app/design/fronted/Whistlefish/Magento_Catalog/view/frontend/templates/product/list/addto/compare.phtml

However there is no difference on the frontend. Assuming I've got the folder structure wrong, but I double checked and it looked ok?


texts: Render Javascript on customer_login event

texts:
I'm trying to render some javascript when the customer_login event fires by accessing a block on the layout from within the observer.

I've successfully registered my observer to execute with the event and that works fine.

The problem I'm running into is that when I attempt to access a specific block object from within the observer the layout does not contain any block elements.

I'm mimicking code that I've seen in the magento2 google analytics plugin that sets a value on a block object from an observer registered on the checkout_onepage_controller_success_action event.

My guess for why this isn't working is that this event fires before any of the block elements are initialized and registered with the layout.

If this is the case and my current approach is not a valid one how would I go about rendering some javascript when this event fires?

etc/frontend/events.xml:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="customer_login">
        <observer name="login_success" instance="Companyname\Revjs\Observer\SetCompanynameLoginSuccessObserver" />
    </event>
</config>

Observer/SetCompanynameLoginSuccessObserver.php:

<?php

namespace Companyname\Revjs\Observer;

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

class SetCompanynameLoginSuccessObserver implements ObserverInterface
{
    /**
     * @var \Magento\Framework\View\LayoutInterface
     */
    protected $layout;

    /**
     * @param \Magento\Framework\View\LayoutInterface $layout
     */
    public function __construct(
        \Magento\Framework\View\LayoutInterface $layout
    ) {
        $this->layout = $layout;
    }

    public function execute(EventObserver $observer)
    {
        $email = $observer->getEvent()->getCustomer()->getEmail();

        if (!$email) {
            return;
        }

        // this call returns false rather than a block object
        $block = $this->layout->getBlock('companyname');
        $block->setEmail($email);
    }
}

view/frontend/layout/default.xml:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="after.body.start">
            <block class="Companyname\Revjs\Block\Rv" name="companyname" as="companyname" template="rv.phtml"/>
        </referenceContainer>
    </body>
</page>

Block/Rv.php:

namespace Companyname\Revjs\Block;

class Rv extends \Magento\Framework\View\Element\Template
{
    public function getEmailJsFunction()
    {
            $email = $this->getEmail();
            if ($email) {
                    return sprintf("someJsFunction('%s');", $email);
            } else {
                    return '';
            }
    }
}

view/frontend/templates/rv.phtml:

<script>
  <?php echo $block->getEmailJsFunction(); ?>
</script>


texts: Apply discount from checkout second page/tab

texts:
I am using Magento 2 enterprise edition (2.0.6)

I want to apply discount on sub total, Discount is applied from cart page (added a button on cart which applies the discount) and then if I go to checkout discount is visible there.

Now I am trying to add button on checkout second page to apply discount. The discount is applied but the order summary is not updated. If I click on button (checkout page) and goto payment express, it shows the discounted amount.

even if i goto cart page after applying discount on checkout it is visible on cart and then visible on checkout also.

I took reference from
how to add fee to order totals in magento2 to apply discount

Below is my code

[Namespace]/[ModuleName]/etc/sales.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Sales:etc/sales.xsd">
  <section name="quote">
    <group name="totals">
      <item name="custom" instance="[Namespace]\[ModuleName]\Model\Total\Quote\Custom" sort_order="420">
      </item>
    </group>
  </section>
</config>

I created Model under
[Namespace]/[ModuleName]/Model/Total/Quote/Custom.php

namespace [Namespace]\[ModuleName]\Model\Total\Quote;

  class Custom extends \Magento\Quote\Model\Quote\Address\Total\AbstractTotal
{

   protected $_priceCurrency;

   public function __construct(
       \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency,
       \Magento\Checkout\Model\Session                     $checkoutSession,
       \[Namespace]/[ModuleName]\Helper\Data $helper
   ){
       $this->_priceCurrency = $priceCurrency;
       $this->checkoutSession             = $checkoutSession;
       $this->helper = $helper;
   }
   public function getDiscountAmount()
    {
        return $this->helper->getDiscountAmount();
    }
   /**
    * @param \Magento\Quote\Model\Quote $quote
    * @param \Magento\Quote\Api\Data\ShippingAssignmentInterface $shippingAssignment
    * @param \Magento\Quote\Model\Quote\Address\Total $total
    * @return $this|bool
    */
   public function collect(
       \Magento\Quote\Model\Quote $quote,
       \Magento\Quote\Api\Data\ShippingAssignmentInterface $shippingAssignment,
       \Magento\Quote\Model\Quote\Address\Total $total
   )
   {
      parent::collect($quote, $shippingAssignment, $total);
      $address             = $shippingAssignment->getShipping()->getAddress();
      $label               = 'My Custom Discount';
      $discountAmount      = -self::getDiscountAmount();
      $appliedCartDiscount = 0;
      if ($address->getAddressType() == 'shipping')
      {
          if($total->getDiscountDescription())
          {
            // If a discount exists in cart and another discount is applied, the add both discounts.
            $appliedCartDiscount = $total->getDiscountAmount();
            $discountAmount      = $total->getDiscountAmount()+$discountAmount;
            $label               = $total->getDiscountDescription().', '.$label;
          }

          $total->setDiscountDescription($label);
          $total->setDiscountAmount($discountAmount);
          $total->setBaseDiscountAmount($discountAmount);
          $total->setSubtotalWithDiscount($total->getSubtotal() + $discountAmount);
          $total->setBaseSubtotalWithDiscount($total->getBaseSubtotal() + $discountAmount);

          if(isset($appliedCartDiscount))
          {
            $total->addTotalAmount($this->getCode(), $discountAmount - $appliedCartDiscount);
            $total->addBaseTotalAmount($this->getCode(), $discountAmount - $appliedCartDiscount);
          }
          else
          {
            $total->addTotalAmount($this->getCode(), $discountAmount);
            $total->addBaseTotalAmount($this->getCode(), $discountAmount);
          }
      }
      return $this;
   }
}


texts: How can Set limit maximum 10 orders on specific time interval Magento 2?

texts:
I am using delivery date extension which date & time options. Time options has 2 hours difference in each interval. I want to set order limit within time interval.

For example:

  Time Interval:

  9-11, 11-13, 13-15, 15-17

I want to set limit to maximum 10 orders within one time interval.

After 10 orders that specific time interval must be disabled.

How can I do this task? can anyone help to do this?

datepicker.js is used to change date. How can I call controller to add my php code or condition for this. Here is the datepicker.js code:

  define([
        'moment',
        'ko',
        'underscore',
        'jquery',
        'mage/translate',
        'mage/calendar'
    ], function (moment, ko, _, $, $t) {
        'use strict';

        var defaults = {
            dateFormat: 'mm\/dd\/yyyy',
            showsTime: false,
            timeFormat: null,
            buttonImage: null,
            buttonImageOnly: null,
            buttonText: $t('Select Date')
        };

        ko.bindingHandlers.amastydatepicker = {

            init: function (el, valueAccessor) {

                var config = valueAccessor(),
                    observable,
                    options = {};

                _.extend(options, defaults);

                if (typeof config === 'object') {
                    observable = config.storage;

                    _.extend(options, config.options);
                } else {
                    observable = config;
                }

                var date = moment(observable(), config.elem.pickerDateTimeFormat);

                $(el).calendar(options);
                observable() && $(el).datepicker('setDate', date.format('YYYY-MM-DD'));
                $(el).blur();

                ko.utils.registerEventHandler(el, 'change', function () {
=========================================================================
                    //alert(this.value);
                    // date changed from here. I want to call controller from here
=========================================================================
                    observable(this.value);
                });
            }
        };
    });


texts: Catalog rules not being applied to some products until the product is saved

texts:
We have a CE 1.6 site with a lot of products (150,000). All new products are uploaded from a feed. Catalog rules are applied every night via a cron to almost every product. This has all worked fine for quite a long time. However, recently catalog rules stopped being applied to new products unless the product is saved manually.

I have checked that the cron is running the catalog rules apply and also that the scheduled re-indexing is being done. I have also done several manual reindex all. Still the problem persists.

Has anyone come across a similar issue or have a fix for this?

UPDATE:
Found the problem, hope it helps someone else. Turns out that php was running out of memory so increased it in php.ini and all is well again......sometimes it's the simple things...


texts: magento2 add script tag right after open body tag

texts:
I want to add script tag (google tag manager) right after opening body-tag. I added a referenceContainer to default.xml - but content of "afterbody.phtml" is allways printed AFTER header.container instead of before.

Thanks for help!
martin

    <referenceContainer name="after.body.start">
        <block class="Magento\Framework\View\Element\Template" name="afterbody" before="header.container" template="Magento_Theme::afterbody.phtml"/>
    </referenceContainer>
    <referenceContainer name="header.container">
        <container name="header.panel" label="Page Header Panel" htmlTag="div" htmlClass="panel header">
            <block class="Magento\Framework\View\Element\Template" name="skip_to_content" template="Magento_Theme::html/skip.phtml">
                <arguments>
                    <argument name="target" xsi:type="string">contentarea</argument>
                    <argument name="label" translate="true" xsi:type="string">Skip to Content</argument>
                </arguments>
            </block>
            <block class="Magento\Store\Block\Switcher" name="store_language" as="store_language" template="switch/languages.phtml"/>
            <block class="Magento\Framework\View\Element\Html\Links" name="top.links">
                <arguments>
                    <argument name="css_class" xsi:type="string">links</argument>
                </arguments>
            </block>
        </container>
        <referenceBlock name="compare" remove="true" />
        <referenceBlock name="wish-list-link" remove="true" />
    </referenceContainer>
    <referenceContainer name="columns">
        <container name="div.sidebar.main" htmlTag="div" htmlClass="sidebar sidebar-main-1" before="main">
            <container name="sidebar.main" as="sidebar_main" label="Sidebar Main"/>
        </container>
        <container name="div.sidebar.additional" htmlTag="div" htmlClass="sidebar sidebar-additional1" after="div.sidebar.main">
            <container name="sidebar.additional" as="sidebar_additional" label="Sidebar Additional"/>
        </container>
    </referenceContainer>

    <referenceBlock name="top.links">
        <referenceBlock name="register-link" remove="true" />           <!--for Create Account Link-->
        <referenceBlock name="wish-list-link" remove="true" />          <!--for WishList Link-->
        <referenceBlock name="catalog.compare.link" remove="true" />
    </referenceBlock>


texts: On core swatch selection, redirect to selected color

texts: I have added an identifier in the url when selecting a color using the core swatches magento provides in 1.9.1 for configurable products. Ex. Blue shirt links adds shirt.html?color=blue. I'm wondering if there is a simple way to make the product view page acknowledge the identifier and show the appropriate selected color when loading the product. Thanks for any help.


texts: M2 2.2.11 moving http to https, hostname error, url changes not reflected

texts:
Updated Magento to 2.2.11 for new payment processor extension. Extension requires everything to go through https so I enabled that for the domain (shared hosting). Compiled, deployed, reindexed, cleaned up caches. However the frontend continues to use http and backend only accessible (via http) if i clear cookies before every session.
Guides instruct me to change values in store/system config/web to have both secure and unsecure url point to https. I am unable to change these as putting in the https url and trying to save changes results in the following error:

The input appears to be a DNS hostname but cannot match TLD against
known list; The input does not appear to be a valid URI hostname; The
input does not appear to be a valid local network name

I've manually edited the base_url values in the db but when I load store/config/web these changes are not reflected. I am at a loss as to where it's pulling the data on the admin backend since it's ignoring the db values.
db config:

store/config/web/unsecure and secure urls:

store/config/web cookie settings:

You can tell this isn't my day job but I am managing the e-com for my dad since his budget doesn't allow someone actually qualified. Any help would be most welcome.


texts:
I'm a Magento 2 beginner that started using Magento for a couple of weeks.
I got assigned to check an issue in Product in Websites.

The issue is. If I unchecked the main websites and keep the A checked, the product should've still appear in the website A right? but when I Unchecked the main websites. The product dissapear globally (including website A). I use related product by Aheadworks to show the product on my front end. Can anyone help me?


texts: How magento calculate tax on product in reorder from admin ? Magento 1

texts:
How tax is calculated for products on reorder page in admin ?

I am trying to get the flow how the tax are calculated on reorder page,
I am using Avatax module, & found a bug that on reorder the product tax amount is different from original.
Any thoughts how its been calculated by magento ? ASAP


texts: Upgrading from Magento 2.2.6 to Magento 2.2.8

texts: How long should it take for developers to upgrade from Magento 2.2.6 to Magento 2.2.8? We have been told 18 hours but that seems a bit too much.


texts:
Here's an example with the About page:

    //First line of content entered into UI content editor

When looking inside my 2columns-right.phtml:

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

So this tells me this
 is somewhere in some template. I've tried grepping my entire Magento directory and find only references under product/view.phtml, list.phtml, and description.phtml. None of these are used for the CMS pages and so I'm at a loss for where I can find these content templates.

The end goal is finding where I can edit the templates to remove unwanted elements like this.


texts: Update magento attribute field based on value from a 'custom' table

texts:
I use m2epro as an ebay module. I have a 3rd party erp. I want to pull the m2epro value down with the api.
I figured the best way to do that way to tie the m2epro value into an product attribute and have the api call that value. I call attributes down all the time. I'm a little lost on what's the 'Magento' way to work with as an outside core table as I don't want to just run mysql update scripts or procedures to accomplish this. This is the update script I would use for this sample.

update catalog_product_entity_decimal t INNER JOIN catalog_product_entity a ON a.entity_id = t.entity_id INNER JOIN m2epro_ebay_listing_product b ON b.online_sku = a.sku SET t.value = b.online_buyitnow_price where t.attribute_id = 2862


texts: Magento Order Amount Doubling when creating order invoice

texts:
i am using this code

$order->setTotalPaid($totamount)->setBaseTotalPaid($totamount);
$order->setState('pending_validation','pending_validation', true);
$order->save();

to pay the order amount.
and also setting order status to Pending Validateion (custom order status).

After this i gose to magento backend and setting its payment validated. and order states gose to processing.
then i try to create invoice, its order amount is doubling.


texts: Resource problems after moving magento 2 to a different subdomain

texts:
I have moved a magento installation to a different subdomain on the same server. Everything is OK, except that for some mysterious reason, the links like pub/media/webp_image/athlete2/Demos/brazil/settings/logo-brazil_1.webp just loads the magento 404 page, while the file trying to access is there in the right place in the file system. I didn't want to hack the .htaccess files as I believe there is a standard solution I just don't know.
I've done these high-level steps so far:

Moved the files with preserve permission
Moved the database
Changed the database credentials in app/etc/env.php
Changed the domain in database table core_config_data
removed cache content rm -rf var/cache/* var/page_cache/* var/generation/* var/composer_home/cache/* var/log/* pub/static/*

Is there any steps missing?
How can I investigate this problem?


texts:
Which magento versions are the certifications based on for both the plus and regular versions?

Are the 1.6 for regular and 1.12 for enterprise?


texts: How to show the bestsellers products of only Completed Orders in the dashboard

texts:
I want to show BestSellers Products of only Completed orders in the Dashboard.
This is the file that I am editing
file path : Mage/Adminhtml/Block/Dashboard/Tab/Products/Ordered.php
Code :

class Mage_Adminhtml_Block_Dashboard_Tab_Products_Ordered extends Mage_Adminhtml_Block_Dashboard_Grid
{

    public function __construct()
    {
        parent::__construct();
        $this->setId('productsOrderedGrid');
    }

    protected function _prepareCollection()
    {
        if (!Mage::helper('core')->isModuleEnabled('Mage_Sales')) {
            return $this;
        }
        if ($this->getParam('website')) {
            $storeIds = Mage::app()->getWebsite($this->getParam('website'))->getStoreIds();
            $storeId = array_pop($storeIds);
        } else if ($this->getParam('group')) {
            $storeIds = Mage::app()->getGroup($this->getParam('group'))->getStoreIds();
            $storeId = array_pop($storeIds);
        } else {
            $storeId = (int)$this->getParam('store');
        }

        $collection = Mage::getResourceModel('sales/report_bestsellers_collection')
            ->setModel('catalog/product')
            ->addStoreFilter($storeId)
        ;

        //$collection->addFieldToFilter('status', 'complete');

        $this->setCollection($collection);

        return parent::_prepareCollection();
    }

    protected function _prepareColumns()
    {

        $this->addColumn('name', array(
            'header'    => Mage::helper('sales')->__('Product Name'),
            'sortable'  => false,
            'index'     => 'product_name'
        ));

        $this->addColumn('price', array(
            'header'    => Mage::helper('sales')->__('Price'),
            'width'     => '120px',
            'type'      => 'currency',
            'currency_code' => (string) Mage::app()->getStore((int)$this->getParam('store'))->getBaseCurrencyCode(),
            'sortable'  => false,
            'index'     => 'product_price'
        ));

        $this->addColumn('ordered_qty', array(
            'header'    => Mage::helper('sales')->__('Quantity Ordered'),
            'width'     => '120px',
            'align'     => 'right',
            'sortable'  => false,
            'index'     => 'qty_ordered',
            'type'      => 'number'
        ));

        $this->setFilterVisibility(false);
        $this->setPagerVisibility(false);
        return parent::_prepareColumns();
    }

    /*
     * Returns row url to show in admin dashboard
     * $row is bestseller row wrapped in Product model
     *
     * @param Mage_Catalog_Model_Product $row
     *
     * @return string
     */
    public function getRowUrl($row)
    {
        // getId() would return id of bestseller row, and product id we get by getProductId()
        $productId = $row->getProductId();

        // No url is possible for non-existing products
        if (!$productId) {
            return '';
        }

        $params = array('id' => $productId);
        if ($this->getRequest()->getParam('store')) {
            $params['store'] = $this->getRequest()->getParam('store');
        }
        return $this->getUrl('*/catalog_product/edit', $params);
    }
}

Image:
Does anyone know to how to sort by Completed orders only.


texts: $observer->getLayout()->getUpdate()->addHandle not work (AlgoliaSearch module)

texts:
I trying to install module AlgoliaSearch and its not working. So I began to explore its code and there is Observer where xml layout should be overwritten

 class Observer implements ObserverInterface
{
protected $config;
protected $product_helper;
protected $helper;

public function __construct(ConfigHelper $configHelper)
{
    $this->config = $configHelper;
}

public function execute(\Magento\Framework\Event\Observer $observer)
{
    if ($this->config->isEnabledFrontEnd()) {
        if ($this->config->getApplicationID() && $this->config->getAPIKey()) {
            if ($this->config->isPopupEnabled() || $this->config->isInstantEnabled()) {
                $observer->getLayout()->getUpdate()->addHandle('algolia_search_handle');

                if ($this->config->isDefaultSelector()) {
                    $observer->getLayout()->getUpdate()->addHandle('algolia_search_handle_with_topsearch');
                } else {
                    $observer->getLayout()->getUpdate()->addHandle('algolia_search_handle_no_topsearch');
                }
            }
        }
    }
}
}

I printed some test strings in observer to check that it is executed, but xml layout is not overwritten. Why is that?

Here is \etc\frontend\events.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
<event name="layout_load_before">
    <observer name="algolia_injection" instance="Algolia\AlgoliaSearch\Model\Observer" />
</event>

I added var_dump to vendor\magento\framework\View\Result\Layout.php addHandle() function

 public function addHandle($handleName)
{   var_dump( $handleName);
    $this->getLayout()->getUpdate()->addHandle($handleName);
    return $this;
}

Modules layouts did not show up


texts: setup:db:status still reports "Declarative Schema is not up to date" after update

texts:
Since an update to Magento 2.3 I am experiencing the following issue:

bin/magento setup:db:status
Declarative Schema is not up to date
Run setup:upgrade to update your DB schema and data.

Although setup:upgrade has already been executed.

I've inspected the diff  from \Magento\Framework\Setup\Declaration\Schema\UpToDateDeclarativeSchema::isUpToDate() and see the following elements reported as not up to date:

id  type    old_type    new_type    new_name
0   drop_reference  reference   reference   MAGENTO_TARGETRULE_PRD_PRD_ID_SEQUENCE_PRD_SEQUENCE_VAL
0   drop_reference  reference   reference   MAGENTO_CATEVENT_EVENT_CTGR_ID_SEQUENCE_CAT_CTGR_SEQUENCE_VAL
0   drop_reference  reference   reference   FK_12C2962523CC7EF2EA73AD4121B5DBFF
0   drop_reference  reference   reference   MAGENTO_BANNER_CATRULE_RULE_ID_SEQUENCE_CATRULE_SEQUENCE_VAL
0   drop_reference  reference   reference   MAGENTO_BANNER_SALESRULE_RULE_ID_SEQUENCE_SALESRULE_SEQUENCE_VAL
0   drop_reference  reference   reference   FK_81ACD87B0CB5AB8CC9B8D0B05F30FBB8
0   drop_reference  reference   reference   MAGENTO_SALESRULE_FILTER_RULE_ID_SEQUENCE_SALESRULE_SEQUENCE_VAL
0   drop_reference  reference   reference   MAGENTO_CATPERMISSIONS_CTGR_ID_SEQUENCE_CAT_CTGR_SEQUENCE_VAL
0   drop_reference  reference   reference   VISUAL_MERCHANDISER_RULE_CTGR_ID_SEQUENCE_CAT_CTGR_SEQUENCE_VAL
249 add_complex_element NONE    reference   MAGENTO_TARGETRULE_PRD_PRD_ID_CAT_PRD_ENTT_ENTT_ID
303 add_complex_element NONE    reference   MAGENTO_CATEVENT_EVENT_CTGR_ID_CAT_CTGR_ENTT_ENTT_ID
326 add_complex_element NONE    reference   MAGENTO_VERSIONSCMS_HIERARCHY_NODE_PAGE_ID_CMS_PAGE_PAGE_ID
331 add_complex_element NONE    reference   MAGENTO_BANNER_CATALOGRULE_RULE_ID_CATALOGRULE_RULE_ID
332 add_complex_element NONE    reference   MAGENTO_BANNER_SALESRULE_RULE_ID_SALESRULE_RULE_ID
346 add_complex_element NONE    reference   MAGENTO_REMINDER_RULE_SALESRULE_ID_SALESRULE_RULE_ID
381 add_complex_element NONE    reference   MAGENTO_SALESRULE_FILTER_RULE_ID_SALESRULE_RULE_ID
383 modify_column   decimal decimal adjustment_positive
383 modify_column   decimal decimal adjustment_negative
388 add_complex_element NONE    reference   MAGENTO_CATPERMISSIONS_CTGR_ID_CAT_CTGR_ENTT_ENTT_ID
396 add_complex_element NONE    reference   VISUAL_MERCHANDISER_RULE_CTGR_ID_CAT_CTGR_ENTT_ENTT_ID

Any idea, why indexes etc. are not updated? If I look at the magento_targetrule_product table for example, the constraint that should have been dropped is indeed still there and the new one has not been added.


texts: Create shopping cart price rule with coupon on clicking Place Order

texts:
I am working on a custom module in which I need to generate a coupon with "n" number of uses per order while clicking "Place Order" in checkout page.

Can anyone suggest me the best way for it.


texts: I've been customizing the labels in ../template/payment/form/checkmo.phtml since I don't want tu use it for check/cash but for another purpose - but the labels still figure as normal in the customers order email ? Should this be changed somewhere else perhaps?


texts: Magento 2 addFieldToFilter equal today for datetime field

texts:
I have a model with field in datetime format, i want to filter the field with equal today date like this:

$collections = $this->customFactory->create()->getCollection()
      ->addFieldToFilter('created_at',date("Y-m-d"));
return $collections->getSize();

but it always return 0


texts: How can I overwrite the color of the navigation element

texts:
I just spent two hours looking for the correct variable name to override the color of the navigation active border..

Just prior, at least another two removing the "create an account" button, which of course left a random "or" sitting there.. I had to google how to get rid of that.

Is there a way to do this without going insane?


texts: Swagger not loading - 500 error: "message":"Internal Error. URL.com/rest/all/schema

texts:
Found a couple error log entries that may be causing it. But I don't read log files very well. I can't find much on Swagger issues. Could it be the setup of Magento on my host?
500 : {"message":"Internal Error. Details are available in Magento log file.
[2020-12-02 02:23:48] main.DEBUG: cache_invalidate:  {"method":"POST","url":"http://www.URL.com/admin/admin/index/index/key/6c558b5736cfb18795d1767a283cd2e99f669b3466dbb0d08ec8a1cada22b244/","invalidateInfo":{"tags":["BACKEND_MAINMENU"],"mode":"matchingAnyTag"},"is_exception":false} []
[2020-12-02 02:37:08] main.DEBUG: cache_invalidate:  {"method":"POST","url":"http://www.URL.com/admin/admin/system_config/save/key/ada8eb815031f0e8fdee95f3923a54f41b2b4a5a99b544465fc84d77d0b3ae61/section/webapi/","invalidateInfo":{"tags":["config_scopes","CONFIG"],"mode":"matchingTag"},"is_exception":false} []
I had just created an API key when I got this error last night. Flushed cache and went to bed. This AM, still seeing it.


texts: What is the most popular database choice for Magento 2?

texts: this question sounds more like a poll because I'm just curious as to what database is the most commonly used for Magento2. I currently use MariaDB 10 from following an installation tutorial online, but I'm a bit wary because I've recently read the official documentation and it says that MariaDB may not be fully compatible with Magento2. What is the most widely used database for Magento2?


texts: magento 2.x using composer in windows localhost

texts:
I not able to set the Megento 2.4.0 as the setup button is not displaying on screen after downloading megento.
Attaching screenshot for the reference of Where am I actually stuck .


texts:
Using Magento 2.3, I'm trying to get a custom attribute from the order and save it to the invoice when the invoice is first created.

I already have the custom attributes setup and saving to the order when order is first placed, but can't seem to pass that variable and save it to the invoice once that's created.

I have an observer for the event sales_order_invoice_pay:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="sales_order_invoice_pay">
        <observer name="salesrep_sales_order_invoice_pay" instance="Vendor\Module\Observer\Sales\Invoice\Salesrep"/>
    </event>
</config>

and my observer:

<?php
namespace Vendor\Module\Observer\Sales\Invoice;

use Magento\Framework\Event\ObserverInterface;

class Salesrep implements ObserverInterface
{

  protected $messageManager;

  public function __construct(
    \Magento\Framework\Message\ManagerInterface $messageManager
  ){
    $this->messageManager = $messageManager;
  }

  public function execute(\Magento\Framework\Event\Observer $observer)
  {
    try {
      $invoice = $observer->getEvent()->getInvoice();
      $order = $invoice->getOrder();
      $salesrep = $order->getData('salesrep');
      $invoice->setSalesrep($salesrep);
    } catch (\Exception $e) {
      $this->messageManager->addError(__($e->getMessage()));
      return null;
    }
  }
}

The custom order attribute that I'm trying to save to invoice is called salesrep, I've confirmed that the salesrep is saving properly to the Order but not saving to the invoice.

EDIT: Here is the code I'm using to save salesrep to the order initially.

events.xml

<event name="sales_order_place_after">
        <observer name="salesrep_sales_order_place_after" instance="Vendor\Module\Observer\Sales\Order\Salesrep"/>
    </event>

My observer:

<?php
namespace Vendor\Module\Observer\Sales\Order;

use Magento\Framework\Event\ObserverInterface;

class Salesrep implements ObserverInterface
{
  public function __construct(
    \Magento\Customer\Api\CustomerRepositoryInterface $customerRepositoryInterface
  ){
    $this->_customerRepositoryInterface = $customerRepositoryInterface;
  }

    public function execute(\Magento\Framework\Event\Observer $observer)
    {
      $order = $observer->getEvent()->getOrder();

    try {
        $customer = $this->_customerRepositoryInterface->get($order->getCustomerEmail(), $websiteId = 1);
        $salesrep = $customer->getCustomAttribute('salesrep')->getValue();
        $order->setSalesrep($salesrep);
    } catch (\Magento\Framework\Exception\NoSuchEntityException $noSuchEntityException) {
        return null;
    }
    }
}


texts: Get all customers by the specific zip code

texts:
Help me please to write a SQL query that returns the customer ID of addresses that contain the "@" symbol in the zip code field. Or just tell me which tables magento uses to keep zip codes.
Thanks


texts: Magento 2 system config get frequency full value

texts:
in magento system config xml one can use:

<field id="frequency" translate="label" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1">
     <label>Frequency</label>
     <source_model>Magento\Cron\Model\Config\Source\Frequency</source_model>
     <backend_model>Magento\Cron\Model\Config\Backend\Sitemap</backend_model>
</field>

This will create an html select option:

As you can see the selected option value is weekly on save config magento store as W When I retrieve I get W but I need full value like Weekly

Does magento provide to fetch full value if so how?


texts: Update JS in core magento commands to make them work

texts:
Maybe a stupid question, but the answers i can find are all differtent.

I changed some JS in core magento (vendor/magento), what CLI commands i need to make them effective? Is below correct (magento 2.2 with redis cache)

rm -rf generated/code* generated/metadata* var/view_preprocessed/*; rm -R pub/static/*;

php bin/magento cache:flush && php bin/magento setup:upgrade && php bin/magento setup:di:compile && php bin/magento setup:static-content:deploy && php bin/magento setup:static-content:deploy nl_NL && php bin/magento indexer:reindex


texts: Magento 2 - How to Redirect Customer for Checkout After Login when cart is not empty

texts:
How to redirect customers to the checkout page after login when the cart is not empty for the customer?
Loginpost\Redirect\etc\frontend\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">
  <type name="\Magento\Customer\Controller\Account\LoginPost">
    <plugin name="loginpost_redirect_loginpostplugin" type="\LoginPost\Redirect\Plugin\LoginPostPlugin" sortOrder="1" />
  </type>
</config>

Loginpost\Redirect\Plugin\LoginPostPlugin.php
<?php

namespace Loginpost\Redirect\Plugin;

class LoginPostPlugin
{
    public function afterExecute(
        \Magento\Customer\Controller\Account\LoginPost $subject,
        $result)
    {
        $result->setPath('/checkout');
        return $result;
    }
}

Now I'm getting following error after adding this plugin to my project.


texts: What are basic steps for installing a third party theme in Magento 2?

texts:
[ Asking for the proper sequence and  the basic steps ]

Hello, I am beginner to Magento 2, and its folder structure.

I am trying to install a theme in M2, and has finally installed. But to achieved I had tried some more efforts(google and stack overflow).

So, My questions is as below:

Why we need to give permissions to our magento2 folder every time.
What are the basic steps for installing theme in magento2.
What are the importance/requirement of  commands for (deploy/index/compile).
How many ways of installing theme in magento2.

Thanks in advance.


texts: Unable to set set max_clause_count on ElastiSearch 2.4.5

texts:
I have set elasticsearch on Magento 2 Enterprise Edition. On trying to load categories page, I get these error:

(Elasticsearch\Common\Exceptions\ServerErrorResponseException): too_many_clauses: maxClauseCount is set to 1024

When I try to update elasticsearch.yaml to index.query.bool.max_clause_count: 10024 as suggested here http://devdocs.magento.com/guides/v2.1/config-guide/elasticsearch/es-overview.html elasticsearch does not start.

I have read that setting maxClauseCount has been deprecated in Elasticsearch 5 https://www.elastic.co/guide/en/elasticsearch/reference/5.0/breaking_50_settings_changes.html#_search_settings. But I am using version 2.4.5

How do I go about setting maxClauseCount?


texts: Magento connect cant install extension but manual install works

texts:
I am trying to install a magento extension via connect and i keep getting the following error.

CONNECT ERROR: Package file is invalid
'./app/etc' already exists

If i unzip the extension i can easily do a manual install and it works perfectly.

Did anything change between 1.8 and 1.9 that causes this problem ?

I also have write access to the directories.

Edit: I am trying to install this on CE 1.9

My package.xml was missing a few details this was my problem


texts: Getting shipping and billing addresses from a guest-checkout order

texts:
For orders checked out by a non-registered customer (i.e. guest), Magento doesn't create a customer. However, it does store the address information in sales_flat_order_address. How do you access this data? Under this table, there are columns like firstname, lastname, address_type (billing/shipping), etc. which are what I need.

I tried loading the order object (sales/order), thinking the associated table data would be available from this, but they don't seem to be. Since I can't get the entity_ids of sales_flat_order_address corresponding to an order in sales_flat_order, how would I get the shipping and billing address in this case? I am not able to load by the parent_id, which is the row ID of the main order table, either.

I can access sales_flat_order_payment data via ->getPayment(), but ->getAddress(es)() doesn't seem to work.

Any ideas?


texts: Magento 2 Readiness Check give error after change

texts:
Magento 2.1.7 System > Web Setup Wizard > System Upgrade, After changes php setting its gives same error in

  Readiness Check

Current PHP version is 7.0.23 but still give 7.0.18.
following command already run.

php bin/magento setup:upgrade

php bin/magento setup:static-content:deploy

php bin/magento cache:clean

php bin/magento cache:flush

memory_limit also 768M set in local and 1024M in master.

No system.log genrate.Any thing wrong ?


texts: Magento 2.3. - Show fullpath in breadcrumb on product detail page

texts:
Is there any workaround to show the fullpath with category and subcategories in the breadcrumb on the product detail page?

It now only shows: Home > Product "myproduct"


texts: Allowing the customer to delete their address within the checkout

texts:
I have a store which has a slightly modified checkout.

I can't find the exact link right now on the original example, but I ditched the address drop-down and added an address grid where it lists the addresses in a grid layout with a button below to add a new one (you click it and a form opens)

EDIT: http://hkpatel201.blogspot.co.uk/2013/04/change-shipping-address-dropdown-at.html Might be the tutorial.

This works fine, but it can be a bit confusing for some customers.

Is there way of adding a "delete address" link within the checkout? There's one in the account panel:

<?php echo $this->__('Delete Address') ?>

And

Which I naively thought would work within the checkout, but it didn't.

Deleting an address via the customer model is straightforward, so surely as long as the page refreshes I should have no problem?

Plus, the administrator can just as easily remove addresses as well, so it can't have any consequences on relationships with old orders etc.

Any help would be awesome :)

Tom


texts: Magento 2.3.3 - Unable connect error - Nginx - Centos 7 - PHP 7.1

texts:
After successfully install magento 2.3.3 in centos 7 with nginx, url getting Unable connect error.

Install nginx

Configure nginx

Install magento 2.3 using following commands,

  php bin/magento setup:install --base-url=http://localhost/magento2
  --db-host=localhost --db-name="magento2" --db-user="root" --db-password="" --admin-firstname="abc" --admin-lastname="abc" --admin-email=abc@gmail.com --admin-user="magento2" --admin-password="magento2123" --language="en_US" --currency="INR" --timezone="Asia/Kolkata" --use-rewrites="1"

Configure SELinux and Firewalld

/etc/nginx/conf.d/magento.conf

upstream fastcgi_backend {
  server  unix:/run/php-fpm/php-fpm.sock;
}

server {
  listen 8091;
  server_name 192.168.1.64;
  set $MAGE_ROOT /usr/share/nginx/html/magento2;
  include /usr/share/nginx/html/magento2/nginx.conf.sample;
}

If i try the url : 19.168.1.64:8091 getting error like  Unable connect error

Anything else i missed?


texts: Bundle product on cart shows up price 0 (REST API)

texts:
I'm using Magento 2.3 as a headless solution, having an Angular app as a storefront  and using REST API to manage eCommerce functionalities.

The fact is, in certain conditions, a bundled product with fixed price, have a 0 price after being added to the cart.

I'm working with guest carts and the flow is like the detailed below:

POST /rest/V1/guest-carts
POST /rest/V1/guest-carts/{{quoteId}}/items

{"cartItem": {
    "sku": "bundled-product",
    "qty": 1,
    "quoteId":"quoteId",
    "productOptions": {
        "extensionAttributes": [
            "bundleOptions": {...}
        ]
    }
}}

In this moment, the cart shows up the inserted product with its correct price
DELETE /rest/V1/guest-carts/{{quoteId}}/items/{{itemId}}
POST /rest/V1/guest-carts/{{quoteId}}/items (with the same previous product)
In this moment, the cart shows up the inserted product but with price 0

Have anyone faced this problem/issue? Have anyone resolved or fixed? Am I making something wrong?

Thanks in advance!


texts: Call to a member function getValue() on null in ./Model/Method/AbstractMethod.php:801 for Magento 2

texts:
Hi i have creating payment method but i was stuck here

Getting Fatal error in checkout page:

Uncaught Error: Call to a member function getValue() on null in /home/vhost/_default/magentoto/vendor/magento/module-payment/Model/Method/AbstractMethod.php:801
Stack trace:
#0 /home/vhost/_default/magentoto/generated/code/Mymodule/Iveri/Model/PaymentMethod/Interceptor.php(596): Magento\Payment\Model\Method\AbstractMethod-&gt;getConfigData('sort_order', '1')
#1 /home/vhost/_default/magentoto/vendor/magento/module-payment/Model/PaymentMethodList.php(58): Mymodule\Iveri\Model\PaymentMethod\Interceptor-&gt;getConfigData('sort_order', '1')
#2 [internal function]: Magento\Payment\Model\PaymentMethodList-&gt;Magento\Payment\Model\{closure}(Object(Mymodule\Iveri\Model\PaymentMethod\Interceptor), Object(Magento\Vault\Model\Method\Vault\Interceptor))
#3 /home/vhost/_default/magentoto/vendor/magento/module-payment/Model/PaymentMethodList.php(59): uasort(Array, Object(Closure))
#4 /home/vhost/_default/magentoto/vendor/magento/module-payment/Model/PaymentMethodList.php(84): Magento\Payment\Model\PaymentMethodList-&gt;getList('1')
#5 /home/vh in /home/vhost/_default/magentoto/vendor/magento/module-payment/Model/Method/AbstractMethod.php on line 801

Also i have searched about this issue but not getting any solution also file is path is different for this type of questions.

If anyone know about this bug. please provide solution (Thanks in Advance)


texts: How can I make products with positive qty out of stock?

texts: I would like only products that have qty=>5 to be marked as in stock, those that are less than five would be marked as out of stock and they won't be available for sale.


texts: Magento 2 country name not showing in Billing/shipping address at checkout.

texts:
I installed fresh Magento 2.1.8.I didn't change anything.
When I am trying to place an order, I noticed country field is empty in billing as well shipping section.

I don't think that I am doing anything wrong.so I think it's magento's  bug.

Is there anyone else see the same or I forgot something ?
And If this bug please give me some smart(without mess up core) solution.

Thanks.


texts: How to call top link after the searchbar

texts: How to move top link after the search bar(like sign in and create account).


texts: Onlick on product images in Magento pops up wrong text

texts: Of recent, if anyone clicks on the image of my website, it pops up an onclick function with text "dfsd" I would love to change this or better still remove it. But, do not know where to find the file that has it magento(1.9.2) Thank You...image below


texts: Magento 1.9 : Geo Location based Home page

texts:
How do I setup to have different home page based on Geo Location IP ?

I would like to display the Home page 1 to the local customer and for rest of the customer it should load Home page 2.


texts: Show SKU on product add to cart alert notification

texts:
Is there a way to add product SKU on add to cart alert notification right now it shows the product name and I want to display the SKU also.
Please see the attached screenshot. http://prntscr.com/l7cfjx

Thanks.


texts: Unique account identifier / Several accounts with same email address possible?

texts:
We are a manufacturer of dance wear apparel.  Some of our customers have multiple businesses, for example,  one for dance and one for cheerleading.  The business owner wants to have two different accounts with us, separating the business lines.   But, they want to use the same email address for both accounts.

We are told that in using Magento, that condition would not be allowed, as   Magento uses the email address as the unique identifier for an account.

Is this true?   If so, has anyone ever run in to this issue.  Are there any add-on modules or plugins that would allow a different unique identifier to function as the logon.


texts: Magento2: Updating products with CSV duplicates product_id in cataloginventory_stock_item

texts:
Any ideas why Magento 2 creates duplicate product_id into cataloginventory_stock_item table for each product that I try to update via import functionality?

Thanks.


texts: Magento2 few product images does not apper in listing page

texts:
i am facing issue on plp page on magento2.3.2 version
in backend those product is not going to display the image that product has a images in backend.
and few product already set the role of the image as base,small image thumbnail all but still it was not going to display the images in fronend.
i try all possible way.
if anyone know the solution for that please let me know.
thanks


texts: Loaded image showing broken image symbol on backend and frontend

texts: When I load a new image to product or page I get a broken image symbol on backend and frontend. Previous loaded images in the storage root are able to load fine. New images add to storage root look fine in storage root file but when uploaded the same broken image symbol. Same happening on all 3 magento sites. Loaded images are going in the media folder and look fine same as all previous loaded images that are working fine on sites.


texts: Magento 2: Display header and footer menu in IWD one page checkout extension

texts:
I'm trying to add the header and footer to a template in an extension called iwd one page checkout.

Please note the solution posted here does not seem to have any effect:

Magento 2.2 IWD Onepage Checkout Issue

I've identified the layout file as:

magento\app\code\IWD\Opc\view\frontend\layout\onepage_index_index.xml

which contains

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      layout="checkout"
      xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <update handle="checkout_index_index"/>
    <head>
        <css src="//fonts.googleapis.com/css?family=Open+Sans:400,400italic,700italic,700" src_type="url"/>
        <css src="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" src_type="url"/>
    </head>
    <body>
        <referenceBlock name="page.main.title" remove="true"/>
        <referenceBlock name="iwd_opc_ga_ab" remove="true"/>
        <referenceBlock name="checkout.root">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">IWD_Opc::onepage.phtml</argument>
            </action>
            <block class="Magento\GiftMessage\Block\Cart\GiftOptions"
                   name="checkout.gift_options"
                   template="IWD_Opc::gift_options.phtml"
                   cacheable="false">
            </block>
        </referenceBlock>
        <referenceContainer name="before.body.end">
            <block class="Magento\Framework\View\Element\Template"
                   name="iwd.opc.popup"
                   template="IWD_Opc::popup.phtml">
            </block>
        </referenceContainer>
    </body>
</page>

What I did was try to add the following line

<block class="Redgiant\Xstore\Block\Template" name="xstore_header" template="Magento_Theme::html/xstore_header.phtml" before="main.content"/>

from:

magento\app\design\frontend\Redgiant\xstore\Magento_Theme\page_layout\override\base\1column.xml

However, that has had no effect. I know editing the file onepage_index_index.xml does work as altering the includes in the head carry through.

I think it may be something to do with the class and template references but I'm not sure.

Any help would be really appreciated.

Many Thanks


texts: Images not displaying in correct order for configurable product in magento 2.3.3

texts:
The images for the configurable product dont appear in proper order as in backend.
See https://prnt.sc/128ldmw and https://prnt.sc/128leye
I want to display them in the same order as they are in the backend.
I am using magento 2.3.3 instance.


texts: How to create partial invoice using rest API in Magento-2.1?

texts: I have one order, this order is having 3 items. I want to create different invoices of different items using Rest API. It is possible using the admin panel in Magento-2.1, but not using rest API. How to create a partial invoice?


texts: Magento2 checkout gives "Cannot read property 'items' of undefined - totals.js:22"

texts:
When checking out out as a logged in user, adding my address in step one and clicking to proceed to the next step, I get the following error;

  Cannot read property 'items' of undefined` on line 22 in pub/static/frontend/Vendor/theme/en_GB/Magento_Checkout/js/model/totals.js

I'm running Magento 2.2.2


texts: Magento 2.3 modify link plugin in WYSIWYG TinyMCE4

texts:
In Magento 2.3 i'm trying to modify the link plugin to add a field to select a class for the link.

I had something like this in Magento1 :

*

I wish to have the same here in Magento 2.3 :

I tried to follow the TinyMCE4 doc https://www.tiny.cloud/docs-4x/plugins/link/ with the "link_class_list" option with no success.

Following the M2.3 doc did not help me, https://devdocs.magento.com/guides/v2.3/ui_comp_guide/components/ui-wysiwyg.html

What is the best way to add option to an existing plugin in magento 2.3 ?

Thank you


texts:
I have paypal as the defaultmethod payment and i have created an account with wrong information so when i procced to pay wiith paypal it show me this message :
PayPal gateway has rejected request. A match of the Shipping Address City, State, and Postal Code failed (#10736: Shipping Address Invalid City State
how can i fix this?!! thansk in advance


texts: Profiling magento (category manager) using xdebug profiler

texts:
I am looking at reported speed issue in admin category manager, where some categories can take up to 2 minutes of load time after the tree view was clicked. There are now errors anywhere, simply just (sometimes) take very long to load.

Since I had never used xdebug profiler (cachegrind) result inside PHPStorm, I figured this is a great opportunity to try that out, and see how PHPSTorm deals with the data.

However, I have run into an issue: The profiled page load never seems to end, or is just simply taking soooo long to profile, it s simply not viable to use.

I initiated the page load of a category (profiled) 12 hours ago, and it is still loading! - that is simply not practical. I can see the cachegrind file is still being written by using a watch ls -la on terminal

So, my question(s) are:

Has someone done this, using xdebug profiler, specifically on category admin page?
Is the issue directly related to my environment, or has someone else have this happen?

Any advise, or suggestions profiling another way? (I am aware of AOE_Profiler, and use it a lot, just wanted to try using xdebug profiler)

In case it is of importance, my xdebug ini is this:

zend_extension=xdebug.so
xdebug.remote_enable=1
xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
xdebug.remote_autostart=1
xdebug.profiler_enable_trigger=On
xdebug.profiler_enable=0
xdebug.profiler_output_dir=/var/www/html/var/profiler
xdebug.max_nesting_level=200
xdebug.profiler_output_name="%R-%u.trace"
xdebug.profiler_append=On

Directly after this question, I am going to attempt profile another admin section, to see if that works faster.

PS: this is done on a core i7 CPU, with 12G memory, so should be more than enough processing power.


texts:
I installed some updates for extensions manually and they work as expected. Looking at the Connect Manager still shows the old version. Why is that?
I cleared the cache, so that can be the problem.

The same is true vor Magento version updates. If I updated from 1.9.0.1 to 1.9.2.2, it would still show 1.9.0.1.


texts: How to solve Soap_V2 - Uncaught SoapFault exception looks like we got no XML document - SoapClient->__call('login', Array)?

texts:
After configuration SOAP_v2 for getting products info,

Magento version : 1.9.2.3

Code:

<?php
$proxy = new SoapClient('abc.com/api/v2_soap/?wsdl');
$sessionId = $proxy->login((object)array('username' => 'bala', 'apiKey' => 'bala123'));
$result = $proxy->catalogProductInfo((object)array('sessionId' => $sessionId->result, 'productId' => '9699'));
var_dump($result->result);
?>

And error is,

PHP Fatal error:  Uncaught SoapFault exception: [Client] looks like we got no XML document in /home/abc/public_html/bala.php:3
Stack trace:

#0 /home/abc/public_html/bala.php(3): SoapClient->__call('login', Array)
#1 {main}
  thrown in /home/abc/public_html/bala.php on line 3*

How can i solve this error?


texts:
I got this error when running setup:static-content:deploy on Magento 2.1.8:

Compilation from source: /microcloud/domains/vampm2/domains/mydomains.co.uk/http/vendor/magento/theme-frontend-blank/web/css/styles-m.less

Compilation from source:
frontend/Venustheme/cricket_child/en_GB/css/styles-m.less
variable @checkout-step-content-mobile__background is undefined in file /microcloud/domains/vampm2/domains/mydomain.co.uk/http/var/view_preprocessed/css/frontend/Venustheme/cricket_child/en_GB/Magento_Checkout/css/source/module/checkout/_shipping.less in _shipping.less on line 213, column 34
211|         .form-shipping-address,
212|         .methods-shipping {
213|             .lib-css(background, @checkout-step-content-mobile__background);
214|             .lib-css(margin, @checkout-step-content-mobile__margin);
215|             .lib-css(padding, @indent__base @checkout-step-content-mobile__margin-s);
 in _responsive.less

This is a .less file form /vampm2/domains/mydomian.co.uk/http/app/design/frontend/Venustheme/cricket_child/Magento_Checkout/web/css/source/module/checkout/_shipping.less:

.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__s) {
    .opc-wrapper {
        .form-login,
        .form-shipping-address,
        .methods-shipping {
            .lib-css(background, @checkout-step-content-mobile__background);
            .lib-css(margin, @checkout-step-content-mobile__margin);
            .lib-css(padding, @indent__base @checkout-step-content-mobile__margin-s);
        }

UPDATE The variable is not defined within this file. There are variables defined at the top of this page but checkout-step-content-mobile__background is not. From comments below, the checkout-step-content-mobile__background variable is defined in the _checkout.less file and I have found the declaration only in the http\vendor\magento\theme-frontend-luma\Magento_Checkout\web\css\source\module\checkout\_checkout.less but from what the system.log say's, it's trying to pull it from theme-frontend-blank:

[2017-12-14 12:24:08] main.CRITICAL: Compilation from source: /microcloud/domains/vampm2/domains/operationvape.co.uk/http/vendor/magento/theme-frontend-blank/web/css/styles-m.less

UPDATE

Here is the error from my system.log:

[2017-12-14 12:24:08] main.CRITICAL:
Compilation from source:
frontend/Venustheme/cricket_child/en_US/css/styles-m.less
variable @checkout-step-content-mobile__background is undefined in file /microcloud/domains/vampm2/domains/operationvape.co.uk/http/var/view_preprocessed/css/frontend/Venustheme/cricket_child/en_US/Magento_Checkout/css/source/module/checkout/_shipping.less in _shipping.less on line 213, column 34
211|         .form-shipping-address,
212|         .methods-shipping {
213|             .lib-css(background, @checkout-step-content-mobile__background);
214|             .lib-css(margin, @checkout-step-content-mobile__margin);
215|             .lib-css(padding, @indent__base @checkout-step-content-mobile__margin-s);
216|         }
 in _responsive.less [] []
[2017-12-14 12:24:08] main.CRITICAL: Compilation from source: /microcloud/domains/vampm2/domains/operationvape.co.uk/http/vendor/magento/theme-frontend-blank/web/css/styles-m.less