texts: Segment customers by coupon code used on checkout & automatically update MailChimp list

texts:
We'd like to automatically populate MailChimp lists based on the coupon code new subscribers enter at checkout.

Currently, through MageMonkey, subscribers are automatically added to a master email list in MailChimp. We would like to add them to this list AND to another list based on the coupon code they enter. New subscribers who use a coupon code on checkout would therefore be added to two lists automatically.

I doubt this is part of the core functionality of Magento, but is anyone aware of an extension that will do this?


texts: Want to Migrate to Magento from Opencart!

texts:
We have hired some developers to create a online store for our products, and they have suggested us to go with Opencart. But I researched on Google that Magento is better than Opencart but they are asking us to pay almost double for Magento Development. Is it possible to migrate to Magento from Opencart after sometime once We start getting gud no of orders after a year or two. Is it okay to Migrate to Magento. Also, please confirm if using Opencart is a gud Idea instead of Magento.

Thanks in advance !!


texts: How to ovveride a block in custom module?

texts:
I want to override the Catalog module. So I created my first custom module,

I initiated it in app/etc/modules/MyCompany_Catalog.xml:

<?xml version="1.0"?>
<config>
    <modules>
        <MyCompany_Catalog>
            <active>true</active>
            <codePool>local</codePool>
        </MyCompany_Catalog>
    </modules>
</config>

Then In app/code/local/MyCompany/Catalog I created Block,Controllers,etc folder.

In etc/config.xml as I want to override Configurable.php:

<?xml version="1.0"?>
<config>
    <modules>
        <MyCompany_Catalog>
            <version>0.1.0</version>
        </MyCompany_Catalog>
    </modules>
    <global>
        <blocks>
            <catalog>
                <rewrite>
                    <product_view_type_configurable>MyCompany_Catalog_Block_Product_View_Type_Configurable</product_view_type_configurable>
                </rewrite>
            </catalog>
        </blocks>
    </global>
</config>

In Controllers/IndexController.php :

<?php

class MyCompany_Catalog_IndexController extends Mage_Core_Controller_Front_Action
{

}
?>

And Finally In Block\Product\View\Type\Configurable.php :

<?php
class Shore_Catalog_Block_Product_View_Type_Configurable extends Mage_Catalog_Block_Product_View_Type_Configurable
{
    protected function _prepareOldPrice($price, $isPercent = false)
    {
        $price = 0;  // Ramya
        if ($isPercent && !empty($price)) {
            //$price = $this->getProduct()->getPrice() * $price / 100;
        }

        return $this->_registerJsPrice($this->_convertPrice($price, true));
    }
}
?>

But I didn't find the change applied. I found it to work when I changed it in base as a try. But as it not a good practice to edit I created a custom module. But it is not working here. Kindly correct me If I was wrong in my above steps.


texts: Increase the Limit of Magento Cross-sell products

texts:
I am using the latest magento version which is 1.9.0.1.

I have followed the following instructions to increase the limit of cross-sell products but something seems to be wrong here. Any help would be highly appreciated. You can find the original post over here as well
How to Increase the Number of Crosssell Items in Cart?

But my code is written below here:

Crosssell.php in the directory app/code/local/TestingMod/Checkout/Block/Cart:

class TestingMod_Checkout_Block_Cart_Crosssell extends Mage_Catalog_Block_Product_Abstract
{

//     /**
//      * Items quantity will be capped to this value
//      *
//      * @var int
//      */
//     protected $_maxItemCount = 100;

//     /**
//      * Get crosssell items
//      *
//      * @return array
//      */

public function getItemCount()
{
         return count($this->getItems());
}

public function getItems()
{
    $items = $this->getData(\'items\');
    if (is_null($items)) {
        $items = array();
        $ninProductIds = $this->_getCartProductIds();
        if ($ninProductIds) {
            $lastAdded = (int) $this->_getLastAddedProductId();
            if ($lastAdded) {
                $collection = $this->_getCollection()
                    ->addProductFilter($lastAdded);
                if (!empty($ninProductIds)) {
                    $collection->addExcludeProductFilter($ninProductIds);
                }
                $collection->setPositionOrder()->load();

                foreach ($collection as $item) {
                    $ninProductIds[] = $item->getId();
                    $items[] = $item;
                }
            }

            if (count($items) < 100) {
                $filterProductIds = array_merge($this->_getCartProductIds(), $this->_getCartProductIdsRel());
                $collection = $this->_getCollection()
                    ->addProductFilter($filterProductIds)
                    ->addExcludeProductFilter($ninProductIds)
                    ->setPageSize(100-count($items))
                    ->setGroupBy()
                    ->setPositionOrder()
                    ->load();
                foreach ($collection as $item) {
                    $items[] = $item;
                }
            }

        }

        $this->setData(\'items\', $items);
    }
    return $items;
}
}

app/code/local/TestingMod/Checkout/etc in config.xml:

<?xml version="1.0"?>
 <config>
<modules>
    <TestingMod_Checkout>
        <version>1.0</version>
    </TestingMod_Checkout>
</modules>
<global>
    <blocks>
        <checkout>
                <rewrite>
                    <cart_crosssell>
                        TestingMod_Checkout_Block_Cart_Crosssell
                    </cart_crosssell>
                </rewrite>
        </checkout>
        <testingmod_checkout>
            <class>TestingMod_Checkout_Block</class>
        </testingmod_checkout>
    </blocks>
</global>

app/etc/modules in TestingMod_Checkout.xml:

<?xml version="1.0"?>
<config>
<modules>
    <TestingMod_Checkout>
        <active>true</active>
        <codePool>local</codePool>
    </TestingMod_Checkout>
</modules>

app/design/frontend/default/mytheme/layout/ in checkout.xml:

<?xml version="1.0"?>
<reference name="content">
    <block type="testingmod_checkout/cart_crosssell" name="checkout.cart.crosssell" as="crosssell" template="checkout/cart/crosssell.phtml"/>
</reference>


texts: Permission Denied htaccess in folders where no htaccess file even exists

texts:
This permissions issue comes up in the server log. It doesn't stop the site from loading but it does stop a lot of the site from functioning. Some things I did fix through permissions but things like this keep popping up and I'm not sure if it is an Apache thing with rewrites or if this is a permissions issue. There's not supposed to be a htaccess file in this folder correct?

  /pub/static/adminhtml/Magento/backend/en_US/mage/utils/.htaccess
  pcfg_openfile: unable to check htaccess file, ensure it is readable
  and that ... is executable

also errors for:

Magento_Paypal/
Magento_Braintree/
Magento_Ui/js/lib/ko/extender/
frontend/Magento/luma/en_US/Magento_Ui/js/lib/
frontend/Magento/luma/en_US/Magento_Ui/js/core/renderer/

I've gone all the way to 777 on files and folders in /en_US/ just to test and still same issue

What steps should I take to narrow this issue down? What permissions does pub/static/ need in order to function? Also, if a mod_rewrite issue, how can I enable this for the root magento directory without doing in the httpd.conf file? When I look for mod_rewrite, I am not having any luck finding a way to ensure it is in fact enabled and working.

I have

PHP 5.6.15
Apache 2.4.16
Easy::Apache v3.32.5 rev 9999
MySQL 5.6.27
Magento 2.0.0-rc.

httpd.conf directory setting:

AllowOverride All
Options All

Options All
AllowOverride All
Require all granted

AllowOverride All
Options All
Require all granted


texts:
When does the installer scripts run? Is there a function checking for new versions of extensions and installer scripts every time Magento loads?
The question is both for the exact time and place of the version update/install process and the subsequent installer script if present for a module.


texts: Magento 1.9: SOAP API Inventory Item Update not updating the all data

texts:
I am trying to update the Stock data,Using SOAP V1, but many values are not updating.

$stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product);
$stockItemData = array(
    'qty' => $qty,
    'is_in_stock' => $product->getIsInStock(),
    'manage_stock' => $stock->getManageStock(),
    'use_config_manage_stock' => $stock->getUseConfigManageStock(),
    'min_qty' => $stock->getMinQty(),//not updated
    'use_config_min_qty' => $stock->getUseConfigMinQty(),//not updated
    'min_sale_qty' => $stock->getMinSaleQty(),//not updated
    'use_config_min_sale_qty' => $stock->getUseConfigMinSaleQty(),//not updated
    'max_sale_qty' => $stock->getMaxSaleQty(),//not updated
    'use_config_max_sale_qty' => $stock->getUseConfigMaxSaleQty(),//not updated
    'is_qty_decimal' => $stock->getIsQtyDecimal(),//not updated
    'backorders' => $stock->getBackorders(),//not updated
    'use_config_backorders' => $stock->getUseConfigBackorders(),//not updated
    'notify_stock_qty' => $stock->getNotifyStockQty(),//not updated
    'use_config_notify_stock_qty' => $stock->getUseConfigNotifyStockQty(),//not updated
    'stock_status_changed_auto' => $stock->getStockStatusChangedAuto(),//not updated
    'use_config_qty_increments' => $stock->getUseConfigQtyIncrements(),//not updated
    'qty_increments' => $stock->getQtyIncrements(),//not updated
    'use_config_enable_qty_inc' => $stock->getUseConfigEnableQtyInc(),
    'enable_qty_increments' => $stock->getEnableQtyIncrements(),//not updated
    'is_decimal_divided' => $stock->getIsDecimalDivided(),//not updated
    'type_id' => $stock->getTypeId(),
    'stock_status_changed_automatically' => $stock->getStockStatusChangedAutomatically(),//not updated
    'use_config_enable_qty_increments' => $stock->getUseConfigEnableQtyIncrements()
);
$proxy->call($sessionId, 'product_stock.update', array($product->getId(), $stockItemData));

I have checked, all  the passed values, and its correct,and even tried to pass static value to test, but not worked.
Please help.


texts:
I sometime get Store Debug Information saying some attempted access to install.php.
Is is better to delete/rename install.php?

URL: http://mywebsite.com/install.php
IP Address:
Time:
Error:

Trace:
#0 /app/code/core/Mage/Core/Model/App.php(861): Mage_Core_Model_App->throwStoreException()
#1 /app/code/core/Mage/Core/Model/App.php(502): Mage_Core_Model_App->getStore()
#2 /app/code/core/Mage/Core/Model/App.php(285): Mage_Core_Model_App->_initCurrentStore('default', 'store')
#3 /app/Mage.php(616): Mage_Core_Model_App->init('default', 'store', Array)
#4 /install.php(129): Mage::app('default')
#5 {main}


texts:
I want to change Bar Icons to Close Icon on hamburger menu, when it's expanded

Like in below images , menu is expanded and still there are menu bars on right top. I want to change that into close icon.

Any help will be appreciated.


texts: When is Magento CE 1.9.2 going to be released?

texts:
What is the release date for Magento Community Edition 1.9.2?

In Magento's official post they say it will be released in "the next few weeks", which is kind of vague. Does anyone know a (unofficial) release date?

Magento EE 1.14.2 is already available and I've seen that all the latest security patches are already in there. We've updated all our current running EE 1.14.1 development projects to 1.14.2 already and also want to do so for our 1.9.1 CE projects as soon as possible.

UPDATE:
CE 1.9.1.1 was released on May 1st and contains the latest patches. Still my question remains


texts: Set VAT fields in customer registration with checkout

texts: I want to fill all the VAT fields of a customer after the customer registers ( i guess an event that i can hook into). But i need to know how i can manually get the VAT value the customer fills in and save it in all the other VAT fields (like user details etc)


texts: Magento 2.2 adminside products edit getting error

texts:
After Data migration from Magento 1.9.1.1 to 2.2  admin side products edit getting the error.

Warning: Invalid argument supplied for foreach() in /var/www/html/new/vendor/magento/module-catalog-inventory/Helper/Minsaleqty.php on line 203


texts:
I am trying to get contents in login observer, however I always get null. What am I doing wrong?

namespace Custom\Module\Observer;

use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\App\ObjectManager;

class CustomerLoginAfter implements ObserverInterface
{
    protected $checkoutSession;
    protected $cart;

