texts: Magento 2 System Configurations not showing

texts:
I am trying to bring some system configurations for my custom module in the backend. I wrote the following code for the configurations but I am not getting any results.

  Tm/Productpoll/etc/acl.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
<acl>
    <resources>
        <resource id="Magento_Backend::admin">
            <resource id="Magento_Backend::stores">
                <resource id="Magento_Backend::stores_settings">
                    <resource id="Magento_Config::config">
                        <resource id="Tm_Productpoll::config" title="Productpoll Section" sortOrder="50" />
                    </resource>
                </resource>
            </resource>
        </resource>
    </resources>
</acl>
</config>

  Tm/Productpoll/etc/adminhtml/system.xml

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

        <class>separator-top</class>
        Product Poll Settings
        <tab>productpoll</tab>
        <resource>Tm_Productpoll::config</resource>
        <group id="general_settings" translate="label" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1">
            General Settings
            <field id="enable_disable" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                Enable
                <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
            </field>
        </group>

</system>
</config>

Can anyone help me out.


texts: How to automatically add customers to customer group based on admin that added them

texts:
I need to make happen following:

I have five admins that can only access "Customer" area
They are adding customers to buy in the front end
Customers are divided into five groups

I need to make the process of adding users so it excludes choosing to which group customer is added but it needs to be added automatically based on which admin is adding the user.


texts: Magento 2 Use same Product attribute with different values for different categories

texts:
I've created product drop-down attribute 'Types' for my project. But I want different values of that attribute for different category sections. For example: Let's say a category can be of type a) Fruits or b) Vegetables So for the category Fruits only options/values like Mango, Banana etc. should be visible and not the ones associated with Vegetables.

How to achieve this?


texts: Load customer by ID in Helper/Class or Model/Class | Magento 2

texts:
I can load in controller with:
\Magento\Customer\Api\CustomerRepositoryInterface $customerRepositoryInterface,

as:
$customer = $this->_customerRepositoryInterface->getById(1);

and using CustomerFactory:
\Magento\Customer\Model\CustomerFactory $customerFactory,

as:
$customer=$this->_customerFactory->create();
        $customer->setWebsiteId(1);
        $customer->load(1);
        $data= $customer->getData();
        print_r($data);exit;

But both of them are not working in Model/MyClass and Helper/Myclass
Errors is
Fatal error: Uncaught Error: Call to a member function getById() on null
Please mention the missing or other way!!
Update
Here is my full constructor for this class:
public function __construct(
\Magento\Customer\Model\Customer $customerModel,
\Magento\Customer\Model\CustomerFactory $customerFac,
\Zend\Http\Client $zendClient,
\Magento\Customer\Model\Session $customerSession,
\Magento\Store\Model\StoreManagerInterface $storeManager,
\Magento\Customer\Api\CustomerRepositoryInterface $customerRepositoryInterface,
\Magento\Customer\Api\AddressRepositoryInterface $addressRepositoryInterface,
\Magento\Customer\Model\Group $customerGroupCollection,
\Magento\Customer\Model\ResourceModel\CustomerFactory $customerFactory) {
    $this->customerModel = $customerModel;
    $this->customerFactory = $customerFactory;
    $this->zendClient = $zendClient;
    $this->_storeManager = $storeManager;
    $this->_customerFac = $customerFac;
    $this->_customerSession = $customerSession;
    $this->_customerRepositoryInterface = $customerRepositoryInterface;
    $this->_customerGroupCollection = $customerGroupCollection;
    $this->_addressRepositoryInterface = $addressRepositoryInterface;
}


texts: Display related products on category view

texts:
Currently have a fancybox loading when "add to basket" is selected from a category page. The fancybox displays required custom options, like colour etc, so you dont have to visit the product page to add it to basket.

I'd like to display related products within that fancybox also, any ideas?

I currently have a ajaxoptions.phtml with container2 added etc and a ajax.xml, but no idea how to get related into that fancybox.

thanks


texts:
Im trying to create a custom route on the administration, but is not working, it gives me a 404.

config.xml:

<global>
...
</global>

    <admin>
        <routers>
            <cloud_magni>
                <use>admin</use>
                <args>
                    <module>Cloud_Magni</module>
                    <frontName>secondinvoice</frontName>
                </args>
            </cloud_magni>
        </routers>
    </admin>
</config>

app/code/local/Cloud/Magni/controllers/Adminhtml/IndexController.php

class Cloud_Magni_IndexController extends Mage_Adminhtml_Controller_Action
{

    public function sayHelloAction(){
        echo "Hello World";
    }
}

The url im accessing is:

https://somedomain.com/index.php/admin/secondinvoice/sayHello/key/018460841df56cd3a7fbe2d720d750d2/


texts:
If I am creating a block which is type 'Mage_Adminhtml_Block_Widget_Grid'  in my controller like so...

$block = $this->getLayout()->createBlock('mymod/adminhtml_mymod_my_grid');

I can get the html like so...

$block->getHtml();

Is there any way I can get the number of rows the grid returns? Something like...

$block->getRowTotal();


texts:
I want to add Icons for Cart, Wishlist and Account Links in the header.

I placed them /app/design/frontend/vendor/theme/web/images/icons.

I know I can set the icons like (example cart):

