texts: How to enable LOAD DATA LOCAL INFILE in Magento 1.9

texts:
So far I found this closed question and solutions for Magento 2, but I'm hoping there's a solution for Magento 1 as well. This question should not be closed like the other one because it IS specific to Magento 1.

In mysql, I checked what my local_infile variable looks like:

mysql> SHOW GLOBAL VARIABLES LIKE 'local_infile';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| local_infile  | ON    |
+---------------+-------+

And yet, when I run my query, I still get the warning:

ERR (3): Warning: PDOStatement::execute(): LOAD DATA LOCAL INFILE forbidden  in /var/www/html/lib/Zend/Db/Statement/Pdo.php on line 228

Now, in Magento 2, the solution is to add a line in app/etc/env.php to say

'driver_options' => array(PDO::MYSQL_ATTR_LOCAL_INFILE => true)

However, in Magento 1, my file structure under app/etc/ has only a modules directory and the following files:

config.xml
local.xml
local.xml.additional
local.xml.template

As you can see, there is no env.php or any .php files at all, so I have no idea where that line would go, or if there's a completely different way to solve this.


texts: Magento 1.9.1.0 Customer Unable Login Chrome Browser Only

texts:
Strange situation with Magento Customer login for Chrome only (and mobile chrome browser).

Users can not login via customer/account/login/

They can login via checkout/onepage/

I have added:

<input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>" />

to login.phtml underneath:

<ul class="form-list">

in

template/persistent/checkout/onepage
template/persistent/customer/form

I have increased the Cookie Lifetime to 33600 I have set the cookie domain (as recommended by a post on a forum, apprently google can be funny with cookies and there source).

Cache is all cleared in browsers and in var/cache and cleared in admin.
Sessions are cleared and session folder is set to 755 file permissions.

Any help at all would be appreciated


texts: Layout handle for all account related pages

texts:
I have bookmarked this website to peek at the available layout handles:
http://itpscan.info/blog/magento/layout_handles.php

I saw a few handles regarding the account page. I was wondering, is there also a handle that I can use for all account pages?

Account pages being:

account overview
Personal settings
Adresses
My trips
My trip reviews

(Names can be a bit different, since I am using a Dutch installation, made for a boat that sells voyages)


texts:
I have created the langauage csv files using the following commands. And the translation is just working fine. Do I still need to create a language package as described in this link?

php bin/magento i18n:collect-phrases -o zh_hant_hk.csv -m .
php bin/magento i18n:collect-phrases -o zh_hans_cn.csv -m .

php bin/magento i18n:pack -d zh_hant_hk.csv . zh_Hant_HK
php bin/magento i18n:pack -d zh_hans_cn.csv . zh_Hans_CN


texts:
I am getting date value as:

 $lifetime = date('d/m/Y', $exptime);

and saving into custom table. It was working fine untill last working day, I didn't pushed any thing and now I am getting error

  Message: DateTime::__construct(): Failed to parse time string
  (15/12/2020) at position 0 (1): Unexpected character
  {"exception":"[object] (Exception(code: 0)

Why it happened any clue ?


texts: How do I export users and products from a Magento website from inside a module?

texts:
I am developing a Marketing(mostly email) extension for Magento, which requires that the users and products be imported into another third-party tool.
How do I export this data from Magento to send it to our tool? What is the correct way to do it?
Right now, I am forcing the Magento store owner to generate consumer key and consumer secret(after giving a bunch of permissions), and then go through the OAuth flow on the third party tool. But it is too tedious a process. I want to simplify it, by the extension taking care of the export/import automatically. How best can it be done?


texts: How to make column sorting false using Ui Component in magento2?

texts:
I want to make sorting false for donloaded column :

 <column name="downloaded" class="Tatva\Subscription\Ui\Component\Listing\Column\Downloadedrenderer">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="filter" xsi:type="string">text</item>
            <item name="label" xsi:type="string" translate="true">Downloaded</item>
        </item>
    </argument>
</column>


texts: How to execute url for 9:00PM to 6:00AM only?

texts: I want to execute url automatic at night 9:00PM to 6:00AM. because I my cron job not working properly and I used AWS server with magento. so I want to create my custom cron in magento.


texts: Magento 2 : How to create shipment label programmatically

texts:
I am currently building a functionality to create order,invoice and shipment via script.

I can create shipment with tracking ID programmatically but could not create shipment label via script.

I am using FedEx shipping method. please help how to create shipment label for FedEx programmatically.


texts: Magento 2.2.3 How to adjust date format?

texts:
The following piece of code:

<?= $post->getCreatedAt() ?>

Returns the following output: 2018-04-13 11:53:00

How to adjust that piece of code in a way that the output would be something like '13 April'?


texts: Magento 2: how do I remove language selection

texts: Hi on my front page there is a dropdown menu that allows me to select different languages.  Is there way I can remove this dropdown menu? thank!


texts: Internet Explorer Cuts Off Phrase "Search Entire Store Here"

texts: search box with wording "Search Entire Store Here" shows fine in Chrome but only shows half of this phrase in Internet Explorer


texts: Magento 2.1 CDN static/media base URLs - getting 404 for all files

texts:
I'm trying to change the base urls for static and media files to the URL of my CDN however when I change them, I get 404 not found for all images/media/static/css/js

All files and content is available on the CDN url as I can go to a file directly by going to e.g.

http://CDNURL/pub/static/frontend/edgesystems/idca/en_GB/css/styles.css

Yet the URL of the file (and all others) that is trying to load on the site is like this:

http://CDNURL/frontend/edgesystems/idca/en_GB/css/styles.css

Its missing the /pub/static/ bit out

I am currently in developer mode and have tried doing the change in di.xml as per Magento 2 : Symbolic links to pub/static files

I have a .htaccess file in /pub/static but maybe it is incorrect in there?

Does anyone have any ideas please?


texts: How to update product quantity on check out page using Ajax in Magento

texts:
I want to provide functionality to update product quantity on checkout page of magento.
so if user want to update the product quantity he can do it on without reloading checkout page.
I want to Provide this functionality without reloading page.

My Try:

I edit item.phtml (template/checkout/onepage/review/item.phtml) after 47th line number

<?php echo $_item->getQty() ?>

            <input name="cart[<?php echo $_item->getId() ?>][qty]" value="<?php echo $this->getQty() ?>" size="4" name="update_cart_action" id="cup_<?php echo $_item->getId() ?>"  class="input-text qty" maxlength="12" />

        <button type="submit" name="update_cart_action" value="update_qty" title="<?php echo $this->__('shopping-cart-table'); ?>" id="up_<?php echo $_item->getId() ?>" class="button btn-update"><?php echo $this->__('Update'); ?></button>

This is My Jquery code which i put at the end of item

Than I Override cartcontroller.php and place all the functions of the original cartcontroller.php and rename function updatePostAction by function updatePostsAction. and change the redirect path to $this->_redirect('checkout/onepage');

But this is not working the error comes in console which i unable to solved and there are some problem inshort.


texts: Export and Import Categories and Products

texts: Is there a solution to export all the products and categories from a store and import them to a empty store?


texts: magento2 setup error with database MariaDB?

texts:
today I uninstall mysql and add new  mysql-5.6.27-winx64, Windows (x86, 64-bit), ZIP Archive  in https://dev.mysql.com/downloads/mysql/. and add pubbin mariaDB in Zendserver.

when i setup magento2 magento2-1.0.0-beta to  Step 2: Add a Database click button Next do nothing.


texts: Magento CE 1.9 backorders do not produce message in cart

texts:
We are using Magento CE 1.9. I am having a problem. I am trying to enable backorders with customer notification. I have set

System - Configuration - Inventory - Product Stock Options - Backorders" set to ""Allow Qty Below 0 and Notify Customer" for every product I have set Manage Stock to "Yes" Stock Availability to "In Stock"

Backorders are accepted, but there is no notification in the cart associated with the products that are backordered.

All products visible in the catalog are configurables.

My question is a two-part one. First, am I doing something wrong? I.e. is there something else I need to set up?

Second, if I'm doing everything right where would I look for the code that should be producing this notification?


texts: How to create package extension with dependencies package?

texts: I have created Package1_Module1 extension.Now I Want to create another extension Package1_Module2 so it is dependent on Package1_Module1 so it is add-on Package1_Module1. what I have to write in package textbox and other stuff in dependencies tab ?


texts: Customer not getting logged in after updating catalog price rule

texts:
I am having a strange problem . If i update catalog price rule then on front end i can't get logged in . Page keeps on loading and after some time it shows 500 error .
If i update that customer account from backend just editing and saving , it enables me to log in from front .
Any idea what am i doing wrong ?

I have followed the code to see which lines are putting it in endless loop. I found that following lines in Mage/Sales/Model/Quote in _afterLoad function are causing this loop.

if (1 == $this->getData('trigger_recollect')) {

           $this->collectTotals()->save();

        }

If I comment out $this->collectTotals()->save(); it loads fine.

After reading more on forums it says that when we update catalog rules in admin, then magento set this trigger to 1 so that it calculate totals again on front end and that puts in loop as it gets too long. Like suggested on these

http://www.techytalk.info/catalog-price-rules-not-applied-creating-order-magento-admin/

and here

https://github.com/magespecialist/MSP_CashOnDelivery/issues/6

Can you suggest what can be the proper solution, commenting this line will have other effects as well I would think, although it currently seems to work fine.
Thanks for looking into this


texts: Magento 2 : Can't able to override controller

texts:
I need to override this below controller :

  Magento\Catalog\Controller\Adminhtml\Product\Attribute\Validate.php

But, I can't able to override. I need to customize checkUniqueOption() function.

di.xml

<preference for="Magento\Catalog\Controller\Adminhtml\Product\Attribute\Validate" type="Vendor\Magento\Controller\Adminhtml\Product\Attribute\Validate" />

How to do that?

Any help would be appreciated.


texts: how to override magento customer module JS files in magento 2

texts:
I need to override the following file

  vendor/magento/module-customer/view/frontend/web/js/model/customer-addresses.js

define([
    'jquery',
    'ko',
    './customer/address'
], function ($, ko, Address) {
    'use strict';
var isLoggedIn = ko.observable(window.isCustomerLoggedIn);

return {
    /**
     * @return {Array}
     */
    getAddressItems: function () {
        var items = [],
            customerData = window.customerData;

        if (isLoggedIn()) {
            if (Object.keys(customerData).length) {
                $.each(customerData.addresses, function (key, item) {
                     items.push(new Address(item));
                });
            }
        }

        return items;
    }
};
});

  I need to replace items.push(new Address(item)); with

if (item.region.region_code.toLowerCase() === window.getStoreName.toLowerCase()){
 items.push(new Address(item));
}

  That's to fetch customer addresses based on current store in checkout page.


texts: Magento 2 - How to manipulate tables directly from php

texts: What classes can I use to directly manipulate Magento database tables? I have created a table in the database and would like to be able to insert/update rows in it directly, without having to define a model class, etc. It seems that Magento\Framework\Model\ResourceModel\Db\AbstractDb has the functionality I need, but I'm not sure if I should be using an abstract class directly. Are there any concrete implementations of the class that are designed to be used for my purpose?


texts: Magento 2, filter product collection by sku while preserving the given array sequence

texts:
Using below code, collection is filtered. If $productSkus  array is like

Array ( [0] => 5714156000153 [1] => 8690604469871 [2] => 6412616365413 )

after filtering I see the collection is in

Array ( [0] => 8690604469871 [1] => 5714156000153 [2] => 6412616365413 )

sequence. How to do filtering with respect to given sequence?

$collection ->addAttributeToSelect('*')
            ->addAttributeToFilter('sku', array('in' => $productSkus));


texts:
I need to override a Block from an external extension.
This is my setup with the necessary files:

The module file (app/etc/modules/Mynamespace_Mymodulename.xml):

<?xml version="1.0"?>
<config>
  <modules>
    <Mynamespace_Mymodulename>
      <active>true</active>
      <codePool>local</codePool>
      <depends>
        <mgs_auction />
      </depends>
    </Mynamespace_Mymodulename>
  </modules>
</config>

The config file (app/code/local/Mynamespace/Auction/etc/config.xml):

<?xml version="1.0"?>
<config>
  <modules>
    <Mynamespace_Mymodulename>
      <version>1.0</version>
    </Mynamespace_Mymodulename>
  </modules>
  <global>
    <blocks>
        <auction>
          <rewrite>
            <auction>Mynamespace_Auction_Block_Auction</auction>
          </rewrite>
        </auction>
    </blocks>
  </global>
</config>

The block path from the extension:

  app/code/local/Mgs/Auction/Block/Auction.php

and my structure:

  app/code/local/Mynamespace/Auction/Block/Auction.php

with following content:

class Mynamespace_Auction_Block_Auction extends Mgs_Auction_Block_Auction {
    public function ... () {
        ...
    }
}

Tested it but the original block class from the extension is still used. I guess something is missing or wrong titled in the config.xml. Could you help me out?

Edit:

The original config.xml from the extension:

<?xml version="1.0"?>
<config>
    <modules>
        <Mgs_Auction>
            <version>2.2.0</version>
        </Mgs_Auction>
    </modules>
    ...
   <global>
        <blocks>
            <auction>
                 <class>Mgs_Auction_Block</class>
            </auction>
        </blocks>
   </global>
</config>


texts: Get All customers from Magento using rest API

texts:
I am trying to get all customers from Magento, but it giving me only first 10 records, i have searched a lot but did not see any post of comment which can solve my problem.

API user has admin rights and able to fetch results using Rest API.

if i have activated application for rest API then can i use wsdl as well or xml rpc please suggest.


texts: Why is Magento 2.1.0 released before 2.0.9?

texts:
Magento has released 2.1.0 on June 23 but has released 2.0.8 (July) and 2.0.9 (Aug) after that. (https://github.com/magento/magento2/releases)

Why are they releasing lower versions? If anybody knows the reason, please let me know. I have already upgraded to 2.1.0 and then these new releases are coming.


texts: I don't want magento Frontend Customers Session to log out Automatically except they logout it manually

texts:
If My Website Frontend Customers once login (Not Backend Admin Users), they should not be logged out Automatically. If they manually logout Then only it should be logged out.

I want this because if any registered customer comes to my site and view any product or add to cart then I can send them emails.

Please suggest if it is Possible.

This is my Current setting
In Magento Admin

In php.ini file

magento version : 1.9.2.0


texts: Magento 2, Change On hover instead of 'click' for mini cart

texts:
In magento 2.
For mini cart and store switcher, they are dropdown with click.
How to change on hover instead of 'click'.

I had tried with jquery trigger click, but It don't work.


texts: Magento2.1 change product attribute via mysql

texts:
I have a Magento 2.1 website and have setup a product attribute to be a drop down. However now I want to change the drop down to be a multi-select. I am wondering how I can do this via mysql. I have seen a few posts on how to do this in Magento 1.x however I am having an issue finding the needed mysql to run to change my product attribute from drop down to multi-select.

The product attribute I want to change has an id of 93

thanks


texts: Uncaught TypeError: Cannot read property 'length' of undefined in

texts:
I am getting this error in given file while checkout am unable to process any Order.

../pub/static/frontend/Smartwave/porto/en_US/Magento_Ui/js/lib/validation/rules.js


texts: Extending Adminhtml blocks class _prepareCollection

texts:
I am trying to override a adminhtml block and I created all files accordingly. The problem is that it does not have any effect. My files are as follows:

app/code/local/Grando/Groupfilter/etc/config.xml

<?xml version="1.0"?>

<config>

<modules>

    <Grando_Groupfilter>

        <version>1.0</version>

    </Grando_Groupfilter>

</modules>

<global>
    <blocks>
    <grando_groupfilter>
        <class>Grando_Groupfilter_Block</class>
    </grando_groupfilter>
        <adminhtml>
            <rewrite>
                <catalog_product_edit_tab_super_group>Grando_Groupfilter_Block_Adminhtml_Catalog_Product_Edit_Tab_Super_Group</catalog_product_edit_tab_super_group>
            </rewrite>
        </adminhtml>
    </blocks>
</global>

</config>

app/code/local/Grando/Groupfilter/Block/Adminhtml/Catalog/Product/Edit/Tab/Super/Group.php

class Grando_Groupfilter_Block_Adminhtml_Catalog_Product_Edit_Tab_Super_Group extends Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Group {
   protected function _prepareCollection()
{
    //somecodehere
}
   }

app/etc/modules/Grando_Groupfilter.xml

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

Is it not possible to do this? Am I missing something?


texts: Remove column customer grid with observer

texts:
I'm trying to remove some columns from customer grid, but is not working, I've tried several similar events, but none of them work.

my config.xml

<adminhtml>
    <events>
        <core_block_abstract_to_html_before>
            <observers>
                <manage_adminhtml>
                    <class>manage_adminhtml/observer</class>
                    <method>getCustomerGrid</method>
                </manage_adminhtml>
            </observers>
        </core_block_abstract_to_html_before>
    </events>
</adminhtml>

and my observer

class Manage_Adminhtml_Model_Observer
{
    public function getCustomerGrid( $observer )
    {
        $block = $observer->getEvent()->getBlock();

        if ($block->getId() == 'customerGrid') {

            $block->removeColumn('group');
            $block->removeColumn('email');

            $block->sortColumnsByOrder();
        }
    }
}


texts: Magento2 custom javascript moving to end of the page while added in head

texts:
I've added some scripts in head tag using

<referenceBlock name="head.additional">
     <block class="Magento\Framework\View\Element\Template" name="custom_script_block" template="Magento_Theme::script/code.phtml"/>
</referenceBlock>

All the scripts have moved at the end of page after . But the html comments are in the head tag which has in the code.phtml

Anyone knows it why?


texts: (Magento2) knockout.js:3012 Uncaught ReferenceError: Unable to process binding

texts:
On page loading the following error occurs.

  knockout.js:3012 Uncaught ReferenceError: Unable to process binding
  "attr: function (){return {
                             id:'cart-item-'+item_id+'-qty','data-cart-item':item_id,'data-item-qty':qty,'data-cart-item-id':product_sku}
  }" Message: product_sku is not defined

