texts:
I am using multiple packages for various themes

example::

default/hellowired, rwd/default etc.

The mobile site is being loaded from another package than the desktop package. Everything is working fine but when I merge the css, the css is not being applied in mozilla firefox browser only. The firebug shows Styles section blank with a message to create new rule. The same website with css merge is working fine in other browsers. I checked by viewing source, merged css files are loading fine in mozilla firefox. I have cleared the old merged css files from media/css/..

Please let me know the steps how can I identify the issue or if there any solution.


texts:
I want to integrate Facebook in my magento 2.3 site.
I am referring this doc .https://www.mageplaza.com/kb/how-to-integrate-facebook-with-magento.html
But as mentioned in step 2, i dont find Marketing > Social: Connect to Facebook option.
Can anybody help me with this.
Is there any updated doc?


texts: Magento 2 Sort by New Products and Most View Product

texts: I am using this Magento 2 add Sort By Best Sellers Option on category products litsing page for Best Seller Products i want to same  New Products and Most View Product


texts: Magento 2 - How to update product using custom file.?

texts:
How to update product using the custom file from Magento root.?

https://www.domain.com/update.php


texts: Magento 2.3 - Setup error - FastCGI sent in stderr - Access to the script has been denied

texts:
How to solve the following error during Magento 2.3 setup
2020/07/16 23:24:20 [error] 25704#0: *9 FastCGI sent in stderr: "Access to the script '/usr/share/nginx/html/testusa/setup/index.php/navigation/header-bar' has been denied (see security.limit_extensions)" while reading response header from upstream, client: 2.3.3.2, server: , request: "GET /setup/index.php/navigation/header-bar HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "2.3.3.2:8082", referrer: "http://802.2.23.2:8082/setup/"


texts: Display custom option in cart page magento 2?

texts:
I am adding custom option using this code

$product->addCustomOption('custom', $id, $product);

Its save in database but how to display that custom option in cart item in magento 2?


texts: Get all order details from getItems() / getAllItems() / getAllVisibleItems()

texts:
I am trying to get all the order data.
So I came across these three different types of methods to get items from an order

getItems()
getAllItems()
getAllVisibleItems()

I tried the first two getItems() and getAllItems , they give me double entries of order

One with no size
Another with 0 price

code

    foreach ($orderInfo->getAllItems() as $item):?>
    // code to get all order attributes
    <?php endforeach; ?>

and when I tried last option getAllVisibleItems() I get a single entry(which I need), but size is missing.

code

    foreach ($orderInfo->getAllVisibleItems() as $item):?>
    // code to get all order attributes
    <?php endforeach; ?>

So on some exploration, I found that getAllVisibleItems() gives me configurable product which doesn't have the size,

So how can I get all order details in a single entry which contain every order related details

Item Name , Size , Quantity , Price
I am puzzled how can I get all these details.


texts:
I would like to set up an ecommerce shop which I can host myself and customize myself if possible. I would like to know if Magento Community is capable for the following features:

Payment via Credit Card (Visa / Mastercard / American Express), Paypal and normal Bank Account
Sell software and making this software downloadable via Magento
sell ebooks (pdf and other formats)

Looking forward to your reponses!


texts: How I can Filter admin Order collection by status (Pending Only)?

texts:
How can I filter admin order collection and showing only pending orders in grid?

So how can I extend it in custom module? Any suggestion about that?


texts:
how can I upgrade my Magento 2.2.2, when composer is not available? Upgrade in backand also not possible. PHP Limit.

It is a hosting provider and I have no composer or backend update. Only SSH, FTP and Database connect.

Thank you!


texts: Programmatically creating a simple product, showing a blank screen and not added

texts:
Upon running the script I only see a blank screen and nothing is updated within admin. Everything set in this file exists in my installation so I'm not sure what's wrong.

Also if I remove the try/catch block I get a few errors. Is there any documentation for this?

Here is my code:

<?php
error_reporting(E_ALL | E_STRICT);
$mageFilename = 'app/Mage.php';
require_once $mageFilename;
Mage::setIsDeveloperMode(true);
umask(0);
Mage::app();
Mage::app()->setCurrentStore(Mage::getModel('core/store')->load(Mage_Core_Model_App::ADMIN_STORE_ID));

try {
    //$product = Mage::getModel('catalog/product');
    $product = new Mage_Catalog_Model_Product();

    // Build the product
    $product->setSku('testing product');
    $product->setAttributeSetId('9');# 9 is for default
    $product->setTypeId('simple');
    $product->setName('Some cool product name');
    $product->setCategoryIds(array(3));
    $product->setWebsiteIDs(array(1)); # Website id, 1 is default
    $product->setDescription('Full description here');
    $product->setShortDescription('Short description here');
    $product->setPrice(39.99); # Set some price

    //Default Magento attribute
    $product->setWeight(4.0000);

    $product->setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH);
    $product->setStatus(1);
    $product->setTaxClassId(0); # default tax class
    $product->setStockData(array(
    'is_in_stock' => 1,
    'qty' => 99999
    ));

    $product->setCreatedAt(strtotime('now'));
    $product->save();
}   catch (Exception $ex) {
    # ..
}


texts: Multi select product attribute value not saving in magento2

texts:
I have created a script file to update the multi select attribute for the products

here is my code

 <?php

 error_reporting(E_ALL);
 use \Magento\Framework\App\Bootstrap;
 require __DIR__ . '/app/bootstrap.php';
 $bootstrap = Bootstrap::create(BP, $_SERVER);
 $obj = $bootstrap->getObjectManager();
 $state = $obj->get('Magento\Framework\App\State');
 $state->setAreaCode('frontend');

 $resource = $obj->get('Magento\Framework\App\ResourceConnection');
 $connection = $resource->getConnection();
 $sql = "SELECT `e`.*  FROM `catalog_product_entity` AS `e` WHERE (`e`.`attribute_set_id` = '19') limit 3";
 $result = $connection->query($sql);
 $resultCollection = $result->fetchAll();
 $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
 foreach($resultCollection as $item){
  $productId = $item['entity_id'];
  $product = $objectManager->get('Magento\Catalog\Model\ProductFactory')->create()->load($productId);
  $attrCode = 'pod_paper_size';
  $sourceModel = $product->getResource()->getAttribute('pod_paper_size')->getSource();
  $valuesText = explode(',', 'Extra_Small,Medium,Small,Large');

  $valuesIds = array_map(array($sourceModel, 'getOptionId'), $valuesText);

  $product->setData('pod_paper_size', $valuesIds);
  $product->setVisibility(4);
  $product->save();

}

Can anyone update me what is the correct code to update the multi-select attribute value pro grammatically, Thanks in Advance!!


texts: Base table or view not found: 1146 Table 'mycompany_live.debit_bankdata' doesn't exist

texts:
I am using Magento 1.9.4.0 with Patch SUPEE-11086 and PHP 5.6. I get this error logged into my console after checkout:

a:5:{i:0;s:222:"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mycompany_live.magedebit_bankdata' doesn't exist, query was: SELECT `magedebit_bankdata`.`bank_name` FROM `magedebit_bankdata` WHERE (swift_code='5498494') LIMIT$
#1 /home/mycompany/live/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/mycompany/live/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /home/mycompany/live/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `magedeb...', Array)
#4 /home/mycompany/live/lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `magedeb...', Array)
#5 /home/mycompany/live/lib/Zend/Db/Adapter/Abstract.php(828): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#6 /home/mycompany/live/app/code/community/Itabs/Debit/Model/Resource/Bankdata.php(83): Zend_Db_Adapter_Abstract->fetchOne(Object(Varien_Db_Select))
#7 /home/mycompany/live/app/code/community/Itabs/Debit/Model/Bankdata.php(65): Itabs_Debit_Model_Resource_Bankdata->loadByIdentifier('swift', '5498494', NULL)
#8 /home/mycompany/live/app/code/community/Itabs/Debit/Helper/Data.php(81): Itabs_Debit_Model_Bankdata->loadByIdentifier('swift', '5498494', NULL)
#9 /home/mycompany/live/app/code/community/Itabs/Debit/controllers/AjaxController.php(42): Itabs_Debit_Helper_Data->getBankByIdentifier('swift', '5498494')
#10 /home/mycompany/live/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Itabs_Debit_AjaxController->checkblzAction()
#11 /home/mycompany/live/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('checkblz')
#12 /home/mycompany/live/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#13 /home/mycompany/live/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#14 /home/mycompany/live/app/Mage.php(690): Mage_Core_Model_App->run(Array)
#15 /home/mycompany/live/index.php(83): Mage::run('', 'store')
#16 {main}";s:3:"url";s:21:"/debit/ajax/checkblz/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}

The checkout works and the correct bank data is saved, so why do I get this message?


texts: My .htaccess doesn't allow backend to save changes

texts:
I have rules in my .htaccess file that I use in order to completely eliminate index.php from all URLs in a Magento installation I have (currently in a subdomain).

    Options +FollowSymLinks
    RewriteEngine on

    RewriteBase /

    RewriteCond %{THE_REQUEST} ^.*/index.php
    RewriteRule ^(.*)index.php$ http://my.website.com/$1 [R=301,L]
    #RewriteRule ^index.php/(.*) $1 [R=301,QSA,L]

Everything works fine (almost). Whenever I type in  a URL with index.php it automatically redirects to its non index.php version. The commented line (RewriteRule ^index.php/(.*) $1 [R=301,QSA,L]) is the one that's giving me trouble. When uncommented, I can't save any changes in the backend (Ex: Changing the store name or a product name, etc...)

What am I doing wrong?


texts:
I was wondering if there's a way to add a Total Row in a Custom Grid in Magento 2? I already have a Custom Report using Custom Grid in Magento so I made like 20 reports all in all. But client want to add a total in each of the tables but I can't find any source that will tell me how to do it. Surely I can just copy the approach in vendor/magento/module_report but redoing all the report I did will be very time consuming. And it doesn't make sense to redo all the code just to add a TOTAL ROW in each of the table. For now I have this

But what I'm trying to achieve is something like this

As you can see the TOTAL Row should be inside the first Grid Table and not in a separate table. Is there a way to achieve this in Magento 2 Custom Grid?
Note: I already checked the vendor/magento/module_report but this require me to redo all my code for custom grid. Is there a simpler and correct way to do this?


texts: Magento image size increase after upload

texts:
We have a very strange issue using Magento 1.9.3.6

After uploading an image using the image uploader both for CMS Pages and Product we see that the image size increase 3-times.

The image we are uploading in our disk is 100kb after uploading through magento file uploader it becomes 300kb

Even with images already loaded all of them have been increased. It's weird.

We can't figure out the problem since in magento backend there is no setting for the image quality or image compression.


texts: Mage registry key "_singleton/core/resource" already exists - need fixes without clearing cache

texts:
We cleared the cache via the magento admin which then appeared to stop part way through and the site died.

Have cleared the cache via ssh, changed the database cache options to 0.  Tried adding the if cache then clear cache command in php on the index page as mentioned in many posts.  The cache is, to all purposes clear.  There is no APC cache on the site.

Really need some alternative suggestions that are not "clear the cache" as it has been - many times.  Also cleared the session data.

a:5:{i:0;s:59:"Mage registry key "_singleton/core/resource" already exists";i:1;s:840:"#0 /var/www/html/SITENAME/app/Mage.php(222): Mage::throwException('Mage registry k...')

Many thanks in advance

Jon


texts: getModel return false after rewrite model

texts:
I was trying to rewrite product model. It's my config.xml

<global>
    <models>
        <catalog>
            <rewrite>
                <product>
                    My_Namespace_Model_Product
                </product>
            </rewrite>
        </catalog>
    </models>
</global>

And My_Namespace_Model_Product

class My_Namespace_Model_Product extends Mage_Catalog_Model_Product
{

public function test()
{
    var_dump(Mage::getModel('catalog/product'));
}
}

Why function Mage::getModel('catalog/product') return me false after rewrite class?


texts: how to create new module with admin description field on product page magento

texts:
I want to know how to add new custom module on the product view page.
Please give me some suggestion how it will be possible .


texts:
I am having issues with cron.php constantly running. I never had an issue with this until I upgraded to Magento CE 1.9.1.1. My hosting provider actually had to disable cron.php because it was causing a high load on the CPU. I installed AOE Scheduler and disabled some tasks which weren't necessary. I then had my hosting provider re-enable access to cron.php. However, cron will not run on the server even though I have a cron job setup correctly. I then decided to manually run the cron job by entering it's address in my internet browser's address bar. Once again, cron.php would constantly run and not stop, causing a high load on the CPU. The only way I could get it to stop was to rename cron.php to something like cron.BAK.

Cron tasks do run when I use AOE Scheduler to run the task immediately. However, I can create a schedule with AOE Scheduler and cron isn't running those tasks because it still isn't being executed by the server.

My question is two fold...

How do I find out why cron.php won't stop running? Is this an issue with 1.9.1.1? I never had this issue until I upgraded from 1.9.1.0 to 1.9.1.1.
Why isn't the server executing the cron job I have setup? Once again, I never had this issue until I upgraded to 1.9.1.1.

Right now, I'm mainly concerned with question #1. Question #2 is a low priority until I can get cron.php to run the tasks it's supposed to run and then stop. It's becoming a real pain because I'm getting hounded by my hosting provider about the high CPU load.


texts:
mayb I am at the wrong place but I wanted to ask you experts out there, in what resolution, maximum size, bitrate and frames per second you would add a background video to a Magento 2 page as a header?

I have tried some versions but I am not sure what would be best.

Yours


texts:
Every time I install an extension I receive the error displayed in the screenshot. If I click on the "integrations" link it takes me to System/Integrations.

I then activate Magento Social and the message disappears. However, a few days later the same message appears again. Why is this happening?


texts:
I am looking for an extension that enables the buyer to choose from a variety of shipment options in the cart. So one product in the cart should get basic shipping of $5 for example. Another one should have premium shipping which costs $15 and yet another one should have special shipping which costs $50.

So in case of 2 items in the cart and one has basic and one special shipping, the costs for shipping should be $55.

The shipping types should be configurable in the admin and of course the ones above are just examples. I googled a bit and found some "shipment per product" extension, but none of them does what I described above.

Any idea if such an extension exists?

Magento 2

Thanks!


texts: I want to deploy a sample magento site on AWS. I need help to deploy site on AWS from scratch. Anyone can provide proper documentation for deployment of magento on AWS.


texts:
I am trying to install magento 1 in ubuntu 16.04LTS with PHP version 7.02. But I'm getting an error as below:

  CONNECT ERROR: Package community/Mage_All_Latest 1.9.3.7: requires PHP
  version >= 5.2.0 and <= 6.0.0 current is: 7.0.22-0ubuntu0.16.04.1
  Package community/Interface_Adminhtml_Default 1.9.3.7: requires PHP
  version >= 5.2.0 and <= 6.0.0 current is: 7.0.22-0ubuntu0.16.04.1
  Package community/Interface_Frontend_Default 1.9.3.7: requires PHP
  version >= 5.2.0 and <= 6.0.0 current is: 7.0.22-0ubuntu0.16.04.1
  Package community/Interface_Install_Default 1.9.3.7: requires PHP
  version >= 5.2.0 and <= 6.0.0 current is: 7.0.22-0ubuntu0.16.04.1
  Package community/Mage_Downloader 1.9.3.7: requires PHP version >=
  5.2.0 and <= 6.0.0 current is: 7.0.22-0ubuntu0.16.04.1 Package community/Mage_Centinel 1.9.3.7: requires PHP version >= 5.2.0 and <=
  6.0.0 current is: 7.0.22-0ubuntu0.16.04.1 Package community/Interface_Frontend_Base_Default 1.9.3.7: requires PHP
  version >= 5.2.0 and <= 6.0.0 current is: 7.0.22-0ubuntu0.16.04.1
  Package community/Phoenix_Moneybookers 1.9.3.7: requires PHP version>= 5.2.0 and <= 6.0.0 current is: 7.0.22-0ubuntu0.16.04.1 Package community/Mage_Compiler 1.9.3.7: requires PHP version >= 5.2.0 and <=
  6.0.0 current is: 7.0.22-0ubuntu0.16.04.1

This is the first time I'm working with magento 1. At beginning of the installation the PHP version and module check showed everything fine. But this error is blocking the installation. Please help.


texts: Magento 2 add custom value for Order Description in paypal?

texts:
The above image from Paypal. I change the value for Description or Order Description but I don't know where magento passing the information to the paypal popup.

I want to change the value for Order Description or Description in paypal.

By default value on paypal is Shopping Cart for both field.
I want to change that to some meaning full value that help me.

But I am not able to find the proper files to do so. Please provide suggestion where should I start.

I am using paypal_express

When I debug, I either land on Quote or Payment module be unable to find the file or location where I should override.


texts:
in magento 1 for open window we use this code

<a href="" onclick="popWin('<?php echo Mage::getUrl('example/order/orderitems') ?>',
                        'gallery', 'width=1500,height=700,left=0,top=0,location=no,status=yes,scrollbars=yes,resizable=yes'); return false;" ><?php echo $this->__('Items Ordered');?> </a>

In magento 2 how can i open popup window on click in admin panel?


texts:
When I do the this php bin/magento setup:static-content:deploy it gives me error of

  [Magento\Framework\Exception\LocalizedException]
  NOTE: Manual static content deployment is not required in "default"
  and "developer" modes.

In "default" and "developer" modes static contents are being deployed automatically on demand.
  If you still want to deploy in these modes, use -f option:

  'bin/magento setup:static-content:deploy -f'

and my website will be in death white screen can you please help me how I'm gonna fix this thank you


texts: Having trouble using catalog_product_list block to display a custom product collection

texts:
Magento Enterprise v1.14.2

I'd like to use the standard catalog/product/list.phtml template to display a custom set of products. In this case, I want to display the contents of the customer's wishlist and I'm editing template/wishlist/shared.phtml.

I get the product IDs from the customer's wishlist, create a product collection, create a product_list block, but the block just refuses to output only the products in my collection - instead, it outputs all products on the website.

<?php
    if ($this->hasWishlistItems()) {

        // Get product IDs from wishlsit
        foreach ($this->getWishlistItems() as $item) {
            $productIds[] = $item->getProductId();
        }

        // Create collection of those products
        $collection = Mage::getModel('catalog/product')
                          ->getCollection()
                          ->addFieldToFilter("entity_id", array("in" => $productIds));

        // Create product_list block using the list.phtml template
        $block = Mage::getModel('core/layout')
                     ->createBlock('catalog/product_list')
                     ->setCollection($collection)
                     ->setTemplate('catalog/product/list.phtml');

        echo $block->toHtml(); // Showing ALL PRODUCTS on website!

    }
?>

I've tried using setProductCollection() and setLoadedProductCollection() but neither works, and I'm pretty sure setCollection() is the correct function anyway.

What's going on?


texts: Increase Sales Flat Order Item [sku] character limit past 255

texts:
I have a magento site with many custom options. When the product is created, sometimes the sku is longer than 255 characters.

The sku I'm refering to is in "sales_flat_order_item" and a few other places I believe.

Is it safe to change these fields to "text" instead of "varchar255"?


texts: How to remove .php from url using htacces

texts: I want to remove index.php from my url, please give me solution over this.


texts: How to programmatically set a customizable option to product on submitting form in magento 2?

texts:
I've already seen this post, but cannot use it :
How to create order programmatically in Magento 2?

I would like to be able to programmatically add products to cart, and I need to set 'Customizable Options' that are textfields and datefield.

I'm lost into the Magento 2 core code, and keep getting errors.

The main one actually is : "Please specify product's required option(s)."

I tried using 'Magento\Catalog\Model\Product\Option', but I cannot build my options array properly.

Here is my actual code :

<?php

namespace Company\Module\Controller\Post;

use Magento\Framework\App\Action\Action;
use Magento\Catalog\Api\ProductRepositoryInterface;

class Checkout extends Action {

protected $_cart;

public function __construct(
    \Magento\Framework\App\Action\Context $context,
    \Magento\Checkout\Model\Cart $cart
/* ... here some stuff ... */

    $this->_cart = $cart;
    parent::__construct($context);
}

public function execute()
{

    try {
        $_product = $this->_productRepository->getById(1);
        //$_product = $this->_productRepository->get('sku1');

        $params = array();
        $params['qty'] = 1;

        $this->_cart->addProduct($_product,$params);
        $this->_cart->save();
        $this->_redirect("checkout/cart/add/form_key/", $params);

    } catch (\Magento\Framework\Exception\LocalizedException $e) {
        $this->messageManager->addException($e, __('%1', $e->getMessage()));
    } catch (\Exception $e) {
        $this->messageManager->addException($e, __('error.'));
    }
}
}

This function is executed on a form submit


texts: Magento 2: How to Override Abstract Class for Product Category Indexing Issue?

texts:
I have 2000 products which is assigned to multiple categories.

When i run

php bin/magento indexer:reindex catalog_category_product

In catalog_category_product_index total record count is 1700.

So on frontend remaining 300 products are not displaying under the category, but if I search that product then it displays in result.

From Admin when I again Select All Enabled product & Change Status of them to Enable again then it displays correct count & number of products under the category.

What will be root cause or any alternative solution?

https://github.com/magento/magento2/issues/8018

[UPDATE]

Issue on magento\vendor\magento\module-catalog\Model\Indexer\Category\Product\AbstractAction.php files function isRangingNeeded

magento\app\code\Custom\Catalog\etc\di.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\Catalog\Model\Indexer\Category\Product\AbstractAction" type="Custom\Catalog\Model\Indexer\Category\Product\AbstractAction" />
</config>

magento\app\code\Custom\Catalog\Model\Indexer\Category\Product\AbstractAction.php

namespace Custom\Catalog\Model\Indexer\Category\Product;

abstract class AbstractAction extends \Magento\Catalog\Model\Indexer\Category\Product\AbstractAction {

    /**
     * Check whether select ranging is needed
     *
     * @return bool
     */
    public function isRangingNeeded() {
        /*
         * PATCH for select query limiting bug    See https://github.com/magento/magento2/issues/8018
         */
        return false;
    }
}

May be abstract class override or extend issue?

[UPDATE 2]

magento\app\code\Custom\Catalog\etc\di.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Catalog\Model\Indexer\Category\Product\AbstractAction">
        <plugin name="custom_catalog_product" type="Custom\Catalog\Plugin\Model\Indexer\Category\Product\AbstractAction" />
    </type>
</config>

magento\app\code\Custom\Catalog\Plugin\Model\Indexer\Category\Product\AbstractAction.php

namespace Custom\Catalog\Plugin\Model\Indexer\Category\Product;

/**
 * Class AbstractAction
 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
 */
class AbstractAction
{
   /**
     * Check whether select ranging is needed
     *
     * @return bool
     */
    public function afterIsRangingNeeded() {
        /*
         * PATCH for select query limiting bug    See https://github.com/magento/magento2/issues/8018
         */
        return false;
    }
}


texts: Magento 2 - How can I define constants or variables once and reuse them in a custom module?

texts:
I have a few constants that I'd like to define once and reuse many times within various files throughout my custom module.  For example, I write log entries to a custom file.  I'd like to add its pre-defined path in a central location and reference it from controllers, models, helpers, console commands, etc.

What's the most efficient way to do this?


texts: Magento Reviews - When do they get aggregated?

texts:
Can somebody provide some insight for when reviews get put into the rating_option_vote_aggregated table?  I'm trying to filter through my reviews based on four stars or higher and I was looking to use the percent_approved column for joining up with the review table, however not all of the latest approved reviews are in the rating_option_vote_aggregated table.

Do we need to install some sort of post-review-approval code that calls $review->aggregate()?

Thanks in advance!


texts: Magento 1.9 CE - Bundesland deaktivieren / disable state/province select

texts:
seit CE 1.7 ist es eigentlich möglich, unter Allgemein -> Bundeslandoptionen die Abfrage nach dem Bundesland zu deaktivieren. Auch in 1.8.0.1 war das noch möglich. Jetzt habe ich eine 1.9.0.1 Installation und dort ist dieser Bereich nicht mehr vorhanden...

Wurde es verschoben, oder ist es in der aktuellen 1.9 nicht mehr möglich, das Bundesland zu deaktivieren?

Danke

since 1.7 it is possible to deactivate the state/province dropdown in general -> State options. But in 1.9 this Tab isn't any more there... has it moved?

Thanks


texts: Magento 2 Facebook login shows "HybridAuth Open Source Social Sign On PHP Library"

texts:
I'm using social login extension to login with Facebook on my site, after entering the username and password it shows the error as below,

I have tested this on local and live site, it's working fine but not
working on the demo site. FYI, the Facebook login app is in live mode.
Also, just to let you know my site URL is HTTP, not HTTPS

Let me know if anyone has any solution or what does this error means?


texts: I want to know does magento provide signature require for shipping.Like when customer receives their order they need to sign the shipment.My shipping method is UPS.So is there any way to configure UPS in magento for this purpose?


texts: 500 internal server error and no solution from the hosting

texts:
we updated Magento from 2.2.3 to 2.2.6. then the error started, we changed the PHP to 7 from 7.1 but we still have the same issue.

my frustration is that the hosting company for 2 weeks not sure about the issue.

is it wise to keep Magento 2.2.6 or downgrade?

is it safe to work on the development site while we trying to solve the issue?

is it wise to download the site on a local server and work on it then upload to the live site when issue resolved?

Thanks all


texts: How to associate an attribute option with a product

texts:
I would like to know how to add an option to a product.
I created the attribute via an sql file and it works.

$installer->addAttribute('catalog_product', 'score_attribute',  array(
    'group'             => 'General',
    'label'             => 'Score Attribute',
    'type'              => 'int',
    'input'             => 'select',
    'default'           => '0',
    'class'             => '',
    'backend'           => '',
    'frontend'          => '',
    'source'            => '',
    'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
    'visible'           => true,
    'required'          => true,
    'user_defined'      => false,
    'searchable'        => false,
    'filterable'        => false,
    'comparable'        => false,
    'visible_on_front'  => false,
    'wysiwyg_enabled'   => false,
    'is_html_allowed_on_front'      => false,
    'visible_in_advanced_search'    => false,
    'filterable_in_search'          => false,
    'used_in_product_listing'       => true,
    'used_for_sort_by'              => true,
    'is_configurable'               => false,
    'used_for_promo_rules'          => true,
    'unique'                        => false,
    'note'                          => 'Product score' ));

Options are created dynamically. An option contains a score which can change, depends of a stock and several other things.
This option is correctly created and i can see it on EAV_Attribute_option_value.

 $attributeCode = 'score_attribute';
 $attribute = Mage::getModel('eav/entity_attribute')
      ->loadByCode('catalog_product', $attributeCode);
 $option['attribute_id'] = $attribute->getId();
 $option['values'] =  array($score);
 $installer->addAttributeOption($option);

But now i don't know how to associate it to a product.
I tried to do this but nothing happens :

 $product->setData('score_attribute',$optionId); or
 $product->setData('score_attribute', $score);

Could you help me please?

Cheers,


texts: Magento 2 : declare new image id with no theme

texts:
I wish to add a new image id for a custom product widget.

I know I can do this with the file view.xml in my theme but I would like to do this in the Module (app/code/vendor/module).

https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/themes/theme-images.html

<images module="Magento_Catalog">
    <image id="unique_image_id" type="image_type">
    ...
    </image>
<images/>

Is it possible to do this in a module, with no theme ?


texts: How to use owl carousel using require js in magento 2

texts:
Anyone can help me out how to use owl carousel using a custom theme by using require js I have downloaded owl carousel zip file from an official website.
I want to use this owl carousel  in my block in admin I have created a custom theme and apply it in all stores using admin.make an owl carousel using custom theme


texts: override theme .phtml file into custom module

texts:
How can override theme .phtml file override into custom module.

Path theme .phtml file is
app\design\frontend\ThemeName_CompanyName\Module_Catalog\templates\product\view\pricedifference.phtml
and this file reference in app\design\frontend\ThemeName_CompanyName\Magento_Theme\layout\catalog_product_view.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-right" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
 <referenceContainer name="content">
            <container name="product.top.wrap" htmlClass="row" htmlTag="div">
                <container name="product.top">
                    <container name="product.info.left" htmlClass="col-sm-5" htmlTag="div">

                        <block class="Vendor\Module\Block\Template" name="product.info.pricedifference" template="Magento_Catalog::product/view/pricedifference.phtml" />
                    </container>
                    <container name="product.info.middle" htmlClass="col-sm-7" after="product.info.left" htmlTag="div" />
                </container>
            </container>
            <container name="product.bottom" />
        </referenceContainer>
</page>

How can override pricedifference.phtm into my custom module in app\code\vendor_module or add new block after exact this block?


texts: Filter Related product account current product category in Admin grid

texts:
I want to filter related product collections by the current product category. I mean I want to show only current product category products in the related product grid in the admin side.

Is there any way where we can pass category id or filter related product collections?


texts: Magento 2 : Specific Range Validation in system configuration field

texts:
I'm new in magento. I develop one module in Magento 2.2.2.

I want to do like that in system configuration that, user can enter value between 0 to 100 in that field.

User can't enter text value and negative value in that field.

How, this field validation I can apply in system configuration.

Please help me.

System.xml :

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
        <tab id="erdsystem" translate="label" sortOrder="10">
            ERD system
        </tab>

            General Configuration
            <tab>erdsystem</tab>
            <resource>ERD_Helloworld::config_helloworld</resource>
            <group id="settings" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                <field id="width" translate="label comment" sortOrder="0" type="text" showInDefault="1" showInWebsite="0" showInStore="0">
                    Enter Width
                </field>
            </group>

    </system>


texts: Why doesn't Magento Cloud Commerce Pro have auto scale?

texts:
Was wondering why Magento Cloud Commerce Pro doesn't offer Auto Scale considering there would be a lot of savings for it's merchants given that most merchants have little to no use of it's Server resources during night time.
Is Auto-Scale in their roadmap ?

I haven't seen it anywhere. Not in their Summits at least. If anyone knows or has information on this please post.


texts:
I have tried to create an custom theme, my order structure is like this:

  app/design/frontend/Steiner/Josef/

In "Steiner" i got:

 1. -composer.json
 2. -registration.php

  and in "Josef" i got:

 1. -theme.xml

i flushed the cache, done an upgrade, compile, static deploy nothing seems to work still no theme appear on admin page.

The Magento Folder is completly empty i cannot find the other Themes like "Luma".
I have downloaded Magento 2.3.4 directly from the Magento Homepage and not Github.
How do i create an custom Theme now?


texts: Docker dev environment doesn't allow command line commands

texts:
I recently set up a magento2 dev environment with Docker as identified on magento.com. However after installing new extensions I cannot run setup:upgrade or static-content deploy.  Is this because of an internal domain name not being set or a db connection issues? Below are my CLI errors.

[Zend_Db_Adapter_Exception]
  SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: nodena
  me nor servname provided, or not known

 [Exception]
  Warning: PDO::__construct(): php_network_getaddresses: getaddrinfo failed:
  nodename nor servname provided, or not known in /Users/devmac03/Desktop/mvp
  /shared/webroot/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/A
  bstract.php on line 129


texts: How to dynamically change number of varnish servers with magento2?

texts:
I am wondering how I can dynamically increase and decrease the number of varnish instances for a Magento2 installation as needed - with an aws autoscaling group, for example.

Configuring them from the client side is easy: I can just use a load balancer. But Magento2 also needs to be aware of each instance, and this seems to be a bit more tricky. Updating the configuration file would require an app:config:import, which is a bit of a hassle in a production multi-server environment.

The Magento documentation suggests this command:

magento setup:config:set --http-cache-hosts=192.0.2.100,192.0.2.155:6081

(https://devdocs.magento.com/guides/v2.2/config-guide/varnish/use-multiple-varnish-cache.html)

Is it an appropriate way to update the varnish servers continuously in an operational / live / production system?


texts: Magento 2 Shipping Methods Are Not Loading in IE 10

texts:
I got an issue that shipping methods are not loading in checkout only in IE 10, remaining all browsers shipping methods are loading but in only IE 10 Shipping methods are not loading.

But once if I refresh the page then they are loading and these only occur in production mode only but not in developer mode. Can any have face this kind of issue, Please help us. We are using ahead works one page checkout.


texts: How to skip missing additional images and continue to import products?

texts:
I am importing more than 10000 products to my Magento 2 store and got the following error codes:

Imported resource (image) could not be downloaded from external
resource due to timeout or access permissions in row(s): 2

I knew I can fix this problem by uploading the missed images or delete the row(s), but it's very time-consuming.

Is there any way to skip the invalid images and continue the importing procession since I don't mind that a few products missing some additional images?

Thanks.


texts: Can't reindex Magento 2 on MAMP through OSX terminal

texts:
I'm trying reindex latest Magento 2 using OSX 10.11 terminal with php bin/magento indexer:reindex command without success. Terminal returns same error on two red blocks.

– Maybe MYSQL socket problem?

ps. Magento2 is setup on MAMP PRO 3.


texts: Best way to implement a watermark on all the product's photos?

texts:
Magento 1.9.1

If I remember correctly - there should be a utility within Magento to add the same watermark to all the product's photos automatically? Does this work well or do you recommend a different approach to adding watermarks?

An important question - if I add watermarks to all the product images using the utility within Magento - would it be possible (easy) to remove the water mark in the future?


texts: Unable to change Locale settings for Store

texts: Unfortunatelly in my case I cannot uncheck Locale setting, it is disabled. Could you please give me some help how to associate english language to English store. Thx


texts: Import Bulk Attribute Options in Magento 1.9.2.3

texts:
i am using Magento 1.9.2.3 version. I have a brand attribute and i want to import all its option through csv file. Is there any way to import bulk attribute option?

thanks


texts: How to prevent adding same item into wish list twice in magento 2.1.9

texts: I need to prevent users adding same item into user wish list. I could find an answer here .But i'm not able to implement it. please help me with the implimentation.


texts: Product Price disappeared from frontend magento 2.3

texts:
Products Prices does not show up on my magneto 2.3 web frontend. https://prnt.sc/p9mu83
Mapping is set to No in stores->configuration->sales->sales.https://prnt.sc/p9mtre
What is the issue.
Prices suddenly got disappeared.


texts: Need paypal collection fees/charge storage location for orders

texts:
I'm working on magento 1.9 CE and using paypal standard. I need data of fees charged for sales(done through paypal) and have searched long to find out if they are stored in database. I know that the following link provides the numbers https://www.paypal.com/in/webapps/mpp/paypal-fees.

I would like to know if they are stored in database so that I can automate. Thanks in advance.


texts: Magento : Attributes For Product Not Saving

texts:
I am using Magento 1.9.x.
I have created some attributes for products,
When I save, this attribute not working.

Pls help me
https://ibb.co/hUmVY9

Thanks


texts:
In Magento 2.4.1 I have a custom multiple select attribute 'theme'
The theme attribute contains options 'football' and 'sport'
Some products have both attribute options applied. I can apply both attribute values to a product fine but when I filter in product grid dashboard, it does not find products which have more than one attribute value applied.
If a product has one attribute value only then it filters correctly but if a product has multiple attribute filters applied it does not show.
Is this a default Magento 2 setting?
Thank you.


texts: How change folder when get code Module in github via composer in magento2?

texts:
I have create a module in github. When i run composer require namespace/modulename dev-develop in root magento2 folder. It get source to vendor/namespace/modulename folder.

I want put code to app/code like app/code/Namspace/Modulename.

this code in composer.json of this module.

{
    "name": "namespace/modulename",
    "description": "dev Module Base for Magento 2",
    "require": {
         "php": "~5.6.0|7.0.2|~7.0.6",
         "magento/framework": "100.1.*"
    },
    "type": "magento2-module",
    "version": "101.0.1",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "autoload": {
        "files": [
            "registration.php"
        ],
        "psr-4": {
           "Namespace\\Modulename\\": ""
        }
    },
    "extra": {
        "map": [
            [
                "*",
                "Namespace/Modulename"
            ]
        ]
    }
}

Many thanks!


texts: Does Paypal Express not dispatch checkout_submit_all_after event? If so how can I make it do it?

texts: I have several modules that rely on the checkout_submit_all_after event and when users checkout using Paypal express it seems none of their observers run. How would I go about fixing this?


texts: How can disable auto generation invoice in Magento 1.9.3.1?

texts:
I need to disable the auto invoice created by magento after a paypal payment.

The magento version is 1.9.3.1 and no settings are present to avoid this.


texts:
Here i have a requirement to build SKU. Basing on category,subcategory & brand. Rule is to con-cat 1st 3 chars of categories and subcategories and brand followed by DB increment number. At the movement data entry guy is manually entering SKU. which i have to automate.

Below are the screen shots for understanding.

Usualy in normal java script i would have simply call category element and concat it. But in knowckoutjs i am clue less.when i see inspect elements it has data-bind.

<input class="admin__control-text" type="text" data-bind="
        event: {change: userChanges},
        value: value,
        hasFocus: focused,
        valueUpdate: valueUpdate,
        attr: {
            name: inputName,
            placeholder: placeholder,
            'aria-describedby': noticeId,
            id: uid,
            disabled: disabled
    }" name="product[sku]" placeholder="" aria-describedby="notice-VCC6U0W" id="VCC6U0W">

i have tried pulling value using below code.i have placed below code in one of the common pages wizard.phtml.

function AppViewModel() {
       this.value = ko.observable("Enter String");
    }, this);
   }

   // Activates knockout.js
   ko.applyBindings(new AppViewModel());