.minicart-wrapper .action.showcart:before {
         content: url(http://your-domain.com/.../cart-image.png);

}

But: Whats the URL to the Icons?

First I tried it like

http://your-domain.com/app/design/frontend/vendor/theme/web/images/icons/cart.png.
That not worked, but that's okay.

So I checked out how the URL to the logo is and them I could find a working URL:

http://your-domain.com/static/version1533293004/frontend/vendor/theme/store/images/icons/Cart.png.

But there is 'version1533293004', that's probably a problem?

So, how do I get working URLs for my Icons?

Edit:
Or can I override the default templates for this in my Theme?
I kind of have my troubles with the Magento2 docs, hard to find such specific things.


texts: shopping cart discount rule only applying to specific products

texts:
I have a shopping cart rule that applies 15% discount if customer has $500 or more of a specific category of products in cart. It's working fine, but how do I only apply the 15% to that category total and not entire cart total?

For example the cart rule is 15% discount on all tires and total over $500.

Shopping cart:

X Tires - $650

Gift card - $300

Rims - $1200

Total - $2150

The discount should be $97.50 not $322.50


texts: Magento 2: get latest Bestseller collection

texts:
I am fetching Bestsellers like this:

protected $_collectionFactory;

\Magento\Sales\Model\ResourceModel\Report\Bestsellers\CollectionFactory $collectionFactory,

$this->_collectionFactory = $collectionFactory;

$bestSellerProdcutCollection = $this->_collectionFactory->create()
        ->setModel('Magento\Catalog\Model\Product')
        ->setPageSize(8)
        ->setPeriod('month');

Issue is this that this is not giving me latest month entry first.
I mean if in collection I have records from 2012 to 2018, I am getting first records of 2012. And as I need only 8 records so every time getting the same records.

Not getting how I can sort and get 2018 records first ?


texts:
I want to get the last query executed in a controller.

If there's a different ways in different parts i appreciate full information.


texts:
I have created a module.
All working fine.
Just want to extend one file but can't success.

I added extra field at admin tier price using this file.

\Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\AdvancedPricing.php

function name: getTierPriceStructure

I want to extend this file in my module.

I tried this code but not shown extended file code.

path:WebMax\TirePriceAttrib\etc\adminhtml\di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<virtualType name="Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\Pool">
    <arguments>
        <argument name="modifiers" xsi:type="array">
            <item name="advanced-pricing" xsi:type="array">
                <item name="class" xsi:type="string">WebMax\TirePriceAttrib\Ui\DataProvider\Product\Form\Modifier\AdvancedPricing</item>
                <item name="sortOrder" xsi:type="number">90</item>
            </item>
        </argument>
    </arguments>
</virtualType>


texts:
I tried to update my magento 1.9.3 version to magento 1.9.4.1 by replacing the files by magento 1.9.4.1. After that i am getting an 500 internal server error.

How can I resolve this? I am using cPanel to replace the files.


texts:
We have a Grouped product that consists of 3 books. When the customer selects the grouped product, they are given checkboxes to select each of the three books and they get placed in the cart as three separate line items.

We have a Shopping Cart Price rule that discounts the "group" by $20.

Now, when the customer selects a single group, the discount is applied. But then they select more than one of the grouped products, the discount is only being applied once.

How can I make that discount apply to ALL?

Here's the Conditions and Actions:


texts: Incorrect Currency for Payment - Checkout showing EURO & £

texts:
I have 2 websites, UK - Currency £ and DE - Currency EURO.  All the prices on the DE website convert correctly into EUROs as expected.  When I get to the chechout, everything is in EURO except for the final payment amount which is showing in £ and when it goes to paypal or HSBC it passes across the value in £ instead of EURO!

I guess I am missing a setting somewhere???  Where else should I be looking for this setting?

Configuration > Currency is set correct for each website.


texts:
I am implementing a shipping method for my store. My method is based on the subtotal value so I need to get subtotal value in my module. How can I call subtotal value in magento 2.2?
for example I want my shipping price be: subtotal/100


texts: Helper Data file not loading when I add system payment section

texts:
I am trying to customize a new payment gateway. Below is my config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Ucs_Najm>
            <version>0.0.1</version>
        </Ucs_Najm>
    </modules>
    <global>
        <models>
            <ucsnajm>
                <class>Ucs_Najm_Model</class>
            </ucsnajm>
        </models>
        <helpers>
            <ucsnajm>
                <class>Ucs_Najm_Helper</class>
            </ucsnajm>
        </helpers>
    </global>
</config>

And below is my system.xml

<?xml version="1.0"?>
<config>
    <sections>
        <payment>
            <groups>
                <ucsnajm translate="label" module="ucs_najm">
                    UCS - NAJM
                    <sort_order>110</sort_order>
                    <show_in_default>1</show_in_default>
                    <show_in_website>1</show_in_website>
                    <show_in_store>1</show_in_store>
                    <fields>
                        <active translate="label">
                            Enabled
                            <frontend_type>select</frontend_type>
                            <source_model>adminhtml/system_config_source_yesno</source_model>
                            <sort_order>1</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </active>
                    </fields>
                </ucsnajm>
            </groups>
        </payment>
    </sections>
</config>

Helper Data .php file is located inside app/code/local/Ucs/Najm/Helper

<?php
class Ucs_Najm_Helper_Data extends Mage_Payment_Helper_Data {

}

But I am getting below error


texts: How to remove index from module in Magento 2

texts:
Eg : http://www.example.com/module/index/index

In Magento 1 we can do in etc/config.xml like

...
    <rewrite>
       <store_url>
            <from><![CDATA[/module\/(.*)/]]></from>
            <to><![CDATA[module/index/index/id/$1/]]></to>
                <complete>1</complete>
        </store_url>
    </rewrite>
  ...


texts: Magento 1.9: Get Product details for a Customer Order

texts:
I am trying to get the product_id of each orders that the customer has ordered.

One simple way is to fetch all the orders, and for each order have a loop to get all items for each order. Which will be too many database queries.

What I am trying to do is join sales/order_collection and sales_flat_order_item w.r.t the order_id, but the problem which is happening is, it is not able to join as in sales_flat_order_item there are columns with same order_id.

My code is as following :

 $orders = Mage::getResourceModel('sales/order_collection')->addFieldToSelect('*')
            ->addFieldToFilter('main_table.customer_id', Mage::getSingleton('customer/session')->getCustomer()->getId());
 $orders->getSelect()->joinLeft(
            array('order_item' => 'sales_flat_order_item'),    // joined table alias
            "order_item.order_id=main_table.entity_id",      // join condition, main_table->predefined alias.
            array(order_item.product_id) // select
        );

Is there any way I can do that?


texts: Magento 2: Add VIP pricing that's always 5% off normal pricing?

texts:
I'm trying to add a new line of pricing info to my Magento 2 website, for example, if regular price of an item is $10, it will show "VIP price: $9" under the regular pricing, the new price will always be a fixed % off the retail price. And I need this new price to show on both product listing and on product details page.

This price doesn't need to be used on checkout as it's purely for information only. Can anyone point out which direction I should go?

Thank you in advance!!


texts: Magento2 Add additional js files to home page only

texts:
Is it possible to add additional javascript files to just the home page in Magento 2?

The current code works. However the files are placed on every page which is not needed.

    Theme/Magento_Theme/layout/default_head_blocks.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <script src="Magento_Catalog::js/sample1.js"/>
        <link src="js/sample.js"/>
    </head>
</page>


texts: How to check if column exist before trying to add it to the table?

texts:
We are using the Extension FollowUp E-Mail from AheadWorks. The Extension has bugs in the sql install scripts... they are trying to add a column to a table but don't check if the column does already exist, which causes an error if the column already exists.

<?php
$installer = $this;

/* $installer Mage_Core_Model_Resource_Setup */

$installer->startSetup();
$installer->run("
    ALTER TABLE {$this->getTable('awcore/logger')} ADD `custom_field_4` VARCHAR( 255 ) NOT NULL AFTER `custom_field_3`;
    ALTER TABLE {$this->getTable('awcore/logger')} ADD INDEX ( `custom_field_4` );
");
$installer->endSetup();

I get this error :

a:5:{i:0;s:197:"Error in file: "/srv/www/vhosts/hf/app/code/local/AW/Core/sql/awcore_setup/mysql4-upgrade-1.0.1-1.0.2.php" - SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'custom_field_4'
/srv/www/vhosts/hausfux/app/code/core/Mage/Core/Model/Resource/Setup.php(644
#1 /srv/www/vhosts/hf/app/code/core/Mage/Core/Model/Resource/Setup.php(437): Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade', '1.0.1', '1.0$
#2 /srv/www/vhosts/hf/app/code/core/Mage/Core/Model/Resource/Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('1.0.1', '1.0.3')
#3 /srv/www/vhosts/hf/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /srv/www/vhosts/hf/app/code/core/Mage/Core/Model/App.php(428): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /srv/www/vhosts/hf/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Model_App->_initModules()
#6 /srv/www/vhosts/hf/app/Mage.php(690): Mage_Core_Model_App->run(Array)
#7 /srv/www/vhosts/hf/index.php(70): Mage::run('', 'store')
#8 {main}";s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}


texts: Custom template for static blocks in CMS page?

texts:
I searched the web and could not find how to do this.

I want to add a static block that I have created in admin before to a cms-page. This works using either of this lines:

{{block type="cms/block" block_id="my_block_id"}}
{{block type="cms/block" block_id="my_block_id" template="cms/content.phtml"}}

Now I want to use a custom template, i.e.:

{{block type="cms/block" block_id="my_block_id" template="modulename/custom-template.phtml"}}

When I put it into the cms-page like this, the block is shown, but the "template"-tag is completely ignored - cms/content.phtml is used.

WHAT I TRIED
I tried to extend class Mage_Block_Cms_Block and add setTemplate($this->getTemplate()); to _toHtml()-function. The effect is the same as above - cms/content.phtml is used.

I tried to extend class Mage_Core_Block_Template; of course I can set a template here, but I have problems getting the static block. I can't find how to get the block by block-id.

WHAT THIS QUESTION IS ABOUT / NOT ABOUT
I know how to do this with PHP.
I know how to do this with XML-files.
It s crucial to this question that the blocks can be managed in the backend.

I run Magento CE 1.7.0.0.

Thank you for your time!


texts: Unable to override module_catalog items.phtml

texts:
I'm trying to make some minor changes to the template found at  vendor/magento/module-catalog/view/frontend/templates/product/list/items.phtml.

So I've created the a new file app/design/frontend/xxx/yyy/Magento_Catalog/templates/product/list/items.phtml made my changes, run rm -rf var/view_preprocessed/* var/cache/* var/generation/* pub/static/frontend/Monsoon/* && php bin/magento cache:flush and magento setup:static-content:deploy. However,  I don't see the changes and when I enable debugging Magento is still referenceing vendor/magento/module-catalog/view/frontend/templates/product/list/items.phtml.

I've been using Magento for less than a month so perhaps I'm missing something super obvious.


texts:
I tried finding a Slack or Discord server for Magento before coming here.

I am trying to submit a Magento 1 extension for technical review @ marketplace and the package.xml won't pass marketplace validation. I manually fixed specific fields that failed, but the error is now Repo rejected file upload - Failed.

The error is a bit abstract, but I'm pretty sure it's related to the package.xml. I regenerated it for post-1.5 releases via Magento Connect (running on Magento 1.9.4.1), but the generated XML is quite different than the previous one, and I can't seem to find anything useful in official docs.

The previous XML had a calculated hash for each file under contents, the current one has only one hash.

Can someone explain the difference(s) between https://github.com/sendwithus/extension-magento/blob/master/dist/package.xml and https://github.com/meanbee/magento-diymage/blob/master/package.xml?


texts: Ui form: image not saved in DB in magento 2

texts:
I need to save below fields in DB. All other fields are saved  except Image.But images are saved in pub/media folder.Please suggest me a solution

Here, i have mentioned my controller for save.php

    <?php

    namespace Namespace\HomeSlider\Controller\Adminhtml\Post;

    class Save extends \Magento\Backend\App\Action
    {

        public function __construct(
        \Magento\Backend\App\Action\Context $context, \Magento\Backend\Model\View\Result\RedirectFactory $resultRedirectFactory
        )
        {
            $this->resultRedirectFactory = $resultRedirectFactory;
            parent::__construct($context);
        }

        public function execute()
        {
            $id = $this->getRequest()->getParam('id');
            $postModel = $this->_objectManager->create('Namespace\HomeSlider\Model\Post');

            if ($id) {
                $postModel = $postModel->load($id);
            }
            $post = $this->getRequest()->getParams();
      //     echo<pre>;
    //       print_r($post);
  //         echo</pre>;
     //        exit;
            if(empty($post['id'])) {
                 $post['id'] = null;
             }

            $postModel->setData($post);
            $postModel->save();
            return $this->resultRedirectFactory->create()->setPath('homeslider/post/index');
        }

    }

The parameters are below what i get. But the image is stored as array of array format . How do I overcome this.


texts: Magento - Uncaught TypeError: Object [object Object] has no method?

texts:
I am trying to implement a simple autocomplete form for custom pricing in Magento frontend.

I am using

<script src="http://jquery.bassistance.de/validate/jquery.validate.js"></script>

Along with jQuery v1.10.2 which is being loaded before the other JS libraries.

        <action method="addJs"><script>lib/jquery-1.10.2.min.js</script></action>
        <action method="addJs"><script>prototype/prototype.js</script></action>
        <action method="addItem"><type>js</type><name>lib/html5shiv.js</name><params/><if>lt IE 8</if></action>
        <action method="addJs"><script>lib/ccard.js</script></action>
        <action method="addJs"><script>prototype/validation.js</script></action>
        <action method="addJs"><script>scriptaculous/builder.js</script></action>
        <action method="addJs"><script>scriptaculous/effects.js</script></action>
        <action method="addJs"><script>scriptaculous/dragdrop.js</script></action>
        <action method="addJs"><script>scriptaculous/controls.js</script></action>
        <action method="addJs"><script>scriptaculous/slider.js</script></action>
        <action method="addJs"><script>varien/js.js</script></action>
        <action method="addJs"><script>varien/form.js</script></action>
        <action method="addJs"><script>varien/menu.js</script></action>
        <action method="addJs"><script>mage/translate.js</script></action>
        <action method="addJs"><script>mage/cookies.js</script></action>
      **<action method="addJs"><script>lib/validate.js</script></action>**

I've add my jquery code to the catalog/product/view.phtml file

<script type="text/javascript">
    jQuery.noConflict();
    jQuery( document ).ready(function() {
        var validOptions = [];
        validOptions.push("FREE");
        var x = 1;
        while (x<1000) {
            if (x<100) {
                validOptions.push(""+x+"p");
            } else {
                var y = x.toString();
                var z = y.split('');
                validOptions.push("£"+z[0]+"."+z[1]+""+z[2]+"");
            }
            x++;
        }
        previousValue = "";

        jQuery('#ac').autocomplete({
            autoFocus: true,
            source: validOptions
        }).keyup(function() {
            var isValid = false;
            for (i in validOptions) {
                if (validOptions[i].toLowerCase().match(this.value.toLowerCase())) {
                    isValid = true;
                }
            }
            if (!isValid) {
                this.value = previousValue
            } else {
                previousValue = this.value;
            }
    });
    });

</script>

and for the input field I am using

<input id="ac" />

The problem is I am getting an error and for some reason the autocomplete won't work as required.

Uncaught TypeError: Object [object Object] has no method 'autocomplete'

You can see a demo of the autocompletion here

Can anyone see what is wrong withmy setup?


texts: What criteria does Magento follow to order by "Best Value"?

texts:
I have the option "Best Value" by default but all products are in position 1. With each product in position 1, what criteria does Magento use to sort them? Is it random?

Thanks.

EDIT:  I uploaded a new product to test it, and it appears at the 53rd position. All products are in position 1. So my question is, why the new product isn't the first product in the category? What is the criteria? This is so confusing!


texts: Layered Navigation in home page Magento 2.1

texts:
I need add layered navigation to home page.

I see in many sites and Tutorial  that I have to add in Content->Pages in home this line:

<update handle="cms_page_layered_navigation_with_product_list" />

But It not works for me.

It is configuration in Content->Pages->home:

And this is the frontend page:

Why?


texts: Magento 2.3.6 Add Custom Sort For Product Graphql

texts:
I want to sort the products graphql with backorder and is_in_stock attribute. Please let me know if anyone has any solution for it.
I tried with quantity_and_stock_status it is applied only on qty.


texts: Explanation of module_grid.xml in magento2

texts:
I am referring to the tutorial here to create my admin module:
http://www.advancedcheckout.com/blog/magento2-tutorial-how-to-create-admin-grid-in-magento2.html/

I'm not able to understand 2 things:

How are we defining our table name and columns
What does the elements in module_grid.xml mean and what has to be written inside each tags

Can anyone please share their views on this one?


texts: My ajax request isn't working properly in phtml

texts:
vendor\module_name\view\adminhtml\templates\tab\customer_view.phtml

    <?php $buttonTitle = __('Invalidate Quotes');?>

        <?php /* @escapeNotVerified */
echo __('Invalidate customer quote') ?>

        <?php echo $block->getChildHtml(); ?>

            <?php /* @escapeNotVerified */
echo __('Customer ID:') ?>
            <?php echo $block->getCustomerId(); ?>

            <?php /* @escapeNotVerified */
echo __('Invalidate Active Quote:') ?>

                <button class="import" id="<?php echo $block->getId() ?>" onclick="return false;">
                    <?php echo 'Remove Active Quote'; ?>
                </button>

My controller vendor\module_name\Controller\Adminhtml\Index\Quote.php

 <?php

namespace vendor\module_name\Controller\Adminhtml\Index;

class Quote extends \Magento\Backend\App\Action
{
    protected $resultPageFactory;

    public function __construct(
        \Magento\Backend\App\Action\Context $context,
        \Magento\Framework\Controller\Result\JsonFactory $resultPageFactory
    ) {
        parent::__construct($context);
        $this->resultPageFactory = $resultPageFactory;
    }

    public function execute()
    {
        if ($this->getRequest()->isAjax()) {

            echo "Testing";
        }

        return false;
    }
}

  Request URL: https://localhost/admin/customer/index/edit/id/710825/key/51d5c1c3a251b6c0ce8b36ce3d832b2b1f359c8f073691f8c1df296ebf4a22c5/invalidatequote/index/quote?isAjax=true

  Request Method: POST

  Status Code: 200

  Remote Address: 192.168.100.101:443

  Referrer Policy: no-referrer-when-downgrade

routes.xml  vendor\module_name\etc\adminhtml\routes.xml

    <?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="admin">
        <route id="invalidatequote" frontName="invalidatequote">
            <module name="module_name" before="Magento_Backend"/>
        </route>
    </router>
</config>


texts:
I think this started happening after upgrading to Magento 2.2 EE.

In my var/log directory, I have 2 files that Magento has created that have duplicate content: system.log and support_report.log.

If my memory serves correctly, those two files have always existed, but lines written to system.log were generally more severe errors generated by core magento modules. Any less severe, or anything in my custom modules that used \Psr\Log\LoggerInterface->log->info() would get written to support_report.log.

Has something changed in recent versions of Magento thats causing these duplicate logs? Is there a way to separate or stop logging to one of the files?

Or, more likely, is it a Magento bug?


texts: Shipping method are not showing on front end magento ?

texts:
I am using magento, and am new to magento!
I have a problem that shipping method is not showing on magento frontend default theme page.

i have configure shipping method from it's backend and enable one of the shipping method (free shipping) too.
But it's not showing on frontend ?

Any solution please...

Some Snapshot of backend and frontend are are follows:

above image it's should show shipping method of number 3 but not showing :( :( :(


texts: Unable to Re-Index Product Attributes due to a 1062 Duplicate Entry

texts:
I can't quite figure out this error. It suddenly happened after we were enabling New Products.

2015-08-05T22:31:24+00:00 DEBUG (7): Exception message: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '10620-137-1-258' for key 'PRIMARY'
Trace: #0 /chroot/home/jennyyoo/jennyyoo.com/html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /chroot/home/jennyyoo/jennyyoo.com/html/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /chroot/home/jennyyoo/jennyyoo.com/html/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /chroot/home/jennyyoo/jennyyoo.com/html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ca...', Array)
#4 /chroot/home/jennyyoo/jennyyoo.com/html/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ca...', Array)
#5 /chroot/home/jennyyoo/jennyyoo.com/html/lib/Varien/Db/Adapter/Pdo/Mysql.php(1998): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `ca...', Array)
#6 /chroot/home/jennyyoo/jennyyoo.com/html/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Source.php(280): Varien_Db_Adapter_Pdo_Mysql->insertArray('catalog_product...', Array, Array)
#7 /chroot/home/jennyyoo/jennyyoo.com/html/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Source.php(261): Mage_Catalog_Model_Resource_Product_Indexer_Eav_Source->_saveIndexData(Array)
#8 /chroot/home/jennyyoo/jennyyoo.com/html/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Source.php(84): Mage_Catalog_Model_Resource_Product_Indexer_Eav_Source->_prepareMultiselectIndex(NULL, NULL)
#9 /chroot/home/jennyyoo/jennyyoo.com/html/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Abstract.php(50): Mage_Catalog_Model_Resource_Product_Indexer_Eav_Source->_prepareIndex()
#10 /chroot/home/jennyyoo/jennyyoo.com/html/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav.php(185): Mage_Catalog_Model_Resource_Product_Indexer_Eav_Abstract->reindexAll()
#11 /chroot/home/jennyyoo/jennyyoo.com/html/app/code/core/Mage/Index/Model/Indexer/Abstract.php(143): Mage_Catalog_Model_Resource_Product_Indexer_Eav->reindexAll()
#12 /chroot/home/jennyyoo/jennyyoo.com/html/app/code/core/Mage/Index/Model/Process.php(210): Mage_Index_Model_Indexer_Abstract->reindexAll()
#13 /chroot/home/jennyyoo/jennyyoo.com/html/app/code/core/Mage/Index/Model/Process.php(258): Mage_Index_Model_Process->reindexAll()
#14 /chroot/home/jennyyoo/jennyyoo.com/html/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php(127): Mage_Index_Model_Process->reindexEverything()
#15 /chroot/home/jennyyoo/jennyyoo.com/html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Index_Adminhtml_ProcessController->reindexProcessAction()
#16 /chroot/home/jennyyoo/jennyyoo.com/html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('reindexProcess')
#17 /chroot/home/jennyyoo/jennyyoo.com/html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#18 /chroot/home/jennyyoo/jennyyoo.com/html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#19 /chroot/home/jennyyoo/jennyyoo.com/html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#20 /chroot/home/jennyyoo/jennyyoo.com/html/index.php(95): Mage::run('', 'store')
#21 {main}


texts:
We have imported our products using the CSV file. Now the products are all displaying, but in the product details page, the page title still shows the main website page title and doesn't have the title related to the product.

It is also not showing the meta title field in the page source as well.


texts: Entire database is not exporting from phpmyadmin in Xampp

texts:
The database is not exporting completely from phpmyadmin in my local server xampp.

Please tell me the way to export the entire database.


texts: get quantity of enabled and disabled products by sku

texts:
I am handed a list of skus from a black box.  I need to return a collection containing the quantities of all skus within the array.

function fun1($arrayOfSkus){
    .....
    $collection = Mage::getModel('catalog/product')->getCollection();
    $collection->joinField('qty','cataloginventory/stock_item','qty','product_id=entity_id','{{table}}.stock_id=1,'left');
    $collection->addAttributeToFilter('sku',array('in'=>arrayOfSkus))->addAttributeToSort('sku','ASC');
    return $collection;
}

The above works perfectly for what i'm trying to achieve, however, it does NOT return anything for skus that are of products that are disabled, any solutions?


texts: Magento 1.8 Emails not sending on production site

texts:
We have a dev site and a live site on the one server. Emails such as Email a friend, forgotten password, welcome emails etc - they are sent on the development site but not on the live production site.

We have AOE Scheduler installed on both. Cron appears to be working fine. All extensions etc are the same on both sites, and as far as we can see any code changes are the same also. The mail settings in System -> Config -> Advanced are all the same.

Don't seem to be getting any relevant errors in the logs.

Is there anything we could try? The only thing that has just occurred to me in writing this is that the live site has SSL - is there any way this could be causing an issue?

Thanks for any pointers


texts:
I can't figure out what's happening here. Can anyone please explain a solution to me in simple terms?

exception 'Zend_Mail_Protocol_Exception' with message 'Unable to connect via TLS' in /home/mywebsiteco/public_html/lib/Zend/Mail/Protocol/Smtp.php:211

Stack trace:

#0 /home/mywebsiteco/public_html/lib/Zend/Mail/Transport/Smtp.php(200): Zend_Mail_Protocol_Smtp->helo('localhost')
#1 /home/mywebsiteco/public_html/lib/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Smtp->_sendMail()
#2 /home/mywebsiteco/public_html/lib/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#3 /home/mywebsiteco/public_html/app/code/local/Mage/Core/Model/Email/Template.php(470): Zend_Mail->send()
#4 /home/mywebsiteco/public_html/app/code/local/Mage/Core/Model/Email/Template.php(527): Mage_Core_Model_Email_Template->send(Array, Array, Array)
#5 /home/mywebsiteco/public_html/app/code/core/Mage/Core/Model/Email/Template/Mailer.php(84): Mage_Core_Model_Email_Template->sendTransactional('customer_passwo...', 'support', Array, Array, Array, '4')
#6 /home/mywebsiteco/public_html/app/code/core/Mage/Customer/Model/Customer.php(680): Mage_Core_Model_Email_Template_Mailer->send()
#7 /home/mywebsiteco/public_html/app/code/core/Mage/Customer/Model/Customer.php(697): Mage_Customer_Model_Customer->_sendEmailTemplate('customer/passwo...', 'customer/passwo...', Array, '4')
#8 /home/mywebsiteco/public_html/app/code/core/Mage/Customer/controllers/AccountController.php(741): Mage_Customer_Model_Customer->sendPasswordResetConfirmationEmail()
#9 /home/mywebsiteco/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Customer_AccountController->forgotPasswordPostAction()
#10 /home/mywebsiteco/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('forgotpasswordp...')
#11 /home/mywebsiteco/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#12 /home/mywebsiteco/public_html/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#13 /home/mywebsiteco/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#14 /home/mywebsiteco/public_html/index.php(83): Mage::run('', 'store')
#15 {main}


texts:
I try to enable template hints in Stores -> Settings: Configuration -> Advanced -> Developer -> Debug
But if I make my changes and save, then it reloads and the settings are reseted to the values they had before the change.
I also tried it via CLI
php bin/magento dev:template-hints:enable
Template hints enabled.

but if I reload the settings site, then it is still set to disabled there. There are no errors in the browser console.
I checked the table "core_config_data":
SELECT * FROM `core_config_data` WHERE path LIKE "%template%"

As you can see it is enabled.
But if I reload the frontend with parameter ?templatehints=magento e.g. http://entwicklung.fresh.m2/besteck.html?templatehints=magento then it does not show template hints. Of course I cleared the cache.
I am in developer mode, not production.
php bin/magento deploy:mode:show
Current application mode: developer. (Note: Environment variables may override this value.)

I even updated to the latest version as of 2.3.5-p1


texts: Adding "Estimated Shipping Date" to Success.phtml

texts:
So, I had some luck with embedding a backend attribute to each product (called ship_days) and have had success posting the variable through the following formula:

<?php
        $days=array();
        $order_items = $order->getAllItems();
        foreach($order_items as $item) {
            $product = Mage::getModel('catalog/product')->load($item->getProductId());
            $day = number_format($product->getShipDays(),2,'.','');
            $days[]=urlencode($day);
            $max=max($days);
        }

Which when echos provides the correct value depending on the products in cart (some SKUs have a ship_days variable of 3, others have 5) Iused the following output:

<?php echo date ('m/d/y', strtotime ( "+$max weekdays" ));  ?>

Which should have output 6/19/2015 when calculated on Friday the 12th (tested on a PHP Sandbox) but actually output 6/11/2015.  I also tried putting a PHP function but it seemed to slow down the processing of Success.phtml to the point where the page wouldn't load... what's the best way to accomplish this?

The function I tried embedding into Success.phtml is a function I use successfully in other files, but should I call that from a block or an external PHP script?  Function below:

function dateFromBusinessDays($days, $dateTime=null) {
  $dateTime = is_null($dateTime) ? time() : $dateTime;
  $_day = 0;
  $_direction = $days == 0 ? 0 : intval($days/abs($days));
  $_day_value = (60 * 60 * 24);

  while($_day !== $days) {
    $dateTime += $_direction * $_day_value;
    $_day_w = date("w", $dateTime);

    if ($_day_w > 0 && $_day_w < 6) {
      $_day += $_direction * 1;
    }
  }

  return $dateTime;
}

Anyone have any idea how I could achieve this?


texts:
I need to send the order mail to people that are not the customer.

But the Order Sender doesn't send the email to more thant 1 person, why ?

use Magento\Sales\Model\Order\Email\Sender\OrderSender;

public function beforeExecute($subject, $observer)
{
    $event = $observer->getEvent();
    /** @var  \Magento\Sales\Model\Order $order */
    $order = $event->getOrder();
    ......
    $condition = false;

    if ($condition) {
        $order->setCanSendNewEmailFlag(false);
    }else{

        $customer = $this->_customerSession->getCustomer();
        if($customer->getGroupId() != "4"){

            $contacts = $this->getContacts();
            $contacts = array("mail@mail","other@mail");
            $order->setCustomerEmail($contacts[0]);
            $this->orderSender->send($order);
            $order->setCustomerEmail($contacts[1]);
            $this->orderSender->send($order);
        }
    }

    die;

    return [$observer];
}


texts: How to add button and Action in User Order Information

texts:
Can somebody please help me and give me information how to add custom button in Magento (1.9) customer order review ? I want to add button with send e-mail Action , i want to add e-mail content in backend so i don't need any input. I want only add action to button

I added button in app/desing/frontend/base/default/template/sales/order/view.phptml

this is code:

Send e-mail Action

<a href="<?php echo $this->getBackUrl() ?>">&laquo; <?php echo $this->getBackTitle() ?>

Now my questions

Can somebody please tell me how and where add Action function to this button ?.
I will handle myself with all code but i want to now where to put all code.


texts: Multi-Store Rewrites and htaccess (index.php)

texts:
Outline

I am running internationalized magento stores under sub-directories with sys-links created for every sub-directory and own index.php and .htaccess

fashion.co.uk - default store
fashion.com - enter page
fashion.com/us/ - American store view
fashion.com/eu/ - European store view
fashion.com/au/ - Australian store view

Problem

When accessing any of the internationalized stores, the URLs can not be accessed as of 404 error. When I disable Use Web Server Rewrites for these stores the URLs are accessible as:

www.fashion.com/us/index.php/new/bras

When above is enabled the accessed link looks like below but 404 error appears.

www.fashion.com/us/new/bras - 404

How do I remove/rewrite the index.php from all the urls making all the links work?

Structure

The 'default store' is simply under 'public_html' directory and within root I have internationalized sub-directories.

The 'default store' has:

Add Store Code to URLs: No
Auto-redirect to Base URL: No
Use Web Server Rewrites: Yes

The 'American, European & Australian store view' has:

Use Web Server Rewrites: Yes
Base & Secure URL: http:// www.fashion.com/us/
Base & Secure URL: http:// www.fashion.com/eu/
Base & Secure URL: http:// www.fashion.com/au/
Base URLs: Use Website

.htaccess (Addon)

SetEnvIf Host www\.fashion\.com/us/ MAGE_RUN_CODE=us_en
SetEnvIf Host www\.fashion\.com/us/ MAGE_RUN_TYPE=store
SetEnvIf Host ^fashion\.com/us/ MAGE_RUN_CODE=us_en
SetEnvIf Host ^fashion\.com/us/ MAGE_RUN_TYPE=store

SetEnvIf Host www\.fashion\.com/eu/ MAGE_RUN_CODE=eu_en
SetEnvIf Host www\.fashion\.com/eu/ MAGE_RUN_TYPE=store
SetEnvIf Host ^fashion\.com/eu/ MAGE_RUN_CODE=eu_en
SetEnvIf Host ^fashion\.com/eu/ MAGE_RUN_TYPE=store

SetEnvIf Host www\.fashion\.com/au/ MAGE_RUN_CODE=au_en
SetEnvIf Host www\.fashion\.com/au/ MAGE_RUN_TYPE=store
SetEnvIf Host ^fashion\.com/au/ MAGE_RUN_CODE=au_en
SetEnvIf Host ^fashion\.com/au/ MAGE_RUN_TYPE=store


texts: Configurable product returning itself and simple product

texts:
I am loading products from a order with this

private function _addItens()
{

    $this->_xml["itens"] = array();
    $this->_xml["itens"]["item"] = array();

    $cont=0;
    foreach ($this->_orderModel->getItemsCollection() as $itemId => $item) {

        $_product = Mage::getModel('catalog/product')->load( $item->product_id );

        $this->_xml["itens"]["item"][$cont] =
            array(
                "cod" => $item->getSku(),
                "description" => $_product->getData(Lema21_Nfe_Model_TransformToXML::ATTR_OPERATION_NAME),
                "un"    => $_product->getData(Lema21_Nfe_Model_TransformToXML::ATTR_OPERATION_UNIT),
                "qty"  => $item->getData("qty_ordered"),
                "un_price" => $item->getPrice(),
                "type" => self::PRODUCT_OR_SERVICE,
                "weight" => $item->getWeight(),
                "final_weight"  => $item->getWeight(),

                //##HACK##
                "manufacturer" => $_product->getAttributeText(Lema21_Nfe_Model_TransformToXML::ATTR_NAME_MANUFACTURER),
                "class_fiscal" => $_product->getData(Lema21_Nfe_Model_TransformToXML::ATTR_COD_NCM),
                "_icms" => $_product->getData(Lema21_Nfe_Model_TransformToXML::ATTR_COD_ICMS),
                //##/HACK##

                "origin"    => $_product->getData( Lema21_Nfe_Model_TransformToXML::ATTR_COD_ORIGIN )
            );

        $cont++;
    }

    return $this;
}

and that's working for all kinds of products, but when a configurable product arrives, the code return 2 results: the configurable product and the simple product. Since the program work with taxes and stuff, I can't hold these 2 results, I need just one. I need only the simple product, the one that my client chose.


texts:
Basically I want to add CSS classes to the Magento core messages.

I want to extend the Mage_Core_Block_Messages class and use the extended class instead of the core one.

How can I do it?


texts: How to add a custom and dynamic block during onepage checkout?

texts:
I need to add a custom block dynamically to the onepage checkout process but I am not sure exactly how to implement this.

The problem is that this custom block appears only when the cart contains a certain type of products (eg, software activation licenses) and the user is required the user to input a serial number of his/her hardware device. If there are X number of licenses in the shopping cart, there will be X text fields inside this custom block.

How should I start looking at this?


texts:
I am updating a Magento 1 payment module which was maintained years ago.
The module does this in the ProcessingController.php for each action:
public function redirectAction(){
    // processing code

    // end of function
    $this->loadLayout();
    $this->getLayout()->getBlock('root')->setTemplate('page/1column.phtml');
    $this->getLayout()->getBlock('content')->append($this->getLayout()->createBlock('pay/processing'));
    $this->renderLayout();
}

Each of the blocks (for example pay/processing used above) do not use layout or template files.
Everything is done inside each Block's _toHtml() function:
protected function _toHtml(){
    echo "
Content here is static text mostly
";
}

Now, I have created a new block using the same way the method is setup, pay/returnaction:
public function redirectAction() {

      // code to determine if logged in or not

     // render on error
     if ($not_loggedin){
            $this->loadLayout();
            $this->getLayout()->getBlock('root')->setTemplate('page/1column.phtml');
                $blockReturn = $this->getLayout()->createBlock('pay/returnaction');
                $blockReturn->setHasError_NotLoggedIn();
            $this->getLayout()->getBlock('content')->append($blockReturn);
            $this->renderLayout();
     }
     else{
        // render other static block
    }
}

class Cre8aweb_Pay_Block_Returnaction extends Mage_Core_Block_Abstract{

 private $_helper = 'pay/Data';

protected function _toHtml(){
      $script = "
Start Content
";
      $script .= $this->getNotLoggedInError();
      $script .= "
Exra Content
";
      $script .= "";

      return $script;
  }

        protected function getNotLoggedInError(){
                $errorText = '';
                if($this->_hasError_NotLoggedIn){
                        $errorText = $this->_getHelper()->notLoggedInError();
                }
                return $errorText;
        }

        private function _getHelper(){
                return Mage::helper($this->_helper);
        }

}

So basically, I want to call $block->getNotLoggedInError() which returns text content from the helper.
At the moment when the block is shown is only - the getNotLoggedInError() most likely just returns empty string when _toHtml() gets called.
How do I correctly create the new block in the controller, send data it depends on from the controller and make sure that all block content is shown.
Current result:
Start Content
End Content

Expected result:
Start Content
Not logged in notification -
End Content

Keep in mind this is when returned from the payment processor sometimes the customer session is lost somehow.  So instead of throwing an exception which currently happens (sporadically!!), I would rather want to notify the customer that the information is not available, and they should login again.


texts: Newsletter scheduled but not sending: 1.9.1.0

texts:
I can't find any google solution that matches my problem.

Cron is working.
Order e-mails are sent with success.
All other e-mails are working too, excepting newsletter.

My last newsletter was sent using 1.7.0.2.
But after updates to 1.9.1.0 my newsletter e-mails are not being sent.

Cron schedule table shows up all queues, including newsletter_send_all with success message.
Going to backend I can see ZERO processed from thousands of subscribers.
No newsletter e-mail was sent.
No errors in Magento logs, PHP logs and Apache logs.

What could be happening?


texts: Php version check failed when upgrading to Magento 2.0.2

texts:
I'm building my project on OSX El Capitan 10.11.3 with MAMP v3.5 and php 5.6.10.

I downloaded CE 2.0.1 with sample data and it worked fine.

However, when I was trying to upgrade to 2.0.2 released last week, it failed on readiness check,
saying that my php version is 5.5.30 (system default) and two extension "intl","mcrypt" are missing.

The weird thing is, I've already added the php5.6.10 path to env, and passed previous readiness check during the web installation. Did anyone run into the same issue?

Any help will be appreciated.


texts: Error during compilation of Magento 2 Incompatible argument type : Required type:

texts:
Webkul\VendorPos\Model\ResourceModel\Orders\Grid\Collection
Incompatible argument type:
Required type: \Magento\Framework\App\Config\ScopeConfigInterface.
Actual type: \Magento\Framework\DB\Adapter\AdapterInterface;

public function __construct(
        \Magento\Framework\Data\Collection\EntityFactoryInterface $entityFactory,
        \Psr\Log\LoggerInterface $logger,
        \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
        \Magento\Framework\Event\ManagerInterface $eventManager,
        $mainTable,
        $eventPrefix,
        $eventObject,
        $resourceModel,
        \Webkul\Marketplace\helper\Data $mpHelper,
        $model = \Magento\Framework\View\Element\UiComponent\DataProvider\Document::class,
        \Magento\Framework\DB\Adapter\AdapterInterface $connection = null,
        \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource = null
    )
{
        parent::__construct(
            $entityFactory,
            $logger,
            $fetchStrategy,
            $eventManager,
            $connection,
            $resource
        );
        $this->_eventPrefix = $eventPrefix;
        $this->_eventObject = $eventObject;
        $this->mpHelper     = $mpHelper;
        $this->_init($model, $resourceModel);
        $this->setMainTable($mainTable);
}

File:
/var/www/html/app/code/Webkul/VendorPos/Model/ResourceModel/Orders/Grid/Collection.php
\Magento\Framework\DB\Adapter\AdapterInterface


texts: Magento 1.9 - how to determine who created product?

texts: As in subject, is that possible with a default Magento 1.9 (unchanged)?


texts: Magento 2: how to give option in custom extension for new version update in configuration

texts:
I have created my custom extension. But I need to add the new version update option in my extension configuration.
How I can do? Please suggest any idea in admin configuration and in code wise.
When I update the version then how I can show in the admin configuration to update the new version with the previous.
Thanks!


texts: Magento 2 Get shipping and billing address of customer after order placed?

texts:
I am working on custom email template.

So I needed customer Billing and Shipping address in below file.

/vendor/magento/module-sales/view/frontend/templates/email/items.phtml

Can any 1 help me to get customer address of placed order.


texts:
I'm trying to set a decimal value to a percentage discount on a tierprice.

The problem is that when it's saved the value is becoming an int instead of a decimal.

Example
if I set a percentage to 1.23% after save => 1%

after saving it

Any way that it keeps the decimal value ?

Thanks


texts: Tax on Shipping not on mi dashboard MGT 1.8.1

texts:
I reed manual for setup tax on shipping Tax on Shipping and I can not find the parameters indicating the manual.

Manual speak about "Flat Tax Rate on Taxable Cart" but i don't see this question on any manual, or on my dashboard and I don't see "Tax on Shipping" on System -> Configuration -> Sales -> Tax

I don't know if this it's a bug, a error in the manual, a different version ...


texts: Fetch catalogCategoryTree through Soap API fails with custom attribute

texts:
For a Magento 1.7.0.2 instance, I'm trying to integrate a custom attribute legacy_id in the category listing. This will be used to match categories from a backend system with the Magento categories.

With this in place, inserting a new category, or updating an existing one, works perfectly using the API (catalog_category.create/update). Retrieving a single category also works perfectly, as the legacy_id property works just great on all CRUD operations.

However, what does not work is retrieving the category tree through the SOAP v2, with a call like this:

result = $proxy->catalogCategoryTree($session, 'category_root_id');

This will result in the following exception:

SOAP-ERROR: Encoding: object has no 'legacy_id' property in /var/www/vhosts/MAGENTO/docs/includes/src/Zend_Soap_Server.php on line 832

The question is: what can be the cause of this, e.g. catalog_category working but category_tree does not?

Or perhaps someone has some tips as on how I can produce more descriptive error messages for debugging?


texts: Magento Custom Module set default value to Textfield

texts:
I am working on custom module. I want to set default value to text field but failed. I have visited some links for solution but didnt working.
Link1 and Link2

$this->setForm($form);
$fieldset = $form->addFieldset('home_form', array('legend'=>Mage::helper('home')->__('Section Information')));
$fieldset->addField('section_name', 'text', array(
      'label'     => Mage::helper('home')->__('Section Name'),
      'required'  => false,
      'name'      => 'section_name',
      'value' => 'asdf',
));


texts: Magento2 identify if user is logged in user or Guest user for PWA

texts:
Magento2 How to identify if the user has logged in user or Guest user for PWA?
In sort how to identify user type using Rest API or GraphQL


texts: CRON (AoE Scheduler) and Magento v. 1.9.2.2 not sending emails

texts:
CRON is working fine according to the Scheduler and all mails were working fine as of monday. Yesterday I noticed that no emails were going out. Is the normal return value from core_email_queue_send_all supposed to be Mage_Core_Model_Email_Quenue?

Nonetheless I can see transactional emails being generated in the database under mage_core_email_queue.

My problem being that they are not sent, either to the recipient or being delivered to the bcc.

Changes I did since monday were installing and uninstalling 2 extensions, Algolia Search and Instant Search+.

I've tried editing cron.php and have added $isShellDisabled = true; beneath
 $isShellDisabled = (stripos(PHP_OS, 'win') === false) ? $isShellDisabled : true;
and changed
$cronPath = escapeshellarg(dirname(__FILE__) . '/cron.sh'); to
$cronPath = escapeshellarg(dirname(__FILE__) . '/scheduler_cron.sh');

Any other tricks I should try to get emails functioning again?

Or is my best bet to roll the database back a few days?

When I manually try to fire cron.php from the browser it doesn't show up in the scheduler.


texts: Sort Product List to show Out of Stock items after in stock items with magento 1.8

texts: The product list pages are currently set to show out of stock products. I would like to show these products after the In Stock items. Thanks.


texts: Magento 2 direct sql query for insert not working

texts:
I was trying to insert values into mlx_cot_custom_option_type_value because module files are encrypted.I want to add something after product save

i am using catalog_product_save_after event

Here is what i have tried.

    protected $_resource;

    public function __construct(
        \Magento\Framework\App\ResourceConnection $resource
    ) {
        $this->_resource = $resource;
    }

    $this->connection = $this->_resource->getConnection('core_write');
    $option_id = 186;
    $valueTable = 'mlx_cot_custom_option_type_value';
    $table = $this->_resource->getTableName($valueTable);

    echo $sql = "Insert Into " . $table . " (option_type_id, option_id, sku, sort_order,weight) Values ('','".$option_id."','".$value['sku']."','1','')";
    $result = $this->connection->query($sql);
    echo "<pre>";
    print_r($this->connection->lastInsertId());
    die;

Output is

Insert Into mlx_cot_custom_option_type_value (option_type_id, option_id, sku, sort_order,weight) Values ('','186','Custom-Create-Any-Song-in-a-Music-Box-New','1','')

2047

$this->connection->lastInsertId() give new increment id every time but i can not see any new entry into database

Whene i run above query using phpmyadmin it will create new entry


texts: Get custom attributes of a product for confirmation email in magento 1.9

texts:
I need to add a warehouse_location custom attribute for each product in order and shipment confirmation emails. In order to do so I modified two templates: default/template/email/order/items/order/default.phtml and default/template/email/order/items/shipment/default.phtml. Both Templates contain identical code:

$_product = Mage::getModel('catalog/product');
$_product->load($_item->getProductId());
if($_product->getTypeId() == "configurable"){
    $conf = Mage::getModel('catalog/product_type_configurable')->setProduct($_product);
    $simple_coll = $conf->getUsedProductCollection()->addAttributeToSelect('*')->addFilterByRequiredOptions();
    foreach($simple_coll as $simple_product){
        echo $simple_product->getData('warehouse_location');
    }
} else {
    echo $_product->getWarehouseLocation();
}

It does not work. If the check for product type is removed and I just do this:

$_product = Mage::getModel('catalog/product');
$_product->load($_item->getProductId());
echo $_product->getWarehouseLocation();

Then it obviously works only for simple products.

Any suggestions why this doesn't work? Thank you in advance.


texts:
Noticed in our error_log file is showing this below

[09-Feb-2016 16:55:02 UTC] PHP Notice:  Undefined index: SCRIPT_NAME in /home/USERNAME/public_html/cron.php on line 40
[09-Feb-2016 16:55:02 UTC] PHP Notice:  Undefined index: SCRIPT_FILENAME in /home/USERNAME/public_html/cron.php on line 41

on line 40 and 41 of the cron.php is this

$_SERVER['SCRIPT_NAME'] = str_replace(basename(__FILE__), 'index.php', $_SERVER['SCRIPT_NAME']);
$_SERVER['SCRIPT_FILENAME'] = str_replace(basename(__FILE__), 'index.php', $_SERVER['SCRIPT_FILENAME']);

anyone any ideas why its not running ?


texts: Override method that Print Pdf Invoice in Magento 2

texts:
In Magento 2.1 I want to do a custom action when the admin click on button "Print" in Invoice page. In particular I want to show a pdf saved in a specific folder.

I thought that I have to override the controller PrintAction but it doesn't work.

di.xml:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\Sales\Controller\Adminhtml\Invoice\AbstractInvoice\PrintAction"
                type="VendorName\ModuleName\Controller\Sales\Adminhtml\Invoice\AbstractInvoice\PrintAction"/>
</config>

controller override:

<?php
namespace VendorName\ModuleName\Controller\Sales\Adminhtml\Invoice\AbstractInvoice;

abstract class PrintAction extends \Magento\Sales\Controller\Adminhtml\Invoice\AbstractInvoice\PrintAction
{
    public function execute($coreRoute = null)
    {
        // My action
    }
}

But when I click on Print button, it does the core action and not my action.
Is right? Or what method do I have to override?

Update 1

I solved overriding the method getPdf of the class Magento\Sales\Model\Order\Pdf\Invoice. In the implemented method I loaded my pdf using:

$pdf = new \Zend_Pdf ($pdfPath, null, true);
return $pdf;

Update 2

Finally I decided to override the execute() method in

\Magento\Sales\Controller\Adminhtml\Order\Invoice\PrintAction

Because of I don't have to modify the PDF during the creation but I have to load a PDF stored in a folder, it's the better way.


texts: Remove price increase on configurable swatches

texts:
I am having trouble removing the price increase from configurable swatches. As you can see in the image it says +$10.00 - this bit is what i am trying to remove. The price should still change but the area in red should not be shown.

The indigo colored area is:

The red colored ares is:

The swatch buttons are wrapped in:

I have unsuccessfully tried to remove this using this bit of code

    //

    jQuery("swatch-label").click(function(){
        checkswatches();
    });
});

function checkswatches(){
  jQuery("#select_label_wd_sssg").select(function(){
    var optiontext = jQuery(this).text();
    var addsignpos = optiontext.indexOf('+');
    var subtractsignpos = optiontext.indexOf('-');
    if(addsignpos>0){
        var result = optiontext.substring(0,addsignpos-1);
        jQuery(this).html(result);
    }

    if(subtractsignpos>0){
        var result = optiontext.substring(0,subtractsignpos-1);
        jQuery(this).html(result);
    }
  });
}
// ]]>

Can't get code to format correctly

I have put the code above inside of

app/design/frontend/[package]/[theme]/template/catalog/product/view/type/options/configurable.phtml

and app/design/frontend/[package]/[theme]/template/configurableswatches/catalog/product/view/type/options/configurable/swatches.phtml with no luck.

Any advice is appreciated.


texts: Magento 2 : Change Store view programmatically at front end side

texts:
I want to change store view programmatically same as like when we switch store from store switcher at front end side.

I try this answer. But, it's not working. It's just change store view name from store switcher dropdown.

How to implement it?

Any help would be appriciated.


texts: 'Stop Further Rules From Processing' doesn't work as expected

texts:
Basically I have 2 shopping cart rules and I only want one to be applied at any one time.

My first shopping cart rule is a discount code that gives you 10% discount on products in your cart that are in a certain category.
And my second is a little more complex as it gives you 100% discount on a product when a differnet product is added to your cart. For example, if you have a t-shirt and a hat in your cart, then you get the hat for free.

So at the moment when I have the t-shirt and hat in the cart at the same time, I get a discount of £6.00 (which is the price of the hat).
Then when I enter the coupon code, I get a further 10% off. So if my t-shirt was £10 and the hat was £6, The total to be paid would be £9.

I need it so that only one of these rules can be applied at any one time, I don't mind how it works, just as long as customers cannot take advantage of this issue.

I have heard that this is something to do with the priorities of the rules, but I have spent a few hours playing around with different settings but cannot get this to work.

I've attached some screenshots of my rule settings, hopefully they will give you a better idea of what's going on.

Thank you


texts: Hardware required and Broadband for a Server with WHM to host 3 Magento Websites

texts:
My name is Gabriel Bourgoing, Digital Marketing Consultant of WSI network.

I received a recommendation from my WSI Network as Magento Hosting Experts. I need obtain a quote from you and know the ideal Hardware (Servers)  that I o ensure the proper performance to host three  Websites developed in Magento in only one server with WHM

Please, let me know what hardware server specifications (Memory, bandwidth, etc) an the monthly cost.  Please send me the information to gbourgoing@wsiperformance.com

I can share with you the following information to determine the Server specifications and your quote

I have Three Websites in Magento (version. 1.9.2) which should be hosted three websites on only Server with WHM.

1)  Melody.com.mx
2)  Milano.com
3)  Home&Fashion.com (It is in  development)

