texts:
How add to cart in magento works ?

As is it based on the session

OR

We can add the product to cart to a particular user using external php call

 require_once '../app/Mage.php';
    Mage::getSingleton('core/session', array('name' => 'frontend'));
    umask(0);
    Mage::app();
    $session = Mage::getSingleton('customer/session');
    $product = Mage::getModel('catalog/product')->load(99);  // Random product ID

    // get cart and add product
    $cart = Mage::getSingleton('checkout/cart');
    $cart->init();
    $cart->addProduct($product, 1);

    // update session
    $session->setCartWasUpdated(true);

    // save the cart
    $cart->save();

As the above code not using any session and customer id am in a bit of confusion , and i called this externally . i asked this question because i first call this via poster , and when i logged in to the site the product is not there in cart for thatuser  .


texts:
All images get these white borders around them all over the page. Even in product view and category view. I havent found any CSS that would do that and would'nt belive it is some kind of plugin.
Is anyone experienced that before?

Magento 1.9.3

To clarify: these white areas appear even when I insert image as big as the container


texts:
I'm developing magento store with couple of thousands of products. Most products have combined color e.g. "black/green/white" (not three separate colors, for example a purse has black, green and white elements).

Because of this the list of colors in the layered navigation filter is really huge and ugly. I have something like "black/green", "black/green/white", "black/white" etc. What I want to do is form a normal list of colors like "black", "green", "white" etc. And then when the customer clicks on say "black", he can see all the products that have "black" as part of their combined color.

Is this possible? And if so, where should I start digging?


texts: Is it possible to have Magento ver. 1.9.1.0 and 2.1.0 on the same VPS server?

texts:
I have one production Magento store right now - it runs on ver. 1.9.1.0. I just tried to install a brand new Magento store on another domain (separate account within the same VPS re-seller hosting account) via Softaculous in the Cpanel and it gets stuck at 95%. I checked the system requirements for the 2.1.0 version and it says:

PHP 5.6 We do not support PHP 5.5.x
PHP 7.0.2, 7.0.6 up to 7.1
MySQL 5.6
Apache 2.2 or 2.4 nginx 1.8 (or latest mainline version)

I currently have this on the server:

PHP Version 5.5.27
MySQL Version   5.6.30
Apache Version  2.2.29

I tried to find out what the system requirements are for the 1.9.1 version and it seems:

PHP:
PHP 5.4.x
PHP 5.5.x

Database:
MySQL 5.6

Web Server:
Apache 2.x

Looking at all this - it seems that the only thing which is not sufficient for the 2.1.0 minimum system requirements is the PHP (I have 5.5.27 and it requires 5.6 but Magento version 1.9.1.0 will not run on PHP 5.6, right?)

Any ideas what I could do?


texts: Magento 2.1 which template file do I need to override to edit homepage content?

texts:
I've been trying to find the phtml file that I need to override in order to edit the homepage content - the bit that says "CMS homepage content goes here.". I can't seem to find the right template file to override, does anyone know where it is? I've been looking in magento/module_cms is that the right place?

I have a custom theme set up
It's parent is the blank theme
The theme is working properly - I've managed to edit the header and footer template and layout files.


texts: social login with customer session issue

texts:
We are facing an issue on Social login in Magento 1.9 (facebook and google+)

I have checked customer is created is successfully but not able to set session of a customer.

The customer is also created

the Customer session is not generated and its redirect on the home page.

May be there is an issue with

Mage::getSingleton('customer/session')->setCustomerAsLoggedIn($customer);


texts: Magento 2 import stuck 503 (Service Unavailable)

texts:
I am trying to import some files with CSV on magento 2, when i click check data, it nevers loads. when i click f12 i get

  Failed to load resource: the server responded with a status of 503 (Service Unavailable)

  magento/admin_[admin]/admin/import/validate/key/[key]/?form_key=[form
  key]


texts: How to allow customer to sell their products [Magento]

texts:
i have created marketplace and allow user to upload their products and allow others to buy them .

then i made list of orders (made by buyers customer ) for each product that customer partner has uploaded

i want buyers to buy product from customer and the money transfer to customer not to admin

i want to allow any transaction without admin intervention , how can i do this transaction ?


texts: Unable to get custom order attribute from magento v2 soap api

texts:
here is the problem.

I have added additional fee to my orders. When calling the magento api v1 i get the response including this additional fee (called handling_fee_amount). But when calling the magento api v2, i can not get it. All I get are the usual attributes (not including this one).
Here is the soap call:

$session = $client->login('ApiTest', 'test_key');
$result = $client->call($session, 'sales_order.info', '100015226');

Also, I have added my custom attribute to the wsdl.xml and wsi.xml files in my own module like this:

wsdl.xml

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns:typens="urn:{{var wsdl.name}}" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/"
name="{{var wsdl.name}}" targetNamespace="urn:{{var wsdl.name}}">
<types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:Magento">
        <import namespace="http://schemas.xmlsoap.org/soap/encoding/" schemaLocation="http://schemas.xmlsoap.org/soap/encoding/" />
        <complexType name="salesOrderEntity">
           <all>
                <element name="handling_fee_amount" type="xsd:string" minOccurs="0" />
           </all>
        </complexType>
    </schema>
</types>

wsi.xml

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:typens="urn:{{var wsdl.name}}"
         xmlns:xsd="http://www.w3.org/2001/XMLSchema"
         xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
         xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
         xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
         name="{{var wsdl.name}}"
         targetNamespace="urn:{{var wsdl.name}}">
<wsdl:types>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:{{var wsdl.name}}">
        <xsd:complexType name="salesOrderEntity">
            <xsd:sequence>
                <xsd:element name="handling_fee_amount" type="xsd:string" minOccurs="0" />
            </xsd:sequence>
          </xsd:complexType>
     </xsd:schema>
</wsdl:types>
</wsdl:definitions>

But no changes.
I have logged the call to the info method in Mage_Sales_Model_Order_Api and handling_fee_amount is there, but somehow when it is returned it is lost.

Any ideas?

Thanks.


texts:
Magento 2.1.4

Created theme with Luma as parent. Via ftp uploaded my logo.svg to app/design/frontend/[vendor]/[theme]/web/images. It is working, logo shown instead of Luma default. But it doesn't honor my logo's size that is a bit wider.

Tried to create app/design/frontend/[vendor]/[theme]/layout/default.xml like attached image, no change, still to small.

But if I directly modify Luma's file vendor/magento/theme-frontend-luma/Magento_Theme/layout/default.xml it will show my logo with correct width and height.

What am I missing?


texts: Show secondary categories in layered navigation

texts:
I have products that sits in multiple categories.

Category structure looks like this:

Root
- Car Types
    |- SUV
    |- Crossover
    |- Coupe
- Volvo
- Volkswagen

The product is assigned to SUV and Volvo.

When you are in Volvo category, I want to show the category filter for SUV, Crossover, Coupe in the layered navigation. But right now it only shows the attributes. Not the other categories a product is assigned to.

So I can essentially click in the filter for "SUV" when I am in the "Volvo" category.

But then you say "use attributes". No. I want to have content on every category page, with custom CMS blocks and category texts and images. Attribute filter does not support this, and is not indexable by Google because of canonical urls etc.

Out of the box it does not seem that you can cross link like this.

Is this possible?

tl;dr

Show secondary categories for products in filtered navigation no matter what category you are browsing.


texts: How to remove add to wishlist and email in product detail page?

texts:
I want to remove add to wishlist and email in product detail page. How to do that?

Can anyone please point me on how to achieve this?


texts: Static block into a specific kind of page

texts:
I need to show an element wrote in HTML into a footer page, only if you're in a specific page ( website homepage, category pages, search results and product pages).

I don't want use statics blocks because the element that I've to show is a simple image with a small amount of text, so the best way that i think to add an "if" that shows the code only if you're in the pages quoted upstairs, but I don't know how can I write the "if condition".

I'm waiting for the answers.


texts: Is it good practice to get product collections in helper function and calling in phtml file custom module Magento 2

texts:
Hi all, i wanted to know either is it good practice to get product
  collections in helper function and calling that function in phtml file
  within custom module Magento 2

  Because in my case helper function not working properly.

Please check below Code

  app\code\Vendor\Module\Helper\Data.php

<?php
namespace Vendor\Module\Helper;

class Data extends \Magento\Framework\App\Helper\AbstractHelper
{

    protected $_objectManager;
    const NEWMEMBER = "NEWMEMBER";

    public function __construct(
        \Magento\Framework\App\Helper\Context $context,
        \Magento\Framework\ObjectManagerInterface $objectmanager
    ) {
        $this->_objectManager = $objectmanager;
        parent::__construct($context);
    }

    public function getProductCollections(){
        $productSku = self::NEWMEMBER;
        $loggedInProducts = $this->_objectManager->get('Magento\Catalog\Model\Product')
            ->getCollection()
            ->addAttributeToFilter('sku', array('in' => $productSku));
        return $loggedInProducts;
    }

}

  app\code\Vendor\Module\view\frontend\templates\Member.phtml

$helper = $this->helper('Vendor\Module\Helper\Data');
$getProductCollections = $helper->getProductCollections();


texts: Magento : Change products per page for individual categories

texts:
First and foremost, I know that you can change the default products shown on all category pages for Grid and List views in System > Catalog > Frontend.

What I want to do is change this setting for individual categories. Let's say my default products per page setting is set to 16, I want the ability to specify that an individual category should only show 12 per page instead. My current approach is to create custom list and toolbar templates, essentially re-loading the collection with a custom limit. I have to believe there is a more programatic way to do it but am just at a loss as to what to do.


texts:
I have created a new page on which I'd like my users to be able to login in via. All works well when the user enters valid information (they're logged in successfully), but if they enter the wrong email / password, they are redirected to the /customer/account/login/ page. It is on this page that they're then shown the 'Invalid login or password' message in the the messages bar at the top of the page.

I'd obviously like the validation messages to appear at the top of my new page and not redirect the user. I thought that if I included the page.messages container and the blocks within it, it would work. Unfortunately, it doesn't. Any ideas?

Here's a section of the xml for my new page:

<container name="newpage.login.container" htmlTag="div" htmlId="newpage-login-wrapper">
    <container name="page.messages.newpage" htmlTag="div" htmlClass="page messages">
        <block class="Magento\Framework\View\Element\Template" name="ajax.message.placeholder.newpage" template="Magento_Theme::html/messages.phtml"/>
        <block class="Magento\Framework\View\Element\Messages" name="messages.newpage" as="messages" template="Magento_Theme::messages.phtml"/>
    </container>
    <block class="Magento\Customer\Block\Form\Login" name="customer_form_login_checkout" template="Magento_Customer::form/login.phtml">
        <container name="form.additional.info" as="form_additional_info"/>
    </block>
</container>

The messages container and its content appears on the page, but it does nothing and the page is still redirected when the user tries to log in with incorrect details.


texts: Session lost with SSL after 1.9.1 upgrade

texts:
Since Magento upgrade 1.9.1 we are getting session lost issues when we have SSL enabled on frontend. This is when going back to magento after payment gateway site.

I understand that the "security" has been improved in this release and I'm wondering what that actually means.


texts:
I want to override the order of "Total Excluding Tax" and "Total Including Tax" in the order confirmation email so I tried to use preference to override, but its not working. I want to override this

  block Magento\Tax\Block\Sales\Order\Tax class.

Can you please suggest me how to override this block?


texts: Deleting dupicate skus with added conditions in Magento

texts:
I am trying to delete duplicate skus in magento.

I can confirm with this query that duplicates exist on the db.

SELECT `entity_id` FROM `catalog_product_entity` GROUP BY `sku` HAVING (COUNT(*) > 1)

However, from these duplicates that are returned; I want to delete a product that has no image, product name is ALL CAPS, and no brand.

to narrow it down even further as the above conditions can exist on both skus, I don't want to remove both so I want to use the created_at field and delete the one that is older.

This is tricky, I hope it is clear.

Thanks in advance


texts: The same upsell products appear at any product page on magento ee 1.12.0 with FPC enabled

texts:
I'm not 100% sure, but it seems like a bug in magento's built-in implementation of hole-punching for up-sell/related products.

I looked through the code and found that container for upsell/related products depends on customer session, but not on the currently viewed product.

Class responsible for upsell/related products caching called Enterprise_PageCache_Model_Container_CatalogProductList and it extends Enterprise_PageCache_Model_Container_Advanced_Quote. This class (CatalogProductList) doesn't overwrite neither _getCacheId nor _getAdditionalCacheId methods. Thus this cache only depends on customer's session and because of that whenever any visitor visits the product page, which is not in the cache yet, magento rebuilds upsells block for that particular product and after that it is used on every product page for this customer.

As a temporary solution, I added below method into CatalogProductList class, and it fixed the issue. I know this is poor solution and I'm going to change that, but I wanted to ask if anybody had such issue and what is the solution for it.

Method which was added is

public function applyWithoutApp(&$content)
{
    return false;
}


texts: Magento 2: Set custom class on modal background

texts:
How do I add a custom class to the background of a modal widget in Magento 2?

I'm able to change the class for the main modal  with the modalClass config property but want to change the class on the background div behind the modal, which isn't a child of the .

This is how I set the modalClass currently:


texts: Magento2 - How to extend jQuery widget (configurable.js)

texts:
I'm creating an extension that replaces the default configurable options label 'Choose an Option...' with the attribute name, for example 'Choose a Color...'.

How can I extend (not override!) the jQuery widget configurable.js and only modify this line?

I know from the documentation that I can override a jQuery widget, so I did:

define([
    'jquery',
    'jquery/ui',
    'configurable' // usually widget can be found in /lib/web/mage dir
], function($){

    $.widget('silvan.configurable', $.mage.configurable, {

    });

    return $.silvan.configurable;
});

How can I initialize this file? Should I load it via requirejs-config? The map function is only for overriding right?

Is it possible to only modify this line? It's called from this function:

_fillSelect: function (element) {}


texts: How to use _beforesave custom module check already exists or not

texts:
Hi I have a Custom module While Saving database i need to check weater the data available in database or not

Can you please guide me how to check this?

public function saveAction()
        {

            $post_data=$this->getRequest()->getPost();

                if ($post_data) {

                    try {

                        $model = Mage::getModel("delivery/delivery")
                        ->addData($post_data)
                        ->setId($this->getRequest()->getParam("id"))
                        ->save();
                        Mage::getSingleton("adminhtml/session")->addSuccess(Mage::helper("adminhtml")->__("Delivery was successfully saved"));
                        Mage::getSingleton("adminhtml/session")->setDeliveryData(false);

                        if ($this->getRequest()->getParam("back")) {
                            $this->_redirect("*/*/edit", array("id" => $model->getId()));
                            return;
                        }

                        $this->_redirect("*/*/");
                        return;
                    }
                    catch (Exception $e) {
                        Mage::getSingleton("adminhtml/session")->addError($e->getMessage());
                        Mage::getSingleton("adminhtml/session")->setDeliveryData($this->getRequest()->getPost());
                        $this->_redirect("*/*/edit", array("id" => $this->getRequest()->getParam("id")));
                    return;
                    }

                }
                $this->_redirect("*/*/");
        }


texts: Adminhtml - How to add custom template for custom product attribute

texts:
I already added custom tab and custom attribute like this.

I also created a custom column in database for attributes, called custom_values.

Now I want to add custom template for this attribute (in picture, attribute is Active)

In my custom template, it contains a form (hard code maybe). When save product, I want to serialize form data then assign to custom_values of Active attribute

Questions are:

How to add custom template for specific product attribute in adminhtml
How to observe product save event to serialize form data then assign value before it actually saves


texts: Best practice for multilangual static content in Magento2

texts:
I'm wondering how other developers handle multilingual stores in Magento2. I find it rather hard, because you'll want to optimize the URL keys for SEO in each language, but in doing so you lose the relation between pages.
That is why the Magento documentation tells us to use the same canonical URL key for all translations.
For instance, English /about-us/ would translate to /over-ons/ in Dutch. But when I open that page in any language and switch to another, I get a 404 page because it looks for the same URL key.
The same issue arises with menus. A lot of shops have static items/pages in their menus which each have their own URL key and label/name.
So what would you suggest is the best way to make this manageable?
My first thought would be to have a .htaccess file with rewrites, rewriting about-us to over-ons and back, but that would make it unmanageable with more languages and a lot of content.


texts: Single store multi-currency setup issue with import rate Magento2

texts:
I am having issue in import rate for currency.
Default currency is US Dollar and the other currency what I want is Indian Rupee.

Import Rate options are not working.


texts: Shipping Price Promotion - Reduced shipping rate based on quantity of specific products

texts:
I'd like to set up a price promotion that reduces the shipping cost by 50% on specific (categorised) products, once cart quantity increases past 1.

So for 1 item, shipping is 9.95.
For 2 items, shipping is 50% off for the second item, 9.95+(9.95/2)= 14.93
For 3 items, shipping is 50% off for the second and third items,
9.95+((9.95/2)+(9.95/2)= 19.90

I can't find a way to manage this in Magento.


texts: Customer doesn't get feedback about VAT number during checkout

texts:
I configured the Enable Automatic Assignment to Customer Group based on VAT number for European customers. It works fine. If a European customer orders and enters a valid VAT number, the VAT is reduced to 0%.

But during checkout the customer doesn't receive feedback on the correctness of the entered VAT number. A lot of customers enter the wrong VAT number and then the VAT is not reduced.

I was expecting feedback to the customer about the validness of the VAT number, but my Magento installation doesn't give this feedback. Is this normal? How can I add this feedback?


texts:
I have created a UI listing in Magento 2. The first column was getting the id of the product. Since I don't want to display the id, I wanted to display its SKU. So I applied a class for the column.

     <column name="product_id" class="Avesh\Rule\Ui\Component\Listing\Column\Rules\Sku">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="filter" xsi:type="string">text</item>
                <item name="sorting" xsi:type="string">asc</item>
                <item name="label" xsi:type="string" translate="true">SKU</item>
            </item>
        </argument>
    </column>

Now I added a filter to filter the column by Sku. It doesn't work. But if I put the id of the product it works fine. What I am missing?

Searching with SKU

Searching with Id

Undefined index: sku in /var/www/vhosts/website/app/code/Avesh\Rule/Ui/Component/Listing/Column/Rules/Sku.php on line 37 I don't have a colum name in my table as sku. just have a product Id when i change it to

    <column name="sku" class="Avesh\Rule\Ui\Component\Listing\Column\Rules\Sku">

Class code

namespace Avesh\Rule\Ui\Component\Listing\Column\Rules;

use Magento\Ui\Component\Listing\Columns\Column;

use Magento\Framework\View\Element\UiComponent\ContextInterface;
use Magento\Framework\View\Element\UiComponentFactory;
use Magento\Catalog\Model\ProductFactory;

class Sku  extends Column
{
protected $productFactory;

public function __construct(
    ContextInterface $context,
    UiComponentFactory $uiComponentFactory,
    array $components = [],
    array $data = [],
    ProductFactory $productFactory
) {
    parent::__construct($context, $uiComponentFactory, $components, $data);
    $this->productFactory = $productFactory;
}

public function prepareDataSource(array $dataSource)
{
    if (isset($dataSource['data']['items'])) {
        $fieldName = $this->getData('name');
        foreach ($dataSource['data']['items'] as & $item) {
            if ($item[$fieldName] != 0) {
                $adminName = $this->getProductSku($item[$fieldName]);
                $item[$fieldName] = $adminName;
            }
        }
    }
    return $dataSource;
}

private function getProductSku($productId) {
    $product = $this->productFactory->create()->load($productId);
    return $product->getSku();
}
}


texts: What is the difference between Import/Export vs Dataflow

texts:
So, I'm using Magento 1.6.2.0 on a project and I'm seeing I have options for import, export, and dataflow profiles. In previous versions I've used the interface has been like the dataflow profiles. What is the difference between these, and what are some scenarios which I should be using each one?

The reason I'm asking is because I've been trying to import products with new images and it's not working whatsoever. Using the Import feature it's all going through without any error messages. When I try to import the same file using dataflow, it gives me errors about the images not existing, and there are also other errors since it looks like the exported data using the export feature isn't in the proper format to import using the dataflow profiles. I can't find any information in the forums or anywhere else, so maybe someone can shed some light for me.


texts: Magento CLI Install Error Megento_Catalog

texts:
I'm trying to install Magento 2.3 from the terminal and I find the following error, does anyone know how to fix it?

In PatchApplier.php line 170:

  Unable to apply data patch Magento\Catalog\Setup\Patch\Data\InstallDefaultCategories for module Magento_Catalog. Original exception message: Invalid entity_type specified: catalog_category

In Config.php line 449:

  Invalid entity_type specified: catalog_category

I have seen that increasing php memory works for some people, but in my case that doesn't work.


texts: How to store current currency in session in REST API Magento 2.3?

texts:
I have used the belove method to store current currency in session using Custom API but can not get current currency wise output in Default API in Magento 2.3

protected $_storeManager;

public function __construct(
        \Magento\Store\Model\StoreManagerInterface $storeManager
    )

{
 $this->_storeManager = $storeManager;
}

$storeManager = $this->_storeManager;
if ($currency) {
    $storeManager->getStore()->setCurrentCurrencyCode($currency);
}


texts: Call a custom model function from phtml file

texts:
I created a custom model Create.php in this path \Vendor\ModuleName\Model\Subscription\Order and a simple function inside it :

<?php
namespace Vendor\ModuleName\Model\Subscription\Order;

class Create
{
    public function __construct();
    public function helloFromModel() {
        return 'Hello';
    }
}

I'm calling this function in my block file \app\code\Vendor\ModuleName\Block

<?php
namespace Vendor\HelloWorld\Block;
use Magento\Framework\View\Element\Template;

class HelloWorld extends Template
{
public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Vendor\HelloWorld\Model\Subscription\Order\CreateFactory $orderFactory
        ) {

        $this->_orderFactory = $orderFactory;

        parent::__construct($context);
    }

    public function helloFromBlock() {
        $model =  $this->_orderFactory->create();
        return $model->helloFromModel();
    }
}