Also on cart updation:

  knockout.js:3012 Uncaught ReferenceError: Unable to process binding
  "foreach: function (){return
  $parent.getRegion($parent.getItemRenderer(item.product_type)) }"
  Message: Unable to process binding "template: function (){return
  {name:getTemplate(),data:item,afterRender:function(){$parents[1].initSidebar()}}
  }" Message: Unable to process binding "attr: function (){return {
                             id:'cart-item-'+item_id+'-qty','data-cart-item':item_id,'data-item-qty':qty,'data-cart-item-id':product_sku}
  }" Message: product_sku is not defined

This error occurs only in new custom themes, and works fine in default Magento and Luma themes.


texts: How to safly upgrade Magento version 1.7 to Magento 2.0

texts:
We are planning to upgrade Magento version 1.7 to 2.0,

As we have a very custom build Magento 1.7 version.

We have developed many custom scripts and many plugins for our store.

We have a large amount of data on 9+ Million parts.

So now we want to upgrade it to version 2.0.

We want to know what are the safety steps/tips we should follow during this phase.

Also what is the differences while upgrading.

How we should start this upgrading process.

Looking for this kind of answer but in more detail if possible

Any guidance/thoughts are appreciated.


texts: when run composer update following error occurs how can i fix it please help

texts:
[ab17d226@cloudhost-61966 html]$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1

The requested package amasty/product-attachment 2.1.0 exists as amasty/product-attachment[1.2.6, 1.0.0, 1.0.1, 1.0.5, 1.1.1, 1.2.0, 1.2.1, 1.2.2] but these are rejected by your constraint.

Problem 2
    - The requested package amasty/base 1.5.0 exists as amasty/base[1.6.1, 1.0.0, 1.0.1, 1.0.5, 1.0.6, 1.0.9, 1.1.2, 1.2.0, 1.3.0, 1.3.5, 1.3.6, 1.3.7, 1.4.1, 1.4.10, 1.4.2, 1.4.4, 1.4.5, 1.4.6, 1.4.7, 1.4.9, 1.5.3, 1.5.5] but these are rejected by your constraint.


texts: where should I place my block,container and layout files in magento 2?

texts:
how should I  create a custom layout file , custom container and add custom blocks to containers? I dont know where to place which one. can anybody give an example of adding a block that says "hello" to the container using custom layout I am new to magento. I am learning! please help

<?xml version="1.0"?>
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framewrk:View/Layout/etc/page_layout.xsd">
<update handle="empty"/>
<referenceContainer name="page.wrapper">

<container name="header.container" as="header.container" label="Pag Header Container" htmlTag="header" htmlClass="page-header" before="main.content"/>

<container name="page.top" as="page_top" label="After Page Header" after="header.container"/>

<container name="footer-container" as="footer" before="before.body.end" label="Page Footer Container" htmlTag="footer" htmlClass="page-footer" />

</referenceContainer>
</layout>

I created a E:\xampp\htdocs\magento-2\app\design\frontend\vendor\my_new_theme\Magento_Theme\page-layout\test-layout.xml  and registered in E:\xampp\htdocs\magento-2\app\design\frontend\vendor\my_new_theme\Magento_Theme\layouts.xml
where should my blocks go?


