texts:
I installed Magento on WAMP Server and I have PHP Fatal error:

  Fatal error: Allowed memory size of 805306368 bytes exhausted (tried to allocate 262144 bytes)

I tried to increase memory_limit to 1G in:

1) Wamp Server -> PHP -> php.ini

2) .htaccess in magento root folder

3) .user.ini in magento root folder

but it still doesnt work.

I also tried

  ini_set('memory_limit', '2048M');

in php file but it doesnt affect memory limit to.

When I run phpinfo() in magento root folder it shows
memory limit master value 1G but local value still 768M.

How can I force magento to increase that memory limit?


texts: 504 ERROR while run Order api in magento 2.3

texts:
I am trying to run order api for magento 2.3.4,
https://xysab.com/rest/V1/orders?searchCriteria[currentPage]=1&searchCriteria[filter_groups][0][filters][0][field]=customer_email&searchCriteria[filter_groups][0][filters][0][value]=abc@gmail.com

and getting the error like
504 ERROR
The request could not be satisfied.
 CloudFront attempted to establish a connection with the origin, but either the attempt
failed or the origin closed the connection. We can't connect to the server for this app or
website at this time. There might be too much traffic or a configuration error. Try again
later, or contact the app or website owner.
If you provide content to customers through CloudFront, you can find steps to troubleshoot
and help prevent this error by reviewing the CloudFront documentation.
Generated by cloudfront (CloudFront)
Request ID: wCtuNfGJa7CtoBPQl844VVc-Gl1IDmiHvUlLKb7l213yV9z9q9fGjw==

How to fix this?


texts:
I just updated to Magento 2.4, and I can't access my cart or checkout anymore. I see 500 errors, and a redirect to /noroute, bunt I can't figure out what's causing it.
Any way I can track this down further?


texts: Magento 2.3 reverts the DB update on static files deployment

texts:
Few customers of mine are complaining that every time they deploy the static files on Magento 2.3, the size of the column simple_action in the salesrule table goes back to the original value 32. (After being updated by a DB script of the extension to 255).

Has somebody encountered a similar issue? Since I didn't see that myself and I only rely on their words - maybe there is some other deployment process (a compilation?) that can cause it?

Any help is appreciated!


texts: Magento 2.3 Attempt to load value of nonexistent EAV attribute

texts: Can anyone help me to resolve this issue https://prnt.sc/omb7wd


texts: Magento1.9-Json Output for Category / Product

texts:
How can with a parameter in URL eg: "http://mage.test/product1.html?jf=true", get detail from Category or Product as JSON.
The product detail page has a few custom blocks (breadcrumb ..). I also need this data in the output.


texts:
I installed Magento 2.0.2 (latest) locally under XAMPP on Windows10 for developing purposes and it is very slow in admin interface.

Working on hardware: SSD, 16GB RAM, i7 CPU,
PHP ver. 5.6.8 - should I upgrade on PHP7?

Anybody know why its happenning ?

In configuration of Magento I can see there is
 Full-page Cache with options Built-in Application(default) or Varnish Caching,
should I install Varnish?

And Storage Configuration for Media
Media Storage File System(default) or Database - Which option is faster please?


texts:
I am overwriting my theme logo in my child theme with the default.xml file but the logo is not loading in the storefront.

This is my default.xml code:

<referenceBlock name="logo">
      <arguments>
         <argument name="logo_file" xsi:type="string">images/my-store-logo.jpg</argument>
         <argument name="logo_img_width" xsi:type="number">30</argument>
         <argument name="logo_img_height" xsi:type="number">30</argument>
      </arguments>
</referenceBlock>

My console shows following url for the image:

<img src="https://localhost/magento/pub/static/version1583882139/frontend/Custom/less/en_US/images/my-
store-logo.jpg" title="" alt="" width="30" height="30">

When i click on the above link it shows the following error message on the new page:

A symlink for "C:/xampp/htdocs/magento/app/design/frontend/Custom/theme-custom-
less/web/images/my-store-logo.jpg" can't be created and placed to
"C:/xampp/htdocs/magento/pub/static/frontend/Custom/less/en_US/images/my-store-logo.jpg".
Warning!symlink(): Cannot create symlink, error code(1314)

This is my store front view:

Thanks in advance.

Edit: This is my directory structure:


texts: Shopping Cart Rule Valid Only If No Other Coupons Active?

texts: I have a "free shipping" Magento shopping cart price rule that is active if the price is over $100.00. I have other coupons on the site, I want to make the free shopping valid only if no other coupon is used. How do I do this?


texts: Is there is a built in REST API for sign out in Magento because I looked in the reference and couldn't find?


texts: How to use custom variables in Magento 2?

texts: I have seen email templates to use built-in custom variables. Can someone explain how to use System -> Other Settings -> Custom Variables? For example category count, which will show in frontend.


texts:
I have a custom stock status attribute with 4 options.

array(
    4 => 'In Stock',
    3 => 'Soon',
    2 => 'Out Of Stock',
    1 => 'Discontinued',
);

I want change the way of price filter in layered navigation applied.
I want only products that has value "4" (In Stock) for stock status attribute displayed after applying price filter.

How can I do this?


texts:
I am missing the entire order review and submit order block (step 6 at checkout).
The section is just a blank empty DIV with nothing in it.

I am using a theme, but I never seen this problem with any theme so far.

The DIV is just empty:

Can someone help me out on this problem?
Its v 1.7.0.0 with "Madame Modern" theme.

Theme hints:

http://shrani.si/f/1k/sP/4dQZuDof/snapz-pro-xscreensnapz00.jpg

Google developer outputs on previous action:

http://shrani.si/f/2D/ol/v0Ekrdc/snapz-pro-xscreensnapz00.jpg
http://shrani.si/f/2o/sO/VCJEJdC/snapz-pro-xscreensnapz00.jpg

After enabling logging i get a system.log with:

2013-10-23T10:04:12+00:00 ERR (3): Warning: json_encode() [function.json-encode]: Invalid UTF-8 sequence in argument  in /home/ninocka/domains/*/public_html/lib/Zend/Json.php on line 146
2013-10-23T10:04:12+00:00 ERR (3): Warning: json_encode() [function.json-encode]: Invalid UTF-8 sequence in argument  in /home/ninocka/domains/*/public_html/lib/Zend/Json.php on line 146
2013-10-23T10:04:40+00:00 ERR (3): Warning: json_encode() [function.json-encode]: Invalid UTF-8 sequence in argument  in /home/ninocka/domains/*/public_html/lib/Zend/Json.php on line 146


texts: How to create a parent category dropdown in admin form in magento2.2

texts:
I want to create a drop-down field in admin UI-component form in magento2.(for getting parent category/post) How to do that

How to do that

Thanks


texts: Issues creating a widget with repeated functionality in Javascript

texts:
Have a controller class setup as a widget.  Labeled here as "buttonController".  I'm trying to call and instantiate an instance of the controller widget per each button.  Everything seemingly works, except that the loop apparently is not calling 3 instances, but resetting the same widget with the last bit of data.  Meaning the options are only being set as the last object in buttons.  Feel either you can not call the widget more than once, or my loop is not doing what I expect.  Any thoughts?

define([
    'jquery',
    'underscore',
    'buttonController',
    'jquery/ui',
    'jquery/jquery.parsequery'
], function ($, _, ButtonController) {
    'use strict';

    $.widget('mage.supplementalbuttons', {
        options: {
            spConfig: {},
            superSelector: '.supplemental-super-attribute-select',
            selectSimpleProduct: '[name="selected_configurable_option"]',
            state: {},
            containerSelector: '#supplemental-configurable',
            buttonSelector: '',
            formSelector: '#supplemental-configurable form',
            skuSelector: '.supplemental-sku',
            action: '',
            buttons: {}
       },

       /**
        * Creates widget
        * @private
        */
       _create: function () {
           // Initial setting of various option values
           this._initialize();

           $(this.element).trigger('supplementalbuttons.initialized');
       },

        /**
         * @private
         */
        _initialize: function () {
            var options = this.options;
            var element = this.element;
            var buttons = options.buttons;
            $.each(buttons, function(key, value){
              var buttonController = new ButtonController;
              var buttonSelector = "button#" + key + "-" + value.sku;
              buttonController.element = element;
              buttonController.options = options;
              buttonController.options.spConfig = value.spConfig;
              buttonController.options.action = value.action;
              buttonController.options.buttonSelector = buttonSelector;
              buttonController._create();
            });
        }

    });

    return $.mage.supplementalbuttons;
});


texts:
I am planning on a Magento Workflow for staging and live enviroment.

I want to use git for the filesystem. The workflow here is sorted already.

But how to manage Database modifications?

While on the live server there is new customer data I have new configuration & product data in the staging system. Is there any tool to resolve these conflicts?

I researched myself https://www.mysql.de/products/workbench/ is there a way to do it with this tool? Has anybody experience with that?


texts: Magento - Rating and Reviews - SQL Error

texts:
I'm having the following issue:

  SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or
  update a child row: a foreign key constraint fails
  (db12038032-fsm.rating, CONSTRAINT
  FK_RATING_ENTITY_ID_RATING_ENTITY_ENTITY_ID FOREIGN KEY
  (entity_id) REFERENCES rating_entity (entity_id) ON DELETE
  CASCADE ON UPDATE CASCADE), query was: INSERT INTO rating
  (entity_id, rating_code, position) VALUES (?, ?, ?)

It pops up when I want to create a "rating" (Admin > Catalog > Ratings > Manage Ratings). (! Might not be the correct English expressions !)

  Using Magento 1.9.1

Customers also can't add ratings in the frontend. There is also a error message like: "Review could not be transferred."

What I've already tried:

Magento DB-Repair-Tool
DROP TABLE rating, rating_entity.. and so
on > then Magento DB-Repair Tool

I already tried to come to know SQL Syntax better but this error message has so many hints so that I'm struggling on which point I should work on.
There might be any old module which makes some troubles, but I couldn't figure it out yet..

Your help is really appreciated!


texts: Can someone explain Magento 2 file execution

texts: I don't have knowledge in Magento 1. I have started to learn Magento 2, I want to know which file runs first when I go to: http://localhost/magento/mymodule


texts:
I need to add an attribute that allows multiple values - but not from a set of pre-selected values, not multiple select but multiple text fields.

One product, one or more values in the one field. These are for information/internal purposes so I cannot use something like "options" to store it.

