texts: Magento 2 Export CSV on Sales Order Grid with Custom Fields

texts:
I succesfully added some custom fields on Sales Order Grid.

If I export "Excel XML" is working fine but with "CSV" custom fields are blank.

I have compared the following files:

Magento\Ui\Model\Export\ConvertToXml

and

Magento\Ui\Model\Export\ConvertToCSV

Both files get items collecction in the same way:

Magento\Ui\Model\Export\ConvertToXml

$searchResult = $component->getContext()->getDataProvider()->getSearchResult();
$searchResultItems = $searchResult->getItems();

and

Magento\Ui\Model\Export\ConvertToCSV

$dataProvider = $component->getContext()->getDataProvider();
$items = $dataProvider->getSearchResult()->getItems();

But the second one seems not joining the custom tables defined in Module plugin:

public function aroundGetReport(
    \Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory $subject,
    \Closure $proceed,
    $requestName
) {
    $result = $proceed($requestName);
    if ($requestName == 'sales_order_grid_data_source') {
        if ($result instanceof $this->collection
        ) {
            if(is_null($this->registry->registry('cc_added'))){
                $this->logger->debug(print_r($this->collection->getSelect()->getPart('columns'),true));
                $select = $this->collection->getSelect();
                $select->joinLeft(
                    ['soi' => 'sales_order_item'],
                    'soi.order_id = main_table.entity_id',
                    [
                    'items_skus'  => new \Zend_Db_Expr('group_concat(soi.sku SEPARATOR ",")'),
                    'items_names' => new \Zend_Db_Expr('group_concat(soi.name SEPARATOR ",")')
                    ]
                );
                $select->joinLeft(
                    ['soa' => 'sales_order_address'],
                    'main_table.entity_id = soa.parent_id',
                    ['bill_to_country' => 'country_id']
                );
                $select->joinLeft(
                    ['bot' => 'bileamara_order_tickets'],
                    'bot.order_id = main_table.entity_id',
                    ['has_ticket' => 'bot.nr_tickets']
                );
                $select->where('`soa`.address_type = "billing" AND `soi`.product_type = "simple"');
                $select->group('main_table.entity_id');

                $this->collection->addFilterToMap(
                    'items_skus',
                    'soi.sku'
                );
                $this->collection->addFilterToMap(
                    'items_names',
                    'soi.name'
                );
                $this->collection->addFilterToMap(
                    'bill_to_country',
                    'soa.country_id'
                );
                $this->collection->addFilterToMap(
                    'has_ticket',
                    'bot.nr_tickets'
                );

                $this->registry->register('cc_added', true);

                return $this->collection;
            }
        }
    }
    return $result;
}

In fact, when I try to export the CSV by filtering through a custom field, I get the following error:

Exception #0 (Zend_Db_Statement_Exception): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'has_ticket' in 'where clause', query was: SELECT COUNT(*) FROM `sales_order_grid` AS `main_table` WHERE (`has_ticket` = '1') AND (`has_ticket` = '1')

Why Magento\Ui\Model\Export\ConvertToCSV dont't get joined tables like Magento\Ui\Model\Export\ConvertToXml?


texts: Update Product attribute value with custom option value on Add to cart in Magento 2

texts:
I have created three product attributes Length, Width, and Height. These will be used to calculate shipping for TNT Shipping Australia.

Now there will be custom options in some products as different dimensions. For this, I have created text fields in radio type custom options to save Length, Width, and Height as in the image.

Now in frontend on selecting the custom options, the Product attributes Length, Width and Height should be updated with the selected custom options Length, width and Height values. So TNT can calculate the shipping price with the selected values.

I was doing with Plugin using aroundAddProduct I am not getting how I will save the attributes values with the selected custom option values.

Or I have to go with the Observer .


texts: If Condition with "==" in Email Template {{depend}}

texts:
I am using simple if condition in email template.

{{depend order.delivery_time=="1"}}
Delivery Time: 10am To 2pm
{{/depend}}
{{depend order.delivery_time=="2"}}
Delivery Time: 2pm To 7pm
{{/depend}}
{{depend order.delivery_time=="3"}}
Delivery Time: 7pm To 10pm
{{/depend}}

But every time it is printing 1st value i.e. Delivery Time: 10am To 2pm
Can anyone tell me, how to check == in email template?


texts: How can I manipulate an advanced search url to work with a form?

texts:
I use search boxes throughout my site with this code-

<form action="/catalogsearch/result/" method="get">

And everything works great. I am now trying to use this same method with advanced search. The purpose is to only search within a single attribute. In my case this url works great-
/catalogsearch/advanced/result/?manufacturer=26&name=single+phase

The problem I am running into is if I try to use this code-

<form action="/catalogsearch/advanced/result/?manufacturer=26"  method="get">

It doesn't work. It seems like it strips ?manufacturer=26, but even if it didn't strip off the ? I don't think a url would work with two separate ? anyway. Anyone have any idea to fix this? Or a different idea to create a search by an attribute?


texts: Magento can't create cache product images!

texts:
Product cache folder is empty, seems like product images create failed. I have installed gd, and found logs below:

2014-12-04T01:22:17+00:00 ERR (3): Warning: call_user_func() expects parameter 1 to be a valid callback, function 'imagecreatefromjpeg' not found or invalid function name  in /var/www/html/magento/includes/src/Varien_Image_Adapter_Gd2.php on line 61
2014-12-04T01:22:17+00:00 ERR (3): Warning: imagecopyresampled() expects parameter 2 to be resource, null given  in /var/www/html/magento/includes/src/Varien_Image_Adapter_Gd2.php on line 376
2014-12-04T01:22:17+00:00 ERR (3): Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'imagejpeg' not found or invalid function name  in /var/www/html/magento/includes/src/Varien_Image_Adapter_Gd2.php on line 167

Magento: 1.9.0
PHP: 5.6.0
Apache: 2.4.6
Mariadb: 5.5.37


texts:
I'm trying to create a module with a route that handles filter. For example:

http://www.example.com/routename/color/blue/size/small

How can I setup the route so that it handles all child directories/paths (and throws 404s when not found)?


texts:
I created a module and I have a collection model class(under Model/Mysql4/MyModule/Collection.php), resource class (Model/Mysql4/MyModule.php), abstract model class (Model/MyModule.php) and a setup class (Model/Resource/Mysql4/Setup.php).

I really created them and my module worked perfectly. But I really don't know exact differences between all those models.

I really don't know which function should I put to which file. In a dummy example, I have a function to get all categories with 3 products inside. Where should I define my function and in which model ?


texts: Adding a product to cart programatically

texts:
We have a separate promotion rule. For that if customer place an order with certain condition we are giving a free product. For example if a customer placing more than 5 items attracts one same item compliment. From shopping cart price rule discount will be given in terms of amount.

So. I created checkout_cart_product_add_after event and inside the event I am adding below

public function checkoutCartProductAddAfter($observer) {

    $request = $observer->getQuoteItem();

    $sku = $request['sku'];
    $qty = $request['qty'];

    $product = Mage::getModel('catalog/product')->loadByAttribute('sku',$sku);
    $quantity = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product)->getQty();

    $addItionalProduct = Mage::getModel('catalog/product')->loadByAttribute('sku', 'MOTO-0');

    $productId = $addItionalProduct->getId();

    try{
        $params = array(
            'product' => $productId,
            'qty' => 2,
        );

        $cart = Mage::getSingleton('checkout/cart');

        $product = new Mage_Catalog_Model_Product();
        $product->load($productId);

        $cart->addProduct($product, $params);
        $cart->save();

        echo 'Done';
    } catch(Exception $e) {
        print_r($e->getMessage());
        die;
    }

}

Reference.

This throws the error message as below:

  Fatal error: Maximum function nesting level of '200' reached, aborting!

When I play below logic:

public function checkoutCartProductAddAfter($observer) {
    //$data = $observer->getEvent()->getQuoteItem()->getProduct()->getData();
    $request = $observer->getQuoteItem();

    $sku = $request['sku'];
    $qty = $request['qty'];

    $product = Mage::getModel('catalog/product')->loadByAttribute('sku',$sku);
    $quantity = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product)->getQty();

    $addItionalProduct = Mage::getModel('catalog/product')->loadByAttribute('sku', 'MOTO-0');

    $addItionalProductInventory = Mage::getModel('cataloginventory/stock_item')->loadByProduct($addItionalProduct);

    try{
        $cart = Mage::getModel('checkout/cart');
        $cart->init();
        $cart->addProduct($addItionalProduct, array('qty' => 1));
        $cart->save();
    } catch(Exception $e) {
        print_r($e->getMessage());
        die;
    }

}

I am getting below error:

  The stock item for Product is not valid.

Can some one guide me on this?


texts: Use store variables in checkout agreement links

texts:
Does anyone know the way to access the store variables in checkout agreement links? I want to use something like:

I confirm that I read the terms and conditions

but the store variable doesn't get processed.

Thank you for your ideas on this!


texts: Magento2: use Modernizr in my custom theme

texts:
I am developing a custom theme in Magento 2.1. I am writing some custom javascript functionalities and I need to use Modernizr. How to I include it in my custom theme?

This is my javascript code:

require([
        'jquery',
        'matchMedia',
        'modernizr'
    ], function($, mediaCheck, Modernizr) {
        console.debug(Modernizr.touch);
    }
);

This script causes a 404 error since the modernizr.js is not found.
How can be added lib/web/modernizr/modernizr.js to my custom theme?


texts:
I'm trying to read the invoice pdf from an external source. Can anybody tell me how can I make the external pdf available to the client overriding the one made available by default?

Thanks !


texts: Actual function which saves the product details to table and which object does the task?

texts:
Which is the actual function which saves all the product details on Clicking on Import button during csv import?
Where is the actual saving of any particular column that is happening in that function, like where exactly is the column say for eg: sku, attribute_set_code, product_type, categories etc gets saved?
Is the _saveProducts() under CatalogImportExport Model Product
the right function?
If so, which object is saving all the details in the table?


texts: add product to cart and change price and weight

texts:
I need a module that when you add product to cart check two conditions and if they are correct will change the price for the product in the basket.

I need do something like this:
- when product is added to the cart - get Qty and custom_attribute of product
- if qty<0 and cutom_attribute value for product is >0 change of product price in cart (the changed price should be use in transactional emails, order view, on the invoice etc.)

I try use checkout_product_add_after, but I cannot get product attribute and check condition. How to get custom product attribute in this event?

Maybe should I use another event?


texts:
Have an extension and want to enable it if $field1 == $field2 and if not extension be disable.

can enable it with line below but can not disable it when if is not true!