texts: How does a REST API URL look like without rewrites?

texts:
Magento ships a rewrite for from /api/rest to api.php?type=rest. In case I can not or don't want to use that rewrite, how would I have to change a rest URL such as /api/rest/orders ?

api.php/orders?type=rest did not work
api.php?type=rest/orders also not.


texts:
I migrated my magento site ..it migrated successfully bt when i import database it keep on showing error "SQLSTATE[42S22]: Column not found: 1054 Unknown column 'link.area' in 'where clause'"

what does that mean??? please help


texts: Reindexing - Will my store load slower immediately after re-indexing has been completed?

texts:
I understand that during re-indexing my store may be slower, and also that after the flushing the cache, pages will load slower because they are un-cached, however I don't understand indexing well enough.
Immediately after re-indexing is complete, would you expect pages to load any slower than immediately before commencing re-index (all other things being equal)?
Many thanks in advance.
Wes


texts: Disable Payment Method at Checkout in Magento 2 Based on Product Attribute

texts:
I want to disable a specific payment method on the checkout page based on Product Attribute 'cod'. If it is true then COD Payment Method not visible on Checkout Page. Here is the complete code.

app\code\Vendor\DisableCOD\etc\events.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="payment_method_is_active">
        <observer name="Vendor_DisableCOD_Method_Is_Active" instance="Vendor\Disable_COD\Observer\DisablePaymentMethods" />
    </event>
</config>

app\code\Vendor\DisableCOD\etc\module.xml

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

app\code\Vendor\DisableCOD\Observer\DisablePaymentMethods.php

<?php
namespace Vendor\DisableCOD\Observer;
use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\App\Request\DataPersistorInterface;
use Magento\Framework\App\ObjectManager;
class DisablePaymentMethods implements ObserverInterface
{
    public function __construct(\Psr\Log\LoggerInterface $logger)
    {
        $this->_logger = $logger;
    }
    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $cart = $objectManager->get('\Magento\Checkout\Model\Cart');

        // get cart items
        $items = $cart->getItems();

        // get custom options value of cart items
        foreach ($items as $item)
        {
            $options = $item->getProduct()->getTypeInstance(true)->getOrderOptions($item->getProduct());
            $attribute = $options['cod'];
            if ($attribute)
            {
                if($observer->getEvent()->getMethodInstance()->getCode()=="phoenix_cashondelivery")
                {
                    $checkResult = $observer->getEvent()->getResult();
                    $checkResult->setData('is_available', false);
                }
            }
        }
    }
}

app\code\Vendor\DisableCOD\registration.php

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

Error in system.log file

main.CRITICAL: Class Vendor\Disable_COD\Observer\DisablePaymentMethods does not exist [] []


texts: How to Call filters in custom phtml/Product List Page Top in Magento 2

texts: How Can I call Magento 2 default product layered navigation filters (left side filters) in top of the product list page.Can you Help me on this ?


texts:
I have a category on my website that I am applying some Custom Layout Update to in the XML of the category. NB. I have also set "Apply To Products" to "Yes":

<reference name="content">
        <block type="core/template" name="members.header" template="members/header.phtml" before="-" />
    <remove name="product_list" />
    <block type="catalog/product_memberscontentlist" name="product_memberscontentlist" template="catalog/product/members-content-list.phtml" />
</reference>
<reference name="right">
    <block type="core/template" name="members.sidebar" template="members/sidebar.phtml" before="-" />
</reference>

I have created a file in app/code/local/Mage/Catalog/Block/Product/Memberscontentlist.php which is how the product_memberscontentlist is working. The contents of this file are:

class Mage_Catalog_Block_Product_Memberscontentlist extends Mage_Catalog_Block_Product_List
{
/**
     * Retrieve loaded category collection
     *
     * @return Mage_Eav_Model_Entity_Collection_Abstract
     */
    protected function _getProductCollection()
    {
        $collection = parent::_getProductCollection();

        if(isset($_GET['filterID'])) {
            $collection->addAttributeToSelect('my_attribute')
                ->addAttributeToFilter('my_attribute', array('like' => '%'.$_GET['filterID'].'%'));
        }

        return $collection;
    }
}

It's just a bit of code that adds an extra filter to the category list. This is working fine on the category page but is causing some kind of error on the product page which means the product page loads but for some reason the  tag is 404 - Page Not Found and there is "Whoops, our bad...etc" at the bottom of the page.

My theory is that the code...

<remove name="product_list" />
<block type="catalog/product_memberscontentlist" name="product_memberscontentlist" template="catalog/product/members-content-list.phtml" />

... in the Custom Layout Update is causing the problem, so I have tried to specify that that code only be applied on the category view, ie:

<reference name="content">
    <block type="core/template" name="members.header" template="members/header.phtml" before="-" />
</reference>
<reference name="right">
    <block type="core/template" name="members.sidebar" template="members/sidebar.phtml" before="-" />
</reference>

<catalog_category_default>
    <reference name="content">
        <remove name="product_list" />
        <block type="catalog/product_memberscontentlist" name="product_memberscontentlist" template="catalog/product/members-content-list.phtml" />
    </reference>
</catalog_category_default>

But this doesn't seem to work. The problem is I need to keep "Apply to Products" to "Yes" because some of the blocks (members.header and members.sidebar) are needed on that category's product pages too.

I have also tried the following:

<reference name="category.products">
    <action method="unsetChild"><name>product_list</name></action>
    <block type="catalog/product_memberscontentlist" name="product_memberscontentlist" template="catalog/product/members-content-list.phtml" />
</reference>

But this doesn't work either!

Essentially my problem is that I want to apply Custom Layout Update to a category, and I want some (but only some) of this XML to apply to the product page too. If anyone can help with how I can target the category page only in the Custom Layout Update it would be really appreciated. Thank you!

I am using Magento 1.8.1


texts: Moved from Local to Live - All files are functioning however a single CSS is still showing as localhost/

texts:
I have uploaded and completed all the changes required
I have updated urls in core config
I have set folder permissions and file permissions
I ran
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento cache:clean
php bin/magento cache:flush

Everything is functioning except for a single CSS file in the static folder
I have checked the .htaccess and they are fine and mod-rewrite is on
Can anyone help?
Url is
https://ursa.com.au

File still showing local is
http://localhost/primalworkwear/pub/static/version1582897776/frontend/PrimalWorkwear/KIT-LAB/en_US/css/78b02e3f5edea091affb4bd500bde576.css


texts: How to set 2 different themes for Mobile and Desktop in Magento 2.1.7 without changing the core file

texts:
I am working on Magento store version 2.1.
I'm required to show a different layout and design on the Mobile device, which is different from my default view.
For this I added a theme in the root folder of Magento store.
I am trying to add this user string -

iPhone|iPod|BlackBerry|Palm|Googlebot-Mobile|Mobile|mobile|mobi|Windows Mobile|Safari Mobile|Android|Opera Mini

I also tried this code -

iPad|iPhone|Android ((?!(2\.|3\.|4\.0)).)

I also added this code in my index.php -

$mobile_agents = "/(nokia|iphone|android|motorola|^mot\-|softbank|foma|docomo|kddi|up\.browser|up\.link|"
                 . "htc|dopod|blazer|netfront|helio|hosin|huawei|novarra|CoolPad|webos|techfaith|palmsource|"
                 . "blackberry|blackberry10|bb10|playbook|alcatel|amoi|ktouch|nexian|samsung|^sam\-|s[cg]h|^lge|ericsson|philips|sagem|wellcom|bunjalloo|maui|"
                 . "symbian|smartphone|mmp|midp|wap|phone|windows ce|iemobile|^spice|^bird|^zte\-|longcos|pantech|gionee|^sie\-|portalmmm|"
                 . "jig\s browser|hiptop|^ucweb|^benq|haier|^lct|opera\s*mobi|opera\*mini|320x320|240x320|176x220"
                 . ")/i";
if (preg_match($mobile_agents, strtolower($_SERVER['HTTP_USER_AGENT']))) {
     $mageRunCode = 'mobile';  // your store view code
}
Mage::run($mageRunCode, $mageRunType);

But nothing is helpful for me.

If anyone knows how to achieve this please write here.

My web URL is - https://www.anytimehydration.com


texts: Is it possible (or suggested) to run Solr/Jetty with Varnish?

texts:
If yes, I would choose Turpentine as the extension for Varnish.

Are there specific port settings to avoid conflicts?


texts: Magento 2 : New Configurable product - selecting existing simple products manually?

texts:
I am creating a new Configurable product via the Admin Panel (based on color). My simple products (children) already exist via a product import. When I click on "Edit Configurations" it takes me down the path of creating new simple variations. I don't want to do this. I simply want to select the existing products.

Interestingly if I go ahead and generate some simple variations via the "Edit Configurations" after the save I can see a new link "Add Products Manually" beside "Edit Configurations". That's what I want to see the first time around after I tell it that the new configurable product is based on color.

How can I solve this?


texts: Magento 2 CE - backend system.xml page tree

texts:
Is there any way to add to a config variable Cms PageID order wise (like a drag and drop) in configuration?

I use a simple cms page retriever but there is no option to order page.

<source_model>Magento\Cms\Model\Config\Source\Page</source_model>

Thank you.


texts: Magento 1.9 - track id/name of last user who created/edited an order

texts:
I'd like to get the id/name of the last user who created/edited an order, both from the frontend or from the administration panel;

How can I get the order creator/editor 's ID/username within an observer? I am thinking about using <sales_order_place_after> observer; does it fire on edit or only on order creation?

Edit:

I've already created a column in sales/order and sales/order_grid tables. As suggested I switched my observer from <sales_order_place_after> to <sales_order_save_before>. I only need the code to get the ID of the last user who edited/created the order, so I can do something like the following:

$order = $observer->getEvent()->getOrder();

$user_id = getUserId() ...? # <-- here is where I need your help

$order->setLastEditor($user_id);
$order->save();


texts: display image in custom page in admin grid through image name

texts:
hello everyone i have image name in my admin grid through that i want to display the image in custom page in admin grid below code is for image name

<field name="customization_attachment">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="dataType" xsi:type="string">file</item>
                <item name="label" translate="true" xsi:type="string">Attachment</item>
                <item name="formElement" xsi:type="string">input</item>
                <item name="source" xsi:type="string">Product</item>
                <item name="disabled" xsi:type="boolean">true</item>
                <item name="sortOrder" xsi:type="number">70</item>
                <item name="dataScope" xsi:type="string">customization_attachment</item>
                <item name="validation" xsi:type="array">
                    <item name="required-entry" xsi:type="boolean">false</item>
                </item>
                <item name="previewTmpl" xsi:type="string">Magneto_PopupQuestion/image-preview</item>
            </item>
        </argument>
    </field>