And I expect to have a Hello in the phtml file :

<?php $this->helloFromBlock(); ?>

However, I have nothing printed. What wrong am I doing ?


texts: Adding Message under Payment Method (like paypal redirect message)

texts:
I need to add message under Redsys Payment Method (like paypal redirect message) when you click it.
Example:

Where i can add this?


texts: restrict some customers from buying products based on zip codes

texts:
we are using  customized shipping method something like "flat rate" shipping method.

we have to restrict the customer from buying products from some zip codes.

how we can achieve this?


texts:
I want to create a custom script for this I have created folder test on root

and two files inside folder
index.php , test.php

My index.php Looks like

require DIR . '../../app/bootstrap.php';

require dirname(__FILE__) . '/Test.php';
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER);

$app = $bootstrap->createApplication('Test');

$bootstrap->run($app);

and Test.php looks like below

class Test extends \Magento\Framework\App\Http implements \Magento\Framework\AppInterface
{
    public function launch()
    {
        echo "launched";
        return $this->_response;

    }

    public function catchException(\Magento\Framework\App\Bootstrap $bootstrap, \Exception $exception)
    {
        return false;
    }

}

But am getting 404 error example.com/test

example.com/test/index.php getting File not found


texts: How to install magento 2 module manually facing error

texts: I'm trying to install slider module from FTP and facing some errors. Please help


texts: Create a horizontal menu into a block using megamenu

texts:
I'm using magento  2.1.6

I need to get default horizontal menu in an CMS block. I have tried to call block this way:

  {block class="Magento\Theme\Block\Html\Topmenu" name="catalog.topnav"
  template="Magento_Theme::html/topmenu.phtml" ttl="3600"}}

Its not appearing on frontend and not generate any log.

How can I change megamenu to default Magento categories?


texts: Magento2: how to list categories in static block?

texts:
How can I list subcategories of some category in a static block?

UPDATE: It seems there already is a widget available for this in Github


texts: Magento 2 - How to check if custom route exists

texts:
It's quite straight forward to check if a request url exists in a store scope via url_rewrites.
However, I'm wondering if there is a way to check if a custom route exists (as they don't have an entry in url_rewrites).
I.e. if I have
<?php

class \MyCompany\MyModule\Controller\Index\All extends \Magento\Framework\App\Action\Action

and declared my frontend route
<route id="mymodule" frontName="mymodule">

How to check if mymodule/index/all is a valid request_path (obviously we can try to request this path and will get a HTTP 200 response but I'm trying to avoid going down that path).


texts: Quote trigger_recollect never passing to 0?

texts:
Is it "normal" that when i modify my quote manually through phpmyadmin, i put "trigger_recollect" to 1, then i reload my cart, it's staying to 0 ?

Note : I'm trying to modify my product final prices through observers/plugin/whatever...


texts: Magento 2: How to group and make new sections in customer attributes in Account Information Tab?

texts: I want to sort and group Customer Attributes in back-office view. There is no problem with sorting but how can I group it? There is no Attribute Set/Groups like for product attributes. I want to make a few sections in this view. What is the best way to do it?


texts: PHP, PHTML and other files get directories after updating via ./mage update-all

texts:
Since Magento 1.9.2.x (don't know which version exactly, but seems to be since 1.9.2.2) when updating via ./mage update-all some files turn into directories.

This belongs to default files like ./app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Type/Configurable/Product/Collection.php or ./app/design/adminhtml/default/default/template/xmlconnect/edit/tab/design/preview/tab_items_android.phtml

I haven't figured out if there is a kind of pattern to make this happen. Also i'm wondering, if nobody else has made this experience till now?

Is this a known issue or is there even a workaround to prevent this behaviour? The only way to get my backend working is to delete the 'folders' and upload the files from e.g. a Magento 1.9.2.3 archive (or whatever version i need).


texts: Inclusive tax always shows as £0.00 in breakdown

texts:
All the products on my site are inclusive of tax.

However at the cart and checkout stage and also any invoices I'd still like to be able to display what the tax portion was.

Like this site.

The Total is still just £75.05 + £3.99 delivery, but it's good to show the customer what the tax portion was.

Unfortunately on my site magento keeps showing the tax value as £0.00:

I'm using Magento Community Edition 1.7.

I have setup my tax details as follows:

System > Conifguration > Sales > Tax

Sales > Tax > Manage Tax Rules

Sales > Tax > Manage Tax Zones and Rates

Product > General

Is there anything obvious I'm overlooking?


texts: how to refund only Partial amount while creating memo

texts:
I have a site where I have to refund Partial amount of the order to the customer.

The product price is 1000 and it's weight is 100 grams, after manufacturing the weight of the product is not exactly the same.

So after complete the order I have to return some amount to the customer based on the final weight of the final product. how to do it?


texts: Magento2 - WYSIWYG uploader missing folders

texts:
I would like to know why folders are not appearing in the WYSIWYG image uploader.

In image1 below, only "test" folder appears (pub/media/test), but I have another folder "test+" that is not appearing (see image2)


texts: Magento 2 Blank Screen Product Detail page

texts:
I added one product from Magento admin panel (Magento 2.2.2)

Cleared cache and indexing, Product appears in search and listing page and you can even add to cart from Listing page.

But when you click on the product and visit the product details page it gives the blank screen

In the network tab, it shows status code 200 and in the page source, it shows the empty body.

There is nothing in var/log/* and /var/log/apache2/error.log

And i tried adding

   error_reporting(E_ALL);
   ini_set('display_errors', 1);

in index.php at root folder


texts: magento 2.3 customer tax class not showing on product page

texts:
this is my general setup for taxes:

it works perfectly for customer in the retail customer class. However, I have a few customers who needs to have no tax applied to them. So I've created a new customer tax class, applied this tax class to the wholesale customer group and placed these few customers into the wholesale group. This is my tax rules setup:

these are my customer groups:

this is my test customer with the wholesale group assignment:

I created a test product with price = 50. If I open the product page from frontend, I can see the price as 50. When I add it to the cart, I can see the total correctly: subtotal 40.98 plus taxes. So far, everything works as intended: the price in catalog page shows the price including taxes and the totals shows the net price + the tax separately.

The problem is when I login as the wholesale customer:

in the cart I see everything correctly: price 40.98, subtotal 40.98 + 0 taxes:

but in the product page, I still see 50 as the product price: shouldn't it be 40.98 since the wholesale customer has no tax applied?

I also tried to change the basic tax setup from "including tax" to "excluding tax" for catalog prices but that doesn't seem to change anything: even with excluding tax from catalog prices, the price displayed in the product page is still 50.

Cleaning cache and reindexing doesnt help: the price in catalog page is still 50.

How can I have the price in product page show it correctly for the wholesale customer?


texts: How to take product final price after a discout rule was applied

texts:
I have a custom script located in the root of magento and here i takle all the product prices and create a csv with those values.

I have a problem with the product price when I tried apply a discount rule.
Even in the fronted, it show me the correct price, i mean the price after discount, in my csv i can't take this price.

When I applied a discount rule, in csv i recive the normal price.
This is my code for taking the discounted price:

foreach($collection as $product) {

  //load product by id
   $product = Mage::getModel('catalog/product')->load($product->getId());
   //take tier price
   $existingTierPrice = $product->tier_price;

    **//get promo_price**
    $promo_price = Mage::getModel('catalogrule/rule')->calcProductPriceRule($product,$product->getPrice());

    if(!$promo_price && $netto_price =='No'){
      $special_price = $_specialPrice = $product->getFinalPrice();
    }elseif($netto_price =='No' && $promo_price){
        $special_price = $promo_price;
    }else{
        $special_price = NULL;
    }

$netto_price it's to No.

Does anyone know why i can't take this discounted price?


texts: Mini cart is not working after adding custom theme

texts:
Mini-cart  Stopped working after adding custom theme in magento 2.1.6.
Any one please help me.

[Note: I have already upload vendor template,layout and web file in our theme ]

Please see image above:


texts: Overwriting controller vs overwriting action controller request

texts:
I'm busy working though Grokking Magento by Vinai Kopp, and reached a part where he explains where he explains how to rewrite requests to (eg) the checkout/cart controller, and he gives an example of the config.xml, like this:

<!-- global only (not frontend or adminhtml) -->
<global>
    <routers>
        <!-- route name -->
        <checkout>
            <rewrite>
                <!-- controller name -->
                <cart>
                    <!-- rewrite all controller actions -->
                    <override_actions>false</override_actions>
                    <to>example/special_cart</to>
                </cart>
            </rewrite>
        </checkout>
    </routers>
</global>

This all seems straightforward enough, except that I have recently also watched the TutsPlus Magento Fundamentals videos, where they take you through an example of overwriting a controller, and their config.xml looks completely different eg:

  <frontend>
    <routers>
      <catalog>
        <args>
          <modules>
            <Envato_Catalog before="Mage_Catalog">TutsPlus_Demo</Envato_Catalog>
          </modules>
        </args>
      </catalog>
    </routers>
  </frontend>

This is also pretty straightforward, but my problem here is that these 2 very different configs doing (seemingly) the same thing - could anyone please shed some light on this situation for me? I am trying to get the hang of Magento and this one is confusing me a LOT!


texts: Error page occurs and not sure what to do

texts:
I've come across the error page on my dev site for Magento. I know where to locate the report but the problem is I do not have a clue what to do next. I haven't made any changes to the site recently so not sure why this would occur. I am unable to even access the admin side.

This is the error/report I've found:

a:4:{i:0;s:55:"Module "Mage_Newsletter" requires module "Mage_Widget".";i:1;s:926:"#0 /chroot/home/vpwindow/dev.mossyoakgraphics.com/html/app/code/core/Mage/Core/Model/Config.php(849): Mage::throwException('Module "Mage_Ne...')

Any guidance would be greatly appreciated!


texts: how to change search result page title dynamically

texts:
I searched, doesn't find a answer.

I know use layout XML to set title like below

<reference name="head">
    <action method="setTitle"><title>New Title</title></action>
</reference>

But this is set title static, I need customize the title dynamically, like "shopping with (Search Phrase)", the "Search Phrase" is dynamically generate by user input. Magento has a default dynamically search page title form, I want to know the way to change its default form.

Thanks for any help!


texts: In magento2, Is there any way to done a backend selected shipping method only display in frontend checkout

texts:
Is there any way to done a backend selected shipping method only display in frontend (checkout)?

Actually expected as

Backend:

I need to show dynamically selected shipping method alone shown in frontend checkout:

Frontend:


texts: How to get entity id(order id) in success phtml

texts:
In my success.phtml , $block->getViewOrderUrl() gives a order url with order id(entity id) .

dev/tests/functional/tests/app/Magento/Checkout/Test/Block/Onepage/Success.php

  /sales/order/view/order_id/173569/

How to get this order id alone - 173569 in success.phtml.

I don't see any functions in success.php


texts: How do I hide the quantity box in bundle product page?

texts: Basically I've already set default quantity(1) for the linked product in the bundle product display page, now I just want to hide the quantity selection for the linked product all together. Appreciate any pointers. thanks


texts: I did a migration between Oscommerce and magento and now, to not lose our work with SEO I want to redirect the olds Url to the news Urls in magento, how can I do that?


texts:
Is their any way we can skip through this ?
throw new \Magento\Framework\Exception\LocalizedException(
                                __('Any error Msg.'),
                                $e
                            );

I have created an application where i refund shipping amount online when i upload a csv with order numbers.
but for some order it did not pass through as i get exception & the execution stops.
I need to skip if error thrown & start execution of another row in csv.


texts: Magento 2 name attribute shows empty when creating custom fields on product page

texts:
When i try to add new fields to product creationg form in Magento 2 the html name attribute shows up empty,
I tried more or less everything and by everything i mean:

1) Adding the custom field i need by adding it to the field pool by using a modifier file

2) Adding the custom field i need by extending XML layout file product_form.xml

3) Adding the custom field i need by making a fieldset in the extending XML layout and then filling fields in there using the FieldFactory class

