texts:
I have integrated google's dialogflow in my store. Dialogflow provides iframe. I created a dropdowndialog magento ui widget. My footer phtml contains the following code. Now the issue is with the position of the dialog which open at the center. I would like to position it in the right bottom corner where my chat with us button is present. Options like draggable, resizable is also not working. Please suggest what I should do to overcome the issue

<button id="myBtn" title="Chat">Chat with us</button>

<div id="dialog" style="display:none;">

<iframe
    allow="microphone;"
    width="350"
    height="430"
    src="https://console.dialogflow.com/api-client/demo/embedded/13234e50-f3b0-497c-9887-d406d652a754">
</iframe>

</div>
<script>
require(
        [
            'jquery',
            'dropdownDialog'
        ],
        function(
            $,
            dropdownDialog
        ) {

           var options = {
                        triggerEvent : "click",
                        defaultDialogClass:"chatdialog",
                        triggerClass: null,
                        parentClass: "chatwindow",
                        triggerTarget: null,
                        dialogContentClass: null,
                        shadowHinter: null,
                        closeOnMouseLeave: true,
                        closeOnClickOutside: true,
                        minHeight: null,
                        minWidth: null,
                        width: null,
                        modal: false,
                        timeout: null,
                        autoOpen: false,
                        createTitleBar: false,
                        autoPosition: true,
                        autoSize: false,
                        draggable: true,
                        resizable: true,
                        position: {
                        my: "bottom right",
                        at: "right",
                        of: "#dialog"
                        },
                        bodyClass: '',
            };

            $("#myBtn").on('click',function(){
                $( "#dialog" ).dialog();
            });

        }
    );
</script>


texts: Apache Nginx Varnish listening port Magento 2

texts:
Centos 6

Already using Apache + Nginx  on my Magento 1 sites on a dedicated server

For a Magento 2.2 site I want to run varnish

However after installing varnish - i saw in the instructions need to change listening port-

What I did is to keep apache on 8080 and change Nginx from 80 to 446 (443 is being using for SSL)   and changed inside [Home]/etc/varnish default.vcl

from 8080 to 80

Stopped and Restarted Apache Nginx and Varnish however when I went to open the websites none of them are able to connect -

I checked varnish port

ps aux | grep varnish

Output I get is

[root@server ~]# ps aux | grep varnish
varnish   6393  0.0  0.0  28932  5204 ?        SLs  15:26   0:00 /usr/sbin/varni                                                                                shd -a :6081 -f /etc/varnish/default.vcl -T 127.0.0.1:6082 -p thread_pool_min=50                                                                                -p thread_pool_max=1000 -S /etc/varnish/secret -s malloc,256M -P /var/run/varni                                                                                sh.pid
varnish   6403  0.0  0.7 316840 116444 ?       SLl  15:26   0:00 /usr/sbin/varni                                                                                shd -a :6081 -f /etc/varnish/default.vcl -T 127.0.0.1:6082 -p thread_pool_min=50                                                                                -p thread_pool_max=1000 -S /etc/varnish/secret -s malloc,256M -P /var/run/varni                                                                                sh.pid
root     11434  0.0  0.0 103320   904 pts/0    S+   16:07   0:00 grep varnish
[root@server ~]#

Shows 6081 and 6082 but not the port 80 I set

I read some other posts with people with similar problems but I dont have on my server the file changes mentioned in those server locations.

One more thing is that before today I has Varnish 2.1 but today I installed 5.2   - i didn't remoeve the version 2.1 but just followed instructions to install the 5.2 version - so can this be the cause and where else would varnish be getting those values for port setting?

Nginx - doesnt seem to work unless it's on port 80

Please can anyone help asap stuck on this all day


texts: Magento 2 Best Seller Product Collection in Deleted order also

texts:
index.php

protected $_coreRegistry = null;
    protected $_collectionFactory;

    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        \Magento\Framework\Registry $registry,
       \Magento\Sales\Model\ResourceModel\Report\Bestsellers\CollectionFactory $collectionFactory,
        array $data = []
    ) {
        $this->_collectionFactory = $collectionFactory;
        $this->_coreRegistry = $registry;
        parent::__construct($context, $data);
    }

    public function _prepareLayout()
    {
        return parent::_prepareLayout();
    }
    public function getBestSellerData()
    {
        $collection = $this->_collectionFactory->create()->setModel(
            'Magento\Catalog\Model\Product'
        );
        $collection->setPageSize(100);

        return $collection;
    }

phtml

<?php $bestSellingCollection =  $block->getBestSellerData();
echo $bestSellingCollection->count();
foreach ($bestSellingCollection as $value) {

    print_r($value->getData());
    # code...
}?>

it shows count 55 products I deleted all order in my Database. bUT sTILL SHOWING 55 WHAT IS THE PROBLEM

Also recently I Place one Product that it not showing in this collection I placed one prodect it's not showing


texts: How to define constants or environment variables in Magento 2.2.6?

texts: I want to define constants to use in all my project. How to define constant or environment variables to access all over the project without any special declaration ?


texts:
These are my php files.
magento\app\code\Cosmo\Basemodule\Model\DatiInterface.php

<?php
namespace Cosmo\Basemodule\Model;
interface DatiInterface
{

}

magento\app\code\Cosmo\Basemodule\Model\Dati.php

namespace Cosmo\Basemodule\Model;

use Magento\Framework\Model\AbstractModel;
use Magento\Framework\DataObject\IdentityInterface;
class Dati extends AbstractModel implements DatiInterface, IdentityInterface
{
    protected function _construct()
    {
        $this->_init('Cosmo\Basemodule\Model\ResourceModel\Dati');
    }

    public function getIdentities()
    {
       //todo
    }
}

magento\app\code\Cosmo\Basemodule\Model\ResourceModel\Dati.php

<?php
namespace Cosmo\Basemodule\Model\ResourceModel;
use Magento\Framework\Model\ResourceModel\Db\AbstractDb;

class News extends AbstractDb
{
    /**
     * Define main table
     */
    protected function _construct()
    {
        $this->_init('exampletable', 'entity_id');
    }
}

magento\app\code\Cosmo\Basemodule\Model\ResourceModel\Dati\Collection.php

<?php
namespace Cosmo\Basemodule\Model\ResourceModel\Dati;
use Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection;

class Collection extends AbstractCollection
{
    /**
     * Define model & resource model
     */
    protected function _construct()
    {
        $this->_init(
            'Cosmo\Basemodule\Model\Dati',
            'Cosmo\Basemodule\Model\ResourceModel\Dati'
        );
    }
}

And then block where i inject the factory
magento\app\code\Cosmo\Basemodule\Block\Main.php

 <?php
 namespace Cosmo\Basemodule\Block;

 use Magento\Framework\View\Element\Template\Context;
 use Cosmo\Basemodule\Model\DatiFactory;

 class Main extends \Magento\Framework\View\Element\Template
 {
    protected $_datiFactory;

    public  function __construct(Context $context, DatiFactory $datiFactory)
    {
        parent::__construct($context);
        $this->_datiFactory = $datiFactory;
    }

    public function _prepareLayout()
    {
        echo 'pippo<br \>';
        $dati = $this->_datiFactory->create();
        var_dump($dati->getCollection());
        exit();
    }
}

I tried in many ways but create() fails and then nothing is executed.


texts: Magento 1.9 - Getting exception while uploading product images

texts:
When I'm trying to upload product images in backend and save, getting below exception in debug file -
'Zend_Db_Statement_Exception' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'name' in 'field list', query was: UPDATE `catalog_product_entity` SET `name` = ? WHERE ...

And there is no column name in catalog_product_entity table.
I cleared cache, run compiler and reindexed indexes.
Why I'm getting this exception suddenly?
How to fix this?


texts: Multiple attributes for configurable product?

texts:
I am trying to set up a configurable product using two separate custom attributes and can’t see how I can get it working.

Basically this product has two separate options- size and color. There are two size options- 10 and 20. And there are about eight different color options. The customer selects the size and then a color.

However the price needs to be different depending on what size the customer picks, and also the individual simple product SKUs for the colors will be different as well. So if they pick size 10, they get a certain list of all the colors in the next dropdown, but if they select size 20 then they will get a different list of colors with different SKUs.

I can’t see any way of getting this set up so the price depends on the size attribute and the color list changes depending on which size is picked in the previous dropdown.

Anyone have any ideas?


texts: Magento2 : Admin order creation should auto select specific shipping method?

texts:
In magento version 2.2, when admin is creating an order, I want to automatically select shipping method (Flatrate) without manual selection.

I tried adding the following commands (order.loadShippingRates() and order.setShippingMethod('flatrate')) to the button "Add Selected Products To Order".
This caused the the product to disappear in the product selection list and the shipping method to load without any selection.


texts:
I am trying to add custom step in magento checkout process.

The first step is to show the cart page items table in the checkout.

Is is possible to show cart page items table in the first step of checkout?

I have attached the image here.

If anyone tried of it. Please help me. Thanks


texts: How to get pdf file in response for Magento 2 rest api?

texts:
Currently Magento 2 is providing JSON and XML response in web REST API
I want to include a custom response format PDF.

So if any third-party will call our API then we can sen them PDF in response.


texts: Double image on product save while adding a new imge

texts:
I am adding an image with product, so after uploading image and save button there is a problem. The image which I uploaded has saved but one extra row has been created.

After inspecting the element I found that following thing:
 - First row have image which I was uploading.
 - Second row trying to show an image with the name my_image_1.jpg

So magento try to upload same image two time but not successfully.

Does any one have any idea why it is happening and where should I look?


texts: Magento 2 : Images import through product import

texts:
I am importing images through products import. But I am getting an error.

  "1. Imported resource (image) could not be downloaded from external resource due to timeout or access permissions in a row(s): 2, 3, 4, 5, 6, 7, 8".

My images folder is pub/media/import.

How to overcome this?


texts:
I use script for update product qty.

Example:
product one have

quantity: 0 pcs
salable quantity: 0 pcs

Now I update product and is available total 11 quantity.
https://prnt.sc/rmmeuo

But for Salable quantity still display 0 pcs and product in not available on sale on website. How to solve this issue ans sync  qty ==> salable quantity?


texts: How to implement content security policy in magento 2

