texts: Magento 2 Multiple Store View Pricing error

texts:
i tried to install Multiple Store View Pricing modules and add the files in this path /var/www/html/app/code/MultiStoreViewPricing but get the below error after run command php bin/magento setup:upgrade

Updating modules:
Plugin class Bss\MultiStoreViewPricingTierPrice\Plugin\Product\Collection doesn't exist
In PluginList.php line 182:

enter link description here

can anyone help me


texts:
Finally I found out the magento 2 api endpoint for all products as below

rest/V1/products?searchCriteria[pageSize]=20

but I need more detailed docs about api endpoints which I coudn't find out yet. Is there magento have detailed docs about REST API ?


texts: Magento2: Configurable product showing out of stock child products

texts:
I'm facing issue that configurable products showing out of stock associated products even if the backend setting "Display Out of Stock Products" at Configuration->Catalog->Inventory->Stock Options is set to "No".

Does anyone knows the fix for this?


texts:
How to remove the Links at the top header ie. sign in, create account and currency change and want to place it custom page(only currency selector).

Please someone tell me how to do that.


texts:
is there a basic functionality to disable a customer?
Or do I need to implement by myself?


texts: Change every bundle item price on addtocart

texts:
I want to change each and every selected bundle items price on addtocart

How can I do this.

At present I am doing like below :

$item = $observer->getQuoteItem();
if ($item->getParentItem()) {$item = $item->getParentItem();}
$item->setCustomPrice(10);
$item->setOriginalCustomPrice(10);
$item->getProduct()->setIsSuperMode(true);

By doing above, it only change Parent Bundle product Price.

Please check screenshot :

So is there any posibility to change price of bundle items with custom price which will display properly even after order place in order view page.
I have go through the code and find that "Bundle Items's" price are saved in infobuyrequest.

$sel_bundle_options = $item->getProduct()->getTypeInstance(true)->getOrderOptions($item->getProduct());
$sel_bundle_options['bundle_options'];

So is it possible to change price directly into that ?
But after placing an order if we check on order view pages,it will display.


texts: Make changes to order overview in Magento backend

texts:
I'm using Magento 1.7 and I'm wondering how I could make changes to the order overview in the backend. It's a fairly simple adjustment where I'd like to put the company name above the client name instead of the other way around, as it is right now.

Thanks in advance!


texts:
I know how to use a resource, but I'm not sure what it is. All I understand is that I put in in my XML file and it makes my application work. Can someone explain in simple terms what it is I'm doing when I put it in my XML file?

    <resources>
        <complexworld_setup>
            <setup>
                <module>Magentotutorial_Complexworld</module>
                <class>Magentotutorial_Complexworld_Model_Resource_Setup</class>
            </setup>
        </complexworld_setup>
    </resources>

and

    <complexworld_resource>
        <class>Magentotutorial_Complexworld_Model_Resource</class>
        <entities>
            <eavblogpost>

eavblog_posts

            </eavblogpost>
        </entities>
    </complexworld_resource>


texts: The signature is invalid - Magento 2 Oauth 1 Rest API Authentication

texts:
I need to generate access token for third party extension in Magento.
I create integration, now I should sent request to /oauth/token/request in order to get a request token, but I get following error:

oauth_problem=The+signatire+is+invalid.+Verify+and+try+again.

My signature function is as follow

function sign($method, $url, $data, $consumerSecret, $tokenSecret)
{

    $array=[

        $method,
        $url,
        $data['oauth_nonce'],
        $data['oauth_signature_method'],
        $data['oauth_timestamp'],
        $data['oauth_version'],
        $data['oauth_consumer_key'],
        $tokenSecret,

    ];

    $url = urlEncodeAsZend($url);
    $data = urlEncodeAsZend(http_build_query($array, '', '&'));
    $data = implode('&', $array);
    $secret = implode('&', [$consumerSecret, $tokenSecret]);

    return base64_encode(hash_hmac('sha1', $data, $secret, true));
}

function urlEncodeAsZend($value)
{
    $encoded = rawurlencode($value);
    $encoded = str_replace('%7E', '~', $encoded);
    return $encoded;
}

PS: my oauth_token is empty because in this step no token is created in Integrations.Doc says :

To generate the signature, you must use the HMAC-SHA1 signature method. The signing key is the concatenated values of the consumer secret and token secret separated by the ampersand (&) character (ASCII code 38), even if empty.

https://devdocs.magento.com/guides/v2.2/get-started/authentication/gs-authentication-oauth.html

I am using Magento 2.3


texts: Magento 2.2.2 SSH Reindex locked processes help

texts:
Recently I've been running the SSH command line php bin/magento indexer:reindex

But twice in 3 days it starts to hang after Catalog Product Rule index has been successfully rebuilt..

My server ticket support told me "There are a few reindex processes locked by another reindex process"

What does that mean and why does it happen?

The ones I can see were locked on SSH were:
1. Customer Grid Index
2. Design config grid index

Thanks,


texts: Magento 2 + Custom column added sku on grid not showing data in export file

texts:
I have added sku column on sales order grid using following steps,

  Package\Company\view\adminhtml\ui_component\sales_order_grid.xml

<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <columns name="sales_order_columns">
        <column name="sku" class="Krish\Customerabandoned\Ui\Component\Listing\Column\Sku">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="visible" xsi:type="boolean">true</item>
                    <item name="label" xsi:type="string" translate="true">Sku</item>

                </item>
            </argument>
        </column>
    </columns>
</listing>

  Package\Company\Ui\Component\Listing\Column\Sku.php

public function prepareDataSource(array $dataSource)
{
if (isset($dataSource['data']['items'])) {
foreach ($dataSource['data']['items'] as & $item) {

    $order1  = $this->_orderRepository->get($item["entity_id"]);
    $items123 = $order1->getAllItems();
    $skuArray = [];

    foreach ($items123 as $key => $item1) {
        $skuArray[] = $item1->getSku();}
    $export_status = implode (", ", $skuArray);
$item[$this->getData('name')] = $export_status;
}
}

return $dataSource;
}
}

The sku field displaying in order grid but not showing when I export file to csv.

ScreenShot:


texts: sales_order_save_after event not fired when creating an invoice

texts:
I like the event to be fired when we create an invoice for an order, to get order status complete

etc/adminhtml/events.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">

<!-- new code Tarek -->
<event name="sales_order_save_after">
    <observer  name="qbonline_syncOrder_completed" instance="Vendor\Module\Observer\Order\Create"/>
</event>
</config>

Vendor/Module/Observer/Order/Create.php

namespace Vendor\Module\Observer\Order;

use Magenest\QuickBooksOnline\Observer\AbstractObserver;
use Magento\Framework\App\ObjectManager;
use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface as ObserverInterface;
use Vendor\Module\Model\Synchronization\Order;
use Magento\Framework\Message\ManagerInterface;
use Vendor\Module\Model\Config;
use Vendor\Module\Model\QueueFactory;
use Magento\Sales\Model\OrderFactory;

/**
  * Class Create
  * @package Magenest\QuickBooksOnline\Observer\Order
*/
class Create extends AbstractObserver implements ObserverInterface
{
/**
 * @var Order
 */
protected $_order;

/**
 * @var OrderFactory
 */
protected $order;

/**
 * Create constructor.
 *
 * @param ManagerInterface $messageManager
 * @param Config $config
 * @param QueueFactory $queueFactory
 * @param Order $order
 * @param OrderFactory $orderFactory
 */
public function __construct(
    ManagerInterface $messageManager,
    Config $config,
    QueueFactory $queueFactory,
    Order $order,
    OrderFactory $orderFactory
) {
    parent::__construct($messageManager, $config, $queueFactory);
    $this->_order = $order;
    $this->order  = $orderFactory;
    $this->type   = 'order';
}

/**
 * Dispatch when Invoice created
 *
 * @param Observer $observer
 */
public function execute(Observer $observer)
{
    if ($this->isConnected() && $this->isConnected() == 1) {
        try {
            /** @var \Magento\Sales\Model\Order $order */
            $order = $observer->getEvent()->getOrder();
            if (empty($order)) {
                $orderId = $observer->getEvent()->getOrderIds()[0];
            } else {
                $orderId = $order->getId();
                if (!empty($order->getBaseTotalInvoiced()))
                    return;
            }
            if ($orderId) {$this->messageManager->addSuccessMessage(__('(status: %1) in .', $order->getState()));
                if($order->getState() == 'Complete') {

                    $model  = $this->order->create()->load($orderId);
                    $incrementId = $model->getIncrementId();
                    if ($incrementId && $this->isEnabled()) {
                        if ($this->isImmediatelyMode()) {
                            $qboId = $this->_order->sync($incrementId, true);
                        /**
                         * @var \Magento\Backend\Model\Auth\Session $adminSession
                         */
                            $adminSession = ObjectManager::getInstance()->get('\Magento\Backend\Model\Auth\Session');
                            $isAdminPage  = $adminSession->isLoggedIn();
                            if ($qboId and $isAdminPage)
                                $this->messageManager->addSuccessMessage(__('Successfully updated this Order(Id: %1) in QuickBooksOnline.', $qboId));
                        } else {
                            $this->addToQueue($incrementId);
                        }
                    }
                }
            }
        } catch (\Exception $e) {
            $this->messageManager->addErrorMessage($e->getMessage());
        }
    }
}
}


texts:
I've looked at several pages regarding adding another language support to the Magento cart, however, there seems to be something missing.

The usual is to download translation through the admin interface.... Then Create a Store View and set the Locale to the desired language.  This doesn't appear to work as I have tried adding Russian language support only to find that the switch causes the site to come out with error and become inaccessible.

I remember about a year ago finding some mentions of the directories that needed to be created on the server in order for the language to be available.


texts: Error filtering template: Invalid block type: Wds\Coreoverride\block\Listproduct?in magento 2

texts:
I created one module and I show only product on home page customization throw .I also home page cms block call I have this error? please help me        productCollectionFactory used .

  Error filtering template: Invalid block type:
  Wds\Coreoverride\block\Listproduct


texts: How to load Product or order collection outside project in magento2

texts:
I need to load product or order collection outside the magento,
i need to play around the data so i need to call collection
in magento1.x we use

require_once '../app/Mage.php';
$products = Mage::getModel('catalog/product')->getCollection();

how to do it on Magneto2?


texts:
I have create new module, controller and config file. but the route is not working, showing 404.

Controller:

<?php
class Magentotutorial_Helloworld_IndexController extends Mage_Core_Controller_Front_Action {
    public function indexAction() {
        echo 'Hello World';
    }

    public function goodbyeAction() {
    echo 'Goodbye World!';
    }
}