But no matter which of the above methods i use i end up with the same result of name attribute of being empty is this maybe a bug in the magento2 system?

Here is my code:

1)

AddFieldsData

use Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\AbstractModifier;
use Vendor\Namespace\Ui\Component\Listing\Page\Options as SelectOptions;

class AddFillFieldsData extends AbstractModifier
{
public function __construct(
    SelectOptions $SelectOptions
    )
{
    $this->selectOptions = $SelectOptions;
}
public function modifyMeta(array $meta)
{
    $meta['fields'] = [
        'arguments' => [
            'data' => [
                'config' => [
                    'label' => __('fields'),
                    'sortOrder' => 300,
                    'collapsible' => true,
                    'componentType' => 'fieldset'
                ]
            ]
        ],
        'children' => [
            'new_field' => [
                'arguments' => [
                    'data' => [
                        'config' => [
                            'formElement' => 'select',
                            'componentType' => 'field',
                            'options' => $this->selectOptions->toOptionArray(),
                            'visible' => 1,
                            'dataScope' => "new_field",
                            'required' => 0,
                            'label' => __('Tilføj nyt felt')
                        ]
                    ]
                ]
            ]
        ]
    ];

    return $meta;
}

/**
 * {@inheritdoc}
 */
public function modifyData(array $data)
{
    return $data;
}
}

di.xml

2)
product_form.xml

3)
AddFieldData
    class AddFillFieldsData extends BaseFieldset
    {
     /**
      * @var FieldFactory
      */
      private $fieldFactory;

 public function __construct(
    ContextInterface $context,
    array $components = [],
    array $data = [],
    FieldFactory $fieldFactory,
    SelectOptions $SelectOptions
    )
 {
    parent::__construct($context, $components, $data);
    $this->fieldFactory = $fieldFactory;
    $this->selectOptions = $SelectOptions;
 }

/**
 * Get components
 *
 * @return UiComponentInterface[]
 */
public function getChildComponents()
{
        $fields = [];

        $fields[] =
        [
            'label' => "Tilføj nyt felt",
            'value' => "",
            'dataType' => "string",
            'dataScope' => "new_field",
            'name' => "new_field",
            'formElement' => "select",
            'options' => $this->selectOptions->toOptionArray(),
        ];

        foreach ($fields as $k => $fieldConfig) {

            $fieldInstance = $this->fieldFactory->create();
            $name = "new_field";

            $fieldData =
            [
                'config' => $fieldConfig,
                'name' => $name
            ];

            $fieldInstance->setData($fieldData);

            $fieldInstance->prepare();
            $this->addComponent($name, $fieldInstance);
        }
        return parent::getChildComponents();

}
}


texts: I am facing issue: On home page double quote not showing in Image alt and title on view source, But on inspect element it is showing. Anyone have suggestion so please share.


texts: Most efficient way to generate Products CSV

texts:
I am trying to generate a product CSV to upload into a third party CRM

The below code needs to grab the SKU, QTY, PRICE etc for each store in Magento. The problem is when it comes to large collections the script gets stuck, when I have it on a schedule to run every 5 or so minutes.

Can anyone advise on what I can do to make this function more efficiently please?

public function getOffersToUpload()
{
    //Get the productIds
    $productIds = $this->getStoreProducts(array(), true);

    //Check if we should include price column in store feed
    $storePrice = Mage::getStoreConfigFlag('marketplace/offer_settings/upload_offer_price');

    //Create the product.csv file
    $csvFilename = 'product.csv';
    $exportDir = Mage::getBaseDir() . '/var/products/' . $csvFilename;

    if (count($productIds) > 0) {

        $products = Mage::getModel('catalog/product');

        $stores = Mage::app()->getStores();

        foreach ($stores as $key => $store) {

            $storeId = $store->getId();

            if (Mage::getStoreConfigFlag('modulename/configuration/active', $storeId)) {

                //Unegister the shopId for each loop
                Mage::unregister('shop_id');

                //Create the array
                $products_row = array();
                $header = array('sku', 'product-id', 'product-id-type', 'price', 'discount-price', 'discount-from-date', 'discount-to-date', 'quantity', 'state');

                $products_row[] = $header; // CSV header

                $csv = new Varien_File_Csv();
                foreach ($productIds as $productId) {
                    $prod = $products->setStoreId($storeId)->load($productId);
                    $data['sku'] = $prod->getSku();
                    $data['product-id'] = $prod->getSku();
                    $data['product-id-type'] = 'SHOP_SKU';
                    $data['price'] = $offerPrice ? round($prod->getPrice()) : "";
                    $data['discount-price'] = $prod->getSpecialPrice();
                    $data['discount-from-date'] = $prod->getSpecialFromDate();
                    $data['discount-to-date'] = $prod->getSpecialToDate();
                    $data['quantity'] = round($prod->getStockItem()->getQty());
                    $data['state'] = '11';

                    $products_row[] = $data;

                }
                //write to csv file
                $csv->saveData($exportDir, $products_row);
                Mage::app()->setCurrentStore($store);
                Mage::register('shop_id', $storeId);
                $callApi = Mage::helper('modulename/callapi');
                $callApi->uploadData();

                //Unset the array() after first loop
                unset($products_row);

            }

        }
    } else {
        Mage::log('no product selection specified', null);
    }
}`


texts: Magento 2: Override Laminas_Mail module under vendor directory

texts:
I want to create a plugin on connect() method of /vendor/laminas/laminas-mail/src/Protocol/Smtp.php class.
I have tried by di.xml :
<type name="Laminas\Mail\Protocol\Smtp">
    <plugin name="apply_custom_connection_context"
            sortOrder="1000"
            type="[Vendor]\[Module]\Plugin\Laminas\Mail\Protocol\Smtp"/>
</type>

Smtp plugin class :
<?php

namespace [Vendor]\[Module]\Plugin\Laminas\Mail\Protocol;

class Smtp
{
    public function aroundConnect(\Laminas\Mail\Protocol\Smtp $subject, callable $proceed)
    {
        echo "Test Connect";
        exit;
    }
}

But this solution is not working. Any suggestions ?


texts:
I want to sort all categories & subcategories with a custom attribute to show on front end. So I need to modify the code.
Can anyone tell me the file from where the all categories & subcategories are fetched in front end. I need to do some modification in it but I don't know where that code is.


texts:
I am having a bit of trouble finding the code in Magento which relates to sending the new order email to the admin emails specified in the Configuration > Sales menu in the back-end.

Where is this coding please?

I would like to put in an if statement saying

if the order has items with attribute => value
       then send to 1st email address;
 else
       send to 2nd email address`

What file should i be looking for to override and place this code into?

Thanks


texts: Mobile browser is unable to load the XML data of Magento site

texts:
I am new to magento. My question here is that I am unable to load the XML data in mobile browser but with the same link i am able to display the xml data in Desktop browser . Data is coming out of Magento's REST and SOAP api service

These are the two api access, being tried

http://new.sporteemail.com/api/rest/products and

http://new.sporteemail.com/api/v2_soap/?wsdl

Resulting in redirect to http://new.sporteemail.com/mobiledirectoryhere/* only on mobile browser user agents.

and both these links are related product retrieving from the magento site with respect to REST and SOAP service of magento.

Is there a need to change my .htaccess file or Apache2 configuration

Here is the .htaccess file