texts:
I want to know how to implement CSP on Magento 2 with GTM.
The site has multiple stores. Tried to google but was unable to find any concrete result.
Implimenting a Content Security Policy Magento 1.9.x


texts: Magento 2 : how to get Select field data selected to be posted in checkout page while placing order

texts:
Magento 2 : Saved Credit cards in a dropdown in custom payment

From the above link, i have successfully created select field with credit card details dropdown in the checkout page.Can i know how i can attach (or post that data) those details to payment object while placing order in magento2.

I have added the code in my payment model

   public function assignData(\Magento\Framework\DataObject $data)
       {
          parent::assignData($data);
          $post = $data->getData()['additional_data'];
          $this->getInfoInstance()->setAdditionalData($post);
          return $this;
       }

Is the correct way?


texts: Remove "shop by price" in left sidebar with local.xml

texts:
I am creating a theme based on the rwd theme.  I want to remove the browse by price, but keep the browse by category.

I am using the following in my local.xml.

<catalog_category_layered>
    <reference name="catalog.leftnav">
        <action method="unsetChild"><child>price_filter</child></action>
    </reference>
</catalog_category_layered>

It removes the "price" filter from the sidebar, but it removes all other content on the page. First photo is before the xml change, second is after the xml is changed.  Any suggestions???


texts: Add to Cart leads to SHOPPING CART IS EMPTY (but not all the time)

texts:
Magento shows 'shopping cart is empty' when I add a product to cart, but not all of the time. Some products get added without a problem, others do not. And the same product may work fine one time, but then an hour later generates the 'shopping cart is empty' when added to the cart.

I am experiencing this issue with CE v1.9.0.1, and have tried many solutions to it related to folder permissions, session storage, cookie timeouts/paths/domains, etc., but none are working - the issue persists. There are no errors in the exception.log. Chrome developer tools show no console errors, and the cookies all look fine.

This issue has been reported by numerous other users of the site, not just in my testing, so I do not believe it to be related to browser caching.

Might the issue be related to too many concurrent users on the site, or database connections?

Site is https://www.tribilliards.com/


texts: Post product information from product view to cms page

texts:
I'd like to set up a custom button on the product view page, then once selected, the data is posted to a cms page. On the cms page i'd then use the data posted . I'm mainly looking to post price, name and sku.

Any ideas?


texts: Magento 2: Delete duplicate products programatically

texts:
I need to search Magento 2 DB for duplicate SKUs and remove duplicate products using a script, i found a very useful script here:
Remove duplicated products from catalog.
but it's not compatible with Magento 2 as Mag 2 is not using Mage class or Mage.php
can someone please convert following code to a Magento 2 version:

<?php
include 'app/Mage.php';
Mage::app();

Mage::register('isSecureArea', 1);

$limit    = 100;
$model    = Mage::getModel('catalog/product');
$resource = $model->getResource();
$adapter  = $resource->getReadConnection();
$name     = $resource->getAttribute('sku');

// retrieve a list of all products that have more than 1 occurrence of the same name
$select = $adapter->select()->from(
    $name->getBackendTable(),
    array(
        $resource->getIdFieldName(),
        'value',
        'count'      => 'COUNT(*)',
        'entity_ids' => new Zend_Db_Expr("GROUP_CONCAT({$resource->getIdFieldName()})")
    )
);
$select->where('attribute_id = ?', $name->getAttributeId());
$select->where('entity_type_id = ?', $name->getEntityTypeId());
$select->group('value');
$select->having('count > 1');
$select->limit($limit);
$result = $adapter->fetchAll($select);

// here, we remove the lowest product id from each set of duplicate-named products.
// the theory is that the product which was created first, hence the lowest
// product id, is the one you want to keep
$result = array_map(
    function ($row) {
        $entityIds = explode(',', $row['entity_ids']);
        $min       = min($entityIds);
        $key       = array_search($min, $entityIds);
        unset($entityIds[$key]);
        $row['entity_ids'] = $entityIds;

        return $row;
    },
    $result
);

// now that we have narrowed down to the ids of the products we want to delete,
// lets get all product ids to delete into a single array
$entityIds = array();
foreach ($result as $row) {
    $entityIds = array_merge($entityIds, $row['entity_ids']);
}

// lets delete each one individually
$collection = $model->getCollection();
$collection->addFieldToFilter($resource->getIdFieldName(), array('in' => $entityIds));
foreach ($collection as $product) {
    $product->delete();
}
?>


texts: I want to remove the confirm password validation field in my registration form. How could I do it?


texts: Hide the Payment method based on store view

texts:
we selected store views under Current Configuration Scope:

Than we went under Advanced > Advanced > Disable Module output

we disabled the custom payment method modules

but after that also for that store view, those disabled payment methods are displaying.

when i thought to try by going Payment methods & disbale it, those custom payment methods are not visible for store view.

Payu & HDFC is visible for Default config

Payu & HDFC is not visible for store -view

entire module code here


texts: Magento 2 - Custom page layout not working properly

texts:
I have some big grouped products (with sku: montagekonsole and montageschiene). I need to change the layout for both.
First I just created custom sku handles for each product like this:
THEME/Magento_GroupedProduct/layout/catalog_product_view_sku_montagekonsole.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" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <container name="hf_big_grouped_product_table_container"
                   htmlTag="div" htmlId="hf_big_grouped_product_table_container">
            <!-- Page Builder Row -->
            <block class="Magento\Framework\View\Element\Template"
                   name="hf_big_grouped_product_table_block" template="Company_Base::page-builder/row/contained.phtml" />
        </container>

        <move element="hf_big_grouped_product_table_container"
              destination="page.wrapper" before="hf_product_details_tabs_container" />

        <move element="product.info"
              destination="hf_big_grouped_product_table_block" after="-" />
    </body>
</page>

This works perfectly fine.
But since I don't want to duplicate the exact same file again and again for any product where I need to apply this, I created a new page layout:

THEME\Magento_Theme\layouts.xml
<?xml version="1.0" encoding="UTF-8"?>
<page_layouts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/PageLayout/etc/layouts.xsd">
    <layout id="hf-grouped-product-big-1col">
        <label translate="true">Hf Grouped Product (Big) -- 1 Col</label>
    </layout>
</page_layouts>

THEME\Magento_Theme\page_layout\hf-grouped-product-big-1col.xml
<?xml version="1.0"?>
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
    <update handle="1column"/>

    <container name="hf_big_grouped_product_table_container"
               htmlTag="div" htmlId="hf_big_grouped_product_table_container">
        <!-- Page Builder Row -->
        <block class="Magento\Framework\View\Element\Template"
               name="hf_big_grouped_product_table_block"
               template="Company_Base::page-builder/row/contained.phtml" />
    </container>

    <move element="hf_big_grouped_product_table_container"
          destination="page.wrapper" before="hf_product_details_tabs_container" />

    <move element="product.info"
          destination="hf_big_grouped_product_table_block" after="-" />
</layout>

Then I deleted the now not needed layout THEME/Magento_GroupedProduct/layout/catalog_product_view_sku_montagekonsole.xml again and changed the page layout in the product with the sku montagekonsole to my new Page Layout Hf Grouped Product (Big) -- 1 Col and flushed the cache.
But now the container hf_big_grouped_product_table_container is loaded at the very bottom after the footer.
What am I doing wrong?


texts: Magento2.2 - How to add success message after Ajax Success?

texts:
I am submitting the form by ajax. It's working properly but I have one issue with the success message.

After ajax success, I have to display success message like default Magento2. How can I achieve this?

$.ajax({
    url: "<?php echo $block->getUrl('frontname/order/save'); ?>",
    type: "POST",
    dataType: "text",
    data: "cancel= " + orderJSON,
    showLoader: true,
    success: function () {
    $("#" + id).remove();
    window.location.reload();
   }
});


texts: Error message "cannot take that action right now" when system upgrade

texts:
I installed Magento 2 on Ubuntu 14.04, and tried to examine whether anything I need to update in Magento system.

I enter "Web Setup Wizard" from admin panel, but it shows the error message at the first step.

  "Sorry, we can't take that action right now."

I have tried to find the solution in the official document, but nothing is found.


texts: magento: invoice PDF design customization

texts:
I want to customized the Invoice PDF layout.

when there is big product name the the table data are not looking proper aligned.

How Can i easily manage the design of the PDF INVOICE.

I tried to make changes in app/code/core/mage/sales/model/order/pdf/abstract.php  but didn't get the solution. need help to Fix the pdf layout design.


texts: How to link to images from a Javascript file

texts:
I have created a custom JavaScript file in a Magento 2.1.7 theme that serves a different logo depending on the month.

The .js file is in app/design/ inside the theme’s /web/js/ folder. The logos are in the theme’s /web/images/ folder.

The .js contains switch/case code with relative links to the images ../images/logo1.png etc.

I assumed that once deployed and the files had moved to pub/static that it would work, but it didn’t. The images aren’t being transferred from the theme web/images folder to the pub/static images folder.

I have got it working by using links from the root to /pub/media/logos/logo1.png but are there better ways of achieving this? I would appreciate help. I’m assuming that there aren’t any directives with a shortcut to the pub/media folder that can be used in JavaScript?


texts: Magento 2: Content Security Policy disabled, still get errors

texts:
So I started a new magento project with 2.3.5-p1 and stumbled right into the new CSP feature. I figured it out and created my custom csp_whitelist.xml
All fine and dandy but then I stumbled upon this blog post and concluded it might be smarter to disable this feature for the moment.
I completely disabled the Magento_Csp module. But in the console I still get all the CSP warnings and errors:
Content Security Policy: Ignoring “'unsafe-inline'” within script-src: ‘strict-dynamic’ specified
Content Security Policy: Ignoring “https:” within script-src: ‘strict-dynamic’ specified
Content Security Policy: Ignoring “http:” within script-src: ‘strict-dynamic’ specified
Content Security Policy: Ignoring “'unsafe-inline'” within script-src: ‘strict-dynamic’ specified

And so on. Shouldn't these messages be gone?
During checkout this one pops up as well:
Content Security Policy: The page’s settings blocked the loading of a resource at inline (“script-src”).

It refers to this script:
https://www.paypalobjects.com/web/res/30b/42656ce426a9d524a73c137e72027/js/lib/jquery.min.js