any one help me in concatenating product categories.thanks in advance.


texts:
At the bottom of my Magento dashboard, it tells me that I have Magento ver. 1.7.0.2.

But, when I go to Magento connect, most the installed packages have version 1.9.2.2. And when I search for updates there is only 1 for addthis_sharingtool.

So what version do I have now this moment?


texts: Get Region Id given Region Code and country id

texts:
I need to get the region_id given the region_code and the country_id, but I cannot manage to achieve it.
I've tried using the countryFactory and the regionFactory, but i do not understand what i'm doing wrong.

I have something like this

in the constructor the RegionFactory

public function __construct(
    \Magento\Directory\Model\RegionFactory $regionFactory
) {
    $this->_regionFactory = $regionFactory;
}

function getRegionIdByCode($code){

 $region = $this->_regionFactory->create()
            ->loadByCode($code,$country_id)->getFirstItem();
...
}
//where code is correctly calculated based on a csv with all italian regions

Cannot manage to work with the $region object. I need to do something like
$region->getRegionId()

Is it possible??


texts: Error getting Block in controller Magento 2: Element 'block', attribute 'class': [facet 'pattern']

texts:
I'm trying to get block in my frontend controller like this:

$resultPage = $this->resultPageFactory->create();
$breadcrumbs = $resultPage->getLayout()->getBlock('breadcrumbs');