I) TRAFIC BY WEBSITE

1)  Melody.com
a)  Number of visitors per month= 70,000 Sessions peak (December)
b)  Number of visitors real time= 12 Visitors Peak
c)  Number of database tables and records inside each site.=  Unknown, I only know that there is a  Table with 424 products x 53 Attributes. My understanding is that Magento has many tables

2) Milano.com
a)  I do not have Google Analytics to determine the visitors per month and visitors real time, but please take the same numbers of Melody.com.mx
Number of database tables and records inside each site.=  Unknown, I only know that there is a  Table with 579 products with 63 attributes each product. My understanding is that Magento has many tables, advise me

3) Home&Fashion.com
a)  I do not have Google Analytics to determine the visitor s per month and visitors real time, but please take the same numbers of Melody.com.mx
Number of database tables and records inside each site.=  Unknown, I only know that there is a  Table with  100 products in the first upload  with 47 attributes each product. My understanding is that Magento has many tables, please, advise me

  II) RECORDS GET ADDED ON PER MONTH BASIS I can infer that the number
  of Record added by website is the following

Melody.com.mx    30 Products X 53 Attributes= 1590 records
Milano.com.mx:     30 Products X 63 Attributes= 1890  records
Home & Fashion 10 products X 47 Attributes=     480 Records
Total per month= 3,960 records