I assume this was triggered by the paypal plus module I installed.
Question is: why is magento still blocking it and keeps pesting me with warnings even though I removed the CSP module entirely?
Thank you
EDIT: Even though the console says otherwise, the network log shows that the file does get loaded properly (code 200).


texts:
Problem:

I am installing Magento 2 on live server. While the site displays product info and some of the product images, there are no styles and JavaScript functions don't work.

Solution attempts/debugging:

I have seen a number of articles on inaccessible css/js files and have tried what they suggested to no avail. I follow instructions from here: https://mage2.pro/t/topic/259. But still no luck.

i've tried suggestion from Sandeep Pandey in https://mage2.pro/t/topic/259, it manage to solve the problem at first, but then when i change logo of my website or add new product, the problem occur again, the css and js wont load.

Questions

Does anyone have any ideas for solving this problem? Should i run command chmod 777 var -R & chmod 777 pub -R everytime i made changes on my website? Any suggestion?


texts: Steps to change the color of a footer in custom theme in Magento 2?

texts:
Used an _extend.less file, but it did not work out for me. I used this website, method 2, as a reference: https://belvg.com/blog/magento-2-x-how-to-edit-footer-menu-in-magento-2.html
Thank you!


texts: How to clear a specific user cart items without session

texts:
Here is how the cart is cleared for the current session user:

$cart = Mage::getSingleton('checkout/cart');
$quoteItems = Mage::getSingleton('checkout/session')
                  ->getQuote()
                  ->getItemsCollection();

foreach( $quoteItems as $item ){
    $cart->removeItem( $item->getId() );
}
$cart->save();

My question is how can i clear cart by user id, not by session?


texts: Add a product to order with observer event before save (sales_order_save_before) magento?

texts:
How can i add a default product to order with observer event before save the order? I want to do these while i am creating an order for costumer from admin panel. Thank you!

config.xml

<events>
    <sales_order_save_before>
        <observers>
            <library>
                <type>model</type>
                <class>library/observer</class>
                <method>AddProductSaveBefore</method>
            </library>
        </observers>
    </sales_order_save_before>
 </events>

observer.php

 <?php
 class MyPackage_Library_Model_Observer
 {
     public function AddProductSaveBefore($observer)
     {
         $order = $observer->getEvent()->getOrder();
         $product = Mage::getModel('catalog/product')->load("3");
     }
 }
 ?>


texts:
I'm trying to create a php file to be inserted in my Magento root that prints all the products and the associated fields.

    <?php

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

$productCollection = $objectManager->create('Magento\Catalog\Model\ResourceModel\Product\Collection');

$collection = $productCollection->create()
            ->addAttributeToSelect('*')
            ->load();

foreach ($collection as $product){
     echo 'Name  =  '.$product->getName().'<br>';
}

?>

I found this that should print all the product names but give me this error:

Fatal error: Class 'Magento\Framework\App\ObjectManager' not found in ../../public_html/folder/file.php on line 3

The error is over

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

Help for pleasure


texts: Can't override phtml template, displays blank page

texts:
I have override

  vendor/magento/module-customer-custom-attributes/view/frontend/templates/customer/address/edit.phtml

and placed the replaced file in:

  app/design/frontend/ParentTheme/childTheme/Magento_CustomerCustomAttributes/templates/customer/address/edit.phtml

but I see blank page in the respective page.

can anyone let me know what I am doing wrong here ?


texts: How to get the current time for a specific timezone?

texts: I have tried doing this using Zend, by date_default_timezone_set('Europe/Copenhagen');, but this will change the time zone for all of the future Zend_Date calls (if I am not mistaken). I just need to assign the current time in Copenhagen to one variable.


texts: Why is my old logo still showing after I updated the logo?

texts:
I am using Magento Go and I had my logo set but when I set an updated version of it, I am still seeing the old version on the front-end. Why is this? It appears that I cannot flush the cache in Magento Go, and I have already cleared my browser's cache. I have also tried renaming the file and re uploading it but this didn't work either. It appears to be loading from the CDN.

Response Headers:
HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Type: image/png
Date: Wed, 09 Oct 2013 12:41:15 GMT
Last-Modified: Tue, 10 Sep 2013 15:55:08 GMT
Server: ECS (jfk/5F35)
X-Cache: HIT
X-Server: w81
Content-Length: 2300


texts: extending Adminhtml Product edit page in Magento 2

texts:
In Previous Magento released versions (2.0.*) I have successfully extended and it's working fine. When comes to Magento 2.1.0 the same functionality not working. I have tried below code. If I went to wrong through me right direction.

Here I have directly wrote core file (later I will convert to local).

My Code

root/vendor/magento/module-catalog/view/adminhtml/templates/catalog/product/edit.phtml

 ...

            Welcome to Magento 2

    ...
    core files code
    ..

Previous versions my code is

Training/Learning/etc/di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="\Magento\Catalog\Block\Adminhtml\Product\Edit"
                type="Training\Learning\Block\Adminhtml\Product\Edit" />
</config>

Training/Learning/Block/Adminhtml/Product/Edit.php

<?php

namespace Training\Learning\Block\Adminhtml\Product;

class Edit extends \Magento\Catalog\Block\Adminhtml\Product\Edit
{
    protected $_template = 'Training_Learning::catalog/product/edit.phtml';
}

Training/Learning/view/adminhtml/template/catalog/product/Edit.php

...

                Welcome to Magento 2

        ...
        core files code
        ..

It's working fine in Magento 2.0.* versions.

Any help on this?


texts: Onepage checkout stuck on billing section

texts:
I am having an issue with Magento's onepage checkout.

Everything was working fine, I had tested a few orders with success. However, today I merged css/js from the magento admin and afterwards I noticed that during the onepage checkout process it gets stuck at the billing address.

I "unmerged", cleared magento cache, cleared browser cache and cookies and still the issue remains.

There are no errors in firefox developer tools and I see the following under the network tab when clicking "Continue":

POST https://www.example.com/checkout/onepage/saveBilling/ 200 OK
POST https://www.example.com/checkout/onepage/getAdditional/ 200 OK

I have randomly tried the solutions of "similar" issues that I found while searching magento stackexchange and nothing has worked or hasn't been relevant to my installation.

The issue does not occur with the default theme so I am assuming it is to do with the custom theme being used.

Any help will be greatly appreciated.


texts: Magento 2: Disabled configurable product still appear in the frontend

texts:
I have a configurable product and i want this product to stop appearing in the frontend. I have already disabled the product and set visibility to 'Not visible individually' but still frontend showing this product.

Another thing i want to share is, when i disable the product, it still shows as enabled in catalog grid but when i open that product, it shows as disabled.


texts: get configurable swatches in homepage product list (Custom product list)

texts:
I have populated bestselling products on homepage. It's populating list of products as desired. Now i have enabled configurable swatches & have enabled on product listing(i'm using rwd theme).

I can see color swatches on product lists in my product listing page. Now i want those swatches on my custom product list at homepagepage.

What i tried:

<?php echo $this->getLayout()->createBlock('core/template')->setTemplate('configurableswatches/catalog/product/list/swatches.phtml')->toHtml(); ?>

This above prints nothing.