this is my XML file layout

<?xml version="1.0" ?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="content">
            <block class="Vendor\Module\Block\View\Index" name="promotion.view.categories" template="Vendor_Module::view/index.phtml">
                <block class="\Magento\Framework\View\Element\Template" name="promotion.view.subcategories.wrapper"/>
            </block>
        </referenceContainer>
    </body>
</page>

i always get an error like this:

Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'block', attribute 'class': [facet 'pattern'] The value '\Magento\Framework\View\Element\Template' is not accepted by the pattern '[A-Z][_a-zA-Z\d]*(\\[A-Z][_a-zA-Z\d]*)*'.


texts: How to bring up a list of all products that are currently 'Out of Stock'?

texts:
Magento 1.9.4

Is there an easy way to bring up a list of all products that are currently 'Out of Stock'?


texts: Magento Shopping Cart Price Rules Wrong Calculation

texts:
Magento ver. 1.9.0.1

I am running a $10 off coupon code for orders over $100 and more.

When there's one SKU in cart, the code works perfectly fine.

When there's multiple SKU in cart, the code fails.

Here's my settings

Conditions:
If ALL  of these conditions are TRUE :
Subtotal  equals or greater than  100

Actions:
Apply: fixed amount discount for whole cart
Discount Amount: 10
Maximum Qty Discount is Applied To: 0
Discount Qty Step (Buy X): 0
Apply to Shipping Amount: No
Free Shipping: No
Stop Further Rules Processing: Yes


texts: Magento 2 How to Add a New Column to Newsletter Subscribers Grid

texts:
I've added a new column to the table newsletter_subscriber called "name", now I want to add new grid column with the data from the "name" column.

How can I do it using Event Observers?


texts: How to add extra content to home page of Magento programmatically?

texts:
I'm totally new at Magento 2.
I want to add content to home page.

This is my code:

  app/code/Vendor/Module/etc/module.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
<module name="Vendor_Module" setup_version="1.0.0" schema_version="1.0.0">
</module>
</config>

  app/code/Vendor/Module/registration.php

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Vendor_Module',
__DIR__
);

  app/code/Vendor/Module/view/frontend/template/content.phtml

Home page extra content

What are next steps that I should do to to make heading appear in home page?


texts: When category is edit, The Magento shows this message error.


texts: Get categories error with magento 1.8 and flat catalog index enabled

texts:
Please we need some help with magento 1.8
On custom template we have categories list menu on left side.
If we activate Flat catalog categories we have memory error by getting category list.

Here the code works for 1.7 and not for 1.8

<?php

$rootcatId= Mage::app()->getStore()->getRootCategoryId();
$categories = Mage::getModel('catalog/category')->getCategories($rootcatId);
function  get_categories($categories) {
    $array= '
';
    foreach($categories as $category) {
        $cat = Mage::getModel('catalog/category')->load($category->getId());
        $array .= '
'.
        'getHomeUrl().$cat->getUrlPath(). '">' .
        $category->getName() . "\n";
        if($category->hasChildren()) {
            $children = Mage::getModel('catalog/category')->getCategories($category->getId());
            $array .=  get_categories($children);
        }
        $array .= '
';
    }
    return  $array . '
';
}
echo  get_categories($categories); ?>


texts:
We using PWA Studio 2.1.0 and have an issue with the server configuration and the proxy settings

The url of the website is http://pwa.agen.to/

But PWA studio is run at http://0.0.0.0:10000/

So the browser is auto directing

Is there a config doc or a simple solution?