Config file.

<config>
    <modules>
        <Magentotutorial_Helloworld>
            <version>0.1.0</version>
        </Magentotutorial_Helloworld>
    </modules>
</config>

<config>
    ...
    <frontend>
        <routers>
            <helloworld>
                <use>standard</use>
                <args>
                    <module>Magentotutorial_Helloworld</module>
                    <frontName>helloworld</frontName>
                </args>
            </helloworld>
        </routers>
    </frontend>
</config>

Module:

<config>
    <modules>
        <Magentotutorial_Helloworld>
            <active>true</active>
            <codePool>local</codePool>
        </Magentotutorial_Helloworld>
    </modules>
</config>


texts:
Preconditions

Magento 2.2.4
PHP 7.1

Steps to reproduce

Go to Content > Design > Configuration
Edit the Store View and try to change the "Applied theme" to another
Save Configuration

Expected Result

Change the theme

Actual result

Appears the error: "Something went wrong while saving this configuration: Area is already set"


texts: Unable to create customer custom attribute

texts:
I need to add a custom attribute to customers.
For products I did it with REST API, but it seems it is not possible to do the same for customers.

So, as suggested everywhere, I created a small extension to add the desired attributes, with a setup module, that implements the install method, like this

module.xml

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

Handouk/CustomerAttributes/Setup/InstallData.php

<?php
namespace Handouk\CustomerAttributes\Setup;

use Magento\Customer\Setup\CustomerSetupFactory;
use Magento\Customer\Model\Customer;
use Magento\Eav\Model\Entity\Attribute\Set as AttributeSet;
use Magento\Eav\Model\Entity\Attribute\SetFactory as AttributeSetFactory;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;

/**
 * @codeCoverageIgnore
 */
class InstallData implements InstallDataInterface
{

    /**
     * @var CustomerSetupFactory
     */
    protected $customerSetupFactory;

    /**
     * @var AttributeSetFactory
     */
    private $attributeSetFactory;

    /**
     * @param CustomerSetupFactory $customerSetupFactory
     * @param AttributeSetFactory $attributeSetFactory
     */
    public function __construct(
        CustomerSetupFactory $customerSetupFactory,
        AttributeSetFactory $attributeSetFactory
    ) {
        $this->customerSetupFactory = $customerSetupFactory;
        $this->attributeSetFactory = $attributeSetFactory;
    }

    /**
     * {@inheritdoc}
     */
    public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
    {

        /** @var CustomerSetup $customerSetup */
        $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);

        $customerEntity = $customerSetup->getEavConfig()->getEntityType('customer');
        $attributeSetId = $customerEntity->getDefaultAttributeSetId();

        /** @var $attributeSet AttributeSet */
        $attributeSet = $this->attributeSetFactory->create();
        $attributeGroupId = $attributeSet->getDefaultGroupId($attributeSetId);

            $customerSetup->addAttribute(Customer::ENTITY, 'my_attr' , [
            'type' => 'varchar',
            'label' => 'my_attr' ,
            'input' => 'text',
            'required' => false,
            'visible' => true,
            'user_defined' => false,
            'visible_on_front' => true,
            'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL,
            'system' => 0,

            ]);

            $attribute = $customerSetup->getEavConfig()->getAttribute(Customer::ENTITY, )
            ->addData([
                'attribute_set_id' => $attributeSetId,
                'attribute_group_id' => $attributeGroupId,
                'used_in_forms' => ['adminhtml_customer'],
            ]);
            $attribute->save();
    }
}

Anyway, to me, this is not working and attributes are not visible in backend.
I read people were telling that for Magento 2.1 this approach was not working either.

My question is: is it the correct approach, given that I'm on Magento 2.2.1?


texts: Copy only functions from /app/code/core to local

texts:
If I copy a core file to fix a bug, do I need to copy the whole file or is enough to copy only the function?

Like I copy /app/code/core/Mage/Core/Model/Store.php to /app/code/local/Mage/Core/Model/Store.php to fix a bug in public function roundPrice($price):

class Mage_Core_Model_Store extends Mage_Core_Model_Abstract
{
    public function roundPrice($price)
    {
        // fix
    }
}


texts: What are the hardware requirements for running Magento 2.0?

texts:
I have tried installing Magento on a shared hosting solution but it is unbearably slow. I have decided to host my future online store on a VPS. What would Magento experts say are the hardware requirements in order to have an above average performance?
I plan on going through the installation process with diligence, tending to cache configuration and other possible ways to optimize for performance.

This is the VPS I chose:

-4 vCores (KVM virtualization)
-14GB RAM
-1000GB Disk space
-100Mbps connection

I can upgrade to the following setup with a pricing delta of ~222$ per year.

-6 vCores
-30GB RAM
-2000GB Disk space
-1Gbps connection

I think I should be OK in terms of processing cores (am I?), but I'd like an opinion about the connection bandwidth and RAM.

EDIT: I have checked this question, and although the question is similar, I'm looking for an above average performance, and not just minimum requirements to host a Magento shop.


texts: Cron Error Magento 2: Please set a website ID

texts:
I have custom cron, which initially had an error:

  Please set a website ID.

I got rid of this issue by doing below:

$this->emulation->startEnvironmentEmulation($store_id, \Magento\Framework\App\Area::AREA_FRONTEND, true);

//my code

$this->emulation->stopEnvironmentEmulation();

Then after some time on the server, I had an error:

  Process went away at 2020-02-09 12:19:06 (supposed time)

This issue was solved by simply removing the above emulation code which I added to solve the

  Please set a website ID.

error and it was working again fine for some time.

Now I am again getting the same error

  Please set a website ID.

Please tell me what is actually wrong?


texts: {{block ...}} in wysiwyg from page gets not rendered

texts:
I am quite new to magento. I have migrated a magento 1.4.2 project to my local machine in order to upgrade magento. Currently I have successful upgraded to magento 1.9.2.3. The content seems also to be correct.