protected function _beforeSave()
{
    $value = $this->getValue();
    $fieldConf = $this->getFieldConfig();

    if ($value) {
        try {

            $fields2 = Mage::getStoreConfig('carriers/module/fields2');
            $fields1 = Mage::getStoreConfig('carriers/module/fields1');

            $condition = empty($fields2) || !$fields2 || empty($fields1) || !$fields1;

            if ($condition) {
                $err = Mage::helper('module')->__('extension not registered.');
                Mage::throwException($err);
            }

            if($field1 == $field2) {
                Mage::getConfig()->saveConfig('carriers/module/active', 1)->reinit();
                Mage::app()->getConfig()->reinit();
            } else {
                Mage::getConfig()->saveConfig('carriers/module/active', 0)->reinit();
                Mage::app()->getConfig()->reinit();
                $err = Mage::helper('module')->__('Is not valid and Disabled.');
                Mage::throwException($err);
            }
        }
        catch (Exception $e) {
            Mage::throwException($e->getMessage());
            return $this;
        }
    }

    return $this;
}


texts: Which core modules use RabbitMQ in Magento Open Source 2.3?

texts:
Starting with Magento 2.3.0, the Magento_Queue module for RabbitMQ becomes part of the Open Source edition.

Source:

https://community.magento.com/t5/Magento-DevBlog/Magento-2-Open-Source-has-a-new-Queueing-System/ba-p/92300
https://devdocs.magento.com/guides/v2.3/install-gde/prereq/install-rabbitmq.html

But I cannot find documentation on how it's being used in the core. Are there already features in the Open Source version, formerly known as Community Edition, that use RabbitMQ, if configured? Which ones?


texts: Remove Shipping Block in New Order Email

texts: I want to remove the line "Shipping & Handling $0.00" from "new order" emails. How can I do this?


texts: How to do Run Cron Automatically When Re-Index And Refresh Cache Required

texts: Ask continuously re-index and refresh cache, how can i set Re-Index and Refresh cache done by own when it's required. Is it possible ??


texts: Magento 2 - Setting out the layout of my theme for the homepage

texts:
I am in the process of creating a new Magento 2 theme.

The Theme is based on the Blank theme which comes with Magento 2.

I'm all sorted with the css and the Theme is working too but I now need to layout the different sections on my main page in a particular order.

My Theme has no layout files so do I have to copy them from Blank and put them inside my Theme?

If so where are they and where do I copy theme too?

Is this all I have to do to set the structure of my pages?


texts: How to include custom java script in adminhtml edit form?

texts:
I have created confirm password field in adminhtml edit.php file . For confirm password functionality, how to include java script in adminhtml edit form ?
Or
other method to check confirm password in custom Module befor save the form ?


texts: Magento - Get specific custom product option value

texts:
I'm trying to make a custom XML feed for Magento. Everything's fine and dandy, however I've hit a roadblock. I'm trying to get specific custom product options for my products, but the method I'm using only dumps all product options.

How can I split these?

Here's my code:

<?php
header('Content-Type: text/xml');

include '../app/Mage.php';
include 'ArrayXml.php';

Mage::app();

$_result   = array();
$_products = Mage::getModel('catalog/product')->getCollection()->addAttributeToSort('order', 'DESC')->addAttributeToSelect(array(
    'name',
    '*',
    'short_description',
    'description',
    'image',
    'media',
    'special_price',
    'special_from_date',
    'special_to_date',
    'current_category',
    'SKU',
    'id'
))->addPriceData();

foreach ($_products as $_product) {

    $productSku = $_product->getSku();
    $productId  = $_product->getIdBySku($productSku);

    $_product = Mage::getModel("catalog/product")->load($productId);
    $attVal   = $_product->getOptions();

    $optStr = "";

    // loop through the options
    foreach ($attVal as $optionKey => $optionVal) {

        $optStr .= $optionVal->getTitle() . ": ";

        foreach ($optionVal->getValues() as $valuesKey => $valuesVal) {

            $optStr .= " " . $valuesVal->getTitle();
        }
    }

    $arr         = Array();
    $catarr      = Array();
    $categoryIds = $_product->getCategoryIds();

    foreach ($categoryIds as $categoryId) {
        $category = Mage::getModel('catalog/category')->load($categoryId);
        $catarr[] = $category->getName();
    }
    $_gallery = Mage::getModel('catalog/product')->load($_product->getId())->getMediaGalleryImages();
    foreach ($_gallery as $_image) {
        $arr[] = "http://fancycouture.ro/media/catalog/product" . $_image->getFile();
    }
    $_result['product'][] = array(
        //'manufacturer' => 'Fancy',
        //'name' => $_product->getName(),
        //'categories' => array('category' => $catarr),
        //'product_code' => $_product->getSku(),
        //'price' => $_product->getFinalPrice(),
        //'bucati_disponibile' => '',
        //'description' => $_product->getDescription(),
        //'images' => array('image' => $arr),
        'dimensions' => $optStr
        /*'url_produs' => $_product->getProductUrl(),*/
    );
}
$_converter = new ArrayXML();
echo $_converter->toXML($_result);
?>

The output can be seen here


texts: Magento 2 -> if weight =>100 then disable shipping method

texts: How can I disable shipping method if product have weight is more than 100 ?


texts: Magento 2 - How to switch Product SKU according to the selection of child products?

texts:
I'm trying to change the SKU depending on the options choosen in configurable product.
I have tried this solution on Magento 2.3.3
https://magecomp.com/blog/switch-product-sku-according-selection-child-products-magento-2/
But it's not doing anything, SKU is not changing depending on dropdown list options.
The module is correctly installed.
here is my code:
Plugin\Swatches\Block\Product\Renderer\Configurable.php;
<?php

namespace Vendor\Configurable\Plugin\Swatches\Block\Product\Renderer;

class Configurable
{
    public function afterGetJsonConfig(\Magento\Swatches\Block\Product\Renderer\Configurable $subject, $result) {

        $jsonResult = json_decode($result, true);
        $jsonResult['skus'] = [];
        foreach ($subject->getAllowProducts() as $simpleProduct) {
            $jsonResult['skus'][$simpleProduct->getId()] = $simpleProduct->getSku();
        }
        $result = json_encode($jsonResult);

        return $result;
    }
}

Plugin\ConfigurableProduct\Block\Product\View\Type Configurable.php
<?php

namespace Vendor\Configurable\Plugin\ConfigurableProduct\Block\Product\View\Type;

class Configurable
{
    public function afterGetJsonConfig(\Magento\ConfigurableProduct\Block\Product\View\Type\Configurable $subject, $result) {

        $jsonResult = json_decode($result, true);
        $jsonResult['skus'] = [];
        foreach ($subject->getAllowProducts() as $simpleProduct) {
            $jsonResult['skus'][$simpleProduct->getId()] = $simpleProduct->getSku();
        }
        $result = json_encode($jsonResult);

        return $result;
    }
}

view/frontend/web/js/model/skuswitch.js
define([
    'jquery',
    'mage/utils/wrapper'
], function ($, wrapper) {
    'use strict';

    return function(targetModule){

        var reloadPrice = targetModule.prototype._reloadPrice;
        var reloadPriceWrapper = wrapper.wrap(reloadPrice, function(original){
            var result = original();
            var simpleSku = this.options.spConfig.skus[this.simpleProduct];

            if(simpleSku != '') {
                $('div.product-info-main .sku .value').html(simpleSku);
            }
            return result;
        });
        targetModule.prototype._reloadPrice = reloadPriceWrapper;
        return targetModule;
    };
});

view/frontend/web/js/model/swatch-skuswitch.js
define([
    'jquery',
    'mage/utils/wrapper'
], function ($, wrapper) {
    'use strict';

    return function(targetModule){
        var updatePrice = targetModule.prototype._UpdatePrice;
        targetModule.prototype.configurableSku = $('div.product-info-main.sku.value').html();
        var updatePriceWrapper = wrapper.wrap(updatePrice, function(original){
            var allSelected = true;
            for(var i = 0; i<this.options.jsonConfig.attributes.length;i++){
                if (!$('div.product-info-main .product-options-wrapper .swatch-attribute.' + this.options.jsonConfig.attributes[i].code).attr('option-selected')){
                    allSelected = false;
                }
            }
            var simpleSku = this.configurableSku;
            if (allSelected){
                var products = this._CalcProducts();
                simpleSku = this.options.jsonConfig.skus[products.slice().shift()];
            }
            $('div.product-info-main.skus.value').html(simpleSku);
            return original();
        });

        targetModule.prototype._UpdatePrice = updatePriceWrapper;
        return targetModule;
    };
});

view/frontend/requirejs-config.js
var config = {
    config: {
        mixins: {
            'Magento_ConfigurableProduct/js/configurable': {
                'Vendor_Configurable/js/model/skuswitch': true
            },
            'Magento_Swatches/js/swatch-renderer': {
                'Vendor_Configurable/js/model/swatch-skuswitch': true
            }
        }
    }
};

Greetings!


texts: Magento 2 - All products page with layered navigation and pagination

texts:
I want to create all product page with the filters, toolbar, pagination.

I can do it by creating a new category with the name All Products and assign all products in it. But I guess this is not a good approach, as if every time new products added to the website it should also be added to All Products category. There is a lot of chances of human error.

Is there a way of calling a category page with the root level category? like from ID: 2

It's okay if anyone doesn't want to write code for me, but if anyone can help me find an approach to do it that would be great.


texts: display some texts under "Search box" in magento

texts:
Please visit this link :

http://www.snapdeal.com/

how to display some words below search box as like above website.

than customers can easily find top searched terms.


texts: Filter product collection with nested OR/AND statements

texts:
I want to make a query as below
 WHERE manageStock = 0 OR (manageStock = 1 AND productStatus != 0) OR (manageStock = 1 AND backorderStatus = 1)

but I can't use $collection->getSelect()->where() because these are EAV attributes so I need to use addAttributeToFilter() for them.
Please help to use the above in Magento's way.


texts: How can I get all the products within the orders of a determine time interval, lets say from January to March ?


texts: Get error when running php bin/magento setup:di:compile

texts:
After firing this command in command line php bin/magento setup:di:compile I am getting this error:

  Cannot declare interface Magento\Framework\App\DeploymentConfig\Writer\FormatterInterface, because the name is already in use in /var/www/html/vendor/magento/framework/App/DeploymentConfig/Writer/FormatterInterface.php on line 9

Can you have a best solution for me?

Thanks


texts: updating group price overwrites some attributes of product

texts:
I have made a script which copies one customer group to another for products. However after running this script, I found out that it a) clears the URL key of the product and b) sets the visibility to Catalog, Search for all products. Also the script takes a verrrry long time (it reinitialised connection after 40 min, there are only some 300 products). Can anyone help me out?
This is the code:

function productCallback($args)
{
$product = Mage::getModel('catalog/product');
$product->setData($args['row']);
$product->getGroupPrice();
$groupPrices = $product->getData('group_price');
$price = 0;
$from = $_POST['from_group'];
$to = $_POST['to_group'];

foreach($groupPrices as $key=>$value)
{
    foreach($value as $subkey => $subvalue)
    {
        if ($subkey == "cust_group" && $subvalue == $from)
        {
            $price = $value['price'];
            $newGroupPrice = array(array ('website_id'=>0,
            'cust_group'=>$to,
            'price'=>$price,
            'website_price'=>$price,
            'all_groups'=>0));
            echo "price: ".$price . "<br/>";

            $newGroupPrices = array_merge($groupPrices,$newGroupPrice);

            $product->setData('group_price',$newGroupPrices);
            $product->save();
            break;
        }
    }
}
}

$products = Mage::getModel('catalog/product')->getCollection()
                ->addAttributeToSelect('sku')
                ->addAttributeToSelect(array('group_price'));

if($from > -1)
   Mage::getSingleton('core/resource_iterator')->walk($products->getSelect(), array('productCallback'), array('arg1' => '===='));


texts: Magento frontend take too long to respond

texts:
Magento frontend is taking too long to load(~2hrs). In browser's network tab the request remains in pending state throughout. Meanwhile the Admin Backend is loading fine.
Debug logs:
[2021-04-02 07:21:02] report.INFO: Broken reference: the 'yotpo_bottomline' tries to reorder itself towards 'product.info.addto', but their parents are different: 'product.info.main' and '' respectively. [] []
[2021-04-02 07:21:02] report.INFO: Broken reference: the 'top.navigation.links' tries to reorder itself towards 'op.search', but their parents are different: 'header-wrapper_schedule_block1' and '' respectively. [] []


texts: What is best way to add static blocks in front-end without defining css for responsiveness?

texts:
I want to define some static blocks in the header and footer of my theme
but I don't want to define css for their responsiveness.

Can I define static blocks, managed by magento admin panel for my front-end theme
without damaging responsiveness of theme template?

This is my header

here i have add this static block (Get 30-40% off on over 1,50,00 style).
I want to edit this block by admin panel without defining responsive css.


texts: It's possible to change language without changing store view?

texts:
I wonder if there is a way to setup a button to change the locale without having to change the store view, so this way you could create:

Store 1
Store 2
Store 3

And change languages no matter in what store you are.


texts: How to add a custom block within checkout cart summary in magento 2


texts: how to create custom Attribute in admin html

texts:
how to  create custom Template for custom product.
I have to create minimum order quantity and customer group under custom template.when the product is edited


texts: Get all associated categories from product collection

texts:
For a custom filter on the product collection i need to be able to get all associated categories from all products from the catalog search result. On top of that, i do not need the actual categories the products are in, but their 3th lvl parent to make it even more complicated.

I'd prefer a clean way over direct queries. Something like:

$_productCollection->getAssociatedCategories()

Is there any known build in method for this? I would like to avoid looping.

A direct query would work like this:

    SELECT t01.entity_id,t02.value AS `name`
    FROM catalog_category_entity t01
    LEFT JOIN catalog_category_entity_varchar t02
    ON t01.entity_id = t02.entity_id AND t02.attribute_id = 41 AND t02.store_id = 0
    LEFT JOIN (
        SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(tt02.path, '/', 4), '/', -1) AS `entity_id` FROM catalog_category_product tt01
        LEFT JOIN catalog_category_entity tt02
        ON tt01.category_id = tt02.entity_id
        WHERE tt01.product_id IN (".$this->stringWithProductIds().")
        GROUP BY SUBSTRING_INDEX(SUBSTRING_INDEX(tt02.path, '/', 4), '/', -1)
    ) t03
    ON t01.entity_id = t03.entity_id
    WHERE t01.parent_id = ".$this->2ndLvlParent()."
    AND t03.entity_id IS NOT NULL
    ORDER BY t02.value ASC


texts: Magento REST API Cannot add products (Nonce and Invalid attribute SKU)

texts:
I'm new to Magento REST APIs. I've been trying to POST a product to my Magento store through Postman. OAuth 1.0 is authorized and I've checked it by updating a product and getting product details which works fine. The problem arises when I try to insert a new product. First time when I click the send button it shows me the Error

  oauth_problem=nonce_used

And when I try to send it again it shows me a different error

  Invalid attribute \"sku\": The value of attribute \"SKU\" must be unique


texts: Can not decrease product quantity in checkout cart page - Magento 1.9.2.4 ?

texts: I have to click the minus option quantity is decreased 0. In quantity is fixed 1 and not decreased 0. Please find my screenshots.https://prnt.sc/jf970j.I have smart wave and Porto theme. Can you please help me?


texts: In Magento2 what is the place to override the quote?

texts:
In Magento2, I want to modify the Quote. I want to add some custom attributes to the items and change the order of the items.

At what level should it be done, Model, Controller, Block? Please, specify why. What are the pros and cons.

Thanks!


texts: how to improve the magento search - Apache Solr or google search

texts:
I used "Synonym" and " redirection" and using "LIKE AND FULL TEXT" to improve search

i heard about Apache Solr!

and there is an extension for integrating Apache Solr! to magento

http://www.magentocommerce.com/magento-connect/solr-bridge-search.html

is this the best solution for search in magento site ?

or is installing google search is better or is any other extension that give best searching in a site.

please give me some tips to improve the search in magento site.


texts: Why doesn't this work? (question about extending built in models)

texts:
// In a controller or cron script
$order_model = Mage::getModel('mypackage_module/order')->load($id);
$order_model->processStuff();

// in the model class
class Mypackage_Module_Model_Order extends Mage_Sales_Model_Order
function processStuff() {
  var_dump($this->getEntityId()); // "null"
}

the instance of Mypackage_Module_Model_Order was loaded using the load() call above, so why is getEntityId() null? What is the best practice/"Magento" way of making the model do some model processing?


texts: \Magento\Framework\Registry deprecated in magento 2.3, How to create instance with Registry?

texts:
/**
 * Registry model. Used to manage values in registry
 *
 * Registry usage as a shared service introduces temporal, hard to detect coupling into system.
 * It's usage should be avoid. Use service classes or data providers instead.
 *
 * @api
 * @deprecated
 * @since 100.0.2
 */

  https://www.mageplaza.com/devdocs/magento-2-registry-register.html

Who can show me a demo that use service classes or data providers instead.

thx.


texts: simple way to download all Email addresses from all orders on 1.9.1 and 1.3.1?

texts:
I searched around to find a solution to this and I tried some but they didn't work. I am more and more thinking about doing this from phpmyadmin. Is that the easiest way to download all Emails from all orders you think?

I have 2 systems I need to do this from:

an old 1.3.1
and a newer 1.9.1

What would the database fields in phpMyAdmin be called?

I am not against any other solution as long as it works...


texts: Is there a way for me to display the grid view of the products in 1 category page only and the rest are in list view?


texts: Update Product prices after adding to cart

texts:
I am trying to update product prices after adding to cart but the change on prices don't apply on it. I have created an event on checkout_cart_product_add_after while on observer I have written code like this :

class Cart implements ObserverInterface
{
    /**
     * @param \Magento\Framework\Event\Observer $observer
     */
    public function execute(\Magento\Framework\Event\Observer $observer) {

        $item = $observer->getEvent()->getData('quote_item');
switch ($item->getQty()) {
                    case '2':
                        $item->setOriginalCustomPrice($newarray[0]);
                        $item->setCustomPrice($newarray[0]);
                        $item->getProduct()->setIsSuperMode(true);
                        break;
                   case '3':
                        $item->setOriginalCustomPrice($newarray[1]);
                        $item->setCustomPrice($newarray[1]);
                        $item->getProduct()->setIsSuperMode(true);
                        break;
                 case '4':
                        $item->setOriginalCustomPrice($newarray[2]);
                        $item->setCustomPrice($newarray[2]);
                        $item->getProduct()->setIsSuperMode(true);
                        break;
                case '5':
                        $item->setOriginalCustomPrice($newarray[3]);
                        $item->setCustomPrice($newarray[3]);
                        $item->getProduct()->setIsSuperMode(true);
                        break;

                }

    }
}

$newarray array have different prices ( $newarray[0] => 29.5,$newarray[1]=>29.00  etc), at the last line when I show $item->getOriginalCustomPrice(); it shows new price but on the cart, the old prices are shown. Thanks


texts: Magento 2 - How to get value in "core_config_data" table

texts:
In magento 2, how to get value in core_config_data table.

Anyone know, show me step by step.Thanks!


texts: Magento 2.3.3 script errors in console. I have correct folder permissions set. Tried both Luma and Ultimo theme. Cleared static directory and regenerated content. Nothing has solved this issue? Any help?


texts:
Magento version 1.9.3.6

Full Error:

Fatal error: Call to undefined function hash_equals() in /var/www/vhosts/lassco/htdocs/app/code/core/Mage/Core/Model/Encryption.php on line 103

This occurs when I enter my admin details to login to the magento cms

I've checked my functions.php file and it seems to be patched correctly with the following code at the end of the file.

if (!function_exists('hash_equals')) {
    /**
     * Compares two strings using the same time whether they're equal or not.
     * A difference in length will leak
     *
     * @param string $known_string
     * @param string $user_string
     * @return boolean Returns true when the two strings are equal, false otherwise.
     */
    function hash_equals($known_string, $user_string)
    {
        $result = 0;

        if (!is_string($known_string)) {
            trigger_error("hash_equals(): Expected known_string to be a string", E_USER_WARNING);
            return false;
        }

        if (!is_string($user_string)) {
            trigger_error("hash_equals(): Expected user_string to be a string", E_USER_WARNING);
            return false;
        }

        if (strlen($known_string) != strlen($user_string)) {
            return false;
        }

        for ($i = 0; $i < strlen($known_string); $i++) {
            $result |= (ord($known_string[$i]) ^ ord($user_string[$i]));
        }

        return 0 === $result;
    }
}

Any help would be appreciated, thank you


texts:
I have added a custom block to the order information page.

But I would like to move it under account information.
How would I go on about doing this?

view/adminhtml/layout/sales_order_view.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceBlock name="order_info">
        <block class="Vender\Module\Block\Adminhtml\Order\View\Custom" name="sales_order_view_custom" template="order/view/custom.phtml" />
    </referenceBlock>
</body>
</page>


texts: Override core files in Magento 1.9.4 (Varien.php)

texts:
What would be the most appropriate structure of the module in order to rewrite function validate() at

  app/code/core/Mage/Core/Model/Session/Abstract/Varien.php

The idea is to rewrite that block with the following content :