    public function __construct(\Magento\Checkout\Model\Session $checkoutSession, \Magento\Checkout\Model\Cart $cart)
    {
        $this->checkoutSession = $checkoutSession;
        $this->cart = $cart;
    }

    public function execute(Observer $observer)
    {
        $quoteItemsAll = $this->checkoutSession->getQuote()->getAllItems();
        echo count($quoteItemsAll);
    }

}


texts: Error in developing magento 2.2 theme (Warning: DOMDocument::loadXML(): ...)

texts:
config:
php 7.0.22

mamp 4.2

Magento-2.2.2 without sample data

localhost running.

Hello!
Currently I'm trying to learn how to develop a custom theme for magento, i followed the following steps :  http://devdocs.magento.com/guides/v2.2/frontend-dev-guide/themes/theme-create.html

My theme folder structure:

magento/app/design/frontend/Guilherme/guitheme/ ---> root dir

guitheme/composer.json

{
 "name": "Guilherme/guitheme",
 "description": "guitheme",
 "require": {
   "php": "~5.5.0|~5.6.0|~7.0.0",
   "magento/theme-frontend-blank": "100.0.*",
   "magento/framework": "100.0.*"
 },
 "type": "magento2-theme",
 "version": "1.0.0",
 "license": ["OSL-3.0","AFL-3.0" ],
 "autoload": {
   "files": [
     "registration.php"]} }

guitheme/etc/view.xml

<image id="category_page_grid" type="small_image"><width>240</width<height>300</height></image>

guitheme/registration.php

<?php
   \Magento\Framework\Component\ComponentRegistrar::register(
   \Magento\Framework\Component\ComponentRegistrar::THEME,
   'frontend/Guilherme/guitheme',
   __DIR__
   );
   ?>

guitheme/theme.xml

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
        <title>guitheme</title>
        <parent>Magento/blank</parent>
        <media>
            <preview_image>media/logoimage.jpg</preview_image>
        </media>
</theme>

after that, i run the CLI command: setup:upgrade
and i receive the following error:

Warning: DOMDocument::loadXML(): Specification mandate value for attribute n in Entity, line: 3 in /Applications/MAMP/htdocs/magento/vendor/magento/framework/Config/Theme.php on line 75

and i cant acess my localhost/magento/admin page anymore, but if i remove my created theme i can.

someone have any ideia?
Thanks!


texts:
I found this in totals.phtml file: $_total->getStrong()

What does it do?

totals.phtml file:

<?php foreach ($this->getTotals() as $_code => $_total): ?>
    <?php if ($_total->getBlockName()): ?>
        <?php echo $this->getChildHtml($_total->getBlockName(), false); ?>
    <?php else:?>
    <tr class="<?php echo $_code?>">
        <td colspan="6" <?php echo $this->getLabelProperties()?>>
            <?php if ($_total->getStrong()):?>
            <?php echo $this->escapeHtml($_total->getLabel());?>
            <?php else:?>
            <?php echo $this->escapeHtml($_total->getLabel());?>
            <?php endif?>

        <td <?php echo $this->getValueProperties()?>>
            <?php if ($_total->getStrong()):?>
            <?php echo $this->formatValue($_total) ?>
            <?php else:?>
            <?php echo $this->formatValue($_total) ?>
            <?php endif?>

    <?php endif?>
<?php endforeach?>


texts: Get all orders of customer using customer's token in Magento 2 API

texts:
I want all orders of customer using customer's Token in Magento API.

Which gives the list of all previous orders of the customer.

This API provides me the cart products of specific customer using customer's Token.

http://<magento-host>/rest/V1/carts/mine

Authorization :: Bearer <Customer Token>

Thanks in advance!


texts: Magento 2 : Notice: Undefined offset: 2 in vendor/magento/framework/Encryption/Encryptor.php on line 588

texts:
I am facing this error after a move to new server Magento customer login

{"0":"Notice: Undefined offset: 2 in /www/web/demo/vendor/magento/framework/Encryption/Encryptor.php on line 588"

PHP Version is the same: PHP Version 7.2.24-he.0

Sodium from Frank Denis

What can I do to solve this?

Thanks In advance..!


texts: Magento 2 prevent merge of items when same options on Paypal Review Page

texts:
I have Paypal express checkout. On the PayPal review page when changing shipping methods, it's a merged item if the same product is with the same Color and Size. But on the cart page, it's different.
I have tried this Magento 2 disable merge items into the cart but when changing the shipping method this solution is making price 0 for configurable products.
please help me.


texts: Pop up on product page to related articles

texts:
Cant find a solution to my problem so I'm gonna try ask in here.

My shops have a blog function, where we almost daily post articles.
Now we want to lead our users to these articles.

And the idea is we want to have a pop up/slid ind/ notice block when you are on a product. that lead to a related article.

I know its complicated, and can have a lot of manuel work. But thats how the big boys want it here.

Do you have eny idea?


texts: How to set up multistore and multilanguage configuration?

texts:
I want to setup up two stores on one installation. Both stores shall be available in English and German.

I want them to be available at the following example urls:

Store: Engineering (German: Maschinenbau)
English Store View: https://www.example.com/engineering/en/
German Store View: https://www.example.com/maschinenbau/de/
Store: Industry (German: Industrie)
English Store View: https://www.example.com/industry/en/
German Store View: https://www.example.com/industie/de/

Via Stores -> Configuration -> General -> Web I selected each of the four store views and entered the aforementioned URLs in the Base URL and Base Link URL input fields.

The problem is: Now the frontend is broken. No matter what url I enter it always returns a 404. The 404 page comes as plain html, no css is applied.

I furthermore have a question: When I enter https://www.example.com it currently redirects me to the first store view https://www.example.com/engineering/en/. What do I have to change if I want to remain on https://www.example.com/ and get a page that lets the customers select between the two stores: Engineering and Industry?


texts:
My handle is av_paginator_result

It's for ajax request and it should echo some short result.

<layout version="0.1.0">
<av_paginator_result>
        <block type="catalog/product_list" name="root" output="toHtml" template="av/paginator/catalog/product/list.phtml">
            <block type="catalog/product_list_toolbar" name="product_list_toolbar">
                <block type="page/html_pager" name="product_list_toolbar_pager"/>
            </block>
            <action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
            <action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></action>
            <action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>4</count></action>
            <action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action>
            <action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action>
            <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
        </block>
    </av_paginator_result>
</layout>

I created an observer (controller_action_layout_generate_blocks_after) which is catched by post request:

$moduleName = Mage::app()->getRequest()->getModuleName();

        if (Mage::app()->getRequest()->isPost() && in_array($moduleName, array('catalogsearch', 'catalog')))
        {
            $layout =  Mage::app()->getLayout();
            $update = $layout->getUpdate();

            Mage::app()->getLayout()->getUpdate()->resetHandles();

            $update->load('av_paginator_result');
            $layout->generateXml();
            $layout->generateBlocks();

            $products = array();

            $page = Mage::app()->getRequest()->getPost('page', 1);

            $root = $layout->getBlock('root');

            $product_list_toolbar = $root->getToolbarBlockName();

            if ($toolBar = $layout->getBlock($product_list_toolbar))
            {
                Mage::app()->getRequest()
                    ->setParam($toolBar->getPageVarName(), (int) $page);

                $output = $layout->getOutput();
                print $output;
            }
            exit;
        }

All these codes work good but if I turn Layout Cache on it doesn't. It always try to generate whole category page, not just a part. Why?


texts: Configurable product details + API (REST or GRAPHQL) + magento 2

texts:
How to change attribute selection wise product information like price and image for configurable product and combination attribute also using API.
Get configurable product details using below API
{
  products(filter: { url_key: { eq: "test_product" } }) {
    items {
      id
      attribute_set_id
      name
      sku
      __typename
      price_range{
        minimum_price{
          regular_price{
            value
            currency
          }
        }
      }
      ... on ConfigurableProduct {
        configurable_options {
          id
          attribute_id
          label
          position
          use_default
          attribute_code
          values {
            value_index
            label
          }
          product_id
        }
        variants {
          product {
            id
            name
            sku
            attribute_set_id
            ... on PhysicalProductInterface {
              weight
            }
            price_range{
              minimum_price{
                regular_price{
                  value
                  currency
                }
              }
            }
          }
          attributes {
            label
            code
            value_index
          }
        }
      }
    }
  }
}

Any one idea about this? Can anyone help me on this?


texts:
Hope some of your clever magento guys can help me :)

I have a custom plugin with a mobil case designer - when an order is placed and the payment are registered, cron should automaticly send this designed case to a printmanager.

In my cpanel i have a cron job that activates cron.php - but nothing happens to the order, it will not send it throug. But it will send it through if I manually activate cron.php in my browser?? Why and what can I do? I have been in touch with my hosting, and the log says it activates the cron.php like it should


texts:
I am using Magento EE 1.14.2, In that Admin panel, created a Catalog price rule and saved. Then I clicked the save and Apply button to apply the price rule for the products.

The screen was loading  for 5 minutes, finally it said, "Unable to Apply the rules".

Can anyone let me know , what is the issue and how can we fix it.

Awaiting for your valuable reply.


texts:
I want to override MSP_ReCaptcha module to change the view and add some messages, I already tried this but no clue :

ap/design/frontend/company/theme/MSP_ReCaptcha/view/frontend/templates/msp_recaptcha.phtml

But this is not working, did I miss something?

The actual package is : vendor/msp/recaptcha/view/frontend/templates/msp_recaptcha.phtml


texts: How Add checkout form in each product page in magento?

texts:
I need to add the checout form on individual product page like this site

http://www.symbios.pk/nokia-lumia-925

No need to have cart or the default mangento checkout page, user will checkout for individual product, from the respective product page by filling all respective details.

Is it possible in magento.
other example is in snapshot attached.


texts: Display custom attribute in Product page

texts:
An extension help me to display the delivery time as attribute in product page

(its above the price, but is´s look like... )

How to display the attribute under the " Auf die Wunschliste   Auf Lager"


texts: through image name stored in database display image in custom tab in admin grid in magento2

texts:
hello everyone I want to display the image through image name in a custom tab in admin grid image name is coming but now I want to display the image  code to display the image name
info.php