redirect for mobile user agents

RewriteCond %{REQUEST_URI} !^/mobiledirectoryhere/.*$
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
RewriteRule ^(.*)$ /mobiledirectoryhere/ [L,R=302]

Please help.


texts: Magento 2: Getting error inside tracking shipment popup

texts:
I am getting error "Shipment with id "" does not exist." inside tracking shipment popup in case of Magento shipping career.
I am attaching the image file for better understanding:

Please help me out to resolve this issue. Any help will be appreciated.


texts: Magento: How to prevent magento subdomain to show in google search index

texts:
I have moved my Magento files from sub-domain "/magento" to root folder successfully, and I created and generated the google sitemap from admin catalog > google sitemap, and I added "Disallow: /magento/" to robots.txt file, but I still see "www.mydomain.com/magento/" shows when I do seach in google by writing "site:www.mydomain.com"

I tried also to remove robots.txt from root and I went to System > Configuration > General > Design, and at Default Robots I choose "INDEX, FOLLOW"

Still I see "www.mydomain.com/magento/" appear in google search

I hope someone can guide me with a solution it would be appreciated.


texts: magento 2 checkout showing shipping method two times how to remove it

texts:
Magento 2 showing shipping methods twice on checkout page its showing the same duplicate, how to remove 1 from it.
thanks


texts: Magento2 - Invalid Date on tierprice deletion

texts:
I come up with an issue on deleting a tier price row shows invalid date.
I have added two date fields in the tier price from_date and to_date.
On first loading of edit page ,everything displays in the correct value of dates.
On adding new rows and updating the same works fine.
But on deletion of a row...changes the date values with wrong data and in some it shows invalid date and shows errors while saving....This issue I am facing in Magento 2.2.8 version.
A similar question while searching for solution was noted.
Adding the same here for reference Date issue on dynamic generated fields magento2


texts: Custom order status between Processing and complete in Magento2

texts:
I have create custom order status by following below link.

https://docs.magento.com/m2/ee/user_guide/sales/order-status-custom.html

I created custom status called "Sent to Printing".

I need this to apply in between processing and complete. How this can be done?

As per the link i created the status and assigned it to "Processing" state. Is it correct?


texts: Configurable options disappearing from front end after stock status re-index

texts:
I have a custom import routine that creates configurable products and assigns children to them. These appear on the front end without issue until I manually run the stock status re-index.

I've done a snapshot from before and after the re-index and there is one table changing which is cataloginventory_stock_status where the stock_status column is changed from 1 (when it does appear) to 0 (now not appearing) for my configurable parent.

Can anyone explain this behaviour or know how to fix it?

Just to clarify, re-syncing my product which calls the following code:

$stockStatus = Mage::getModel('cataloginventory/stock_status');
$stockStatus->assignProduct($product);
$stockStatus->saveProductStatus($product->getId(), 1);

makes the options appear again until the next status re-index.


texts: Customer Shipment Confirmation email not being sent

texts:
Having a problem with Magento 1.7.  Order confirmation emails are being sent, and customers receive them.  Shipment confirmation emails are being sent to the bcc: address, but customers do not receive them.

I've tried changing the BCC settings to both BCC and Separate Email and the result is the same for both.

There is noting relevant in system.log or exception.log.  Does anyone have any suggestions?  I don't even know where to look at this point, I'm completely baffled as to how the order conf emails are going out but the ship conf aren't.

The only difference I'm aware of is that the shipment is being fulfilled by a third party, and the shipment records are being created via the Magento API.


texts: Find out Magento version having only database dump

texts: My problem is to find out the exact version of Magento (should be one of CE) having only a database dump and no filesystem. So the method with the backend / Mage.php is not an option.


texts: lest fpc ERR (3): Notice: Undefined offset: 1

texts:
We have 1 GB of data with the same error

2014-09-10T11:59:30+00:00 ERR (3): Notice: Undefined offset: 1 in /home/user/domains/myshop.com/public_html/.modman/Lesti_Fpc/app/code/community/Lesti/Fpc/Helper/Data.php on line 155  @ $regex = $pair[1];

What could this be? Help appreciated!

(on magento 1.8.1)

public function canCacheRequest()
{
    $request = Mage::app()->getRequest();
    $missParams = $this->_getMissUriParams();
    if ($request->getMethod() != 'GET') {
        return false;
    }
    foreach ($missParams as $missParam) {
        $pair = array_map('trim', explode('=', $missParam));
        $key = $pair[0];
        $regex = $pair[1]; // <==== LINE 155
        $param = $request->getParam($key);
        if ($param && preg_match($regex, $param)) {
            return false;
        }
    }
    return true;
}


texts: Error in Uploading Image using REST API in Magento 2

texts:
I am getting below error while hit REST API from postman:

  "message": "The product can't be saved.",

I have used below details for API:

  URL: magento.localhost/rest/V1/products/p1/media

  HEADERS :

  Content-Type:application/json

  Authorization:Bearer 1si2ch4k8to78ytx14is8gcgfs4p3glk

  BODY

{
   "entry":{
      "id":153,
      "media_type":"image",
      "label":"test",
      "position":0,
      "disabled":true,
      "types":[
         "image"
      ],
      "file":"test.png",
      "content":{
         "base64_encoded_data":"base64_encoded_data",
         "type":"image/png",
         "name":"new image"
      }
   }
}

Can anyone please help me in this? I tried lot of thing but nothing is working.


texts: Magento 2 - how override some files of module-catalog-search in custom theme

texts:
I would override this files in my custom theme (app/design/frontend/parent/MyCustomTheme/..)
vendor/magento/module-catalog-search/Model/Adapter/Mysql/Dynamic/DataProvider.php

vendor/magento/module-catalog-search/Model/Adapter/Mysql/Aggregation/DataProvider/SelectBuilderForAttribute.php

vendor/magento/module-catalog-search/Model/Adapter/Mysql/Aggregation/DataProvider/QueryBuilder.php

vendor/magento/module-catalog-search/Model/Adapter/Mysql/Filter/Preprocessor.php

How can i do?
Thanks


texts:
I have added size chart tabs in magento 1.9.1 using the code below to call a CMS block into the product detail, but would like to hide the tab, if there is no data.

I am stuck and can't seem to find a method to hide the tab, if the attribute is empty.

I'm not to good with conditionals, I've tried (!empty) but maybe I'm trying the wrong place.

Any assistance is greatly appreciated.

Here's the code I am using:

catalog.xml

<block type="catalog/product_view_attributes" name="product.sizes" as="sizes" template="catalog/product/view/sizes.phtml">
    <action method="addToParentGroup"><group>detailed_info</group></action>
    <action method="setTitle" translate="value"><value>Size Guide</value></action>
</block>

And here's the size.phtml

    <?php
$_product = $this->getProduct();
$attribute = $_product->getResource()->getAttribute('sizes_table');
if ( is_object($attribute) ) {
  $identifier = $_product->getData("sizes_table");
}
?>

<?php if ($_sizeBlock = Mage::app()->getLayout()->createBlock('cms/block')->setBlockId($identifier)): ?>
    <div class="std">
        <?php echo $_sizeBlock->toHtml() ?>
    </div>
<?php endif; ?>


texts:
I want to load all the css files separately only for IE 9 is there a way to tell Magento to do that?
is there a call I can write in the head file to call all the needed css files?
to clarify I want to put in a call like that that gets the css unmerged

<!--[if lt IE 10]>
<?php echo $this->getCssJsHtml() ?>


texts: UI Components - pass ids selection to listing selection

texts:
How do i pass a selection of ids to an insert-listing component to preselect certain rows.

I have a dynamic rows component with entries related to the current product I'm editing. When click on a button to add more entries to the dynamic-rows component a modal open with an insert-listing component.

But the items from the dynamic-rows component are not selected in that listing.

How can I accomplish this?


texts: Skip Billing and Shipping info in onepage checkout

texts:
I have one requirement to skip Billing information and Shipping information step from one page checkout. is this possible?

I have already skip shipping address but can i do order without both information?

Please provide me any help full link or solution if you have.


texts: Javascript error productSidebar.js Magento 2.3.3

texts:
i'm using Magento 2.3.3, and in my catalog's console i found this error

in pub/static/ there's no a folder named "version.." but if you skip that folder you can find directly "frontend/AtelierVM/.../productSideBar.js". I'm in developer mode, so i tried to change it to product mode but nothing changed.
how can i fix it or how can i remove it?


texts: Buy X Have Y automatically added for free

texts:
The responses I read looked like they were a few years old...so maybe Magento has this now.

I want to have customers Buy boots get a free hat.

Is this possible?


texts:
I have used this PayPal/Payment Fee extension to add a charge for a payment method.

The problem is that tax (21%) is not calculated for Payment Charge. The plugin does not support it. Could you give me some hints how could I extend the plugin so that the tax is calculated for the payment charge and included in the Tax row (can be seen in the image).

EDIT: I believe, this is the class where I need to modify the collect method:

class FlyWebdesign_PaypalFee_Model_Sales_Quote_Address_Total_Paymentcharge extends Mage_Sales_Model_Quote_Address_Total_Abstract
{
    public function __construct()
    {
        $this->setCode('payment_charge');
    }

    public function collect(Mage_Sales_Model_Quote_Address $address)
    {
        $address->setPaymentCharge(0);
        $address->setBasePaymentCharge(0);

        $items = $address->getAllItems();
        if (!count($items)) {
            return $this;
        }

        $paymentMethod = $address->getQuote()->getPayment()->getMethod();
        if ($paymentMethod) {
            $amount = Mage::helper('paymentcharge')->getPaymentCharge($paymentMethod, $address->getQuote());
            $address->setPaymentCharge($amount);
            $address->setBasePaymentCharge($amount);
        }

        $address->setGrandTotal($address->getGrandTotal() + $address->getPaymentCharge());
        $address->setBaseGrandTotal($address->getBaseGrandTotal() + $address->getBasePaymentCharge());
        return $this;
    }

    public function fetch(Mage_Sales_Model_Quote_Address $address)
    {
        $amount = $address->getPaymentCharge();
        if (($amount!=0)) {
            $address->addTotal(array(
                'code' => $this->getCode(),
                'title' => Mage::helper('sales')->__('Payment Charge'),
                'full_info' => array(),
                'value' => $amount
            ));
        }
        return $this;
    }
}

Probably also these classes needs to be customized:

FlyWebdesign_PaypalFee_Model_Sales_Order_Creditmemo_Total_Paymentcharge
FlyWebdesign_PaypalFee_Model_Sales_Order_Invoice_Total_Paymentcharge


texts: Magento2: Custom ExtensionAttributes for Customer_Address not saved into database

texts:
I am stuck. I hope someone had already solved my problem. The magento docu does not help me any further.

I added some new ExtensionAttributes for Customer_Address entity. These fields are correctly displaying in checkout.
For the customer address edit view I have overwritten the template of the customer_address_edit block.

In both cases the Post data is not saved into the database. No errors given, not system.log neither exception.log or any exception.

In Magento\Customer\Controller\AddressMagento\Customer\Controller\Address\FormPost seem to be some operations that will merge data columns of the customer_address_entity with extensions_attributes or custom_attributes.
Some debugging shows me, that my extensions_attributes are recognized here.

But somehow the data get lost on its way to the database.
To sum up my little module: I did mostly the same things as Bartlomiejsz in the of 27.Feb comment on this post: https://github.com/magento/magento2/issues/6575


texts: Integrate JQuery Isotope in Product Listing

texts:
How can I integrate jQuery isotope in my product listing page ?

When user sorts by Position / Name / Price, instead of reloading the page, I need to sort the products just like its happening in isotope jquery

Pls Guide.

Thanks !!!


texts:
I have a Magento 404 question:

This generic product url looks like this
http://www.domain.com/some-magento-product.html

But from a security standpoint.  how would a request to something like this be treated:

GET /bulkhead-abs-thread-x-thread-1-45713f6ff2041d3fdfae927b82488db8.html+Result:+%E8%F1%EF%EE%EB%FC%E7%F3%E5%EC+SOCKS+192.168.0.90:10045;+%E8%F1%EF%EE%EB%FC%E7%EE%E2%E0%ED+%ED%E8%EA%ED%E5%E9%EC+%22aidajy1%22;+

Now, I know on the apache level that a 404 appears to be generated and the client is served your generic ‘not found’ page.

But, would/could Magento itself act on that request in addition to the 404 that’s seen at the client end?


texts: i want to set discount of product price according to product quantity buy

texts:
When Client Select 10 Quantity price is $25
after client change it 20 Quantity price is $40
so on for 30 Quantity price is $50.

I Want to set discounted price base on quantity purchase, from admin same configuration as tier price logic


texts:
I am trying to set up a discount for my store as follows:

First item: No discount

Second item: 20% Off for the whole cart

Third item: 50% Off for the whole cart

May I know how to set this up?

Thank you very much.


texts: Magento 1.9 API v2 Payment Additional Information

texts:
I'm trying to extend the API response of Magento SalesOrderInfo - more specifically, I'm trying to get back the paymnent additional_information

In my module, in etc/wsdl.xml I added

        <complexType name="salesOrderPaymentEntity">
            <all>
                <element name="last_trans_id" type="xsd:string" minOccurs="0" />
            </all>
        </complexType>

And it works like a charm, it returns the value of last_trans_id from the sales_flat_order_payment table.

I'm now trying to get the paymnent additional_information so I added <element name="additional_information" type="xsd:string" minOccurs="0" /> and my code now looks like this

        <complexType name="salesOrderPaymentEntity">
            <all>
                <element name="last_trans_id" type="xsd:string" minOccurs="0" />
                <element name="additional_information" type="xsd:string" minOccurs="0" />
            </all>
        </complexType>

but the additional_information is not returning anything because it's an array (when I logged it, it returns Array)

I hate asking such a basic question but I've spent hours looking for how to get an array, I looked at how Magento returns the product_options that's also an array but they also declare it as a string.

How can I get the additional_information of payment in my API?


texts: Magento 1.8.1.0 WYSIWYG editor: have not Browses File and Upload Files button

texts:
When i insert an image to CMS Block Static, i can not upload new file. The Browses File and Upload Files button does not appear.
Can everyone help me?

Thanks.


texts: Product Update with Url_Key & Store_Id Attribute Already Exists error in csv import with magento EE

texts: When i am update product description in my magento enterprise edition, i get the url_key & store_id already exists error in csv import.


texts: Magento 1.9 get watermark images instead of media images

texts:
Heloo,

I need to get all images from magento 1.9 with watermark:

if($show_image != "off"){
    $url_to_image = Mage::app()->getStore($storeId)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product';
    $prod_images = array();
    $prod_images[] = $product->getImage();
    if($has_prod_caracts == false){
        $prod_caracts = enumerateCustomAttributesForProduct($product);
        $has_prod_caracts = false;
    }
    $media_gallery = unserialize($prod_caracts["media_gallery"]);
    $images = $media_gallery['images'];
    foreach($images as $image){
        if($image['file']!=$prod_images[0] && $image['disabled']==0 && $image['disabled_default']==0){
            $prod_images[]=$image['file'];
        }
        if(count($prod_images)>0){
            $prod_image = $url_to_image.implode("||".$url_to_image,$prod_images);
        }
    }
}

the only problem is that this code is for non watremark  images

how do i get only the watermark path.


texts: Magento 2 new fieldset/field in cart price rule show unwanted Currently Active Tab

texts:
This is in my custom module xml sales_rule_form.xml:

<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <fieldset name="test_fieldset" sortOrder="10">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="label" xsi:type="string" translate="true">Test Fieldset</item>
                <item name="collapsible" xsi:type="boolean">true</item>
                <item name="sortOrder" xsi:type="number">100</item>
                <item name="opened" xsi:type="boolean">false</item>
            </item>
        </argument>
        <field name="test_field">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="label" xsi:type="string" translate="true">Test Field</item>
                    <item name="visible" xsi:type="boolean">true</item>
                    <item name="dataType" xsi:type="string">text</item>
                    <item name="formElement" xsi:type="string">input</item>
                    <item name="sortOrder" xsi:type="number">30</item>
                </item>
            </argument>
        </field>
    </fieldset>
</form>

AND the it display in the backend like this:

See highlighted blue text 'Currently Active'  tracking this down it's coming from Native Magento xml at:

../vendor/magento/module-sales-rule/view/adminhtml/ui_component/sales_rule_form.xml

and the xml is:

<fieldset name="general">
        <settings>
            <additionalClasses>
                <class name="fieldset-schedule">true</class>
            </additionalClasses>
            <label translate="true">Currently Active</label>
        </settings>
    </fieldset>

How, What ? anyone experience this?


texts: Magento 2 Tooltip not working in phtml file

texts:
<?php $_content = 'escapeUrl($block->getViewFileUrl('Magento_Checkout::cvv.png')) . '\" alt=\"' . $block->escapeQuote(__('Card Verification Number Visual Reference')) . '\" title=\"' . $block->escapeQuote(__('Card Verification Number Visual Reference')) . '\" />'; ?>

                <a href="#" class="action cvv" title="<?php echo $block->escapeQuote(__('What is this?')) ?>" data-mage-init='{"tooltip": {"content": "<?php echo $_content ?>"}}'><?php echo $block->escapeHtml(__('What is this?')) ?>

This is returning the wrong URL structure before Magento_Checkout. I'm not sure how to change that.

i.e. Returns: /frontend/_view/Magento_Checkout

Should Return: /frontend/Vendor_Name/Theme_Name/Magento_Checkout


texts: Add to cart Ajax response 302 in magento 2?

texts:
I am facing some problem regarding product add to cart. Whenever i am trying to add any configurable of simple product to my cart. It is not getting added to cart. Also When i checked in console, I saw an ajax problem in that. Ajax giving 302 error. When I am adding any product to cart.

Please anyone help me to resolve it.


texts: How to show different stocks from different sources and to buy from different sources.?

texts: I need to show the stock details like below UI and also to checkout from selected source. I got this stock details from database but I couldn't find correct way to display them.


texts: Where to Paste the Google Adsense Code in Magento?

texts:
I just got my code and need to paste the code into the HTML of the website Right after the  tag.

I couldn't figure out it. Can you please explain to me where to paste it in Magento? I am pretty new to Magento; therefore, I need a detailed direction step by step. Thanks a lot.


texts: Strange occasional freezing with magento 1.9.4 after update

texts:
We updated our magento 1.9.3 to 1.9.4 (via connect manager) and also updated our PHP to PHP7.0 Everything seems to work fine and our site is much faster.