if ($this->useValidateSessionExpire() ) {
    // If the VALIDATOR_SESSION_EXPIRE_TIMESTAMP key is not set, do it now
    if( !isset($sessionData[self::VALIDATOR_SESSION_EXPIRE_TIMESTAMP]) ) {
        // $this->_data is a reference to the $_SESSION variable so it will be automatically modified
        $this->_data[self::VALIDATOR_SESSION_EXPIRE_TIMESTAMP] = time() + $this->getCookie()->getLifetime();
        return true;
    } elseif ( $sessionData[self::VALIDATOR_SESSION_EXPIRE_TIMESTAMP] < time() ) {
        return false;
    }
} else {
    $this->_data[self::VALIDATOR_KEY][self::VALIDATOR_SESSION_EXPIRE_TIMESTAMP]
        = $validatorData[self::VALIDATOR_SESSION_EXPIRE_TIMESTAMP];
}


texts: Saving configuration in shipping method in backend goes to frontend

texts: When saving in backend (shipping method configuration) my site goes to frontend without saving.


texts:
Magento version: 2.0.0

When user add products into cart, where are they saved? $_SESSION or Database? If it is in database, which table?


texts: Best way to re-use modules/themes across multiple repositories

texts:
We run 3 websites. We have the same core module on our three websites. We also have a core theme that each of the three webites' theme uses as the parent.

Right now if I make an edit to the Vendor_Core module or frontend/vendor/default theme then I will manually copy the files across to the other 2 websites which isn't ideal.

What's the best way to manage this? I have three separate repositories for the whole Magento project..

should I move the core module and theme into their own repos?


texts: Get customer chosen shipping method with jQuery

texts:
How could i find out the shipping method that the customer has chosen right after click of change?

I have tried to get shipping methods id or value that customer has chosen when he/she has clicked on radio button. The code I am using is:

require(['jquery'], function ($) {
    $(document).ready(function () {
        $( '.radio' ).click(function() {
            console.log('Test');
        });
    });
});

When i refresh the page then radio buttons are coloured grey and nothing in log after click. I have tried also with jQuery .on('change', function () {...}. I think that the problem is that inside input element has written data-bind="checked:... clicked:... ". What can i do to get shiping method id or value?


texts: How to update product attribute with different values in magento 2?

texts:
I've created custom product attribute which is set on catalog_product_save_before event. Now i want to update value (i have two options of this value) of this attribute for all product, depends on few conditions . How can i do this? The fastest possible method. I can loop through all products and call $product->save(). But i was wondering if there is faster method?
Thanks in advance


texts: Magento 2.3 place the order button below payment methods

texts:
I want to move the place order button in my Magento 2.3 checkout, from inside the payment method itself, to below all payment methods.

So when selecting the payment method, it should be clicked on a place order button below all payment methods.


texts: MAGENTO2 :: SET CRON JOB WAMP IN WINDOWS LOCALHOST

texts: How To Run Magento Command Using .bat File in Wamp ?


texts:
I have created one module where I want to pass Parameters using JS.

So I have followed as per below.

  app/code/namespace/modulename/view/frontend/templates/index.phtml

A single div

  app/code/namespace/modulename/view/frontend/web/example.js

define([], function(config){
    alert(config);
});

In Alert it should show value as a result but it is showing undefined. Am I doing anything wrong there?


texts: How to rewrite method js in custom module magento 2

texts:
I want to rewrite method openVariableChooser in variables js called somewhere in Editor magento. But i don't know how to do that without affect to other module
File variables location in Magento_Variable/variables.js
What i have done is define my custom js over original.

"paths": {
    "Magento_Variable/variables": "My_Extension/js/custom_variables"
},


texts:
I need to extract rar file for my custom import extension.

i have used shell_exec() and exec("unzip/path/images.rar", $result, $returnval);
but not working.

Any one knows how to extract rar file using SSH+php


texts:
I'm getting this in Total Orders section when I'm on the Create New Order page

  "Fatal error: Call to a member function setTotals() on a non-object in /home/pixelsp0/public_html/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals.php on line 77"

What it could be?

edit:

@kunz

<sales>
        <quote>
            <totals>
                <giantpoints_renderer_point>
                    <class>giantpoints/total_quote_renderer_point</class>
                    <before>nominal,subtotal</before>
                    <renderer>giantpoints/checkout_cart_renderer_point</renderer>
                    <admin_renderer>giantpoints/adminhtml_checkout_cart_renderer_point</admin_renderer>
                </giantpoints_renderer_point>
                <giantpoints_spending_before_tax>
                    <class>giantpoints/total_quote_spending_beforeTax</class>
                    <after>discount</after>
                    <before>tax</before>
                </giantpoints_spending_before_tax>
                <giantpoints_spending_after_tax>
                    <class>giantpoints/total_quote_spending_afterTax</class>
                    <after>tax</after>
                    <before>grand_total</before>
                </giantpoints_spending_after_tax>
            </totals>
        </quote>

So I found the extension that is in conflict: Mage giant Points. For some reason, it's in my local and not community.
I don't understand what exactly is going on after <totals>, I have watched quite an old (2012) 20 hour course online, but now I realized Magento even in version 1 has changed a few things (or this is what it looks like to me). Shouldn't he be specifying a <rewrite> tag in order to rewrite? Can you help me understand what is going on just by looking thing short XML?

    class Magegiant_GiantPoints_Model_Total_Quote_Renderer_Point
    extends Mage_Sales_Model_Quote_Address_Total_Abstract
{
    public function __construct()
    {
        $this->setCode('giantpoints_renderer_point');
    }

    public function collect(Mage_Sales_Model_Quote_Address $address)
    {
        // Init Giant Points
        $address->setGiantpointsSpent(0);
        $address->setGiantpointsBaseDiscount(0);
        $address->setGiantpointsDiscount(0);
        $address->setGiantpointsEarn(0);

        return $this;
    }

    public function fetch(Mage_Sales_Model_Quote_Address $address)
    {
        $address->addTotal(array(
            'code'  => $this->getCode(),
            'title' => '1',
            'value' => 1,
        ));

        return $this;
    }
}

is the giantpoints/total_quote_renderer_point Point.php file.


texts: How Do I create Backend form in magento 2 without using ui-component

texts: I have created grid using ui-component, Now I want to create form without using ui-component. So please provide me a solution


texts: Why custom attributes of product does not show on Admin Order Creation?

texts: Adding products to order (Create new orders) via admin, When configuring them shows only the custom options. I would like to see the "Custom Attributes" like 'Manufacturers', 'Colors', 'Size' etc. Same as the Frontend / Customer interface. So that administrator can select the custom attributes for each products when creating order via admin. Hope this should be addressed somewhere?.. but I couldn't get this solved / find out from google.


texts: Is there a standard way to make add a config on theme scope?

texts:
To solve a problem in an FOSS extension I need to introduce a configuration settings with the scope "theme".

Is there a standard way do to such?

I was thinking about extended in the theme.xml but this is locked down by the style sheet.

Another option I see to add an array config in the backened, where I can specific theme and config.

But I am wondering if there is a standard way to do such.


texts: Magento2 - Class Magento\Catalog\Model\Product\Attribute\Backend\LayoutUpdate does not exist

texts:
While migrating the Magento version from 2.3.4 to 2.3.2.

I am facing below issues while navigating to Product page.

Error: Class Magento\Catalog\Model\Product\Attribute\Backend\LayoutUpdate does not exist

In admin panel, when editing the products getting the below error

Error: Product does not exists"


texts: Magento 2.1 Admin grid not showing the disabled product

texts: Magento 2.1 admin catalog product grid didn't show the disabled product.


texts: magento 2.1.0 when i am save admin panel email template. page geting error

texts:
admin panel > marketing > Email template > add new emailtemplate > select template

If the selected template contains a href link the page returns an error, how can I solve this? Example:

{{trans "Set a New Password"}} '}}

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

{{trans "%name," name=$customer.name}}

{{trans "There was recently a request to change the password for your account."}}

{{trans "If you requested this change, set a new password here:"}}

                        {{trans "Set a New Password"}} '}}

{{trans "If you did not make this request, you can ignore this email and your password will remain the same."}}

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


texts: Is there anyway to export the Magento cron job in a list? If possible, including the schedule will be prefect. thanks


texts: Magento 2: How to disable the sidebar for certain category?

texts:
I have a category structure like this:

Every time I go to products page after selecting one of the categories in frontend there's sidebar for filtering product, I want to disable it only if I click the descendant of category name Create, is there a way to do this?


texts: content information of all cms pages is not shown

texts: What do i have to do in order to get the content information of my cms pages to be displayed. Maybe a screenshot could show the problem a bit better:


texts: hi after migrating 1.9 to 2.1.8 advanced_pricing_button error

texts:
after migrating from 1.9.3 to 2.1.8 show me below error just when i want to edit old products and i changed configuration parameter and does not change anything
and show below error

The configuration parameter "componentType" is a required for "advanced_pricing_button" component.

for example i change
this

 'config' => $visibilityConfig,

to

'config' => ['componentType'=>'container',$visibilityConfig],

but not solved


texts: block function to get customer id not works on my accounts custom tab

texts:
My block function to get customer id not works

i'm printing customer details in my accounts custom tab

use Magento\Framework\View\Element\Template;
use Magento\Customer\Model\Session;

class myscheme extends \Magento\Framework\View\Element\Template
{

protected $customerSession;

public function __construct(
    Template\Context $context,
    \Magento\Customer\Model\Session $customerSession,
    array $data = []
) {
    $this->customerSession = $customerSession;
    parent::__construct($context, $data);
}

public function isCustomerLogged()
{
    if($this->customerSession->isLoggedIn())
        return "yes";
    else
        return "no";
}

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

Can anyone help me with this ?


texts: Get current number of pages with filter apllied

texts:
I need to get the current number of pages (if we are in a category) in head.phtml.
The line below doesn't help me because if a filter is applied, the total of pages must to change.

$prodCol = $category->getProductCollection()->addAttributeToFilter('status', 1)->addAttributeToFilter('visibility', array('in' => array(Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG, Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH)));
$tool = $this->getLayout()->createBlock('page/html_pager')->setLimit($this->getLayout()->createBlock('catalog/product_list_toolbar')->getLimit())->setCollection($prodCol);

Can you help me?


texts: Shipping method only avialable for manual order creation 1.9

texts:
I've previously edited a payment method to only allow it to only be used in the back end admin order creation page visa copying a file to code/local/mage/payment/model/methiod and adding the following code to only allow it in back end.

protected $_canUseInternal = true;
protected $_canUseCheckout = false;

Is there a method for doing this with shipping methods as we need to take telephone orders and only allow a free shipping option for back end orders.


texts: Magento 2 Enterprise : Get Coupon code Expiration Date

texts: I am using Magento 2.2.5 Enterprise Edition. I'm created cart price rule from admin. Now I want to display coupon expiration date in front-end but in enterprise edition start/end date is saving by Scheduled Changes. How can I get start/end date of coupon code in enterprise edition?


texts: How to get Tier price html on product listing page in magento 2.3?

texts:
I want show default tier price in product listing page which we can see on product detail page.

  ex. Buy 5 for £47.00 each and save 6%

I can get using of $product->getTierPrice(); in product listing page but it could be better if i can get using tier_prices.phtml via block or any other method.

Please any give any suggestion


texts:
I have to add a work around fix for a payment method by adding a line of code to vendor/magento/module-payment/Helper/Data.php.

I've tried my fix by adding it directly to that file and it's working, but since files in the vendor folder shouldn't be modified, I'll have to put that fix in app/code.

I've tried adding a copy of the file along with my modified code in app/code/Magento/Payment/Helper/Data.php instead. Nothing happens and the bug is still there and I can't find any documentation on this.

How do I override that specific file?


texts:
Install magento 2 on my premises and I have these errors and I can't see the system

Already use the following commands

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
php bin/magento setup:di:compile
php bin/magento cache:flush
php bin/magento cache:clean

But this does not solve my problem, the maximum I can see on the screen is this

How can I solve these errors?


texts: Admin Grid "Select All" for mass action only sends the visible IDs

texts:
I'm having some trouble getting "Select All" working properly for a custom grid.

I have a massDelete action working and deleting multiple items. I have a multiselect column which, after I run a "Select All", displays the fact that the full count is selected (It says that the full count of 150 oo so items are selected). The problem is that when I run the massDelete action after a "Select All", only the 20 or so items on the current page are deleted.

Here is my Mass Action:

<massaction name="listing_massaction">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="selectProvider" xsi:type="string">rule_listing.rule_listing.rule_listing_columns.ids</item>
            <item name="indexField" xsi:type="string">rule_id</item>
        </item>
    </argument>
    <action name="delete">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="type" xsi:type="string">delete</item>
                <item name="label" xsi:type="string" translate="true">Delete</item>
                <item name="url" xsi:type="url" path="*/*/massDelete"/>
                <item name="confirm" xsi:type="array">
                    <item name="title" xsi:type="string" translate="true">Delete items</item>
                    <item name="message" xsi:type="string" translate="true">Are you sure you wan't to delete selected items?</item>
                </item>
            </item>
        </argument>
    </action>
</massaction>

Here is the selectionsColumn

<selectionsColumn name="ids">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="indexField" xsi:type="string">rule_id</item>
        </item>
    </argument>
</selectionsColumn>

My controller is using the following code:

$this->filter->getCollection($this->collectionFactory->create())
foreach ($collection as $model) {
    $model->delete();
}

I have checked the values that are being POSTed to the controller. There is no difference between what is POSTed after doing a "Select All" compared to selecting the first page.

Am I missing something?


texts: When trying to upgrade to 2.3.2 getting a php version error

texts:
When I access the website, I get:

  Magento supports PHP 7.1.3 or later. Please read Magento System
  Requirements.

I have PHP 7.2.19 on my stack

Where do I look for the problem?

https://siccaro.eu/


texts:
How to disable product when the the timer runs out below is my phtml code is it possible please let me know
here my code am calling in phtml file
 <?php
    $myBlock = \Magento\Framework\App\ObjectManager::getInstance()->get('Mageplaza\HelloWorld\Block\AttributeCollection');

    // print current product data
        $currentProduct = $myBlock->getCurrentProduct();
        echo $currentProduct->getStartTime() . '
';
        echo $currentProduct->getEndTime() . '
';
        ?>

     <!DOCTYPE HTML>

    <meta name="viewport" content="width=device-width, initial-scale=1">


texts: Enable decimal qty cause problem when updating cart qty magento 2

texts: I need to the allow decimal qty so I set it to yes but qty can be integer also. So when I updated my qty to integer number it show me warning : please enter a valid value. Why do I have this behaviour and how to disable this. Any help please


texts: Reusing methods from other blocks in custom block

texts:
Having a custom Block where I fetch custom data what is the accepted workaround to inject the methods in this custom Block from another block.

Having the following situation I fetch in my custom block the most viewed products I would like to reuse the methods and template from ListProducts. Is there a way to do this without extending the above class?


texts:
I am getting following error when I am trying to import CSV file as Product import.

I used following commands for access permission.

find var vendor pub/static pub/media app/etc -type f -exec chmod g+w {} \;
find var vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} \;

I increased php execution time in apache server.

I used item_xxl_12063874_18123233.jpg  as base-image in CSV file.

I used pub/media/import as Images File Directory in Product import screen and placed all the images in pub/media/import.

Here is CSV file formate


texts: Preparing for Magento Certified Associate Developer

texts:
I am preparing for magento 2 associate developer certification but am not sure from where do i start it.
can anyone who has done this certification and can suggest me with the best study materials that, i could prefer for my certification as well as blogs that can be helpful.
Thanks In Advance
Update
Guyz Please add you suggestions as an ans so that other people will also get help from it.


texts: Take values input form Magento view.phtml

texts:
I have a problem with Magento. In practice, I'm working on the page view.phtml of product display. In the form of the page that shows this action:

<form action="<?php echo $this->getSubmitUrl($_product);?>"

I entered the inputs, where the value is generated dynamically with a calculation made in Javascript .

input type="text" name="PassStampa" id="PassStampa" style="width:70px;"

Now my question is, how do I make sure that in the next page, and the page default.phtml, where it is reported the truck with price and quantity, can display these values input?
I tried using the method $ _POST but nothing to do, I tried with the session_start (), with $ _SESSION, $ _REQUEST but no nothing.

Where should I take action to get this values from the input? If in the action as I do?


texts: Vendor lib issue in app/code/Yireo/Webp2 module

texts:
I am using Yireo_Webp2 module. The issue is I have downloaded it from git and then activated it. it also have some dependencies so I have run composer update in app/code/Yireo/Webp2 folder which created a vendor folder in app/code/Yireo/Webp2.

Now these library are using autoload.php and it is included as require 'vendor/autoload.php'; which referring magento's autoload. so my module's libraries are not getting called. It always displaying this class is not found etc. so how can I autoload these lib files? or should I shift them to magento's vendor folder.


texts: how to replace filter.phtml file in magento

texts:
How can i replace my

frontend/base/default/template/catalog/layer/filter.phtml

file to

frontend/base/default/template/checkbox/filter.phtml

in my layout XML


texts: How to redirect upper case URL to lower case Magento 2

texts:
We have a strange issue in Magento2.

All the URL on our website are accessible both by Upper case and Lower case. For example: http://www.example.com/sweatshirts is also accessible by http://www.example.com/SWEATSHIRTS

Our SEO team recommends that the URL accessible with UPPERCASE should be 301 redirected to lower case.

Can any one please guide me on how this can be done.


texts: Magento 1.9.2.3 Unknown cipher in list: TLSv1

texts:
I installed the last Magento version 1.9.2.3 and i tried to install a extension via Magento Connect in admin painel and i got the error:

Unknown cipher in list: TLSv1

I tried this solution:

In file downloader/lib/Mage/HTTP/Client/Curl.php find the code

  $this->curlOption(CURLOPT_SSL_CIPHER_LIST, 'TLSv1');

and then change to

  if(isset($var)){$this->curlOption(CURLOPT_SSL_CIPHER_LIST, 'TLSv1');}

I didn't find the code above in file curl.php but i can find that code in Magento v1.9.2.2 in curl.php.

How can i solve this? Thanks.


texts: Apply Catalog Price Rule to lower price instead of regular price

texts:
I'm trying to see if it's possible to apply Catalog Price Rules to the lower selling price between price or special_price. Right now, such rules apply to the regular price. I'm looking at the Mage_CatalogRule module at places like Mage_CatalogRule_Model_Action_Index_Refresh::_calculatePrice, and doing this doesn't seem like a simple task.

From what I can gather, Mage_CatalogRule creates a temporary table from which the rule prices are calculated. This is a MySQL TEMPORARY table. However, I'm having a hard time finding where it's actually filling in this temporary table. in _fillIndexData(), it's making references to the temporary index tables already (or is it just preparing the select statement?), even though the table is not yet populated (correct me if I'm wrong).