 $fieldset->addField(
        'image',
        'text',
        [
            'name'        => 'image',
            'label'    => __('image'),
           'required'     => true,

        ]
    );

through this code image name is coming now i want to display the image


texts: Url parameter in magento 2 collection filter

texts:
I need to filter Magento 2 custom grid model collection by URL parameter. I have used this below code.
protected function _initSelect() {

        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $request = $objectManager->get('Magento\Framework\App\Request\Http');
        $seller_id = $request->getParam('seller_id');

        $this->addFilterToMap('increment_id', 'main_table.increment_id');
        $this->addFilterToMap('status', 'main_table.status');
        $this->addFilterToMap('seller_id', 'main_table.seller_id');
        $this->addFieldToFilter('seller_id', ['eq' => $seller_id]);
        $this->getSelect()->joinLeft(
            ['secondTable' => $this->getTable('sales_order_grid')], //2nd table name by which you want to join mail table
            'main_table.order_id = secondTable.entity_id', // common column which available in both table
            '*' // '*' define that you want all column of 2nd table. if you want some particular column then you can define as ['column1','column2']
        )->group('main_table.order_id');
         //$this->addFieldToFilter('main_table.seller_id', ['eq' => '39']);

        parent::_initSelect();
        // var_dump($this->getSelect()->__toString());
        // exit;

        return $this;
    }

When I log this seller_id it is showing by when I pass in filter not working. it is working when I pass a static value. I'm not sure how to filter a collection by param in the model.


texts: Best Practice: When should I put requireJs into a separate file?

texts: This is somewhat silly but I keep encountering extensions who vary on putting requireJS into a separate file vs inlining it. I usually decouple things where possible. Is it fair to say the JS should be separated when it is not dependent upon the component and/or base it upon chances of the JS being reused for other components?


texts: Catalog rules not visible on cart/checkout after 2.3 upgrade

texts:
I have catalog rules applied across my website for specific customer groups. I also have tax disabled for those customer groups (B2B customers).

The catalog rules are working fine on the catalog and product views, but when a customer adds a product to their cart, they get the full pricing without catalog rules applied, and they also have tax applied. It is as if the customer is no longer logged in to their customer group, but if I go back to the catalog view, the discount price is clearly visible.

We recently upgraded to 2.3 CE. Everything was working fine on our previous 2.1 installation.

I have emptied index tables and completely reindexed everything. I have "Applied Rules" a number of times. Cleared all cache, cleared FPC, etc.

Any ideas for where I should look to resolve this? Thanks!


texts:
Please advice if there is a way to output in more pretty look MFTF execution in console. With comments, indentations, colors and other stuff.

When I executed magento tests sometimes this magic happened. How to do that?

Upd 1.

  /var/www/magento$ vendor/bin/mftf run:test MyTestNameTest -r


texts:
I want to get block name from where price.phtml called.Also I cant find block name from catalog.xml.I fount this function but I don't know block name for this.

<?php echo $this->getPriceHtml($_product); ?>


texts: Sessions adding up to ~256MB+ per day, is this too much and if so can it be prevented?

texts:
On of Magento sites is currently building up sessions files fairly fast and I'm having to clear it once or twice a day just to be safe. The reason for this is because I put sessions in RAM which means if the space gets full then you can no longer create sessions and therefore not add items to cart / login etc.

I've now expanded this space to 256MB (before it was 64MB) but it just keeps filling up.

Traffic is around 2k-5k a day however I think the problem may actually lie in robot spiders scanning the site.

Is there a way to check this and potentially stop it if it is indeed the case or alternatively find out  what is the cause of so many sessions?

Specs:

Magento 1.9.1
Nginx
Running on AWS EC2 instance
15GB RAM


texts: How to change details.phtml file under addto.phtml file or we wants to change the design in magento2 product view page.


texts: How we secure Magento GraphQL. Its working without Authorisation Token

texts:
How I can secure our Magento End Point Url. I'm able to create new category and customer without passing the authorisation token.
Can we secure all GrphQl APIs?


texts: What is catalog_product_link_attribute_int used for in Magento v1.9?

texts:
The table catalog_product_link_attribute_int is huge in a couple of stores I have built.

A store with 1600 products has this table at 771MiB in which is over 10x the size of the next largest table. It makes the store awkward to backup or migrate and it can't be normal. On other sites it's usually around 50kb but on at least one other site it is over 700Mib.

Is this table safe to truncate? What does it actually do?


texts: Magento 2.2.x admin config, multiple times

texts:
I have a question, does anyone know if it is possible to add an admin config field to each payment method without declaring it for each system config section separately?

For example, I have an admin config field. I would like to make it dynamic, meaning that whenever a new payment method appears - that admin config would appear right in the new payment method settings section.

Thank you.


texts: (Pre-installation) ownership and permissions problems (CentOS / NGINX)

texts:
This is my first time installing Magento and I feel quite stupid getting stuck so early in the proces. I followed the official documentation to install Magento 2.3 by the book.

Fresh CentOS 7 installation on a dedicated VPS, only using root
Using the official documentation: https://devdocs.magento.com/guides/v2.3/install-gde/prereq/nginx.html
Installed NGINX, configured and well
Installed MySQL, configured and well
Installed PHP 7.1.24 (Webtatic), configured and well
Succesfully tested a phpinfo-page to make sure NGINX and PHP-FPM are working properly
Created a composer project (/usr/share/nginx/html/magento2) without any problems
Set the file permissions like described in the offical documentation
Installed Magento without any problems
Opened a browser. Error 500.

When I check my NGINX logs there's all kind of different permission-related PHP fatal errors like "Can't write file", "Class did not generate properly" and "Directory permission is read only". Example:

2018/12/20 15:08:23 [error] 16213#0: *7 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Zend_Cache_Exception: cache_dir "/usr/share/nginx/html/magento2/var/page_cache" is not writable in /usr/share/nginx/html/magento2/vendor/magento/zendframework1/library/Zend/Cache.php:209
Stack trace:
#0 /usr/share/nginx/html/magento2/vendor/magento/zendframework1/library/Zend/Cache/Backend/File.php(180): Zend_Cache::throwException('cache_dir "/usr...')
#1 /usr/share/nginx/html/magento2/vendor/colinmollenhour/cache-backend-file/File.php(87): Zend_Cache_Backend_File->setCacheDir('/usr/share/ngin...')
#2 /usr/share/nginx/html/magento2/vendor/magento/zendframework1/library/Zend/Cache.php(153): Cm_Cache_Backend_File->__construct(Array)
#3 /usr/share/nginx/html/magento2/vendor/magento/zendframework1/library/Zend/Cache.php(94): Zend_Cache::_makeBackend('Cm_Cache_Backen...', Array, true, true)
#4 /usr/share/nginx/html/magento2/vendor/magento/framework/App/Cache/Frontend/Factory.php(156): Zend_Cache::factory('Magento\\Framewo...', 'Cm_Cache_Backen...', Array, Array, true, tr" while reading response header from upstream, client: ip.ip.ip.ip, server: server.com, request: "GET / HTTP/1.1", upstream$

I chmodded the whole Magento-directory to 777 (-R), but to no avail.
I chowned from root:root to nginx:nginx, but to no avail.

When troubleshooting online I only read suggestions about apache users and www-data users, but I don't use Apache and I don't use Ubuntu.

What are the correct permissions for a pure CentOS 7 / NGINX setup?

Thanks :$


texts: product.info block does not move in magento 2

texts:
product.info block does not move in my custom container in catalog_product_view.xml file
I have try

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

<referenceContainer name="content">
    <container name="product.test" htmlTag="div" htmlClass="product-test" >
    </container>
</referenceContainer>

But not working.

I have try

<move element="product.info.review" destination="product.test" after="-"/>

This is work perfect.

Thanks.


texts:
I'm looking for a way to get magento quote created time, My goal is to get the quote created time & set 10 min timer , if customer checkout while 10min other wise i'll clear the cart items. Timer will refresh back to 10 min upon each new item inserted into cart.

Thanks in advance.


texts: Magento 2 How to disable newsletter subscription success email

texts:
In Magento 2 how to disable newsletter subscription success email.

Newsletter subscribers after providing email address the address to added to mail newsletter management provider and they will verify the email address.

so i do not want to send any welcome or thank email from magento store.

how to stop sending the thank you for subscription email to subscribers?


texts: Cart page doesn't show the product image

texts:
My checkout cart page doesn't show the product images, I checked the pub/media/catalog/product/cache folder and the image via browser inspector, but they are never the same as you can see in the image below.