texts: How to use Magento 2 Basic Command in Windows CMD?

texts:
I'm new in Magento 2
I'm using XAMPP, Windows 10 and use CMD for Run Magento2 basic Commands,
but I don' know how to use that in CMD,
BCS when I have run this command

php magento indexer:reindex

give me an error like this: 'php' is not recognized as an internal or external command,
operable program or batch file

My Magento 2 Path is : C:\xampp\htdocs\m231>

also,
I have setup PHP as an environment variable.

Path = ;C:\xampp\php;

My Testing Commands:

C:\xampp\htdocs\m231> php magento setup:upgrade

'php' is not recognized as an internal or external command,
operable program or batch file.

C:\xampp\htdocs\m231\bin> php magento setup:upgrade

'php' is not recognized as an internal or external command,
operable program or batch file.

C:\xampp\htdocs\m231> magento indexer:reindex

'Magento' is not recognized as an internal or external command,
operable program or batch file.

C:\xampp\htdocs\m231\bin> magento indexer:reindex

'Magento' is not recognized as an internal or external command,
operable program or batch file.

but not working.

Please give me some solution.

Thanks.


texts: Magento invoice custom text not aligning

texts:
Hi guys I am attempting to edit the invoices of magento but I cannot get my custom text to align with the totals on the right. I would like the headings 'important' and 'Pay us by bacs' to be inline with the subtotal heading of the totals.

My function code in abstract.php:

public function insertBankInfo(Zend_Pdf_Page $page, $text)
{
    $page->setFillColor(new Zend_Pdf_Color_Html('#447282'));
    $this->_setFontBold($page, 9);
    $page->drawText($text, 285, $this->y += 34.5, 'UTF-8');
    $page->drawText("IMPORTANT:", 35, $this->y, 'UTF-8');
    $this->_setFontRegular($page, 9);
    $text = $this->y -= 15;
    $page->drawText("When remitting your payment, please quote your account number and our INVOICE NUMBER AS SHOWN above", 35, $this->y += 4, 'UTF-8');
}

My code in invoice.php:

$this->insertBankInfo($page, Mage::helper('sales')->__('Pay US BY BACS'));


texts: Import image while importing products in Magento 1.9

texts:
Is it possible to import images while importing the product ?

I've never done a large import on Magento before but i'm moving my store from wordpress to magento. In wordpress you can enter a web address for the image and it will find it and import it, and display it on the product page.

Is it possible to do that in Magento?

Thanks.


texts: Best way to install Solr across Multiple Distributions?

texts:
I have had mixed success installing Solr via aptitude as the latest stable version in the apt repo seems to be 1.7. What is the best way of installing Solr via aptitude or other means which does not require java experience?  I can't seem to find any method of installing Jetty on RHEL or CentOs via yum, either.

Edit

Updated to allow for multi-distribution feedback. Appreciate any advice you can lend.


texts:
While Magento does a lot 'out of the box', we've found there are inevitably features and facilities needed for client stores that require a 3rd party extension.

However, given the nature of the medium, it can be a risky proposition to introduce 'foreign' code to such a complex system dealing with commercial transactions.

What do you look for when evaluating Magento extensions? What are the 'red flags' you've come across (performance hogs, security risks, architectural bad practices)?