I'm just generally confused because I'm not familiar with "preparing" SQL statements using objects and running a long query all at once.

Any ideas or leads?


texts: type="checkbox" admin field saved as NULL?

texts:
I have added a basic admin form field in system.xml as follows:

<field id="do_something" translate="label comment" type="checkbox" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1">
    <label>Do something?</label>
    <comment>Do we want to do something?</comment>
</field>

The field renders correctly, and saves with no errors, and a row is added to core_config_data, but the value is always NULL regardless of whether the box was checked or not.

What am I missing?


texts: How to Implement Structured Data in Magento

texts:
I am doing an SEO consultancy on a Magento eCommerce store and I'd like to suggest the use of structured data, such as:

Breadcrumbs
Products
Price
Availability
Reviews
Ratings

My question: If there is an easy way to implement this on an existing ecommerce website, such as a popular extension, or via the backend of the Magento CMS. I'm a noob with Magento so any help is greatly appreciated. Thanks.


texts: $_product->isSaleable() shows different value in list page and view page magento 2

texts:
Issue: Out of stock set at admin side. On product list page display "Out of stock" while detail page shows "Add to cart" button.
I have print the $_product->isSaleable() function on list.phtml as well addtocart.phtml.
For the same product list.phtml displays NULL, while addtocart.phtml displays 1 on the view page(Product detail).
I have enabled the backorder for all product.

http://staging.mpex.com/photography.html
http://staging.mpex.com/panasonic-dmw-bgs1-battery-grip.html

Check the above product in list page shows "Out of stock" while detail page has "Add to Cart" Button. Also, this product doesn't include in any bundle product.


texts:
I want to send an email when a product being changed.

I just need which event is used for it.


texts: change the default magento image background white color to diffrent color

texts:
Am attaching the screenshot , want to change image background color.

https://prnt.sc/m2fvyp


texts: Magento 2.3.4 - How to properly remove or uninstalled Temando extension including tables from database?

texts:
I have faced lot issue based on this extension, i can't able to remove by using following cmd,
composer remove  Temando_Shipping
Now i just disabled, how to remove properly?


texts: How do I replace   with the €-symbol in my order invoice?

texts:
Recently I changed my €-symbol to "&nbsp;" to remove the €-symbol from my front-end store (see screenshot)

But that also made my Invoice display the "&nbsp;" instead of the €-symbol.

How do I change this back to a €-symbol in my invoice ONLY? Thank you in advance.


texts: Auto delete item from minicart in magento 2?

texts:
I have 2 items in cart suppose A & B.
When customer delete item A from minicart then auto delete item B.
How the ajax will call 2 times, I have done this in controller's execute function (delete both item together when delete first item) but it is not working for me.