  I already removed all the third-party modules and my custom theme.

I checked in the database and the route is right, just the generated cache folder is wrong.
I changed this admin option too, but nothing changed.

The original code below gets the wrong image, but when I changed the cart_page_product_thumbnail to category_page_grid it worked.

<?= $block->getImage($block->getProductForThumbnail(), 'cart_page_product_thumbnail')->toHtml() ?>

How could I fix it?


texts: Payment processes, but order doesn't show up in backend?

texts:
When somebody checks out on our store (options are Paypal or Credit Card) they get a receipt from the gateway and a more detailed invoice from Magento. We're copied on both.

About a month ago, in the midst of some other perfectly normal orders, we got a PayPal receipt for an order that didn't appear in Magento. We assumed this was a clever con, but after logging into Paypal, the transaction was in there - and the receipt included the line items, passed over from Magento. It just didn't exist anywhere in the Magento backend.

This seemed odd but it only happened once, so we moved on with our lives and adjusted the stock levels manually.

Today, the same thing has happened - but this time the customer has checked out using CC, and the merchant gateway receipt doesn't include the order line items. We can see the receipt mailed out to the customer from our gateway, we can see the money in our account, but there's no trace of it in Magento - which means we don't know what they actually bought.

We can just email them and ask, but it's a pretty bad look. Any guesses what's happening here? Have you ever witnessed similar behaviour, or is there something I can do to debug?

This time tomorrow I'll be able to check if it has tracked into Google Analytics, which will tell me if the customer made it to the "order confirmed" screen on our site. When it was just Paypal I thought maybe they hadn't returned to the site (although I think Magento creates the order when you hit submit, not after you return from Paypal). The CC gateway is integrated into the checkout flow, so they would never have even left the site.

This question has been asked before here by someone else but was closed as off topic. The issue isn't reliably reproducible, but I still think it'd be useful to future readers to discuss what might cause this - even if we can't nail down the exact cause. And I'm certain that (unless I change something) it will happen again.

Appreciate any tips!

In my case (upgrading to 2.1.0 from 2.0.7), a column was missing from the sales_invoice_grid table.  I tracked it down by looking at the system.log in [magentoRootDirector]/var/log.  The following message was logged there (with a very long query after it); Column not found: 1054 Unknown column 'base_grand_total' in 'field list'.  I was able to track the table down that was missing the column by copying the query and trying to run it in MySql Workbench.  It also popped up when clicking on sales/invoices in the admin console.  The following message was shown there; Notice: Undefined index: base_grand_total in /var/www/public/vendor/magento/module-sales/Ui/Component/Listing/Column/Price.php on line 55.  After adding the column in sales_invoice_grid, orders are now processing correctly.  There is now the issue that magento is trying to retrieve the IPN from paypal but erroring out because the order doesn't exist, but that isn't hindering new orders.


texts: How re-indexing process is works in Magento 2 if new product is added?

texts:
If i have 1 lakh product in my store and i have re-index in Magento 2.
And i have added 50 more product in my store.
so if it is just re-index all the product from starting or just re-index the updated one.
Any help is appreciated.


texts:
I often see people mention they use the compiler feature of Magento.

I do never and wonder, which cases you should use it and how much performance gain you have then.

[DISCLAIMER]:
As I got an edit suggestion about this recently. This question is not about the magento2 di-compile, its not even slightly about magento2.


texts: I'm using magento 1.9 and importing products to system, but noticed strange thing: if product have over 5 images then I have problems to upload csv file, when I leave only 5 or less images (links) than file uploads normally and everything works fine. Any idea what it is?


texts: I have successfullly installed magento2.4  but when i am running my URL in Browser then i am facing this type of issue.


texts: Does Magento FPC treat Customer Groups differently?

texts:
Using M1 at the moment with Varnish for FPC, we always had an issue where Prices would get cached by the first Customer Group that would view a page.

For example, if a Wholesale Customer loaded a product, they would see their lower price. And then if a Retail Customer loaded the same page moments later, they would also see the lower price instead of theirs.

I know you can configure Varnish to account for that, but it was so un-user-friendly to get it right.

So I was wondering, if that will happen with the M2 FPC as well, or if Magento have already accounted for that?


texts: How to extend a core Helper vs. copying to local

texts:
I have extended a Magento core class (i.e. Model) but am not sure how to extend a core Helper.  The documentation varies and I have not found anything that works.

Currently I want to extend this Helper class:

app/code/core/Mage/Catalog/Helper/Category.php

And the "hack" (though perfectly legal) is to copy the entire class to here:

app/code/local/Mage/Catalog/Helper/Category.php

I would, however, prefer to EXTEND that class so my code was more portable, so I had this file:

app/code/local/Mycompany/Catalog/Helper/Category.php

with this class:

class Mycompany_Catalog_Helper_Category extends Mage_Catalog_Helper_Category{
    .. etc..
}

How would I do this?

By the way, irritatingly enough, there appears to be a great tutorial on this but the critical XML information is missing!!  If anyone can fill that in and post here, I'll back-reference it for everyone's benefit:

https://www.thirdandgrove.com/extending-magento-core-classes


texts: Force quote_address instead of customer address when browser is refreshed Magento 2

texts:
I am having hard time understanding how below code is getting shipping address data for display on checkout/#payment page. It displays correct address when we go from shipping to payment page but switches to the 1st address from user's address book when hit refresh on the payment page. I understand that the user addresses are coming from DefaultConfigProvider(vendor/magento/module-checkout/Model/DefaultConfigProvider.php) which is ultimately getting it from customer repository(customer_address_entity) table. My requirement is to display quote_address not the customer address even when browser has been refreshed knowingly or unknowingly.

<!-- ko foreach: getRegion('ship-to') -->
    <!-- ko template: getTemplate() -->
    <!--/ko-->
<!--/ko-->

Any help is greatly appreciated since I spent bunch of hours and still unable to find the root cause.

Thanks


texts: subcategories collapse after click in menu

texts:
When I click on parent category then sub category opens and when I click on subcategory the respective page open but the menu collapse it does not show on which category and sub-category we are.
Can anybody solve my issue to show the menu expandable after click on subcategory.
This is the code-

<?php $_helper = Mage::helper('catalog/category') ?>
                            <?php $_categories = $_helper->getStoreCategories() ?>
                            <?php $currentCategory = Mage::registry('current_category') ?>

                        <?php if (count($_categories) > 0): ?>