III) FUNCTIONALITY USED IN  THE WEBSITES.

Products Catalog with functionality with  photos in 360 grades. In the future, only two website will be ecommerce. The three websites has pop up plug in.

IV)  HOW MUCH CPU LOAD REQUIRES TO RETRIEVE DATABASE RECORDS.

I do not how to obtain this information however; I am attaching the following information where the current websites are hosted.

Melody.com.mx
Memory Summary
Total Ram    Free Ram.   Total Virtual Memory    Free Virtual Memory
3791 MB        2265           12,024 MB.             10,086 MB

Milano.com
Memory Summary
Total Ram    Free Ram.   Total Virtual Memory    Free Virtual Memory
3832 MB        383           11,791 MB.             8,291 MB

Home&Fashion.com
Not available because is under construction.

VI) TRAFFIC GROWTH DO YOU EXCEPT IN NEXT 3, 6 AND 12 MONTHS.
For the next 3 month 100%, 6 Month 200%, and 12 Month 500%


texts: Extended controller URL and configuration

texts:
I'm developing an ajax request handling extension of the default cart controller.  How do I find out the correct URL to use in order to send information back to the server?

the controller (CartController.php) class definition is:

require_once 'Mage/Checkout/controllers/CartController.php';
class CompanyName_Checkout_CartController extends Mage_Checkout_CartController{
    function couponPostAction(){
    }
}