Here is the code snippet:
I have override this file  Magento/Checkout/Controller/Sidebar/RemoveItem.php
So my file is app/code/Vendor/Module/Controller/Sidebar/RemoveItem.php
 public function execute()
{
    if (!$this->getFormKeyValidator()->validate($this->getRequest())) {
        return $this->resultRedirectFactory->create()->setPath('*/cart/');
    }
    $itemId = (int)$this->getRequest()->getParam('item_id');

    //get all cart items
    $data = $this->resultCart->getQuote()->getAllItems();
    $valid = 1;
    foreach ($data as $item) {
       $sku = $item->getSku();
        if($sku == 'additional_item') //item B
        {
            $item_id = $item->getItemId();
        }
    }

    if(isset($item_id)){
        if($itemId == $item_id){
            $valid = 0;
        }
    }
    try {
        if($valid == 0){
             return $this->jsonResponse('We can\'t remove Sanitize item.');
        }
        if($valid){

            $this->sidebar->checkQuoteItem($itemId);
            $this->sidebar->removeQuoteItem($itemId); //Removing item A

            if(isset($item_id)){ //removing the item B from here
                 $this->sidebar->checkQuoteItem($item_id);
                 $this->sidebar->removeQuoteItem($item_id);
             }

            return $this->jsonResponse();
        }

    } catch (\Magento\Framework\Exception\LocalizedException $e) {
        return $this->jsonResponse($e->getMessage());
    } catch (\Zend_Db_Exception $e) {
        $this->logger->critical($e);
        return $this->jsonResponse(__('An unspecified error occurred. Please contact us for assistance.'));
    } catch (\Exception $e) {
        $this->logger->critical($e);
        return $this->jsonResponse($e->getMessage());
    }
}


texts: How to get Sku, name, and image in magento2 in phtml file

texts: I don't know how to implement this task. I want to get product name, SKU, and image in magento2. Can you please help me?


texts: Magento 2 "There has been an error processing your request"

texts:
Have just managed to do a clean install of Magento 2 on a local VM, however I am getting lots of "There has been an error processing your request" errors at various points. For example, when trying to Flush the magento cache, or trying to create a new user on the front end. I have made no changes to anything since installation - I am simply trying to get a working fresh installation so that I can have a look around.

When Navigating to /customer/account/create/, seeing the above error and checking the error logs, I receive the following:

  "Object DOMDocument should be created.";i:1;s:5235:"#0
  /var/www/html/vendor/magento/framework/View/Element/UiComponent/Config/Reader.php(95)"

At a bit of a loss as to why I am getting these errors, as this is a fresh install. Any ideas?


texts: Magento 2 Integration with API - route does not exist error

texts:
I'm working on integrating linnworks with magento 2 using the rest endpoint which from what I gather is usually /rest/default/v1. However, when visiting that url in the browser, the following error is shown:
<response>
    <message>Request does not match any route.</message>
</response>

Usually, the response is (from a different magento 2 site with a working linnworks integration):
<response>
    <message>Specified request cannot be processed.</message>
</response>

So it looks like the rest endpoint may have been changed but I'm not sure where to find it. I've had a look in webapi.xml files but nothing has cropped up. Does anyone have any suggestions? Thanks in advance.


texts: Varnish - NGINX serving all resources HTTP instead of HTTPS (Magento 2)

texts:
I'm using an Ubuntu / NGINX server configuration. Followed the directions found here: https://www.rosehosting.com/blog/magento-2-with-redis-varnish-and-nginx-as-ssl-termination/

I installed the SSL and confirmed its working. Secure URLs are set to https, unsecure are set to http in the backend.

When you access the site over http, it works fine. If you try to access it over https, all resources load http. You cant access the backend or cart / checkout as it causes a redirection loop.

I removed the varnish configuration and the website was working fine over https, leading me to believe there is something wrong with my varnish configuration.

See the site here: https://www.quantumstoragesystems.com/

Anyone have any idea what I'm doing wrong here? Any help would be appreciated.


texts: Fresh install on local won't let me log in

texts: I downloaded 1.8 version and installed it on my localhost, when i was done with install, i tried logging into backend. But it won't let me login, neither it gives me any error but refresh the admin page, i tried giving it wrong password and it prompted about invalid username and password. If so, why isn't my password and login working whereas there is no message of invalid login or password. just same admin page reloads?


texts: Magento2 API to access internal payment method

texts:
I am working on creating a way to make an order via the magento api and wondering if it is possible to access internal payment methods (payment methods that are only enabled for the admin panel) via the api?

So for example I have a plugin that creates a payment method that can only be seen/used via the magento admin panel. however when I use the magento API to list out payment methods I do not see that payment method listed and think its because its set to be viewable/usable only on the admin panel. So what would i change in the api call to gain access to it?


texts: How can I move a widget block to the top of the content or sidebar area

texts:
I want to add a promo banner on my website. It's either in the content area or in the right sidebar. I thought it's good and easy to use static blocks and widgets.

It's easy to control where it comes and on which pages.

I have the problem now that the blocks are always at the bottom of these areas. It's on the bottom as the last element in the content area and in the sidebar. How can I change it In the xml so that these widgets are always as the first element ?

Thanks


texts: Problem in loading bootstrap js in magento sub website

texts:
I have Magento ver. 1.9.2.1, I have setup two sub website with two sub domain.

Everything working there but on both sub website bootstrap-datepicker.js, bootstrap-timepicker.js, bootstrap-datepicker.js has path of sub domain like :
http://sub.main.com/skin/frontend/package/theme/js/.

But it should be http://main.com/skin/frontend/package/theme/js/.
While all other css and js have main domain path in sub website.

How to solve that?


texts: Product details page layout problem, magento 2

texts:
In magento 2,  Product detail page is coming with different layout, some product render with 1 page column while some with 2 column, i saved all product in admin for NO LAYOUT but its not working, how to resolve this. I need 1 column layout only.
I am using Magento ver. 2.0.7


texts: Get all product from MAGENTO (sql query)

texts:
I want to get all products that are stored in the database. I want those products that have these attributes:

SKU, code_brand, code_business_unit, code_line, code_group, code_business

The problem is that after executing my query it does not show any errors but it is not displaying the products (empty rows).

This is the Database diagram:


texts: How to check if cart is empty in observer Magento 2

texts:
i created an observer before add to cart like this:

<?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="controller_action_predispatch_checkout_cart_add">
        <observer name="test_custom_controller_action_predispatch_checkout_cart_add" instance="Test\Custom\Observer\BeforeAddCart" />
    </event>
</config>

in this observer i want to check if the cart is empty and do some function, before add product to the cart


texts:
Cancel Order from website frontend by customer in magento 2 enterprise edition.

Is there anyway to do without extensions?


texts: in magento2, how to select all attributes of products of certain catogory?

texts: Is this possible to achieve without iterating all category product collection ?


texts:
I want to add radio button using ui modifier

return [
            'arguments' => [
                'data' => [
                    'config' => [
                        'label' => __('Default'),
                        'componentType' => Field::NAME,
                        'formElement' => Radio::NAME,
                        'dataScope' => static::FIELD_IS_DEFAULT_NAME,
                        'dataType' => Text::NAME,
                        'sortOrder' => $sortOrder,
                        'value' => '0',
                        'valueMap' => [
                            'true' => '1',
                            'false' => '0'
                        ],
                    ],
                ],
            ],
        ];

But not working

Thanks


texts: Can Magento (1.9) resize images on the back end?

texts:
The goal is to reduce product image sizes after the admin has uploaded them. This will make the catalog page load faster, as dozens of images are loaded. The total page request is over 30 MB.

Asking the admin to resize the images before uploading is not an option, as the world will end if his workflow changes. Seeing as we don't want the world to end, is there a Magento plugin that will shrink images to a specified resolution? To clarify, I'm not concerned with resizing images on the DOM. I'd like to actually shrink the image before it's served.


texts: Magento 1.9.4.1 logged in customer can not show product page, it is showing 404

texts:
I have upgrade magento 1.9.4.1 from Magento 1.9.1.0 now a guest customer can visit the product page, but when the logged-in customer visit the product page it is showing the error as below:

  "SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1561-232' for key 'UNQ_REPORT_VIEWED_PRODUCT_INDEX_CUSTOMER_ID_PRODUCT_ID', query was: INSERT INTO report_viewed_product_index (visitor_id,customer_id,product_id,store_id,added_at) VALUES (?, ?, ?, ?, '2019-06-26 07:06:34') ON DUPLICATE KEY UPDATE visitor_id = VALUES(visitor_id), customer_id = VALUES(customer_id), product_id = VALUES(product_id), store_id = VALUES(store_id), added_at = VALUES(added_at)"

When I  comment the below line in file "Code\Core\Mage\Catalog\Helper\Product\View.php" the line number 135 code is
Mage::dispatchEvent('catalog_controller_product_view', array('product' => $product)); then it is allowed to load the product page for logged in customer and logged out both.

Please let me know if anything you found for the issue.


texts: Get a list of grouped products with a simple product associate

texts:
I need get a list of grouped products with a singular product.

For example:

I have the single product A and I have the grouped products B,C,D and E.

Only B and E have the single product A associated.

How can i do this?.

I can retrieve the list of all grouped products and do a bucle to get all associate products and compare with simple product but not is a good practice for the performance I think.

Any idea?.

Thank you.


texts: "Customer email is required" customer creating in magento

texts:
While I was trying to create a customer in magenton using SOAP api It was showing this error.

  Customer email is required

I have set the customer email. Does anyone have any idea whats the wrong I am doing here?

Actully I have used the magja and

Customer customer = new Customer();
String mEmailString = new String("user@test.com");
customer.setFirstName("User");
customer.setLastName("Shop");
customer.setPassword("12345678");

customer.setGroupId(1);
customer.setGender(Customer.Gender.MALE);
customer.setEmail(mEmailString);
customer.setStoreId(1);
customer.setWebsiteId(1);

remoteServiceFactory.getCustomerRemoteService().save(customer);//here the error occurs


texts:
I like to edit order return guest form. I edited in

  app/design/frontend/[theme]/Magento_Sales/templates/guest/form.phtml

but form settings are in

vendor/magento/module-sales/Helper/Guest.php.
 How to edit Guest.php file?


texts: Cli upgrade of 1.3.2.4 to 1.9 not working

texts:
I am in the process of upgrading magento 1.3.2.4 to 1.9 and I know 1.7 is the bridge. Now, I have tried to update to this using the pear commands in cli but just doesnt seem to work. my server has php 5.3 version.

I am now attempting to install a fresh downloaded version of magento 1.7 with the current old magento 1.3.2.4 database.

Is this the right way? or anyone provide any pointers ? I do not require my current site to be functioning. I have developed a fully working new theme in magento 1.9 which I will use once I can get the magento 1.3.2.4 upto 1.9