texts:
I use this Magento extension: Easylife Switcher, i have a question maybe someone can help me with this, is there anyway to enlarge the color swatch / that small attribute on mouse over? and I want to display the label of the selected attribute too.

Thank you


texts:
The error message while checkout shows as "The PayPal certificate does not exist."
Please say a solution


texts:
I have installed magento on one of my site but I am not able to login in to the admin of site. Database table 'admin_user' is empty. It give me error:

    Access denied.

How can login into admin of site?

What I already did:

Imported table 'admin_user' from local and inserted data on live database. It didn't work.
Gone through these links: http://www.crucialwebhost.com/kb/how-to-reset-your-magento-password/, https://wiki.magento.com/display/m1wiki/Resetting+the+admin+Password
Checked https://magento.stackexchange.com/ questions related to admin login issue.

Error produce:

I created a database and imported sample data into it.
Install a fresh magento site and after installing I used database created in 1st step and all these are on same hosting.

Details:

Fresh magento version 1.9.2.1
Sample data version used 1.9.0.0
I have to do this because I could not install magento on sample database table.
Front-end working fine except few images are not displaying but thats not a issue here.

Anyone might have faced such issue or may face sometime. So what are the ways to login to admin of site?


texts: Magento map multiple colours to single simple product in layered navigation

texts:
I have many simple products, so consider a product X which is made up of 2 colours eg. red and black.

Now in Layered navigation for filtering

if the customer chooses red then the filter should show product X
if the customer chooses black then also the product X. Any idea on how to go about this?


texts:
In Backend When I try to change theme at that time I got this error

Exception #0 (Exception): Notice: Undefined index: default in /home/cloudpanel/htdocs/project/app/code/Codazon/ThemeOptions/Framework/App/Config/Initial.php on line 72

Initial.php

public function getData($scope)
    {

        list($scopeType, $scopeId) = array_pad(explode('|', $scope), 2, null);
        $this->themeId = $this->scopeConfig->getValue(\Magento\Framework\View\DesignInterface::XML_PATH_THEME_ID,$scopeType,$scopeId);
        $cacheKey = self::CACHE_ID.'|theme|'.$this->themeId;
        $data = $this->cache->load($cacheKey);
        if (!$data) {
            $data = $this->reader->read($this->themeId);
            $this->cache->save(serialize($data), $cacheKey);
        } else {
            $data = unserialize($data);
        }
        if($data){
            $this->_data = $data['data'];
            $this->_metadata = $data['metadata'];
        }
        return $this->_data['default'];
    }


texts: How to manage order of attributes on configurable products

texts:
If i have an attribute set witch has attributes "Color" and "Size". How do I choose the variant order on the quick created child products?

Let's say the child product is getting a SKU like this: shoe-42-red

How do I change the order of attributes, so the child product is created like this: shoe-red-42 ?


texts: How to fill product attribute based on two others

texts:
I have to fill programmatically attribute from two others. For example have attribute price_shippment and have to fill it from shippment+price.
Any sugestions?


texts: CE 1.9 - CSS class for CMS Page Layout update

texts:
I've created a CMS page which has some content in it (intended to be a separate registration page for wholesale customers). The CMS Page content itself is a little write-up about registering as a wholesale customer, and I need for my register form to display to the right of it. I've also updated the layout XML as follows:

<reference name="content">
<block type="customer/form_register" name="customer_form_register" template="wholesale/customer/form/register.phtml">
    <action method="setShowAddressFields"><value>true</value></action>
    <block type="page/html_wrapper" name="customer.form.register.fields.before" as="form_fields_before" translate="label">
        Form Fields Before
    </block>
</block>

Layout is set as 1 Column. My theme also utilises a CSS grid framework, and I would like for the page to display like so:

As it stands, they just stack vertically, with the register form showing beneath the CMS Page content. Is there anyway to achieve my desired output as above?


texts: Facebook comments on a product appears in all other product page

texts: I have set up the facebook Comments in product view page and all product pages are displaying same comments. How to avoid displaying other product's comment?


texts: Static Block for specific products in magento

texts:
Is there any way to do this :

I have two kinds of products, Handmade and ready women accessories. for handmade products I want a block under the price that tell the customer "This Product is 100% Handmade" and for the ready product nothing. So it will be only for the Handmade.

I already have a block but it is visible to all products, so I want it to be visible only for Handmade products.

Any Ideas ?


texts: Magento 2 What is the flag key & value want to save for unsubscribe in M2?

texts:
Note: Would request you to please don't close this as a out of topic.
We have small customisation that save the mail chimp group data + flag to the Magento 2 table "mailchimp_interest_group" when user subscribed & un-subscribed from customer dasahboard.
Scenario #1 (Working Scenario For Subscribers):
{"group":{"40d50147cd":["151db840c0","454ab0d3ec","acbeafd9ff","ed5a578a03"]},"is_subscribed":"1"}

Scenario #2:(Not Working Scenario For Un-Subscriber users):
{"group":{"40d50147cd":["151db840c0","454ab0d3ec","acbeafd9ff","ed5a578a03"]},"is_subscribed":"0"}
Here scenario 2 is not working. Not sure what exact flag key & value want to save in M2
Can any one have idea please give me some suggestions.
Tried with some other as mentioned below but no luck:
#1
{"group":{"40d50147cd":["151db840c0","454ab0d3ec","acbeafd9ff","ed5a578a03"]}}

#2.
{"group":{"40d50147cd":["151db840c0","454ab0d3ec","acbeafd9ff","ed5a578a03"]},"is_unsubscribed":"1"}

Tried with other ways to save groupdata with un-subscription flag But No luck

{"group":{"cb7ffddf1b":["fc7a73310d","f900e05d5d"]}}

{"group":{"cb7ffddf1b":["fc7a73310d","f900e05d5d"]},"UNSUBSCRIBED"}

{"group":{"cb7ffddf1b":["fc7a73310d","f900e05d5d"]},"UNSUBSCRIBER"}

{"group":{"cb7ffddf1b":["fc7a73310d","f900e05d5d"]},"is_subscribed":"3"}

{"group":{"cb7ffddf1b":["fc7a73310d","f900e05d5d"]},"is_subscribed":"0"}

{"group":{"cb7ffddf1b":["fc7a73310d","f900e05d5d"]}},"is_subscribed":"2"}

{"group":{"cb7ffddf1b":["fc7a73310d","f900e05d5d"]},"is_unsubscribed
":"1"}

Thanks


texts: not shown products on frontend after migration from magento 1 to magento 2.3

texts:
I did the migration with magento1 to magento 2.3
Everything works fine, but no products are displayed on frontend.

I tried all the methods that I found on the Internet, but it did not help.

How to solve this problem?


texts:
I bit confused utilizing order status and state. I have created Delivered status but unfortunately it get duplicated with two different state. When I rename order status lable of anyone it will automatically affects others also so I am not sure which status is shown in frontend. I am also tried to unassign but it will throw error can't unassign already orders are used this status.When I change the order status to delivered that order is not listed in customer account page, but I need to show delivered status in customer account page.

please refer the below screenshot for your easy reference

Thanks.


texts: replace cross sell with related on cart page

texts:
I know the correct answer is "why should you, cross sell products are supposed to be shown there".
But i got a stubborn customer who wants to show the related products on the cart page.

What is the correct way to do this?
Simply changing the type on Magento_Catalog/templates/product/list/items.html isn't working.

Thanks in advance!


texts: How to replace the subtotal including tax with subtotal excluding tax in the pdf invoice?

texts:
My pdf invoice show now the subtotal including tax, the tax, shipping taxes, and the grand total including taxes and i want to show the subtotal excluding tax instead of including tax.
I tried to edit the

/app/code/local/Mage/Sales/Model/Order/Pdf/Items/Invoice/Default.php
/app/code/local/Mage/Sales/Model/Order/Pdf/Invoice.php
/app/code/local/Mage/Sales/Model/Order/Pdf/Total/Default.php

Can anyone point me to the right direction?
Thank you


texts: The errror message "We don't have as many of some products as you want" is showing while adding the product to cart

texts:
I am getting the error message "We don't have as many of some products as you want" while adding the product to cart.
Help me to resolve this.


texts: M2: Random customers are getting "No Payment Method"

texts:
Currently on our store we're using PayPal Payflow & Zero SubTotal Checkout payment methods and we have products ranging b/w $0 to $400.
Recently some of our customer's informed us that they're not getting payment options to complete the order when total is $0. All they see is No Payment Methods text. This behavior is random, some customer's said that they we're successful in consecutive attempt.
No traces in logs. Any idea what might be the issue here.


texts: Error "Cannot read contents from file.." when changing themes from admin panel

texts:
Error:

  Cannot read contents from file "C:/wamp64/www/magento2/" Warning!file_get_contents(C:/wamp64/www/magento2/): failed to open stream: No such file or directory


texts: How to Select Shipping method before start shopping in magento?

texts:
Customer can able to select shipping method before to start the shopping experience, I have to place some restriction on shipping method base, Like Shop in 60min with a specific shipping method after 60min if customer didn't able to checkout he will redirect to change shipping method page to choose others options.

What i need to get is list of shipping method on a custom page from where customer will choose shipping method first & then go to the product pages for add to cart.


texts: How to set customer subscribed to newsletter by customer id

texts: I have an existing customer id, i want to set the customer subscribed to the newsletter using this customer id, is there a way to do this?


texts: extending the html head for frontend doesn't work for the back end?

texts:
I have been trying to get this right for a bit, but when I look at the adminhtml_head block I see that it extends off the html_head block.  I have extended the html_head block so that I could add a cdn item.  It works just fine on the front when I adjust the layout xml, but when I adjust the layout xml for the back end it skips over extended class, so the overwrite doesn't work.  Basically what I've done is test it by added a javascript to the adminhtml/page_head and that works using the normal add_js type.  But when I go to use the cdn_js type, since it's not hitting my method, it just skips it.

Is there any reason that the admin would not be picking up my over write even thou both the admin end up extending off the core Mage_Page_Block_Html_Head ?

In my config I have this

<blocks>
<page>
<rewrite>
    <html_head>Wsu_Storeutilities_Block_Html_Head</html_head>
</rewrite>
</page>
</blocks>

Which works for the front.  I have tried many different combinations to get the adminhtml to pick up as well with no luck.


texts: Magento 2.2.4 Overriding vendor/magento/module-catalog/view/adminhtml/layout/catalog_product_edit.xml

texts:
I am trying to hide the Store View change option by overriding vendor/magento/module-catalog/view/adminhtml/layout/catalog_product_edit.xml and commenting out like this:

<?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <update handle="catalog_product_new"/>
    <update handle="styles"/>
    <body>
        <referenceBlock name="page.title">
            <action method="setTitleClass">
                <argument name="class" xsi:type="string">complex</argument>
            </action>
        </referenceBlock>
        <!--
        <referenceContainer name="page.main.actions">
            <block class="Magento\Backend\Block\Store\Switcher" name="store_switcher">
                <action method="setUseConfirm">
                    <argument name="params" xsi:type="string">1</argument>
                </action>
            </block>
        </referenceContainer> -->
    </body>
</page>

It works if I comment this section directly from the vendor module. But, since it is not a good practice I tried to override it via following this instructions: How can i override this vendor layout file with my custom layout file in magento 2?

but it is not working for me. Please help.

UPDATE

There is the custom module I created:

registration.php

    <?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Company_CatalogProduct',
    __DIR__
);