the config.xml will look something like:

<frontend>
    <routers>
    <checkout>
        <args>
            <modules>
                <companyname_checkout before="Mage_Checkout">Companyname_checkout</companyname_checkout>
            </modules>
        </args>
    </checkout>
    </routers>
</frontend>

Assuming the above is correctly configured... what will be the resultant URL I will use to reach this controller?


texts: Magento 2 how to add zip code to Create Account form?

texts:
How can I add just zipcode obligatory to register form in Magento 2?
I know how to add all billing information, but I just want to add the zip code.
Thanks!


texts: how to create and make a custom.css file work

texts:
I need to create custom.css file using local.xml. I tried adding this command
<action method="addCss"><stylesheet>css/custom.css></stylesheet></action> to local.xml file but it doesn't do anything, I can't edit my page. I'm not even sure where the custom.css saves. Could somone tell me the steps to do this with paths to the files?


texts: Magento Cart and Checkout redirects to https://www.paypal.com/webapps/hermes/bridge

texts:
I have this really weird problem where if I go to my cart or to the checkout page, it redirects me to https://www.paypal.com/webapps/hermes/bridge.

There's no Paypal module enabled in my Magento site, but it just redirects to paypal.com/webapps/hermes/bridge which is really really weird. This just happened all of a sudden.