This is to store the product rotations numbers from our warehouse, which can be several for some products. As we need to pass these on when sending the order to the warehouse, it would greatly simplify our lives to have them visible.

Product -> sku  -> rotation #1
                -> rotation #2
                -> rotation #3

I had a look at some of the native warehouse/stock modules but none of them seem to support the sku/rotation/stock model that warehouses use, if their screenshots and manuals are to be believed. If one did it, that would be my first choice.

The only multiple value attributes of that kind I could find are the media attributes but these are complicated by all the file, format etc. concerns so it is hard to see the structure on how to reproduce this. I think it'd need to have a custom attribute type created, with its own tables etc.

I have considered storing it all as xml or csv in one field but then I have to add code to pack/unpack this and it makes the whole thing a lot more work, especially when rotations disappear after being sold.

Anyone done this before? I'm looking at doing it the most standard way possible so the risk of it affecting other extensions is minimised.

I'm not really looking at tracking the stock per rotation as this would make it a much bigger project than I want to tackle. I just want the information.


texts:
I would like to duplicate the filters block content on layered category pages.
I'm using this code :

<referenceContainer name="category.product.list.additional">
    <action method="append">
        <argument name="block" xsi:type="string">catalog.leftnav</argument>
        <argument name="as" xsi:type="string">alias.name</argument>
    </action>
</referenceContainer>

but instead of duplicate the block it moves it to the new container and remove it from the left sidebar.

Thanks !


texts: Magmi product import with image attributes processor can't find images

texts:
When I do a magmi import all works excluding my images, I get the error:
"M0467-RS.jpg cannot be found in images path"

I have put them in media/import of the root magento installation and the Filesystem Path to magento directory is correct.

In the config of image attributes processor I have put media/import
also tried /media/import and /media/import/.

The directory and all subdirectories of media are 777

I have tried saving the .csv in notepad++ to make sure encoding is correct.
I have checked filenames in the .csv

the .csv has columns image, thumbnail, small_image and media_gallery and these are populated with images respectively:

M0467-RS.jpg

M0467-RS.jpg

M0467-RS.jpg

M0467-HS.jpg;M0467-RS.jpg;M0467-SW.jpg;M0467-CL.jpg;M0467-EX.jpg

the file M0467-RS.jpg definitely exists as I can see it in FTP and access it via URL.

despite all of this magmi STILL can't find the images (M0467-RS.jpg cannot be found in images path).

I am using magmi version 0.7.23
and magento version 1.9.x


texts: Magento 2 : Getting issue during added non-visible product to cart through observer?

texts:
For this, I use below event observer

    <?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="checkout_cart_product_add_after">
        <observer name="servicefee" instance="deca\Servicefee\Observer\AddFeeProduct" />
    </event>

</config>