etc>module.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Company_CatalogProduct" setup_version="1.0">
    <sequence>
            <module name="Magento_Catalog"/>
        </sequence>

        </module>
</config>

view>adminhtml>layout>catalog_product_edit.xml

<?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <update handle="catalog_product_new"/>
    <update handle="styles"/>
    <body>
        <referenceBlock name="page.title">
            <action method="setTitleClass">
                <argument name="class" xsi:type="string">complex</argument>
            </action>
        </referenceBlock>
        <!--
        <referenceContainer name="page.main.actions">
            <block class="Magento\Backend\Block\Store\Switcher" name="store_switcher">
                <action method="setUseConfirm">
                    <argument name="params" xsi:type="string">1</argument>
                </action>
            </block>
        </referenceContainer> -->
    </body>
</page>


texts: How to quelch or debug "Warning: DOMXPath::query(): Invalid expression"

texts:
The following error is filling up our log files to the point of making them unreadable:

Warning: DOMXPath::query(): Invalid expression
*/var/www/cnn.com.com/gift-shop/var/log/exception.log*: [2017-08-04 1:31:19]
main.ERROR: Exception: Warning: DOMXPath::query(): Invalid expression in
/var/www/cnn.com/gift-shop/vendor/pelago/emogrifier/Classes/Emogrifier.php on
line 269 in .../vendor/magento/framework/App/ErrorHandler.php:61

If I mute this I get a warning on the upcoming foreach after that line.
I assume muting that would continue this chain.
What can I do to begin debugging this?


texts:
I am trying to forward controller to noroute page with below code but got error.

  Front controller reached 100 router match iterations

protected $resultForwardFactory;

public function __construct(
    \Magento\Framework\App\Action\Context $context,
    \Magento\Framework\Controller\Result\ForwardFactory $resultForwardFactory,
    \Test\Test\Helper\Data $test
) {
    parent::__construct($context);
    $this->resultForwardFactory = $resultForwardFactory;
    $this->test = $test;
}
public function execute()
{
    if (!$this->test->isModuleEnabled()) {
        return $this->resultForwardFactory->create()->forward('noroute');
    }
}
}


texts: Data migration tool - Migrate only categorys and products

texts:
i have setup a fresh Magento 2.1.3 installation and i made all the required settings in the admin panel (incl. a new store and storeview).
Now i want to transfer the categories and the product data from the old Magento 1.9 installation. Nothing else, only this data.

Is there a way to configure the data migration tool in this way?
Any help would be appreciated...


texts: Magento 2 : Getting CMS Custom Field in Template

texts:
I've managed to successfully add a new image upload field to the CMS edit form. I have it saving to the media folder, etc, so everything works in that area, but I'm having trouble conceptualized how to display this image on the CMS page.

I'm assuming this would use Magento's DataProvider class? Would I need a block class that somehow pulled in the getData() method?

(Forgive me if this doesn't make sense, I'm still learning the backend)

Any clues/nudges would be appreciated.


texts: Magento 2 get dimensions of products in order event

texts:
I'm trying to get the dimensions(length,width and height) and weight of all products in an order.

The event that I'm using is checkout_submit_all_after.

In observer I have this code.

$order = $observer->getEvent()->getOrder();
$orderItems = $order->getAllItems();
    $dimensions = array();
    $weight = 0;
    foreach ($orderItems as $item) {
          $dimensions[]=array('weigth'=>$item->getData('weight'),'length'=>$item->getData('ts_dimensions_length'),'width'=>$item->getData('ts_dimensions_width'),'height'=>$item->getData('ts_dimensions_height'));
           $weight += ($item->getData('weight') * $item->getQty());
           $this->logger->info("weight: ".$weight);
     }

     $encodedData =  $this->_jsonHelper->jsonEncode($dimensions);
     $this->logger->info("Dimensiones: ".$encodedData);

When I print weight, I'm getting 0, I found that it takes the value of the variable initialized and never gets the total weight of all products.

And when I print the array in json form, I get this:

Dimensiones: [{"weigth":"2.0000","length":null,"width":null,"height":null}]

The product weight is correct, but it's just printing one product, even if there are more than one product in cart.
The dimensions are always null, I never get the actual values of the dimensions.
What am I doing wrong?

Greetings!


texts: Magento 2.3 - what is the recommended way of looping through a large product collection

texts:
When working with large product collections (50,000 products +) in Magento 1 I ended up using something similar to the following.

public function getProductCollection()
{
    $productsCollection = Mage::getModel('catalog/product')
        ->getCollection()
        ->addAttributeToSelect(array('name', 'price', 'visibility'));

    $productsCollection->setPageSize(50);

    $pages = $productsCollection->getLastPageNumber();
    $currentPage = 1;

    do {
        $productsCollection->setCurPage($currentPage);
        $productsCollection->load();

        foreach ($productsCollection as $_product) {

            echo $_product->getId() . "\n";
            echo $_product->getSku() . "\n";
            echo $_product->getName() . "\n";

            /* do stuff */

        }

        $currentPage++;
        //clear collection and free memory
        $productsCollection->clear();
    } while ($currentPage <= $pages);
}

Does anyone have experience on working with very large product collections in Magento2? What is the recommended approach?


texts: How can I get all resource list programmatically?

texts:
I want to fetch all resource id(s) list programmatically in foreach loop.
In System > Permission > Roles > Administrator . In Role Resources Tab and select custom option from dropdown It will display all resources.This All resources want to fetch programmatically.

How can I do this ?


texts: magento 1.9 Wysiwyg cannot see storage subfolder

texts:
Cannot see the symlinked storage folder.

Able to create a new folder and upload images.


texts: Product image cache remove and regenerate live on frontend - M2.3.5

texts:
At the moment we have many old product image cache url's on the frontend, with all 404 errors.
We can run the php bin/magento catalog:image:resize command to regenerate them, but we have more than 270.000 images, so this will takes a lot of time.
Is there a way to clear the cache and regenerate the images directly on the frontend, when the product/categorypage is loaded for example? Or is there another way?


texts: Magento DHL - Error in parsing request XML:Invalid byte

texts:
Trying to Connect DHL with default DHL module in Magento 2.2.6 but getting error for any quote request:

    <Status>
        <ActionStatus>Error</ActionStatus>
        <Condition>
            <ConditionCode>111</ConditionCode>
            <ConditionData>Error in parsing request XML:Invalid byte
                2 of 2-byte UTF-8 sequence.</ConditionData>
        </Condition>
    </Status>

Copied it to dhl test environment - all works ok... What can be a reason?

    [2018-12-07 08:52:17] main.DEBUG: array (
  'request' => '<?xml version="1.0" encoding="UTF-8"?>
<p:DCTRequest xmlns:p="http://www.dhl.com" xmlns:p1="http://www.dhl.com/datatypes" xmlns:p2="http://www.dhl.com/DCTRequestdatatypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.dhl.com DCT-req.xsd "><GetQuote xmlns=""><Request><ServiceHeader><SiteID>****</SiteID><Password>****</Password></ServiceHeader></Request><From><CountryCode>RU</CountryCode><Postalcode>117216</Postalcode><City>москва</City></From><BkgDetails><PaymentCountryCode>RU</PaymentCountryCode><Date>2018-12-07</Date><ReadyTime>PT24H00M</ReadyTime><DimensionUnit>CM</DimensionUnit><WeightUnit>KG</WeightUnit><Pieces xmlns=""><Piece xmlns=""><PieceID>1</PieceID><Weight>0.500</Weight></Piece></Pieces><PaymentAccountNumber>380863334</PaymentAccountNumber><IsDutiable>Y</IsDutiable></BkgDetails><To><CountryCode>RU</CountryCode><Postalcode>156005</Postalcode><City>Кострома</City></To><Dutiable><DeclaredCurrency>RUB</DeclaredCurrency><DeclaredValue>2500.00</DeclaredValue></Dutiable></GetQuote></p:DCTRequest>
',
  'from_cache' => true,
  'response' => '<?xml version="1.0" encoding="UTF-8"?>
<res:ErrorResponse xmlns:res="http://www.dhl.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.dhl.com err-res.xsd">
    <Response>
        <ServiceHeader>
            <MessageTime>2018-12-07T09:52:17.064+01:00</MessageTime>
            <SiteID>****</SiteID>
            <Password>****</Password>
        </ServiceHeader>
        <Status>
            <ActionStatus>Error</ActionStatus>
            <Condition>
                <ConditionCode>111</ConditionCode>
                <ConditionData>Error in parsing request XML:Invalid byte
                    2 of 2-byte UTF-8 sequence.</ConditionData>
            </Condition>
        </Status>
    </Response></res:ErrorResponse>
<!-- ServiceInvocationId:20181207095217_96ab_5c00e6b6-8e43-4716-bac4-31404e508288 -->
',
) [] []


texts: Display Order Details using Increment Id

texts:
I've created a module to track orders, But the order details such as ( Product Name, Image, Size, Color, Quantity) are not displaying in the result page.

I'm getting the shipping address and Price of the product

Code