I have tried enabled then disabling the Paypal module, but it still redirects on the hermes bridge page. I hope somebody here encountered the same problem as I did.

(I cannot comment yet so i have to suggest edit. I have the exact same problem. Can you list out what all extensions are you using? If there are some common ones maybe we could isolate the culprit)


texts: Magento migration from 1.9 to 2.0 with sample data

texts:
I am trying to migrate magento 1.9.2.3 to 2.0.2. Initially i have tried with few of my products and orders in magento 1.9. It is migrated successfully (data with simple product, one order, one customer and settings).

When i tried to migrate to 2.0.2 with sample data installed in 1.9.2.3, i got this error:
[Migration\Exception]
Integrity Check failed
migrate:data [-r|--reset] config

How to solve this.


texts: Programatically create order with Authorize.net payment method, already authorized

texts:
In short my question is How can I programatically create an 'Authorize Only' order for Authorize.net for an order that is already authorized?

I am trying to programatically create orders which have already been authorized on authorize.net.  Order flow is like this:

customer places order on 3rd party checkout where card is authorized but not captured
customer is redirected back to merchant's website
REST API is used to pull over all information related to order
Information is used to programatically create order in Magento using custom payment method and automatically invoiced.

Currently this works fine except in cases where the delay for ordering a part is longer than Authorize.net allows for already captured transactions.  Because of this one merchant needs some changes so it behaves the same as when authorize.net is set to "Authorize Only".

what I need to do is create the order using authorize.net payment method, programatically setting the order status, importing the transaction ID,etc

I'm quite stuck.  I've looked through the authroize.net module and spent a lot of time with google.  Any direction, advice, and of course code if available would be appreciated.


texts: i am kinda new to magento interface. I am using lots of extensions in my store. I was wondering let me know if there are any side effects.Thanks in advance.


texts: It is possible to deploy only one file using deploy command?