And i get all the code from rwd/default/theme/configurableswatches/catalog/product/list/swatches.phtml inside products populating loop. And it worked and shows the swatches, but now clicking on swatches has no effect to image ? (Image doesn't changes as like it does on product listing for same product even after i added all configurableswatches js under skin/frontend/rwd/default/js/configurableswatches/*.js).

What is the best way to achieve configurable swatches on custom product list on homepage ?


texts: Magento 2 - How can I import / export the admin users from M2 to M2?

texts: I'm using two Magento 2, I'd like to transfer the admin users to another install, how could I do this?


texts: Upgrade to 1.9.3.3 causing configurable products to have no add to cart

texts:
I've recently upgraded a site from 1.9.1.1 to  1.9.3.3. Everything went well and as expected except for one critical issue. Configurable products are not showing the options or add to cart buttons. (The 'product-options' div and 'product-options-bottom' are not rendering).

I'm pulling my hair out and have tried everything that I could think of. Simple products works fine. I haven't changed any configurations in admin or amended any template phtml files.

Has anyone else seen this issue?

This is how it is looking currently ^^

and this is how it should look:


texts: The slider does not cache the first picture. After uploading, the picture is uploaded again

texts:
Found a module on github.
https://github.com/braumach/site/tree/7bead239da0d181193f77540dd0c0cda791e88d8/app/code/TemplateMonster/FilmSlider
It implements a slider with a constructor in the admin area. But I noticed one bug that I can't figure out how to solve. After each reboot of the page, the module loads the picture again. That is, a white screen and a loader are visible. After that, a picture appears.
How to implement correct caching of slider images?


texts:
I am having an issue with Magento's tax calculations, I inherited this website and had to upgrade from 1.7 to 1.9.3 (the client says that this wasnt an issue before the upgrade)

There are 20% tax rules setup for VAT/EU countries which seem to work fine. The issue arises when a customer from a 0% tax country try to checkout, where the grand total will include 20% tax.

For example:

  SUBTOTAL (EXCL. TAX)   £83.33
  SUBTOTAL (INCL. TAX)   £83.33
  GRAND TOTAL    £99.99

Any ideas on how I can sort this, admin has all prices added with Tax included if that helps.


texts: can i include created date in integration/customer/token api

texts:
I had set an expiry token for customers as 7 days.
How to find token is expired a kind of msg?
How Can I add created date in integration/customer/token in this endpoint? so that my frontend team can calculate token is expired.
Any other suggestions are most welcome.
Thank you


texts:
In Magento 1 I used the code below for value:

value="<?php echo $this->escapeHtml($this->getDefaultValue()) ?>

How could I set this code in Magento 2?


texts: Issue with installing new module for adding custom attribute into category section magento 2

texts:
I have created new module for adding custom attribute for category section in admin area of Magento 2. After that when I tried to run the setup:upgrade command  it gives us the following errors on fallback.php

  Invalid argument supplied for foreach() in
  /vendor/magento/module-store/Model/Config/Processor/Fallback.php on
  line 125

Also I have checked the app/etc/env.php file it looks like working but I don't understand how can we resolve this issue. So please suggest and help that will be great for me.


texts: Can't set a default value for the "weight" attribute

texts:
I am new on these forums and with Magento and i have a question about an issue i have been having with the "weight" attribute.

I have looked on many forums but could not find the answer i am looking for so i'd like to try it here.

My question:

I wanted to set a default value for 2 of the attributes used when creating a product. This because we use a certain shipment manager that requires these values to be set for each product.

For one attribute, i could set it without a problem (custom's description) but when i tried it for the "weight" attribute (fill in 0.1 for example) and save the attribute, the value just shows an empty text field again.

So it will not set a default value for that attribute, it just sets it back to blank after saving.

I have tried many things (setting the scope, setting it to be required, it doesnt allow me to remove it from attribute sets either) but nothing helps.

What am i doing wrong and how can i set a default value for this?

Hope you can help me with this!


texts: Magento2 extending class in a custom module conflicts with other module extending the same class

texts:
I have created a Custom Module to override the Image sizing on upload.

In my block I have the class, which extends like:

namespace Myweb\ImageResize\Block\Media;

class Uploader extends \Magento\Backend\Block\Widget
{
 protected $_template = 'Myweb_ImageResize::media/uploader.phtml';

but there is another Module I am using from Ced Commerece which also extending the same class

namespace Ced\CsProduct\Block\Helper\Form\Gallery;

class Content extends \Magento\Backend\Block\Widget
{
 protected $_template = 'Magento_Catalog::catalog/product/helper/gallery.phtml';

Now when using upload widget in admin in default backend, it works fine, but when I am using the Ced Panel for vendor

I am getting the error like:

Invalid template file:
'ImaginationMedia_ImageProccess::media/uploader.phtml' in module:
'ImaginationMedia_ImageProccess' block's name: 'gallery_schedule_block0.uploader'

How I can overcome this situation.


texts: Magento 2,Fotorama api ,How to add and play custom video in product page.

texts:
I want to add and play custom video where product images are display.
Can any one help me?


texts: Find Correct Location for Setting Area Code

texts:
Not sure this is the right question to ask, but I was given this module with the following line:

$areaCode = $this->state->getAreaCode();

Enabling it gives an error when accessing the website (calling the controller):

  Magento\Framework\Exception\LocalizedException: Area code is not set in /var/www/html/magento2/vendor/magento/framework/App/State.php:152

  Stack trace:
  #0 /var/www/html/magento2/vendor/[namespace]/[module]/Plugin/Framework/Session/Config.php(53): Magento\Framework\App\State->getAreaCode()

This makes some sense, but since it controls the session, it requests the area code from something on every page. Either this could be from other parts of the module, or Magento 2 itself.

The question is, if it's the module, how do I know where to put setAreaCode() (as per: 'Area code not set' issue in custom CLI commands in Magento 2)? There is a large number of controllers / execute() functions, does every single one of them need a specific area code?

Is it possible that this means that getAreaCode() should not be used, because there might be another module somewhere that doesn't specify the area code?


texts: Filter columns with renderers but without an index

texts:
I'm adding a column like so in _prepareColumns() method of a class that extends Mage_Adminhtml_Block_Widget_Grid:

$this->addColumn('status', array(
    'header' => $this->helper->__('Status'),
    'width'  => '20px',
    'renderer' => 'namespace_modulename/adminhtml_renderer_status'
));

It doesn't have an index and the values for this column are being shown properly in the grid but I am not able to filter because filtering needs a column in select statement to exist.

How can I filter a custom column that its value is returned from a renderer and could be anything?


texts: Checkout page customer registration is another time not logged

texts:
My account page customer registration is logged but in checkout Customer registration is not logged in another time.

Error : Display error in invalid username and Password.

Magento 1.9


texts: Magento 2.1 Customers Address Book Not Displayed Properly

texts:
Newly installed Magento 2.1 does not display customers address book properly both in frontend customer/address and backend customer information > customer view.

The data is stored and displayed properly in backend customer information > addresses, though.

Is this a bug or there's something missing from my end?

Update:
Looks like this is known bug as reported in:

https://github.com/magento/magento2/issues/5873#issuecomment-236868255
https://github.com/magento/magento2/issues/5681


texts: Display stock remaining quantity for all type of products

texts:
My requirement is to display stock remaining quantity in PDP for all types of products : simple,bundle,grouped,configurable.

For bundle products, when I choose the radio button/switch option, the corresponding simple product's stock qty should be displayed.


texts: Transactional Emails Unchanged, One Installation, Two Stores

texts:
There is one Magento 1.9 Community Edition Installation with two Stores. Let's call them "Store A" and "Store B". After following instructions from various articles here and around the internets and creating the proper templates for "Store B" I still get the styles of "Store A" in the transactional emails.

There is a name change in the proper variable verifying the email comes from the correct store but no style change.

P.S.

System > Transactional Emails > Store B Template - OK
System > Configuration (under the Store B scope) > Sales > Sales
Emails > Setting set to Store B Template - OK
Cache Cleared and tried several times
The email-inline.css is used for both, but with different and proper classes
The preview gives the proper output

Any ideas? What is missing?


texts: How to enable Magento modules from the database access?

texts:
I have accidentally disabled all of the modules from System>Configuration>Advanced. Now I can't access to my site or the admin panel. Both of them display a blank page. After that, I have found the database file from phymyadmin and run the following query:

DELETE FROM core_config_data WHERE path LIKE 'advanced/modules_disable_output/%'

But no luck. My site as well as the Admin panel is still blank. Can anyone please help me with that?


texts: What permissions schema should I use when deploying Magento securely?

texts:
We run what I feel is pretty standard Magento setup:

Deployed via rsync (it should also be deployable with git pull and scp/SFTP for simpler server configurations and to make developers' lives easier. Unfortunately, standard git only allows the setting of the exectuable flag and not the full Unix permission like group writability)
Running on Apache
Only running on machines that support setgid sticky bit

And we have pretty standard goals:

Deploy to a variety of customer-facing environments (dev, prod, CI, etc.) continually
Deploy easily to dev boxes
Have all operational (no need to support Magento Connect Manager or initial Magento installation) Magento features working fully and compatible with all major plugins

Within those goals, how can I set up file permissions to deploy (and set up dev and CI boxes), restricting permissions (as in principle of least privilege) as much as possible?

An outline of sources I've looked at already:

A Magento wiki page that recommends a 700/600 setup with all files owned by the Apache user but with core files (all files except /media and /var) set as 400.
A Magento StackExchange answer that mentions the 700/600 approach by concludes recommending a group-based 770/660 and 750/640 setup.
Another Magento wiki page that recommends 775/664 initially. It further includes some discussion of what permissions are required, but doesn't explicitly recommend a setting.


texts:
I'm having some issues with TinyMCE, which is causing the editor not to work on CMS pages and causes products not to load when attempting to edit them.

When these issues are happening, I see this in the console: [url]/static/adminhtml/Magento/backend/en_US/tinymce.js net::ERR_ABORTED 404

and require.js:166 Uncaught Error: Script error for: tinymce

Note: if I look into /static/adminhtml/Magento/backend/en_US folder, I can confirm that tinymce.js is not there, but there's a en_US/tiny_mce_4 folder with tinymce.min.js in it.

Anyone know what's going on?

Edit: one infuriating thing is that, for some reason, everything is working on my development environment. I rsynced the public_html folder from dev to prod, dumped/imported its database, and still the issue persists. So weird!


texts:
i am using this following code to export my grid:

/**
* Export order grid to CSV format
*/
public function exportCsvAction()
{
   $fileName   = 'orders.csv';
   $grid       = $this->getLayout()->createBlock('adminhtml/sales_order_grid');
   $this->_prepareDownloadResponse($fileName, $grid->getCsvFile());
}

how do i sort the exported data by specific column?


texts: Modify Product Listing 'Add to Cart' button

texts:
I'm building a self contained module which will make modifications to the 'Add to Cart' button through Magento's listing and detail pages. I can easily modify the button on the detail page as it uses it's own template addtocart.phtml.

Where as the listing page has the mark up for these buttons embedded in a chunk of HTML. The code for the button is below.

<?php if($_product->isSaleable()): ?>

<button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><?php echo $this->__('Add to Cart') ?></button>

<?php else: ?>

<?php echo $this->__('Out of stock') ?>

<?php endif; ?>

My issue is trying to modify the above code without having to ask the installer to make numerous code changes. Obviously if the site is running a heavily modified template they will need to.

I could provide a new list.phtml template and override the entirety of the file but this seems like it's going to cause more issues then it's worth.

Short of writing some dirty hack to attempt to locate this button and make the modifications is there a better solution? What would you suggest to be the best solution in a contained module as well?


texts: Move Customer Edit Form into Account Dashboard

texts:
My magento store currently has the default layout for my customer account dashboard.
One of the sections in the dashboard is the contact information which uses the template

customer/account/info.phtml

If a customer wants to edit their contact information they go from:

www.site.com/customer/account/
(calls template customer/account/dashboard.phtml and customer/account/info.phtml)

to

www.site.com/customer/account/edit/
(calls template customer/form/edit.phtml)

Is there a way i can move the actual edit form into the dashboard itself?


texts: Magento2: How to locate file in destination using the move element.

texts:
I'm  been looking through my default.xml trying to add links to top.links. In the default.xml file I see this.

<move element="top.links" destination="rd.navbar.collapse.items"/>

so I know this tag displays the header link, but what file is destination pointing too?  I cannot find the name "rd.navbar.collapse.items" any where in my directory tree.  thanks!


texts:
I am trying to replace the helper that provides the compare box with the list of products added to it. My helper is going to get the product ids from a cookie instead of from Magentos session.

As I understand things I need to create a file in app/code/local/Mynamespace/Mymodule/Helper/Data.php and put my own class in this file. Is this correct or should I put the file somewhere else or perhaps give it a different name?


texts: magento 2.3 why the deleted products still show at the dropdown of search box

texts:
I am using magento2.3 and porto theme
why the deleted products still show at the dropdown of search box

I have cleared all cache ,and clicked the following 5 cache:"Flush Magento Cache,Flush Cache Storage,
Flush Catalog Images Cache
Flush JavaScript/CSS Cache
Flush Static Files Cache
and bin/magento indexer:reindex

and I have also deleted all "search items" and rm -r /var/cache as Product show in search suggestion after delete said.

but not work for me

what should I do ?

Thanks


texts: Custom admin url, now some admin modules redirect to frontend

texts:
I have moved the magento admin to a seperate node, thus updated the settings in admin to set admin url as custom : thus admin.example.com, which points to that servers ip.

All ok, but I find a lot of 3rd party modules are no longer working in admin.
If selected from menu, they flip to frontend url, and thus exists admin.

Any ideas what I am missing?


texts: Product List - Configurable swatchs don't update price

texts:
I have a configurable product with a size attribute that I am showing in the products list and in the product page and depending on the size of the product, the image and the price is changed.

But I am facing two problems

In the product page, everything is working OK, the price is changing and the image is changing.

1 problem) However in the products list/grid just the image change when I select the product size in the swatch. The price don't update.

2 problem) Still in the products list/grid when I press the button 'Buy' in a product with this size attribute, a modal window appear to select the size but the price in this window doesn't change either.

Anybody can help?

Thanks in advance

Update:

I contact the theme support and they fix the second problem

"2 problem) Still in the products list/grid when I press the button 'Buy' in a product with this size attribute, a modal window appear to select the size but the price in this window doesn't change either."

But the first problem looks like Magento don't update this price in the product list page, so this is not a theme problem.

How can I implement this price update?


texts:
I'm trying to execute a cron (that disables certain products) on a per store basis, with timing set in the backend.

I have been looking at: http://inchoo.net/ecommerce/magento-configurable-cron/
and can get that working. But only for the default store. If I set one time in default settings and another time in store level settings, only the default runs.

My questions is, how do I apply this to multiple stores? Is there a way to give the cronjob the scope (storeID) it should run in the settings and how do I ensure the crontab picks all the times from different stores?


texts: change "Products with label "Sale" to "quality" in magento

texts:
In home page, under "specials" , you can see Products with label =" sale, best"

I want to change "Sale" to "Quality".


texts: how to override vendor/magento/module-catalog/Model/ImageUploader.php in my custom module and magento showing error "Code Duplicates Detected"

texts:
File: brijeshjp2006/sliders/brijeshjp2006-sliders-1.0.5.0/Model/ImageUploader.php
  Line: 2
  File: magento/module-catalog/magento-module-catalog-102.0.3.0/Model/ImageUploader.php
  Line: 6


texts: Enterprise Target Rule (rule based relation) Widget

texts:
Update x 2:

I have a widget that displays related products in Magento EE, but for whatever reason it only displays the manually related products and not the target rule(rule based) related products. This is the code that performs the action:

https://gist.github.com/anonymous/88fac29671bdc31c771e

In app/code/core/Enterprise/TargetRule/Block/Catalog/Product/List/Abstract.php in line 50, I saw it added "Enterprise_TargetRule_Model_Rule::RELATED_PRODUCTS: " to the case as such:

https://gist.github.com/anonymous/3323e4e931f4d3c138d3

so I modified the widget similarly on lines 30:

https://gist.github.com/anonymous/0f7f7a559b5cd17cec8e

Now the widget displays both rule based related products and random products from different categories. I know the target rule is setup correctly as the correct items display in the normal related products block, but not the widget as described above.

Anyone have thoughts on how to modify the widget to work properly?


texts: Magento2: How to change the Shipping Address Form validation message?

texts:
I want to change the shipping address form validation message(Just want to replace : 'This field required' to 'Enter FirstName') in magento2

I want to change the below validation message text how can i fo that?


texts: I need to create a list of product which has been placed to an order with status complete, is there a way to get a collection of this product?


texts:
magento showing irrelevant products and products that are under a disabled category.

i have on my a category named iphones on my store but this category is set to be disabled
meaning in the "is Active" section i have set it to "no"

when searching the term "iphone" i get irrelevant products and the iphones products in the search results.


texts: getting product that are in the cart from custom script

texts:
So, I want to get all product in the shopping cart of current client and use it in third party "classical" php script.
Why code, mentioned below doesn't work as expected?

define('MAGENTO_ROOT', getcwd());
$mageFilename = MAGENTO_ROOT . '/app/Mage.php';
require_once $mageFilename;
Mage::init();
$cart = Mage::getSingleton('checkout/session')->getQuote();
foreach ($cart->getAllItems() as $item) {
   $productName = $item->getProduct()->getName();
   $productPrice = $item->getProduct()->getPrice();
   echo $productName;
   echo $productPrice;
}

How do I access information of shop instance (Mage), which is running now?
Nor create new Mage object from the ground up.


texts: How to define the constant for the module in magento 2

texts: I have a list of constants that i want to use for the every view i have and i also used these in the constants in controller is it possible.


texts: custom module menu not showing for admin & admin users in magento 2

texts:
My custom module's admin menu not showing for admin & custom admin users. Here is the code snippet:
acl.xml
<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
    <acl>
        <resources>
            <resource id="Magento_Backend::admin">
               <resource id="Booking_Customorderedit::customorderedit" title="Order Editing" sortOrder="10" >
                        <resource id="Booking_Customorderedit::save" title="Order Editing Report" sortOrder="10"/>
                </resource>
            </resource>
        </resources>
    </acl>
</config>

menu.xml
<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
    <menu>
        <add id="Booking_Customorderedit::customorderedit" module="Booking_Customorderedit" resource="Booking_Customorderedit::customorderedit" sortOrder="99" title="Reservation Request Edit"/>
        <add action="booking_customorderedit/customorderedit/index" id="Booking_Customorderedit::save" module="Sunarc_Customorderedit" parent="Booking_Customorderedit::customorderedit" resource="Booking_Customorderedit::save" sortOrder="99" title="Reservation Request Edit"/>
    </menu>
</config>

Even I have added the isAllowed function too.
Controller/Adminhtml/Customorderedit/Index.php
protected function _isAllowed()
{
 return $this->_authorization->isAllowed('Booking_Customorderedit::save');
}


texts: What is the use of the merger class in Magento Message queue?

texts:
Can someone kindly explain the use of the Merger class when using Magento Message queue framework?
Also, why is there no default merger class ?


texts: Video keeps playing in background after closing popup

texts:
I have a button that when clicked, pops up a video content that can be played.
The problem is that if I close the popup while the video is playing, it does not stop and keeps playing in the background.

This is the code I'm using for the button and video

    Click Me

        <video id="videoplayer" controls poster='<?php echo $block->getUrl("pub/media/video/")?>whats-your-story.png'>
            <source src='<?php echo $block->getUrl("pub/media/video/")?>this-is-chris-saint-long-version.mp4' type="video/mp4">
        </video>

EDIT

I have edited the code like below, but still getting the same error

    Click Me

        <video id="videoplayer" controls poster='<?php echo $block->getUrl("pub/media/video/")?>whats-your-story.png'>
            <source src='<?php echo $block->getUrl("pub/media/video/")?>this-is-chris-saint-long-version.mp4' type="video/mp4">
        </video>


texts: How to customize the customer registration form?

texts:
I want to modify the customer registration form in Magento 1.9.

There are two forms both under templates 1. Customer and 2. Persistent.

So which template should be modified ?

Because I have made changes in both the templates but still the original form is getting displayed.


texts: Using for catalog_product_index_eav for custom attribute and addAttributeToFilter

texts:
I've added an attribute:

$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'show_in_subview', array(
    'type'                       => 'varchar',
    'label'                      => 'Show in Subview',
    'input'                      => 'multiselect',
    'backend'                    => 'eav/entity_attribute_backend_array',
    'required'                   => 0,
    'user_defined'               => 0,
    'visible'                    => 1,
    'is_filterable'              => 1,
    'is_configurable'            => 0,
    'sort_order'                 => 14,
    'source'                     => 'ho_subviews/attribute_source_subview',
    'global'                     => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
    'group'                      => 'General',
    'used_in_product_listing'    => true,
));

As you can see I've used a custom source to fill the multi select field. Saving and loading the values works like a charm.

Filtering the collection can be done using:
$collection->addAttributeToFilter('show_in_subview', array('finset'=> Mage::app()->getStore()->getCurrentSubviewId()));

The problem is that the collection doesn't use indexes since the column type isn't SET (http://dev.mysql.com/doc/refman/5.1/en/string-functions.html#function_find-in-set).

I noticed that when adding a normal multi-select field, the query is a join on the catalog_product_index_eav table which does use indexes and thus will be more performant.

I'm not exactly sure where to look to use this table as well. I'm guessing the backend class is responsible for that (that was the only difference between a manually created drop down field or the above). So eav/entity_attribute_backend_array doesn't use the catalog_product_index_eav table.

What is the default backend that is used for multiselect or isn't there any?
How can I extend eav/entity_attribute_backend_array so it uses the catalog_product_index_eav table?


texts: Magento 2. Injecting a virtual type results in array instead of object

texts:
I'm having some trouble with virtual types.
I've done some research and this is what I have.

0: A class which takes a string argument

1: A virtual type based on above class with a constant value for above argument.

2: A concrete class in which I'm injecting above virtual type.

Now, from what I understand I imagine that an object should be injected. instead I get an array.
Any help would be highly appreciated. I'm sharing the code as well.

The class that sits at the base of the virtual type

namespace Company\Extension\Model\Product\Attribute\Source;

class Test
{
    /**
     * @var
     */
    protected $string;

    public function __construct($test)
    {
        $this->string = $test;
    }

    public function test()
    {
        return $this->string;
    }
}

The di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">

    <virtualType name="VirtualTypeName" type="\Company\Extension\Model\Product\Attribute\Source\Test">
        <arguments>
            <argument name="test" xsi:type="string">foo</argument>
        </arguments>
    </virtualType>

    <type name="Company\Extension\Controller\Test\Test">
        <arguments>
            <argument name="context" xsi:type="object">Magento\Framework\App\Action\Context</argument>
            <argument name="test" xsi:type="object">VirtualTypeName</argument>
        </arguments>
    </type>
</config>

The class in which I'm injecting the virtual type:

class Test extends \Magento\Framework\App\Action\Action
{
    protected $test;

    public function __construct(
        Context $context,
        $test
    )
    {
        $this->test = $test;
        parent::__construct($context);
    }

    public function execute()
    {
        ini_set('xdebug.var_display_max_depth', 5);
        ini_set('xdebug.var_display_max_children', 256);
        ini_set('xdebug.var_display_max_data', 1024);

        var_dump($this->test);
        exit;
    }
}

The result of the var_dump:

array (size=1)
  'instance' => string 'VirtualTypeName' (length=15)


texts:
We are working on Magneto 2.3.0, If there is a new customer login then some data is not visible, someone can tell why this is happening

Migration M1 To M2

Error : var/log

  main.CRITICAL: Validate class not found from basename
  'Magento\Framework\Validator\EmailAddress' {"exception":"[object]
  (Zend_Validate_Exception(code: 0): Validate class not found from
  basename 'Magento\Framework\Validator\EmailAddress' at
  /vendor/magento/zendframework1/library/Zend/Validate.php:244)"} []


texts: Setting a new child template for a block issue in Magento 1

texts:
This is my block:

 $_block = $event->getBlock();
 if($_block instanceof Mage_Page_Block_Html_Header){
     $_child = clone $_block;
     $_child->setType('core/template');
     $_child->setTemplate('page/html/mycustomtemplate.phtml');
     $_block->setChild('child', $_child);
 }

I just want to include a new template before or after the header in my observer. How can I do that ?


texts: How to get Coupon Code on Success Page in Magento 2

texts:
I am trying to get coupon code created in cart price rule from backend on success page.
I am doing it as: In Block file

public function getCouponCollection() {

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

    $array = [];

    $getRules = $om->create('Magento\SalesRule\Model\Rule')->getCollection();

    foreach ($getRules as $rule) {
    $array[] = ["value" => $rule->getId(), "label" => __( $rule->getName() ) ];
}

return $array;

}

and with Magento\SalesRule\Model\RuleRepository injected in constructor

/** @var \Magento\SalesRule\Model\RuleRepository $ruleRepository **/

public function getCouponByRuleId ($id) {

    $rule = $this->ruleRepository->getById($id);

    $rule->getDescription();
    $rule->getCondition();
}

In template file, I have:

<?php $a=$block->getCouponCollection();

if (!empty($a)) {
foreach ($a as $v) {
    $rule = $block->getCouponByRuleId($v["value"]);
    if ($rule) {
        echo $rule->getCouponCode();
        }
    }
}
?>

and it is not working, what needs to be added/corrected here..any help should be much appreciated.


texts:
I've tried:

<block type="page/html_topmenu" name="ajaxCart" as="ajaxCart" template="page/html/ajaxCart.phtml">
    <action method="unsetData"><key>cache_lifetime</key></action>
    <action method="unsetData"><key>cache_tags</key></action>
</block>

and:

<?php echo $this->getChildHtml('ajaxCart', false); ?>

Neither seem to stop the caching of this template, any suggestions?


texts: Avoid loading product image from cache in magento 2

texts:
I have issue in product images.

Right now products are loading from cache from the path like below.

  site_url/media/catalog/product/cache/2765542505660baab28ecd555e27366e/t/m/image_name.jpg

This is leading to 404 error page.

But if we remove cache from the image url, the image is loading successfully.

like below one

 site_url/media/catalog/product/t/m/image_name.jpg

This will load the image correctly,

So I am planning to change the image url like this in all the pages.

How can load the image without cache path in product list page and in detail pages.

Can anyone look into this and update me ideas.

Thanks in advance!!


texts: Most efficient way to get all ID's from a collection

texts:
In the past to get all ID's of a product collection, I have always used getAllIds on the collection, believing this was a method that prevented the full collection load with data etc.

But, I actually looked at the method today and it loads the collection and iterates over each item to get the ID array.

public function getAllIds()
{
    $ids = array();
    foreach ($this->getItems() as $item) {
        $ids[] = $this->_getItemId($item);
    }
    return $ids;
}

My question is, what is the most efficient method to retrieve only the ID field from a collection?


texts:
I am using magento 1.7.
I want to develop my own module for my site. I need to add two tables in my database. My module is to manipulate these two tables from the Admin interface as adding, editing, and deleting and in frontend viewing and doing research.
What are the major steps that I should do, I am newbie in magento and I read about the architecture of Magento and I understand.

Thank you for your help


texts: Show available inventory on configurable product magento 2

texts: I need on configurable product page to show available inventory of simple products,while selecting options, like price will change on option change in same way.


texts:
how to limit the maximum percent amount for a coupon in magento.
For eg: Cart value is 3,50,000
Coupon Code discount applicable : 20%
So the discount will now be: 70,000.

But i want to restrict the discount amount to only 50000 max.

Please suggest configuration or code change how can it be done.


texts: why admin url showing as blank in magento 2?

texts:
i installed the magento 2 at local server and when i try to open my admin page to login following this url:
https://localhost/magento/admin then my admin login page showing as blank page like this please see that image :

can someone help me if anyone have solution?,


texts: noobie to Magento, took days for me to figure out the structure block and content block thing but I think I understand it.  I created a block to hold an image but it puts a space between my logo and search bar, I'd like them to be on even ground.  What I was thinking of doing is finding the .phtml file that outputs the logo and search bar....but I'd have no idea what I'd do then and I have no idea where that is.  I know where the column .phtml files are and the Header, head etc. but not specifically the place I want.


texts: Problem when moving live shop to localhost

texts:
I have a big problem to get my live shop working on a localhost.

I have changed all the files and have the following problem.

Each time I want to enter the local shop I´m redirected to the live shop.

If I disable my internet connection I will not be able to access my local site.

Hope someone can help me with this.

The live store I want to run on localhost is Version 1.5
I use Xampp.
Have changed local.xml and core_config_data in SQL.


texts: first name field not shows in checkout page magento 2.4.2

texts:
When I go to the checkout page, there is no first name field.
I also check this question Magento 2 Checkout not showing first name.
In my database, is_visible is 1 for firstname.


texts: Add Grouped product to cart using rest api Magento 2.3.6

texts:
I am trying to achieve the same as in the below question
Adding a grouped product to cart via the rest api
But I dont have reputation to add a comment there. So kindly help me out.


texts: How to get input text value from input tag?

texts: I have created newsletterpopup with two fields, 'email address' and 'subscriber's name'. And I have made input tag for this both field. So now I want to get the subscriber's name in a variable. How can I do that?


texts: How to fix a long Time to Interactive in google pagespeed : Magento 2

texts:
Can anyone help me to fix

  " Time to Interactive "

In magento 2?

I really hope anyone can help me or tell me how to fix it

Bad score on google pagespeed - 38 sec


texts: Magento 2 How we can logout customer from frontend if customer is disabled from admin?

texts:
Login as a customer in front end side.
Then disabled customer from admin panel.
Go the front end side and refresh the page,it should be logout automatically.

Please update me if anyone have solution for this?


texts: How to handle same item with multiple prices based on condition without configurable products?

texts:
I am selling collectible cards.  Each card can have 5 different conditions (Mint, Lightly Played, Heavily Played, etc). Each condition will have different prices based on the condition and need to be inventoried/sold separately.

It seems that the core Magento solution is configurable products, but there are over 20,000 different cards/SKUs.  Do i really have to create over 100,000 different simple product just to achieve this?

I can't afford any $300 modules right now.  Does anyone have an alternate way to handle this scenario?  Thank you for your insight.

Using Magento ver. 1.9.2.4


texts:
Clicking the link on a password reset email leads to the /customer/account/changeforgotten/ page, but it is blank.

Pretty sure this worked in the past, only changes recently were SUPEE-6482, SUPEE-6788, SUPEE-7405, SUPEE-7405 v1.1

Any suggestions on how I should diagnose this issue?


texts: How can I get code to display on my English site but not my Spanish version?

texts:
I have two versions of the same site, one in English and one in Spanish and they share the same template.  One is www.mysite.com, the other www.mysite.com/es.

There is a Chat button (Moxie brand) on all the product pages, but the operators only speak English.  Despite text on the link that says English Only, the contact center gets ten plus chats per day in Spanish.  Not great service.

I'd like to figure out a way to wrap the chat code in a code that would hide it on the Spanish language pages.  Is it possible to test the URL for /es/ and if it is not there, go ahead and display the link.


texts:
In which scope does Magento 2 run cron jobs?

If I have a multi-site system, does the framework invoke my job once for the entire system, or does it repeat the job for each store?

The doc says they run in store view scope, however, my practical experiments show only one invocation.

If they indeed run in store view scope, then how do I identify the site/store scope for which it runs?


texts:
I want to make possibility to make private sales available by link for not logged-in users and for logged in too).
Example: we have ads with "special prices for new users only" or sending mails to our best premium ultra super members. There are different prices for some products in pool of this offers.

Customers who visited us by this special link should see special prices for all products taking part in offer(product page, cart, etc), if customer login in-prices should not be changed to default prices. What is the best tactic for make this script? Thanks.


texts: How to add logo in cms_index_index.xml in magento 2.3.5

texts:
app/design/frontend/vendorname/themename/Magento_cms/layout/cms_index_index.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"
  xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceBlock name="logo">
        <arguments>
            <argument name="logo_file" xsi:type="string">images/logo-light.png</argument>
        </arguments>
    </referenceBlock>
</body>

but issue is magento backend side configuration add logo-light.png but cms page logo not visible
transpart logo visible
please thanks advance for help


texts: How to integrate custom module in Magento 2

texts:
I have created a custom module in Magento 1.9. I want to move this custom module in Magento 2.

I read few articles and also the Magento 2 custom module creation, but I am getting confused from where to start. How to integrate custom code in Magento 2. I have read Magento 2 article that how to create a custom module in Magento 2 but still, I am confused !!


texts: Error Adding Magento 2 SOAP Service Reference With Visual Studio

texts:
I am trying to add Magento 2 as a service reference to Visual Studio 2013.

I add the address http://mage2.dev/soap/default?wsdl&services=catalogProductRepositoryV1

But every time I click ok, I get an error that says.

There was an error downloading '{https://}mage2.dev/soap/default?wsdl&services=catalogProductRepositoryV1/_vti_bin/ListData.svc/$metadata'.
The request failed with HTTP status 400: Bad Request.
Metadata contains a reference that cannot be resolved: '{https://}mage2.dev/soap/default?wsdl&services=catalogProductRepositoryV1'.
The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was ''.
The remote server returned an error: (401) Unauthorized.
If the service is defined in the current solution, try building the solution and adding the service reference again.

It seems as though I need to authorize first to get the wsdl, but I can't authorize because I don't have the wsdl. Feels like a chicken and egg problem.

Am I on the right track? What do I need to do to add the service reference?


texts: Where Do I Put a Template To Add Using {{block type="core/template" template="template.phtml"}}

texts:
I am new to Magento and so sorry for the noddy question.

I am trying to add php to a CMS page and the way to do this appears to be to put the php (including Mage calls) to a phtml template and then add it to the CMS page with
{{block type="core/template" template="template.phtml"}}.

But, in all the examples that I can find saying that this is the way to do it none of them tell me where to put the phtml file so I can use the above.

So my question is; where do I put a template to call using
{{block type="core/template" template="template.phtml"}}?

Thanks in advance,
Norman


texts: Displaying Search results in a random order

texts: I need to display the products on the search results page in a random order. Since there is no official explanation on how to do this, I tried to edit the Mage_CatalogSearch_Model_Resource_Fulltext module, but I could't figure out where to add a ORDER BY RAND() in the prepareResults() function. Does anyone know how to achieve this?


texts:
I have an order with processing status and its invoice is canceled.

When I use the order->canCancel() function, It returns me false.
I checked the core and this is the part why I am getting false:

$allInvoiced = true;
foreach ($this->getAllItems() as $item) {
    if ($item->getQtyToInvoice()) {
        $allInvoiced = false;
        break;
    }
}
if ($allInvoiced) {
    return false;
}

This is my custom code:

 foreach ($invoice->getAllItems() as $item) {
     echo '<pre>'; var_dump($item->getQty());
 }
 ...
 if ($orderObject->canCancel()){
 }

The result of the var_dump is 4 in my case. Then why the  $item->getQtyToInvoice() returns me 0 or false ?


texts: Unable to filter search result by a custom attribute

texts:
I had created a custom attribute allowed_countries for the products
I'm able to get catalog products collections based on the values of the attribute allowed_countries

But when I search any product the search result is showing all the products regardless of the addAttributeToFilter() that i had wrote!

->addAttributeToFilter('hidden_countries',array('nlike'=>'%'.$current_country.'%'));

I had copied the Result.php file to  :

local/Mage/CatalogSearch/Block

And the _getProductCollection() will looks like :

 $this->_productCollection = $this->getListBlock()->getLoadedProductCollection()
                        ->addAttributeToFilter('active_stores', array('finset'=>$store_id))
                        ->addAttributeToFilter('hidden_countries',array('nlike'=>'%'.$current_country.'%'));

The attribute details are :

$attributeOptions1 = array(
  'label'                      => $attributeLabel,
  'input'                      => 'multiselect',
  'type'                       => 'text',
  'backend'                    => 'eav/entity_attribute_backend_array',
  'frontend'                   => null,
  'source'                     => 'storeSwitcher/product_attribute_source_store',
  'global'                     => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
  'required'                   => false,
  'user_defined'               => false,
  'required'                   => false,
  'class'                      => null,
  'unique'                     => false,
  'searchable'                 => true,
  'filterable'                 => false,
  'comparable'                 => false,
  'visible_on_front'           => true,
  'visible_in_advanced_search' => true,
  'is_configurable'            => false,
  'visible'                    => true,
);

Please let me know : I'm doing anything wrong
Magento 1.9


texts: Magento 2.x how to get ui-select selected value

texts:
I have place ui-select component and i want to get value in my custom component.  How can i get selected value in custom component ?

list.js file

Here is my output.


texts: How to disable Cash On Delivery on specific product type

texts:
Basically I need to disable cash on delivery on specific product type.
Basically i m using store credit of mage store. This is for wallet in magento.
on payment option its showing cash on delivery . its a not a physical or virtual product. So i need to disable cash on delivery on this product type.


texts: Accessing Overridden CategoryController via alias

texts:
I have overridden the CategoryController, and can access the overridden controller using the direct URL:
    eg. http://myshop.dev/catalog/category
This URL has the following alias associated with it:
    http://myshop.dev/men-s/clothing
However, when accessing the alias, the original controller is used.
How can I make Magento use the overridden controller here as well?

My config.xml rewrite rule is as follows:

...
<rewrite>
    <rivers_controllers_catalog_view>
        <from><![CDATA[#^/catalog/category/#]]></from>
        <to>/riverscontroller/category/</to>
    </rivers_controllers_catalog_view>
</rewrite>


texts: how to delete file or image in magento 2. I know using unlink('full file path'); will delete the file but I want to do magento 2 way.  condition when User  checked the delete checkbox.


texts: Magento 2 Delete operation is forbidden for current area

texts:
I have tried to make the solution proposed at Delete operation is forbidden for current area magento 2

But without result I work in magento 2.3.2 with php 7.2

Please help me... Thank you.


texts:
Under Default Category I have created another category called Inventory under which I have other categories and sub-categories. I don't want to display Inventory category but all the categories and sub-categories that are under it in the below format so how do I accomplish it in .phtml file?

Category 1
 Sub Category 1 of Category 1
 Sub Category 2 of Category 1
 Sub Category 3 of Category 1
 etc.

Category 2
 Sub Category 1 of Category 2
 Sub Category 2 of Category 2
 Sub Category 3 of Category 2
 etc.


texts:
How can I check if the customer has activated his account on the order success page.

Here are some things I've tried:

<?php if(Mage::getModel('customer/customer')->getCollection()->addAttributeToFilter('confirmation', array('notnull' => true)): ?>
    <?php if(Mage::getSingleton('customer/session')->isLoggedIn()): ?>

          stuff here

    <?php else: ?>

          other stuff here

<?php endif; ?><?php endif; ?>

And...

    <?php if(Mage::getSingleton('customer/session')->isLoggedIn() || ($session->getCustomer()->getCustomerActivated())): ?>

stuff here

            <?php else: ?>

                  other stuff here

        <?php endif; ?>

both don't work. How can I do this?


texts: Magento 2 Use Shipping address of another user in checkout page

texts:
I have a requirement to search for customers using their names and place an order for them from my login. Its more like a Call center rep.
I have a search box in the checkout page for searching the customers. I am able to select the other customer and also save the customer's shipping address in quote (quote_address table) but the shipping address is not showing on the checkout page and also on the Payment page.
The shipping address that got saved in quote_address while selecting the address is getting changed to the default address of the customer while placing the order.
Please help.


texts:
Magento 2.2.4  how can in use Oauth 2.0 for rest api resource access?
Is it posible to use Oauth 2.0 with magento 2.2.4 like Oauth 1.0.


texts:
Alright, I am trying to do a very simple thing: use jQuery in my myScript.js file. I'm on Magento 1.9.0.1. The theme I am building is based on the built-in rwd theme, which by default loads jQuery 1.10.2 in noConflict mode, locally (as opposed to Google cdn). If I attempt to make a jQuery funtion in myScript.js, I get the following error (in my Chrome dev console): ReferenceError: jQuery is not defined. However, if I put the same function inside of <script> somewhere in the HTML, it works as expected.

So, I have done some researching and poking around and it seems the problem is coming from the load order of .js files in the page head, where myScript.js is being loaded before jquery-1.10.2.min.js. I have tried a lot of different things to fix this (attempting to call myScript.js after jQuery)—I have moved the line in page.xml that calls jQuery to before the myScript.js call. I have moved the myScript call to local.xml, where I put it at the very bottom. No matter what I do, I cannot get myScript.js to load after jquery-1.10.2.min.js. The load order in the <head> will always, always be the exact same, regardless of the order I list them in. I can get either file to not load at all by removing it's call from page.xml, so I know that I am editing the correct file.

TL;DR: How can I get myScript.js to load after jQuery?

Thanks in advance!

P.S. Am I using the backtick markdown properly in my question? It feels like I am using it really often, but I believe I am following to guidelines. Any stylistic help would be appreciated :)


texts:
Magento2 - facing issue with below error in admin panel

error in console

category:1 Uncaught SyntaxError: Unexpected token C in JSON at position 473

at JSON.parse (<anonymous>)
at getData (main.js:58)
at Array.map (<anonymous>)
at Object.apply (main.js:74)
at HTMLDocument.bootstrap (bootstrap.js:106)
at fire (jquery.js:3232)
at Object.add [as done] (jquery.js:3291)
at jQuery.fn.init.jQuery.fn.ready (jquery.js:3542)
at jQuery.fn.init (jquery.js:2967)
at new jQuery.fn.init (jquery-migrate.js:225)


texts:
Can I retrieve a block instance using it's alias (as="alias") within a template?

I'm aware this can be done for the block name, for example:

$block->getLayout()->getBlock('BLOCK_NAME');

I'm looking for a way to do this using the alias specifically:

$block->getLayout()->getBlockByAlias('BLOCK_ALIAS');


texts: I want to implement payfort apple pay in magento2 how I achieve this?


texts: Turn off payment option on second store front

texts: I have two storefronts and I need to disable payment on account for the second storefront. This doesn't appear possible in the admin (unless I'm missing something). What is the correct way to do this?


texts: Product details view page redirect 404 in multiple website with store

texts:
Here is my two website one is Retail and Other one wholesale.
In retail two store int_retail and  eu_retail these are good and working fine these are default website store.

In wholesale two store same as retail eu_wholesale and int_wholesale when open wholesale website https://mystore.com/wholesale/ its working and open all thing product list page but when click on product move to 404.


texts: Remove a shipping method from a store view

texts:
I have a magento store with 1 website operating 2 store views within it.
I want to hide a shipping method which is displayed in a list item in one of the store views.

I understand I can use css display:none for the li, but I am not sure how piece everything together. From my research I have the following ideas...

The css part

display:none

the phtml part (not sure which file I put this in)

if (Mage::app()->getStore()->getId() == YOUR STORE VIEW ID HERE){//do stuff}//orif (Mage::app()->getStore()->getCode() == YOUR STORE VIEW CODE HERE){//do stuff}

a bit of code to include a file somewhere to load the css based on the correct store id

<reference name="head">
            <action method="addItem"><type>skin_css</type><file>css/additional.css</file></action>
        </reference>

This is all I have gathered from researching various posts, just not sure how to piece it all together.
I keep reading terminology like "blocks" and "controllers", but have no idea what these actually refer to. Although I know they belong somewhere in app/code, just require specific paths and area in file to insert code.

Any help would be really appreciated.


texts: Magento 2: Is it possible to add additional general/store_information configuration through my custom module?

texts:
Reading articles relating to calling store name and other admin fields, this post specifically.

I'm creating a module (my first for Magento 2) for my client but want to add an additional field (company registration number) and have it appear in the General > Store Information tab under the VAT number, is this possible? I currently have other fields appear in my own system tab.


texts: 504 Gateway time out error after Cache Flush

texts:
After doing the Cache flush I am getting 504 Gateway time out error and after 5 mins the application is starting otherwise I have to restart the server manually
I deploy my application in AWS.


texts: Mageplaza extension can't be deployed - Use of undefined constant

texts: I'm having trouble deploying a MagePlaza extension (SEO) to my staging environment on Magento Cloud even though it works perfectly fine on my machine. I'm getting this message:


texts: Troubleshooting process for modules which break depending on theme

texts:
I'm struggling with a module (Sphinx Search Ultimate by Mirasvit) I've installed using the Intenso theme.

I can see the module works fine in RWD (a default Magento theme). In Intenso, I can see the Magento block isn't overwritten with the Mirasvit block code.

As a more general question, how can I better troubleshoot theme-specific problems like this, with extensions I install? Is it most likely that the problem is that a block doesn't exist in the layout of the current theme?

I've tried Alan Storm's "CommerceBug" module, but I still can't find what to modify in the theme to make it work "same as RWD".


texts: Bundle product JavaScript errors in console

texts:
My bundled products aren't working properly.

On loading the product page it already goes wrong with the following error in the console:

Uncaught TypeError: Cannot read property 'reloadPrice' of undefined

When i select an option from the drop-down box, the amount field stays grayed out and i get an error in the console (Google Chrome) stating:

Uncaught TypeError Cannot change property of 'changeSelection' of undefined

The HTML from the amount field has the property disabled=""disabled", I guess this is supposed to change on making your selection thus enabling you to change the amount for the selection.


texts: How to get Customer Group collection in frontend customer form in magento2?

texts: i have created custom customer registration form , how  to display customer group in dropdown menu please help me..


texts: I am getting error of page_cache is not writable in magento 2.2.5 in linux os

texts:
I am trying to add a grid in admin side. I am getting this error

Fatal error: Uncaught Zend_Cache_Exception: cache_dir "/opt/lampp/htdocs/magento2.2.5/var/page_cache" is not writable in /opt/lampp/htdocs/magento2.2.5/vendor/magento/zendframework1/library/Zend/Cache.php:209 Stack trace: #0 /opt/lampp/htdocs/magento2.2.5/vendor/magento/zendframework1/library/Zend/Cache/Backend/File.php(180): Zend_Cache::throwException('cache_dir "/opt...') #1 /opt/lampp/htdocs/magento2.2.5/vendor/colinmollenhour/cache-backend-file/File.php(87): Zend_Cache_Backend_File->setCacheDir('/opt/lampp/htdo...') #2 /opt/lampp/htdocs/magento2.2.5/vendor/magento/zendframework1/library/Zend/Cache.php(153): Cm_Cache_Backend_File->__construct(Array) #3 /opt/lampp/htdocs/magento2.2.5/vendor/magento/zendframework1/library/Zend/Cache.php(94): Zend_Cache::_makeBackend('Cm_Cache_Backen...', Array, true, true) #4 /opt/lampp/htdocs/magento2.2.5/vendor/magento/framework/App/Cache/Frontend/Factory.php(157): Zend_Cache::factory('Magento\\Framewo...', 'Cm_Cache_Backen...', Array, Array, true, true, true) #5 /opt/lampp/htdocs/mage in /opt/lampp/htdocs/magento2.2.5/vendor/magento/zendframework1/library/Zend/Cache.php on line 209

I have tried

sudo chmod 777 -R /opt/lampp/htdocs/magento2.2.5/
php bin/magento setup:static-content:deploy -f
sudo chmod 777 -R /opt/lampp/htdocs/magento2.2.5/var/page_cache


texts: Exclude Products with Special Price from Subtotal Calculation in Shopping Cart Price Rule

texts:
I am trying to set up the following shopping cart price rule:

spend 500 dollars or more, receive 100 dollar discount (Fixed amount discount for whole cart).

However, any products with a Special Price should not be included in the subtotal calculation (So for example, $400 of regular priced products and $100 dollar of special-priced products do not trigger the discount). It doesn't look like exact logic can be done in Magento using conditions/actions in the rule.

What kind of customization would be required?


texts: When bulk uploading products via csv, do the columns need to be in a specific order or having the correct column name is good enough?


texts: Magento how to add new select box in product view toolbar section without change .phtml file

texts:
Hi i have a toolbar like below image.

I want to add new "Show" select box like below image.

For this i have added select box code directly into the toolbar.phtml  file. But I don't like to update any existing phtml code. I plan to develop like a extension. So Is any way to do this via layout?

Please give me any suggestion to how to achieve this like extension.


texts: Attribute column admin product grid check if value is larger

texts:
In the adminhtml Grid.php I added this column:

$this->addColumn('import_price',
            array(
        'header'=> Mage::helper('catalog')->__('Import price'),
        'type'  => 'price',
        'currency_code' => $store->getBaseCurrency()->getCode(),
        'width' => '80px',
        'index' => 'import_price',
        ));

That works great, but now I want to display an other column, that checks if the value of the default price is <10 (larger than 10) in comparison with the import_price attribute.

Or is there a better way to see if the default price is higher than 10 in comparison with the import price field?

How can we fix this?


texts: How is a customers information stored during checkout steps?

texts:
I am not a Magento user but I am curious about the platform. I've been looking at a demo store at: http://magento-demo.lexiconn.com/

As a customer fills out the various parts of the registration/checkout form, does it write to the database each time a user clicks "continue"?


texts: How to compare value in the Table rate and display the equivalent Price from Table Rate

texts:
I have a table rate imported and it's rule is Weight vs. Destination. On my onepage checkout I want to check the weight of the total Items ordered over the Table Rates weight and Display the equivalent Price. I want to show the customer the total weight and the corresponding price of the order in the Payment Information prior to Order Review.

Can anyone help me how? I'm not an expert. I just want to know which part on how to do the checking of the total weight over the table rate. Thanks!


texts:
My website is gifting website so I need to let users select the date of delivery.
I want that selection (textbox with calendar popup) on shipping details step.
I can google for a free extension but I need to hear from someone who's already solved that issue.
I also don't want to modify core files.


texts: Which file contains the content of /customer/account/login

texts:
I want to change the content of this page: /customer/account/login

Which file in magento2 is responsible for the this page?

thank you


texts: How to remove validation from address fields in Magento 1.9 on Registration Page.

texts:
I am new to magento and I want to make Street and City fields optional on magento registration page. Can anyone please guide or give any idea that how to do this.
Thank you


texts: Magento multiple address checkout overview

texts:
Actually just want to ask a question about the red highlight part below:

I found that data on

/app/design/frontend/default/myskin/template/checkout/multishipping/overview.phtml
<tfoot>
<?php echo $this->renderTotals($this->getShippingAddressTotals($_address)); ?>
</tfoot>

Is it possible to get each data from that variable? I mean I want to style it in a separate column, not just inside one table.

Thanks


texts:
I need to find the attribute_id values of the attributes image, small_image and thumbnail. I know them for my database - 85, 86 and 87, but I need to make my query dynamic, instead of with hard-coded values. What I struggle with is to find in which table the attributes are stored. I checked catalog_product_attribute but there is no column with the name/code of the attributes.

I need to acquire them as an SQL query, not as Mage::... PHP code.
A sample SQL query code or any other guidance will be very helpful.


texts: How can I change the Order Status in Controller. Magento 2

texts:
I'm trying to change the specific order Order Status. for that I tried.

<?php
namespace Vendor\Module\Controller\Index;

use Magento\Framework\App\Action\Action;
use Magento\Framework\App\Action\Context;
use Magento\Framework\App\ResponseInterface;
class Index extends Action
{
/**
    * @var \Magento\Framework\Controller\Result\JsonFactory
    */
   protected $resultJsonFactory;
   protected $_orderRepository ;
   public function __construct(
       Context $context,
       Magento\Sales\Model $orderRepository,
       \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory
   ) {
       parent::__construct($context);
       $this->resultJsonFactory = $resultJsonFactory;
       $this->_orderRepository = $orderRepository;
   }    /**
    * Dispatch request
    *
    * @return \Magento\Framework\Controller\ResultInterface|ResponseInterface
    * @throws \Magento\Framework\Exception\NotFoundException
    */
   public function execute()
   {
       $orderid = 256076;
       $_order = $this->_orderRepository->getById($orderId); // it order is not order increment id
       $_order->setStatus('pending')->setState('pending');
       $_order->save();
    }
}

but this give me an error which is Exception #0 (RuntimeException): Class Magento\Sales\Model does not exist How can I change The Order Status from Pending to Processing and every other order status?


texts: How to put a 'select' text inside a dropdown in the admin section? Magento2

texts:
I have a form in the admin section that has a phone numbers dropdown. This dropdown is pulling its values from a phone number table.
I added a 'Select--' to the first option of the dropdown so the field is optional and the admin does not have to select a phone number.
The issue is when saving this form its saving it to a table that has a foreign key to the phone numbers table. It is complaining when the 'Select--' option is chosen that a constraint is being violated.
This field in the database in nullable. So I tried setting the value to null, but its still complaining. This is the code for the dropdown

$alloptions = [];
    $alloptions[] = ["value" => null, "label" => __('Select--')];
    foreach ($tableData as $option) {
        $alloptions[] = ["value" => $option['id'], "label" => __($option['area_code']) . __($option['phone_number'])];
    }

    $this->options = $alloptions;

    return $this->options;

This is the error I am getting

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (tablename`, CONSTRAINT `FK_D911C644707AC9D3D31C6B88FC337282` FOREIGN KEY (`phone_number_id`)

What is the best way to go about keeping the relationship constraint but still allowing for it to be optional to the admin?


texts: Magento2.1: How to override the template in custom module?

texts:
I want to create an extension that will give shop owners ability to edit their product image. So I understand I need this template
Magento/ProductVideo/view/adminhtml/templates/helper/gallery.phtml

I have tried the following guide http://devdocs.magento.com/guides/v2.1/frontend-dev-guide/templates/template-walkthrough.html with no success.

How can I extend this template in my extension? What are my options?