<?php $order = Mage::registry('current_order');?>
<?php
    $OrderNumber = $order->getIncrementId();
        $getOrder = Mage::getModel('sales/order')->load($OrderNumber);
        $getOrder->getAllVisibleItems();
        $orderItems = $getOrder->getItemsCollection()
        ->addAttributeToSelect('*')
        ->addAttributeToFilter('product_type', array('eq'=>'simple'))
        ->load();

    ?>
    <?php
        $order = new Mage_Sales_Model_Order();
        $order_id = $OrderNumber;
        $order->loadByIncrementId($order_id);
        $payment_method = $order->getPayment()->getMethodInstance()->getTitle();
        $formattedPriceSubtotal = Mage::helper('core')->currency($order->getSubtotal(), true, false);
        $formattedPriceShipping = Mage::helper('core')->currency($order->getShippingAmount(), true, false);
        $formattedPriceDiscount = Mage::helper('core')->currency($order->getDiscountAmount(), true, false);
        $formattedPriceTax = Mage::helper('core')->currency($order->getTaxAmount(), true, false);
        $formattedPriceGrandtotal = Mage::helper('core')->currency($order->getGrandTotal(), true, false);
        $_shippingAddress = $order->getShippingAddress();

        foreach($orderItems as $sItem) {
            if($sItem->getProductType() == "simple")
            {
                $orderIdArray[$orderCount] = $this->escapeHtml($this->getIncrementId());
               // code for size and color
                $Get_product= Mage::getSingleton('catalog/product')->load($sItem->getProductId());
                $productSize = $Get_product->getResource()->getAttribute('size')->getFrontend()->getValue($Get_product);
                $productColor =  $Get_product->getResource()->getAttribute('color')->getFrontend()->getValue($Get_product);
                $pItemId = $sItem->getParentItemId();

                $item = Mage::getModel('sales/order_item')->load("$pItemId");

                $qty = intval($item->getQtyOrdered());

    //get Active Product Data
    $nProduct = Mage::getModel('catalog/product')->load($sItem->getProductId());
    $nSku = $nProduct->getSku();

    $obj = Mage::getModel('catalog/product');
    $Parent_product = Mage::getModel('catalog/product')->loadByAttribute('sku','product-sku');
    $formattedPrice = Mage::helper('core')->currency($Parent_product->getPrice(), true, false);
?>


texts:
What exactly is the "as" attribute in <container> for in a layout xml?
When do I need to reference this one contrary to "name"?

<container name="sidebar.additional" as="sidebar_additional" label="Sidebar Additional"/>


texts:
I have magento2 installed in IIS server (version 7), problem is not load any js and css.
I already have mod_rewrite is on and it is cheeked by this script.

if(isset($_SERVER['IIS_UrlRewriteModule']))
{
    $mod_rewrite = "TRUE";
}
else
{
    $mod_rewrite = " FALSE";
}
echo $mod_rewrite;

Its return me true.
I also update the app/etc/di.xml and change

Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink

to

Magento\Framework\App\View\Asset\MaterializationStrategy\Copy

then delete _requirejs folder in pub\static (only one dir _requirejs is there) but not work at all.

I also try with this command

php dev/tools/Magento/Tools/View/deploy.php

but in my installation there is no View/location folder in same path, path just end with magentoroot\dev\tools\Magento\Tools

I also run this command

php bin/magento setup:static-content:deploy

and this also

php bin/magento setup:static-content:deploy en_US

but both not work and not return anything.


texts:
I had tried to update price of single item & I got below error

  message: '%fieldName is a required field.'

I have used below url-

  "http://localhost/magento2/rest/V1/products/{sku}".

method:"PUT"
body:{"items":{
       "price":50
        }
     };

How can I resolve this error?


texts: Magento 2: Cart Price Rules - Buy X get Y free (discount amount is Y) is Not Working

texts:
I'm using Magento 2 CE Version 2.12

I have followed the below one, as well other tutorials.

https://www.mageplaza.com/kb/how-setup-buy-x-get-y-free-in-magento-2.html

Still, it's not working.


texts: infected file in magento 1.9.3.3. /public_html/skin/Signedint.php

texts:
I received an email from my hosting provider saying that this file was quarantined due to detected malware:
/public_html/skin/Signedint.php
Was this originally a magento file that carried some function? Can I just delete it or do I need to replace it with a clean file? If i have to replace it, where can I get another file? I jupgraded my magento to 1.9.3.3 but still received the message that this file was corrupted.
One of the AVs at virusTotal identified this file as CPR65E4.Webshell
thanks


texts:
Magento 2 topbar has the following code, by default:

Link 1

Link 2

I have included bootstrap.css in my child-theme and I would like to take advantage of that by turning it into:

Link 1

Link 2

What template file must I edit in order to achieve this?


texts: How to add similar product tab in Magento product -> catalog

texts:
I am using Magento 2.1.2

I want to add a new tab for similar product same as related product in Magento admin

I did this by changing Magento core file now I want to do this in custom extension.

I have tried following code in my adminhtml/di.xml but unable to override

<virtualType name="Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\Pool" type="Magento\Ui\DataProvider\Modifier\Pool">
        <arguments>
            <argument name="modifiers" xsi:type="array">
                <item name="related" xsi:type="array">
                    <item name="class" xsi:type="string">Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\Relateds</item>
                    <item name="sortOrder" xsi:type="number">110</item>
                </item>
            </argument>
        </arguments>
</virtualType>


texts: How to add external JS script to product page in Magento 1.9?

texts:
I'm trying to add a JS Script for some specific products in the product detail page but I dont know how to.
I know I can edit the xml file and add scripts there... but the source of the script specified doing it that way.
            <action method="addItem">
                <type>skin_js</type>
                <name>js/src/externalScript.js</name>
            </action>

The script I'm trying to add has a external source so Im a bit confused on how to do it.
<script type="text/javascript" src="some_external_source"></script>

Any help is much appreciated.


texts:
I have created the Demo Module with only module.xml, registration.php and composer.json files in Bit Bucket Public Repository.

Please check my composer.json file

{
 "name": "hardikm219/demo",
 "description": "demo extension for Magento 2",
 "type": "magento2-module",
 "version": "1.0.0",
 "license": "OSL-3.0",
 "authors": [
 {
   "name": "Hardik Makwana",
   "email": "hardikm.magentodeveloper@gmail.com",
   "role": "Developer"
 }
],
"autoload": {
 "files": [
   "registration.php"
 ],
  "psr-4": {
   "hardikm219\\Demo\\": ""
   }
  }
 }

I have submitted this package into the packagist.

Composer URL:

  composer require hardikm219/demo

I have run this command then I have got the following error:

But when i am running following command then it is installed successfully

  composer require hardikm219/demo:dev-master

can you please tell me how to install the extension without using the dev-master and can you please tell me why use the dev-master with the composer


texts: Magento 1 Order Grid Filter by Website instead Store

texts:
I'm new to Magento, and need to add filter by website to Sales > Orders page.
I try to override Mage_Adminhtml_Block_Sales_Order_Grid and add following code:

protected function _prepareColumns()
{
   $this->addColumn('website', array(
          'header' => Mage::helper('sales')->__('Website'),
          'index' => 'store_id',
          'type'  => 'options',
          'width' => '70px',
          'options'   => Mage::getModel('core/website')->getCollection()->toOptionHash(),
    ));
}

This is the result, only the English store have website associated.
Can somebody help me?


texts: Finding out where in Magento the trailing slash is being removed

texts:
Bit of a bizarre and unhelpful question but I am unsure how to get to the bottom of this one currently...
All the trailing slashes are being removed and 301 redirected to the URLs without a trailing slash and I cannot figure out where this is occurring.

There isn't anything in .htaccess handling this.
There isn't a URL suffix handling this for products or categories.
There is no local code pool Mage override handling this.
As far as I can make out, there are no third party extensions handling this.

The worrying thing is, I think I myself set this up...
Any other ideas?
Edit
Actually, I just replaced the .htaccess with the default one from Magento and the URLs with the trailing slash did not 301 redirect to those without so it actually seems like it is something missing in the .htaccess that is actually needed in order for these to resolve... This should be interesting!


texts:
I need to add country field to admin user creation.I have created that field.But I can't save that attribute value into database.For saving that new attribute I have used following observer event.

<admin_user_save_before>
    <observers>
        <marketplace>
            <type>singleton</type>
            <class>marketplace/observer_product</class>
            <method>adminUserCountrySave</method>
        </marketplace>
    </observers>
</admin_user_save_before>

In Oberver

public function adminUserCountrySave($observer) {
    $currentUserId =  Mage::app()->getRequest()->getParam('user_id');
    $currentUserCountry =  Mage::app()->getRequest()->getParam('user_country');
    $userData = Mage::getModel('admin/user')->load($currentUserId);
    $userData->setUserCountry($currentUserCountry)->save();
}

But it is not working, it shows
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 65488 bytes) in D:\xampp\htdocs\SVEP3403\lib\Zend\Db\Select.php on line 421.
Anyone know please help.


texts: PCI Compliance Scanning Tool For Any Version Of Magento Site

texts:
I am looking for a PCI Compliance scanning tool that can scan Magento websites ( Any version ) or Piece of Magento code. Please suggest.

I know there is a checklist available in DevDocs (https://magento.com/security/best-practices/pci-compliance-checklist-ecommerce-businesses) but is there any tool that can do the scan and generate a report?


texts:
I'm trying to put a video inside a static block that will appear as a slide in homepage. Every video I try to insert comes out blank. The video uploads correctly, I've tried mp4 and flv video, but nothing. I'd like to avoid using youtube or vimeo iframe.
Thanks for your help.


texts: magento2 Schedule new update is not working

texts:
I have installed Magento 2 freshly and Create a schedule for product attribute value update using "Schedule new update".
In staging dashboard it shows but even after time cross the starting time it is not activating as result product attribute value is not updating in frontend.

Even i ran cron for staging.

php bin/magento cron:run --group="staging"

Still it shows the same result.

Please help me for resole this.


texts: How to get all attributes of a given product?

texts:
I want to get all the attributes which are not empty for a given product. Tried various suggestions in the web, but didn't work,

Any suggestion will be appreciated.


texts:
How to show a advance inventory custom field value in sales order view page  in frontend and backend  in magento 2

Product edit page in admin

Frontend:

Backend:

please someone can me help for this


texts:
Google Search Console initially, a few days ago, reported 500XXX error for an AMP page that has now been moved under N/A with 0 affected pages. When the link to the previously affected AMP page is open in the browser, it returns an error mentioned Notice: Undefined property: DOMText::$tagName in /home/perfect/web/mymagentosite.com/public_html/vendor/swissup/module-amp/Model/Html/Filter/Dom/Video.php

Does this impact the performance of the site negatively resulting in poorer ranking? if so, how to fix this?

<?php
namespace Swissup\Amp\Model\Html\Filter\Dom;

class Video extends DomAbstract
{
    /**
     * Replace unsupported video tags with amp-video
     *
     * @param  \DOMDocument $document
     * @return void
     */
    public function process($document)
    {
        $replace = [];
        $nodes = $document->getElementsByTagName('video');
        foreach ($nodes as $node) {
            $replace[] = $node;
        }

        foreach ($replace as $node) {
            $video = $document->createElement('amp-video');
            $video->setAttribute('layout', 'responsive');
            foreach ($this->getNodeAttributes($node) as $key => $value) {
                $video->setAttribute($key, $value);
            }

            foreach ($node->childNodes as $childNode) {
                $source = $document->createElement($childNode->tagName);
                foreach ($this->getNodeAttributes($childNode) as $key => $value) {
                    $source->setAttribute($key, $value);
                }
                $video->appendChild($source);
            }

            $node->parentNode->replaceChild($video, $node);
        }

        if (count($replace)) {
            $this->addAmpComponent(
                'amp-video',
                'https://cdn.ampproject.org/v0/amp-video-0.1.js'
            );
        }
    }
}


texts: Need to change my sort order for search results

texts:
i have made a new attribute called Best sellers (attribute code: search_order) so I can sort my products showing the best sellers at the top when someone searches for products. However when someone searches at the moment it is sorted by relevance and they have to select Best sellers. Is there a way i can change it so by default it is sorted by best sellers?

I tries to change the function setListOrder in result.php to

 public function setListOrders()
    {
        $category = Mage::getSingleton('catalog/layer')
            ->getCurrentCategory();
        /* @var $category Mage_Catalog_Model_Category */
        $availableOrders = $category->getAvailableSortByOptions();
        unset($availableOrders['position']);
        $availableOrders = array_merge(array(
            'search_order' => $this->__('Best sellers'),
            'relevance' => $this->__('Relevance')

        ), $availableOrders);

        $this->getListBlock()
            ->setAvailableOrders($availableOrders)
            ->setDefaultDirection('desc')
            ->setSortBy('search_order');

        return $this;
    }

but that just put Best sellers at the top of the sort by list but didnt actually sort the results

Thank you if you can help


texts: How to Keep all Filters Visible in Magento 2

texts:
Is it possible to keep all filters visible in the Layered Navigation even when one or more are active.

Currently I have built a navigation with category and product attribute filters. By default when a filter is active it vanishes. But I need to keep them alway visible so I can build a navigation like below.


texts: Configurable Product not showing in product page

texts:
I have an issue with Configurable product are not showing in product page
I had look to system.log
I found this error
main.CRITICAL: Class Magento\Swatches\ViewModel\Product\Renderer\Configurable does not exist [] []
Actually I went to config.php to check if there are extension disabled.
'Magento_ConfigurableProduct' => 1,
'Magento_ConfigurableProductSales' => 1,
'Magento_InventoryConfigurableProduct' => 1,
'Magento_InventoryConfigurableProductAdminUi' => 1,
'Magento_InventoryConfigurableProductIndexer' => 1,
'Magento_CatalogRuleConfigurable' => 1,
Any suggestion to fix this issue?
I also have this error:
main.INFO: Reference to undeclared plugin with name 'ddg_customer_sendNewAccountEmail_disabler'. [] []
Regards,


texts: How to get product info tabbed section in other place?

texts:
I want to display product info tabbed section side to product image but not on bottom how can I do this.Can someone help me in doing this.

UPDATE: I got tabbed sections beside my product image with the help of dh47 and now as in the image my product name and price should be inside description tab which is now outside the tabs I tried to copy this code from view.phtml and tried to paste it in description.phtml  but the all my tabs  getting removed.Please help me in doing this.

                <?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?>

                <?php echo $this->getPriceHtml($_product); ?>
                <?php echo $this->getChildHtml('bundle_prices') ?>
                <?php echo $this->getTierPriceHtml() ?>

Thanks in advance.


texts: Magento 2.3: How to create a custom filter?

texts:
I'm having a requirement that is related to filtering the products. By default, when the user clicks on the category, it will be redirected to the corresponding product listing page.

But my requirement is, when the user clicks on the parent category on megamenu, we wanted to display a pop-up which having the filtering option like size, brand, price, etc., instead of showing the product listing page.

How can I achieve that?

Could anyone please help me with this?


texts: URL to my module with adminhtml controller

texts:
I added a form to customer page from backend. How do I create the URL for action attribute to a certain function ( public function editAction(){...} )?
Function that is founded in app/code/local/company/module/controllers/Adminhtml/IndexController.php

Ideeas?

The form is used to set a custom customer attribute created in that module. The form only contains the input and a button for submit. In that particular action I setCustomAttribute and send an email. But every time I submit I get that 404.

This is the layout for my template:

<layout version="0.1.0">
    <adminhtml_customer_edit>
        <reference name="customer_edit_tab_view">
            <action method="setTemplate">
                <template>customcustomerfields/customer/tab/view.phtml</template>
            </action>
        </reference>
    </adminhtml_customer_edit>
</layout>


texts: Magento 2.3.2 Redis cache grows very large quickly

texts:
A large multi-site Magento 2.3.2 store (4 stores, 90k products, 5k categories) running with Varnish FPC and Redis cache for Magento cache. We find that within 20-30 minutes after a full cache flush, Redis cache has over 100,000 keys, using over 300 MB of memory, and continues to grow steadily in # of keys and memory use.

In looking at the keys in Redis, about half are of the format:

zc:ti:269_CAT_P_81799

and the rest are mostly of the format:

zc:k:269_BLOCK_3D7527450FA205A5A07E2E3EBE8DB19F2810CBD1_109223

Any idea why Redis would continue to grow at a fast pace (In 24 hours we'll see Redis using 4+ GB of memory) even with Varnish FPC enabled? Once Redis is over 2 GB in size, a cache flush will often fail due to the time it takes to try and flush millions of keys. We end of having to kill Redis manually.

Trying to understand why this M2 install has such a large M2 Redis cache...


texts:
i am trying to change a line of coding in my category list views...

        <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="">
          <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image'); ?>" class="small-image" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />

I am trying to change the list to appear with small_image to appear with the base and when i use the following i just come up with the default magento image not found placeholder

        <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'image'), null, true) ?>" class="">
          <img src="<?php echo $this->helper('catalog/image')->init($_product, 'image'); ?>" class="small-image" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'image'), null, true) ?>" />