texts:
In production mode when I change the design of some particular block or page then I am only working on one or two files like js and CSS.
To apply that one change I need to deploy the whole theme.
Can we deploy one file or deploy CSS or js content particularly?
just like when I change some design in the frontend section and delete the static file in theme and deploy it only for that theme and area
rm -rf Local/argento-stripes-custom/fr_FR/Magento_Checkout/*
php bin/magento s:s:d -f en_US fr_FR -a frontend -t Local/argento-stripes-custom

it only deploy require theme for frontend only.
So, it is possible to deploy Module changes only like
php bin/magento s:s:d -f en_US fr_FR -a frontend -t Local/argento-stripes-custom/Magento_Checkout/
Thank you.


texts: Problem with custom module : url redirects http to https

texts: I have facing problem that module which I created working fine. But when I started using SSL i.e. http to https for checkout process. Front end modules which I created started to force use https.


texts:
I have made a fresh installation of magento 2.
Backend was displayed without any css/js format, bacause no file was placed in pub/static/adminhtml/Magento/backend/en_US/ folder.

I tried using php bin/magento setup:static-content:deploy -f and the pub folders got filled with all files. Files have 777 permissions. If I try to access one of them (by url) after I get  a 500 error. Administration is still broken and frontend is just a blank page.

What should I do to fix it?


texts: Cannot send the follow up emails and email reminders in magento

texts:
I have installed this extension in my website Abandoned cart / Follow up emails. http://www.magentocommerce.com/magento-connect/abandoned-cart-follow-up-emails-1.html
But I can not able to send the emails to customers about reminders.
I have changed the configuration settings.Can anyone please suggest me.


texts:
I am Trying to fetch and filter data from database

 $collection = Mage::getModel('some/some')->getCollection()->addAttributeToFilter(something);

but it give me an error

Fatal error: Call to undefined method My_Comment_Model_Mysql4_Comment_Collection::addAttributeToFilter() in C:\xampp\htdocs\sahara\app\design\frontend\default\default\template\comment\comment.phtml on line 9


texts:
I am working on a website for my job.  I need to come up with a way between magento, and preferably with the unirgy umarketplace for vendors to be able to bulk update their items.

Is there a plug in that I can use for this, or is there some way to do this through coding in unirgy?  I have experience creating websites, but this was a little bit new to me, with doing bulk updating.  Any help that can be given to me on this issue would be greatly appreciated.

Thank you!


texts: Can anyone point to some decent github repository where module implements CQRS, SOLID, DRY and testing? I was reading about MSI, but it is kind of complex and huge and I am looking for something simpler that implements best practices


texts: get attribute option value in magento 2.1 using helper in module data.php

texts:
Ex : Manufacturer attribute code, i want to access selected manufacturer option value , by creating a function or method in helper file in module.
can anyone please suggest me the code.
thank you


texts: Change the size of the column in product detail page

texts: I am using Magento 2.2.4. I need to change the size of the column for product description under the id="maincontent". I need to make it 70% of the width and align center. I am writing a custom theme for these modifications extending from 'Luma' theme. How can be done this?


texts: Why Magento salesOrderInvoiceList is accepting store_id as a Complex filter?

texts:
I must to update a code created by another programmer. It uses php - SOAP to connect Magento. I was digging to understand what he did and I found a query using Complex Filter against sales_order_invoice.list. This is the Complex Filter:

$complexFilter = array(
      'complex_filter' => array(
        array(
               'key' => 'CREATED_AT',
               'value' => array(
                   'key' => 'from',
                   'value' => '2015-10-16 01:24:37'
               )
        ),
        array(
               'key' => 'state',
               'value' => array(
                   'key' => '=',
                   'value' => '2'
               )
        ),
        array(
               'key' => 'store_id',
               'value' => array(
                   'key' => 'in',
                   'value' => '5,6'
               )
        )
      )
);

This is the code to connect:

$cli = new SoapClient("http://MYstaging.com/api/v2_soap/?wsdl");
$username = 'myuser';
$password = 'myPass';
$session_id = $cli->login($username, $password);
#$cli->__setCookie('XDEBUG_SESSION', 'netbeans-xdebug');
$result = $cli->salesOrderInvoiceList($session_id, $complexFilter);

As we can see, the query should retrieve some information from salesOrderInvoiceList, and it does. This is the result:

array (size=1)
  0 =>
    object(stdClass)[2]
      public 'increment_id' => string '500000001' (length=9)
      public 'created_at' => string '2015-10-16 20:07:18' (length=19)
      public 'order_currency_code' => string 'YYY' (length=3)
      public 'order_id' => string '9' (length=1)
      public 'state' => string '2' (length=1)
      public 'grand_total' => string '00.0000' (length=7)
      public 'invoice_id' => string '3' (length=1)

I do not understand this. If we check the Magendo doc to sales_order_invoice.list, there is no store_id content or field. So it should not be possible to use it as a filter. But it does exists in the sales_order_invoice.info.

Well, if I change store_id field for something that do not exist at all, lets say "BLAH_BLAH" certainly I would have nothing as result. And it is what is happening. And it makes sense. Behind the scenes maybe we have a sql 1054 (Unknow column) error.

$complexFilter = array(
      'complex_filter' => array(
        array(
               'key' => 'CREATED_AT',
               'value' => array(
                   'key' => 'from',
                   'value' => '2015-10-16 01:24:37'
               )
        ),
        array(
               'key' => 'state',
               'value' => array(
                   'key' => '=',
                   'value' => '2'
               )
        ),
        array(
               'key' => 'BLAH_BLAH',
               'value' => array(
                   'key' => 'in',
                   'value' => '5,6'
               )
        )
      )
);

Can someone explain why salesOrderInvoiceList is accepting store_id as filter?


texts: Magento 2 - How to add Font Family in admin panel wysiwyg editor?

texts: Need to add font family in wysiwyg editor.


texts: Magento 2: is it possible to automatically synonyms word get from product?

texts: I do not want to add any search synonyms word or group here Marketing > SEO & Search > Search Synonyms. but synonyms word or group get from products. Is it possible automatically search synonyms get from products?


texts: How can I run a background service in the admin backend?

texts:
I noticed the following in Mage_GoogleShopping:

I can add products to Google
Now an info is displayed "Synchronization is in progress"
I can leave the backend page and if I come back later, the process was finished.

How can this be implemented in an own extension?

I do not think it is done by a server side cron job, because the job seems to start very soon after I hit "submit".

And it can not be done in the webserver process, because I can close the browser and it continues its work.


texts:
I've created a module that has frontend page. I want to pass parameters to that page.
When i enter http://mydomain.com/news  - it shows me my page but when i cal http://mydomain.com/news/id/1 - it shows 404 error page.


texts: Two different styled layered navigation blocks

texts:
I am trying to use two versions of the layered navigation, the only difference being is how they're styled, on two different category pages. So far I have tried duplicating the the view.phtml from catalog\layer\ and making a new template, view-range.phtml, and then calling it in via the Custom Layout Update on the Magento(v1.9) backend using

<reference name="catalog.leftnav">
      <action method="setTemplate"><template>catalog/layer/view-range.phtml</template></action>
</reference>

but it doesn't work! I was thinking I could change the styling using scss but wondered if it was possible to call in a new template? Any help would be greatly appreciated.


texts: Magento 2 - Trigger "php bin/magento setup:upgrade" from backend

texts: Is it possible to trigger php bin/magento setup:upgrade from the backend? I need to give the company "Amasty" access to our project, so that they can debug a bug in their module, but I am not autorised to give them SSH access.


texts:
When running the following commands:

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

I get this error:

An exception was raised while creating "Request"; no instance returned


texts: Getting Products by category id! Magento 2.1 REST

texts:
How can I get products of specific category? For Example
If I hit
https://www.example.com/index.php/rest/V1/categories/[category_id]/products

it should return all products of same Category [category_id] with all details.
But it is returning only sku

[
    {
        "sku": "CN-101",
        "position": 1,
        "category_id": "6"
    },
    {
        "sku": "AA-102",
        "position": 1,
        "category_id": "6"
    },
    {
        "sku": "GY-105",
        "position": 1,
        "category_id": "6"
    },
    {
        "sku": "DR-107W",
        "position": 1,
        "category_id": "6"
    },
    {
        "sku": "DR-107G",
        "position": 1,
        "category_id": "6"
    }
]

Please Guide me how I'll get all products with details by category ?


texts:
I have some conditions on my store based on the customer billing address.
When someone saves their address, I would like to update the items in their cart (and minicart) to ensure correct prices are shown.
I have an observer on customer_address_save_after, but I'm not sure of the best way to 'refresh' the cart from here. Any help much appreciated.


texts: Would it be possible somehow to filter the payment methods on default Magento one page checkout based on the state customer chooses for shipping address? Tried to look for an extension, but could not find one that would work without customer having to log in.


texts: Bypass reindex triggers on bulk upload in EE 1.14 (CE 1.9)

texts:
We've recently upgraded to EE 1.14 (CE 1.9). The mysql triggers solve a lot of problems with our reindexing. However, we have several scripts that update thousands to millions of products at a time. You can imagine the trigger effect.

Is there a way to bypass those triggers while doing a bulk upload?


texts: how to add category using factory method not object manager

texts:
I have created a input type text i want to grab the data from that input and save that as a category name . I have a template simply where i am creating form and input and submit button. and i am taking value of input in block .
look at the code please you will understand it more clearly ..
app/code/Mastering/SampleModule/Block/Hello.php

    <?php

namespace Mastering\SampleModule\Block;
use Magento\Framework\View\Element\Template;
use Mastering\SampleModule\Model\ResourceModel\Item\Collection;
use Mastering\SampleModule\Model\ResourceModel\Item\CollectionFactory;
use Magento\Framework\Catalog\CategoryFactory ;

class Hello extends Template {
    private $cf;
    private $messageManager;
    public function __construct(Template\Context $context , CollectionFactory $collectionfactory , \Magento\Framework\Message\ManagerInterface $messageManager , array $data = [] ){
        $this->cf = $collectionfactory ;
        parent::__construct($context,$data);
        //$this->messageManager=$messageManager;

    }
    public function getItemsResults(){
        return $this->cf->create()->getItems();
    }
    public function getFormData(){
        $post=$this->getRequest()->getPost();
        if(!empty($post)){
            $name=$post['name'];
            //$this->messageManager->addSuccessManager("data saved");
        }
    }
}


texts:
We're integrating with Magento2 and everything works good when we have customer logged in. As our client requested us to allow user to register/login only when checkout, we faced some problem:

We managed to call /V1/carts/ and created the cart
We also managed to add items into guestcart by calling "/V1/carts/$QUOTE_ID/items"
But when we redirect user to "/checkout/cart" page, it show empty items on our cart.
This works great when we have customer logged in

May I know if there is a guest checkout URL which we should redirects guest to, by specifying the QUOTEID so system can retrieve the list of items?

Please help. Thank you.


texts: cart not loading properly after ajax login at checkout

texts:
I'm trying to add an ajax login to a custom checkout, which is half working. The login goes through, and I'm calling 2 blocks and returning the html in the response. The main content contains the users saved shipping addresses and a new address form, and a sidebar that displays the cart contents.

Up to this point, everything works fine. When I click continue, the ajax call to save the step comes back with a 403. It's coming from the call to $this->_expireAjax() at the start of the controller save action.

It fails in the first if at !$this->getOnepage()->getQuote()->hasItems(), this returns true, so it calls $this->_ajaxRedirectResponse(); and gets the 403.

But in my block it loads the quote just fine, the items are merged and the products in the list are correct.

So in the span of one ajax call, that changes. I've tracked them back and both seems to be calling Mage::getSingleton('checkout/session')->getQuote() and working off of that. Some of the objects save the model to a class variable, but that and the registry should be newly instantiated because it's a new request, right? So how are they seeing different cart items?


texts: Logo is not updating in Magento 2 custom theme

texts:
I had created custom theme in Magento 2. I had declared the theme logo in the app/design/frontend/Muneeb/mytheme/Magento_Theme/layout/default.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="logo">
<arguments>
<argument name="logo_file" xsi:type="string">images/m2-logo.png</argument>
<argument name="logo_img_width" xsi:type="number">350</argument>
<argument name="logo_img_height" xsi:type="number">350</argument>
</arguments>
</referenceBlock>
</body>
</page>

I have already clean the cache but the logo is not changing. Kindly help me


texts: We have our simple products listed at catalog in order to have them available in our Google shopping feed. Is there a way to remove these products from being crawled by google bot so they don't show up in our crawl errors in webmaster tools?


texts: Magento 2.1.5 Theme not loading correctly (worked perfect in 2.1.2)

texts:
We have updated our magento 2 installation from 2.1.2 to 2.1.5.
Everything went fine, except for the layout.

Somehow Magento doesn't load some parts of our custom theme anymore? For example the file:
app/design/frontend/Wantsandneeds/theme/Magento_Theme/layout/default_head_blocks.xml

Is not triggered anymore? It worked well in 2.1.2
What has changed regarding to themes?


texts: i need display 2 price in cart price with VAT and price without VAT - next row, please let me know how i can do this?


texts: How to programatically disable a payment method at Checkout Magento 2

texts:
I want to disable a specific payment method on the checkout page based on some criteria.

I use the "get_shipping_info" event in the di.xml and make in the
"afterSaveAddressInformation" function  a customer check and want to disable some payment methods based on the check result.

I have no idea how I can disable a specific payment method.

I tried it with:

\Magento\Framework\App\Config\ScopeConfigInterface $this->payment

$payment_methods = $this->payment->getValue("payment");
    foreach ($payment_methods as $method) {
        if($method['code'] == "checkmo")
        $method->setData("is_available", false);
    }

But with this I get only an array with all available payment methods.


texts: Magento 2 Duplicate Product URLs Problem

texts:
When creating products in Magento 1 the url was created from the product name, and if there were duplicate product names M1 would add a numerical suffix to the end of the URL.

Since it seems this is no longer the case in Magento 2, how do I deal with products with the same name having duplicate URLs and causing an error?

Thanks


texts: How to customise order state after generating invoice in Magento

texts:
When I am generating an invoice in Magento then the order status becomes processing. means it uses state processing

I want to change it to pending payment or new order state there.

Is any way to customize order state after generating invoice if then tell me where to do it?


texts: How to get the product id based on custom attribute value?

texts:
I have custom attribute value in my store.

How can I get the product id based on that custom attribute value?


texts: Adding products from wishlist to cart is giving me 404

texts:
I am using magento v1.8.1 and foundation template as the basic theme/tempalte.

The problem is:
When I make a wishlist and shared it with the magento default functionality(I haven't done anything to change them)everything is good and the customer get's the email. BUT if you try to add the products through the button "Add all items to shopping cart" it takes me to an 404 page.The button "View all wishlist items" is working fine though..

After investigation I find out that magento is using the same technique that it was using for admin on old versions to check the form_key.

So if you go to Mage/Wishlist/Controller/Abstract.php

There is the function  public function allcartAction()
and it has the

if (!$this->_validateFormKey()) {
            $this->_forward('noRoute');
            return;
        }

Which is responsible to redirect if the validation fails.If you comment that out the "add to basket" works fine.
So to sum up: How can I pass the form key? Because I guess that's the problem?It doesn't pass the form key..

Thanks

---------------- EDIT --------------------------
If you do:

$form     = $this->getRequest()->getParam('code');
        Zend_Debug::dump($form);

you can get the form key.But not if you try form_key..


texts: Magento 1.9.2.3. not login in google chrome

texts:
Magento 1.9.2.3 login problem in admin pannel in google chrome
Invalid Form Key. Please refresh the page
how to slove this problem


texts: Magento 2 Error: Product disappeared on frontend, one store view only

texts:
We are having a weird problem since some days after the shop running for months without trouble.

On one day (only thing we did were some backup-operations on the database which might have caused this),

suddenly all product disappeared on frontend, showing "Wir können keine Produkte entsprechend dieser Auswahl finden", "we could not find any products for this selection".
This happened on the default store view, german
the other store views, french and english are not affected

When we open and save on product in backend, it sometimes shows up in front-end for some seconds.
However, they disappear again with each indexer run.

Another point: After resignation yesterday evening, the products "just" have been back this morning. I don't know what indexer run made them disappear some time later.

Magento 2.1.13, managed server

Anyone has an idea or help for this issue -and probably broken database?

What we did until now:

reindexed many times, cleared and flushed cache
saved many products in top- and store view
saved category in top- and store view
deleted the flat tables in database, reindexed

No effect on all.

What we did not do until now is setup:upgrade and rebuild the production static files because we are experiencing a php-problem on the development site on the same server. We want to avoid that we could end up with a non-productive site after that due to the php problem.


texts: How to show custom attributes of customer in separate/new tab

texts:
I have created couple of attributes for customer and new tab in customer edit form of customer for backend. Currently custom attributes are appearing in Account Information tab. Can i change the tab for these custom attributes?

It may be the duplicate of some other question, but i couldn't find any appropriate solution.


texts:
I am trying to enforce https on an existing magento website, so far so good, the website gets always correctly redirected to the https URL configured in the backend.

As of my understanding the correct way to redirect the old http urls is with a 301 permanent redirect. However I am not sure my configuration is correct since from the network developer tool I see this pattern 301 -> 302 -> 200 (as in the following image).

Is this correct or should I investigate further?

Information about the server:
Magento 1.8.1;
Ubuntu 16.04;
Apache 2;
Php 5;


texts: i add this two filer of date at top now i want add button if some body select date and the press button grid show the data according to date filter


texts: Review tab declaration in product page - magento 2.0.1

texts:
I need to Remove Review tab and their content in product detail page. I can find Details and More Information tab in catalog_product_view.xml under the group attribute detailed_info. But I can't found anything related to Review tab Declaration.In debug mode also not provide that much detail to find layout.

for example I found Detail tab in catalog_product_view.xml

<argument name="title" translate="true" xsi:type="string">Details</argument>

which layout xml file contain review tab declaration?


texts: what is beforeAuthUrl and afterAuthUrl in customer module?

texts:
Some explain about beforeAuthUrl and afterAuthUrl.

These two are session variable used in customer module to redirect to last visit page before login. This is my understanding.

  But why magento use these two variable instead of one variable.

Could some one explain about these variables briefly.

I've refer this link but 'm not fully understand that. To get more information about this i've post this question here.
Thanks to xyking for asking this question.

Cheers.


texts: Add new custom tab with grid selection in product detail page admin : Magento 2

texts:
I have followed Add new tab in product edit page and call custom phtml in Magento 2.1 But i wants to add custom grid selection into the modal!
Share me best solution for this...

Thank you in advance!


texts: Is it possible to create a shopping cart price rule - for a particular category, Any 2x from (category created) for $100?


texts: Country,Zip code and state fields not showing on frontend

texts:
Dropdown for Country and State is not display on the frontend customer register form.
I am trying to find a configuration from admin as it is available by default.


texts: how to get productId in sign up or sign in page when full page cache on in magento2?

texts:
I want to redirect page if customer come from product page ->sign up page i want redirect them after sign up on product page.

But i am not getting product id on that page if full page cache is on in magento2.

  I have created loginpost observer for redirecting page back where before come.
  I am not getting product_id when full page cache is on
  $product_id = $this->_catalogSession->getData('productId');// i am talking about this line

<?php

namespace Tatva\Customer\Observer;

  use Magento\Framework\Event\ObserverInterface;
  use Magento\Customer\Model\Session;
  use Magento\Framework\UrlInterface;
  use Tatva\Subscription\Model\Subscription;

  class LoginpostObserver implements ObserverInterface{

/**
 * [$_subscription]
 * @var [\Tatva\Subscription\Model\Subscription;]
 */