                                <?php foreach ($_categories as $_category): ?>
                                    <?php if ($currentCategory != NULL) { ?>
                                        <?php if ($currentCategory->getId() == $_category->getId()): ?>

                                            <?php else: ?>

                                            <?php endif; ?>
                                            <a href="<?php echo $_helper->getCategoryUrl($_category) ?>">
                                                <?php echo $_category->getName() ?>

                                            <?php if ($currentCategory->getId() == $_category->getId()){?>
                                                <?php $_category = Mage::getModel('catalog/category')->load($_category->getId()) ?>
                                                <?php $_subcategories = $_category->getChildrenCategories() ?>
                                                <?php if (count($_subcategories) > 0): ?>

                                                        <?php foreach ($_subcategories as $_subcategory): ?>

                                                                <a href="<?php echo $_helper->getCategoryUrl($_subcategory) ?>">
                                                                    <?php echo $_subcategory->getName() ?>

                                                        <?php endforeach; ?>

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

                                    <?php }else { ?>

                                            <a href="<?php echo $_helper->getCategoryUrl($_category) ?>">
                                                <?php echo $_category->getName() ?>

                                    <?php } ?>
                                <?php endforeach; ?>

                        <?php endif; ?>


texts:
I have a magento 2 shop.
In the checkout summary there is an annoying line which i cannot find to rename.
The street line it's label is
Street: Line 1

How can i remove the line 1.
I have tried:
1. en_EN.csv ...
2. modifying register.phtml

any help would be appreciated.


texts:
I have create one custom tab in my module and display one grid output successfully, but my question is how we can display two grid serializer block in one page? I have tried to out put with calling two serializer block with this code.

public function customgridAction()

{
   $this->loadLayout();
    $this->getLayout()->getBlock('regionpage.productgrid')->setProductsGrid($this->getRequest()->getPost('products_grid', null));
    $this->getLayout()->getBlock('regionpage.articlegrid')->setArticlesGrid($this->getRequest()->getPost('articles_grid', null));
    $this->renderLayout();
}

And this is what my layout xml look like

<regionpage_adminhtml_regionpage_customgrid>
<block type="core/text_list" name="root">
    <block type="regionpage/adminhtml_regionpage_edit_tab_productgrid" name="regionpage.productgrid"/>
    <block type="adminhtml/widget_grid_serializer" name="regionpage_productgrid">
        <reference name="regionpage_productgrid">
            <action method="initSerializerBlock">
                <grid_block_name>regionpage.productgrid</grid_block_name>
                <data_callback>getSelectedProducts</data_callback>
                <hidden_input_name>links[productgrid]</hidden_input_name>
                <reload_param_name>products_grid</reload_param_name>
            </action>
            <action method="addColumnInputName">
                <input_name>position</input_name>
            </action>
        </reference>
    </block>
</block>

 <regionpage_adminhtml_regionpage_customgrid>
    <block type="core/text_list" name="root">
        <block type="regionpage/adminhtml_regionpage_edit_tab_articlegrid" name="regionpage.articlegrid"/>
        <block type="adminhtml/widget_grid_serializer" name="regionpage_articlegrid">
            <reference name="regionpage_articlegrid">
                <action method="initSerializerBlock">
                    <grid_block_name>regionpage.articlegrid</grid_block_name>
                    <data_callback>getSelectedArticles</data_callback>
                    <hidden_input_name>links[articlegrid]</hidden_input_name>
                    <reload_param_name>articles_grid</reload_param_name>
                </action>
                <action method="addColumnInputName">
                    <input_name>position</input_name>
                </action>
            </reference>
        </block>
    </block>
 </regionpage_adminhtml_regionpage_customgrid>

But it output last block not both block.

I had asked this question on stackoverflow sometimes ago but not getting any answer so i thought to reposted it here

I have seen this meta question Can I repost unanswered questions from Stack Overflow?
So I have reposted this question again here.

Stackoverflow question link https://stackoverflow.com/questions/13972662/grid-layout-in-magento


texts: How to add brand logo at grid and product page in magento 2?


texts: Programatically set customer group price - Integrity constraint violation error

texts:
I am trying to set customer group specific price for product like this:

// Parse group prices
$groupPrices = array();
foreach ($productInfo->Prices as $groupPrice) {
    $groupPrices[] = array(
        'website_id' => 0,
        'cust_group' => intval($groupPrice->GroupId),
        'price' => floatval($groupPrice->GroupPrice)
    );
}

// Load product id by sku
$productId = (int)Mage::getModel('catalog/product')->getIdBySku($productInfo->Sku);
if (!$productId)
    throw new Exception('Product does not exists by SKU: '. $productInfo->Sku);

// Load product
$product = Mage::getModel('catalog/product')
    ->load($productId);

// Clear any previous group prices
$product->setGroupPrice(null);
$product->save();

// Save new group prices
$product->setGroupPrice($groupPrices);
$product->save();

When this code runs, I am getting the following error:

  SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
  '86-1-0-10.0000-0' for key 'E8AB433B9ACB00343ABB312AD2FAB087', query
  was: INSERT INTO catalog_product_entity_tier_price (entity_id,
  all_groups, customer_group_id, qty, value, website_id)
  VALUES (?, ?, ?, ?, ?, ?)

Any ideas what might be wrong?


texts: Magento 2: Issues when deploying static content on EFS

texts:
When running the static content deploy with jobs option, we get this error:

In Queue.php line 366:

  Error while waiting for package deployed: 42; Status: 0

setup:static-content:deploy [-f|--force] [-s|--strategy [STRATEGY]] [-a|--area [AREA]] [--exclude-area [EXCLUDE-AREA]] [-t|--theme [THEME]] [--exclude-theme [EXCLUDE-THEME]] [-l|--language [LANGUAGE]] [--exclude-language [EXCLUDE-LANGUAGE]] [-j|--jobs [JOBS]] [--symlink-locale] [--content-version CONTENT-VERSION] [--refresh-content-version-only] [--no-javascript] [--no-css] [--no-less] [--no-images] [--no-fonts] [--no-html] [--no-misc] [--no-html-minify] [--] [<languages>...]

Static content deploy command:
magento setup:static-content:deploy --jobs 5


texts:
I know this isn't specific a magento question, yet its highly magento related. So here goes:
We are looking for a WMS and/or PIM that handles the following:

A fashion oriented WMS/PIM system
A connection with magento.
Connection to mulitple warehouses and physical stores.
It should be possible to shift the stock internally
The connection between the Warehouses/stocks and the WMS/PIM and Magento should be bi-directional
Seperation of product availability betweeen region / location
Integration with one or multiple POS systems
Should/Could handle with multiple VAT's

Are there any wms systems that are multi national orientated and does (mostly) what we want here?
Why is that system good, why not? Or would you go for a different approach?
Detailed explanations below.
Example (shorter) version of the wanted setup.

Full skitch screenshot here: https://www.evernote.com/l/AEInt5p3ynNLH6vtTOGeusNG-I1HDwY0Gjo

Example 1:)

Customer comes into the physical store, sees that a product that is on the website isn't there.
Customer/Salesclerk orders from the webshop and delivers it to the store.

Internally the shift of the stock should go from warehouse UK to UK store Stock

Customer picks up the order from the store.

Example 2:

Customer lives on west coast of US and sees an product is in store in the UK store.
Its should not be possible for this customer to order the product
It could however be in stock in one of the physical stores in the US

Depending on the location of the store it should be possible to:

Able to order it and let it be deliverd to his home/picked up in store
Not be able to order it

Example 3:

Customer orders 5 products in webshop.

Depending on setting the product or delivery method (e.g. deliver to home or pickup at store) it should do the following
Pickup:

Store has 3 in stock, 2 has to be ordered from the warehouse and delivered into the store.
Customer gets the products and Stock in store is reduced to 0

Home delivery

If product should be shipped from store?

Warehouse sends 2 products to the customer
Store sends 3 products to the customer

If not

All products are send from a warehouse if the store don't have enough items.
Optionally if the store has the full order in stock, send from store. (through setting)

Abbreviations:

UK: United Kingdom
US: United States
WMS: Warehouse Management System
POS: Point of Sale
PIM: Product Information Management


texts: Magento2 Migration Redirects to the old Server

texts:
I moved my magento2 installation to a new server with a new ip adress. I used this documentation for my backups (http://devdocs.magento.com/guides/v2.0/install-gde/install/cli/install-cli-backup.html)

But i don't know how change old ip adress.
I have a redirection to my old ip address.

Thanks for reply,

Clement.


texts:
What's the best way to deal with the following redirect:

You enter website.com/category you get redirected to https://website.com/category, then to https://website.com/category.html

I want to eliminate/reduce the number of redirect to speed up the page load time.

Thanks


texts: Template is not loading on Admin Dashboard in Magento 1.9.2.4

texts:
Hi All I am trying to develop a section on Magento Admin Dashboard Just Like Life time sales and Average orders. Example

I have overridden Dashboard.php block to add my custom block as its child in __prepareLayout() function
Here is my dashboard.php code :

protected function _prepareLayout()
{
    $this->setChild('lastOrders',
            $this->getLayout()->createBlock('adminhtml/dashboard_orders_grid')
    );

    $this->setChild('totals',
            $this->getLayout()->createBlock('adminhtml/dashboard_totals')
    );

    $this->setChild('sales',
            $this->getLayout()->createBlock('adminhtml/dashboard_sales')
    );

    /* Here is my custom child block */

    $this->setChild('totalOrders',
            $this->getLayout()->createBlock('dashboard/adminhtml_totalorders')
    );

   /* custom code end here */

    $this->setChild('lastSearches',
            $this->getLayout()->createBlock('adminhtml/dashboard_searches_last')
    );

    $this->setChild('topSearches',
            $this->getLayout()->createBlock('adminhtml/dashboard_searches_top')
    );

    if (Mage::getStoreConfig(self::XML_PATH_ENABLE_CHARTS)) {
        $block = $this->getLayout()->createBlock('adminhtml/dashboard_diagrams');
    } else {
        $block = $this->getLayout()->createBlock('adminhtml/template')
            ->setTemplate('dashboard/graph/disabled.phtml')
            ->setConfigUrl($this->getUrl('adminhtml/system_config/edit', array('section'=>'admin')));
    }
    $this->setChild('diagrams', $block);

    $this->setChild('grids',
            $this->getLayout()->createBlock('adminhtml/dashboard_grids')
    );

    Mage_Adminhtml_Block_Template::_prepareLayout();
}

Here is my child block code :

class Custom_Dashboard_Block_Adminhtml_Totalorders extends Mage_Adminhtml_Block_Dashboard_Bar
{
    protected function _construct()
    {
        parent::_construct();
        $this->setTemplate('custom/dashboard/totalorders.phtml');
    }
}

I tried putting exit() or die() in my it and it worked child block is calling but i don't know why phtml is not loading.

My phtml path is design/adminhtml/default/default/template/custom/dashboard/totalorders.phtml

Here is my config.xml

<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
    <Custom_Dashboard>
        <version>0.1.0</version>
    </Custom_Dashboard>
</modules>
<global>
    <blocks>
        <adminhtml>
            <rewrite>
                <dashboard>Custom_Dashboard_Block_Adminhtml_Dashboard</dashboard>
            </rewrite>
        </adminhtml>
        <dashboard>
            <class>Custom_Dashboard_Block</class>
        </dashboard>
    </blocks>
</global>
</config>

Any help Will be appreciable.


texts: How to stop changing of base image when size is selected in details page?

texts: I have two configurable swatches in details page. Color & size. When I select the size the base image is changing. I want the base image to change only for color swatches and not for size swatches. Please help


texts: Delivery method is not visible in the Magento 2 api

texts:
I have already created a delivery and payment module and they are automatically exposed in the Magento 2 api rest, but a third shipping method does not appear, despite being working normally on the backend and frontend.
How to make the module exposed?


texts: PHPSESSID: Session Cookie Does Not Contain the "Secure" Attribute

texts:
In m1 we could just override isSecure from Mage_Core_Model_Cookie model, method:

public function isSecure()
{
    return $this->_getRequest()->isSecure();
}

How can we accomplish this in m2?


texts:
I'm new Magento.
I have a problem. I see my folder pub/static have my css file

But when I run, I don't see my css is appled:

I try something like: setup:static-content:deploy, reindex, s:d:c but nothing happens.
Anyone helps me, thank you.


texts: Subtotal Discount not Applying to Multiple Shipping Addresses

texts:
I'm trying to implement a coupon code subtotal discount (10% off over $150) but it is not applying when shipping to multiple addresses.

For example, I can place an order totaling $200. Adding the coupon code brings the subtotal to $180 in the shopping cart.

However if I click "Checkout with Multiple Addresses" and send products totalling $100 to one location and the rest to another, the subtotal at checkout jumps back to $200. It seems like its treating each shipment as a separate billing transaction.

I can't find a configuration setting or conditional statement to accommodate multiple shipping addresses.

Thank you in advance.


texts: How to find your Authentication Keys in Magento 2.0

texts:
A prerequisite for upgrading Magento 2.0 is:

For upgrade or update, you must use the same authentication keys you used to install the Magento software. For example, you cannot use Magento CE authentication keys to update or upgrade Magento EE or vice versa.

How or where can I find my Authentication Keys ?


texts:
Website: www.Bean2Bed.com Magento ver. 1.5.1.0

I'm not very web savvy so please bear with me. We use Google Apps for Business to handle our email, so have an email address Sales@(TheDomainMentionedAbove.com). For about 3 weeks now, we've stopped receiving all mails from the website, i.e.:

1) Contact Form submissions (http://bean2bed.com/contact) - if a customer fills it in and presses Submit, it will say data submitted, but we've stopped receiving the email from Sales@ with the data they've submitted.

2) Emails notifying of a new order placed and paid for on the site. We have to keep logging into Magento to check on new orders. Before both ourselves (Sales@) and the customer would get an email showing what they've ordered, and the email would also come from Sales@.

We haven't made any changes to the website or back end in the last few months, so for it to stop working is quite strange.

We've contacted Titan Internet who host our domain, and they have said it could be that the Contact Form is configured incorrectly because the sender email address should be Sales@ but it is actually being sent from bean2bed@electra-1.titaninternet.co.uk. Apparently we need to check the contact and ensure that 'localhost' is not set on the form.

Can someone please explain what this means? I have searched through this forum and found where to go to in Magento to change the from address (System > Configuration, etc.) but they all say Sales@ already. I can't find this bean2bed@electra-1.titaninternet.co.uk address anywhere to be able to change it.

I have logged into the ftp as well, downloaded a whole bunch of files, opened each one with Notepad to see if any of them contain that email address, and I still haven't found one.

I read something here (https://stackoverflow.com/questions/15036413/why-isnt-google-apps-email-address-receiving-email-from-magento-website/15038847#15038847) about how you need to switch off the mailserver for that domain. I'm not sure if this is the same issue, or where I need to go to to do that, and whether it would affect any of our normal mail coming to Sales@ (which works fine by the way).

Can someone please help?!


texts:
When you try to import the database, the following message occurs:
db error image

help me.


texts: Example of Code and Configuration Needed for a Simple Magento 2 CRUD Model?

texts:
How can I, an end-user-programmer, create a new "CRUD" model in Magento 2?  That is, I want to create the PHP class files and XML configuration files that will

Let me Create, Read, Update and Delete data from a database table
Let me create the initial database table(s) that will store this information.

In Magento 1 this was handled by a Model, Resource Model, Setup Resource Model, and various nodes in config.xml.  It's not 100% clear how this is handled in Magento 2.

Is there a sample module or clear tutorial out there yet for this?  Or is working backwards from an existing core model (like CMS page) our only option?


texts: Debug Magento speed - slow on 'All' products select

texts:
I have around 80 products in my store - on selecting 'ALL' from the tool bar on the product list.phtml page the site is very slow to respond (and sometimes doesn't). Where do I start debugging this issue?

Strangely if I change the default value to 'ALL' in configuration the category loads OK. It seems to have the problem if I change from, for example 12 products to viewing 'all' products from the toolbar.


texts:
I have been trying to disable JQMIGRATE but everything I have tried has not worked. I have followed the instructions present within the jquery folder in Magento 2.

But its still showing as Active. I have in Magento

Reindex
Cache
Static:content:deploy

But its not disabled. Could this be a browser or Magento issue.


texts: Does Magento2 comes with enquire.js? How can we use media queries in JavaScript similar to enquire.js in Magento1.


texts: Get recently viewed product collection Magento 2.3.1

texts:
I have tried this but it is not working.
I am getting blank array.
Suggestions please, i am stuck.

I want to display recently viewed product in owl carousel. But getting no products.

protected $recentlyViewed;

public function __construct(\Magento\Reports\Block\Product\Viewed $recentlyViewed ) {
    $this->recentlyViewed = $recentlyViewed;
}

public function execute() {
    $collection = $this->recentlyViewed->getItemsCollection()->load();
    echo "<pre>";
    print_r($collection->getData());
    exit;
}

I also tried this, but still blank array.

protected $_viewProductsBlock;

public function __construct(\Magento\Reports\Block\Product\Widget\Viewed\Proxy $viewedProductsBlock) {
    $this->_viewProductsBlock         = $viewedProductsBlock;
}
public function execute() {
    $_collection = $this->_viewProductsBlock->getItemsCollection();
    echo "<pre>";
    print_r($_collection->getData());
    echo "</pre>";
    die;
}


texts: I would like to create a custom layer to filter products by price. This specific layer should therefore have a dedicated, specific TPL, which is the best way to do it?


texts: Magento2: how to auto add grey bg color under photo

texts:
Always to magento catalog I upload image .jpg with white bg color.

Does anyone know how I can now change all products background for transparent, and add a gray background for all products under the photo?

Like this:

update css theme.less:

.gallery-placeholder {
    background-color: #f2f2f2;
}

img.img-responsive {
    background-color: #f2f2f2;
}

img.img-responsive.product-image-photo.img-thumbnail.owl-lazy {background-color:#f2f2f2;}

img.img-responsive.product-image-photo.img-thumbnail {
    background-color: #f2f2f2;
}

.products-grid .product-item-info .product-top a.photo {background-color:#f2f2f2;}

update2: (The pictures stretched)

view.xml:

        <image id="category_page_grid" type="small_image">
            <width>240</width>
            <height>300</height>
                 <transparency>false</transparency>
 <aspect_ratio>false</aspect_ratio>
 <frame>false</frame>
        </image>
        <image id="category_page_list" type="small_image">
            <width>240</width>
            <height>300</height>
                 <transparency>false</transparency>
 <aspect_ratio>false</aspect_ratio>
 <frame>false</frame>


texts: Data Migration Tool - Messes up Products on Frontend 1.9.2.4 to 2.2.4

texts:
I'm trying to migrate the customers and orders only from 1.9.2.4 to 2.2.4 for Magento.

I have edited the config.xml and the map.xml. However, whenever I run the migration the products in my 2.2.4 are all messed up and no longer show on the front end even though they are still in the backend.

I have edited the config.xml so it only runs these steps for data migration.

<steps mode="data">
    <step title="Data Integrity Step">
        <integrity>Migration\Step\DataIntegrity\Integrity</integrity>
    </step>
    <step title="Customer Attributes Step">
        <integrity>Migration\Step\Customer\Integrity</integrity>
        <data>Migration\Step\Customer\Data</data>
        <volume>Migration\Step\Customer\Volume</volume>
    </step>
    <step title="Map Step">
        <integrity>Migration\Step\Map\Integrity</integrity>
        <data>Migration\Step\Map\Data</data>
        <volume>Migration\Step\Map\Volume</volume>
    </step>
    <step title="OrderGrids Step">
        <integrity>Migration\Step\OrderGrids\Integrity</integrity>
        <data>Migration\Step\OrderGrids\Data</data>
        <volume>Migration\Step\OrderGrids\Volume</volume>
    </step>
    <step title="SalesIncrement Step">
        <integrity>Migration\Step\SalesIncrement\Integrity</integrity>
        <data>Migration\Step\SalesIncrement\Data</data>
        <volume>Migration\Step\SalesIncrement\Volume</volume>
    </step>
    <step title="PostProcessing Step">
        <data>Migration\Step\PostProcessing\Data</data>
    </step>
</steps>

And for the map.xml I added the following -

<ignore>
    <document>catalog_*</document>
</ignore>
<ignore>
    <document>cms_block</document>
</ignore>
<ignore>
    <document>cms_block_store</document>
</ignore>
<ignore>
    <document>cms_page</document>
</ignore>
<ignore>
    <document>cms_page_store</document>
</ignore>

Any idea as to why the products are affected by this migration setup?


texts: Magento2 Disable All Modules of a Particular Vendor Name

texts:
I would like disable all module of a particular vendor in a single command.

I know we have php bin/magento module:disable [Vendor_ModuleName] command but as far as I know it doesnot take wild cards like php bin/magento module:disable Foo_*.

I was wondering if they is way to do this in a single go ?


texts: Disable payment auto capture in RazorPay extension

texts: There are two options in extension admin settings. Authorise only and Authorise and capture. I have set payment action as Authorize only. But all the transactions are captured by default. Why is the payment captured when I have set the action to authorise only.


texts: Magento 2 Cronjob using a lot of memory on server

texts:
My server for Magento2 is running out of memory, and when I look at the processes, I see a log of cron jobs running, some of them have been running for more than 20 minutes. I killed all cron job processes, but after a minute, they all come back again. When I look at crontab -e, I see the following command that is running every minute, is this normal in Magento2 to have this cron job running every minute? And what can it be that the job doesn't finish?

*      *       *       *       *       /usr/bin/php /public/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /public/var/log/magento.cron.log

This is what I found in magento.cron.log

Warning: proc_open(): fork failed - Cannot allocate memory in /public/vendor/symfony/console/Application.php on line 959#0 [internal function]:$
#1 /public/vendor/symfony/console/Application.php(959): proc_open('stty -a | grep ...', Array, NULL, NULL, NULL, Array)
#2 /public/vendor/symfony/console/Application.php(761): Symfony\Component\Console\Application->getSttyColumns()
#3 /public/vendor/symfony/console/Application.php(722): Symfony\Component\Console\Application->getTerminalDimensions()
#4 /public/vendor/symfony/console/Application.php(656): Symfony\Component\Console\Application->getTerminalWidth()
#5 /public/vendor/symfony/console/Application.php(127): Symfony\Component\Console\Application->renderException(Object(Exception), Object(Symfon$
#6 /public/bin/magento(23): Symfony\Component\Console\Application->run()
#7 {main}


texts: Adding External Link To Magento 2.1 Topbar / Navigation

texts: I Have Followed Follwing Article From Stack Exchange For Adding External Link To Magento Navigation Also Referred Magento 2 Repo. And Created The Plugin.  But Its Not Adding Link To My Navigation Bar.


texts: Magento controller - Redirect to external URL in new window

texts:
I have a admin controller which redirects to an external url using the following code

public function indexAction()
{
$url = 'http://www.example.com/';
    $this->getResponse()->setRedirect($url);
}

Is there anyway to change this so it opens the link into a new window as opposed to redirecting the current page?


texts: Magento 2 programatically delete cart of customer in magento 2

texts: How can i programatically delete cart of  customer in magento 2.


texts: Facebook Login button not showing in "rwd" theme, but working fine in "default" theme in Magento 1.9

texts:
I installed Magento 1.9 and the theme "rwd" came along with it. I changed all the categories and products. Then I installed a Facebook Login extension, which works fine with the "default" theme, but when I activate the "rwd" theme the Facebook Login button doesn't get displayed on any page.
Also, could anyone assist me to clear up the Dashboard stats, which shows a lot of total sales? I got hold of some mysql statements, but in Magento 1.9 the table names don't match.
Thanks in advance.


texts: magento2 - homepage blank with 'Search' keyword

texts:
Why is my frontend showing this:

Which seems to come from
Magento\Search\view\frontend\templates\form.mini.phtml

I have not changed any core files


texts: Best way to extend module less found in web/css/source/module, like _minicart.less?

texts:
Which is then the best way to extend less files content in <module>/web/css/source/module/, like for instance Magento_Checkout/web/css/source/module/_minicart.less?

Assuming that to

A) OVERRIDE

theme related less you must create (or copy) a less with the same name of the parent theme and put it in your theme like this theme-frontend-blank/web/css/source/_buttons.less -> <your-theme>/web/css/source/_buttons.less
module specific less you must create (or copy) a less with the same name of the parent theme and put it in your theme like this theme-frontend-blank/Magento_Theme/web/css/source/_module.less -> <your-theme>Magento_Theme/web/css/source/_module.less
UI lib less you must create (or copy) a less with the same name content in the library folder and put it in your theme like this magento2-base/lib/web/css/source/lib/_buttons.less -> <your-theme>Magento_Theme/web/css/source/lib/_buttons.less

and to

B) EXTEND

theme related less you must create an _extend.less file in your theme adding _extend in the name like this <your-theme>/web/css/source/_navigation_extend.less to extend theme-frontend-blank/web/css/source/_navigation.less AND register that file with @import directive in the _extend.less of the theme content in web/css/source -> @import "_navigation_extend.less"
module specific less you must create an _extend.less file in your theme module path like this <your-theme>Magento_CatalogSearch/web/css/source/_extend.less which extends the Magento_CatalogSearch original _module.less
UI lib less you must create a less with the same name content in the library folder adding _extend in the name like this <your-theme>Magento_Theme/web/css/source/lib/_buttons_extend.less to extend magento2-base/lib/web/css/source/lib/_buttons.less AND register that file with @import directive in the _extend.less of the theme content in web/css/source -> @import "lib/_buttons_extend.less"

Theory must suggest you create a _minicart_extend.less but it doesn't automatically work. Maybe you should import that file in the _extend.less of that module like explained in B1 or B3?

And why these components extending less are not automatically included in the parsing of the css if this is the correct way to extend them but must be imported in the _extend.less?

(Here comes also another question: what's the differences between web/css/source/lib/_buttons.less and web/css/source/_buttons.less? )

I'm a bit confused. Hope someone could help me.

Sorry for this long text.

Sources:

http://devdocs.magento.com/guides/v2.1/frontend-dev-guide/css-topics/css-overview.html
http://inchoo.net/magento-2/working-with-css-in-your-first-magento-2-project/comment-page-1/#comment-434125


texts: How to save form data to multiple tables in database

texts:
I have created a form in the admin panel with various fields. Now the fields here doesn't belong to one single table. On the save, I want some values to go into one particular table while others to go into some other table. I am able to show up the data using joins but don't know how to save them back.

Let's say I have a tblUser with fields:

tblUser

- user_id        INT(11)         Auto Increment
- username       VARCHAR(15)
- store_id       SMALLINT(5)
- bank_id        INT(11)

Here, store_id and bank_id have foreign key constraints to auto-increment id's of tblcore_store (id, store_name) and tblBanks (id, bank_name, bank_acc) respectively.
Now the fields in the form are:

Username
Store Id
Store Name
Bank Name
Bank Account

When admin click save I want the data of form to go into their respective tables and also having their references in store_id and bank_id.


texts: How to compare products data from different store

texts:
I have two store in my magento site, I want to get product_ids for which price is not matched for both stores.

For Example:

$collection = Mage::getResourceModel('catalog/product_collection')
                ->addAttributeToSelect(array('entity_id','price'));

foreach($collection as $val)
{
    $product = Mage::getModel('catalog/product')->setStoreId('1')->load($val->getEntityId());
    if($val->getPrice() != $product->getPrice())
    {
        // here I can get product_ids for which price are different for both stores
    }
}

The above script is working and returning product_ids as my requirement, but I have more than 35000 products in my site and this script takes time to execute or sometime it gives timeout error.

Is there any other method using magento or php functions so that I can get those product_ids in an array?


texts: Report ID: webapi-560e30f44811c; Message: Class name does not exis in Magento2

texts:
I have created rest api it's not working Could you please suggest me where i went wrong?

  Error: main.CRITICAL: exception 'ReflectionException' with message
  'Report ID: webapi-560e33c7e2c45; Message: Class name does not exist'

my code is:

app/etc/config.php

modules' =>
  array (
    'Learning_Test' => 1,
  ),

app/code/Learning/Test/Api

<?php

namespace Learning\Test\Api;

interface WebserviceInterface
{

    /**
     * @param $name
     * @return mixed
     */
    public function say($name);
}

app/code/Learning/etc/di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
    <preference for="Learning\Test\Api\WebserviceInterface" type="Learning\Test\Model\Webservice" />
</config>

app/code/Learning/etc/webapi.xml

<?xml version="1.0"?>

<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../app/code/Magento/Webapi/etc/webapi.xsd">

    <!-- Example: curl http://192.168.0.52/magento-2/index.php/rest/V1/webservice/say/magento2 -->
    <route url="/V1/webservice/say/:name" method="GET">
        <service class="Learning\Test\Api\WebserviceInterface" method="say"/>
        <resources>
            <resource ref="anonymous"/>
        </resources>
    </route>

</routes>

app/code/Learning/Test/Model/Webservice.php

<?php
namespace Learning\Test\Model;
use Learning\Test\Api\WebserviceInterface;

class Webservice implements WebserviceInterface
{

    /**
     * @param $name
     * @return string
     */
    public function say($name) {
        return ' Welcome to ' . $name;
    }
}

Could you please suggest me where I went wrong?

Thanks.


texts: How to implement rich results in magento 2?

texts: Basically I am trying to add structured data such as AggregateRating for products with reviews, Offer – price and priceCurrency, Image(s), SKU, Product name, as JSON-LD code in all products page in magento 2 which would be added as markup to produce google rich search results so I have been referring to https://www.williamscommerce.com/add-rich-snippets-magento-products-using-schema-org-tags/ and https://feedarmy.com/kb/magento-microdata-for-google-shopping/ which I found really relevant. But the issue is I am not able to find this file app/design/frontend/[package]/[theme]/template/catalog/product/view.phtml mentioned in the above references. It would really help me learn this concept better if anyone can drop any suggestions about the file issue mentioned above. Thanks and cheers


texts: How to filter product with salable filter in magento2

texts:
In magento 1 ,

$products = Mage::getModel('catalog/product')->getCollection();
$products->addAttributeToFilter('status', 1); // enabled
$products->addAttributeToFilter('type_id', 'simple');
//$products->addAttributeToFilter('sku', array('1234')); //for testing purposes
$products->addAttributeToSelect('*');
Mage::getSingleton('catalog/product_status')->addSaleableFilterToCollection($products);
Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($products);
$prodIds = $products->getAllIds();

I need to filter product collection with Is_salable() filter in magento2

Mage::getSingleton('catalog/product_status')->addSaleableFilterToCollection($products);
Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($products);

How to do this in magento2?

$collection = $this->_categoryFactory->create()->load($categoryId) // Load Category Products by CategoryID
                ->getProductCollection()
                ->addAttributeToSelect('sku')
                ->setStoreId($storeId)
                ->addAttributeToFilter('color_family', array('eq' => $optionId))
                ->addAttributeToFilter('visibility', \Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH)
                ->addAttributeToFilter('status', \Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED);

Thanks


texts: How to convert array values to string format

texts:
I have the input array in following format:

  "123,46,78,000";

But I need it in this format:

  '123','46','78','000';

can any one help me?


texts: magento 1.9 custom module fronted error 404

texts:
I have problem to acces the custom module frontend controller.

I am following a basic tutorial to build a custom module.
These are the files I've edited:

  /var/www/html/magento/app/etc/modules/WaPoNe_Helloworld.xml

<?xml version="1.0" encoding="UTF-8"?>
<config>
  <modules>
    <WaPoNe_Helloworld>
    <active>true</active>
    <codePool>local</codePool>
    </WaPoNe_Helloworld>
  </modules>
</config>

  /var/www/html/magento/app/code/WaPoNe/Helloworld/controllers/
               IndexController.php

  class WaPoNe_Helloworld_IndexController extends
                     Mage_Core_Controller_Front_Action {

       public function indexAction() {
              echo 'Hello World!';
       }
    }

  /var/www/html/magento/app/code/WaPoNe/Helloworld/etc/config.xml

 <?xml version="1.0" encoding="UTF-8"?>
    <config>
      <modules>
        <WaPoNe_Helloworld>
            <version>1.0.0</version>
        </WaPoNe_Helloworld>
      </modules>
    <frontend>
       <routers>
         <helloworld>
            <use>standard</use>
            <args>
              <module>WaPoNe_Helloworld</module>
              <frontName>helloworld</frontName>
            </args>
          </helloworld>
       </routers>
     </frontend>
  </config>

When I try to access the module frontend with this link:

http://localhost/magento/helloworld/index
http://localhost/magento/helloworld
http://localhost/magento/index.php/helloworld/index

I get error 404 not found.


texts: Add / Change h2 tag on magento 2 product page

texts:
I am trying to add a H2 tag on my product page but I am not able to find out how to do it. I want to make the short description my H2 but I am not able to find it. In the old days we just had the view.phtml but in magento 2? The only thing I can find is

catalog_product_view.xml

 <block class="Magento\Catalog\Block\Product\View\Description" name="product.info.overview" template="Magento_Catalog::product/view/attribute.phtml" group="detailed_info" after="product.info.extrahint">
                    <arguments>
                        <argument name="at_call" xsi:type="string">getShortDescription</argument>
                        <argument name="at_code" xsi:type="string">short_description</argument>
                        <argument name="css_class" xsi:type="string">overview</argument>
                        <argument name="at_label" xsi:type="string">none</argument>
                        <argument name="title" translate="true" xsi:type="string">Overview</argument>
                        <argument name="add_attribute" xsi:type="string">itemprop="description"</argument>
                    </arguments>
                </block>


texts:
We write the observer for updating the product price while add to cart.i have write the observer but can't get item price for currently added product in cart.

In the below code, how to get the item price of currently added item.

public function updatePrice( Varien_Event_Observer $observer )
 {

    $event = $observer->getEvent();

}


texts: Magento product->getUrlPath() returning empty

texts:
I'm debugging a customers environment, so don't have all the details at place, sorry about that.

My problem is that apparently the call to product->getUrlPath() returns empty.

Any idea what might cause this?


texts: How to export all product sku and cateogry id in csv format runing custom script?

texts: I am using Magneto2.3.1 and i need to export all product sku and cateogry id in csv format runing custom script?if anyone know and idea share code please


texts: ERROR: channel-add: Channel 'community' already exist! when trying to upgrade

texts:
I'm trying to upgrade my installation of Magento 1.8.0.0 to 1.9 via SSH, when I run
./mage mage-setup .
I receive:

Running initial setup...
Success
Success
Error:
channel-add: Channel 'community' already exist!

Any thoughts on what I should do next?


texts:
After a fresh install of the latest beta Magento release, I have an error when running integration tests that seems to be related to stock feature. Since the stock has been under heavy development in this release, I was wondering if anybody knows how to resolve this one?

After fresh install of Magento 2.3 with sample data, the integration test command php ../../../vendor/bin/phpunit returns an error, see below:

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento23_test.inventory_stock_1' doesn't exist, query was: SELECT `e`.*, `selection`.*, `stock_status_index`.`is_salable` FROM `catalog_product_entity` AS `e`


texts: Magento2 custom theme with another custom theme as parent, overriding problems

texts:
In this project we had one frontend custom theme working, to do some customizations. That is working fine. Let's call that Theme1/custom (with Magento/blank as parent)

Now we have created a new frontend custom theme, let's call it Theme2/custom, whose parent is Theme1/custom

Both themes are working, but we are experiencing some issues when trying to override some layouts & templates

Let's say we have one customized template in app/design/frontend/Theme1/custom/Magento_Catalog/templates/product/list.phtml & now we need to override that same file in the new custom theme, so we have placed our changes in app/design/frontend/Theme2/custom/Magento_Catalog/templates/product/list.phtml

I am starting to think this approach is not valid when dealing with custom themes extending custom themes... Because project still loads the Theme1/custom one

Cache & static content are fresh, and permissions are ok

Any ideas?

update

This issue appears to affect only Magento_Catalog module... which makes that totally weird...


texts: magento 2.2.1vesion how to introduce customer CSS files or JS files?

texts:
buddy:
   Now i'm contact the magento 2.0 vesion first time, before i contact the magento 1.0 vesion all the long time. Now i want to add a customer（customize） css file, and a customer（customize） JS file, But i don't konw how to do it?
    I have to via the google to found the Tutorial, but i couldn't found the good idea! So  i need your help from the stackoverflow!
   In magento1.0 version, i via found the app/layout/page.xml file, to add the customer CSS file, such as: css/mystyles.css
   But i don't know how to add customer css file in magento 2.0 vesion?
    Thanks very much!


texts:
I have craated following magento query,

$orderCollection->getSelect()->joinLeft(array('sfoa' => 'sales_flat_order_address'), 'main_table.entity_id = sfoa.parent_id', "");
            $orderCollection->addFieldToFilter('sfoa.address_type', array('eq' => 'shipping'));
            $orderCollection->getSelect()->joinLeft(array('caev' => 'customer_address_entity_varchar'), 'caev.entity_id = sfoa.customer_address_id', "");
            $orderCollection->addFieldToFilter('caev.attribute_id', array('eq' => 143));
            $orderCollection->addFieldToFilter('caev.value', array('nin' => $excludeStoresIds));

and its sql equivalent statement is

SELECT `main_table`.* FROM `sales_flat_order` AS `main_table
 LEFT JOIN `sales_flat_order_address` AS `sfoa` ON main_table.entity_id = sfoa.parent_id
 LEFT JOIN `customer_address_entity_varchar` AS `caev` ON caev.entity_id = sfoa.customer_address_id WHERE (created_at >= '16-02-8' AND created_at <= '2016-02-11') AND
(sfoa.address_type = 'shipping') AND (caev.attribute_id = 143) AND (caev.value NOT IN('2323'))

if I directly run above sql statement,it gives correct result, but magento query is not running AND (caev.value NOT IN('2323')) part of query


texts:
while importing in magento 2 getting this error

  general system exception happened additional data: class name and class type already exists.

when i check in var/import_history/filename_error.csv

sku,store_view_code,attribute_set_code,brand,product_type,categories,
product_websites,name,description,short_description,weight,
product_online,tax_class_name,visibility,price,finish,color,capacity,
width,depth,height,length,thickness,crank,opening_angle,size,sets_pcs,
special_price,special_price_from_date,special_price_to_date,url_key,
meta_title,meta_keywords,meta_description,base_image,base_image_label,
small_image,small_image_label,thumbnail_image,thumbnail_image_label,
swatch_image,swatch_image_label,created_at,updated_at,new_from_date,
new_to_date,display_product_options_in,cost,msp,msrp_price,
map_enabled,gift_message_available,custom_design,custom_design_from,
custom_design_to,custom_layout_update,page_layout,
product_options_container,msrp_display_actual_price_type,
country_of_manufacture,qty,additional_attributes,out_of_stock_qty,
use_config_min_qty,is_qty_decimal,allow_backorders,
use_config_backorders,min_cart_qty,use_config_min_sale_qty,
max_cart_qty,use_config_max_sale_qty,is_in_stock,
notify_on_stock_below,use_config_notify_stock_qty,manage_stock,
use_config_manage_stock,use_config_qty_increments,qty_increments,
use_config_enable_qty_inc,enable_qty_increments,is_decimal_divided,
website_id,related_skus,related_position,crosssell_skus,
crosssell_position,upsell_skus,upsell_position,additional_images,
additional_image_labels,hide_from_product_page,bundle_price_type,
bundle_sku_type,bundle_price_view,bundle_weight_type,bundle_values,
bundle_shipment_type,associated_skus,grade,warrantyinfo,
unit_of_measurement,typeofproductfitting,type,shape,certifications,
audience,guaranteeinfo,model,hsn_sac,pack_quantity,offers,mpn,
isaccessoryorsparepartfor,isconsumablefor,releasedate,
initialproductiondate,pattern,productsupport,isbasedon,owns,
itemcondition,product_property,vendor_group,plt,errors

At the end of csv header only errors added any no other informations.


texts: Event/Observer for customer password change?

texts:
I'm looking for a way to hook into the event of customers changing their passwords. So if someone changes the password in the customer frontend, I'd like to send an e-mail somewhere.

I did consult the list over at http://www.nicksays.co.uk/magento-events-cheat-sheet-1-7/ but nothing looks like an event for changing passwords.


texts: Where do you place common methods that you use throughout your module

texts:
I have a method that is going to be called in multiple files in my module:

public function getStore(){
         $order = Mage::registry('current_order');
         $store_id = $order->getdata("store_id");
         switch ($store_id){
             case "2":
                $store = "DE";
                break;
             case "3":
                $store = "US";
                break;
             case "9":
                $store = "HG";
                break;
             case "1":
                $store = "DK";
                break;
             default:
                $store = "ES";
                break;
         }
    return $store;
}

What is the magento way to deal with this methods?

Thanks!


texts: How to get Latest Products Collection in my costum Module Magento 2

texts:
I want to get Collection of Latest Products in Magento 2
i have some restriction

Without using Object Manager
Without using API

i have searched on internet found these two methods but i have to avoid using them


texts:
I have two options to order a product.

Pick up yourself (works)
Delivery, order below 30,- you have to pay 7,- and above there are no delivery costs:

I use Tablerates for this. I have uploaded a CSV and it is correctly done:

Land,Provincie,Postcode,"Subtotaal bestelling (en hierboven)",Verzendkosten
*,*,*,0.0000,7.0000
*,*,*,30.0000,0.0000

Condition; price vs location

When I order below 30,- it adds 7,- thats oké

But when I order above 30,- (subtotal) it still adds the 7,-

I cleared cache etc etc.
Is there something I could have missed?

version 1.7.0.2


texts: Magento 2: new attribute not showing in list configurable product

texts:
I've created new configurable product and clicked Create Configurations at the bottom of the product page. None of my new attributes are listed here.

Am I missing something?

I have tried to work your way Asish Hira, but when i go to stores >  attributes > product I can't actually drag anything. So i tried going to stores > attribute set In this area i am actually able to drag attributes to my default or new (chair) attribute set. But when i have dragged them, saved the attribute set and reindexed all indexes, i still don't see any attributes in the configurable product list.

Would be great if someone could help me out here.


texts: Set magento deployment mode to production fails

texts:
I've installed a new Magento 2 installation with Softaculous on my hostingserver. After installation I would change the default deployment mode to production but I have the following error (using SSH):

foo@en07-phx [~/public_html/m2test/bin]# php magento deploy:mode:show
    Current application mode: default.
foo@en07-phx [~/public_html/m2test/bin]# php magento deploy:mode:set production
    Enabled maintenance mode
    Static content deployment start
    Command returned non-zero exit code:
    `php -f /home/foo/public_html/m2test/bin/magento setup:static-content:deploy en_US 2>&1`

Anyone knows what could be wrong? Because I'm using v2.0.0.0, this might be fixed already in a newer version on Github but I'm not able to install that using softaculous and I have no clue on how to use Composer from my hostingprovider.

Edit1:
Following the suggestion of @Silvan (by running the command seperately), I get the following output:

=== frontend -> Magento/blank -> en_US ===
Successful: 1965 files; errors: 0
=== frontend -> Magento/luma -> en_US ===
Successful: 1965 files; errors: 0
=== adminhtml -> Magento/backend -> en_US ===
Successful: 1843 files; errors: 0
=== Minify templates ===
Successful: 845 files modified

Edit2:
This is independent of Softaculous installer because I have the same problem with a manual installation of the latest github code as of today (2016/01/12).

Edit3:
Raised a github issue. https://github.com/magento/magento2/issues/2972


texts: Magento 2 is it possible to sell not in stock products?

texts:
I wan't to make it so that when a product is out of stock a customer will stil be able to purchase it. The product must stil say "Out of stock" but with a purchase button so that it's clear to the customer that the product is stil out of stock.
I've read this answer but it seems to be outdated:

Is it possible to sell not-in-stock products on Magento?


texts: Magento 2 - Use secure url for static files field into database?

texts:
I'm using Magento 2, and I'm trying to find the field of "use secure URL for static files" (or similar label).

I can find web/unsecure/base_url into mgxo_core_config_data , but not that one, I need to delete it, as my website wouldn't load any resource on https for some reason.


texts:
I need to override the get orders list API call, and set a join with my custom table, but without loose the SearchCriteria terms, is this possible?

Current Code:
(I've created a plugin in Magento\Sales\Api\OrderRepositoryInterface inside webapi_rest folder.)

public function aroundGetList
(
    \Magento\Sales\Api\OrderRepositoryInterface $subject,
    callable $proceed,
    \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
){
    $searchResult = $this->searchResultFactory->create();
    $this->collectionProcessor->process($searchCriteria, $searchResult);
    $searchResult->setSearchCriteria($searchCriteria);
    foreach ($searchResult->getItems() as $order) {
        $this->setShippingAssignments($order);
    }
    return $searchResult;

}


texts:
i have a check in the checkout which spits out an error when you go to submit however the only way to fix the error is to go back into the cart and adjust what you have in it, currently i use this code in [MODULE]\Model\Giftcard.php

Mage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl('checkout/cart'))->sendResponse();
Mage::throwException("Gift Card is not currently active", 'core/session');

what happens is that i get the error message but it doesn't redirect back to the cart

does anyone know what i'm doing wrong here


texts: Magento 2.2.1 error during static content deploy

texts:
I have a own template in app/design/frontend/tm/XXX-theme. I built it like described in the dev docs.
Parent theme is luma.
Magento run in developer Mode.
After i use setup:static-content:deploy de_DE en_GB.
SSH shows:

Compilation from source:
frontend/tm/XXX-theme/de_DE/css/styles-m.less
Warning: Invalid argument supplied for foreach() in /www/htdocs/XXX/XXX/XXX/vendor/oyejorge/less.php/lib/Less/Tree/Value.php on line 26

In Browser Template CSS is not loading:

The resource from “https://www.example.com/pub/static/frontend/tm/XXX-theme/de_DE/css/styles-m.css” was blocked due to MIME type (“text/plain”) mismatch (X-Content-Type-Options: nosniff)

Have anyone a Idea? I read since yet many articel for this Problem and tried.
But I have no clue.


texts: Error in installing Magento locally: "The Default Website is invalid. Make sure no more than one default is defined"

texts:
No idea what could be causing this Issue, here is what i tried to do to fix it:

Disabled the modules (still shows the message)
Checked to make sure that only one default website is applied (Still showed the same message)
Attempted to install on multiple platforms (Linux, Mac and Windows) using MAMP, LAMP, and a linux nginx install.
Tried building a docker container and even a prebuilt recommended one.

Still not sure what the issue is, everything installs fine and i have never seen this error before.


texts: Console Command: Area code must be set before starting a session

texts:
I am trying to get a list of orders from the OrderRepository (Magento 2.1) via a console command and am using code as follows...

...

public function __construct(
    \Magento\Framework\Model\Context $context,
    \Magento\Framework\Registry $registry,
    \Magento\Sales\Api\OrderRepositoryInterface $orderRepository,
    \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder,
    \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null,
    \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null,
    $data = []
) {
    $this->orderRepository = $orderRepository;
    $this->searchCriteriaBuilder = $searchCriteriaBuilder;
}

public function execute()
{
    $sc = $this->searchCriteriaBuilder->create();
    $items = $this->orderRepository->getList($sc);
}

...

This code throws an error of:

[Magento\Framework\Exception\SessionException]
Area code not set: Area code must be set before starting a session.

[Magento\Framework\Exception\LocalizedException]
Area code is not set

I have attempted to resolve it by passing in the appState (\Magento\Framework\App\State $appState) and calling setAreaCode with either frontend, crontab, admin and adminhtml - none of which seem to have any effect.

I have managed to resolve it by adding an echo at the top of the execute function..

public function execute()
{
    echo 'Please please dont throw an exception';
    $sc = $this->searchCriteriaBuilder->create();
    $items = $this->orderRepository->getList($sc);
}

Am I missing something glaringly obvious? Or is this a bug in Magento?


texts: Items to Invoice Section Collection in New Invoice Page

texts:
How can I apply Filter on this collection?
According to my Knowledge these rows are coming from sales_order_item so, I have custom attribute("admin_id") in sales_order_item . How can I apply condition on this collection?
Which class->method() is responsible for collecting this collection ?


texts: Magento 2 Commerce Edition: how to manage promo date ranges?

texts:
We are on M2.3 Commerce Edition. I have some cart price rules that were working fine and then suddenly quit working. They remain active and all conditions are met. The only thing I can think of is that there is a date range that has expired. But we cannot see any date range in the admin panel, so we cannot confirm this. I've read through several message boards and the user guides but it is unclear what to do.

I would appreciate any help. This issue is there for catalog price rules too.

Thank you!