texts:
I was certain we tested all of this prior to going live but customers are unable to login using the "my account" link or from the checkout page.  The "log in" link seems to work but nothing will stay in the cart.

I can still checkout as guest.  I found many posts about adding the form-key.  I used developer debug to find my login.phtml on my "my account" page.  Added the string and cleared cache.  Users still cant login.  Anyone have any ideas or point me in the right direction?

I recently moved the site to SSL...I have tried changing it back to standard and that does not fix it either.

I also tried turning off persistent cart and that did not fix it.  This issue seemed to come about after enabling persistent cart.

I also noticed that if you click the forgot password option and enter an email address of a valid users it just returns you to the page and says "please enter your email"


texts: get the index of the products page (when browsing category catalog)

texts:
What's the best way to get the index of the products page we are currently on?

what I mean is this:

Note: theoratically I could get it by parsing the URL and get the param from there (eg get the p=2 from url /magento/men/pants-denim.html?p=2), but I want a 'clean' way that will have less chance to collide with other extensions.

thanks!


texts: Getting billing/shipping address issue in Magento 1

texts:
This is my code:

$collection = Mage::getModel('customer/customer')->getCollection();
foreach ($collection as $customer){
          $defaultBilling     = $customer->getDefaultBillingAddress();
          $defaultBilling2   = $customer->getPrimaryBillingAddress();
          $defaultShipping    = $customer->getDefaultShippingAddress();
}

In all of the 3 cases I'm getting false or null. The all idea is that i want to check which customers has a default billing address and doesn't have a default shipping address or vice versa.


texts:
How I can use One Image for all categories thumbnail.

Or explaining it further, I need to set an image that will fill all the empty spaces of categories, subcategories or products where no product image  or thumbnail is uploaded


texts:
We're setting up a new Magento 2.4 project. As we can see in the technology stack requirements, the recommendation for database is MySQL 8.0.
Could anyone explain whether it's better to choose MySQL or Percona? I've seen many projects using Percona (my former company preferred this option for all projects). Are there any particular cases where one might be better than the other one?
I'm interested in the Magento Open Source Edition :)
Thanks for sharing your knowledge


texts: I have to add some third party code to the checkout page success.phtml in order to let our customer receive a feedback request once the order is confirmed. The problem is that we have a multistore setup and I want that the feedback request is working only for one store and not all. We have different template for each store but I see that we have only one success.phtml page in app/design/frontend/base/default/template/checkout so I don't know how to filter the order from just one store. Can you help me?


texts: Remove an attribute from configurable product?

texts: An attribute has been added in configurable products and has been made a required attribute when it shouldn't be. How do you edit it so it isn't required for every product?


texts: How to make a parent menu item which has subcategories not clickable

texts:
I need some help. I'm using Magento CE 1.9.2.1.

How can I make all parent categories of the top navigation menu non-clickable? Basically, I only want the menu categories that DON'T have any subcategories to be clickable.

I have 4 levels of categories and I only want the last one to be clickable.

I saw some tutorials but they all are for version 1.8 and lower. With the RWD theme it's all different now and I wasn't sure where to look.

Also, it would be great, as a bonus, to make the breadcrumb appear but not be clickable except the home link.

Thanks in advance!


texts: How do I keep a selected value selected after form submit issue?

texts:
I am following this article, where i have a dropdown. But after submit my dropdown has alwasy the first option value, not the selected one. In my case the dropdown contains all of the cms pages. This is my code:

 class Mynamespace_Mymodule_Block_Adminhtml_Form_Field_Cmspage extends Mage_Core_Block_Html_Select
{
    public function _toHtml()
    {
        $options = Mage::getModel('cms/page')->getCollection()->toOptionArray();
        foreach ($options as $option) {
            $this->addOption($option['value'], $option['label']);
        }

        return parent::_toHtml();
    }

    public function setInputName($value)
    {
        return $this->setName($value);
    }
}

where my dropdown is genered. So any idea about that ? Thx in advance.
This is the content of system.xml:

<config>
    <sections>
        <mynamespace_mymodule translate="label" module="mynamespace_mymodule">
            CMS Success Page
            <tab>customer</tab>
            <sort_order>1000</sort_order>
            <show_in_default>1</show_in_default>
            <show_in_website>1</show_in_website>
            <show_in_store>1</show_in_store>
            <groups>
                <general translate="label" module="mynamespace_mymodule">
                    Cms Success Page Assignment
                    <frontend_type>text</frontend_type>
                    <sort_order>10</sort_order>
                    <show_in_default>1</show_in_default>
                    <show_in_website>1</show_in_website>
                    <show_in_store>1</show_in_store>
                    <fields>
                        <cmspages translate="label">
                            CMS Success Pages
                            <frontend_model>mynamespace_mymodule/config_cmspages</frontend_model>
                            <backend_model>adminhtml/system_config_backend_serialized_array</backend_model>
                            <sort_order>10</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>0</show_in_store>
                        </cmspages>
                    </fields>
                </general>
            </groups>
        </mynamespace_mymodule>
    </sections>
</config>


texts:
After running compilation code

php bin/magento setup:di:compile

I'am getting the following error

  Fatal error:  Cannot use 'Void' as class name as it is reserved in /va
  r/www/html/m2/vendor/magento/module-sales/Controller/Adminhtml/Order/Invoice/Voi
  d.php on line 9

  My php version is  7.0.20-2

also while placing an order I'm getting following error

  An error occurred on the server. Please try to place the order again

Can any one help me to resolve this ?

Thanks..!!


texts: how to display added comments in my orders

texts:
I am new to Magento 2.
I want to show comments added by Admin User against a particular order placed.
I want to display this comments in table grid of My order section for customer login.


texts:
I have an integration with an ERP system which is pushing stock qty to Magento2.

The problem is that if the item qty becomes 0 Magento puts it out of stock, when the ERP updates the qty to say 10 the item remains out of stock. I would expect Magento to deal with this.

Potentially we could get the ERP system to pass in stock across to Magento but we want Magento to control that because there might be back orders on Magento etc

Thanks


texts: An error has happened during application run. See exception log for details. during deployment

texts:
hope you can help me out!

Best regards

Joost

[2020-03-28 19:24:43] main.CRITICAL: Class Magento\Framework\Session\Config\ConfigInterface\Proxy does not exist {"exception":"[object] (ReflectionException(code: -1): Class Magento\Framework\Session\Config\ConfigInterface\Proxy does not exist at /home/admin/domains/aquariumvissenwinkel.nl/public_html/dev/vendor/magento/framework/Code/Reader/ClassReader.php:26)"} []
[2020-03-28 19:24:44] main.CRITICAL: Class Magento\Framework\Session\Config\ConfigInterface\Proxy does not exist {"exception":"[object] (ReflectionException(code: -1): Class Magento\Framework\Session\Config\ConfigInterface\Proxy does not exist at /home/admin/domains/aquariumvissenwinkel.nl/public_html/dev/vendor/magento/framework/Code/Reader/ClassReader.php:26)"} []
[2020-03-28 19:26:19] main.CRITICAL: Class Magento\Framework\Session\Config\ConfigInterface\Proxy does not exist {"exception":"[object] (ReflectionException(code: -1): Class Magento\Framework\Session\Config\ConfigInterface\Proxy does not exist at /home/admin/domains/aquariumvissenwinkel.nl/public_html/dev/vendor/magento/framework/Code/Reader/ClassReader.php:26)"} []
[2020-03-28 19:26:19] main.CRITICAL: Class Magento\Framework\Session\Config\ConfigInterface\Proxy does not exist {"exception":"[object] (ReflectionException(code: -1): Class Magento\Framework\Session\Config\ConfigInterface\Proxy does not exist at /home/admin/domains/aquariumvissenwinkel.nl/public_html/dev/vendor/magento/framework/Code/Reader/ClassReader.php:26)"} []


texts: What Prototype-only lightboxes are available?

texts:
I'm looking for a good lightbox to show images. It would be nice if the lightbox would also be able to show Youtube videos, but this is not necessary.

Unfortunately most good lightboxes and Magento lightbox extensions rely on jQuery. I don't want to add the jQuery library to the template, because this increases the page data size. So I'm looking for Prototype lightboxes only.


texts: Make "minimum quantity allowed in shopping cart" an attribute in product edit form

texts:
I would love to bring "minimum order quantity in shopping cart" (per product) forward from advanced inventory to just below quantity field in product edit form.
Please help


texts: Magento 2: Export only filtered records Magento 2

texts:
I'm displaying records in the grid using UI component but for export using a custom controller that exports data in the CSV by getting collection. It's working fine but when we filter grids records by some field then it's not exporting the filtered records.
What can I do to achieve this? Any suggestions or help, please.


texts: getChildHtml('order_totals') ?> finding path

texts:
<?php echo $this->getChildHtml('order_totals') ?>

I am searching the path in server. but unable to find Please help me.


texts: What is the most common process for importing the products?

texts:
What is the most common process for importing products?
Does everyone use the product import/export tool?
The CSV file format is not something that the client is likely to fill in and if they try it is 99 percent guaranteed that they will get it wrong.

  Do most people write there own scripts for this or do they manually create the import CSV file in the format that is required for it to work?


texts: INSERT IGNORE INTO `catalog_category_product_index_tmp` in multiple websites

texts:
one question to the community:
Questions
why does magento reindex each website ?
in our situation all website have the same store
Why does Magento only reindex 500 entitys ?
SQL Statement
 INSERT IGNORE INTO `catalog_category_product_index_tmp` (`category_id`, `product_id`, `position`, `is_parent`, `store_id`, `visibility`)

SELECT `cc`.`entity_id` AS `category_id`, `ccp`.`product_id`, ccp.position +
10000 AS `position`, 0 AS `is_parent`, 3 AS `store_id`, IFNULL(cpvs.value, cpvd.value) AS `visibility`
FROM `catalog_category_entity` AS `cc`

INNER JOIN `catalog_category_entity` AS `cc2` ON cc2.path LIKE CONCAT(`cc`.`path`, '/%') AND cc.entity_id NOT IN (1)\n
INNER JOIN `catalog_category_product` AS `ccp` ON ccp.category_id = cc2.entity_id\n
INNER JOIN `catalog_product_website` AS `cpw` ON cpw.product_id = ccp.product_id\n
INNER JOIN`catalog_product_entity_int` AS `cpsd` ON cpsd.entity_id = ccp.product_id AND cpsd.store_id = 0 AND cpsd.attribute_id = 96\n
LEFT JOIN `catalog_product_entity_int` AS `cpss` ON cpss.entity_id = ccp.product_id AND cpss.attribute_id = cpsd.attribute_id AND cpss.store_id = 3\n
INNER JOIN `catalog_product_entity_int` AS `cpvd` ON cpvd.entity_id = ccp.product_id AND cpvd.store_id = 0 AND cpvd.attribute_id = 102\n
LEFT JOIN `catalog_product_entity_int` AS `cpvs` ON cpvs.entity_id = ccp.product_id AND cpvs.attribute_id = cpvd.attribute_id AND cpvs.store_id = 3\n
INNER JOIN `catalog_category_entity_int` AS `ccad` ON ccad.entity_id = cc.entity_id AND ccad.store_id = 0 AND ccad.attribute_id = 51\n
LEFT JOIN `catalog_category_entity_int` AS `ccas` ON ccas.entity_id = cc.entity_id AND ccas.attribute_id = ccad.attribute_id AND ccas.store_id = 3 WHERE (cpw.website_id = '3') AND (IFNU
LL(cpss.value, cpsd.value) = 1) AND (IFNULL(cpvs.value, cpvd.value) IN (4, 2)) AND (IFNULL(ccas.value, ccad.value) = 1) AND (`cc`.`entity_id` >= 18
501) AND (`cc`.`entity_id` < 19001)