BUT (there's always a BUT) the products on the home page doesn't get displayed. I checked the settings and files and values from the live version (1.4.2) with my local version (1.9.2.3). Everything seems to be same and in order.

The problem as it seems is that the block from the page content (inside the wysiwyg)

// this line should use a custom template to render the products from a specific category

    {{block type="catalog/product_list" name="home.catalog.product.list" alias="slider" category_id="98" template="slider/view.phtml"}}

    {{block type="page/html" name="home.catalog.product.list" category_id="154" template="home_selected/view.phtml"}}

Bla Bla

//this line should be rendered as it only use the default template

    {{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" template="catalog/product/list.phtml"}}

won't get rendered. (Only) The HTML tags and the text "Bla Bla" are getting rendered and displayed as it should.

I am quite lost in finding what prevents the rendering of the blocks. Are there extensions or modules which needs to be enabled in order to render/display the page content/products?

Thanks a lot for every help!


texts: Magento 2: Translate knockout html where "mailto:info@sitename.com" is used

texts:
In Magento_Checkout/web/template/minicart/content.html there is a
"mailto:info@website.com" used.
Now I can translate the last piece by -- ko text: $t('info@website.com') -->
<-- /ko --> into something like "info@website.co.uk".
But how can I translate "mailto:info@website.com" into
"mailto:@website.co.uk"?
So that I can use it for a multistore website.
I believe it is in JS knockout: see the code below:

        info@website.com


texts: How to Use Absolute Pricing for Custom Options in Magento 2 programatically

texts:
My problem is to set custom option price as product price while adding to cart. Usually in Magento custom option price will add to the product price but I want to assign custom option price as product price.

For example product price is 10 and custom option price is 20. When product is added, it will assume total price as 10+20 = 30. But I want product price to be 20 only.

I need a suggestion, can we keep product price as "0" so that product price will become the custom option price when added? Please let me know if there is any better approach or it is already answered somewhere.

Note: Removed answer from question and posted it as answer


texts: Magento 2 paypal Instant Payment Notification (IPN) URL

texts:
Can anyone tell me what is the Correct Paypal Instant Payment Notification (IPN) url for Magento 2.x. I have used

  BASE_URL/index.php/paypal/ipn/index/

and

  YOUR_BASE_URL/paypal/ipn/

Both URLs get 500 Error in Post method.


texts: Hi, I try to view the order in backend and show me this error, I need help to fix it


texts: Scalable and fast "configurable" products

texts:
more of a "how would you" kind of question as I'm hitting a wall with my own ideas.

We have, at present, around 4000 simple products that makeup approximately 20 configurable products. Each simple product has around 5-7 custom options each and the configurable side of the product is used to handle what we call the "big 4" attributes for our business, in this case:

Size
Quantity
Lead time
Material

That returns 1 product, obviously, which then has an array of custom options. Currently, managing this is a little tedious, and loading the parent product is slow enough as it is. It's not a scalable solution and as we add more products it's only going to get slower to load and harder to scale. We sell printed items, available in a range of sizes, quantities, on different materials and at different delivery speeds. Once you've established this you then need to choose "optional extras" on the product like finishing methods etc.

Can anyone suggest alternative ways, mainly aimed at site speed and ease of management to achieve a scalable solution? Unfortunately, I've already tried "let's simplify our product offering" and it's a no goer!

Any advice is appreciated as we're about to add nearly 1500 products across our parent items which are going to slow it down even more, not to mention the admin headaches actually making it work in the first place.

Cheers.


texts: Magento 2.3.0 - User roles and Permissions - module/extension installation issue

texts:
I'm running magento 2.3.0 on php 7.1

I have two users each with a different user role/permissions created

Users     | User Role    | Role Resources (resource access)
----------|--------------|-------------------------------
Admin     |Administrator | All
dev       |Dev           | Custom (everything except permissions)

Issue 1

When a module was installed using the dev user and on logging in with the admin user the admin panel is completely messed up. Clearing cache did not help.

Issue 2

When logged in as the dev user the theme settings don't show up as they do when logged in as the admin user. As the below images show

View from dev user login
(missing theme "wokiee" on left menu panel and within stores >> configuration)

View from admin user login
(shows theme "wokiee" on left menu panel and stores >> configuration)


texts: How to disable the category url from menu?

texts:
I would like to know if there's any way to hide/remove/disable the category url page from menu.

For example, there's a category named "Clothing" and the subcategories are "T-shirt", "Pants" and "Skirt".

It will show on the front-end menu like this:

Clothing

T-shirt
Pants
Skirt

It shows all products when clicking "Clothing", but I wanna disable it - maybe remove the url from menu or something like that?

Is there any way to make the category visible but remove the link url from menu?
(For example: Don't go to any product page when clicking "Clothing")

※ Magento version: 1.9.3.7


texts: Good night my friends. Shaking the customer's store for a while and suddenly the magento 1 links stopped being redirected. I was currently working on css. This occurs in the products and categories of the menu. they would know how to get along with me


texts: Magento2 controller_action_predispatch not working with Varnish enabled

texts:
I am using Magento version 2.3
Varnish 6 enabled
Docker setup

I am implementing force login on event 'controller_action_predispatch'. Below is my code:

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

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="controller_action_predispatch">
        <observer name="kernel_request_before" instance="Vendor\Module\Observer\FrontSendResponseBefore" shared="false" />
    </event>
</config>

app/code/Vendor/Module/Observer/FrontSendResponseBefore.php

<?php

namespace Vendor\Module\Observer;

use Magento\Framework\Event\Observer as EventObserver;
use Magento\Framework\Event\ObserverInterface;

class FrontSendResponseBefore implements ObserverInterface
{
    private $_helper;

    /**
    * @var \Magento\Framework\App\Response\RedirectInterface
    */
    protected $redirect;

    private $_objectManager;

    public function __construct(
        \Vendor\Module\Helper\CoreHelper $helper,
        \Magento\Framework\App\Response\RedirectInterface $redirect,
        \Magento\Framework\ObjectManagerInterface $objectmanager
    ) {
        $this->_helper = $helper;
        $this->redirect = $redirect;
        $this->_objectManager = $objectmanager;
    }

    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $actionName = $observer->getEvent()->getRequest()->getFullActionName();
        $controller = $observer->getControllerAction();

        $allowedUrls = array(
            'customer_account_login',
            'customer_account_loginPost',
            'customer_account_logout',
            'customer_account_logoutSuccess',
            'customer_account_forgotpassword',
            'customer_account_forgotpasswordpost',
            'customer_account_createPassword',
            'customer_account_createpassword',
            'customer_account_resetpasswordpost'
        );

        $customerSession = $this->_objectManager->create('Magento\Customer\Model\SessionFactory')->create();

        $redirect = true;
        if (!$this->ifForceLoginEnabledForStore()) {
            $redirect = false;
        } else if (in_array($actionName, $allowedUrls)) {
            $redirect = false;
        } elseif ($customerSession->isLoggedIn()) {
            $redirect = false;
        }

        echo 4; die;

        if ($redirect) {
            $this->redirect->redirect($controller->getResponse(), 'customer/account/login');
        }
    }

    private function ifForceLoginEnabledForStore()
    {
        $storeId = $this->_helper->getCurrentStoreId();

        if ($this->_helper->getConfigValue('general/general/forcelogin', $storeId) == true) {

            return true;
        }

        return false;
    }
}

As you see I have added a die statement, but it does not execute when the cached version of page is loaded.

Does anyone has any idea how to fix this?


texts: User not getting emails of forget password in magento 1.9.0.1

texts: User is not getting emails of forget password in magento 1.9.0.1.While other mails are getting . Any body know the solution for this problem please share .


texts: Is there any option to Add sub users after Registration

texts:
I have searched for what i want but didn't find anything helpful that's why posting this as a question.

I have digital products i.e Reports. To access those reports i have two options.

1- Purchase one report.
2- Subscribe to access multiple reports on the basis of the package.

Subscription packages will have something like, user(company admin) will select the categories for which he/she want to get access to view the reports. And option to create 5 or more sub users depending on the package. Each sub user can view the reports for the categories selected at the time of package purchase by company admin.

I am new to Magento. So i want to know is this something achievable in Magento. And if Yes, How ?

Any help would be greatly appreciated.

Thanks


texts: I would secure my / downloader. I wish that no one is accessing this road except me how to configure this?


texts: Remove "Add to Cart" via Layout Update XML Magento 2.1

texts:
I'm trying to figure out how to remove the add to cart from specific items only in Magento 2.1 via "Layout Update XML on the product backend.  In magento 1.x it was simple

<reference name="content">
  <remove name="product.info.addtocart"/>
</reference>

However, I haven't found a nice clean and simple method to use for Magento 2.1 - is there something similar to use on a per-item basis via update XML?

EDIT:
Ok, never could figure out anything to put the the layout XML that would remove the Add to Cart button. But I did find a crappy way to do it - CSS.

Add this into the top of the Content on the product you want to hide the add to cart

<style>.box-tocart {display: none}</style>

Far from ideal, but it does get the job sort of done.


texts: How to add button at top of Layered navigation Filter from custom module?

texts:
I have a phtml that contain button like this in my custom module :

app/code/Vendor/Module/view/templates/button.phtml

<button> <span> <?= __('New Button') ?> </span> </button>

i want to add this phtml in top of layered navigation filter, so it will look like this:

How can i do this using custom module, not from theme?


texts:
I changed the default currency in my store to be SAR, but I got this error on checkout page:

Exception #0 (Exception): Undefined rate from "SAR-USD". magento 2

Any help.


texts:
How do I use Checkboxes in system.xml file with bydefault checked? I want to configure my custom module with four check-boxes (left,right,top,bottom).
I am using this code, but it's display only unchecked checkboxes. When I am going to save settings it's save only last checkbox's value. Please see attached screen-shot.

<positions translate="label">
    <label>Show Position</label>
    <frontend_type>Checkboxes</frontend_type>
    <source_model>customodule/model</source_model>
    <sort_order>14</sort_order>
    <show_in_default>1</show_in_default>
    <show_in_website>1</show_in_website>
    <show_in_store>1</show_in_store>
</positions>

I have created model function for this:

public function toOptionArray()
{
    return array('position' =>
        array('value' => 'left', 'label'=>Mage::helper('adminhtml')->__('Left')),
        array('value' => 'right', 'label'=>Mage::helper('adminhtml')->__('Right')),
        array('value' => 'top', 'label'=>Mage::helper('adminhtml')->__('Top')),
        array('value' => 'bottom', 'label'=>Mage::helper('adminhtml')->__('Bottom')),
    );
}

please suggest me what's code need to set and use these check-boxes?

Thanks in advance.


texts: I have created an observer on customer_register_success. I want to use some predefined urls to register customers e.g customer/account/create/?testparam=12345 and I want to get that query param inside the observer I've created. Obviously Mage::app()->getRequest()->getParam('testparam'); doesn't work in this case. How could I do that?


texts: Template not loading on checkout/cart page

texts:
I've installed a module which explicitly describes that the layout should be updated in order to see the template file. I've done this, but it's still not showing and I can't figure out why.

Here is the module's config.xml

<?xml version="1.0"?>
...
<frontend>
    <layout>
        <updates>
            <locator>
                <file>van.xml</file>
            </locator>
        </updates>
    </layout>
</frontend>
...

This is what's found in design/frontend/default/default/layoutvan.xml:

<?xml version="1.0" encoding="UTF-8"?>
<layout version="0.1.0">
    <checkout_cart_index>
         <reference name="checkout.cart">
              <block type="core/template" name="extra_block" template="van/customcoupon.phtml" />
         </reference>
    </checkout_cart_index>
</layout>

I'm using the fortis theme by Infortis and copied the frontend/fortis/defaul/template/checkout/cart.phtml to the fortis//.../cart.phtml and added <?php echo $this->getChildHtml('extra_block'); ?> to this theme just beneath the coupon section, like so:

    <?php if ($tmpHtml = $this->getChildHtml('checkout.cart.extra')): ?>

            <?php /* Extensions placeholder */ ?>
            <?php echo $tmpHtml; ?>

    <?php endif; ?>

    <?php if ($tmpHtml = $this->getChildHtml('block_cart_below_table')): ?>

<?php echo $tmpHtml; ?>

    <?php endif; ?>

        <?php if (!$this->getIsVirtual()): echo $this->getChildHtml('shipping'); endif; ?>

        <?php echo $this->getChildHtml('coupon') ?>
        <?php echo $this->getChildHtml('extra_block'); ?> // this is the line I've added

        <?php echo $this->getChildHtml('crosssell') ?>

I've flushed the caches multiple times but the template is not loaded. I've also tried adding an output="toHtml" to it, as well as before="-" and after="-", I've also tried giving it an alias and using that, just to be sure, but this also doesn't work.

When I add some random text just above/below <?this->getChildHtml... ?> it comes through, but the template itself isn't loaded. Does anybody know why this might be?

Note: the coupon section is also not showing up for some reason.


texts: Many calls of newsletter_subscriber_save_before Observer

texts:
In my Observer, I noticed that newsletter_subscriber_save_before Observer calls in many other actions, for example customer_login or customer_register_success.

The problem is, that I use newsletter_subscriber_save_before for check status of subscription in Customer Account and in Unsubscribe Link from Email message, but I don't want to call newsletter_subscriber_save_before on Login Action.

Is there any other events that I could use to replace newsletter_subscriber_save_before in Customer Account and Unsubscribe Link, and at the same time will not be calling on Login or Register?


texts:
Hi I am using searchanise extension for searching in my magento 1.9 site. But I am getting below error.

  Uncaught TypeError: Cannot read property 'SearchForm' of undefined.

On first load it works fine but after reload it shows the above error.Let me know what I am missing.

And In the admin panel
Cannot read extend property of undefined.

SNIZE_LOADER.loadScript(SNIZE.current_location + '/lib/js/jquery/jquery-1.7.2.min.js', function() {

SNIZE.$.extend(SNIZE, {
    index_script: 'admin.php',
    changes_warning: 'N',
    lang: {
        type_your_search_h

Can anyone please help me how can i debug and solve this issue.THANKS.


texts:
Query to show multiple table values in one custom admin grid without any relationship in magento2.2.5?

I think it can be done using Raw query.

But I am not sure how to implement it.

Any help would be appreciated


texts: Gmail ignoring Reply-To field in my Magento emails

texts:
My company uses Google Apps for Business. We've created a contact form on our site that captures users' comments on the checkout page. I wanted to set the Reply-To field as the user's email address (to avoid servers marking it as a spoofed email address if I use the To field). Gmail doesn't seem to recognize my Reply-To field. Here is a snippet from the original email source with fake data.

"...
12.34.56.78 as permitted sender) client-ip=12.34.56.78;
Reply-To: myemailaddress@domain.com
To: =?utf-1?BTWF0dCBTd1FuY1hpZQ==?=
..."

I've compared it to other email sources and my formatting seems correct. I can post the extension code if necessary but I'm really just curious if this is proper formatting. Thank you.


texts: Do promotions dicount work on special prices?

texts:
I made a general promotion in Catalog Price Rules with 10% dicount. Now for some reason the tier price table disappears. I read somewhere that dicount from promotions is not calculate on special prices. Is that true?

How could i apply the dicount on all tier prices also?

System: Magento ver. 1.9.2.2

Thank you very much.


texts: Porting Magento 1 extensions to Magento 2

texts:
What is the standard practice for porting Magento 1 extensions to Magento 2? Is there any official documentation or are there comprehensive guides I've overlooked?

Most guides only cover the basics: setup your directory in app/code/<company>/<module>, add registration.php, add etc/module.xml, then run the shell command php bin/magento set:upgrade.

What about the other directories, such as the Block, Controllers, Helper, and Model directories in Magento 1? What are they for? And some of them no longer exist in Magento 2, but now there are Setup, view and other directories there. What are the new ones for? What are the xml files in the etc directory and sub-directories for and what are their rules?

Before you link me to the Magento 2 devdocs, please ask yourself: do the following two pages answer any of the questions I pose?

https://devdocs.magento.com/videos/fundamentals/create-a-new-module/
https://devdocs.magento.com/videos/fundamentals/create-a-new-page/


texts: Translate 'Subtotal' to 'Amount' in new order email in header row

texts:
How do i translate 'Subtotal' to 'Amount' in new order email in the orange header row? Important: a little below it has to stay 'Subtotal'.

Thanks!


texts: Magento 2.2.3 problem with invoiced order, can´t edit order

texts:
I have a store with two payment methods.

ProxyPay - Generate an order without shipment or invoice with status equal Processing. When Magecomp 1.0.0 detect payment, state of order is passed to Complete.

PayPal - Generate an order with one invoice with status equal Proccesing, without shipment and order status equal Processing. When payment is detected, state of invoice is passed to Paid and order status keeps like Proccesing.

I try to add some code in Magecomp Proxypay plugin for keep state of Order and create a new invoice with Paid status as initial status. This work well, but when end user go to admin panel and try to create a new shipment for pass Order status from Proccesing to Complete a blanck screen apears and process never conclud.
Look that PayPal solution create a Order with Invoice and if wnd user try to create a shipment this proccess is conclud normaly.
Below, my code to add a invoice into order.
if ($orderObj->canEdit() && !empty($orderObj->getItems())) {
    $items = [];
    foreach ($orderObj->getItems() as $item) {
        if ($item->getProductType() == "simple") {
            $items[$item->getItemId()] = $item->getQtyOrdered();
        }
    }
    try {
        /**
         * @var $invoice Invoice
         */
        $invoice = $this->invoiceService->prepareInvoice($orderObj, $items);
        $invoice->setShippingAmount($orderObj->getShippingAmount());
        $invoice->setSubtotal($orderObj->getSubtotal());
        $invoice->setBaseSubtotal($orderObj->getBaseSubtotal());
        $invoice->setGrandTotal($orderObj->getGrandTotal());
        $invoice->setBaseGrandTotal($orderObj->getBaseGrandtotal());
        $invoice->setState(Invoice::STATE_PAID);
        $invoice->register();
        $transactionSave = $this->transaction->addObject($invoice)
            ->addObject($invoice->getOrder());
        $transactionSave->save();
    } catch (\Exception $exception) {
        $storeManager->info($exception->getMessage());
    }
}

I investigate the blanck screen and i found this in \Magento\Sales\Model\Order :
/**
 * Retrieve order edit availability
 *
 * @return bool
 */
public function canEdit()
{
    if ($this->canUnhold()) {
        return false;
    }

    $state = $this->getState();
    if ($this->isCanceled() ||
        $this->isPaymentReview() ||
        $state === self::STATE_COMPLETE ||
        $state === self::STATE_CLOSED
    ) {
        return false;
    }

    if ($this->hasInvoices()) {
        return false;
    }

    if (!$this->getPayment()->getMethodInstance()->canEdit()) {
        return false;
    }

    if ($this->getActionFlag(self::ACTION_FLAG_EDIT) === false) {
        return false;
    }

    return true;
}

In other words, if order have an invoice, I can't edit the order.
Any help or ideia for this problem. Why PayPal works and my soltion not works?


texts:
On the privacy policy page there is a link in the text (List of cookies we collect) which moves you down to the cookies table. I made some cosmetic changes to this page in my Admin and noticed that the link no longer works. On closer inspection I noticed the code

List of cookies we collect

is stripped down to

List of cookies we collect

in my Admin. How do I fix this?


texts: How to get Custom Model in a block that extends Block \Magento\Catalog\Block\Product\View?

texts:
I have block named  custom.product

namespace Myaddon\CustomProduct\Block\Product;
use Magento\Framework\View\Element\Template;

class Custom extends \Magento\Catalog\Block\Product\View
{
    protected function _toHtml()
    {
        $this->setModuleName($this->extractModuleName('Magento\Catalog\Block\Product\View'));

        $this->getLayout()->getBlock('custom.product')->setTemplate('Myaddon_CustomProduct::custom.phtml');

        return parent::_toHtml();;
    }

    public function getCustomProduct(\Myaddon\CustomProduct\Model\CustomProduct $customProduct){

        $a = $this->customProduct->getCollection();
        echo count($a); die('xxx');

    }
}

When i run the above code, I get error. So please tell me what's wrong?

Recoverable Error: Argument 1 passed to Myaddon\CustomProduct\Block\Product\Custom::getCustomProduct() must be an instance of Myaddon\CustomProduct\Model\CustomProduct, none given, called in C:\localhost\magento2-2.0.0-rc\app\code\Myaddon\CustomProduct\view\frontend\templates\custom.phtml on line 1 and defined in C:\localhost\magento2-2.0.0-rc\app\code\Myaddon\CustomProduct\Block\Product\Custom.php on line 21 [] []


texts: Magento 2 Data Migration time difference?


texts: Is it possible to include a link in a translation?

texts:
We disabled the guest checkout. To try to make the response a bit more user friendly, I tried to do this in our translation file in our theme:

"Guest checkout is disabled.", "You must login or create an account to checkout."

The result, however, is that it is escaped and just prints out as text on the screen.

Can we achieve this through translation? My feeling is likely that this is a security protection. If that's the case, is there another way to do this simply? For now, I've just removed the links. The text is far better than "Guest checkout is disabled." even without the links, but the links would be a better experience.


texts: I can not upgrade from Magento 2.2.5 to Magento 2.2.6

texts:
When upgrading from Magento 2.2.5  to Magento 2.2.6, it is output as follows.

$ cd /var/www/html/magento_project
$ php bin/magento maintenance:enable
$ composer update
$ composer require magento/product-community-edition 2.2.6 --no-update

./composer.json has been updated

And I can not upgrade.

Please tell me what to do.


texts: Magento 2.3.3 Adding Custom File Upload button in system configuration not working in local

texts:
in magento 2.3.1 below code is work

<field id="file_upload" translate="label" type="Magento\Config\Block\System\Config\Form\Field\File" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
    <label>Upload File</label>
    <backend_model>Magento\Config\Model\Config\Backend\File</backend_model>
    <upload_dir config="system" scope_info="1">customUpload</upload_dir>
</field>

but in Magento 2.3.3 this not working it give error

  Invalid parameter given. A valid $fileId[tmp_name] is expected.


texts: A position of a column in order grid was changed.

texts:
I'm not sure why the multi check button are fixed beside the last element.
Do you know why ? And how to move it? It hasn't moved by drag and drop comparing to other components!

FYI, i had experienced that i inserted the custom module to bring customer company to order grid like this :
https://github.com/meezin/Magento2.1.X_AddCompanyColumnToSalesOrderGrid

Thank you


texts: How to get products with the available dates?

texts:
I have created product attributes "Available from" and "Available to" with the input types date.

I want to get products from the available dates while searching.

How can I achieve that result?

Could anyone please help me with this?


texts: Magento 2: Apply JS after estimated shipping methods load and change

texts:
On the cart page Estimated shipping methods I have to display custom text using js before the list of shipping methods.
Shipping methods are loading by knockout. So I have to apply jquery after load shipping methods and the same should be applied when the customer changes the shipping country, region, and zip code.
I have changed in
module-checkout/view/frontend/web/js/model/cart/estimate-service.js but jquery not applying.
define([
'Magento_Checkout/js/model/quote',
'Magento_Checkout/js/model/shipping-rate-processor/new-address',
'Magento_Checkout/js/model/cart/totals-processor/default',
'Magento_Checkout/js/model/shipping-service',
'Magento_Checkout/js/model/cart/cache',
'Magento_Customer/js/customer-data'
], function (quote, defaultProcessor, totalsDefaultProvider, shippingService, cartCache, customerData) {
'use strict';

var rateProcessors = [],
    totalsProcessors = [],

    /**
     * Estimate totals for shipping address and update shipping rates.
     */
    estimateTotalsAndUpdateRates = function () {
        var type = quote.shippingAddress().getType();

        if (
            quote.isVirtual() ||
            window.checkoutConfig.activeCarriers && window.checkoutConfig.activeCarriers.length === 0
        ) {
            // update totals block when estimated address was set
            totalsProcessors['default'] = totalsDefaultProvider;
            totalsProcessors[type] ?
                totalsProcessors[type].estimateTotals(quote.shippingAddress()) :
                totalsProcessors['default'].estimateTotals(quote.shippingAddress());
        } else {
            // check if user data not changed -> load rates from cache
            if (!cartCache.isChanged('address', quote.shippingAddress()) &&
                !cartCache.isChanged('cartVersion', customerData.get('cart')()['data_id']) &&
                cartCache.get('rates')
            ) {
                shippingService.setShippingRates(cartCache.get('rates'));

                return;
            }

            // update rates list when estimated address was set
            rateProcessors['default'] = defaultProcessor;
            rateProcessors[type] ?
                rateProcessors[type].getRates(quote.shippingAddress()) :
                rateProcessors['default'].getRates(quote.shippingAddress());

            // save rates to cache after load
            shippingService.getShippingRates().subscribe(function (rates) {
                cartCache.set('rates', rates);
            });
        }
    },

    /**
     * Estimate totals for shipping address.
     */
    estimateTotalsShipping = function () {
        totalsDefaultProvider.estimateTotals(quote.shippingAddress());
    },

    /**
     * Estimate totals for billing address.
     */
    estimateTotalsBilling = function () {
        var type = quote.billingAddress().getType();

        if (quote.isVirtual()) {
            // update totals block when estimated address was set
            totalsProcessors['default'] = totalsDefaultProvider;
            totalsProcessors[type] ?
                totalsProcessors[type].estimateTotals(quote.billingAddress()) :
                totalsProcessors['default'].estimateTotals(quote.billingAddress());
        }
    };

quote.shippingAddress.subscribe(estimateTotalsAndUpdateRates);
quote.shippingMethod.subscribe(estimateTotalsShipping);
quote.billingAddress.subscribe(estimateTotalsBilling);
customerData.get('cart').subscribe(estimateTotalsShipping);
$("#co-shipping-method-form .item-options .field").prepend("
Prepended item
");
});

I need to prepend custom html with shipping methods list.


texts:
How to override the model:

vendor/magento/module-Customer/Model/Address/AbstractAddress.php

For removing the validation of the last name. What can I do?

I have already overriden this file using the around plugin method, but it is still throwing an error.


texts: Custom Module Controller: Invalid security or form key. Please refresh the page

texts:
I have a custom module with an admin controller, but when I try to access from the administration page I get the following error:

My controller is in Controller/Adminhtml/Login/Index.php

class Index extends \Magento\Backend\App\Action {...}

and the route decalaration in etc/adminhtml/routes.xml

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

the layout is in view\adminhtml\layout\oct_login_index.html

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

    <body>
        <referenceContainer name="content">
            <block class="oct\oct\Block\Adminhtml\Login\Index" name="oct_login_login" template="login.phtml"/>
        </referenceContainer>

    </body>
</page>

when i put the cursor on the adminhtml link get:

https://store.com/administrador55/oct/login/index/key/526f769ae4f621ffbda151c2a48015933d510d2d64fe2047abc29cbc29c27e27/

Debug:

any idea?

Thnks


texts: Magento2 Product List Widget Cache Problem - prices not reloading

texts:
I have a product list widget inserted in the content area of a magento 2 store frontpage. The widget is inserted using the following code:

{{widget type="Magento\CatalogWidget\Block\Product\ProductsList" products_count="12" template="product/widget/content/grid.phtml" conditions_encoded="a:2:[i:1;a:4:[s:4:`type`;s:50:`Magento|CatalogWidget|Model|Rule|Condition|Combine`;s:10:`aggregator`;s:3:`all`;s:5:`value`;s:1:`1`;s:9:`new_child`;s:0:``;]s:4:`1--1`;a:4:[s:4:`type`;s:50:`Magento|CatalogWidget|Model|Rule|Condition|Product`;s:9:`attribute`;s:12:`category_ids`;s:8:`operator`;s:2:`==`;s:5:`value`;s:2:`19`;]]"}}

When switching the site to production mode, product prices are not reloaded when changing currencies. Price reload does work in developer mode and also on the regular category pages.
Prices are reloaded after refreshing BLOCK_HTML cache in backend but will then cache the currency chosen on first page view. setting the widgets cache TTL to null has no effect.

I also tried adding the widget via layout xml using this code:

<referenceContainer name="content.bottom">
    <block class="Magento\CatalogWidget\Block\Product\ProductsList" template="product/widget/content/grid2.phtml" cacheable="false"><!--   -->
        <arguments>
             <argument name="products_count" xsi:type="number">12</argument>
             <argument name="conditions_encoded" xsi:type="string">a:2:[i:1;a:4:[s:4:`type`;s:50:`Magento|CatalogWidget|Model|Rule|Condition|Combine`;s:10:`aggregator`;s:3:`all`;s:5:`value`;s:1:`1`;s:9:`new_child`;s:0:``;]s:4:`1--1`;a:4:[s:4:`type`;s:50:`Magento|CatalogWidget|Model|Rule|Condition|Product`;s:9:`attribute`;s:12:`category_ids`;s:8:`operator`;s:2:`==`;s:5:`value`;s:2:`19`;]]</argument>
        </arguments>
    </block>
</referenceContainer>

I also tried adding $this->_isScopePrivate = true; to Magento\CatalogWidget\Block\Product\ProductsList::__construct() which is supposed to force Ajax loading, but no success.

Suggestions how to get around this, anyone?


texts:
I have 3 stocks, each having its own source. Every source is assigned to some or the other product.

When an order is placed with one of these products, how do I find out the source for each product in the order.

I tried using the method-

$orderItem->getProduct()->getQuantityAndStockStatus()

returns

{ ["is_in_stock"]=> bool(false) ["qty"]=> float(0) }

However,

$orderItem->getProduct()->isInStock()

returns

true

Any ideas would be appreciated. Thanks!


texts:
My magento version is 1.9 and i am using rwd theme.

I want to remove link from the menu on homepage... I tried the following stuff but it didn't work:

Create some folder as this path: app/code/local/Mage/Catalog/Block
Copy file Navigation.php from app/code/core/Mage/Catalog/Block to app/code/local/Mage/Catalog/Block
Go to function _renderCategoryMenuItemHtml()
Replace the code

$html[] = 'getCategoryUrl($category).'"'.$linkClass.'>';
$html[] = '' . $this->escapeHtml($category->getName()) . '';
$html[] = '';

with this code

if($category->getLevel()== 2 && $hasActiveChildren) {
        $html[] = '';
        $html[] = '' . $this->escapeHtml($category->getName()) . '';
        $html[] = '';
} else {
        $html[] = 'getCategoryUrl($category).'"'.$linkClass.'>';
        $html[] = '' . $this->escapeHtml($category->getName()) . '';
        $html[] = '';
}


texts: How Can I create a Downloadable Product?

texts: I would create a Magento downloadable (this should be just an exercise) but when I try to create a new product 'Downloadable Product' option doesn't appear in drop down. I've found this problem on various new installations.


texts: Magento 2: Syncing Backend and Frontend State/Cache

texts:
Does Magento 2 have any systems or abstractions for managing state between the backend and the local storage on the frontend?

I'm working on porting a feature for restoring a user's abandoned cart via a redirect URL.  In simplified form, a URL like

http://magento.example.com/restore/the/cart?identifier=sdkfjh48v237g5

will load a quote into the current user's cart based on an encoded quote_id in the identifier.

In Magento 1, this was relatively simple -- you just needed to update a user's Checkout session information with the correct quote ID.  However, Magento 2 adds in the wrinkle of local storage.

The Magento 2 frontend javascript application(s?) seems to cache information in the browser's local storage databases.  This includes information for building the mini-cart.  What this means is even if an end-user-programmer (me) manages to change the session Session ID in the backend, the mini-cart will still display the old cart data.

The is just one example of an issue that stems from not knowing (or having?) a single API for managing application state across the backend and frontend.  For my specific problem I've had my endpoint rendering an HTML page that includes some javascript the manually clears the local storage and then redirects the user to another page -- but this feels like a gross hack.

Is there an API in Magento 2 for managing data between the frontend and backend?

The there a standard way of signaling the entire system that, during backend processing, you've done something that makes it necessary it invalidate the frontend local storage cache?

Is there a technique for injecting a new RequireJS module into the page that runs automatically and can manipulate local storage before the rest of the javascript application(s?) accesses it?


texts: Magento 2 - How to set layout to 2 columns-right instead of 1 column

texts:
I did not find the solution.. Can anyone help me?

I want to change the default 1 column layout to 2-columns-right layout.


texts: Magento Make Coupon Field in Cart only visible on Click

texts:
For conversion purposes I'm trying to hide the coupon field in the magento cart and only make it visible upon a click. This is adviced by all conversion experts, so it's weird Magento hasn't adopted it yet. But then again, there are a lot of things weird about Magento :-p.

I've found this:
Magento hide / show coupon field in cart page on stack exchange with a suggestion. But I'm going to need a little more help.

I tried the solution, but it doesn't work with magento 1.9.2.3. Also the topic is over a year old. I'm not very familiar with javascript, so a detaild instruction would be very helpfull.

I hope there's someone who also thinks this is a good idea and is able to help me achieve this. I'm sure there are a lot of people who want the exact same thing, but don't know how.

All help is very much appreciated. Thank you in advance!

Feike


texts: Product Attributes showing in admin panel and front end when they should not

texts:
Firstly, I am not a developer, but have a problem with megento 2

I have a number of product attributes in attribute sets, the problem I am having is that some product attributes are show as a attached to products in the product admin panel when they are not and also showing in the layered navigation under shop options.

I have check the products and database and they are not attached, has anyone got any ideas how to resolve or what could be coursing the problem


texts:
I need to create mega menu in magento. basically i m not familiar with designing theme.So i m confused about to how to create mega menu in magento.
I have a html theme.

here you can see menu which i want to use...in magento...
I need to know the easy way to create mega menu.


texts: How to show categories in left sidebar in accordion view?

texts:
I am totally new and this is the first time when I have used Magento.

I have a theme http://ultimo.infortis-themes.com/demo/default/ and I want to add the sidebar on both sides of banners. Left sidebar will have categories in accordion view something like this http://www.amazon.com/home-automation-smarthome/b?ie=UTF8&node=6563140011 . and right sidebar will be static.
So my main problem is left sidebar and I am unable to find out that how can I show the categories in the left sidebar and in accordion view.


texts: Magento 2: How do I notify a customer about an order status change done via the REST Api?

texts:
I'm using the rest API

.../index.php/rest/V1/orders/561/

in order to update my order status:

Payload (POST):

{
  "entity": {
    "entity_id": 561,
    "state": "new",
    "status": "pending"
  }
}

That works fine, but it's not triggering an order status email. Looking into the full payload I don't see any option to trigger the email. Triggering the comments API is triggering a email but it is not the status change email. Any ideas?


texts: Magento 1.9.0.1 - Category URL Rewrites - Cannot intitialize the indexer process

texts:
I finally got my local installation of Magento 1.9.0.1 with the sample data up and running - XAMPP 1.8.3 on Windows 7 (Apache 2.4, PHP 5.5.15).  Everything was working fine with all the status warning cleared until I tried to add a Website (System -> Manage Stores -> Create Website).  I was able to create the website, and also create a store and store view under that website, but then I ran into trouble.  The following message appeared: "One or more of the Indexes are not up to date: Catalog URL Rewrites. Click here to go to Index Management and rebuild required indexes."

I tried clearing all caches, and reindexing the data, but I continued to get the message.  I then tried deleting the new website, store and store view that I had created, but am still getting the message.  It's the Category URL Rewrites that's causing the problem.

Any help on how to resolve this is greatly appreciated.


texts:
I want to know how does the Tracking work for UPS Shipping? Searched a lot but they will always redirect me to paid extensions.

UPDATE :  As ForMat described, will magento automatically receive UPS Tracking Number after "Create Packages"  operation? PF screenshot below.


texts: How can I disable/remove the pager in toolbar above my product-grid?

texts: How can I remove the "pager" above the Product-Grid Page catalog/view.phtml from "toolbar"? I need the sorter above and below the products, but the "pager" only at page-bottom. It must be in catalog.xml ... I don't know it exactly.


texts: How to Get order increment id in an email title in Magento 2

texts:
Can someone tell me how to get the order increment id in the email template subject in Magento 2. In Magento 1 we got it with:

{{var order.increment_id}}


texts:
I am looking to hook into a event that will tell me when a returning customer visits the site.

I was thinking about hooking into one of the session events, my question is, how would you go about recognizing when a customer returns to the site.

Is there an event that will tell me when a person visits the site, and if that person is a returning customer or a new visitor?

Any thoughts, ideas are greatly appreciated!

Thank you!


texts: How to attach order status to order item collection?

texts:
I'm loading a collection of order items like this:

    $collection = Mage::getResourceModel('sales/order_item_collection')
        ->addAttributeToSelect('*');

And I'd like to join to add the order's status to the collection, so that I can filter out incomplete orders via addFieldToFilter('status', 'complete').

How do I join these two things so that I can filter on the parent order's status?

I would paste my various attempts but I think that would probably just add confusion.


texts: Replacement of an abstract class in custom module

texts: I read a lot of information on this issue, but have not found a solution. I need to change the function getAddToCartUrl, in class Mage_Catalog_Block_Product_Abstract. Is there a way to make a substitution function module (without creating a copy of it in the local directory)? Rewrite method in the case Abstract classes does not work.


texts: Calculate tax programmatically in magento for some customers

texts:
my products price are inclusive of 12.5% tax so if my customer has tax excempt then he should not pay 12.5% instead he should pay 2%.

tax excempt:- if my customer produce c form then he is applicable for 2% instead of 12.5%.

Here is my code

i have observer called sales_quote_collect_totals_before

if($customer->getIsTaxExempt() == 1)
{
    $items = $observer->getEvent()->getQuote()->getAllVisibleItems();
    foreach($items as $item){
        $item->getProduct()->setTaxClassId(0); // set product tax class to none
        $basePrice = $item->getProduct()->getFinalPrice() / (1+(12.5/100)); // $basePrice is my price exlucive of 12.5%
        // here i want $basePrice + 2% of the $basePrice as my finalproduct price inclu of tax
        $item->getProduct()->setTaxClassId(12); // set product tax class to 2%
    }
}

but this is not working.prices are not changing in the cart.

Note: My code is going into if statement required customers.


texts:
how to change the product list Date 'asc >> desc'

Now is showing asc.

I want to change is desc is default >> ?product_list_dir=desc

using Magento Version 2.2.4

thank you!


texts: Magento 2: How to Filter a Product Collection By Store ID

texts:
Using a product factory object, I'm able to create a product, grab a product collection, and fetch the first item of that collection

/* var $productFactory \Magento\Catalog\Model\ProductFactory */
$product = $this->productFactory->create()->getCollection()->getFirstItem();

However, if I attempt to add a store_id to the collection's filter

    $product = $this->productFactory
        ->create()
        ->getCollection()
        ->addFieldToFilter('store_id', 1)
        ->getFirstItem();

I get the following error

Invalid attribute name: store_id
#0 /Users/alanstorm/Sites/magento-2-dev-docs.dev/magento2/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php(1434): Magento\Eav\Model\Entity\Collection\AbstractCollection->_addAttributeJoin('store_id', 'inner')
#1 /Users/alanstorm/Sites/magento-2-dev-docs.dev/magento2/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php(359): Magento\Eav\Model\Entity\Collection\AbstractCollection->_getAttributeConditionSql('store_id', 1, 'inner')
#2 /Users/alanstorm/Sites/magento-2-dev-docs.dev/magento2/app/code/Magento/Catalog/Model/Resource/Product/Collection.php(1489): Magento\Eav\Model\Entity\Collection\AbstractCollection->addAttributeToFilter('store_id', 1, 'inner')
#3 /Users/alanstorm/Sites/magento-2-dev-docs.dev/magento2/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php(382): Magento\Catalog\Model\Resource\Product\Collection->addAttributeToFilter('store_id', 1)
...
#63 {main}

The same thing happens if I attempt to use a product repository to filter by store_id (the repositories use the collections under the hood).

Is this a bug?  Or has the relationships between stores, websites, and products                 changed in Magento 2 such that that this is no longer a legitimate query?  Both?  Neither?  Something else?


texts: Magento 2 : window.checkoutConfig returns empty, So Checkout page is not loaded without configuration values

texts:
Here My Checkout page is not loading which throws following issue

It also shows like below while hit checkout page.

Can anyone please suggest me the solution for this.
Thanks in advance


texts:
I've to filter from, to and multiple customer in sales order.

I don't have customer id's, so first I'm taking them using following code:

$customer_ids = array();
$orders = Mage::getModel('sales/order')->getCollection()
    ->addAttributeToFilter('created_at', array('from' => $fromDate, 'to' => $toDate));

foreach ($orders as $order) {
    $customer_id = $order->getCustomerId();
    array_push($customer_ids, $order->getCustomerId());
}

foreach ($customer_ids as $customer_id) {
    $orders = Mage::getModel('sales/order')->getCollection()
        ->addAttributeToFilter('created_at', array('from' => $fromDate, 'to' => $toDate))
        ->addFieldToFilter('customer_id', $customer_id);
    $_orderCnt = $orders->count(); //orders count
    echo "Customer ID : " . $customer_id . " Order Count : ". $_orderCnt. "
";
}

Above code is used to find how many orders have been placed by customers during selected time period.

I've used following code to not load collection in foreach but it's not working.

foreach ($customer_ids as $customer_id) {
    $temp = $orders;
    $temp->addFieldToFilter('customer_id',$customer_id);
    $_orderCnt = $temp->count(); //orders count
    echo "Customer ID : " . $customer_id . " Order Count : ". $_orderCnt. "
";
    unset($temp);
}

Can anyone suggest me how I can optimize the code without loading collection everytime?


texts: Move review tabs to the first in product detail page

texts:
I firs removed more details tab.
I tried to move the reviews tab to first and then moved the details tab but it's not working.
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="product.attributes" remove="true"/>
        <referenceBlock name="product.info.details">
            <referenceBlock name="product.info.description">
                <arguments>
                    <argument name="priority" xsi:type="string">50</argument>
                </arguments>
            </referenceBlock>
            <referenceBlock name="reviews.tab">
                <arguments>
                    <argument name="priority" xsi:type="string">01</argument>
                </arguments>
            </referenceBlock>
        </referenceBlock>
    </body>
</page>

In the above image the review tab has to come first.
I tried changing the priority also but it didn't work.


texts:
I'm trying to display specific product in products-view by product-id in block.

I searched but I only found how to display product list in as:

{{block type="catalog/product_list"
name="home.catalog.product.list"
alias="products_homepage"
category_id="365"
template="catalog/product/list.phtml"}}

Looking for help.


texts: username and password not working after transfering magento to another server

texts:
the username and password for the administration is not working after we transfer magento to another server, we just export the database from the previous server and import to our current. Can you help me to fix this. thank you

UPDATE 22/07/2015

I have manage to fix this problem by dumping the database and deleting the app/etc/local.xml and var/cache/all_folder and doing the installation...


texts: Display "Free Delivery" if Value = 0 in attribute textfield

texts:
please visit this link

search for Rs 10 using ctrl + F

here i am  displaying attribute value [10 ], if value = 0 = > link

Now value is 10 ,if value = 0, I want to display "Selling Price (Free Delivery )" :

 Means instead of "Selling Price    + Rs 0 Delivery", I want to display "Selling Price ( Free delivery ) "

attribute code : "mp_local_shipping_charge"

Price.phtml

    <?php echo $_specialPriceStoreLabel ?>
 <span class="price" id="product-price-<?php echo $_id ?><?php echo $this->getIdSuffix() ?>"
<?php if($helperSettings->isShowOfferPrice($_product)):?> itemprop="lowPrice"<?php endif;?>>
 <?php echo $_coreHelper->formatPrice($_finalPrice, false) ?>

<?php echo "Selling Price"; ?>
<?php
 echo "+ Rs " . $_product->getData("mp_local_shipping_charge") .  " Delivery ";
?>


texts: Magento 2 City field not required on checkout

texts: How to make city field not required on checkout, i'm using luma theme?


texts: Magento Applying tax class to all products

texts:
how in Magento 1.7 we can apply tax class to all products via SQL
Below is sql query which i hope that i need to run to get this done

 UPDATE `catalog_product_entity_int` SET `value` =2 WHERE `attribute_id` =81;

i am unable to find attribute id for for tax class attribute? Any help on this

or i am also open to entirely different solution


texts: After place order moving to empty cart page. 502 bad gateway error

texts:
We are using Magento 1.14 enterprise edition. We are moving to new AWS server.

I have place order using Guest user it is working fine. I will try to place order using register user.order was placed and it is redirect to Empty cart page.

I have checked inspect element. in Prototype.js 502 bad gateway error occurs

Any idea on this issue?


texts: Magento - How to show Filters on non-category pages

texts:
I want to show the filters from the category pages on other pages.
I have a page where I show all products that are on sale and I have pages for the tags. These are product collections/lists and not categories.

While category pages have filters in the sidebar (layered navigation), these are not displayed on non-category pages.

Does anyone know how or if this can be done? Let me know if I need to provide more information.


texts:
I am trying to import products from a csv file which i exported last time, located in var/export folder.
after configuring the import profiler when i click the "Run Profile in Popup" i get immediately this error.

* Starting Mage_Dataflow_Model_Convert_Parser_Csv :: parse
* Error write to file batch_4.tmp
* Finished profile execution.

any suggestions, i am sure this is not related to code.


texts: magento 2 : Equivalent class for Adapter Product and Parser abstract

texts:
What is the equivalent class for the same in Magento2

  Mage_Catalog_Model_Convert_Adapter_Product

  Mage_Eav_Model_Convert_Parser_Abstract


texts: Create Event observer which fire when customer create while create order in magento admin

texts:
I have create a SMS module which send sms to customer when a new customer create.
My config.xml is below :

...
<!-- Event for customer register success from frontend -->
<global>
    <events>
        <customer_register_success>
            <observers>
                <sms_customer_register_success>
                    <type>singleton</type>
                    <class>sms/observer</class>
                    <method>sendSmsOnCustomerCreate</method>
                </sms_customer_register_success>
            </observers>
        </customer_register_success>
    </events>
<global>
...
<!-- Event for customer register success from backend from manage customer -->
<adminhtml>
    <events>
        <adminhtml_customer_save_after>
            <observers>
                <sms_customer_register_success>
                    <type>singleton</type>
                    <class>sms/observer</class>
                    <method>sendSmsOnCustomerCreate</method>
                </sms_customer_register_success>
            </observers>
        </adminhtml_customer_save_after>
    </events>
</adminhtml>
...

When I create customer while create order from magento admin as showing in below figure :

Then my observer is not working.

What event observer is fire when new customer create from sales_order_create?


texts: Magento 2: Why I'm getting JS errors after removing browser cache?

texts:
I'm using Magento 2 Porto theme and I relocate the position of some header elements like language selector etc. its working fine sometimes but after removing the browser cache its showing following js errors:

SCRIPT438: Object doesn't support property or method 'widget'

SCRIPT438: Object doesn't support property or method 'stellar'

HTTP404: NOT FOUND - The server has not found anything matching the requested URI (Uniform Resource Identifier).

SCRIPT5007: Unable to get property 'timepicker' of undefined or null reference

SCRIPT438: Object doesn't support property or method 'swMegamenu'

SCRIPT438: Object doesn't support property or method 'owlCarousel'

when I refresh it again then all the errors were gone and the page works fine once again. On the Internet Edge its showing JS errors all the time. I tried to upload the backup files but still seeing the same issue. Any one can help me to fix this issue

Thanks!


texts:
As some of you may know, a huge fiasco happened a month ago with NPM

As of now, Magento 2 composer.json file includes a lot of external resources (details on the Magento 2 GitHub)

What if one of those external resources gets removed by the author and in case of possible harm, what can we do to prevent that ?


texts: Multiple url name and field addcolumn action

texts:
I have this code:

$grid->addColumn('action',array(
            'header'    => $this->__('Action'),
            'type'      => 'action',
            'action'    => array(
                'label'     => $this->__('Join Program'),
                'url'       => 'urlstring/index/join',
                'name'      => 'id',
                'field'     => 'program_id'
            )
        ));

I want to set multiple url parameters. So in other word I need to achieve something like this:

$grid->addColumn('action',array(
            'header'    => $this->__('Action'),
            'type'      => 'action',
            'action'    => array(
                'label'     => $this->__('Join Program'),
                'url'       => 'urlstring/index/join',
                'name'      => 'id',
                'field'     => 'program_id',
                'name'      => 'PARAMETER2',
                'field'     => 'PARAMETER2'
            )
        ));

This does not work. What is the proper way to achieve this? How can I set PARAMETER2?


texts: Difference between /Controller and /controllers

texts:
A question I've been meaning to ask for ages, more theoretical than anything else.

I'm fully versed in developing Extensions using the normal Magento module file structure. I've noticed though when looking at some of the Mage 'extensions', that some contain a /Controller directory. Whats the purpose of these controllers and how do the differ to the ones used normally within the /controllers dir?

I can see the names are structured differently, so I'm gathering they're auto-loaded in a different way, but what purpose do /Controller classes serve?

Thanks all


texts: Error in creating custom customer attribute in magento 2

texts:
I need to create customer custom attribute.

In module.xml

<sequence>
       <module name="Magento_Customer"/>
</sequence>

in upgrade schema UpgradeSchema.php

namespace  Namespace\Modulename\Setup;

use Magento\Customer\Model\Customer;
use Magento\Customer\Setup\CustomerSetup;
use Magento\Framework\Setup\UpgradeSchemaInterface;
use Magento\Framework\Setup\InstallSchemaInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\SchemaSetupInterface;

class UpgradeSchema implements  UpgradeSchemaInterface
{
     private $customerSetupFactory;

    public function __construct(\Magento\Customer\Setup\CustomerSetupFactory $customerSetupFactory)
    {
        $this->customerSetupFactory = $customerSetupFactory;
    }
    public function upgrade(SchemaSetupInterface $setup,
                            ModuleContextInterface $context){
        $setup->startSetup();

            if (version_compare($context->getVersion(), '0.0.4') < 0) {
            /** @var CustomerSetup $customerSetup */
            $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);
            $customerSetup->addAttribute(
                Customer::ENTITY,
                'example1',
                [
                    'label' => 'Example Attribute',
                    'required' => 0,
                    'system' => 0, // <-- important, otherwise values aren't saved.
                                   // @see Magento\Customer\Model\Metadata\CustomerMetadata::getCustomAttributesMetadata()
                    'position' => 100
                ]
            );
            $customerSetup->getEavConfig()->getAttribute('customer', 'example1')
                ->setData('used_in_forms', ['adminhtml_customer'])
                ->save();
        }

        $setup->endSetup();
    }
}

I am getting error

  Recoverable Error: Argument 1 passed to
  Magento\Customer\Setup\CustomerSetu   p::__construct() must implement
  interface Magento\Framework\Setup\ModuleDat   aSetupInterface,
  instance of Magento\Setup\Module\Setup given, called in /vendor/magento/framework/ObjectManager/Factory/Abstrac
  tFactory.php on line 93 and defined in
  /vendor/magento
  o/module-customer/Setup/CustomerSetup.php


texts: Update Magento 2 PHP Settings - two php configuration? find right php.ini

texts:
I would like to update Magento 2 from 2.1.3 to 2.1.4.
While readiness check I get this error and hint:

  PHP Settings Check *

  Your current PHP memory limit is 256M. Magento 2 requires it to be set
  to 756M or more. As a user with root privileges, edit your php.ini
  file to increase memory_limit. (The command php --ini tells you where
  it is located.) After that, restart your web server and try again.

  *In some cases, you might have two PHP configuration files: one for the PHP command line and for the web server. If so, make the change in
  both php.ini files. For details, see the php.ini reference.

When I look at the phpinfo info page it’s correct:

  memory_limit  768M

with php —ini I get this path’s:

[~/www/magento]# php --ini
Configuration File (php.ini) Path: /opt/alt/php56/etc
Loaded Configuration File:         /opt/alt/php56/etc/php-cli.ini
Scan for additional .ini files in: /opt/alt/php56/link/conf
Additional .ini files parsed:      /opt/alt/php56/link/conf/alt_php.ini

PHP.ini file for php-cli

[~/www/magento]# php -i |grep php\.ini
Configuration File (php.ini) Path => /opt/alt/php56/etc
Additional .ini files parsed => /opt/alt/php56/link/conf/alt_php.ini

in php.info i get this path’s

Configuration File (php.ini) Path   /opt/alt/php56/etc
Loaded Configuration File   /opt/alt/php56/etc/php.ini
Scan this dir for additional .ini files :/home/xxx/etc/php_settings/conf.d
Additional .ini files parsed    /opt/alt/php56/link/conf/alt_php.ini, /home/xxx/etc/php_settings/conf.d/00-mycyon.ini

It is  not my  own webserver, so I can only edit this file:

/home/xxx/etc/php_settings/conf.d/00-mycyon.ini

The hosting provider says the 00-mycyon.ini file overwrite the others.

But I get still the same error.

How can I find the right php.ini file which magento use?
Or is it possible to say magento that it take this php.ini file:
/home/xxx/etc/php_settings/conf.d/00-mycyon.ini

Thanks for every hint or idea!


texts: Send a second order confirmation email for a specific product

texts:
It has been a while since I have worked on a Magento site. But I'm fairly certain this functionality might already be included somewhere, or there might be a free extension to achieve it.

The store has started to sell custom branded clothes for businesses where they can put the company logo on shirts etc.

What they need is for a second email to be sent to the customer if they order one of these products, simply just saying "Please reply to this email with your logo attached".

The second email will be coming from a different address. So normal order confirmation would be from sales@example.com, and the logo one would come from design@example.com

What would be the best way to achieve this?
(Site is CE 1.6.2.0)


texts:
Is there any free extension / Git hub code for flipper image for magento 2.3.3?
No paid extension please.


texts: How to get Real IP when using stackpath (Magento 1)

texts:
We have just moved to Stackpath and now our payments are failing.
I can see the requests hitting the server:

[08/Aug/2019:09:27:41 +0000] "POST/worldpay/processing/response...

I have enabled the debug logs and can see the error message below:

Worldpay response error: Domain can't be validated as WorldPay-Domain.


texts: Magento 2: Calculate sale price based on Special Price not Standard Price

texts: I am attempting to do a "sale on sale" promotion for one of my clients. They would like to add a discount on top of items that are already on sale. Example: "take an extra 30% off sale items." Now, I know that it works through the cart promotions, but the customer wants it done through the catalog promotions. If an item has a standard price of $75, the client brought the price down to $50 using the "special price" option on the product. Now they want to bring it down to $25 through the promotion, but they want the website to reflect that new price. So they want the original price of $75 to be struck through and now show that it is a $25 item instead of a $50 item. How can I make Magento do this?


texts:
There is no patch for supee-11086 for 1.8.x

A few places recommend using 1.7.x patch.

This does not work as there are changes in /lib/Varian/Filter/Template.php between 1.7 => 1.8

1.7: https://github.com/OpenMage/magento-mirror/blob/magento-1.7/lib/Varien/Filter/Template.php

1.8: https://github.com/OpenMage/magento-mirror/blob/magento-1.8/lib/Varien/Filter/Template.php

Has anyone got around this problem yet or have any suggestions?


texts: Magento 2.3 site cookie not set store wise

texts:
We have a multi-store site in magento 2.3
But when we move from one store to another at that time cookie not set for different store.
So category not open.
if we add '/?___store=xyz' in the category then open link proper.
Anyone help to solve this issue.


texts: Can't view 100/200 products per page in Manage Products (Magento 1.9.2.4)

texts:
When I go to the Manage Products page, and try to switch the view from 20 to 100 (or 200) it gets stuck on 'Please wait...'.

Is there a fix for this? As this issue hasn't occurred on my old hosting.

Details:
Request name: ?ajax=true&isAjax=true, Status: 504, Type: xhr, Initiator: prototype.js:1530, Size: 194B, Time 10.0min. (Stalled: 5min, Wait: (TTFB) 5min)

Also, when this issue happens, I am no longer able to access the backend as it times out, until I clear the cookies and site data.


texts: Magento 2.2 | Add breadcrumbs to catalog product view

texts:
How can I add breadcrumbs to the

  catalog product view

page?

I override in my theme:

  catalog_product_view.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="content.top">
            <block class="Magento\Theme\Block\Html\Breadcrumbs" name="breadcrumbs" as="breadcrumbs" />
        </referenceContainer>
        <referenceBlock name="view.addto.compare" remove="true"/>
    </body>
</page>

Sadly this ain't working.
Someone knows what to do?

Thanks for any help!


texts:
I want to manipulate the products showing in my mini cart.
I have configurable products, now i want to show only 1 parent configuration with color White if the customer has added Color white with size attribute M / L / XL.

So actually the code that im searching for would be where the array is created with the items to show.


texts: How to close layered navigation accordion on side click?

texts:
If anyone can help me with how to close active accordion of layered navigation if clicked outside the layered navigation block?

 <div class="filter-options" id="narrow-by-list" data-role="content" data-mage-init='{"accordion":{"openedState": "active", "collapsible": true, "active": false, "multipleCollapsible": false}}'>

this is the default accordion which is collapsible.


texts: Magento 2.3.* - Is there a js file that can be called on checkout success page to obtain order details?

texts:
I'm looking for a way to obtain details of the order placed on the checkout/onepage/success/ page using requirejs. I'm calling this using the block/widget method in Admin.
On the checkout page I had success with require(["Magento_Checkout/js/model/quote"], function(quote){ ... }); but I haven't found a way to get any data on the checkout success page.
Does anyone know if there is an existing js file in the Magento 2.3.* codebase that I can use that will give me details of the order that has just been placed on the success page? The minimum details I'd be after are the value of the order and the items on the order (the sku and the quantity of each item).
I know this could easily be done on success.phtml, but I'd prefer to set it up through Admin if possible.
Thank you


texts: How order save before payment in paypal express

texts: How order get saved before the payment completed in paypal express. I have an issue that is if a user left the website then no order information should save if transaction is not complete or may user left the order.


texts: How to Import new categories and products from one site to another without overriding the existing

texts:
I want to export the categories from live site and import into the development site in Magento.

I have followed the method to import through the default import/export via dataprofiles but it overrides the existing categories and products and their settings as well . I have products and categories on live db which I need to import into development db without overriding the existing products and categories on development site. Can anyone please help me out of it?

Thanks


texts: HTTPS SSL only on Checkout and Login, Not on all pages on Magento 2

texts:
When you put secure URLs on frontend to yes in Magento 2, it's now programmed to make all front end urls with https.

The website we have already had top rankings. We don't benefit from the SEO boost from https at this moment. And we know that when you change HTTP site to https, your rankings drop and it can take months before it recovers.

Now I'm upgrading from Magento 1 to Magento 2 and I only want the checkout in login pages to be HTTPS. (because Chrome en fire fox show "unsecure" which fears the client from logging in).

How can this be done? I feel Magento had to program the option for one to choose if they want only checkout, login or all pages instead of the following Google like slaves. The data shows, Google is lying about the fact that you don't have any SEO problems...

I have all position 1 rankings, even if it drops to  3 or 4 for 5 months...it hurts the business.

I hope someone can help me.

So by having only the important pages secure, the ranking's won't hurt and the client knows they are safe.


texts: observer method sales_order_place_after not executing

texts:
I am using magento 1.8.
I have requirement that need to save the order details in separate custom table.
for this I need to execute saveorder method using observer event sales_order_place_after But when I am clicking place order, My observer function is not executing,

My config.xml file content

    <?xml version="1.0"?>
<config>
    <modules>
        <Npm_Commission>
            <version>0.1.0</version>
        </Npm_Commission>
    </modules>
    <global>
        <events>
            <sales_order_place_after>
                <observers>
                    <npm_commission>
                        <type>singleton</type>
                        <class>Npm_Commission_Model_Observer</class>
                        <method>calculate_commission</method>
                    </npm_commission>
                </observers>
            </sales_order_place_after>
        </events>
        <resources>
            <commission_setup>
                <setup>
                    <module>Npm_Commission</module>
                </setup>
                <connection>
                    <use>core_setup</use>
                </connection>
            </commission_setup>
            <commission_write>
                <connection>
                    <use>core_write</use>
                </connection>
            </commission_write>
            <commission_read>
                <connection>
                    <use>core_read</use>
                </connection>
            </commission_read>
        </resources>
        <models>
            <commission>
                <class>Npm_Commission_Model</class>
                <resourceModel>commission_mysql4</resourceModel>
            </commission>
            <commission_mysql4>
                <class>Npm_Commission_Model_Mysql4</class>
                <entities>
                    <commission>

commission

                    </commission>
                </entities>
            </commission_mysql4>
        </models>
    </global>
</config>

my observer method

<?php
class Npm_Commission_Model_Observer extends Varien_Event_Observer
{
    public function saveorder($observer)
    {
        die('sales_order_place_after');
        $params = Mage::app()->getFrontController()->getRequest()->getParams();
        echo "
";print_r($params);die();
    }

If this information is not enough, add in comment for other part of code.
And suggest any other idea for this issue, Or my faults in this code.

Thank you friends:)


texts:
hope you can help, bit of a Magento newbie- I'm a bit confused with the websites/stores/storeviews setup.  What's the best way to configure this  :

4 retail stores (will grow to >10 in next 6 months)
each store has a different domain
all selling the same products at same price
using one payment gateway (payments to be manually reconciled every week)
each store has own logo, branding etc (header and footer)
each store has different about us, contact us, map

Thanks!


texts: Date format issue to save giftcard Lifetime in Magento 2

texts:
I am creating giftcard code programmatically. For this in vendor GiftCardAccount Module, the code is:

$model = $this->giftCAFactory->create()->setStatus(
            \Magento\GiftCardAccount\Model\Giftcardaccount::STATUS_ENABLED
        )->setWebsiteId(
            $data->getWebsiteId()
        )->setBalance(
            $data->getAmount()
        )->setLifetime(
            $data->getLifetime()
        )->setIsRedeemable(
            $data->getIsRedeemable()
        )->setOrder(
            $order
        )->save();

So in custom module I am creating as:

$model = $this->giftCAFactory->create()->setStatus(
                    \Magento\GiftCardAccount\Model\Giftcardaccount::STATUS_DISABLED
                )->setWebsiteId(
                    $this->_storeManager->getStore()->getId()
                )->setBalance(
                    $amount
                )->setLifetime(
                    $lifetime
                )->setIsRedeemable(
                    TRUE
                )->save();

Only Lifetime (ExpiryDate) is not saving correctly.

If I get LifeTime in timestamp as:

$lifetime = strtotime(date('Y-m-d').'+12 month'); //1605657600

then the saved date is any random date before 1999

If I get value for LifeTime as

$lifetime = date('18/11/2020');

Then ExpiryDate is not set and is shown as no expiry for that gift code.

How can I save correct date, I want to set expiry date, 1 year after the current date.

Edit:

As mentioned by @Sohel Rana, I created function to get date in vendor way which I tested by printing output and it works as:

 public function getLiftTime(){

    $currentDate = new \DateTime('now', new \DateTimeZone($this->_localeDate->getConfigTimezone()));
    $expirydays = 365;
    if (is_numeric($expirydays) && $expirydays > 0) {
        return $this->_localeDate->date(clone $currentDate)
            ->modify('+' . $expirydays . ' days')
            ->format('Y-m-d');
}
}

and called this function to setLiftTime as:

$model = $this->giftCAFactory->create()->setStatus(
                    \Magento\GiftCardAccount\Model\Giftcardaccount::STATUS_DISABLED
                )->setWebsiteId(
                    $this->_storeManager->getStore()->getId()
                )->setBalance(
                    $amount
                )->setLifetime(
                    $this->getLiftTime()
                )->setIsRedeemable(
                    TRUE
                )->save();

But with this way, the gift card is still creating without any expiry date. What is missing here ?


texts: Import related_skus in magento 2.3.5 problem

texts:
After upgrading Magento from 2.1.7 to 2.3.5, when making a manual products import through the admin, the related products are not attaching to the products, no errors are being shown.
I've tried importing a CSV in a the same format as the output of the manual admin products export CSV.
The related products column is "related_skus".


texts: I still have access to normal urls when rewrite urls is active

texts:
I have "URL Rewrite" active, and now I have access to URLs like "catalog/product/view/id/719/s/p-product1/" but I also have access to rewritten URL '/p-product1/'

how can I disable the normal URLs?


texts: Magento 2 show name instead of id in Layered Navigation

texts:
I'm using Magento 2, and on the category pages, on the left, where are listed all the subcategories, if I click on any of them, I get a link ending in: ?cat=id

If I try to follow the same path from the main menu, I get: /subcategoryname.html

Would it be possible to have it like that also on the layered navigation? I've been loking into magento files, and found this: /vendor/magento/module-layered-navigation/view/frontend/templates/layer/filter.phtml

with this part of code: <a href="<?= $block->escapeUrl($filterItem->getUrl()) ?>">

working out that link, it would be fine editing this, and how? or it would work better another way?


texts:
I had an error on starting cron job.
getting this error, now im unable to do anything in magento :(

Could not open input file: cron:run n:run

my cron job for magento is below,

* * * * * /usr/bin/php /var/www/time/bin/magento cron:run
* * * * * /usr/bin/php /var/www/time/update/cron.php
* * * * * /usr/bin/php /var/www/time/bin/magento setup:cron:run

whats wrong with this.?? kindly anyone help me.. to clear this error. :(


texts: Magento2 - Setup Compile Error - Class Not_Existing_Class does not exist

texts:
I installed magento 2 Community version successfully. Now when i try to upgrade the setup i get the error Please re-run Magento compile command.

So i ran the compile command

magento setup:di:compile

but i am getting this error

Area configuration aggregation... 5/7 [====================>-------]  71% 35 min
s 736.2 MiB

  [ReflectionException]
  Class Not_Existing_Class does not exist

  [ReflectionException]
  Class Not_Existing_Class does not exist

Any ideas as to how this can be resolved ?!

Thanks in advance.


texts: move discount section below the shipping div in checkout page

texts:
I want to move discount div to below the shipping method div. I tried it with xml. I tried it to move like this : <move element="checkout.discount" destination="checkout.cart.methods" after="checkout.cart.methods.onepage.bottom"/>
But it is not working.

Situation : Right now discount section is below the payment method and right side. It is default view.

What exactly I want : I want discount section below the shipping method. It will be middle of the page.


texts: Display Discount % when selecting some payment methods on checkout page (Onepage)

texts:
This is a very challenging thing for me. I gave up and I'm asking for help :)

How Do I Display the Discount % for some payment methods on the checkout (onepage)?

Customer sees:

Select your Payment Method:

Bank Transfer 3% Discount on your purchase
Credit Card
Check 3% Discount on your purchase
Purchase Order 3% Discount on your purchase

I have so far:

$...get Model
<?php if ($rule->getIsActive()) {
        echo $discount .'%'.' Discount on your purchase';
     } ?>

I need:

<?php if ($rule->getIsActive()) {
       if ($rule applies to bank_transfer, check memmo, purchase order ) {
        echo $discount .'%'.' Discount on your purchase';
     } ?>

How Do I apply this code to all payments at the same time without adding it to each payment.phtml file?

The Shopping Cart Rule has been set already. (RULE ID: 1)

I can just show a text with the message on each payment where the rule applies, but The rule changes sometimes and I don't want to change the text manually every single time. And i dont want to place the code on each payment.phtml file.
Thanks