And below is my observer code
`

<?php
namespace deca\Servicefee\Observer;

use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\App\RequestInterface;
use deca\Servicefee\Helper\Data as servicefeeHelper;

class AddFeeProduct implements ObserverInterface
{
    protected $_productRepository;
    protected $_cart;
    protected $formKey;
    /**
    * @var servicefeeHelper
    */
     protected $servicefeeHelper;

    public function __construct(
      \Magento\Catalog\Model\ProductRepository $productRepository,
      \Magento\Checkout\Model\Cart $cart,
      \Magento\Framework\Data\Form\FormKey $formKey,
      servicefeeHelper $servicefeeHelper
     )
   {
        $this->_productRepository = $productRepository;
        $this->_cart = $cart;
        $this->formKey = $formKey;
        $this->servicefeeHelper = $servicefeeHelper;
    }
    public function execute(\Magento\Framework\Event\Observer $observer)
    {

        $serviceFeeSku = trim($this->servicefeeHelper->getServiceFeeUPC());
        $item = $observer->getEvent()->getData('quote_item');
        $product = $observer->getEvent()->getData('product');
        $item = ($item->getParentItem() ? $item->getParentItem() : $item);
        $_product = $this->_productRepository->get($serviceFeeSku);

        //  Check to see if item is already in the cart
        $arrProdIds = $this->_cart->getQuoteProductIds();
        $serviceFeeProdID = $_product->getEntityId();
        foreach ($arrProdIds as $key=>$value)
        {
            if ($key == $serviceFeeProdID)
            {
               return;
            }
        }

        // Enter the id of the prouduct which are required to be added to avoid recurrsion
        if($product->getId() != $serviceFeeProdID){
            $params = array(
                'product' => $serviceFeeProdID,
                'qty' => 1
            );

            $this->_cart->addProduct($_product,$params);
            $this->_cart->save();
        }

    }
}

Then I tried to add any product but whenver I click to addtocart button it redirects to the non-visible product URl with 404 error. Product also not added to the cart.Can anybody help me to understand my issue?


texts:
We just came across this issue where the catalog_search indexer was stuck and I just do what I always do reset the indexer and re-index it.
however, This time we received this error:
We double checked the product, could not see any issues, so we deleted it in case we have done something wrong when we crated the product, even it is a long time we did.
Then we received this error when i tried to reindex again:
The Product with the "754.961.1016 THU754002" SKU doesn't exist.


texts: Magento 2.1.7(With Sample Data) Installation error at 65%

texts:
After the installation process, 65 % completed, the Magento 2.1.7 not processing. How can i solve the error.

Note: Using Xampp


texts: I have created A new sample REST Api to GET method, Giving Consumer is not authorized to access the resource error

texts:
As I have created a New sample REST Api Call to method GET please look below details

etc/webapi.xml

<?xml version="1.0"?>
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
    <route url="/V1/hello/name/:name" method="GET">
        <service class="Magestore\Magento\Api\HelloInterface" method="name"/>
        <resources>
            <resource ref="anonymous"/>
        </resources>
    </route>
</routes>

etc/di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magestore\Magento\Api\HelloInterface"
                type="Magestore\Magento\Model\Hello" />
</config>

Api/HelloInterface

<?php
namespace Magestore\Magento\Api;

interface HelloInterface
{
    /**
     * Returns greeting message to user
     *
     * @api
     * @param string $name Users name.
     * @return string Greeting message with users name.
     */
    public function name($name);
}

Model/Hello.php

<?php
namespace Magestore\Magento\Model;
use Magestore\Magento\Api\HelloInterface;

class Hello implements HelloInterface
{
    /**
     * Returns greeting message to user
     *
     * @api
     * @param string $name Users name.
     * @return string Greeting message with users name.
     */
    public function name($name) {
        return "Hello, " . $name;
    }
}

As you can see the below image giving me the consumer is not authorized to access the resource as, the resource type is anonmoys.

Please can anyone help me to solve these,or else give me idea to resolve this.
Advance thanks.


texts: Magento 2.1 - How to toggle display of field on checkout?

texts:
I've created a custom dropdown "Is this a business address?" on the shipping address step of the Magento 2.1 checkout.

I'd like to hide the company field on the form until the user selects yes, then show it. If the user changed the dropdown to No, it would empty and hide the Company field.

Been going around in circles on this for quite a while now, so any help would be greatly appreciated!


texts: Widget dependency doesn't work for chooser fields

texts:
I have one yes/no select field in a widget.xml

If "yes" was selected then category select field should be visible.

But category select field always visible instead. That's wrong.

Here is my widget.xml:

<select_category_type translate="label description">
    Select categories
    <visible>1</visible>
    <type>select</type>
    <values>
        <item0 translate="label">
            <value>0</value>
            No
        </item0>
        <item1 translate="label">
            <value>1</value>
            Yes
        </item1>
    </values>
    <sort_order>25</sort_order>
</select_category_type>

<selected_category translate="label">
    <visible>1</visible>
    <required>1</required>
    Select categories
    <type>label</type>
    <helper_block>
        <type>av_widget_product_featured/catalog_chooser</type>
        <data>
            <button translate="open">
                 <open>Select Categories...</open>
            </button>
            <use_massaction>1</use_massaction>
        </data>
    </helper_block>
    <depends>
        <select_category_type>
            <value>1</value>
        </select_category_type>
    </depends>
    <sort_order>30</sort_order>
</selected_category>


texts: Whats the best way to get Cart ID from Mageno2 Checkout

texts:
I am trying to get the cart_id in my controller but it seems to only be available on the frontend in knockoutjs.

Does anyone know how to access this value which is an alpha numeric string used to place and order when calling GuestPaymentInformationManagement it passes $cart_id as a variable to the savePaymentInformationAndPlaceOrder function but I cannot find this variable in the backend but it is available on the frontend checkout as quote.quoteId() But I need to get this item in the backend if anyone knows how I'd really appreciate it.

$cart_id = 'd8sXVE1acGcxJpNnleA3e2gkSq6Zo4ae'


texts: All form submitted without trigger js validation on first time load with browser empty cache

texts:
I am facing some weird problem on my site.

When i try to reload with empty cache then all the form submitted without triggering js validation.
https://prnt.sc/ov6tk0

after first submit it start triggering validation.

You can check this http://87.117.250.80/~intermedical/ here

On homepage there is contact form near footer.

This is also happen in login/register form

can anyone please guide me on this.


texts: Magento 2 Pre-Order instead of Add to Cart

texts: I need to be able to change the "Add to Cart" button to "Pre Order", or "Learn More", depending on a custom product attribute, release date.  Any help will be appreciated.


texts:
Can someone please give a noob tutorial, step by step how to run php scripts. I need to run the script located here: Categories - how to display in alphabetical order? (Programmatically)
But I cannot find anywhere on the internet, how to run this script. From what I understand you make a .php with the script in it. But what then? how do you run? through putty? through the browser?? can someone give specific instructions how this works. Tell me it like im 5 years old. Thank you.


texts:
I have add +21 qty to product out of stock. After reindex still I see saleable qty -10 and product is not available on sale in frontend. https://prnt.sc/tg1ggg
Anysolution?


texts:
I trying to patch 1.9.2.1 from supee-752 to supee-10888 and getting next error:

Cant find the any solution. Any ideas?


texts: Remove added to cart message in Magento 2

texts: I want to remove the Success message when adding to cart. Right now when you click on the Add to Cart button it displays a message of Successfully added <product> to cart but I don't want to display this. Is there a way to achieve this?


texts: Add custom field to product quote on Magento 2

texts:
I have added some inputs to product form, when user select parameters, they generate string with id at the hidden input. Now I need to send this id to user cart, when product added to cart, and than to order.

I has found solution extend catalog_attributes.xml and quote_item with observer. But when I add product, I didn't see in checkout.Is this a correct way?


texts: How to disable an event observer defined by default in Magento2

texts:
I would like to disable an event observer attached to certain event in default magento.

The Magento\Bundle\Observer\AppendUpsellProductsObserver observer is attached to the event catalog_product_upsell which I want to disable as it is showing products I don't want to show in Upsell.


texts: Magento 2.3 + store pickup : main.CRITICAL: Unable to resolve the source file

texts:
I am locked, i have the following error :

  main.ERROR: Unable to resolve the source file for
  'frontend/WEB/website/en_US/Magestore_Storepickup/css/bootstrap/bootstrap.css.map'
  [] [] main.CRITICAL: Unable to resolve the source file for
  'frontend/WEB/website/en_US/Magestore_Storepickup/css/bootstrap/bootstrap.css.map'
  []

I don't understand this error because bootstrap.css.map is nowhere called in the source code according to VScode search.
Does someone had the same problem ? how did you solved it ?


texts: How to change CSS for specific category item?

texts:
I am trying to change the css style of a specific item in my menu. My HTML code is this:

And the CSS I am trying (that probably needs tweaking) is this:

.nav-primary li.level1.nav-4-1 first {
color: #000;
}


texts: Getting issue in Moneris Payment method magento 2

texts:
I have installed http://www.collinsharper.com/modules/magento-2-0/magento-2-moneris-payment.html on the website. But we are getting an error like this:

1 exception(s): Exception #0 (LogicException): Front controller reached 100 router match iterations

Exception #0 (LogicException): Front controller reached 100 router match iterations
#0 /vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#1 /vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#2 /vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(94): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#3 /vendor/magento/framework/Interception/Interceptor.php(135): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#4 /vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(69): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#5 /vendor/magento/framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#6 /vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#7 /generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, NULL)
#8 /vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#9 /generated/code/Magento/Framework/App/Http/Interceptor.php(24): Magento\Framework\App\Http->launch()
#10 /vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http\Interceptor->launch()
#11 /index.php(42): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#12 {main}

Can anyone suggest the solution?


texts:
This is an odd question, as it's something I've done countless times in the past. I'm simply running a query and returning a single result using fetchOne(), and then using the result in a new query. The issue here is that the query isn't reading the result, despite the result being there.

The two queries:

$current_order_query = "SELECT billing_name FROM $table WHERE customer_id = 7324 ORDER BY increment_id DESC LIMIT 1";
$current_billing_name = $readConnection->fetchOne($current_order_query);

$second_query = "SELECT billing_name FROM $table2 WHERE billing_name LIKE '$current_billing_name'";
$second_billing_name = $readConnection->fetchOne($second_query);

What's confusing me, even more, is that I can simply echo the $current_billing_name and it returns the result just fine as a string. I tried manually entering a string into the second query to see if it was that, but the query worked then. The first query is indeed returning the result correctly, but the second query is simply not taking it.

(The purpose of the queries is to find the billing name of the current order, and then run a check for matches in a custom blacklist)

Hopefully, someone can spot something I'm completely overlooking before I pull the rest of my hair out.

EDIT:

if(!$second_billing_name){
    // Nothing found, continue to next thing
} else {
    // Billing name found in the blacklist, email admin
}


texts: How to Create 40% Off Promo for a Certain Category of Products?

texts: I'm trying to create a promo for 40% off on products in a certain category. I'm having difficulty limiting the discount to the categories I want. When I apply the coupon to the cart, the discount is being applied to all products in the cart, not just the categories I want. Here is a screenshot of my setup, I'm using Magento 1.9.3.4. The categories I want the discount to apply to are 165, 166, 167, 168, 169.


texts:
I need to know the magento version at the time of installing. However, I can able to get the current magento version. But i cannot get the origin version of magento.

Is it possible to get it? If yes, please tell me how to get it.


texts: Magento 2.5: Uncaught SyntaxError: Unexpected end of JSON input in checkout page

texts: I have an error in my checkout page of Magento 2.2.5 image loader loading continuously in checkout page.Show error in console of google chrome


texts:
How can we get the second last url in Magento 1.9?

I currently use this: <?php echo Mage::getSingleton('core/session')->getLastUrl();?> To get the last URL.

But I want to get the second last URL after adding a product to the cart. Because the code above give in that case the url to add the product to the cart.

How can I get the url before that, so the second last?


texts: How to change color of specific element of applied theme

texts: How to change the color of the specific font, element of the applied theme in Magento2 on the server. Is it is required to open theme file and then edit, or there are some other alternatives?


texts:
I am trying to override below file:

/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid.php :

class Mage_Adminhtml_Block_Newsletter_Subscriber_Grid extends Mage_Adminhtml_Block_Widget_Grid
{
   ...
   protected function _prepareColumns()
   {

      $this->addColumn('subscriber_id', array(
         'header'    => Mage::helper('newsletter')->__('ID'),
         'index'     => 'subscriber_id'
      ));

      /* Need to add own cloumn */

   }
   ....
}

Here is what I am trying to do with custom module:
/app/code/local/Customletter/Phone/etc/config.xml:

<?xml version="1.0"?>
<config>
        <modules>
            <Customletter_Phone>
                <version>1.0.0</version>
            </Customletter_Phone>
        </modules>

    <global>

       <blocks>

             <phone>
                <class>Customletter_Phone_Block</class>
             </phone>

             <adminhtml>
               <rewrite>
                     <subscriber_grid>
                         Customletter_Phone_Adminhtml_Block_Newsletter_Subscriber_Grid
                     </subscriber_grid>
               </rewrite>
             </adminhtml>

      </blocks>

     <resources>
        <customletter_phone>
            <setup>
                <module>Customletter_Phone</module>
            </setup>
            <connection>
                <use>core_setup</use>
            </connection>
        </customletter_phone>
    </resources>

    </global>

</config>

/app/code/local/Customletter/Phone/Adminhtml/Block/Newsletter/Subscriber/Grid.php:

class Customletter_Phone_Adminhtml_Block_Newsletter_Subscriber_Grid extends Mage_Adminhtml_Block_Newsletter_Subscriber_Grid
{

   protected function _prepareColumns()
   {

     $this->addColumn('customletter_phone', array(
        'header'    => Mage::helper('newsletter')->__('Customer Phone Number'),
        'index'     => 'customletter_phone',
        'default'   =>    '----'
    ));

        return parent::_prepareColumns();
  }
}

Problem: In Newsletter Subscribers grid Customer Phone Number not showing up.

I am using magento 1.9.2.4.


texts: Different header (Abstract.php) for invoice and credit memo

texts:
Is it possible, and how if it is, to have different header for pdf invoice and pdf credit memo.

In other words is it possible to have separate Abstarct.php. One for pdf invoice and other for pdf credit memo.


texts:
I am using Magento 2 and I want to display 5 level of categories.

(1)Shop->(2)shop->(3)audio->(4)Test->(5)test1

I tried below code but 5th level of categories is not display accurate :

public function simpletMenu($category)
    {
        $categoryHelper = $this->getCategoryHelper();
        $catHtml = '';
        // 2nd Level Category
        if ($childrenCategories = $this->getChildCategories($category)) {
            $catHtml .= '
';
            foreach ($childrenCategories as $childCategory) {
                $collection_sub = $this->getChildCategories($childCategory);
                if (count($collection_sub)) {
                    $arrow = '';
                } else {
                    $arrow = '';
                }
                $catHtml .= '
getCategoryUrl($childCategory).'">'.$childCategory->getName().$arrow.'';

                    // 3rd Level Category
                    if (count($collection_sub)) {
                        $catHtml .= '
';
                            foreach ($collection_sub as $childCategory2) {
                                $collection_sub_sub = $this->getChildCategories($childCategory2);
                                if (count($collection_sub_sub)) {
                                    $arrow = '';
                                } else {
                                    $arrow = '';
                                }
                                $catHtml .= '
getCategoryUrl($childCategory2).'">'.$childCategory2->getName().$arrow.'';

                                // 4th Level Category
                                if (count($collection_sub_sub)) {
                                    $catHtml .= '
';
                                        foreach ($collection_sub_sub as $childCategory3) {
                                            $collection_sub_sub_sub = $this->getChildCategories($childCategory3);
                                        if (count($collection_sub_sub_sub)) {
                                            $arrow = '';
                                        } else {
                                            $arrow = '';
                                        }
                                            $catHtml .= '
getCategoryUrl($childCategory3).'">'.$childCategory3->getName().$arrow.'';

                                    // 4th Level Category
                                    if (count($collection_sub_sub_sub)) {
                                        $catHtml .= '
';
                                            foreach ($collection_sub_sub_sub as $childCategory4) {
                                                $catHtml .= '
getCategoryUrl($childCategory4).'">'.$childCategory4->getName().'
';
                                             }
                                        $catHtml .= '
';
                                    }
                                            $catHtml .= '
';
                                         }
                                    $catHtml .= '
';
                                }
                                $catHtml .= '
';
                             }
                        $catHtml .= '
';
                    }
                $catHtml .= '
';
            }
            $catHtml .= '
';
        }
        return $catHtml;
    }


texts: My URL for payment notification result 404

texts:
I have problem with notifications URL in my custom payment gateway.
I have Urlnotification class under Block folder where I put
namespace MyPayment\MyGateway\Block;

use Magento\Config\Block\System\Config\Form\Field;
use Magento\Framework\Data\Form\Element\AbstractElement;

/**
 * Class Urlnotification
 *
 * @package MyPayment\MyGateway\Block
*/

 class Urlnotification extends Field {

     /**
      * @param AbstractElement $element
      *
      * @return string
     */
     protected function _getElementHtml(AbstractElement $element) {

          return $this->getBaseUrl() . 'mypayment/mygateway/response';
     }
 }

Under 'Controller' folder I have subfolder 'Response' with 'Index.php' class where I have all logic to handle reciving POST request with data to manipulating transaction / payment.
When I testing it local via Postman everything works fine - I make POST request on URL (http://my.localhost/index.php/mypayment/mygateway/response) with necessary form-data but when I try to test it on remote server I have always 404, no matter what URL I requested for example: http://mysite/index.php/mypayment/mygateway/response or http://mysite/mypayment/mygateway/response
What I'm doing wrong?
EDIT I found out I can recive POST request, only problem is 'session_id' in POST form-data, without it all works fine, but I have to handle param like 'session_id', this is what external API sent, I can't change it


texts: Magento 1.9 - how to send custom email if order status pending more than 2 days?

texts:
I have event observer for getting order status,

How can i send custom email if order status pending more than 2 days.

eg:

  Company Logo::
  Dear {{customer name}}, Your order pending more than 2
  days, any issue let us know.
  Thank you.

Event-observer :

https://github.com/ZusZus/Order_Status_Monitor/tree/master/Order_Status_Monitor/app


texts: product detail page join table with catalog/product and cataloginventory/stock_item in catalog/product table not working

texts:
i want current product of categories display product in magento.

I Write code for that but it give nothing page in balnk it's give 500 intervel error

$products =  Mage::getModel('catalog/product')->getCollection();;
$products->joinField(
    'qty',
    'cataloginventory/stock_item',
    'qty',
    'product_id=entity_id',
    '{{table}}.stock_id=1',
    'left'
);
$products->joinField('category_id',
    'catalog/category_product',
    'category_id',
    'product_id=entity_id',
    null,
    'left'
);

$products->addAttributeToFilter('category_id', array('in' => $category_ids));

foreach ($products as $product) {

    echo $product->getId()."
";
    echo $product->getQty()."
";

}

?>

when categoryids add multiple id then 500 intervel server error. not get proper result please give proper query.
my $categoryid = Array ( [0] => 5 [1] => 6 [2] => 16 [3] => 23 [4] => 25 [5] => 27 [6] => 36 )


texts: Magento 2 how to show another text if price is > 2000?

texts:
I want to show custom text instead of the price if the product price is > 20000.

if price > 20000 then I want to show "contact for price" instead of price.

Also, I need to hide the add to cart button as well.

How can I achieve this functionality?

I am using Magento 2.3.3

if anyone has any idea about it please share!

Thanks in advance.


texts: Changed every possible .phtml file containing minicart and changes still don't show on frontend?

texts:
version: Magento 2.3.5-p2 CE
I am modifying and translating custom theme. So I wanted to translate  magento 2 minicart button that says go to checkout. But here is how I failed, or what I tried in exact order:

Translated in my translation module. BTW part of minicart, the other buttons, are translating fine with just the translation module.
Translated in themes .phtml
Translated in core .phtml. I know we should not do this, but for testing purpose I think its fine.
Checked if there are inline translations. There are none.
Double checked in phpstorm search if it is used in some other file. It is not.

Also after every step I did this
bin/magento setup:upgrade && bin/magento setup:di:compile && bin/magento setup:static-content:deploy && bin/magento c:f

I know magento is complex, but this is nutz.


texts: Magento 2 PHPMD and Coupling Between Object classes (CBO)

texts:
I'm working on a Magento 2 CRUD functionality following the best practices (best described here). On the project I'm working on we are using PHPMD (php mess detector). Among other rules, we have the CBO limit set to 13 (which I understand is the default). My repository is implementing the get, save, getList, delete, deleteById methods and the limit is already 12.

What would be best practice if I need to add other methods to this repository without overlapping the PHPMD CBO limit? Should I break the repository in multiple ones? If so how would a directory and file naming and structure would look?

P.S. I understand that helper classes are no longer encouraged in Magento 2.


texts: Can i set blank value for price if there is configurable product?

texts:
I have the configurable products by sizes and i want to not display price at the beginning but if choose or select by size then only display the price. And if there is single product then price will display at the beginning.

Can i edit jquery for price and how can i edit ? Please suggest me !


texts: How to change recurring profile page query (which gets all data)?

texts:
I want to order the recurring profiles table data by productname and order state.
The table is currently ordered by order date.
The only option I have is change the query in the back-hand.
How do I do that and where do I find that?


texts: How to override model-popup.html magento 2.4.0

texts:
How to override modal-popup.html h1 tag replace span tag.

vendor/magento/module-ui/view/base/web/templates/modal/modal-popup.html

        <h1 id="modal-title-<%- data.id %>" class="modal-title"
            data-role="title">
            <% if(data.title){ %>
                <%= data.title %>
            <% } %>

            <% if(data.subTitle){ %>

                <%= data.subTitle %>

            <% } %>


texts: How to hole punch a child block added inside catalog/product/list block

texts:
Scenario:

I have category landing page, in which another vendor has customized to add "Purchased" text instead of "Add to cart" in case the user has purchased it, hence this will be different for each user.

All iz well till now, until we turned on "The" FPC.

While I understand Holepunching a little better now I had this plan:

My Plan:

We keep rest code in list.phtml as the same.
I just cut the logic of the showing of the "Add To Cart" or "Purchased" and put it in another phtml.
I would add this new block as the child of catalog/product/list block in the catalog.xml with this new phtml.
Have a container model responsible for the _renderBlock. We say _saveCache false for this block and it would not be cached.

Question / Difficulties

I am not really aware of the exact implementation for this plan.
For step 4 what should be the implementation of _renderBlock like ?
How whould I get the productobject inside this phtml ? as The list.phtml works on the productCollection and we just loop over this and get product object. now, how does one get the project object now in the child block ?
I need a few pointers on how this can be done best. while I read about a product view page holepunch method I am not exactly sure how to do this for category page.
If nothing works I just want FPC to not cache the list block at all , but again not sure how to disable caching for only this block ?


texts:
I don't see any options to reindex from backend.

Will it always have to be done via ssh? This is a big pain because our store owners should have the option to reindex from backend, we don't want to fix it for them every time there is an index issue.

So my question: is this a bug to be fixed or is it a design decision and live with it?
https://github.com/magento/magento2/issues/1075

What about if you don't have crons on your server like many small clients do?


texts: Product images aren't showing in mobile view in magento 2.2

texts:
Product Images aren't showing on the product page in mobile view.
I am not able to find out what is the issue.

How to solve this.


texts: Saving product images include previous product's images

texts:
I'm uploading images on this first product and everything seems fine.

However, when I do the same process for the second product, some images from the first product weirdly appears on the second one.

I wonder if this is related to Redis cache, or due to multiple products on Edit Product page on different browser tabs.

Thanks.


texts: Magento getting different results for sales order reports

texts:
I am checking magento sales order reports. When I add the same date range in reports and sales order grid (purchased date). But I am getting different result for them.

Can anyone tell me what is the reason for this and what I can do to solve the issue.

Thank You


texts: Subcategory product image and link not showing on display block

texts:
I have created a subcategory called Housekeeping Uniforms and divided into two more subcategories - Stock Housekeeping Uniforms and Custom Housekeeping Uniforms.
Both subcategories show on the category tree on the front end, but only the image and link of the Stock Housekeeping Uniforms subcategory shows on the Display block.

The link to the page is:
https://www.jauniforms.com/products/housekeeping-uniforms.html

I have a mirror subcategory on the site on a different page and this page show both images on the display block.

https://www.jauniforms.com/products/hotel-uniforms/housekeeping-uniforms.html

Any advise on how to make this work. Thank you!

We work on magento 1.9 version


texts: Magento 2.3.1 media urls in custom attribute of text editor type displaying as text

texts:
I've created a product attribute to display content in the product tabs which is specifically for technical drawings. The attribute is set as text editor type.

When I add an image using the "insert image" button the code is correct, as follows:

However, this doesn't display on the frontend, it is outputting as text:

Does anyone have a fix for this?


texts: Magento 2: How to remove add to cart template from product detail page

texts: I have to remove add to cart button from product detail page when product store has 0. How to achieve this


texts: Varien/SimpleXML/Config.php errors in system.log

texts:
I'm seeing weird errors in my system.log:

2014-12-01T13:35:05+00:00 ERR (3): Warning: simplexml_load_string(): Entity: line 47: parser error : Opening and ending tag mismatch: config line 1 and default  in /var/www/magento.live/htdocs/lib/Varien/Simplexml/Config.php on line 383
2014-12-01T13:35:05+00:00 ERR (3): Warning: simplexml_load_string(): eMonitoring_Model_Widget_Log_Tail></widgets></global></magemonitoring></default>  in /var/www/magento.live/htdocs/lib/Varien/Simplexml/Config.php on line 383

Not being new to troubleshooting Magento errors I started disabling the module I suspected causing the trouble, clearing the cache and checking the log again. Now the same error appears, yet points to another module.... Disabled that and guess? ... Yup. The error still appears.

I had success before dealing with XML-validation errors by checking if all Magento XML files are valid or not:

find . -name "*.xml" -type f -exec xmllint --noout '{}' \;

This told me that all XML files in the Magento folder structure are valid. Yet apparently Config.php still chokes on this error.

Anybody a clue on how to troubleshoot further?


texts: whislist only show one item on Magento 1.7 and 1.8 too

texts:
I am currently using one theme on 1 website and 4 store views. My issue is Wishlist only shows one item every time.

I found a possible solution in this:
posthttp://www.magentocommerce.com/boards/viewthread/291225/, but you have to modify the Core, which is not a good idea.

I had read in any website, which after the upgrade to version 1.8 Magento, could fix but so far nothing. I tested this on several themes that I have installed with same results.

Where could be the problem for this?

Thanks in advance


texts:
According to Magento2 Doc By default, when you install a package, Composer puts it into vendor/<package> directory, such as vendor/magento-module-catalog. However, the Magento framework requires Magento components to be in different locations, such as app/code/Magento/Catalog. The process of copying or moving contents of packages from default to the necessary location is called marshalling.

What is the benefit of copying it into vendor/<package> first and then moving it into something like app/code/Magento/Catalog ?


texts: Replacing Magento 1 Controller Rewrites in Magento 2

texts:
Is there any general consensus on the best way to replace M1 style controller rewrites in M2?

That is, in Magento 1, you could rewrite a URL path to point to controllers from your own module

<rewrite>
    <foo>
        <from><![CDATA[#^/address/#]]></from>
        <to>/customer/address/</to>
    </foo>
    <bar>
        <from><![CDATA[#^/account/#]]></from>
        <to>/customer/account/</to>
    </bar>
</rewrite>

This quickly fell out of fashion and wasn't ported to Magento 2.

Is there any general consensus on "the right" way to have URLs already claimed by Module A point to controllers in Modules B?


texts: REST /customers/me does not return extension_attributes

texts:
According to the interface \Magento\Customer\Api\Data\CustomerInterface my response should return the extension_attributes, but it doesn't

Magento 2.2.3 CE


texts: Magento 2 - How to get current payment method which was selected

texts: In Magento2, how to get current payment method which was selected on the overview checkout? Thanks!


texts: Adding block on Product detail page causing problem for notification appearance (product successful added notification)

texts:
I have added a block

<block class="Magento\Review\Block\Form" name="product.review.form" as="review_form"></block>

Now after adding its working fine but  now after adding product its not showing  green notification which let me know product added successfully.

full code of  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>

        <referenceBlock name="product.info.details">
            <block class="Magento\Catalog\Block\Product\View" name="highlight.tab" template="Pakgentors_Jblashes::product/highlight_tab.phtml" after="product_cms_block2" group="detailed_info" >
                <arguments>
                    <argument translate="true" name="title" xsi:type="string">Highlights</argument>
                </arguments>
            </block>
            <block class="Magento\Catalog\Block\Product\View" name="how_to_use.tab" template="Pakgentors_Jblashes::product/how_to_use.phtml" after="highlight.tab" group="detailed_info" >
                <arguments>
                    <argument translate="true" name="title" xsi:type="string">How to Use</argument>
                </arguments>
            </block>
        </referenceBlock>

        <referenceBlock name="page.main.title">
            <block class="Magento\Catalog\Block\Product\View" name="custom_size_attr.tab" template="Pakgentors_Jblashes::product/prod_size_option.phtml">
            </block>
        </referenceBlock>
<!--
        <referenceBlock name="product.info.description">
            <action method="setTitle">
                <argument name="title" xsi:type="string">How to Use</argument>
            </action>
        </referenceBlock> -->

        <referenceContainer name="product.info.stock.sku" remove="true" />
        <referenceBlock name="view.addto.compare" remove="true" />
        <referenceBlock name="product.info.mailto" remove="true" />

        <referenceBlock name="reviews.tab" remove="true" />
        <move element="product.info.price" destination="page.main.title" />
        <move element="product.info.overview" destination="product.info.main" before="-" />

        <!-- product.info.main,product.info.review,product.info.overview,product.info.price,product.price.final -->

        <referenceContainer name="content">
            <container name="product.info.jbreviews" htmlTag="div" htmlClass="product info detailed" after="-">
                <block class="Magento\Review\Block\Form" name="product.review.form" as="review_form">
                    <container name="product.review.form.fields.before" as="form_fields_before" label="Review Form Fields Before" htmlTag="div" htmlClass="rewards"/>
                </block>
                <block class="Magento\Review\Block\Product\View\ListView" name="product.info.product_additional_data" as="product_additional_data" template="product/view/list.phtml"/>
                <block class="Magento\Theme\Block\Html\Pager" name="product_review_list.toolbar"></block>
            </container>
        </referenceContainer>

    </body>

</page>


texts: Magento : Do not want to Load Calendar CSS or Merge with All CSS Files

texts:
I am try to get rid of calendar.css file, because I don't use dates anywhere. When I set merge css files from admin, calendar file still loaded separately.

I am just wondering, How can get rid of it completely?

Yes, I could just delete the code but browser still makes 1 extra request to load the blank file.

Magento: 1.9

/js/calendar/calendar-win2k-1.css


texts:
I have a project in Magento 2.3 in live and the same files in local. In live the create customer account is working fine but in local the button does nothing on click. I have tried to pinpoint the issue and from much trial and error I have found disabling the following lines at least enabled the button.
However disabling this code also seems to disable the validation and this code is from require.js inside lib folder. I have not found any cases before and I have already tried compiling and deploying.


texts: Magento : Create Layered Navigation API to Show Attributes

texts:
I want to fetch these attributes of layered navigation using REST API.

Provide me suitable solution.


texts: Set SKU automaticaly in multi vendor website

texts:
I extended my Magento website with a multi vendor module.  Vendors are having problems assigning SKU numbers while creating new products because it often happens that the choosed SKU has already be used by an other vendor.
Is there a way to assign SKU# automatically without vendors having to do it manually? For example assigning as SKU# the same ID# of the product?


texts: Get the admin's system.xml file data on front-end block file

texts:
I have added input box in admin's system.xml along with other fields as below:

<field id="mapping" translate="label comment tooltip" sortOrder="80" showInDefault="1" showInWebsite="1" showInStore="0">
  <label>Exclude Days</label>
    <frontend_model>VENDOR\DeliveryCountdown\Block\Adminhtml\System\Config\Form\Field\excludeDays</frontend_model>
       <backend_model>Magento\Config\Model\Config\Backend\Serialized\ArraySerialized</backend_model>
         <comment>
           <![CDATA[Add bank holidays that are not included in delivery / cut off times.]]>
          </comment>
            <tooltip>Delivery and cuttoff not include these days.</tooltip>
</field>

This display in admin as:

I can add many input boxes by clicking ADD button. Below is code to receive input dates of above form:

  $offDays =
  $this->scopeConfig->getValue('deliverycountdown/general/mapping',
  \Magento\Store\Model\ScopeInterface::SCOPE_STORE);

But output is as below:

  a:3:{s:17:"_1509434435073_73";

  a:2:{s:6:"field1";s:4:"AAAA";s:6:"field2";s:10:"2017-11-01";}s:18:"_1509434856288_288";

  a:2:{s:6:"field1";s:4:"BBBB";s:6:"field2";s:10:"2017-11-03";}s:18:"_1509434861359_359";
  a:2:{s:6:"field1";s:4:"CCCC";s:6:"field2";s:10:"2017-11-06";} }

It would great help to get dates from this file (i think JSON).

Or guide me another way if thats possible to add fields in admin and get at front-end block file.


texts: How to uncheck "My billing and shipping address are the same" checkbox during checkout? One Page/Magento2

texts: I am having an issue where the box is being marked automatically. I want to unmark it.


texts:
Does anyone know how to specify pub/errors themes per store rather than using the same template for all stores?

I have created my theme in pub/errors using the local.xml but I am unsure of the next steps.

Thanks in advanced!


texts: Becuase of the better performance of Magento 2, Can we reduce number of servers?

texts:
Currently we are using 7 servers for our Magento 1 production site, those are all working under load balancer.
Now we are planning on Magento 2 upgrade with php7. Because of the php7 and magento 2 better performance compare to php 5.5 and magento 1,

Is it advisable to reduce the servers to 5? Will we get the same results of the existing system?


texts: How to find whether a product attribute is set to "use default value"

texts:
If I load a product's data in store view or website scope, every attribute set to "use default value" is populated with that default value. This is fine in most cases, but now I'm trying to find out which products have a price defined at website level and which ones don't.

Product X's price is £10 in "default values" and £9 at the website level.
Product Y's price is £12 in "default values" and not set at the website level.

I'm trying to get just the website-level data programmatically, i.e. 9.0000 and NULL, but whatever I try, the price for product Y comes back as £12.

This post - https://stackoverflow.com/a/6623565/1493346 - describes how to set / unset attributes at store view level, but it hasn't helped with getting them.

This is what I've tried:

Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
$_products = Mage::getModel('catalog/product')->getCollection()
                   ->addAttributeToSelect(array('price'))
                   ->setStoreId(STORE_ID)
                   ->addStoreFilter(STORE_ID);
foreach ($_products as $_product) {
    echo $_product->getPrice(); // no good
    $_product->setStoreId(STOREID)->load($_product->getId());
    echo $_product->getPrice(); // still no good
}

Is there a way to do this without resorting to direct database queries?


texts: Magento 2: Frontend workflow on windows too slow

texts:
I am using XAMPP with php set up with memory_limit 2GB and max_input_vars set to 10000.

Is there anything else I can do to speed up performance of Magento 2 on windows?


texts: I am getting this error on my magento store in Admin

texts: Uncaught LogicException: Circular dependency: Magento\Logging\Model\Handler\Controllers depends on Magento\Framework\Stdlib\DateTime\Timezone and vice versa


texts: How to upload Multiple images in backend for custom module in magento2

texts:
Need to upload multiple images for my custom module in admin panel in magento2
for single image its done properly.
but having issue for multiple images.
Can Any one have an idea??


texts: Is it possible to get the cache url of an image you just uploaded via ftp? if yes, how can I do it?


texts:
How can Export Categories with product on  Magento 2

Magento 2 admin panel only product export/import but categories sequence problem, product not import , so i want to export all categories with product


texts: Full Page Cache for constantly updated pages?

texts:
I have been asked to work on an existing magento store which currently has 2 vital parts:

Full Page Cache - To help reduce the load time of the site and server load a full page cache was installed. This made a dramatic increase in performance.
Always show up to date Products - the store will have a constant stream of new products and categories added to it - in the region of say 10-20 every hour. The product listing pages must always show the very latest and all products

At the moment the store is showing fast cached versions of the product listing pages but they are obviously not the very latest version showing all new products. The only way to show the very latest version is to flush the cache

Am i correct in thinking there is no way of having these 2 parts working together? By caching the page for speed I will always show a previous/out of date page? The only way to show the latest version is to not cache the pages?


texts:
Our headers caching over one another. A solution that i've come up with involves creating and calling these separate cached pages from a non-cached environment.  Seems like it'd be a successful endeavor. What is the best way to acomplish this goal?

Is it possible to create a cache key for a block?


texts:
Can I create a block with a youtube video inside on homepage? and youtube link can be modified from admin page?
how can I do it without pagebuilder and magento commerce?


texts: Creating a Multistore Setup on a subdomain for Magento 2.2

texts:
I would like to setup a store in Magento 2.2 that is accessible from a subdomain.

example.co.za (main site - Fully Functional and Working)
a.example.co.za (store with unique categories etc)

I have created the store and store views, updated the base and secure URLs in the admin. I have also set the "Add store code to urls" to "Yes"
I have also linked them to the folders in the Primary domain using the following SSH:
ln -s ../app/ app

ln -s ../lib/ lib

ln -s ../pub/ pub

ln -s ../var/ var

MyIissue seems to be the code i put into the index.php and .htaccess files.
These files where copied from the primary domain.


texts: Including the Configurable product 'simple' products in catalog lists

texts:
I will be adding a configurable product that has two configurable attributes (e.g. size and color.)   For this product, I would like to show all the associated simple products in the catalog for one of the attributes (in my scenario, size).

However, when the user clicks through to the simple product page for that given size, I would like them to still be able to change the configuration for either size or color.

Is that possible through configuration?


texts: When is Onepage SaveOrder being triggered | Magento Plugin

texts:
I'm trying to find out where and when will this method be triggered. I also created a plugin to do a log on this. But it seems that this is not being triggered when I click the Proceed payment button. I'm not sure where this is called. Below is my code

<!--- di.xml --->
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
   <type name="Magento\Checkout\Controller\Onepage\SaveOrder">
        <plugin name="Custom_Module_Plugin" type="Custom\Module\Plugin\SaveOrder" sortOrder="10" disabled="false"  />
    </type>
</config>

And this is the class that should be displaying the log

namespace Custom\Module\Plugin;

class SaveOrder
{
    public function beforeExecute(\Magento\Checkout\Controller\Onepage\SaveOrder $subject)
    {
        // logging to test override
        $logger = \Magento\Framework\App\ObjectManager::getInstance()->get('\Psr\Log\LoggerInterface');
        $logger->debug("******* THE METHOD HERE ********" . __METHOD__ . ' - ' . __LINE__);
        return null;
    }
}

Now after filling up the shipping details and selecting the payment method. When I click the Proceed button I was expecting that the method will be called but this is not being called. Any idea?

Update:
I also tried doing a plugin for the checkout success page and I was able to intercept and output a log in the console. So this means that there are nothing wrong with how I did the plugin also I tried to modify the vendor/magento/module_checkout script and even if I modify the vendor directly it does not call the function/class


texts:
Actually, the desired requirement is quite simple.
I would like to control and execute the import from the backend of the Magento 2 system via the CLI.

This question was asked some time ago (2016) here.
However, I use the Community Edition and the free version of the Firebear plugin cannot do this.
https://github.com/firebearstudio/importexportfree

Is it possible to start the product import with "Add Update" (all other default) via the CLI?

I hope you can help me. :)

Current System: Ubuntu 18.04 MariaDB Magento 2.3.1 (CE)


texts: Magento2: Cash on delivery - how to get extra fee charge

texts:
I enable in backend option payment "cash on delivery".

I want to ask how to customize and add extra cost to customer basket for select payment "cash on delivery:".

https://prnt.sc/rqrnmj

Any solution?

sales ---> Payment methods   ---> cash on delivery [enable]

Is any way to display here https://prnt.sc/rqrpgv additional field with extra fee charge?


texts: Magento2 API call returns 404 when Entity Not Found but 200 if is found. Why?

texts:
Whilst designing a framework to synchronize objects (entity models) between Magento2 and our CRM, I have found that Magento's REST API will return a StatusCode of 404 with the following JSON

{No such entity with %fieldName = %fieldValue}
{[parameters, {
  "fieldName": "customerId",
  "fieldValue": 30
}]}

-when trying to GET a customer, but this happens with any non-searchcriteria required GET call.

IMO, 404 should be a route not found, an honest 404.  Entity not found should be a 204 (Content not found), or at the very least a 200 with the JSON that it returns.

Am I doing it wrong? Is it really supposed to return a 404 error, and I have to build my .net framework "improperly" to accomodate for this?


texts: What is the purpose of the attribute setting "Visible on product view page on front end"

texts: I have a configurable product configurable on two attributes, colour and inventory_site. The first is a customer related attribute while the second is a backend admin attribute for inventory control at various shipping sites from which we ship product. This attribute is irrelevant to a customer and should be hidden from them. Unfortunately Magento displays the inventory attribute on the customer viewable product page even though the "visible on product view page on front end" is set to "no". If this setting does not hide this attribute, what does it do? Is there an alternative way to accomplish what we are trying to do?


texts: Products are not shown on product detailed page

texts:
Products added from admin panel are shown in the product list in admin panel, but not reflected on web frontend.

I have installed a design theme in my magento setup and also clicking on any product in that theme, shows "This page isn't working, HTTP 500 error".


texts: Restrict customer in checkout if zip codes are not from predefined zip code list

texts:
we are restricting the zip codes for custom shipping method....

for now we are facing problem as here :

Display the shipping charges without clicking on "check" button

so is there any other way we can allow only some zip codes and restrict other zip codes.

can we do restricting zip codes independent of shipping method


texts:
I've set up a test store with Magento 2.2. I use one test paypal account for the store and one for the customer. I've set up Paypal in the configuration panel and managed to buy a product using the web store.

Now, I want to do it, using a webhook with REST request. I can add stuff to my cart and use offline payment method, no problem. Here's my code for the checkout

const header_valid = {'content-type': 'application/json',
                          'Authorization': "Bearer " + token };
    const url_valid = site+"carts/mine/payment-information";
    const postbody_valid = JSON.stringify({
        "paymentMethod" : {
            "method" : payment // payment ="paypal_express" in this case
        },
        "billing_address" : {
            "email" : "",
            "region" : adress.region.region,
            "region_id" : adress.region.region_id,
            "country_id" : adress.country_id,
            "street" : adress.street,
            "postcode" : adress.postcode,
            "city" : adress.city,
            "telephone" : adress.telephone,
            "firstname" : adress.firstname,
            "lastname" : adress.lastname
        },
        "shipping_address": {
            "email" : "",
            "region" : adress.region.region,
            "region_id" : adress.region.region_id,
            "country_id" : adress.country_id,
            "street" : adress.street,
            "postcode" : adress.postcode,
            "city" : adress.city,
            "telephone" : adress.telephone,
            "firstname" : adress.firstname,
            "lastname" : adress.lastname
        }
    });
    request.post({
        headers : header_valid,
        url : url_valid,
        body : postbody_valid
    },function(error_valid,response_valid,body_valid){
        if(error_valid)
            console.log(intent + "\n Erreur : " + error_valid);
        else{
            console.log(intent + "\n"+ JSON.stringify(body_valid));
            if(JSON.parse(body_valid).message)
                send_message(res,"Problème",id,Parametre);
            else send_message(res,"La commande a été validée",id,Parametre);
        }
    });

However, when i use this to access the store and try to checkout my cart , i get the message "Problème", and this is body_valid.message:

"{\"message\":\"PayPal gateway has rejected request. Invalid token (#10410: Invalid token).\"}"

I would appreciate any help, thanks


texts: Understand EAV structure and related tables to get any attribute

texts:
For products I have created new attribute brix_level which is a text field.

Now I need products data using SQL.

I am good at quries, but the EAV structure is beyond my level :D

Can anyone explain the structure of EAV, and which tables do I need to use to get these data.

Product ID, SKU, Product Title, Brix Level


texts: How can i create own order Time Countdown for EVERY ORDER

texts: I need to create time Countdown for every order, which is used to priority to my pending order. If order complete stop the countdown.  and how can I share my new order mail to multiple email addresses?


texts: How to change a shipping method config error message by custom module custom message in magento 2

texts:
How to  change a  shipping method config error message by custom module in magento 2

See the below image, I want to update display error message in e checkout page with custom module.

I know that we change display error using shipping method configuration  but i want to need custom module

This is a shipping method configuration error message

Custom module  admin from restriction message

I expect like below image

I override the template  vendor/magento/module-checkout/view/frontend/web/template/shipping.html to  my custom module app/code/Vendor/Module/view/frontend/web/template/shipping.html

                   // here how to bind my custom module error message (restriction message)

                   <input type="radio" data-bind="attr: {'value' : method.method_code, 'id': 's_method_' + method.method_code}"/>


texts:
When I run the Ordered Products Report in Magento backend, the generated report lists all products ordered and their ordered quantity -- however, they don't seem to be grouped correctly by SKU. I have the same product showing up multiple times. I would like the report to generate correctly and group by SKU.

Here is an example report:

|----------|------------------------------------------|-------------|------------------|
| Interval | Product                                  | SKU         | Ordered Quantity |
|----------|------------------------------------------|-------------|------------------|
| 8/12/18  | CBD Freeze Pain Relief 3oz Roller 1500mg | TFR-04-1500 | 8                |
|          | CBD Oil Tincture Drops 30mL Berry 300mg  | TIN-BR-0300 | 6                |
|          | CBD Oil Tincture Drops 30mL Berry 750mg  | TIN-BR-0750 | 5                |
|          | CBD Oil Tincture Drops 30mL Berry 300mg  | TIN-BR-0300 | 3                |
|----------|------------------------------------------|-------------|------------------|

Notice that SKU TIN-BR-0300 is listed twice for the same day/interval.


texts: Magento 2 : How to add more page that can be accessed if Website Restrictions is on

texts:
How can i add more pages that can be accessed  like a contact us page with website restriction turned on

UPDATE

Found a file \vendor\magento\module-website-restriction\etc\webrestrictions.xml

How would i add my action to that xml without editing core file


texts: Does OrderID Depends on QuoteID with time and in the sequence of IncrementIDs?

texts:
I was working on Magento Payment Gateway. I got a weird doubt about Order generation and it happened to me.

1) We just added some products to the Cart long back (2 months back) for one test user.

2) Later on we got many orders in this period of 2 months.

3) Now we just logged in with that test user and luckily we have items in the cart and we placed order.

Here it is a new Order anyways and it should match with the last Increment ID right ?

But we received Order ID which matches 2 months back orderIDs.

How it happened ? I studied about Order Processing But No where I found Solution for this.

Please let me know the things how it happened..

Thanks in advance.


texts: SQL Error when importing bulk data. Product_id goes out of sync with Entity_id

texts:
When importing about 12000 rows of products from a .csv file, it suddenly gives me the following error:

  General system exception happened Additional data: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row:
  a foreign key constraint fails
  (kumpla01_mg1.mg_catalog_product_website, CONSTRAINT
  MG_CAT_PRD_WS_PRD_ID_MG_CAT_PRD_ENTT_ENTT_ID FOREIGN KEY
  (product_id) REFERENCES mg_catalog_product_entity (entity_id) ON
  DELETE), query was: INSERT INTO mg_catalog_product_website
  (product_id,website_id) VALUES (?, ?), (?, ?), (?, ?), (?, ?), (?,
  ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?),
  (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?,
  ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?),
  (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?,
  ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?),
  (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?,
  ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?),
  (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?,
  ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?),
  (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?,
  ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?),
  (?, ?), (?, ?) ON DUPLICATE KEY UPDATE product_id =
  VALUES(product_id), website_id = VALUES(website_id)

This is the inside of the database (It always throws it at the same line, the .csv file should be just fine as 4299 rows were not causing any problems, and I am using a specific algorithm to generate them. I will still paste some more details, if it helps whoever will contribute to this problem.

mg_catalog_product_website (website_id from the SQL error, reaches 4300)

mg_catalog_product_entity (entity_id, as you can see, it somehow reaches 4400)

As said before, csv file is all fine, I do know import is kinda shady based on past issues, but I hope we can find the fix. I tried deleting and truncating all the product tables, but the issue still happened. It must be something with the code, also my csv contains all the possible attributes.
This is my first ever post, please be patient with me, I'm barely an amateur.


texts: Magmi: Attributes not being associated with attribute sets

texts:
I've successfully added attributes and attribute sets to the store I'm working on, however I'm running into trouble with creating associations between the attributes and attribute sets.

When I check an attribute set in the Magento backend, the Groups column is completely empty, and all the attributes appear to be available in the Unassigned Attributes column.

This is a sample from my csv for creating associations:

attribute_set_name  attribute_code  attribute_group_name
AC Gearmotor        FullLoadAmps    General
AC Gearmotor        MountingStyle   General
AC Gearmotor        RPM             General
AC Gearmotor        Torque          General

These are my settings in Magmi for the Attribute association import options:

attribute_set_name,attribute_code,attribute_group_name
*,name,General
*,description,General
*,short_description,General
*,sku,General
*,weight,General
*,news_from_date,General
*,news_to_date,General
*,status,General
*,url_key,General
*,visibility,General
*,manufacturer,General
*,country_of_manufacture,General
*,allowed_to_quotemode,General
*,group_allow_quotemode,General
*,quotemode_conditions,General
*,price,Prices
*,group_price,Prices
*,special_price,Prices
*,special_from_date,Prices
*,special_to_date,Prices
*,tier_price,Prices
*,msrp_enabled,Prices
*,msrp_display_actual_price_type,Prices
*,msrp,Prices
*,tax_class_id,Prices
*,price_view,Prices
*,meta_title,Meta Information
*,meta_keyword,Meta Information
*,meta_description,Meta Information
*,image,Images
*,small_image,Images
*,thumbnail,Images
*,media_gallery,Images
*,gallery,Images
*,is_recurring,Recurring Profile
*,recurring_profile,Recurring Profile
*,custom_design,Design
*,custom_design_from,Design
*,custom_design_to,Design
*,custom_layout_update,Design
*,page_layout,Design
*,options_container,Design
*,gift_message_available,Gift Options

Create attribute associations from CSV which are not in database

Update attribute associations from CSV which are already in database

Which generates the following/similar error for each association which I attempt:

Attribute Set Importer v0.0.2 - Exception in update/insert loop for entity
'attribute association' in record no 1: SQLSTATE[23000]: Integrity constraint violation:
1452 Cannot add or update a child row: a foreign key constraint fails (`brennerf_6b6AnYRQ`.
`i2r7_eav_entity_attribute`, CONSTRAINT `FK_917A5725E0970D5A68B169EEBCDED200`
FOREIGN KEY (`attribute_group_id`) REFERENCES `i2r7_eav_attribute_group`
(`attribute_group_id`)

record data:Array
(
  [attribute_group_name] => General
  [entity_type_id] => 4
  [attribute_set_id] => 23683
  [attribute_id] => 515
)

original record data:Array
(
  [attribute_set_name] => AC Gearmotor
  [attribute_code] => FullLoadAmps
  [attribute_group_name] => General
  [entity_type_id] => 4
)


texts: I need the ability to make private listings/custom orders in Magento, how can I?

texts:
I need the ability to create a one of the order for a customer, it would be a customization of a product which is usually in my catalog, but not always.

I need the equivalent of Etsy's custom order feature, where a customer requests, say for example an order for 6 widgets when you normally sell 5, or a product you don't even have in your catalog.

Ideally, I would like to create the custom order and email them a link, then they can go to this one off the page and either add to cart and pay or better yet to a prepopulated "cart-like" screen where they can start the payment there.

I've looked thru standard features and searched the net, but am not seeing what I need.

Any guidance on: Closest I can get out of the box?

An extension?

This is too specific and needs a hell ton of work?

Much obliged.


texts: Why do I get redirected to media/wysiwyg/... after login?

texts:
I noticed that I get redirected to "media/wysiwyg/kategorie_bilder/neue-produkte.jpg" after submiting the login form of my website?

This leads to a "sorry page not found" site.

How can I find out why this is happening?


texts: Reindexing does not go through - Magento2 on Localhost - Using MAMP

texts:
Unfortunately, I stopped by some issue I cannot find the answer for, no matter how much I search online.

When I attempt to reindex through terminal using the following code:

php bin/magento indexer:reindex

Only the first table (Design Config Grid) seems to be properly rebuilt:

In the Admin panel, the only table that is not reindexed is the "Customer Grid" table:

I am assuming the reason must be related to the "Customer Grid". Would you please help me figure this out? Any help is greatly appreciated.

Magento 2.2.2


texts:
I am working on a new extensions that stores some HTML data in Static blocks.  To make it work as needed, I need to be able to add a new setting to the Static Block page that allows me to set a static block as enabled/disabled for my extension to use it.

My extension is named Bounce Reducer so that is the setting I would like to add.

Is this possible to add a setting to this screen like that?  And then be able to access it in other sections/pages of my extensions code?


texts: How to Exclude Tags  Being Moved to Bottom magento 2.3

texts:
In my Magento site, we found there was configuration in admin.
Admin -> Store -> Configuration -> Advanced -> Developer (Enabled only on Developer mode). JavaScript settings -> Move JS code to the bottom of the page

When this is YES, all the scripts tags on the site moves to the bottom of the page.
But I need to include a script which shouldn't move to the bottom.
My scripts loads in via .phtml. And I need to load avoid that particular script from moving to bottom

this is code from magento/module-bundle/view/frontend/templates/catalog/product/view/summary.phtml i have issue product summary on bundle product not showing
Is there any way to achieve this?


texts: Magento Most Viewed Products: What condition should be met?

texts:
As Magento keep track on several logs or reports. One of them is Most viewed items.
I am not sure what conditions should met for one product to be in most viewed items.

  How long a product must be viewed to have it into most viewed?

I got this query from one of my client and I checked files for answer but did not get any correct one.

Hope I did not miss any part of Magento documentation which may give answer of this question.

Suggestions appreciable.


texts: Unset magento toolbar-bottom in local.xml

texts:
Is it possible to remove only the bottom toolbar of a category page using the local.xml file without editing the template files? I want to keep the top toolbar..

Maybe something along these lines?

<reference name="content">
  <block type="catalog/product_list" name="featured" template="catalog/product/list.phtml">
    <action method="setHideToolbars"><value>1</value></action>
  </block>
</reference>


texts: How to create custom reports for catalog in Magento 2.1.8

texts:
I need to create a report of products with all the fields in Magento 2.

Is there any free Magento 2 extension available to get the product wise report?


texts: Magento set value of dropdown attribute via SOAP v2 API

texts:
As the title says, I'm trying to set/modify the value of a drop down type attribute through the SOAP v2 API.  Below is the latest bit of code that I'm working with:

$update_data = array (
    'additional_attributes' => array (
        'multi_data' => array (
            array ('key' => 'ship_separately', 'value' => array ('0' => '1'))
        ),
        'single_data' => array (
            array ('key' => 'ship_width', 'value' => '14'),
            array ('key' => 'ship_length', 'value' => '24'),
            array ('key' => 'ship_height', 'value' => '12'),
            //array ('key' => 'ship_separately', 'value' => 'Yes')
        )
    )
);

$update = $proxy->catalogProductUpdate($sessionId, 'MySKU', $update_data, NULL, 'sku');

The 'single_data' (just simple name/value pairs) attributes update fine.  As you can see, I also tried to update the 'ship_separetely' using the 'single_data' array...to no avail.  Google and StackExchange put me on the path of the 'multi_data' array, but finding documentation on it is virtually impossible.  I think I have the syntax correct because the API isn't throwing an exception and it is updating the 'single_data' attributes, but won't update the drop down value. It is a simple yes/no drop down, so I've tried setting the value to both 'Yes' and '1', but it doesn't change.  Any help is greatly appreciated.


texts: Show particular Block on the particular URL/page only

texts:
I am newcomer in Magento development, after 2 weeks I still feeling lost in the Magento 2 world.

I have added following Block to the app/design/frontend/Mojambe/LuarBiasa/Magento_Theme/layout/default.xml:

    <referenceContainer name="columns.top">
        <block class="Mojambe\Blog\Block\Html\MainImage" name="page.main.title" template="Mojambe_Blog::html/mainimage.phtml"/>
    </referenceContainer>

My proble is the block keep showing on all the pages when I only want it to show on the Home page only.

How to make a particular block only show on the particular page/url in magento 2.3 ?

I have tried this as well but still no luck:

Any help would be very appreciated.


texts: redirecting magento install in subfolder to subdomain

texts:
I installed Magento in a sub-folder of my public HTML root but I cannot seem to get it to redirect from example.com/shop to shop.example.com.

I have tried to change the .htaccess file in the sub-folder. What happens is that the website redirects from example.com/shop to shop.example.com but now the store doesn't load.

I redirected the store originally using .htaccess file in the sub-folder to the subdomain but that didn't work and I tried to change the base URL and secure URL in Magento to no luck.

Please help!


texts: Magento 2: How to prevent duplicate form_key cookie?

texts:
I'm using Magento  2.4.1 version and I'm doing some security testing, one of the vulnerable results is the cookie form_cookie is being set twice in the HTTP response like this:
Set-Cookie: form_key=ANMOgcSCt33UqABtS; expires=Sun, 17-Jan-2021 02:43:11 GMT; Max-Age=3600; path=/; domain=test.m2.com; secure; SameSite=Lax
Set-Cookie: form_key=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/; domain=test.m2.com; SameSite=Lax

I'm getting this result from /customer/account/confirm/  and /customer/account/login/ ,
is there a way to prevent this from happening?
Thanks in advance


texts: How to Show ONLY Products Created within a Week on Homepage Category Block

texts:
{{widget type="Codazon\ProductFilter\Block\Product\ProductsList" display_type="all_products" products_count="16" order_by="sold_count DESC" show="thumb,name,sku,description,review,price,addtocart,addto" thumb_width="260" thumb_height="260" filter_template="custom" custom_template="product/widget/content/infinitescroll_grid_custom.phtml" show_slider="1" slider_item="24" conditions_encoded="^[`1`:^[`type`:`Magento||CatalogWidget||Model||Rule||Condition||Combine`,`aggregator`:`all`,`value`:`1`,`new_child`:``^],`1--1`:^[`type`:`Magento||CatalogWidget||Model||Rule||Condition||Combine`,`aggregator`:`all`,`value`:`1`,`new_child`:``^],`1--1--1`:^[`type`:`Magento||CatalogWidget||Model||Rule||Condition||Product`,`attribute`:`category_ids`,`operator`:`==`,`value`:`987`^]^]" cache_lifetime="600"}}

I'm trying to show products created within a week on my homepage category block but is there any way to make it happen with markup language or else?


texts: Programmatically create an online refund in Magento 1.6.0.0

texts:
I'm trying to create an online refund of a certain amount (e.g. 10 EUR = is lower than refundable amount). The refund is independent of order items. I can refund online in admin panel but everytime I do it programmatically it will do an offline refund. Please help! I must have overlooked something.

# $order and $invoice are given here
$service = Mage::getModel('sales/service_order', $order);
$data = array();
$data['shipping_amount'] = 0;
$data['grand_total'] = 0;
$data['base_grand_total'] = 0;
$data['adjustment_positive'] = 10;
$data['qtys'] = array(0 => 0);
$creditmemo = $service->prepareInvoiceCreditmemo($invoice, $data);
$creditmemo->setShippingAmount(0);
$creditmemo->setGrandTotal($data['adjustment_positive']);
$creditmemo->setRefundRequested(true);
$creditmemo->setOfflineRequested(false);
$creditmemo->setPaymentRefundDisallowed(false);
if(Mage::registry('current_creditmemo')) {
    Mage::unregister('current_creditmemo');
}
Mage::register('current_creditmemo', $creditmemo);
$creditmemo->refund();
# here follows the transactionSave: $this->_saveCreditmemo($creditmemo);


texts: How to solve upgrading Magento 2.1.1 to Magento 2.1.17?

texts:
I am faced issue when I upgrade Magento 2.1.1 to Magento 2.1.17

I changed some values in composer.json

"magento/product-community-edition": "2.1.1",  =>"magento/product-community-edition": "2.1.17",

"version": "2.1.1", => "version": "2.1.17",

I keep getting this error message

Your requirements could not be resolved to an install able set of packages.

Problem 1
- Can only install one of: magento/framework[100.1.17, 100.1.1].
- Can only install one of: magento/framework[100.1.17, 100.1.1].
- Can only install one of: magento/framework[100.1.1, 100.1.17].
- magento/product-community-edition 2.1.17 requires magento/framework 100.1.17 -> satisfiable by magento/framework[100.1.17].
- Installation request for magento/product-community-edition 2.1.17 -> satisfiable by magento/product-community-edition[2.1.17].
- Installation request for magento/framework == 100.1.1.0 -> satisfiable by magento/framework[100.1.1].

I tried to fix this problem by adding this line

"magento/framework": "100.1.17|100.1.1.*", in "require"

but no luck

Any help would be appreciate.


texts:
whenever i am setting additional domains for multi website setup, the additional domains are accessible for 1 day and on the next day i am getting error on magento 2.3.4
(Exception): Notice: Undefined index: Store in ........... /vendor/magento/module-store/Model/StoreResolver/ReaderList.php on line 50

have done MAGE_RUN_CODE & MAGE_RUN_TYPE for all,
other than the default website luxeron.in, all other 3 website were working after making changes in virtualhost.conf, htaccess, index.php and gives an error after a day,
there is a theme being used for default website luxeron.in, however now i have changed it back to Luma.
below are the changes done

.htaccess

#RewriteBase /magento/

                    SetEnvIf Host .*deewaligifts.com* MAGE_RUN_CODE=DGUSEN
                    SetEnvIf Host .*deewaligifts.com* MAGE_RUN_TYPE=store

                    SetEnvIf Host .*decobins.com* MAGE_RUN_CODE=DBUSEN
                    SetEnvIf Host .*decobins.com* MAGE_RUN_TYPE=store

                    SetEnvIf Host .*niwtn.com* MAGE_RUN_CODE=NIWINEN
                    SetEnvIf Host .*niwtn.com* MAGE_RUN_TYPE=store

index.php

/**--------------------------------- Multisite Setup -------------**/
        switch($_SERVER['HTTP_HOST']) {

            /*-----------------------Default Luxeron.in ------------------**/
            default :
                $mageRunCode = 'LUX';
                $mageRunType = 'website';
            break;
            /*-------------------------------DeewaliGifts ----------------**/
            case 'DeewlaiGifts.com':
                $mageRunCode = 'DGUSEN';
                $mageRunType = 'store';
            break;
            /*------------------------------ Decobins --------------------**/
            case 'decobins.com':
                $mageRunCode = 'DBUSEN';
                $mageRunType = 'store';
            break;
               /*------------------------------ NiwTn --------------------**/
            case 'NiwTn.com':
                $mageRunCode = 'NIWINEN';
                $mageRunType = 'store';
            break;
        }

        /**--------------------------------- end of websites --------------**/
        $params = $_SERVER;
        $params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = $mageRunCode;
        $params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = $mageRunType;
        $bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER);

webuzoVH.conf

ServerName deewaligifts.com
ServerAlias www.deewaligifts.com

DocumentRoot /home/nittn/luxeron/pro
            SetEnv MAGE_RUN_CODE "DGUSEN"
            SetEnv MAGE_RUN_TYPE "Store"

<FilesMatch \.php$>
    <If "-f %{REQUEST_FILENAME}">
        SetHandler "proxy:unix:/usr/local/apps/php72/var/php72_9000.sock|fcgi://localhost"
    </If>

#------------------------------#
ServerName decobins.com
ServerAlias www.decobins.com

DocumentRoot /home/nittn/luxeron/pro
            SetEnv MAGE_RUN_CODE "DBUSEN"
            SetEnv MAGE_RUN_TYPE "Store"

<FilesMatch \.php$>
    <If "-f %{REQUEST_FILENAME}">
        SetHandler "proxy:unix:/usr/local/apps/php72/var/php72_9000.sock|fcgi://localhost"
    </If>
#-----------------------------#
ServerName niwtn.com
ServerAlias www.niwtn.com

DocumentRoot /home/nittn/luxeron/pro
            SetEnv MAGE_RUN_CODE "NIWINEN"
            SetEnv MAGE_RUN_TYPE "Store"

<FilesMatch \.php$>
    <If "-f %{REQUEST_FILENAME}">
        SetHandler "proxy:unix:/usr/local/apps/php72/var/php72_9000.sock|fcgi://localhost"
    </If>


texts:
How do I discover the XML Layout name for a page?

Eg. <catalog_category_default> is the name for a default (non-layered) category page, <cms_index_index> is the name of a CMS Page.

I have several modules that are creating pages, and I would like to know what the XML Layout name for these pages are, or indeed, any page.

I was hoping that enabling Add Block Names to Hints under Developer > Debug in the System Configuration area would give me these page names, but they only seem to give me the name of the blocks used within that page.

Can anyone help?


texts: Magento 2 - Change product view to 2-columns left

texts:
I was trying to change product page layout to 2 columns left so that the left navigagion menu could be visible at entire magneto2 store.
when I change Product page Layout at Product Edit page -> Design -> Layout to '2 columns with leftbar' I get the error :

1 exception(s):
Exception #0 (Exception): Warning: Illegal offset type in /vendor/magento/module-catalog/Model/CategoryRepository.php on line 133

Exception #0 (Exception): Warning: Illegal offset type in /vendor/magento/module-catalog/Model/CategoryRepository.php on line 133
#0 /vendor/magento/module-catalog/Model/CategoryRepository.php(133): Magento\Framework\App\ErrorHandler->handler(2, 'Illegal offset ...', '/...', 133, Array)
#1 /vendor/magento/module-catalog/Block/Product/ListProduct.php(114): Magento\Catalog\Model\CategoryRepository->get(Object(Magento\Catalog\Model\Category\Interceptor))
#2 /vendor/magento/module-catalog/Block/Product/ListProduct.php(176): Magento\Catalog\Block\Product\ListProduct->_getProductCollection()
#3 /vendor/magento/framework/View/Element/AbstractBlock.php(658): Magento\Catalog\Block\Product\ListProduct->_before

ToHtml()
 . . .

I also found similar question at Change product view to 2-columns .

By referring this I copied Magento_Catalog folder to

app/design/frontend/Magento/luma

from

vendor/magento/theme-frontend-luma

and changed to layout="2columns-left". But it didn't work. Please advice.

Thanks in advance !


texts: Translate Magento Admin config settings to config.php settings

texts:
I want to modify a setting, which I know how to find and change in the Magento Admin, - but I want to modify it in the config.php file. Which way can i find out the configuration path / syntax within the config.php file for that specific setting?

Example
I want to set the cookie restriction mode to Yes via config.php. http://docs.magento.com/m2/ee/user_guide/stores/compliance-cookie-restriction-mode.html describes how to change the setting in the Magento Admin.

It seems to be possible to get the path from /src/vendor/magento/module-cookie/etc/config.xml:

<?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
 <default>
    <web>
        <cookie>
            <cookie_lifetime>3600</cookie_lifetime>
            <cookie_httponly>1</cookie_httponly>
            <cookie_restriction>0</cookie_restriction>
            <cookie_restriction_lifetime>31536000</cookie_restriction_lifetime>
        </cookie>
    </web>
 </default>
</config>

... which could translate into ...

'system' =>
  array (
    'default' =>
      array (
        'web' =>
           array (
             'cookie' =>
                array (
                  'cookie_lifetime' => '3600',
                  'cookie_restriction' => '1'

... but that seems a bit complicated to me for everyday usage (1. find the right module, 2. investigate source code, 3. translate xml to config.php format). Is there an easier way?


texts: How to override getSectionData() method of magento-checkout CustomerData/Cart.php?

texts:
Is it possible to overwrite "public function getSectionData()" of class magento-checkout/CustomerData/Cart.php only with the help of Plugin

My di.xml

    <?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<!--    <type name="Magento\Checkout\CustomerData\AbstractItem">
    <plugin name="AddAttPlug" type="Trimantra\ShippingMessage\Plugin\DefaultItem" disabled="false" sortOrder="10"/>
    </type>-->
    <type name="Magento\Checkout\CustomerData\Cart">
    <plugin name="AddMsgPlug" type="Trimantra\ShippingMessage\Plugin\Cart" disabled="false" sortOrder="10"/>
    </type>
</config>

My class file

    <?php

namespace Trimantra\ShippingMessage\Plugin;

class Cart
{
    public function afterGetSectionData(\Magento\Checkout\CustomerData $subject, $result)
    {

    ......
    return  $result;

    }
}