texts:
I want to add new template when I click on shipment button.
Please anyone can help me here, I am new in magento. Thank you


texts: "My Cart" not redirecting to checkout cart

texts:
I have been configuring my store for a few days now and everything was going smoothly but for some reason now the default shopping cart button (My Cart) does not actually redirect to the shopping cart (/checkout/cart/), it simply just redirects to “#”. Ie, the actual html behind the button looks like:

My Cart(1)

I don’t know if it was a setting I changed but I wouldn’t think this would be an issue. Any help would be gratefully received.


texts: How to replace/make tables to be mobile responsive

texts:
I have been putting a blog/content page together using tables (old fashion I know) but problem being it squashes the content rather than collapsing underneath.

I have used a free html cleaner to replace table code for div code. Which works well only problem there is no style.

I can see I have to use css to style but I cannot see how I am suppose to do so with my version. I don't have access as a developer.

Is there a way to add the styling to the divs or is there another function on magento which will help with layout?

Thank you in advance


texts: update button should visible after clicking edit button

texts:
we are using follwing code display like this "image 1" : http://prntscr.com/8w7f5v :

     <?php echo (int) Mage::getModel('cataloginventory/stock_item')->loadByProduct($products)->getQty(); ?>
      <input type = "text" id = "qty_<?php echo $products->getId(); ?>" name = "qty" value = "<?php echo (int) Mage::getModel('cataloginventory/stock_item')->loadByProduct($products)->getQty(); ?>" style = "display:none"/>

      <img onclick = "updateField('<?php echo $products->getId(); ?>'); "
      src = "<?php echo $this->getSkinUrl('marketplace/images/icon-edit.png'); ?>"/>

    <button class="button wk_mp_btn1" title="<?php echo $helper->__('Save') ?>" type="submit" id="save_butn">
    <?php echo $helper->__('Update') ?>
    </button>

    <button type="reset" class="button wk_mp_btn1" onclick="updateField('<?php echo $products->getId(); ?>');return false;">
    <?php echo $helper->__('Cancel') ?>
    </button>

if we click on edit button , its displaying like this "image 2"  : http://prntscr.com/8w7fdp

what i need is

a)if we click on edit button, than only "Update" & "cancel" button should visible and "Edit" button should hide.

b)Later if we click on "cancel" button, than "Update & cancel" button should hide and "Edit" button should visible.


texts: How to join order grid collection to custom table in Magento2?

texts: I am trying to add a new column to order grid in Magento 2.0. So, i need to do joining to order grid collection. How can I achieve this ? Because, in magento2, the grid uses UI component.


texts: How to do Custom module development in Magento 2 for adding extra charges on Cash on delivery orders?

texts: Please specify the custom module development with proper explanation. As on google only extensions are available


texts:
I have used a custom model where I am fetching value of <source_field> when I print an Invoice. Below is the code used in config.xml.

<pdf>
            <totals>
                <mymodule translate ="title">
                    <title>My Module Value</title>
                    <source_field>mymodule_amount</source_field>
                    <model>mymodule/sales_pdf_mymodule</model>
                    <font_size>7</font_size>
                    <display_zero>0</display_zero>
                    <sort_order>650</sort_order>
                </mymodule>
            </totals>
        </pdf>

I have created a Model file under MyModule/Model/Sales/Pdf/Mymodule.php and the DB filed name is mymodule_amount.

Below is my model file code

<?php

class Namespace_Mymodule_Model_Sales_Pdf_Mymodule extends Mage_Sales_Model_Order_Pdf_Total_Default
{

    public function getTotalsForDisplay()
    {
        parent::getTotalsForDisplay();
        $mymoduleAmount =  $this->getMymoduleAmount();
        $label    =  'Some label';
        $fontSize =  $this->getFontSize() ? $this->getFontSize() : 7;
        $total = array(
            'amount'    => '-'.$mymoduleAmount,
            'label'     => $label,
            'font_size' => $fontSize
        );
        return array($total);
    }

}

In the above code, $this->getMymoduleAmount(), returns null and can't fetch the value as defined in <source_field>.

Please Help.

Thanks.


texts:
I have just successfully installed newly released Magento 2.4.2 on my local server(WAMP64) but it gives 404 when try to access frontned or backend.
Can someone please help me to fix this out?


texts: How to show Shop by Color filter on category page Claue theme Magento 2

texts:
I am using Magento 2 and facing issue to show Shop by Color filter. I am using Claue theme. I checked for the Use in Layered Navigation option inside Store > Attribites > Product > Color. The option is set to NO but it should be Filterable (with results). When i edit the Color attribute and set Use in Layered Navigation as Filterable (with results) inside Storefront Properties tab then it won't update.

I tried to find out setting in the theme options but not found anything.

Can anyone help me to get this working as earlier the filters were coming on the site.


texts: Return a 304 HTTP response from within a REST API method?

texts:
In a custom REST API endpoint method, returning the object promised in the service class interface will generate a 200 OK response. Additionally, I can return a specific HTTP error code by throwing an particular type of exception. For example, throwing a NoSuchEntityException returns a 404 NOT FOUND and a AuthorizationException returns a 401 UNAUTHORIZED.

My question: is there a way to return other HTTP codes, such as a 304 NOT MODIFIED code?


texts: what are the sequence of mutliple patches apply on magento 1.7.0.2

texts:
Have a magento instance C.E 1.7.0.2.

Any patches did not applied on this instance and now want to apply patches.

As per as @benmarks sheet . require to apply patches below patches:

SUPEE-6482
SUPEE-6285,
SUPEE-5994,
SUPEE-5344,
SUPEE-1533,
APPSEC-212

Started to apply patch from bottom APPSEC-212 and it applied successfully till SUPEE-5994

Whenever try to apply SUPEE-6285 and it does not apply.

Showing Checking .... checking.

Now i want to know why this error showing

Is require to change the sequence apply patches like:

SUPEE-6482
SUPEE-5344,
SUPEE-1533,
APPSEC-212
SUPEE-6285,
SUPEE-5994,

Am i right?


texts: Configurable Product no options loaded "configurableWidget is undefined"

texts:
there is a problem we cannot solve and even not reproduce correct.
the error seems only to appear in firefox. on https://bio-chem.eu/haushalt.html click on the 7th product "Bio Allzweckreiniger". on the product page sometimes the options are not loaded. it looks like this:

Hit Reload, open the product directly with the link or using another browser works fine:

The Console says "Uncaught TypeError: can't access property "element", configurableWidget is undefined"

Can anyone reproduce the error or even figured out, whats going wrong there?


texts:
I understand how to override/rewrite core models in our custom module in magento, I just want to understand how does it works?
In which file these rewrites are takes place.
for example
if I want to rewrite core/resource.php model I need to add

<models>
<core>
 <rewrite>
      <resource>Clipcart_Externaldb_Model_Resource</resource>
 </rewrite>
 </core>
</models>

I just want to know how does it works?
Thanks!.


texts:
What is location of Account tab ?

I want to add the "account" tab in the header section.

Where is the template of that "account" tab is located in the base package/rwd package ?


texts: How to configure Magento 1.9 Cron Job to run on a Windows Server 2016?

texts: I would like to set the Cron Job to allow Magento to send emails after new orders from customers. I tried running Magento Cron Job on Windows Task Scheduler with the script from wget.exe and an argument of http://mywebsite.com/cron.php, with a trigger that repeats every minute. However, I'm still not able to send emails. I have searched everywhere to find info about this and I'm not sure if I configured it the appropriate way and which one is supposed to be running cron.php or cron.sh? Thanks a lot for the help!


texts:
I'm trying to import products from a CSV file and keep getting errors.  The following 2 errors appear for each row in the CSV file.  Seems (at least to me) that it could be a category issue?!?!  Can someone please help me diagnose and fix the issue?  Thank you in advance!

error 1:SQLSTATE[42000]: Syntax error or access violation: 1055 'dbname.cce.entity_type_id' isn't in GROUP BY - SELECT cce.entity_type_id,cce.attribute_set_id,cce.level+1 as level,COALESCE(MAX(eac.position),0)+1 as position

FROM catalog_category_entity as cce

LEFT JOIN catalog_category_entity as eac ON eac.parent_id=cce.entity_id

WHERE cce.entity_id=?

GROUP BY eac.parent_id
error 2:SQLSTATE[42000]: Syntax error or access violation: 1055 'dbname.cce.entity_type_id' isn't in GROUP BY - ERROR ON RECORD #1


texts: Magento is not supported on Windows OS and Mac OS?

texts:
I'm trying to upgrade from community edition of Magento 2.3.1 to Enetreprise Edition of M2. I am using docker Image for M2 CE and trying to upgrade to M2 EE.

I have tried below ways:

https://magento.stackexchange.com/questions/278212/upgrade-from-open-source-to-commerce-magento-2
How to upgrade from Magento 2.3.1 CE to Magento 2.*.* EE?

but no luck yet.

Still trying and came across this link:

https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements-tech.html

Here a statement is: Operating systems (Linux x86-64)
Linux distributions, such as RedHat Enterprise Linux (RHEL), CentOS, Ubuntu, Debian, and similar.

Magento is not supported on:
Windows OS,
Mac OS

I didn't get this point, can somebody clarify this.. As I know Magento works on MAC OS and Windows. Is there any stack requirement that Magento is not upgrading to Enterprise Edition ?


texts: Shipping rate calculation in Table rate Shipping method Magento 2

texts:
I am developing custom shipping method similar to Table rate Shipping method in which I am comparing Product SKU instead of Product Weight/Price.

I am able to import CSV with this change and store CSV data in my custom table successfully.

Now i am not able to find code in Table rate shipping method which is responsible for comparing Product weight/Price with CSV Weight/Price and display shipping rate accordingly in Checkout page.

If anybody has studied Table rate shipping method code, Please guide to find code block for this.

Thanks!