But now we have strange problem. Sometimes our site freezes totally, for example when going to checkout, and nothing helps but closing browser and emptying browser cache. Same time it works fine when you open our site at another browser. Fortunately this is not happening so much in the front end but more in the admin when we place to order and all the time when we use our POS system. (that is X-pos, nowadays called http://www.connectpos.com/). I think POS extension is not the reason for problem since same happends without using POS. But with X-pos we can make 1 or 2 orders and then it freezes. And if we try to reload page or go to admin browser cannot get any bite from the site - not traffict at all.

Any ideas what could be wrong? Could this be something to do with sessions? Maybe there happends some error and magento locks session for some reason?

We tried many things but nothing helps. We have updated extensions, but no help at all. We have asked help from some extension developers and they just goes to our site and says: hey, everything seems to work fine. ANd it does, until... it freezes again.


texts: SQLSTATE[HY000] [2002] No such file or directory in magento 1.9

texts:
for no reason in getting this error on

There has been an error processing your request
SQLSTATE[HY000] [2002] No such file or directory


texts: Magento2: How can enable all input type of product attribute after attribute save?

texts:
I want to update product attribute input type from dropdown to multiselect but only there are three option available (dropdown, text swatch and visual swatch).

I have searched for that and found only custom script for specific attribute input type's update. Anyone have an idea for that if we can do by magento files for enabling all options always.


texts:
The problem only occurs on frontend, and it does not occur in admin panel. I am running magento 2.0.4 over Ubuntu with Nginx and php5.6. Any bit runs over https including un-secure based urls.

I already did all of the following:

Run deploy:mode:set production
Delete all var/*
Deleted pub/static
Opened up app/etc/di.xml and find the virtualType name="developerMaterialization" section. In that section you'll find an item name="view_preprocessed" that needs to be modified or deleted. You can modify it by changing the contents from Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink to Magento\Framework\App\View\Asset\MaterializationStrategy\Copy
Run cache:flush and dumped all cache on admin panel
Run setup:di:compile-multi-tenant
Run setup:static-content:deploy
Run indexer:reindex
Run sudo chown -R www-data:www-data  .
Run sudo find . -type d -exec chmod 775 {} \; && sudo  find . -type f -exec chmod 664 {} \; && sudo chmod u+x bin/magento

My nginx config file looks like this:

upstream fastcgi_backend {
        # use tcp connection
        # server  127.0.0.1:9000;
        # or socket
        server   unix:/var/run/php5-fpm.sock;
}

server {
       listen         80;
       server_name    my.site.com;
       return         301 https://my.site.com$request_uri;
}

server {
        listen 443;
        listen [::]:443;
        index index.html index.htm;

        ssl on;
        ssl_certificate /etc/nginx/ssl/my_site_com/ssl-bundle.crt;
        ssl_certificate_key /etc/nginx/ssl/private/my.site.com.pem;
        ssl_prefer_server_ciphers on;

        server_name my.site.com;

        set $MAGE_ROOT /home/ubuntu/www/my.site.com;
        set $MAGE_MODE production;

        include /home/ubuntu/www/my.site.com/nginx.conf.sample;
}

Any other suggestion why I keep getting 404 errors on css?


texts: Magento Community - Coupon Code Functionality

texts:
Trying to create a coupon - $10 off min $150 excluding products from categories A, B, and C. But somehow can't get it to work. Have an instance whereby products from other categories (not A/B/C) amounted to $120, and a product from category A brought the total to above $150, and the coupon code still worked, when it is not supposed to work.

Input these in conditions:

If ALL  of these conditions are TRUE :
If total amount  equals or greater than  150  for a subselection of items in cart matching ANY  of these conditions:
Category  is not  244
Category  is not  535
Category  is not  576

Input this in actions:

Fixed amount discount for whole cart
Discount amount 10

Apply the rule only to cart items matching the following conditions (leave blank for all items):
Nothing inputted.

Even tried but to no avail
If ALL  of these conditions are TRUE :
If total amount  equals or greater than  150  for a subselection of items in cart matching ALL  of these conditions:
Category  is not one of 244,535,576

But somehow this is not working. Could anyone please advise?


texts: Getting error while refreshing page in magento 2.3

texts:
When I have installed Magento 2.3 it's working fine. I have added categories, subcategories, products successfully. But Accidentally its showing error as below :

  Fatal error: Uncaught Error: Cannot access property ReflectionParameter::$name in F:\xampp\htdocs\magento\vendor\magento\framework\Code\Reader\ClassReader.php:25 Stack trace: #0 F:\xampp\htdocs\magento\vendor\magento\framework\Code\Reader\ClassReader.php(25): ReflectionFunctionAbstract->getParameters() #1 F:\xampp\htdocs\magento\vendor\magento\framework\ObjectManager\Definition\Runtime.php(49): Magento\Framework\Code\Reader\ClassReader->getConstructor('Magento\Framewo...') #2 F:\xampp\htdocs\magento\vendor\magento\framework\ObjectManager\Factory\Dynamic\Developer.php(48): Magento\Framework\ObjectManager\Definition\Runtime->getParameters('Magento\Framewo...') #3 F:\xampp\htdocs\magento\vendor\magento\framework\ObjectManager\ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\Framewo...') #4 F:\xampp\htdocs\magento\vendor\magento\framework\App\ObjectManager\Environment\Developer.php(70): Magento\Framework\ObjectManager\ObjectManager->get('Magento\Framewo...') #5 F:\xampp\ht in F:\xampp\htdocs\magento\vendor\magento\framework\Code\Reader\ClassReader.php on line 25

Please help me what can I do to solve it?
PHP version : 7.1.28

Note: I'm new to Magento. Today I have started to learn it.


texts: How to implement twitter bootstrap in magento theme step by step?

texts: I'm creating a new theme for magento with twitter bootstrap.Can some one help me to do this with bacis step by step procedure.


texts:
I’m currently using this theme (http://demo.pagayo.com/pagayotheme001/) on my website. Although this theme is great and better, comes for free I still have the complaint for with its Horizontal size. It’s too large to fit in screen. I don’t think that Customers actually like scrolling the page searching for things they want. I want the website to fit in the page. Being an amateur in PHP, I really don’t have any idea how can do it. I know if the length is changed then I’ll have to change the size of images too, but isn’t this possible that the images get resized automatically? Anyways, if that’s too hard to incorporate then anyone can please help me in at least making my website page fit in the screen horizontally? I’m good with vertical size, that is scrollable and the customers wouldn’t mind in scrolling through width. So, in short I want help in following:

1) Making the website fit in customer’s screen as per their browsers setting & resolution, automatically.
IF automatic accommodation of page is not possible, then

2) Help with the code to at least make the website fit in full, horizontally so that customers do not have to scroll for horizontal view. If you’re gonna suggest me a code change then it’s my folded hand request to please provide the code as well and the directory path where I should make the change. I’m a child in the world of coding and Magento so I don’t know anything. All I know is, I have to complete my website anyhow!
Please help me out and I’ll buy you a beer :)

Well I read somewhere that I need to make amendments in styles.css file. I opened it and seconds after I lying on the floor knocking my head. There's hell lot of codes which is almost an alien language for an amateur like me. Here is the Styles.css file of my homepage. Can anyone please tell what exactly should I modify? http://www.dirtrades.com/styles.zip


texts: Magento 2 how to create custom tabs in custom module

texts:
We want to remove default product tab and want to use custom

Query tabbing like this


texts: How to upload image by REST api (without base64) magento 1.9

texts:
I try to upload an image by rest API in Magento 1.9 version but getting "invalid content-type' error.

Can any one help me for the same?


texts: Move newsletter block before footer start, Luma, magento 2

texts:
Trying to move newsletter from footer outside of it(Footer) in Luma theme, magento 2.

curent structure

<footer>
    // HERE I WANT TO HAVE THE NEWSLETTER
    <div class="footer content">
        // blocks, newsleter, etc..
    </div>
</footer>

tried with

<move element="form.subscribe" destination="footer" before="-" />

but this is placing the newsletter as first block inside

footer.content

Or another way can be to place newsletter outside of the end of page content.
Tried too, is setting 1st block in content but not outside.

Any help please?


texts: How to add custom data to persistent shopping cart?

texts:
I want to add some custom data to persistent shopping cart like below:

Assume:

Persistent shopping cart enabled
Session timeout set to idealy amount of time (eg: 1 week, 1 month)

Scenario (desired):

Visitor visits website (not logged, doesn't add anything to cart)
Prompt visitor to input some custom data (eg: body height, body weight, ...)
Visitor inputs data then click Save
Website saves this data to persistent shopping cart
Several days later, visitor visits website again and this data remains on website, no need to re-input anymore.

How can I do that? When visitor hasn't added anything to shopping cart, is it possible to add custom data to cart? Where to add? Quote or something else?

P/s: I want to add custom data to persisten shopping cart because it seems like the most reliable solution I've known.


texts: 400 Bad Request when checkout with Amazon 3.0.10 in Magento 2

texts:
i updated Amazon extention 3.0.10, when click checkout, this show error

400 Bad Request
The domain on which you are using the JavaScript SDK has not been
whitelisted for your application. Please add your website domain
in the 'Allowed JavaScript Origins' section under 'Web Settings'
on the Amazon Seller Central App Console for Login with Amazon.

I have account amazon, how to add my website domain in Allowed Javascript Origins ? I can not find it.

Please help me.


texts: Store level User Permission In Magento Backend

texts:
I need to give saperate login for each store in magento 2,
I have two magento stores under one website,
how can I give separate login for each store for admin users ?
It may be basic thing, but I new to magento, can't find out how to do this.
it will be great if anyone can help.
thanks


texts:
How do i completely remove/disable top-links-container from the header? Hope someone can help me, i've tried a few things without luck.

also this, but that makes it go away, but the layout of the whole website is not good anymore after that:

located app/design/fronend/YourPackage/YourTheme/layout/local.xml

<default>
  <reference name="header">
    <remove name="top.links">
  </reference>
</default>

Thanks in advance


texts: How to upgrade magento 2.3.1 CE to 2.3.3 CE?

texts: I have magento 2.3.1 CE. I want to upgrade 2.3.1 to 2.3.3 CE with commands only. Does anyone know how to upgrade it with commands ? Thanks in advance.


texts: How to get random number field for each invoice apart its invoice number?

texts:
What to do to get random number with each invoice apart from invoice number that can be viewed in Admin side Invoices table, customer account view order or invoice pdf?

Whenever any invoice is created, it will have one random number like "3456445354" or "4467575756". It is used to third party verification whether the order is legit or not.

Can anybody help to get this thing?


texts: how to get the function responsible for the rendered variable inside an html file

texts:
in my case I want to see from where the variable 'options' is rendered , because i want to change some functionality inside the defaut.html file , his path is  :

/vendor/magento/module-checkout/view/frontend/web/template/minicart/item/default.html

i want to change some functionality but I don't know from where the variable  'options' is called inside the 'default.html' file , is it the controller or block ?


texts: What preference to use for \Magento\Framework\DB\Adapter\AdapterInterface?

texts:
I'm trying to override a Collection constructor and getting

Fatal error: Uncaught Error: Cannot instantiate interface Magento\Framework\DB\Adapter\AdapterInterface in /var/www/magento/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 93

As well as

Error: Cannot instantiate interface Magento\Framework\DB\Adapter\AdapterInterface in /var/www/magento/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 93

I have tried:

Look in the core for any preference for Magento\Framework\DB\Adapter\AdapterInterface with no luck.
setup:di:compile with no luck.

The problem was also raised here:
How dependency injection works for Interfaces in constructors with no answer though.

Any help will much appreciated.

EDIT

So the problem was not overriding the Collection constructor.

class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
{

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,
    \Magento\Framework\DB\Adapter\AdapterInterface $connection = null,
    \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource = null,
     $someParam = null
)
{
    parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
    //$this->relationResourceModel = $resourceModel;
}

This will work.
The problem was that I was trying to inject a foreign resource model in the collection constructor

class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
{
    protected $relationResourceModel;

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,
    \Magento\Framework\DB\Adapter\AdapterInterface $connection = null,
    \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource = null,
    \Vendor\Module\Model\ResourceModel\ResourceModel $resourceModel
)
{
    parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
    $this->relationResourceModel = $resourceModel;
}

This will not work.
It would be nice to know the inner workings of this and why this does not work. But I chosen another approach.


texts:
I tried to get quote from success order observer like this:

  app/code/Vendor/Module/etc/frontend/events.xml

<event name="checkout_onepage_controller_success_action">
    <observer instance="Vendor\Salesman\Observer\Customer\OrderSuccess" name="lime_salesman_observer_onepage_success_action" />
    </event>

  app/code/Vendor/Module/Observer/Customer/OrderSuccess.php

public function execute(
        \Magento\Framework\Event\Observer $observer
    ) {
      $order = $observer->getEvent()->getOrder();
      $quote = $this->quoteFactory->create()->load($order->getQuoteId());
}

but i got an error like this:

  PHP Fatal error:  Uncaught Error: Call to a member function
  getQuoteId() on null


texts: Is it okay to delete all 'Capcha' Image files?

texts:
I don't use 'Capcha' feature

and found there are a LOT of capcha image file on ftp

Is there any problem to delete all Capcha image files? or is it okay?

Deleting those files effect any performance?

(Having a lot of useless files in ftp make slow the site little?)


texts: Use Flat Catalog Category in Catalog is disable or Hide, Why?


texts: Magento2: While installing theme static-content:deploy after deploy got blank screen

texts:
Using a paid theme for Magento 2.1.X, according to the theme user guide followed all the instructions to place the necessary files in Magento root, when I try to execute all the shell command that worked fine, after that store IP and admin link displaying a white screen, leave me clueless.

STORE IP:  http://52.187.32.74/testdata/

ADMIN IP:  http://52.187.32.74/testdata/admin_testdata/


texts: Update 1.9.1.0 to 1.9.1.1 Magento Mobile

texts:
I try to update our Magento store from 1.9.1.0 to 1.9.1.1.
Everything succeed except the Magento_Mobile package.

I get this error:

  CONNECT ERROR: Package community/Magento_Mobile failed: Package release 'Magento_Mobile' not found on server

Tried to set Mage_XMLConnect.xml to true, but that also does not work.

How can I fix this?


texts: Custom options will not up date basket with bundle product

texts:
I custom option in my bundle product with uses dynamic pricing.

The problem i have having is when i select the custom option it and then press add to cart (i am using one step checkout) the cart price will not add the cost of the custom option price.

I am using magento 1.9.3 and have seem some mention of Product_option needing to be added to catalog.xml but thing didn't seem to work for me.

I have search for a solution and just can see anything that solves this.

Thanks


texts: How to get image of configurable product?

texts:
How can I get image of configurable product.
I found this code but it returns null

$_swatchUrl = Mage::helper('configurableswatches/productimg');


texts:
Patch 8788 is available for <= 1.9.2.4.

I have 1.9.3.4.

How can I fix the issues addressed?


texts: Sort products by In stock in magento 2.4

texts:
Can we sort products In stock only.
see the below screenshot.


texts: I am using the RWD template. Trying to figure out how to change the color for the add to cart WHEN YOU CLICK ON IT. I was able to find the standard color as well as the hover color, however there seem to be a color when you click on it and I cannot find the CSS to change the color.


texts: Magento2.2.3 attribute options sort order

texts:
I am having an issue in our Magento 2.2.3 based website. I changed the order of the attribute options in the admin panel. Reindex, recompiled and still the options on front end are not matching the order I have in the admin panel.

For example I have an attribute named "color" with the below options that are in the below order in admin panel:
  yellow  |  orange  |  red  |  blue  | black

In the front end I see the order as
orange |  blue   |  yellow  | black  | red

i have read there was a known buy in magento 2.0, and 2.1 but nothing about if its still a bug or more importantly how to fix it in v2.2.3
suggestions?


texts:
Blank page instead of setup When install Magento2

Error : Here


texts: fedex integration for india not workin, "'The PurposeOfShipmentType is null, empty or invalid.',

texts:
I have used the production keys for fed-ex integration, for India.

and getting the below error in the debug.log, can anyone tell me what can be done?

'result' =>
  stdClass::__set_state(array(
     'HighestSeverity' => 'ERROR',
     'Notifications' =>
    stdClass::__set_state(array(
       'Severity' => 'ERROR',
       'Source' => 'crs',
       'Code' => '691',
       'Message' => 'The PurposeOfShipmentType is null, empty or invalid.',
       'LocalizedMessage' => 'The PurposeOfShipmentType is null, empty or invalid.',
    )),

i read earlier that the purposeofshipmenttype is not there in magento2.0 and we need to enable it, can anyone please tell me how to do that.


texts: How to show custom option title and value in Magento page?

texts:
I have created a custom invoice page in magento and want to show custom value and title below ordered product name. Please provide me code to get custom value and title of ordered product.

 <?php
            $items = $this->getorderitems();
            $total = 0;
            foreach ($items as $item) {
             $product = $this->loadproduct($item->getProductId());
             ?>
             <?php echo $item->getName(); ?>
                SKU : <?php echo $item->getSku(); ?>

                <?php echo round($item->getQtyOrdered()); ?>
                <?php
                echo Mage::helper('core')->currency($item->getBaseRowTotalInclTax(), true, false);
                $amount = $item->getBaseRowTotalInclTax();
                 $total = $total + $amount;
                  ?>


texts: Magento2 : Product count for a category in sub store showing wrong

texts:
I have a category named "More" and it has 400 products in main store view, but in one sub store no products assigned from this category. But when I'm trying to get product count on sub store frontend for this category, it is returing 400 but it should be 0.

My code is as below :

$_category = $this->_categoryFactory->create();
$_category->load($id);
echo $category->getProductCount();

I also tried ->setStore($this->_storeManager->getStore()) but doesn't work.

How can I get correct product count on sub store view?


texts: Configuration 'depends' with front and backend model

texts:
I'm having difficulties with the 'depends' functionality in the configuration.

Normally, adding <depends> to some configuration option, it's hidden unless the given option's value matches.

For example:

<option_one>
    Option 1
    ...
</option_one>
<option_two>
    Option 2
    ...
    <depends><option_one>1</option_one></depends>
</option_two

Obviously I'm missing some fields, but you get the point.
Option 2 only appears when Option 1 has the value '1'.

Now my problem is, when I try to apply this to an option with a backend and frontend model, this depending doesn't work:

<option_three>
    ...
    <frontend_model>module/adminhtml_form_field_test</frontend_model>
    <backend_model>adminhtml/system_config_backend_serialized_array</backend_model>
    ...
    <depends><option_one>1</option_one></depends>
</option_three>

This option won't take Option 1 in account, it's just always visible.

Am I doing something wrong, or is this a bug, or 'works as designed'?


texts:
For product import,
I used to create a CSV file from the text file (from customer) via programming. Then I place it in var/import folder
Now, For Magento 1.9
My code was :
$profile = Mage::getModel('dataflow/profile');
$profile->load(7);  (7 for products)
$profile->run();

My all product are imported successfully.
The same way Now I am trying for Magento 2.3
I have successfully created CSV file from the text file (from customer) via programming.
Also from Admin > System > Data transfer > Scheduled import/export > New Scheduled Import
I have created one "scheduled import" for product.
Now, Please help me, how can I run it via programming. like ($profile->run();)
Thanks in advance


texts: How to get all ID's from joined collection with having condition on joined tables in Magento 1.9?

texts:
I want to get all IDs from collection using Mage_Core_Model_Resource_Db_Collection_Abstract::getAllIds() method.

My collection is joined with orders table:

$collection
     ->getSelect()
     ->joinLeft(
         ['o' => $this->getTable('sales/order')], // Table and alias
         'main_table.order_id = o.increment_id', // Join condition
         [ // Select fields
             'store_id' => 'store_id',
             'order_created_at' => 'created_at'
         ]);

But when I want to get all ID's from that collection with a having condition:

$collection->getSelect()->having('order_created_at >= ?', '20-02-2016 0:00:00')
$ids = $collection->getAllIds();

It gives me an error: Unknown column 'order_created_at' in 'having clause', because getAllIds() method resets collections' select columns and there is no way to filter by joined columns:

public function getAllIds()
{
    $idsSelect = clone $this->getSelect();
    $idsSelect->reset(Zend_Db_Select::ORDER);
    $idsSelect->reset(Zend_Db_Select::LIMIT_COUNT);
    $idsSelect->reset(Zend_Db_Select::LIMIT_OFFSET);
    $idsSelect->reset(Zend_Db_Select::COLUMNS); // Reset columns here

    $idsSelect->columns($this->getResource()->getIdFieldName(), 'main_table');
    return $this->getConnection()->fetchCol($idsSelect);
}

So how to retreive joined collection ID's?


texts: Magento Integration with Constant Contact

texts:
when a new user signs up and subscribe newsletter then sends the email to their constant contact list. so how can I integrate ?
I googled and find This Link.

but extension show in configuration->system->advance tab,but not shows under the configuration->general tab.

Is there any other way to Sync. Magento and Constant contact.

Any kind of help will appreciated.


texts: Magento 2 Custom system config value not showing in custom email template

texts:
Able to get values of store phone number but not able to get custom config values(even it is working fine in root file when get custom config value)
How to get value for this  - {{config path="custom_finance/general/finance_text"}} ?
custom.html

{{template config_path="design/email/header_template"}}

{{trans "%customer_name," customer_name=$order_data.customer_name}}

Finance1

{{trans "Store Contact Number"}}

{{config path="general/store_information/phone"}}
 //it is working fine

{{trans "Store Fianance Number"}}

{{config path="custom_finance/general/finance_text"}}
 //not working

{{template config_path="design/email/footer_template"}}

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="Xyz" translate="label" sortOrder="10">
            XYZ
        </tab>

            <class>separator-top</class>
            Finance
            <tab>Xyz</tab>
            <resource>Xyz_Custom::xyz_config</resource>
            <group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                General Configuration
                <field id="finance_text" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                    Display Text
                    <comment>This text will show on email finance</comment>
                </field>
            </group>

    </system>
</config>


texts: Magento discount for various shopping cart price rules

texts:
I am working on magento 1.9. I need a way to apply discount for a particular category say 'CAT A'.

Buy 1 Product from CAT A at 30% discount
Buy 2 Products from CAT A at 40% discount
Buy 3 or more Products from CAT A at 50% discount

Other category products can be accompanied but the discount should be applied only to CAT A.


texts: Frontend Checkout: Billing Address Form Fields Do Not Appear

texts: When I check out on the front end and untick the "Billing and shipping address is the same" box, no new fields pop up to insert a billing address. This problem persists on all themes including Magento Luma/Default theme. I am unsure how to begin troubleshooting this to determine the cause, I hope so