texts: PayPal gateway has rejected request Paypal is not supported (#10605: Transaction refused because of an invalid argument

texts:
I am using two store for my website one is for India and other for global(other country). for Global is used paypal payment method. in global store currency is USD, India store currency is INR, Default config currency is USD. When i going to place order using paypal payment method in global store. i got error

  PayPal gateway has rejected request. Currency is not supported (#10605: Transaction refused because of an invalid argument. See additional error messages for details) and redirect to shopping cart page.

But when i set USD currency in all my store India, global and default config and try to place order from global store using paypal payment method then successfully redirect to paypal account.


texts:
I recently built a new fresh theme for Magento 2 and wanted to make a start on styling the buttons, inputs etc globally, I've set my local-themes file to the right position and set it up as it should. Whenever I do grunt refresh I get this strange error that has nothing to do with that I am trying to accomplish
>> SyntaxError: variable @form-field__vertical-indent__desktop is undefined in pub/static/frontend/{Vendor}/{Theme}/nl_NL/css/source/lib/_responsive.less on line 64, column 9:
>> 63     print {
>> 64         .media-width('min', @screen__m);
>> 65     }
Warning: Error compiling pub/static/frontend/{Vendor}/{Theme}/nl_NL/css/styles-l.less Used --force, continuing.

My theme's folder structure is really simple, it barely has any files.
Theme
   |--> media
   |--> web
         |--> css
               |--> source
                      |--> _sources.less
                      |--> _theme.less

And of course the necessary things such as registration.php, theme.xml but that is self-explanatory. Why can't I compile my grunt files? I've tried defining the variable within the _theme.less file like this
@form-field__vertical-indent__desktop: 28px;
and grunt then compiles successfully but the homepage is still missing styles. It then says the following in the console
Refused to apply style from 'https://www.{project}.test/pub/static/version1615894401/frontend/{Vendor}/{theme}/nl_NL/css/styles-l.css' because its MIME type ('text/plain') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

Also whenever I try to run bin/magento setup:static-content:deploy I get this error:
Compilation from source: /Users/rainierlaan/Sites/work/{project}/vendor/magento/theme-frontend-blank/web/css/styles-l.less
variable @form-field__vertical-indent__desktop is undefined in file /Users/rainierlaan/Sites/work/{project}/var/view_preprocessed/pub/static/frontend/{Vendor}/{Theme}/en_US/Magento_GiftRegistry/css/source/_module.less in _module.less on line 213, column 28
211|     .form-giftregistry-search {
212|         .fieldset {
213|             margin-bottom: @form-field__vertical-indent__desktop;

The weird thing is. Nowhere within my project I called or defined or did anything related or regarding to Magento_GiftRegistry? I can't disable or remove the module GiftRegistry becuase it isn't even installed? It does not show up when I do bin/magento module:status What in the world is going on here?
What I've tried
rm -rf /var/view_preproccessed
rm -rf /pub/static
bin/magento setup:upgrade
bin/magento cache:flush
bin/magento cache:clean
bin/magento setup:static-content:deploy

Where is this error coming from and how can I fix it? It's driving me nuts


texts: I am working on one website multiple stores.My issue is when i search from frontend with one store then other store products also coming.


texts: Unable to open admin panel after successful installation of magento on localhost in ubuntu 14.04

texts:
I am trying to setup magento on my localhost. I followed all the instructions from here: http://www.unixmen.com/install-magento-ubuntu-15-04/ and successfully installed magento.

But i am unable to open admin panel and getting following error:

  The requested URL /admin_eoyh6q/ was not found on this server. Apache/2.4.7 (Ubuntu) Server at 127.0.0.1 Port 80

I am able to open store home page but seems like some css is missing and none of the links present on this page are working and giving same error as admin panel.

I am using Magento 2 and have unzipped my Magento-CE-2.0.2+sample_data-2016-01-28-02-46-48.tar.gz in /var/www/html.

I am using Magento for the first time so i might be missing some basic steps, kindly guide me on this.


texts:
I'm currently working on setting up a e-commerce website. Of course we want to use a filter for the products but I'm facing a problem at the moment.

I have a category with 5 products. All of them are configurable products which have different sizes. On the left of the category page I have the filters visible, but the size filter isn't showing all the sizes of the products. It's not showing sizes that are available in all of the 5 products (in my case all products have size Medium & Large, but these are not showing up in the filter). Sizes that are not available in all the 5 products do so show up, for example Extra Small & Extra Large.

I have looking around the internet for a solution but I'm having bad luck today.. Is anybody here familiar with this?


texts: How to hide SORT BY PRICE and PRICE FILTER NAVIGATION LAYER for not login user in magento 1.9?

texts: Is it possible to hide the Sort by Price and Price Filter Navigation Layer at category product list page for users that are not logged on?


texts: Integrating custom sms service with magento 2

texts:
I have an sms provider in my country, he gave me api url

https://globesms.net/smshub/api.php?username=xxxx&password=xxxx&action=sendsms&from=xxxx&to=xxxx&text=xxxx

How can I call his API when someone place in order and send sms to clients?
Can I make use of the integration page or do I have to edit php files?


texts: How to add custom fields in sales_shipment_items in Magento 2?

texts: How can I add custom fields in sales_shipment_item using upgrade schema in Magento 2?


texts: Magento 2: Move shipping address popup below address options

texts:
I am trying to remove modal popup for new shipping address form in checkout and place it below saved address as a div.

Have anyone idea about this?


texts: 2nd level attribute drop down box not working

texts:
I have a configurable product with 2 attributes - colour and size. The first drop down box works and you can select your colour but nothing changes with the second drop down box even after you have a colour selected.
The 2 drop downs work in the quick view and it doesn't matter if I swap them over on the product page - if colour is top it works, if size it top it works but the bottom box doesn't.
The product page is http://www.machinetoolsandspares.co.uk/mens/em-mens-pyjamas.html
All the simple products are enabled, in stock, on the correct website. I have been through all the obvious stuff but I can't get this to work!
Anybody have any ideas?


texts: Magento 2 : Add custom text in payment step of checkout

texts:
I have a requirement like below.

If there aren't any payment methods, There is a text showing in payment page

No Payment method available.

under the path

  Magento_Checkout\web\template\payment.html

My requirement here is to include a link after the text like below

No Payment method available. click here to edit address. ==> It should be linked to customer account page

How can this be achieved, I am not so good in knockout.js to bind the links in html pages.

Please can anyone help me implement this functionality? Thanks!!


texts:
We are planning to develop native apps for magento2 website.Currently we're using paytabs as payment method no other options  for now. Here's module if you want to take a look.

Module it self using express checkout for payments. It just sending request to gateway with order details and in response rendering iframe.

How should I capture payment on apps by keeping magento between ?
Like, If we use SDK for accepting payments for mobile there would be more work for API to create invoice, sending notification etc.

That's reason we think to keep magento in between while accepting payment on mobile.

What is best way for payment integration for apps ? Any suggestion,ideas will be appreciated. Thanks in advance


texts: How can I queue all Magento2 transactional emails?

texts: I know Magento2 Enterprise Edition has this functionality already built into it. At the moment I am using a basic SMTP module to send all the transactional emails on my website, however, the process of sending emails to SMTP is the thing that delays the most my website. Do you know any module to do so, or can you suggest how can I develop one?


texts: How to change the contents in the header of Magento 2

texts:
I have attached the screenshots images of my store and the model how it should appear. I have to change according to that. can anyone please help how to change or customize the header of the magento 2.

I have to change the header in 1st image to the header in the 2nd image


texts: Add products to another category programatically

texts:
I have pulled the product set I need in with my collection, how do I add these products to another category whilst also being in the ones they are?

Here is my code so far:

    //Getting products that are need to go on sale page and have a special price
$collection = Mage::getModel('catalog/product')
            ->getCollection();
$collection ->addFieldToFilter('sale_exempt',1);
$collection ->addAttributeToFilter(
    array(
        array('attribute' => 'special_price', 'is'=>new Zend_Db_Expr('not null'))
    ));

var_dump($collection->getData());

$new_categoryId = 9;

foreach ($collection as $_product) {

}


texts: Backend model _afterSave _afterLoad methods?

texts:
I am making a simple plugin that would save some data to DB when you click "Save Config" button in system configurations. I have added this to my system.xml

<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_yesno</source_model>
<backend_model>storesave/config_save</backend_model>

And in Save.php I am using _afterSave() method. I select the 'yes', but it does not run the code the first time "Save config" button is clicked. It only runs the code after I click the button second time. But when I select 'No' option and press "Save config" it reruns the code before save happens.

So I tried the _afterLoad() method, but if it was saved with 'yes' option selected, it runs the code the moment I go to my config page before I even press "Save config".

Finally I tried Using both methods to make a workaround.

public function _afterSave(){
    $this->saveState = true;
}

public function _afterLoad()
{
    if($this->saveState == true){
        //execute code here
    }
}

But the _afterLoad() method does not trigger this way because $saveState always remains false.

So I would like to know why is this happening, and how could I make it work?

EDIT:

I use this as a check for yes No options:

   const XML_PATH_ENABLED = 'storesave/global/status';
    public function isEnabled(){
        return Mage::getStoreConfig(self::XML_PATH_ENABLED);
    }
    public function _afterSave()
    {
        if ($this->isEnabled() == true){
            //run the code
        }
    }

Even with this if selected state is Yes and I set it to No and Press "Save config", the _afterSave method still runs the code inside my if statement. So my thought is that how to make it not do that.


texts:
I want to list category page in magento which is located in
\app\design\frontend\default\\template\catalog\product\list.phtml.

In app\design\frontend\default\modern\layout\catalog.xml

<block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">

But the list.phtml is overrided by a extension having

app/design/frontend/default/default/template/extensionname/product/list.phtml

and its xml with

<reference name="product_list">
      <action method="setTemplate"><template>path/product/list.phtml</template></action>
</reference>

How to display category page from my theme's list.phtml.


texts: How to combine 3 flavors in 30 in to 1 product

texts:
I have 30 flavors of pizza.
Simple products.
I need to register a product that let me combine up to 3 flavors on a pizza only .. hi, split a pizza in 3 flavors ...
How to do this ?


texts: In product page right sidebar gets misplaced after adding cms block

texts:
I used below code in local.xml to add the cms block at the end of the product content, but it will push the right sidebar down (2columns-right is the template)!

<catalog_product_view>
        <reference name="content">
            <block type="cms/block" name="product-page-carousel" as="product-page-carousel" after="-">
                <action method="setBlockId"><block_id>product-page-carousel</block_id></action>
            </block>
        </reference>
</catalog_product_view>


texts: associated simple products lost when i add new values to configurable attribute

texts:
i added a attribute via installer script and using this as a configurable attribute. Now i have the problem that all associated products (of a configurable) are lost, if i add a new value to this attribute (within the magento backend attribute interface).

this is how i added the attribute:

$installer->addAttribute('catalog_product', 'colortype', array(
        'type'              => 'varchar',
        'backend'           => '',
        'frontend'          => '',
        'label'             => 'colortype',
        'input'             => 'select',
        'class'             => '',
        'source'            => 'eav/entity_attribute_source_table',
        'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
        'visible'           => true,
        'required'          => false,
        'user_defined'      => true,
        'default'           => '',
        'searchable'        => false,
        'filterable'        => 1,
        'comparable'        => true,
        'visible_on_front'  => 1,
        'unique'            => false,
        'apply_to'          => '',
        'is_configurable'   => true,
        'option'            => array(
            'values' => array (
                0 => 'Green',
                1 => 'Red',
                2 => 'Blue',
            )
        )
    ));

i thought that something went wrong with the way of how i added the attribute. this is why i am tried to update the attribute via script:

    $resource = Mage::getResourceModel('catalog/setup','catalog_setup');
    $entityTypeId = $resource->getEntityTypeId('catalog_product');
    $attributeId = $resource->getAttribute($entityTypeId, 'colortype','attribute_id');

    $resource->updateAttribute($entityTypeId, $attributeId, array(
        'frontend_input' => 'select',
        'backend_type' => 'int',
        'backend_model' => null,
        'attribute_model' => 'catalog/resource_eav_attribute',
        'source_model' => 'eav/entity_attribute_source_table',
    ));

its really strange: If I look at the simple products attribute, then the value is displayed correctly. but i can not select the simple product as associated product within the configurable product (associated products tab). The only way to avoid this problem is when I assign a different value to the products attribute, save and then re-assigns the correct value and save again.

can someone explain me how i could fix the problem? thanks a lot.


texts:
I have tried to changed the default URL of contact page in magento2 to my custom URL but it is not working at all.

I have tried as follows:

Put the following code in my custom module.xml

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

And then rewrite the route as follows in routes.xml file:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
   <router id="standard">
       <route id="contact" frontName="kontakt">
           <module name="Magento_Contact" />
       </route>
   </router>
</config>

Any Hint what is wrong going on here?


texts: "moving attributes" to attribute set programmatically

texts:
Is it possible to add a php file in root directory of magento?

$attribute_set_name = 'your attribute set name here';
$group_name = 'your attribute group here';
$attribute_code = 'your attribute code here';

$setup = new Mage_Eav_Model_Entity_Setup('core_setup');

//-------------- add attribute to set and group
$attribute_set_id = $setup->getAttributeSetId('catalog_product', $attribute_set_name);
$attribute_group_id = $setup->getAttributeGroupId('catalog_product', $attribute_set_id, $group_name);
$attribute_id = $setup->getAttributeId('catalog_product', $attribute_code);

$setup->addAttributeToSet($entityTypeId='catalog_product',$attribute_set_id, $attribute_group_id, $attribute_id);

I ran this code, but there is an error:

  Fatal error: Call to a member function getResourceConfig() on a non-object in C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\Resource\Setup.php on line 131


texts: Importing URL Rewrites Directly to Database is successful but not showing in admin nor working on the frontend

texts:
I have a CSV file that I am using to import about 600 entries to the core_url_rewrite table of my database.

The data that I am submitting is formatted as follows:

 url_rewrite_id     store_id    id_path                 request_path    target_path     is_system   options     description         category_id product_id
                    1           custom_168920477350     about-site      about-us/                   RP          Old URLs

Everything imports fine and all of the data is in the appropriate columns but when I go to the Magento backend to look at the URLs they are not displayed even after I reindex and clear cache.

Also, of course, they do not redirect on the front end.

Edit: I see now that Enterprise uses a different table. I'm investigating these to see if the import will work the same way. In the meantime I'm interested in any and all feedback.


texts: Magento 2 - enable cash on delivery only for specific shipment method in New Order in Backend

texts:
I used a Plugin in a custom module to set the isAvailable function for CashOnDelivery to false when shipping method "flatrate_flatrate" is selected.

file: /app/code/MyCompany/MyModule/Plugin/CashOnDeliveryPlugin.php

<?php
    namespace MyCompany\MyModule\Plugin;
    use Magento\Payment\Model\Method\AbstractMethod;
    use Magento\Quote\Model\Quote;
    class CashOndeliveryPlugin
    {

      /**
       * @var \Magento\Checkout\Model\Session
       */
       protected $_checkoutSession;

      /**
       * Constructor
       *
       * @param \Magento\Checkout\Model\Session $checkoutSession
       */
        public function __construct
        (
            \Psr\Log\LoggerInterface $logger,
            \Magento\Checkout\Model\Session $checkoutSession
         ) {
            $this->logger = $logger;
            $this->_checkoutSession = $checkoutSession;
            return;
        }

        public function aroundIsAvailable(\Magento\Payment\Model\Method\AbstractMethod $subject, callable $proceed)
        {
            $shippingMethod = $this->_checkoutSession->getQuote()->getShippingAddress()->getShippingMethod();
            if ($shippingMethod == 'flatrate_flatrate') {
                return false;
            }
            $result = $proceed();
            return $result;
          }
    }

and file: /app/code/MyCompany/MyModule/etc/di.xml

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\OfflinePayments\Model\Cashondelivery">
        <plugin name="cashondeliveryplug" type="MyCompany\MyModule\Plugin\CashondeliveryPlug" disabled="false" sortOrder="10"/>
    </type>
</config>

It works fine in frontend checkout, but doesn't work in New Order in Backend. What should I change in code to make it functional in Backend Order Creation?


texts: Customer name not appearing and products not showing in mini-cart, Magento 2

texts:
I have Magento 2.2.6 version. After signin, customer name is not showing on top dropdown bar, however if I reload the page aur goto another page it then appears.
Another issue is that when adding products to cart, first time the product is shown, after that if I add another product to cart then the mini cart shows "No products", however going to checkout/cart page, products appear there. It seems they are just not shown in mini-cart.
The issue appear to be in incognito mode. I have fpc enabled, and using varnish.


texts:
We have a custom Model override that works beautifully in developer mode, it has conditions to load classes based on the page the user is on. These conditions are ignored when the Magento is switched to production mode and only one condition is read based on the static generated content.

Is there any way to exclude Model or other overrides from the production mode static content generation?

Sample code:

namespace Module\Catalog\Model;

if ($available)
    {
        class ProductPlugin
                {
                        $collection->joinField(
                            'is_in_stock',
                            'cataloginventory_stock_item',
                            'is_in_stock',
                            'product_id=entity_id',
                            '{{table}}.stock_id=1',
                            'left'
                        )->addAttributeToFilter('is_in_stock', array('eq' => 0))->getSelect()->order(['is_in_stock desc']);
                }
    }
   else
    {
       class ProductPlugin
       {

       }
    }

As soon as the site is deployed in production the conditionals are not processed.


texts: Magento 2 : Displaying the database table values in frontend

texts:
In Magento 1.9 i used this code to get the database table values.

$model = Mage::getModel('task_creation/details');

   $collections = $model->getCollection();

foreach($collections as $collection)
{
  print_r($collection->getdata(''));
}

Now I am using Magento 2.1, what's the code I need to use for it. I am new to Magento 2.


texts: How to Create Extension Package in Magento 2?

texts:
In Magento 1.x we are creating Extension Package from System -> Magento Connect -> Package Extensions. After that we are going to publish the extension in Magento Connect.

I think it's an easy to understand and easy to create and publish.

In Magento 2.x how to create like above and publish the extension to MarketPlace (Magento Connect).

Could you please suggest me how to do it?


texts: Can't remove "Check out with Paypal" Button on cart? [Magento2]

texts:
I'm currently having the issue, that I cannot remove the Checkout with Paypal Button that comes from a Payment Option called Paypal Express Checkout.
In the Magento2 Configuration settings I did set "Display on Product Details Page" to "NO", but it doesn't seem to disable it.

I did clear Cache multiple times and still does not work. I've seen multiple people having this problem.


texts: Access Denied errors showing for a permission assigned user (created custom module) after installing SUPEE-6285

texts:
I installed SUPER-6285 patch on our Mangeto 1.13.1.0. and created a custom module for sales and assign that modules to a user. Showing access denied for that users

I applied the below function in my controller.

Path : controller/Adminhtml/OrderController.php

class Vtrio_OfflineOrders_Adminhtml_OrderController extends Mage_Adminhtml_Controller_Action
{
    protected function _isAllowed(){
       return Mage::getSingleton('admin/session')->isAllowed('sales/vtrio_offlineorders');
    }
}

adminhtml.xml

<?xml version="1.0"?>
  <config>
    <menu>
     <sales>
         <children>
           <vtrio_offlineorders>
             <title>Offline Orders</title>
             <action>adminhtml/order/</action>
             <sort_order>2</sort_order>
           </vtrio_offlineorders>
         </children>
     </sales>
   </menu>
   <acl>
    <resources>
      <admin>
        <children>
          <sales>
              <children>
                  <vtrio_offlineorders>
                      <title>Offline Orders</title>
                  </vtrio_offlineorders>
              </children>
            </sales>
         </children>
       </admin>
     </resources>
   </acl>
 </config>

When i open the custom order module and trying to create an order, first time the order is not getting created (2nd time onwards it will)


texts: Mageplaza Smtp Email: Username and Password not accepted

texts:
I'm trying to send an email by extension Mageplaza Smtp and when I config, and send mail, at first, when i enter Username and Password and click "Test now" in "Send test email" section, it sends email successfully as expected.

But then, I click "save config", and then the page reloaded. After that, i click "Test now" and the page show an error message says "Username and Password not accepted".

May i do something wrong?

Here are my config, please take a look:

Also here is default Magento config, I've change Enable to "No".

Thanks


texts: Associate Simple Products with Custom Options to Configurable Product

texts:
I am working on an inventory of 700+ simple products with custom options. I would like to make a a configurable product and associate these simple products WITH existing custom options.
Is this doable? Whats the best method to do it?

Thanks!


texts: Magento 2 getProductCollection Interceptor everytime

texts:
I would like to intercept and modify a product collection every time it is used.  However, I am having issues figuring out what functions to create a plugin for.   I mostly understand Interceptors, just need a pointer.

I tried with the categoy model but it didnt seem to work at all.

In di.xml

<type name="Magento\Catalog\Model\Category">
    <plugin disabled="false" name="Myextension_Something_Plugin_Category" sortOrder="0" type="MyExtension\Something\Plugin\Category" />
</type>

The function

public function afterGetProductCollection(AbstractDb $collection)
{
    var_dump($collection);
    return $collection;
}

EDIT:   It seems I can intercept other things like search but it will not intercept category.. I have no idea why.


texts: How to override text using block in whole magento 2...actually i want to override cart with bucket.....?

texts:
app/code/Vendor/Module/etc/di.xml

actully i am trying this link below here..
https://magenticians.com/magento-2-override-block/


texts: How to add product to cart in all storeviews?

texts:
I'm using this code:

I want to add a product to every cart. When I run the code below I always get the output: The stock item for Product is not valid.

I know it somehow has to do with the way I change the stores. Because if I don't change stores, the code works fine.

include_once('../app/Mage.php');
ob_start();
umask(0);
Mage::app();

    $stores = array_keys(Mage::app()->getStores());
        foreach($stores as $storeId){
            $store = Mage::app()->getStore($storeId);
            Mage::getModel('core/store')->load($storeId);
            Mage::app()->setCurrentStore($storeId);
            Mage::getSingleton('core/session', array('name'=>'frontend'));
            $session = Mage::getSingleton('customer/session');
            try{
                $product = Mage::getModel('catalog/product')->loadByAttribute('sku', $v[0]);
                $v[0] = $product->getId(); // fix for Mage problem with stock load id then add
                $product = Mage::getModel('catalog/product')->load($v[0]);
                $quote = Mage::getSingleton('checkout/session')->getQuote();
                $cart = Mage::getModel('checkout/cart');
                $cart->init();
                $cart->addProduct($product, array('qty' => $v[1]));
                $cart->save();
                Mage::getSingleton('checkout/session')->setCartWasUpdated(true);
            } catch (Exception $e) {
                $eReturn = $e;
                $returnJson['success']  = false;
                $returnJson['error']    = $eReturn;
                echo $eReturn;
            }
        }


texts:
I have two store views, for 2 languages.
I have a page 'foo' defined in both languages (i.e. store views). I'm using

$aCmsPage = Mage::getModel('cms/page')->load('foo', 'identifier');

However, I always get the page in the same language.

Shouldn't I get the page for the current store view?

What am I doing wrong?


texts: How to use block from module on CMS page?

texts:
I have a block class called Fekete_Newsletter2Go_Block_Form.

<?php
class Fekete_Newsletter2Go_Block_Form extends Mage_Core_Block_Template
{
    private $n2g;
    private $session;
    private $customer;

    public function __construct()
    {
        if ( !isset($this->n2g) ) {
            $this->n2g = Mage::Helper("fekete_newsletter2go");
        }
        if ( !isset($this->session) ) {
            $this->session = Mage::getSingleton('customer/session');
        }
        if ( !isset($this->customer) ) {
            $this->customer = $this->session->getCustomer();
        }
    }

    public function getEmail()
    {
        return $this->customer->getEmail();
    }
}

This is the config entry:

<global>
  ...
    <blocks>
        <fekete_newsletter2go>
            <class>Fekete_Newsletter2Go_Block</class>
        </fekete_newsletter2go>
    </blocks>

How can I use it on a CMS page?

I tried it like this:

{{block type="fekete_newsletter2go/form" template="fekete/Newsletter2Go/subscribe.phtml"}}

But then nothing is rendered, it only works with core/template.


texts: Upgrading from 2.2.5 to 2.2.6: Fatal error: Interface 'Laminas\ServiceManager\AbstractFactoryInterface' not found

texts:
Im trying to upgrade a Magento 2 site from 2.2.2 to the latest 2.3.  I've got up to 2.2.5 so far without issues.
When moving from 2.2.5 to 2.2.6 I am getting a fatal error when running php bin/magento setup:di:compile
Fatal error:  Interface 'Laminas\ServiceManager\AbstractFactoryInterface' not found in /var/www/html/setup/src/Zend/Mvc/Controller/LazyControllerAbstractFactory.php

I've added the Zend\\Mvc\\Controller line to the autoload PSR-4 section in the composer.json file as suggested elsewhere on the internet.
Here's the steps I follow to update (from a working 2.2.5):
php bin/magento maintenance:enable
composer require magento/product-community-edition 2.2.6 --no-update
composer update
composer dumpautoload
rm -rf var/cache/* var/page_cache/* generated/code/*
php bin/magento setup:upgrade
composer dumpautoload
php bin/magento setup:di:compile
php bin/magento indexer:reindex
php bin/magento cache:flush
php bin/magento maintenance:disable

Its at the php bin/magento setup:di:compile step where I get the fatal error.
AFAICT the Laminas ServiceManager AbstractFactoryInterface isn't anywhere in the Vendor dir.
Can anyone shed any light on this?


texts: How to change the Magento Directory structure for images when Importing

texts:
What I'm trying to do is change the default folder structure of imported images.
For example when you import an image magento defaults the directory structure to the first and second letter of the image to create the directory structure under /media/catalog/product/X/Y/XYimage.jpg

I want to be able to modify the core to allow me to change it to something like:
/media/catalog/product/SKU/XYZ/SKUXYZimage.jpg
hence the first 3 letters are the top level of the directory and the next 3 letters are the second level of the directory.


texts: Request does not match any route issue in magento 2

texts:
I have creating a extension for get cms static block content using rest api.

di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Snowdog\CmsApi\Api\PageManagerInterface"
                type="Snowdog\CmsApi\Model\PageManager" />
    <preference for="Snowdog\CmsApi\Api\BlockManagerInterface"
                type="Snowdog\CmsApi\Model\BlockManager" />
    <preference for="Snowdog\CmsApi\Api\Data\BlockInterface"
                type="Snowdog\CmsApi\Model\Block" />
    <preference for="Snowdog\CmsApi\Api\Data\PageInterface"
                type="Snowdog\CmsApi\Model\Page" />
    <preference for="Snowdog\CmsApi\Api\Data\PageSearchResultsInterface"
                type="Magento\Framework\Api\SearchResults" />
    <preference for="Snowdog\CmsApi\Api\Data\BlockSearchResultsInterface"
                type="Magento\Framework\Api\SearchResults" />
    <type name="Snowdog\CmsApi\Model\BlockManager">
        <arguments>
            <argument name="collectionProcessor" xsi:type="object">Magento\Cms\Model\Api\SearchCriteria\BlockCollectionProcessor</argument>
        </arguments>
    </type>
    <type name="Snowdog\CmsApi\Model\PageManager">
        <arguments>
            <argument name="collectionProcessor" xsi:type="object">Magento\Cms\Model\Api\SearchCriteria\PageCollectionProcessor</argument>
        </arguments>
    </type>
</config>

webapi.xml

    <?xml version="1.0"?>
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
    <!-- Cms Page -->
    <route url="/V1/snowdog/cmsPage/:pageId" method="GET">
        <service class="Snowdog\CmsApi\Api\PageManagerInterface" method="getById"/>
        <resources>
            <resource ref="Magento_Cms::page"/>
        </resources>
    </route>
    <route url="/V1/snowdog/cmsPageIdentifier/:identifier/storeId/:storeId" method="GET">
        <service class="Snowdog\CmsApi\Api\PageManagerInterface" method="getByIdentifier"/>
        <resources>
            <resource ref="Magento_Cms::page"/>
        </resources>
    </route>
    <route url="/V1/snowdog/cmsPage/search" method="GET">
        <service class="Snowdog\CmsApi\Api\PageManagerInterface" method="getList"/>
        <resources>
            <resource ref="Magento_Cms::page"/>
        </resources>
    </route>
    <!-- Cms Block -->
    <route url="/V1/snowdog/cmsBlock/:blockId" method="GET">
        <service class="Snowdog\CmsApi\Api\BlockManagerInterface" method="getById"/>
        <resources>
            <resource ref="Magento_Cms::block"/>
        </resources>
    </route>
    <route url="/V1/snowdog/cmsBlockIdentifier/:identifier/storeId/:storeId" method="GET">
        <service class="Snowdog\CmsApi\Api\BlockManagerInterface" method="getByIdentifier"/>
        <resources>
            <resource ref="anonymous"/>
        </resources>
    </route>
    <route url="/V1/snowdog/cmsBlock/search" method="GET">
        <service class="Snowdog\CmsApi\Api\BlockManagerInterface" method="getList"/>
        <resources>
            <resource ref="Magento_Cms::block"/>
        </resources>
    </route>
</routes>

passing url

http://vaibhav.local/rest/V1/snowdog/cmsBlock?29

getting error

When I am hit URL I got Request does not match any route. issue.

Can anyone help me to solve this.

Thanks In advance..!


texts:
Using This guide facing an Error while upgrade Magento2.3 to Magento2.4

Kindly Guide How can I solve it?


texts:
I was editing config > web settings trying to fix an error that only happens in safari, and my fiddling, lack of experience/knowledge, trial and error approach all lead to the white screen of death both back and frontend.

How do I resolve this? Im unable to get the error report to show by editing the # out of the appropriate line in index.php but nothing.

I guess my two questions are - how do I find the correct settings for web area in config? pic attached of current settings.
and failing being able to fix this myself how do I find someone who is an expert and I can pay to fix this?


texts: Magento 1.9.1.1 : Create Store View : Cardinality violation: 1241 Operand should contain 1 column(s)

texts:
Magento Version 1.9.1.1

In adminpanel: /system/manage store/ I Created new website and then created a store for it. When i tried to create store view it shows bellow error(in var/reports)

  a:5:{i:0;s:229:"SQLSTATE[21000]: Cardinality violation: 1241 Operand should contain 1 column(s), query was: SELECT `core_store`.* FROM `core_store` WHERE (`core_store`.`code`='15', 'uaeview', 'uaeview', '0', '', '', '') ORDER BY `sort_order` ASC";i:1;s:2631:"
  #0 lib\Varien\Db\Statement\Pdo\Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
  #1 app\code\core\Zend\Db\Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
  #2 lib\Zend\Db\Adapter\Abstract.php(480): Zend_Db_Statement->execute(Array)
  #3 lib\Zend\Db\Adapter\Pdo\Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT core_st...', Array)
  \#4 lib\Varien\Db\Adapter\Pdo\Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('SELECTcore_st...', Array)
  #5 lib\Zend\Db\Adapter\Abstract.php(756): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
  #6 app\code\core\Mage\Core\Model\Resource\Db\Abstract.php(380): Zend_Db_Adapter_Abstract->fetchRow(Object(Varien_Db_Select))
  #7 app\code\core\Mage\Core\Model\Store.php(323): Mage_Core_Model_Resource_Db_Abstract->load(Object(Mage_Core_Model_Store), Array, 'code')
  #8 app\code\community\Ameex\Adminlog\Model\Observer.php(29): Mage_Core_Model_Store->load(Array)
  #9 app\code\core\Mage\Core\Model\App.php(1338): Ameex_Adminlog_Model_Observer->getLog(Object(Varien_Event_Observer))
  #10 app\code\core\Mage\Core\Model\App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Ameex_Adminlog_Model_Observer), 'getLog', Object(Varien_Event_Observer))
  #11 app\Mage.php(448): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
  #12 app\code\core\Mage\Core\Controller\Varien\Action.php(527): Mage::dispatchEvent('controller_acti...', Array)
  #13 app\code\core\Mage\Adminhtml\Controller\Action.php(160): Mage_Core_Controller_Varien_Action->preDispatch()
  #14 app\code\core\Mage\Core\Controller\Varien\Action.php(407): Mage_Adminhtml_Controller_Action->preDispatch()
  #15 app\code\core\Mage\Core\Controller\Varien\Router\Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('save')
  #16 app\code\core\Mage\Core\Controller\Varien\Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
  #17 app\code\core\Mage\Core\Model\App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
  #18 app\Mage.php(684): Mage_Core_Model_App->run(Array)
  #19 index.php(173): Mage::run('', 'store')
  #20 {main}";s:3:"url";s:72:"/index.php/admin/system_store/save/key/e7a8f79dab3ffee0d6b234ad08158164/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:5:"admin";}


texts: If my base currency is INR and want to checkout with AUD using paypal express checkout which currency is shown in paypal confirmaiton

texts: If my base currency is INR and want to checkout with AUD using paypal express checkout which currency is shown in paypal payment confirmation page.


texts: Bypass php version check when installing extension

texts:
I am using a community extension but it wont let me upload/install the extension. It says it supports 5.3 to 5.6.0 and I am running 5.6.23 so I figured its safe to install it on my system.

So question is, how can I bypass such checks?


texts: Call method of Abstract class from Child class

texts:
I want to modify setDateRange method in Mage_Reports_Model_Resource_Report_Collection_Abstract class. I know it's not possible to override an Abstract class, so I searched for its child and it was another abstract: Mage_Sales_Model_Resource_Report_Collection_Abstract.
I searched again and I found Mage_Sales_Model_Resource_Report_Order_Collection. I overrode it and modified the method. So I have this code:

class Namespace_Module_Model_Sales_Resource_Report_Order_Collection
extends Mage_Sales_Model_Resource_Report_Order_Collection
{
    /**
     * Set date range
     *
     * @param mixed $from
     * @param mixed $to
     * @return Mage_Sales_Model_Resource_Report_Collection_Abstract
     */
    public function setDateRange($from = null, $to = null)
    {
        var_dump('modified!');
    }
}

Problem is my method did not call. I wrote a script to make sure that Magento knows about my class:

require 'app/Mage.php';

Mage::app();

$c = Mage::getModel('sales/resource_report_order_collection');

var_dump(get_class($c)); // Output: Namespace_Module_Model_Sales_Resource_Report_Order_Collection
var_dump(method_exists($c, 'setDateRange')); // Output: true
var_dump($c->setDateRange()); // Output: modified!

First, I want to know why Magento never calls my method? And second, how should I modify that method?

Update:

I have a long config.xml file and I don't think it's necessary to paste it here. But here's models part:

<models>
  <namespace_module>
    <class>Namespace_Module_Model</class>
  </namespace_module>
  <sales>
    <rewrite>
        <resource_report_order_collection>Namespace_Module_Model_Sales_Resource_Report_Order_Collection</resource_report_order_collection>
    </rewrite>
  </sales>
  <eav>
    <rewrite>
      <entity_attribute_backend_datetime>Namespace_Module_Model_Eav_Entity_Attribute_Backend_Datetime</entity_attribute_backend_datetime>
    </rewrite>
  </eav>
  <catalog>
    <rewrite>
      <product_attribute_backend_startdate>Namespace_Module_Model_Catalog_Product_Attribute_Backend_Startdate</product_attribute_backend_startdate>
      <product_attribute_backend_startdate_specialprice>Namespace_Module_Model_Catalog_Product_Attribute_Backend_Startdate_Specialprice</product_attribute_backend_startdate_specialprice>
    </rewrite>
  </catalog>
</models>


texts: Magento 2 - Two dependencies in one field form?

texts:
It is possible to add 2 depedencies to 1 field?

Like this?

->addFieldMap($field_to_evaluate->getHtmlId(), $field_to_evaluate->getName())
->addFieldMap($field_to_show->getHtmlId(), $field_to_show->getName())
->addFieldDependence
 (
   $field_to_show->getName(),
   $field_to_evaluate->getName(),
   'dependecy 1'
  )
->addFieldDependence
  (
    $field_to_show->getName(),
    $field_to_evaluate->getName(),
   'dependecy 2'
  )

With this code it looks like only add the first dependency

Can i also indicate if the $field_to_show hides insteand of show?


texts: How should I call upsell.phtml file in sales/order/items.phtml file?

texts:
I want You may also like section on order at the end.
The content on order page comes from sales/order/items.phtml file.
I want to call the "you may also like" section in this file, the You may also like section comes from product/list/upsell.phtml file. Now I want to call this section in sales/order/items.phtml file
I also tried to make changes in xml file. How can I get this?

<sales_order_view translate="label">
    Customer My Account Order View
    <update handle="customer_account"/>
    <reference name="my.account.wrapper">
        <block type="sales/order_info" as="info" name="sales.order.info">
            <block type="sales/order_info_buttons" as="buttons" name="sales.order.info.buttons" />
        </block>
        <block type="sales/order_view" name="sales.order.view">
            <block type="sales/order_items" name="order_items" template="sales/order/items.phtml">
                <action method="addItemRender"><type>default</type><block>sales/order_item_renderer_default</block><template>sales/order/items/renderer/default.phtml</template></action>
                <action method="addItemRender"><type>grouped</type><block>sales/order_item_renderer_grouped</block><template>sales/order/items/renderer/default.phtml</template></action>
                <block type="sales/order_totals" name="order_totals" template="sales/order/totals.phtml">
                    <action method="setLabelProperties"><value>colspan="4" class="a-right"</value></action>
                    <action method="setValueProperties"><value>class="last a-right"</value></action>
                    <block type="tax/sales_order_tax" name="tax" template="tax/order/tax.phtml" />
                </block>
                <block type="product/list_upsell" name="upsell_products" template="product/list/upsell.phtml" />
            </block>
        </block>
    </reference>
    <reference name="sales.order.info">
        <action method="addLink" translate="label" module="sales"><name>view</name><path></path>Order Information</action>
        <action method="addLink" translate="label" module="sales"><name>invoice</name><path>*/*/invoice</path>Invoices</action>
        <action method="addLink" translate="label" module="sales"><name>shipment</name><path>*/*/shipment</path>Shipments</action>
        <action method="addLink" translate="label" module="sales"><name>creditmemo</name><path>*/*/creditmemo</path>Refunds</action>
    </reference>
    <block type="core/text_list" name="additional.product.info" translate="label">
        Additional Product Info
    </block>
</sales_order_view>


texts: 403 errors on wysiwyg/media folder and product images

texts:
Another developer ran rm -rf on the pub/static folder. After I cleared cache none of the images show up. Wysiwyg folder images and product images do not show up.

They come back as 403 errors.

Is that an htaccess issue?


texts: Magento 1.9: Want to see Menu and search bar in the header of the home page

texts:
In the header of the home page, I see the menu, search and account section only when I reduce the browser width of about 700px.  How can I make the these three appear all the time?
When I see the Chrome developer tool, the area seems height of zero px, when the three field disappear.
Thanks a lot!!


texts: SOAP v2 call returns empty object/array on orderInfo

texts:
Magento 1.9.3

currently testing SOAP v2 calls on sales_order.info with the following code:

$proxy = new Client('http://magento.dev/api/v2_soap/?wsdl');
$session= $proxy->login('xxx', 'xxx');
$result = $proxy->salesOrderInfo($session, '100000001');
var_dump($result);
$proxy->endSession($session);

Returns:

object(stdClass)#162 (0) { }

Though, when I use and try instead for instance,

$result = $proxy->directoryCountryList($session);

I receive a proper response.

Does someone have a hint for me to look for?
Using zendframework/zend-soap package.

Try&Catch won't throw me an exception.

Thanks, alot guys.


texts: Invoice amount is not correct after generating invoice magento 1.9

texts:
I just clicked on create invoice button and nothing else but magento calculation shows wrong amount in invoice.

i don't know how total paid is only 499.50. Can anyone help me, maybe there's something I'm missing. In this pic.

Update : This issue is solved as it caused by some other extension which extended the invoice system.


texts: In Magento 2 , configurable product options disabled after the first selection.How to reset option?

texts:
I am using Magento 2, I have some Configurable Products with a lot of variants (in some cases there are 5 attributes, each with several options). Each variant has a Simple Product associated with it, and the prices are set up under the Super Product Attribute Configuration.

Everything looks correct in Admin as far as I can tell.

On the Front end product page, the first time you select your options is fine, some options are disabled (greyed out) based on the choices you select. (For example, a certain Size may not be available in a certain Colour and that Colour may not be available for one if the other choices etc)

However, if you then change your mind, and what to select a different combination of options, you can't do this because some options remain disabled.

You have to reload the page completely, to reset all the options back to 'Choose an option...'.like

Currently, if I want to change the option value but that value can't be changed as I attached a screenshot so can anybody help? how to do without refreshing page?


texts: Magento 1.8.1.0 : No Subcategories on home screen

texts:
On our website www.circuit-parts.ch the subcategories will not be shown on the start screen when you roll over with the mouse.

But, if you click a category, on the second page it shows all subcategories by roll over with the mouse.

So the problem is only on the start screen.. on the first page..
why is that?

Theme: Fortis 2.0.2-B


texts: How to add custom field in Customer admin and process that data

texts:
I want to add custom field in Customer admin and i need to process some operations but those operations should not to save in database.

I am following this tutorial https://webkul.com/blog/tab-with-form-in-admin-customer-edit-magento-2-0/

But not able to figure it out. i don't know how to get that data ?. Also in this code while initialise $this->initForm(); data is not posted from this form.

Also not able to figure it out where $rowcom is coming from .

Any help would be helpful .


texts: Why cart ID is null even though i can see the id from \Magento\Checkout\Helper\Cart

texts:
I am trying to get the cart value, i can get the quote id when i do x-debug.

if i try to get the id i get NULL

Anyone know why i get this


texts:
I am working with Magento2 and have the problem, that my changes are only visible after a full php bin/magento setup:static-content:deploy en_US.

Prerequisites:

Magento 2.1.0
Linux VM with Apache / PHP7
Developer mode active
Caches inactive and flushed

I changed a html-file for a ko-template in a custom module, and tried to see the changes in frontend without a full static deploy. But it still displayed the old code. According to different people i asked and digged through blogs / docs i found out, i should remove these directories:

pub/static/frontend
var/di
var/view_preprocessed
var/generation

The .htaccess in pub/static was not removed. But after doing this, no JS / CSS files were available in browser and also were nothing was generated in pub/static/frontend except the _requirejs directory.

I ran out if ideas and working like this is really slow and annoying. According to other developers, it should work like this. What is the correct workflow here?

I apprechiate your help!


texts: How to add a sub menu button in Magento 2 Admin Product Panel?

texts:
How do I add this sub menu button?

The button when clicked basically shows a table, that's about it for now.
I'm quite new to magento and it would help if you can explain at least a little bit.

How to get to the button

What it can look like after clicking the button. For now, just the table would suffice. (ignore the table headings at the moment since I'm just trying it out on the Luma theme.)


texts: Magento 2 - Display Attribute on Cart Page

texts:
I need to display a few attributes in the cart page.
How can i accomplish that?


texts: How to get bundle options qty ? Magento 2

texts: How to get bundle product options qty from $order->getAllVisibleItems()  ?


texts:
I have the code below for the wholesale customers (they see msrp)
I want to show below this: Suggested price: (special price) for your customers

<?php echo $this->getChildHtml('product_type_data_extra') ?>
<?php   if(Mage::getSingleton('customer/session')->isLoggedIn()):  ?>
    <?php $groupId = Mage::getSingleton('customer/session')->getCustomerGroupId(); ?>
    <?php if($groupId == '2'): ?>
        <?php $_msrpPrice = $this->helper('core')->currency($_product->getMsrp(),true,true) ?>
        <?php if($_product->getMsrp()): ?>

                    <span class="price" id="product-price-<?php echo $_product->getId(); ?>">
                        <?php echo $_msrpPrice; ?>  &nbsp;&nbsp;excl. VAT

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

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


texts: How to check a custom attribute from $block?

texts:
I have a custom attribute I need to check and if its 'Catalog' then I want to hide the price as its not available on the site. If its one of the others then it should display. Originally I did this with

  `if($block->getDisplayValue() != 0.00)

but now I am adding custom stuff that starts at a 0 cost and the price depends on options chosen. if the item can be purchased but doesnt have a price I would still like 0.00 to display.
I have used the attribute in other places starting from$_productbut that is not working here. How do I start at the$block` and get to my custom attribute within this file?

my default.phtml:
<

 ?php
    /**
     * Copyright © Magento, Inc. All rights reserved.
     * See COPYING.txt for license details.
     */

    // @codingStandardsIgnoreFile

    ?>

    <?php /** @var \Magento\Framework\Pricing\Render\Amount $block */ ?>
    <?php if($block->getDisplayValue() != 0.00){ ?>
        <span class="price-container <?= /* @escapeNotVerified */ $block->getAdjustmentCssClasses() ?>"
                <?= $block->getSchema() ? ' itemprop="offers" itemscope itemtype="http://schema.org/Offer"' : '' ?>>
            <?php if ($block->getDisplayLabel()): ?>
                <?= /* @escapeNotVerified */ $block->getDisplayLabel() ?>
            <?php endif; ?>
            <span <?php if ($block->getPriceId()): ?> id="<?= /* @escapeNotVerified */ $block->getPriceId() ?>"<?php endif;?>
                <?= ($block->getPriceDisplayLabel()) ? 'data-label="' . $block->getPriceDisplayLabel() . $block->getPriceDisplayInclExclTaxes() . '"' : '' ?>
                data-price-amount="<?= /* @escapeNotVerified */ $block->getDisplayValue() ?>"
                data-price-type="<?= /* @escapeNotVerified */ $block->getPriceType() ?>"
                class="price-wrapper <?= /* @escapeNotVerified */ $block->getPriceWrapperCss() ?>"
            ><?= /* @escapeNotVerified */ $block->formatCurrency($block->getDisplayValue(), (bool)$block->getIncludeContainer()) ?>
            <?php if ($block->hasAdjustmentsHtml()): ?>
                <?= $block->getAdjustmentsHtml() ?>
            <?php endif; ?>
            <?php if ($block->getSchema()): ?>
                <meta itemprop="price" content="<?= /* @escapeNotVerified */ $block->getDisplayValue() ?>" />
                <meta itemprop="priceCurrency" content="<?= /* @escapeNotVerified */ $block->getDisplayCurrencyCode() ?>" />
            <?php endif; ?>

    <?php } ?>


texts: How to Get Customer data by telephone number in Magento2?

texts: I have a telephone number which is given in Default address..by using this telephone  number i need to get Customer Full data.Data like customer id, customer full name..etc


texts: Mass update doesnt work in Magento 2.3.2

texts:
I am using bulk action feature in admin, on catalog page when am trying to update attribute am getting below error

  Got error 'PHP message: PHP Fatal error: Uncaught Error: Cannot
  instantiate interface
  Magento\Framework\MessageQueue\ConfigInterface in
  /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:116

Any smart idea what can be wrong
I tried

  cache clean, remove generated code, compile di

but nothing helps


texts: What new tables need to be created when building module for custom attributes?

texts:
Magento 2.2 -- I am trying to build a module that would allow for custom attributes to be created in the admin panel.  At this point, I'm stuck on what tables need to be created to allow for that functionality.  Do I need to create one table that links to another?  That's what I've seen elsewhere in the core code...

Thanks!


texts: How do most banks handle authorization voids?

texts:
There's a lot of outdated information around the web discussing how banks handle a void on a credit card authorization. What I know is still true is that it is the bank's discretion whether (and when) to release their hold on funds or credit line from the authorization. My question is what the most common approach banks (at least in the United States) take with this?

Older sources indicate that most banks will ignore a request to release an authorization, while newer sources seem to be more optimistic about banks releasing funds, but I've not seen any data or explicit statements about a change. I would love to see some actual numbers around this, but experience by anybody operating larger stores would be useful too.

Note that this is question is not specific to Magento. I'm asking here since it's the most specifically e-commerce-related community on StackExchange.


texts: Create an Interceptor/Observer to trigger action when specific page is loaded

texts:
I want to send info to third party services about the views on pages like cart, products, checkout, etc. This info is sent whenever someone visits the respective page or view. For example, when a client sees a product on my store, I want to send the info about the product, time, etc.
Does anynone have a clue of how to do this?


texts: How can I modify the title of a category in magento?

texts: I'm looking to add a simple <hr> beneath the category name of every single product view page. Where can i locate the file responsible and at what line?


texts: How do I add a css class to a CMS static block?

texts:
Currently working on a magento homepage layout that includes a static block widget through the CMS (as opposed to referencing it through XML layouts) but no matter what I do I can't alter the classes generated when rendering.

The widget currently renders the following tag

<div class="widget block block-static-block"> </div>

I have tried adding it through the htmlClass argument through a referenceblock to the widget ID in layout XML but that's not working. Any other ideas?


texts: Magento adding conditions on catalog price rules causes ERR_TOO_MANY_REDIRECTS

texts:
I am using Magento 2.3 installed via CPanel from hosting

I am trying to create a catalog price rule,
when I click on condition and selects Catalog it takes time to load then displays an error

I have tried this on multiple browsers , (my website not using https)

check the video I Captured for my problem

https://youtu.be/6B8qFuUgf_c