anyone have any ideas why its not reading the base_image or if i am calling the wrong 'image'


texts: Saving a product in an observed product save event

texts:
I've noticed in a couple community extensions we have installed that they observe the event catalog_product_save_after, and in the triggered method they will get the product and do something to it (add additional custom attribute data or whatever) and then save it.

config.xml

<events>
    <catalog_product_save_after>
        <observers>
            <foo_bar>
                <type>singleton</type>
                <class>foo_bar/observer</class>
                <method>saveProductData</method>
            </foo_bar>
        </observers>
    </catalog_product_save_after>
</events>

Observer.php

public function saveProductData(Varien_Event_Observer $observer)
{
    $product = $observer->getEvent()->getProduct();
    try {
        $blocks = $this->_getRequest()->getPost('content_blocks');
        $product->setData('content_blocks', $content_blocks_value);
        $product->save();
    } catch(Exception $e) {
        Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
    }
}

This seems like it would cause some kind of infinite product save event triggering.. although it doesn't seem to be the case; using a debug/log statement I can see when saving a product it gets saved several times but not infinitely.

My question is, is this bad practice, and should these extensions not have passed Magento's extension marketplace Quality Assurance? If it is, what would be the proper way to implement?


texts: Magento 2.1.6 minicart not updating and Checkout page always empty

texts:
Please I need some help with my magento 2.1.6 store. My AJAX minicart does not update when I add a product to the cart but the product actually reflects when I go directly to the cart page. When I click on the AJAX minicart, it produces a blank little box with nothing inside it.
My checkout page also gives me a blank page when I load it and am unable to checkout successfully. My website is https://www.jibosky.com Please help me check it and confirm what I am talking about. My full page cache is active and I have magento caching enabled for my store. I don't get any error relating to this on my browser console and log folder. I run EM Necessary theme based on Luma

I received the following errors on my browser console:

Uncaught DOMException: Failed to execute 'setItem' on 'Storage': Setting the value of 'mage-cache-storage' exceeded the quota.
at Object.r (https://www.jibosky.com/static/version1501500835/frontend/Emthemes/necessary_default/en_US/jquery/jquery.storageapi.min.js:1:1357)
at Object._callMethod (https://www.jibosky.com/static/version1501500835/frontend/Emthemes/necessary_default/en_US/jquery/jquery.storageapi.min.js:1:4103)
at Object.set (https://www.jibosky.com/static/version1501500835/frontend/Emthemes/necessary_default/en_US/jquery/jquery.storageapi.min.js:1:4445)
at eval (https://www.jibosky.com/static/version1501500835/frontend/Emthemes/necessary_default/en_US/Magento_Customer/js/customer-data.min.js:3:269)
at Function._.each._.forEach (https://www.jibosky.com/static/version1501500835/frontend/Emthemes/necessary_default/en_US/underscore.min.js:7:650)
at Object.update (https://www.jibosky.com/static/version1501500835/frontend/Emthemes/necessary_default/en_US/Magento_Customer/js/customer-data.min.js:3:142)
at Object.eval (https://www.jibosky.com/static/version1501500835/frontend/Emthemes/necessary_default/en_US/Magento_Customer/js/customer-data.min.js:8:324)
at fire (https://www.jibosky.com/static/version1501500835/frontend/Emthemes/necessary_default/en_US/jquery.min.js:188:299)
at Object.fireWith [as resolveWith] (https://www.jibosky.com/static/version1501500835/frontend/Emthemes/necessary_default/en_US/jquery.min.js:193:198)
at done (https://www.jibosky.com/static/version1501500835/frontend/Emthemes/necessary_default/en_US/jquery.min.js:586:95)
Uncaught TypeError: Unable to process binding "css: function (){return { empty:cart().summary_count == 0} }"
Message: cart is not a function
at css (eval at createBindingsStringEvaluator (knockout.min.js:NaN), <anonymous>:3:71)
at update (knockout.min.js:349)
at ko.dependentObservable.disposeWhenNodeIsRemoved (knockout.min.js:297)
at evaluateImmediate (knockout.min.js:178)
at Object.ko.computed.ko.dependentObservable (knockout.min.js:199)
at eval (knockout.min.js:297)
at Object.arrayForEach (knockout.min.js:12)
at applyBindingsToNodeInternal (knockout.min.js:294)
at applyBindingsToNodeAndDescendantsInternal (knockout.min.js:283)
at applyBindingsToDescendantsInternal (knockout.min.js:280)
css @ VM3424:3
update @ knockout.min.js:349
ko.dependentObservable.disposeWhenNodeIsRemoved @ knockout.min.js:297
evaluateImmediate @ knockout.min.js:178
ko.computed.ko.dependentObservable @ knockout.min.js:199
(anonymous) @ knockout.min.js:297
arrayForEach @ knockout.min.js:12
applyBindingsToNodeInternal @ knockout.min.js:294
applyBindingsToNodeAndDescendantsInternal @ knockout.min.js:283
applyBindingsToDescendantsInternal @ knockout.min.js:280
ko.applyBindingsToDescendants @ knockout.min.js:303
applyComponents @ scope.min.js:1
_resolveRequest @ registry.min.js:16
_updateRequests @ registry.min.js:16
later @ underscore.min.js:41

Many Thanks.