protected $_subscription;

/**
 * [$_customerSession ]
 * @var [\Magento\Customer\Model\Session]
 */
protected $_customerSession;

/**
 * [$_urlInterface ]
 * @var [\Magento\Framework\UrlInterface]
 */
protected $_urlInterface;

/**
 * [$_catalogSession to get productid]
 * @var [\Magento\Catalog\Model\Session]
 */
protected $_catalogSession;

public function __construct(
    \Magento\Catalog\Model\Session $catalogSession,
    \Magento\Customer\Model\Session $customerSession,
    UrlInterface $urlInterface,
    Subscription $subscription,
    \Magento\Catalog\Model\ProductRepository $productRepository
)
{
    $this->_catalogSession = $catalogSession;
    $this->_urlInterface = $urlInterface;
    $this->_customerSession = $customerSession;
    $this->_subscription = $subscription;
    $this->_productRepository = $productRepository;
}

/**
 * @param Observer $observer
 * @return void
 */
public function execute(\Magento\Framework\Event\Observer $Observer)
{
    // Check if customer is redirected by product page then process accordingly

    **$product_id = $this->_catalogSession->getData('productId');**

    if($product_id > 0)
    {
        $productCanBeDownloaded = $this->_subscription->productCanBeDownloaded($product_id);

        if($productCanBeDownloaded == 2)
        {
            $pricingUrl = $this->_urlInterface->getUrl('pricing');
            $this->_customerSession->setAfterAuthUrl($pricingUrl);
        }
        elseif ($productCanBeDownloaded == 3)
        {
            $acc_subscription_list_url = $this->_urlInterface->getUrl('subscription/index/list');
            $this->_customerSession->setAfterAuthUrl($acc_subscription_list_url);
        }
        else{
            $url=$this->_productRepository->getById($product_id)->getProductUrl();
            $this->_customerSession->setAfterAuthUrl($url);
        }
    }

}

}


texts: Magento update custom option image on cart page

texts:
Is there any way to allow user that user can edit on cart page item and reupload the uploaded custom option image from cart page itself.
So there is no need to go to product detail page from cart item.