texts: Magento2 doesn't load in Browser after fresh install and successful nginx config test

texts:
SECOND UPDATE: After reconfiguring file system permissions, and re-installing: It finally worked! This thread ended up being a self-help journey.
UPDATE: After doing a fresh install, increasing InnoDB buffer size, resolving all database permissions, regenerating Interceptor. I am STILL getting a blank page knowing that

Ping to my domain routes successfully to my cloud IP
Port 443 is open and working
SSL Certificate is valid and working

VERY IMPORTANT: After resolving all the issues, I cleared my logs and visited the domain address in my browser. The page is blank and absolutely NO logs were generated other than the following in debug.log:
main.DEBUG: cache_invalidate:  {"method":"GET","url":"http:/","invalidateInfo":{"tags":["FPC"],"mode":"matchingTag"}} []

It's been 3 days I'm battling with this! I've learned more in these 3 days than in a life time about the Linux filesystem, webservers, database management, configuration! SECURITY!
But still can't solve this problem. HELP!
I successfully deployed the latest Magento 2.4.1 on Ubuntu 18.04, PHP, Nginx with letsencrypt cert.
Previously, when i visit my domain i was able to see the magento 2 welcome page. After having made the Command line installation successfully and got the unique link to admin panel, visiting magento through the browser is returning a server not found error.
When i send a GET request to local host (NOT https) from server side, it returns the following Nginx welcome page.
curl -XGET http://localhost

<!DOCTYPE html>

<title>Welcome to nginx!</title>

Welcome to nginx!

If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.

For online documentation and support please refer to
nginx.org.

Commercial support is available at
nginx.com.

Thank you for using nginx.

I am able to successfully ping my connected domain over the internet which returns the actual server IPv4 address
root@pc:~# ping domain.com
PING domain.com (xxx.xx.xxx.xx) 56(84) bytes of data.
64 bytes from xxx.xx.xxx.xx (xxx.xx.xxx.xx): icmp_seq=1 ttl=53 time=161 ms
64 bytes from xxx.xx.xxx.xx (xxx.xx.xxx.xx): icmp_seq=2 ttl=53 time=82.6 ms
64 bytes from xxx.xx.xxx.xx (xxx.xx.xxx.xx): icmp_seq=3 ttl=53 time=105 ms

If i ping my domain with "www." before it retuns the below
root@pc:~# ping **www**.domain.com
ping: www.domain.com: Name or service not known

Possible issues:
I have magento installed in var/www/ instead of var/www/html but i made the necessary changes in default.conf as well as nginx.conf and the sample configuration file in the magento2 filesystem configuration (nginx.conf.sample)
The solution may be something very simple that i missed, does anyone have an idea?
UPDATE: After re-installing Magento, I got a "Error has occured" page. The exception log returns the below error:
main.CRITICAL: Class Magento\Framework\App\Http\Interceptor does not exist


texts: How to change address book drop(Billing) down to pre-populated form?

texts: If $this->customerHasAddresses('billing') this method is set to true or if customer has their addresses registered, magento will show the existing address as the drop down options. how to show those values as pre populated form instead of dropdown option.


texts:
General question.

What to pay attention to when migration from Magento version 2.1.9 to 2.2.0.

What are the big differences?

What are the composer commands?

Thanks!


texts:
By seeing Magento wonderful functionality I have seen interested on it and learned Magento.
Previously i worked on dotnet.

In Magento i have learned the flow and its structure.
Now i am struck with understanding PHP code and Magento built in functions.
I can do blocks and layouts customization.
But could not understand PHP and Magento fuunctions relates with EAV.

So i request you to please let me know how can i understand code with tables.
like order related issues, if i want to do modifications i could not reach the tables
it relates.

Please provide me some best tutorials for understanding advanced magento.


texts: Magento 2 multiple shipping options on checkout

texts:
Is there a way to create something like:

Free Shipping
3 days delivery (+5£)
Next day Delivery (+9£)

so the customer can choose on checkout? Is there a module to do this?


texts: Form Validation is not working for names and phone number min length

texts: Hi I tried all standard method of validation like minlength:6, add  data-mage-init='{"validation":{}}'in form and all standard tags. But validation is not working.Please anyone suggest me


texts: How to remove comma separator from price in magento?

texts:
I want to show my Price like 1000. Now, i have a price like 1,000 on my website.

How i can remove comma separator from price?


texts: Creating Widget via CMS > Widget - Widget only renders on certain block references

texts:
I am digging through my XML layouts for references to widgets and have found app/design/frontend/enterprise/default/layout/widget.xml (this is the parent of my layout). Everything within  were commented out but uncommenting the node didn't help.

How do I ensure that the block reference I want the widget to display in displays?


texts:
I want to upgrade my site 1.7 to 2.0.

Is it possible?

If possible then what the issue face of after upgrade?


texts:
I would like to add a "tax amount" like shown in image below. I could find a setting for it so I presume it will have to be coded somewhere. Anyone?

It is basically the total amount of tax paid. Grand total (inc. tax) - Grand total (excl tax)


texts:
hope you are doing well.
I was trying to run PHP bin/magento setup:upgrade command from the command line on my local dev environment on Windows 10 and to my surprise, I see this error.
php bin/magento setup:upgrade
Cache cleared successfully
File system cleanup:
C:/xampp/htdocs/m2/generated/code/Composer
C:/xampp/htdocs/m2/generated/code/Dotdigitalgroup
C:/xampp/htdocs/m2/generated/code/Klarna
C:/xampp/htdocs/m2/generated/code/MGS
C:/xampp/htdocs/m2/generated/code/MSP
C:/xampp/htdocs/m2/generated/code/Symfony
C:/xampp/htdocs/m2/generated/code/Yotpo
The directory 'C:/xampp/htdocs/m2/generated/metadata/' doesn't exist - skipping cleanup
C:/xampp/htdocs/m2/pub/static/adminhtml
C:/xampp/htdocs/m2/pub/static/deployed_version.txt
C:/xampp/htdocs/m2/var/view_preprocessed/pub
Updating modules:
Schema creation/updates:
SQLSTATE[HY000]: General error: 1036 Table 'C:\xampp\tmp\#sql11368_331_fd.MAI' is read only, query was: SELECT `COLUMNS`.`COLUMN_NAME` AS `name`, `COLUMNS`.`COLUMN_DEFAULT` AS `default`, `COLUMNS`.`DATA_TYPE` AS `type`, IF(IS_NULLABLE="YES", true, false) AS `nullable`, `COLUMNS`.`COLUMN_TYPE` AS `definition`, `COLUMNS`.`EXTRA` AS `extra`, IF(COLUMN_COMMENT="", NULL, COLUMN_COMMENT) AS `comment` FROM `information_schema`.`COLUMNS` WHERE (TABLE_SCHEMA = 'm2') AND (TABLE_NAME = 'catalog_product_bundle_price_index') ORDER BY `ORDINAL_POSITION` ASC

I have researched all over the place but could not find any result.
Any help is highly appreciated. Thanks in advance and have a good day.


texts: How to scroll to first error in Magento 1.9 product page?

texts:
Hi guys I would like to scroll to the first erroneous input on the product page. Currently it doesn't and stays at the bottom.

You then have to manually scroll up till you see the swatch option group that is not selected. So, no visual cue to show at bottom.

I  tried  to run a on DOMNodeInserted function  to see if it has class validation-advice. And if so run the scroll to element.

Didn't works as expected.

So would anyone how know to edit the validation script bottom of product view page in rwd theme or validation.js in magento-root/js/varien/prototype to scroll to the first input/ swatch where this is required is shown.

UPDATE:

Using the answer below I attempted to scroll to the first error (First element element without swatch select).

But, it doesn't work, as previous validation is still being used thus add to cart has to be pressed twice, logically working one step back.

console.log(jQuery(".validation-advice:not([style])"));

Using this line I logged the following:

Showing that first submit returns no element, even though on purpose iv'e selected no swatches, so every option has error. Second submit picks up the error elements. Then I have chosen a swatch for the first option and pressed add to cart again, still it hasn't picked up that the first element no longer has error, the second submit picks it up. This trend continues throughout.

Is the else in the wrong place ?


texts: How do you stop URL Rewrites resetting in CE 1.9?

texts:
This exact question has already been asked here:

URL Rewrite resetting "Permanent" redirects

But it hasn't been answered yet.  This is my first time on this site and I wasn't sure if I should ask a whole new question or 'answer' the other question with the same question.

Basically, I set up URL Rewrites for my some of my categories but they get reset on indexing and (possibly) when I modify categories.

Can somebody please tell me the best solution to this?


texts:
I am trying to separate some business logic from my view.phtml file but can't seem to get the information to display when adding all the necessary files / directories for the module.

I created a new namespace in my app/code/local folder called Product and gave the module a name of FeaturedImage.

This is my Product_FeaturedImage.xml file:

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

Here are the contents of my config.xml file:

<?xml version="1.0"?>
<config>
    <modules>
        <Product_FeaturedImage>
            <version>0.0.1</version>
        </Product_FeaturedImage>
    </modules>
    <global>
        <blocks>
            <FeaturedImage>
                <class>Product_FeaturedImage_Block</class>
            </FeaturedImage>
        </blocks>
    </global>
</config>

I am using my local.xml file to try and insert the block:

<catalog_product_view>
    <reference name='product.info'>
        <block type='FeaturedImage/callout' name='product.info.FeaturedImage.callout' as='product.view.FeaturedImage.callout' template='catalog/product/view/FeaturedImage/callout.phtml' />
    </reference>
</catalog_product_view>

I am using the call -

<!-- BLOCK TESTING -->
    <?php echo $this->getChildHtml('product.info.FeaturedImage.callout') ?>
<!-- END NEW BLOCK TEST -->

I can see the comments when I view source but nothing is appearing in between.

I can also see the module is being recognized when I navigate to system/configuration/advanced/disable modules output but beyond that I am not seeing anything.

Any help here would be greatly appreciated!

Thanks in advance!


texts: Recommended way to Install Magento 2 on shared hosting, Composer or archives

texts:
The Install Guide recommends installing the software using archives (not Composer) for a shared hosting environment.

However, from Magento documentation:

  Everyone who uses the Magento software must install Composer to update components and Magento. If you install Magento using an archive, you don't need Composer to install Magento, but you do need Composer for updates.

And from this article:

  Attention: Because Composer relies on third-party code, we do not recommend Composer for use on production sites.

Then what is the "best" way to install Magento 2?


texts: My shipping get a quote is not working in magento

texts:
I want to show shipping price in product view page. In my view.phtml The shipping get a quote for shipping price is not working .I have called it by

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

I have also called the block in catalog.xml by

<block type="checkout/cart_shipping" name="checkout.cart.shipping" as="shipping" template="checkout/cart/shipping.phtml"/>

Any ideas why it is not working ?


texts:
I did a test with two different versions of Magento 2 and got different results on both.
I did the test using Magento 2.3.1 and Magento 2.3.5-p1.
In both cases I placed an order with a Configurable product without anything special.
Magento 2.3.1

Magento 2.3.5-p1

Looking at the code, I noticed that this condition exists in the file "vendor\magento\module-quote\Model\Quote\Address\Total":
<img src="https://i.stack.imgur.com/b44tP.png" alt="
" />
If I remove this "isChildrenCalculated ()" condition from version 2.3.1 the behavior is similar to 2.3.5.
From what I noticed it has to do with it ['product_calculations'] = self::CALCULATE_CHILD but I didn’t find where I configure it via the screen to change the behavior.
Does anyone know where I change this "product_calculations" value?
Can anyone tell me why I have these two behaviors doing the same process in different versions?


texts: Hide 'Shop by price' left navigation only group product listing page

texts:
I want to hide "Shop By Price" on category page when all product type is group .
 "Shop By Price" filter show when product type is simple product. Magento Enterprise 1.4


texts:
I need to override Mage_Catalog_Model_Resource_Product_Collection, but the rewrite doesn't work...
This is the config.xml file of MY MODULE:

<config>
 <modules>
    <MY_MODULE>
        <version>1.0.0</version>
    </MY_MODULE>
 </modules>
 <global>
.......
   <models>
     <catalog_resource_product>
       <rewrite>
         <collection>MY_MODULE_Model_MODELNAME</collection>
       </rewrite>
     </catalog_resource_product>
   </models>
.......
 </global>
</config>

Any idea?


texts: Magento 1.9 Combine external javascript files

texts:
I run performance test through Pindom tools, I got a result saying I need to combine external JavaScript files. I know Magento has a feature to combine all local JavaScript files into one file. But how to combine the external ones?

It's about these files

https://maps.googleapis.com/maps-api-v3/api/js/29/12/common.js
https://maps.googleapis.com/maps-api-v3/api/js/29/12/controls.js
https://maps.googleapis.com/maps-api-v3/api/js/29/12/geocoder.js
https://maps.googleapis.com/maps-api-v3/api/js/29/12/infowindow.js
https://maps.googleapis.com/maps-api-v3/api/js/29/12/map.js
https://maps.googleapis.com/maps-api-v3/api/js/29/12/marker.js
https://maps.googleapis.com/maps-api-v3/api/js/29/12/onion.js
https://maps.googleapis.com/maps-api-v3/api/js/29/12/util.js
https://maps.googleapis.com/maps/api/js/Authent ... htAKU6FT4fAM4&callback=_xdc_._7duho1&token=81040
https://maps.googleapis.com/maps/api/js/Geocode ... htAKU6FT4fAM4&callback=_xdc_._ja54gz&token=80119
https://maps.googleapis.com/maps/api/js/Viewpor ... 0000&7b0&8e0&callback=_xdc_._vi8nk4&token=113027
https://maps.googleapis.com/maps/api/js/Viewpor ... 00000&7b0&8e0&callback=_xdc_._xp4b9k&token=35277
https://maps.googleapis.com/maps/api/js?key=AIzaSyAA1E2Rcxs8vYcJArt1GKhtAKU6FT4fAM4
https://maps.googleapis.com/maps/vt?pb=!1m4!1m3 ... !4e3!12m1!5b1&callback=_xdc_._7rk4vn&token=43082
https://maps.googleapis.com/maps/vt?pb=!1m4!1m3 ... !4e3!12m1!5b1&callback=_xdc_._7z4nki&token=24193


texts: How to stop Interceptor class rewriting return annotations

texts:
Magento version: 2.2.3

I have a Block class with a method to fetch the designer associated with a product. It is annotated to return a model interface or null.

public function getDesigner(): ?DesignerInterface {
  ...
}

When running Magento in production mode, the system compiles an interceptor class for this Block, but drops the ? in the annotation, resulting in this:

public function getDesigner(): DesignerInterface

This causes a fatal error on product pages where a product does not have a designer associated with it, as the method no longer accepts null as a return value.

First of all, why is Magento modifying my code? This throws a huge red flag for me.

Second, is there any way to disable this?


texts: Magento Shipping the same for certain quantity

texts:
I would like to make it so that a certain quantity of a product has the same exact shipping price and when the quantity goes over the threshold, the shipping price doubles.

For example, for product X, the shipping price is Y for quantities 1-12. For 13-24, the shipping price is Yx2, for 25-36, it's Yx3 and so on.

The reason for this is the manufacturer considers anything in a box of 12 (whether it actually has 12 or not in there) is a certain "weight" (the weight is how much it would be if it was 12 products, even if there is less than 12 products in there).

To make thing a little more difficult, the shipping is not a flat rate throughout the website. Each product has a different weight and needs to be calculated differently from one another.

I hope this makes sense. It's very hard to explain over text. I'm new to Magento so I have no idea how to start looking for a solution.


texts: How to generate/export a custom format of CSV file?

texts:
I hope some one can help me.

Now, I want to generate a csv file of my sales order, but I think existing magento 2 csv format is not fulfill my expectation.
Could anyone can help me how to generate the below CSV file format through magento 2 admin export function.

Thanks!

The below image is my expect CSV data format result:


texts: how to add serch function using ajax in magento

texts: i want to add search function in which firstly there will be three select box but two of will be disabled when user select some value from or or say example year from drop down then second field is enabled which has car company name relevant to that year and after selecting car company relevant model no opens and then after selecting relevant car model no its parts list will be open and following will be search. so can anyone tell me how to start this. which files i have to add or change for this.


texts:
I'm trying to change an extension's code, and I need to display some variable contents from code files (app/code/community/extension/block/file.php) in order to be able to track down the changes I make.

Is that possible? Cause using php "echo" in those files has no effect on website frontend.


texts: Magento 2 Get product attributeId in foreach loop

texts:
I have a collection of product I am looping and displaying for E.G

...
$product->getName()
...
$product->getProductUrl()
...

Now Also I am getting it some option like attributeText foreach product E.G

$product->getAttributeText('color') // this gives me red,green,blue so on...

Now My question is how do I get ID:

  $product->getAttributeId('color')

I know that in \Magento\Catalog\Model\Product there is a function like so:

/**
 * Get attribute text by its code
 *
 * @param string $attributeCode Code of the attribute
 * @return string
 */
public function getAttributeText($attributeCode)
{
    return $this->getResource()->getAttribute($attributeCode)->getSource()->getOptionText(
        $this->getData($attributeCode)
    );
}

I could and I did test and it worked so potentially I could do a function :

 public function getAttributeId($attributeCode)
{
    return $this->getResource()->getAttribute($attributeCode)->getSource()->getOptionId(
        $this->getData($attributeCode)
    );
}

That works but how to implement this outside of vendor folder or if there is another way to get the id even better please share.

Thanks.


texts: Compiling Error: Enabled Compilation before Running a Compile

texts:
I went to System > Tools > Compilation and "enabled" before anything was actually compiled and my site returned this error:

Fatal error: Class 'Mana_Filters_Resource_Setup' not found in /home/kokorugs/public_html/store/includes/src/Mage_Core_Model_Resource_Setup.php on line 234

I did some research and believe my answer is below:

Judging by the include warning, it seems like you have the compiler enabled but it cannot find the (flattened) file.

So either disable the compiler:

php shell/compiler.php disable

Or run a compilation so that it will generate the file for you:

php shell/compiler.php compile

My question is:

Where do I enter something like php shell/compiler.php compile?


texts: Running Magento 2 via FastCGI (not mod_php) on OS X via brew Packages

texts:
Based on various forum postings and conversations in the community, it seems like some folks are running Magento 2 development instances on OS X via a PHP environment that doesn't use the built-in Apache/PHP combo and instead uses packages from brew to get a FastCGI PHP environment up and running with nginx and/or apache.

Does anyone have a list of commands and configuration instructions for getting Magento 2 up and running on OS X using brew packages OR some other means for running PHP in a FastCGI environment on OS X?  I'm not looking for Docker or Vagrant -- I want to run PHP natively on OS X and dont want to use mod_php.


texts: Need suggestion regarding Data migration from Magento 1 to Magento 2

texts:
I have done data migration from Magento 1 to Magento 2 using data migration tool.
The site is still not launched and my Magento 1 site is still live.
Now my client has some requirements, for which i want some suggestion.

I want to again migrate only products from Magento 1 to Magento 2(The existing site where migration was done earlier)
I want to make changes into the products pricing, attributes etc etc in Magento 2.
After doing that i want to migrate only orders and customers into Magento 2 existing site. No product migration needed again.
Then , this site will be launched.
I want to work on the same magento 2 environment . I don't want to again setup fresh magento for all these migration.

Is this scenario feasible. If yes, then how?
Is there an extension that will help me in doing this?


texts: Convert Magento 1 PHTML Code to Magento 2

texts:
I have a template from a customer's Magento 1 theme that I need to move to M2. The theme isn't the same but the template does what I need it to on M1 and I need this in Magento 2.

        <?php
        $parentCategoryId = 20;
        $cat = Mage::getModel('catalog/category')->load($parentCategoryId);
        $subcats = $cat->getChildren();
        foreach(explode(',',$subcats) as $subCatid){
            $_category = Mage::getModel('catalog/category')->load($subCatid);
            if($_category->getIsActive()) {
                $image = Mage::getBaseUrl('media') . 'catalog/category/' . $_category->getThumbnail();
                $imageCheck = $_category->getThumbnail();
                $name = $_category->getName();
                echo '
';
                    echo 'getUrl() . '">';
                        if ($imageCheck == ''){ $image = $this->getSkinUrl('images/noPic.jpg'); }
                        echo '';
                        echo '
' . $name . '
';
                    echo '';
                echo '
';
            }
        }
        ?>

This is PHTML from M1, which I did not write. In effect, it loads all subcategories of a parent category then displays them in a grid with the category title and thumbnail. If I have to create a small extension then call what I need in a PHTML, that's fine but I'm still a little new to M2 so I'm not sure where to start.

I did find this answer and I'm using the top bit with the object manager: https://magento.stackexchange.com/a/201951/69191

I know that's probably not the best practice but is it passable in a template file, or is there a better way?


texts:
What I am doing is nothing but just injecting some custom code/script via reference before_body_end of layout handle onestepcheckout_index_index (some third party module for one step checkout).

I have custom module for doing this which looks like:

Module: app/etc/modules/MagePsycho_Autofill.xml

<config>
    <modules>
        <MagePsycho_Autofill>
            <active>true</active>
            <codePool>local</codePool>
            <depends>
                <Idev_OneStepCheckout />
            </depends>
        </MagePsycho_Autofill>
    </modules>
</config>

Layout: app/design/frontend/[package]/[theme]/layout/magepsycho_autofill.xml

<?xml version="1.0"?>
<layout version="0.1.0">
    <onestepcheckout_index_index>
        <reference name="before_body_end">
            <block type="magepsycho_autofill/autofill" template="magepsycho_autofill/autofill/checkout_scripts.phtml" name="magepsycho_autofill.checkout_scripts" as="autofill_checkout_scripts" />
        </reference>
    </onestepcheckout_index_index>
</layout>

And the custom module is working fine i.e. injects the checkout_scripts.phtml to third party page.

BUT the problem is, all the translation of third party module is gone.

And if you remove the <depends /> node, the translation of labels works fine but the custom module file is not injecting into the third party page. That's the reason I used <depends /> node.

I tried to x-debug the translation, in both cases (with and without <depends /> node) values for $code $text were the same and that was related to the third party itself. Even I tried to set the setModuleName() to third party name in my block class but nothing is changing.

Can anyone tell me why and how to fix this weird behavior of translation?


texts: Am working in magento 1.9.2.3. The configurable color swatches is not working in list page of mobile view while it is working fine in list page of desktop view.It is also working well in details page of mobile view.Only in list page it is not working properly. Someone kindly help me to resolve this issue.


texts: Display Navigation Only If User is Logged In

texts:
I would like to offer my product catalog only to customers that are logged in.

Is there a way I can hide my category navigation from visitors that aren't logged in to their account?


texts: How to put the text "Incl VAT" before incl price?

texts:
Where do I put the text "Incl VAT" before price? I found 'Excl VAT' but I can't find 'Incl VAT'.

I know how to display both in and excl but not how I put the text "incl vat" before the price.

https://www.dropbox.com/s/w8yok1f3mv5gxot/Schermafdruk%202018-08-06%2010.13.58.png?dl=0


texts:
I'm working on a Magento module for the past month, and everything works great on my local machine. Then I decided to release the module as a beta and test it online in a newly installed store, and after installing it from CLI, I'm getting this error:

Werules\Chatbot\Block\Webhook\Messenger Missed required argument request in parent::__construct call. File: /htdocs/magento2/app/code/Werules/Chatbot/Block/Webhook/Messenger.php

Why is that happening? Here is the file app/code/Werules/Chatbot/Block/Webhook/Messenger.php

namespace Werules\Chatbot\Block\Webhook;

class Messenger extends \Werules\Chatbot\Block\Webhook\Index
{
    protected function processRequest()
    {
        // SOME CODE HERE
    }
}

and app/code/Werules/Chatbot/Block/Webhook/Index.php

namespace Werules\Chatbot\Block\Webhook;

class Index extends \Magento\Framework\View\Element\Template
{
    protected $_helper;
    protected $_chatbotAPI;
    protected $_messageModel;
    protected $_objectManager;
    protected $_define;
    protected $_request;

    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Framework\ObjectManagerInterface $objectManager,
        \Werules\Chatbot\Helper\Data $helperData,
        \Werules\Chatbot\Model\ChatbotAPI $chatbotAPI,
        \Magento\Framework\App\Request\Http $request,
        \Werules\Chatbot\Model\MessageFactory $message
    )
    {
        $this->_helper = $helperData;
        $this->_chatbotAPI = $chatbotAPI;
        $this->_request = $request;
        $this->_messageModel = $message;
        $this->_objectManager = $objectManager;
        $this->_define = new \Werules\Chatbot\Helper\Define;
        parent::__construct($context);
    }
}

What I am doing wrong? Thank you.

EDIT: I'm extending another block from my module, is that a bad thing? Maybe this is the problem?


texts:
I tried to override magento/module-checkout/view/frontend/web/js/view/shipping-address/address-renderer/default.js

For this in my custom module i have created under Module/Namespace/view/frontend, the file with the name requirejs-config.js with this content:

var config = {
    'map' :{
        '*': {
            'Magento_Checkout/js/view/shipping-address/address-renderer/default':'Module_Namespace/js/view/shipping-address/address-renderer/default'
        }
    }
};

Under Module/Namespace/view/web/js/view/shipping-address/address-renderer
i have created the file default.js

after i clean the cache on the console i have this err msg:

Failed to load resource: the server responded with a status of 404 (Not Found)
(index):1 Refused to execute script from '.../static/version1524065927/frontend/Magento/luma/en_US/Module_Namespace/js/view/shipping-address/address-renderer/default.js' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.

Does anyone know why this happend and is not working?

Note: I am on developer mode!


texts: How can I best handle variable listings with multiple options and keep stock stock levels correct?

texts:
I am trying to work out how to best offer 4 new new products that are made up of three main choices (Frame Kits / Wheelsets / Finishing Kits).

Bike frame and fork kits or full build (two options)?
Aluminium Wheelset or Carbon Wheelset or Non Required (three options)
Finishing Kits - everything else needed to complete the mtb (six options)

The reason I am finding this idea so complicated is stock control. As for number 2 in the above list we have 6 different wheelsets to cover all 4 different frames and for number 3 in the list the the 5 different groupsets will go with any frame.

So my question is, is there a better way than making a listing for every combination and watching stock levels manually?


texts: How to fetch new products from all category in magento 1.7.0?

texts:
I want to show latest added products from all or some specific categories on home page.
I'm trying in this way, I have created a block and the block code is here :

 protected function _getProductCollection()
    {
    parent::__construct();
    $storeId    = Mage::app()->getStore()->getId();
    $todayDate  = Mage::app()->getLocale()->date()- >toString(Varien_Date::DATETIME_INTERNAL_FORMAT);

    $products = Mage::getModel('catalog/product')->getCollection()
        ->addAttributeToSelect('*')
        ->addAttributeToSort("entity_id","DESC")
        ->addAttributeToSelect(array('name', 'price', 'small_image'))
        ->setVisibility(Mage::getSingleton('catalog/product_visibility')->getVisibleInSiteIds())
        ->setOrder($this->get_order(), $this->get_order_dir());

    if(Mage::getStoreConfig('catalogextensions/config4/max_product'))
    {
        $products->setPageSize(Mage::getStoreConfig('catalogextensions/config4/max_product'));
    }

    Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($products);
    Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($products);
    Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($products);

    $this->_productCollection = $products;

    return $this->_productCollection;
}

But it only showing me last category's products. Suppose I have Imported 100 products for a xyz category then it  showing me products from xyz category only. But I don't want this. I want to show new products from all or some specific category. Any help will be great appreciable.


texts:
On a (donuts) site I'd like to show some different text on a product page with ID 171.

The quantity I have translated to "ammount of boxes", but on one product page I need to change the text "ammount of boxes" to "quantity or ammount"

I'm not sure where to look, when I look at view.phtml (/default/template/catalog/product/view.phtml)

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

In what file do I change this? And how? Is there a way to say: when ID is: x , then do: y, else: z?


texts: Magento 2 : Hide shipping method if customer not logged in

texts:
I want to hide shipping method when user is not logged in in checkout page.

After selecting the city shipping methods to be shown in checkout page.

So, Is there any solution for this I have try this code :

if (!customer.isLoggedIn()) {
       self.visible(false);
}

But its not working as i want. when I put this code in my shipping.js file near about line no 123-124 inside initialize function it hides whole form includes registration form and shipping method, So I need to hide only the shipping method

Thanks


texts: The Content Security Policy was delivered in report-only mode, but does not specify a 'report-uri'

texts:
How can I fix this error, which is showing in the browser console in the customers backend area:

The Content Security Policy 'font-src 'self' 'unsafe-inline';
form-action secure.authorize.net test.authorize.net
geostag.cardinalcommerce.com geo.cardinalcommerce.com
1eafstag.cardinalcommerce.com 1eaf.cardinalcommerce.com
centinelapistag.cardinalcommerce.com centinelapi.cardinalcommerce.com
'self' 'unsafe-inline'; frame-ancestors 'self' 'unsafe-inline';
frame-src secure.authorize.net test.authorize.net
geostag.cardinalcommerce.com geo.cardinalcommerce.com
1eafstag.cardinalcommerce.com 1eaf.cardinalcommerce.com
centinelapistag.cardinalcommerce.com centinelapi.cardinalcommerce.com
www.paypal.com www.sandbox.paypal.com 'self' 'unsafe-inline'; img-src
widgets.magentocommerce.com www.googleadservices.com
www.google-analytics.com t.paypal.com www.paypal.com
www.paypalobjects.com fpdbs.paypal.com fpdbs.sandbox.paypal.com
*.vimeocdn.com s.ytimg.com 'self' 'unsafe-inline'; script-src assets.adobedtm.com secure.authorize.net test.authorize.net
geostag.cardinalcommerce.com 1eafstag.cardinalcommerce.com
geoapi.cardinalcommerce.com 1eafapi.cardinalcommerce.com
songbird.cardinalcommerce.com includestest.ccdc02.com
commerce.adobedtm.com js.authorize.net jstest.authorize.net
www.googleadservices.com www.google-analytics.com www.paypal.com
www.sandbox.paypal.com www.paypalobjects.com t.paypal.com
js.braintreegateway.com use.typekit.net p.typekit.net
amcglobal.sc.omtrdc.net commerce.adobe.net magento-recs-sdk.adobe.net
s.ytimg.com video.google.com vimeo.com www.vimeo.com
cdn-scripts.signifyd.com www.youtube.com 'self' 'unsafe-inline'
'unsafe-eval'; style-src getfirebug.com 'self' 'unsafe-inline';
object-src 'self' 'unsafe-inline'; media-src 'self' 'unsafe-inline';
manifest-src 'self' 'unsafe-inline'; connect-src api.magento.com
geostag.cardinalcommerce.com geo.cardinalcommerce.com
1eafstag.cardinalcommerce.com 1eaf.cardinalcommerce.com
centinelapistag.cardinalcommerce.com centinelapi.cardinalcommerce.com
commerce.adobedtm.com 'self' 'unsafe-inline'; child-src 'self'
'unsafe-inline'; default-src 'self' 'unsafe-inline' 'unsafe-eval';
base-uri 'self' 'unsafe-inline';' was delivered in report-only mode,
but does not specify a 'report-uri'; the policy will have no effect.
Please either add a 'report-uri' directive, or deliver the policy via
the 'Content-Security-Policy' header.

I have no idea why this error shows, please help.


texts:
This is a part from  Magento_Checkout/web/template/minicart/item/default.phtml file:

Adding the following line inside that foreach loop, breaks content.

But the same line (span) works ok anywhere else in the code file.
Am I missing some kind of syntax rule here?


texts: Unable to make Magento2 configuration settings effective

texts:
Magento 2.1 site, with varnish cache configured.

But whenever I make changes (e.g. changed "payment methods") at configuration of admin end, the changes are not effective on the front end. I can see the settings have been changed at the admin backend.

I also cleared all the caches, flushed magento caches; index management is set to "update on save".

So what am I missing here? Thanks for your advice!


texts: Magento 2 : Unable to create product on magento 2 store using rest api

texts:
{message: "Consumer is not authorized to access %resources",…}
message
:
"Consumer is not authorized to access %resources"
parameters
:
{resources: "Magento_Catalog::products"}
resources
:
"Magento_Catalog::products"

Already Checked: Token is ok for admin
Already Checked: Bearer token with space
Already Checked: All access Allowed from admin panel As Admin


texts: How to Include CSS for Home Page only in Magento 2

texts:
I want to load css file only in home page alone.

I have tried with this way,but it loads on every page.

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <css src="Banners::css/banners.css" />
    </head>
</page>

Please let me know how to add condition in layout xml file like we do on old magento layout file

 <catalog_product_view translate="label">
        <reference name="head">
            <action method="addJs"><script>varien/product.js</script></action>
            <action method="addJs"><script>varien/product_options.js</script></action>
            <action method="addJs"><script>varien/configurable.js</script></action>
        </reference>
 </catalog_product_view>


texts: List all EAV Attributes of an entity_type_id via SQL

texts: How can I obtain the list of all EAV attributes of a specific entity (by its entity_type_id) via SQL?


texts: Magento 2 Google Analytics code cannot be found in FE html

texts: I have set up in M2 Google analytics code and it cannot be found in FE html pages.


texts:
I have a magento project which is in remote server. I have admin access to the website and to the source code. The problem is that when i make changes to the php pages in my code, they do not take effect in the website even when i clear the magento cache from backend. I'm relatively new on magento so maybe i there an option in backend to prevent changes.

Thank you in advance.


texts: Magento 2 getAllStatusHistory() after Paypal Express payment

texts:
Im trying to get the Status history from order (after placing the order) with $order->getAllStatusHistory(), while in checkout, paying with credit card, I manage to retrieve the Status history of the current order.
However cheking out with Paypal express I get no data with $order->getAllStatusHistory().

What is the difference between the two methods that avoids getting this data?


texts:
Building a custom module and would like to have this option implemented so user will not be able to upload image if the width and height is not as specified. :P

Found this example:

public function validateUploadFile($filePath) {
    $testsize[] = getimagesize($filePath);
    if (!(getimagesize($filePath)) || ($testsize[0][0] < 900) || ($testsize[0][1] < 900)) {
    Mage::throwException($this->__('Image size must be same or greater than 900px * 900px .'));
}
    $_processor = new Varien_Image($filePath);
    return $_processor->getMimeType() !== null;
}

but not sure if it works (not tested yet).
If anyone know how to and where to add this code .... should I rewrite image upload function or ....

Sorry guys, I should mention that I'm talking about admin not customer side.


texts:
We are a team working with Magento 1.7. In order to manage deployment between different developer working with the same database of Magento. We suggest to use binary logs.

Each developer will possess his own Magento environment in localhost. To deploy into server, we are using Git for deploying files, and for the database, each developer has Mysql Workbench to generate a binary log of his database, each binary log will be deploying into server and Git will synchronise one database into server.

We prefer avoiding working in the same database. What do you think about this solution? Any suggestions please.


texts: Magento 2.3 add shipping line to cart totals

texts:
We use a quite simple shipping cost line. When the total is below 29.95 it adds 5.95 for shipping. If the subtotal is above 29.95 it is free.

Now I want to extend the default totals column in the cart, that between the subtotal and VAT we can add a line that adds the shipping.

We want to easily check if the subtotal is below 29.95 and than show the price, else we want to show the line: Free.

How can we achieve this?

I already tried the following in, but that does not work. It seems that it can not check the subtotal in that file; /app/design/frontend/theme/theme/Magento_Tax/web/template/checkout/cart/totals/shipping.html

Code:


texts: How to get product collection with different page sizes?

texts:
I need to get 29 products on page #1 and need to get 26 products from page #2 to the last page number without duplication.
I'm setting page size as 29 in the first page and 26 from the second page, the issue here is 3 products will be appearing again in the second page as we are setting 26 as the page size.
for example, we have 56 products.

page number #1, we are getting 29 products from 1-29.
page number #2, we are getting 26 products from 27-52.

here 27 - 29 products will be coming again in 2nd page.
how to solve this?


texts: Magento 2 - setDefaultOrder on Catalog pages

texts:
I've added this to category_category_view.xml under Magento_Catalog->layout in my custom theme. It's not working and I can't figure out why.

    <referenceBlock name="product_list_toolbar">
        <action method="setDefaultOrder">
            <argument name="dir" xsi:type="string">name</argument>
        </action>
        <action method="setDefaultDirection">
            <argument name="dir" xsi:type="string">desc</argument>
        </action>
    </referenceBlock>

I can't find any examples of this for Magento 2 anywhere.


texts: Magento2 : ReferenceError: jQuery is not defined

texts:
I am trying to add custom jquery code into my module but it is not working.

app/code/Custom/Module/view/frontend/web/js/my.js

jQuery.noConflict();
jQuery(document).ready(function(){
    alert('ok');
});

app/code/Custom/Module/view/frontend/layout/default.xml

<?xml version="1.0" encoding="UTF-8"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <script src="Custom_Module::js/my.js"/>
    </head>
</page>

In console, I am getting the error message

ReferenceError: jQuery is not defined

How to fix this issue.


texts: Only allow free shipping if any product of a specific category is also ordered?

texts: I want to allow free shipping just in that case if any product of a specific category is also in the cart. Is it possible?


texts: how to custom value which will be exported?

texts:
I have a grid and buttons for exporting like this.

There is field status in my grid.  The value is 1 or 0. After exporting the grid, the value of this status is 1 or 0 in the CSV file. How can I make this value become "Yes" when the status is 1 and "No" when the status is 0 in the CSV?


texts:
I've downloaded the latest CE version 1.9.1.0, and successfully patched the installation with the SUPEE-4829 patch.

I see 2 other patches that could apply to 1.9.1 - SUPEE-1533 (Addresses two potential remote code execution exploits) and SUPEE-4291/4334 (This patch addresses the USPS API changes...). I've tried to apply these patches but get these error messages:

SUPEE-1533.sh

Checking if patch can be applied/reverted successfully...
ERROR: Patch can't be applied/reverted successfully.
patching file app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php.rej
patching file app/code/core/Mage/Adminhtml/controllers/DashboardController.php
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file app/code/core/Mage/Adminhtml/controllers/DashboardController.php.rej

SUPEE-4291/4334

Checking if patch can be applied/reverted successfully...
ERROR: Patch can't be applied/reverted successfully.
patching file app/code/core/Mage/Usa/Model/Shipping/Carrier/Usps.php
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
patch unexpectedly ends in middle of line
2 out of 2 hunks ignored -- saving rejects to file app/code/core/Mage/Usa/Model/Shipping/Carrier/Usps.php.rej

These patches were made executable (chmod +x scriptname.sh), and were run using both sh scriptname.sh and ./scriptname.sh, but I still get the same messages.

I'm breaking my head over what could be wrong with the shell scripts, so are these patches severely important?

thank you


texts:
I'm making some tests in Magento reindex process and I locked the stock index process.

How can I unlock this process?

Design Config Grid index has been rebuilt successfully in 00:00:02
Customer Grid index has been rebuilt successfully in 00:00:03
Category Products index has been rebuilt successfully in 00:00:00
Product Categories index has been rebuilt successfully in 00:00:00
Product Price index has been rebuilt successfully in 00:00:00
Product EAV index has been rebuilt successfully in 00:00:00
Stock index is locked by another reindex process. Skipping.
Catalog Rule Product index has been rebuilt successfully in 00:00:00
Catalog Product Rule index has been rebuilt successfully in 00:00:00
Catalog Search index has been rebuilt successfully in 00:00:06


texts: Extend Mage_Sales_Helper_Data doesn't work

texts:
I would like to add a function in Mage_Sales_Helper_Data without editing or copy of the original file. So I try to extend it, but this code doesn't work

I have created a config.xml in this folder app\code\local\ML\etc

<?xml version="1.0"?>

<config>
    <modules>
       <ML_Sales>
            <version>0.0.1</version>
       </ML_Sales>
   </modules>
   <global>
      <helpers>
       <sales>
         <rewrite>
           <data>ML_Sales_Helper_Data</data>
         </rewrite>
        </sales>
      </helpers>
   </global>
</config>

And then in app\code\local\ML\Sales\Helper I have created Data.php

<?php
require_once('Mage/Sales/Helper/Data.php');
class ML_Sales_Helper_Data extends Mage_Core_Helper_Data {
    public function getOrderHistoryUrl()
    {
        return $this-> _getUrl('sales/order/history');

    }

}
?>

Finally into my app\design\frontend\my_package\default\layout\local.xml I wrote this code for get the link of  "My Order" on  my account navigation

 <reference name="top.links">
            <action method="addLink" translate="label" module="sales">
                <label>Orders</label>
                <url helper="sales/getOrderHistoryUrl"/>
                <title>My Orders</title><prepare/>
                <urlParams/>
                <position>50</position>
            </action>
</reference>

and also in app\etc\modules

 <ML_Sales>
        <active>true</active>
        <codePool>local</codePool>
     </ML_Sales>

What is wrong? Can someone please help me?


texts: how to add attribute to sales_flat_invoice table

texts:
What is the proper way to add new custom attribute to sales_flat_invoice table?

I need to extend this table in order to mark that the payment was made, so subsequent updates do not trigger connection to external system.


texts: How to upgrade Redis and ElasticSearch in Magento Cloud?

texts:
I'm running a Magento 2.3 Cloud with many issues related to Redis requests.
We run the Redis 3, and the recommended version to have a better performance in the dev docs is the version 5 to M2.3, the same to Elasticsearch 6.8 instead of 6.5.
I wonder if I can upgrade the Redis version just changing the version in the services.yaml file?
mysql:
    type: mysql:10.0
    disk: 8192

redis:
    type: redis:3.0

elasticsearch:
    type: elasticsearch:6.5
    disk: 1024


texts: magento 2 programatically get cart items of customer using customer id?

texts:
protected $quoteFactory;

protected $quoteModel;

public function __construct(
    ...
    \Magento\Quote\Model\QuoteFactory $quoteFactory,
    \Magento\Quote\Model\ResourceModel\Quote $quoteModel
    ....
) {
    ....
    $this->quoteFactory = $quoteFactory;
    $this->quoteModel=$quoteModel;
    ....

}
$customerId=8;
     $quote = $this->quoteFactory->create();
     $customerQuote=$this->quoteModel->loadByCustomerId($quote,$customerId);
 // where `$customerId` is your `customer id`
     $items=$customerQuote->getAllItems();
     print_r($items);


texts: Magento 2.4.2 - Addtocart Button Disabled

texts:
Is anyone using Magento 2.4.2 version?.
In list page,list.phtml file  Add to Cart button is disabled.
How we can enable the Add to Cart button. Kindly confirm.
Thanks.


texts: How to define default language behind selected one for backend

texts:
I've selected Spanish language for the back end and the translation is not completed. I understand that, but there is a problem: if translation is not available, the text is shown in German.

I can't find anywhere why this is happening.

How can I define English as default (or "in case of not finding") language?

How can I remove German as module (magento/language-ge_ge).

I've tried but it says that has dependencies.


texts: After server transfer some commands wont work

texts:
Hello yesterday i transfered my store to new server (Ubuntu 18).
After clean installion of Magento i want to run via cli command for the backup but i takes this message  -bash: bin/magento: Permission denied
Any suggest?


texts: Magento admin panel not working in chrome

texts: I installed latest version of magento in my Localhost but when i opened this on my server, the admin panel not redirect in chrome but on Firefox it works very well.. What the reason of this situation


texts: 1.6 Theme Customer Login not working in 1.9.1 magento

texts:
Everything works great apart from the login page (unless its loging in at checkout).

Where do I start editing the theme to make the login page work?

Thanks

Henry


texts: How to setup a new custom module in Magento2

texts:
I added a new module to config.php, then I ran php -f bin/magento setup:upgrade

This is what I got:"Please re-run Magento compile command"
And the module I added gets deleted from config.php

Anyone knows why?


texts:
our product detail pages (bundle products) load very slowly (10-20 seconds, most of it is scripting time). There is no caching (FPC is enabled) and every time the page is reloaded, the complete scripting including the price calculation of all 500 bundle item is carried out anew. I followed all other tips (script bundling, minifying, gzipping, production mode, ..).
Does anyone have any idea how to enable caching here (or how to speed this scripting up)? The following is used: Magento 2.1.0 CE. Has there been any progress in this regard in a newer version?
Thanks for every tip!


texts: Importing products takes too long on a fresh install of Magento 2 v2.2.4

texts:
Backstory:

Suddenly, my MySQL database for Magento 2 has failed and been corrupted (This is a development installation and used to enter products data) and I don't have backup of the database except a .csv file that I exported from the admin dashboards few days before the disaster hit.

Now I'm left with only this product export of this data and I don't have any other record of my 800+ products.

What I did:

I installed a new Server with a fresh install of Magento 2 downloaded directly from the official website and as soon as everything was working, I took an image and a snapshot of the server.

Now everytime I try to import the products and click on 'check data' it just hang for hours with Please Wait... message

Then I redo this process after restoring the server to the screenshot with the same result.

Technical Details:

PHP 7.1
Apache 2
MySQL 5.7
Magento 2.2.4


texts: Magento 2: how to move the category add to wishlist and compare actions next to the price

texts:
I'm struggling with a theme change. I would like to move the add to wishlist and add to compare actions from next to the add to cart button to next to the price.

what my theme (unfinished) looks like now:

what the designer wants:

I am trying to avoid copying a bunch of phtml files in my theme, I have seen it is possible to move the element with

<move element="category.product.addto.compare" destination="destination" />

however Im wondering how can I find the layout name of the price section? Path hints show me the phtml files and the block class names but does not seem to help me find the *layout names.


texts: Magento 2.3: CRON job is not working in custom module

texts:
I have created a module for collecting customer data from the Magento database and sending them as a CSV file to another server by hitting the controller URL in browser.

Now, I want it to be send automatically so that I want to set a CRON job.

So in order to create the CRON job, I have referred the below tutorial:

https://www.mageplaza.com/devdocs/magento-2-create-cron-job/

However, when I run the cron, the file is not being send to another server. But, when I check the log file, I can see the CRON was ran successfully.

I'm not sure what am I missing. Could anyone please guide me?

Your help will be appreciated!


texts: Magento 2 : How to add a shipping charges via Cart price Rules?

texts:
In Magento 2 It is possible to add shipping charge if specific category product is available in cart.

If not then please suggest me another way.

Thanks in advance..!


texts: Additional Checkout Attributes are not displayed on shipping method tab

texts:
I use the following extension to include additional fields in my checkout process.

http://www.fmeextensions.com/magento-additional-checkout-attributes-fields.html

However when I select the created custom field to be displayed on the shipping method screen, it is not displayed.

For shipping methods I use

- MSP_FlatShipping5 1.0.4 (stable)
- Owebia Shipping 2

The support of FME says that both extensions are not supported by their plugin.

Does anybody know how I can ensure that the selected fields for shipping method are also displayed on this tab?


texts: Shopping Cart Price Rule free shipping only for quantity subset of the same product?

texts:
I would also like to apply free shipping to only 6 products that match SKUS A-D.  For example, if I have 8 of product A, free shipping should apply to only 6 of those products.  Right now, my shopping cart price rule is providing free shipping for any combination of products A-D with a quantity of 6 or greater.  For example, I can checkout with 8 of product A and get free shipping on the entire order.  How can I limit free shipping application to only 6 products matching SKUs A-D?  My shopping cart rule is:

Conditions

If ALL of these conditions are TRUE:
    If an item is FOUND in the cart with ALL of these conditions true:
        SKU is one of A, B, C, D
        Quantity in cart equals or greater than 6

Actions

Update prices using the following information
    Apply: Fixed amount discount for whole cart
    Discount Amount: 17.00
    Maximum Qty Discount is Applied to: 6
    Discount Qty Step (Buy X): 0
    Apply to Shipping Amount: No
    Free Shipping: For matching items only
    Stop Further Rules Processing: No

Apply the rule only to cart items matching the following conditions

    If ALL  of these conditions are TRUE :
        Quantity in cart  equals or greater than  6
        SKU is one of A, B, C, D


texts: since SUPEE-6788 shop name is missing in Emails

texts:
hi we have an email template for our orders with this subject

{{block type="imprint/field" value="shop_name"}}: Rechnung Nr. # {{var invoice.increment_id}} für Bestellung Nr. # {{var order.increment_id}}

since SUPEE-6788 the shop name is not printed, has anyone else the Problem?

The shop name under System->Configuration->General->Imprint->"Shop Name" is still filled for all stores


texts: Magento 2 - Overriding a built in magento widget - configurable products dropdown

texts:
I'm trying to make some changes to the configurable product dropdowns in the front end product display on Magento 2.1.0.  I want to do this through re-writing the configurable javascript widget.

I created a requirejs-config.js in app/code/myMod/blah/view/frontend/requirejs-config.js.  It looks like this:

var config = {
  map: {
    '*': {
      configurable: 'myMod_blah/js/configurable'
    }
  }
};

I have my new copy (with just one line added so I can recognize it) of the configurable.js file here:
app/code/myMod/blah/view/frontend/web/js/configurable.js

When I look at the contents of the requirejs-config.js file on the page I can see my config very close to the top, but then near the bottom is still the old config that looks like:

var config = {
    map: {
        '*': {
            configurable: 'Magento_ConfigurableProduct/js/configurable'
        }
    }
};

And, when I look at the contents of the configurable.js file in the source of the loaded page, sure enough, it's the magento default version, not mine (it doesn't have the line I added).

What am I doing wrong?

Edit: I believe my question is directly related to this previous question, which has a workaround, but not an actual answer: Magento 2: How to override core js module price-bundle.js

Edit #2 - this work around works, when I preface my company/mod directories with zzmyMod and zzBlah, the correct js file shows up, because, as I guessed, it is added to requirejs-config.js AFTER all the magento stuff instead of before and therefore gets processed after magentos own definition for "configurable."  I'd still really like to know how to fix this because I don't like naming my module this way.


texts: Magento compilations error after deploy - Theme Porto

texts:
my site with Magento 2 and Porto Theme.
I have installed a new extension and after run the deploy command like as:
php bin/magento setup:static-content:deploy
Show these errors:
Compilation from source: /var/www/html/newescoda/vendor/magento/theme-frontend-blank/web/css/styles-m.less
variable @collapsible-nav-item-hover is undefined in file /var/www/html/newescoda/var/view_preprocessed/pub/static/frontend/Smartwave/porto_child/en_US/Magento_MultipleWishlist/css/source/_module.less in _module.less on line 337, column 54
335|                             text-decoration: none;

  The contents from the "/var/www/html/newescoda/pub/static/frontend/Smartwave/porto_child/en_US/css/styl
  es-m.css" file can't be read. Warning!file_get_contents(/var/www/html/newescoda/pub/static/frontend/Sma
  rtwave/porto_child/en_US/css/styles-m.css): failed to open stream: No existe el fichero o el directorio

Please Could you help me?


texts: Magento 2: Path to place footer.phtml in custom theme

texts:
My Theme Path:

app/design/frontend/Mycompany/mytheme/

My Problem:

Following this tutorial
I thought that I could use the below path to override the footer.phtml template:

app/design/frontend/Mycompany/mytheme/Magento_Theme/templates/html/footer.phtml

I copied and pasted the footer.phtml from here and added
Test Test
.

<?php
/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
// @codingStandardsIgnoreFile
?>

Test Test

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

<?php /* @escapeNotVerified */ echo __('Help Us Keep Magento Healthy') ?> - <?php /* @escapeNotVerified */ echo __('Report All Bugs') ?>

        <address><?php /* @escapeNotVerified */ echo $block->getCopyright() ?></address>

But I'm not seeing my changes. Am I using the wrong path?


texts: Billing section in checkout process loading for long time

texts: I just installed a fresh magento1.9.2.3 and tried to checkout with some products in the cart.The Billing information section is just loading and not moving to next step. Someone Kindly help me to get this issue resolved.


texts: Override community plugin model - Magento 1.9

texts:
Hi guys I have a plugin that I need to amend!

The file I need to change is:
/app/code/local/Magestore/Pdfinvoiceplus/Model/Sales/Order/Invoice.php

Here are my plugin files:

/config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Company_InvoiceEmail>
            <version>0.0.1</version>
        </Company_InvoiceEmail>
    </modules>
    <global>
        <models>
            <invoiceemail>
                <class>Company_InvoiceEmail_Model</class>
            </invoiceemail>
            <magestore_pdfinvoiceplus>
                <rewrite>
                     <sales_order_invoice>Company_InvoiceEmail_Model_Sales_Order_Invoice</sales_order_invoice>
                 </rewrite>
             </magestore_pdfinvoiceplus>
        </models>
    </global>
</config>

/app/code/local/Company/InvoiceEmail/Model/Sales/Order/Invoice.php

class Company_InvoiceEmail_Model_Sales_Order_Invoice extends Magestore_Pdfinvoiceplus_Model_Sales_Order_Invoice
{
...
}

Can someone point me in the right direction as to why my module isn't overriding this class?

Thanks!

EDIT Original plugin snippet:

<global>
        <models>
            <pdfinvoiceplus>
                <class>Magestore_Pdfinvoiceplus_Model</class>
                <resourceModel>pdfinvoiceplus_mysql4</resourceModel>
            </pdfinvoiceplus>
            <sales>
                <rewrite>
                    <order>Magestore_Pdfinvoiceplus_Model_Sales_Order</order>
                    <order_invoice>Magestore_Pdfinvoiceplus_Model_Sales_Order_Invoice</order_invoice>
                    <order_creditmemo>Magestore_Pdfinvoiceplus_Model_Sales_Order_Creditmemo</order_creditmemo>
                </rewrite>
            </sales>
        </models>
</global>


texts: After creating a custom theme in Magento 2 give an error in backend

texts:
Why does it gives an error if I just created my custom theme in Magento, besides
this there is only one custom module and nothing else, where does this error comes from?

And gives an error when I call the command setup:upgrade

  Module 'Magento_Theme': Running data recurring...Item
  (Magento\Theme\Model\Theme\Data) with the same ID "0" already exists.

theme.xml

 <theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>Dataworld</title>
  <parent>Magento/blank</parent>
   <!-- <media>
      <preview_image>media/preview.jpg</preview_image>
   </media>-->
</theme>

registration.php

\Magento\Framework\Component\ComponentRegistrar::register(
 \Magento\Framework\Component\ComponentRegistrar::THEME,
'frontend/Shooga/Dataworld',
__DIR__
);


texts: What currency does Magento use in the database table `sales_flat_order` if we have several orders with different base currencies

texts:
For example I want to use base_grand_total. I know that this value is  displayed in the base currency on paper.

I have the data at sales_flat_order:

base_cur.   global_cur. order_cur.  store_cur.  base_to_gl_rate base_to_ord_rate    store_to_base_rate  store_to_ord_rate
CZK         CZK         CZK         CZK         1.0000          1.0000              1.0000              1.0000
EUR         EUR         EUR         EUR         1.0000          0.0385              1.0000              0.0385
CZK         CZK         CZK         CZK         1.0000          1.0000              1.0000              1.0000
PLN         PLN         PLN         PLN         1.0000          0.1667              1.0000              0.1667

The Base Currency of Website is CZK.

In which currency magento keeps the base_grand_total values in this case? Order currencies?

EDIT.
What currency is used if  base and order currencies are different?
For example, base currency CZK, order currency EUR.

Thank you!


texts: How to override module-wishlist\CustomerData\Wishlist.php by using custom module?

texts: I have added custom code in m3\vendor\magento\module-wishlist\CustomerData\Wishlist.php, and called inside the app\design\frontend\zero\my_theme\Magento_Wishlist\templates\sidebar.phtml, for testing i am directly edited in core files, how to properly Override by using custom module?


texts: Magento 2: Issue with Product URL rewrite on Single Store Mode

texts:
I'm using Magento 2.3.3 CE. I've enabled the single store mode on a website from Stores > Configurations > General > General > Enable single store mode

After enabling the single store mode, the URL rewrites for the newly created products are not generated automatically.

Already checked the below posts:

https://github.com/magento/magento2/issues/5929

https://github.com/magento/magento2/issues/25190

Has anyone faced a similar issue?

Thanks in advance!


texts:
Been scratching my head over this problem for a while now, have tried adding the helper to the config etc. Updating from 1.7 (where there were no problems) and now getting this error in the config: 'Mage_Ship_Helper_Data' not found

My config.xml looks like this:

<?xml version="1.0"?>
<config>
    <modules>
        <Excellence_Ship>
            <version>0.1.0</version>
        </Excellence_Ship>
    </modules>

    <default>
        <carriers>
            <excellence>
                <active>1</active>
                <model>ship/carrier_excellence</model>
                <title>Carrier Title</title>
                <name>Method Name</name>
                <price>5.00</price>
                <specificerrmsg>This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.</specificerrmsg>
            </excellence>
        </carriers>
    </default>

    <blocks>
        <ship>
            <class>Excellence_Ship_Block</class>
        </ship>
        <checkout>
            <rewrite>
                <cart_shipping>Excellence_Ship_Block_Cart_Shipping</cart_shipping>
            </rewrite>
        </checkout>
    </blocks>

    <adminhtml>
        <acl>
            <resources>
                <admin>
                    <children>
                        <system>
                            <children>
                                <config>
                                    <children>
                                        <dummy_products>
                                            <title>Configure Dummy Products</title>
                                        </dummy_products>
                                    </children>
                                </config>
                            </children>
                        </system>
                    </children>
                </admin>
            </resources>
        </acl>
    </adminhtml>
</config>


texts: Magento 2 - custom admin grid field - error when sorting or filtering

texts:
I added a custom column to the admin grid, like this
<column name="customer_name" class="Vendor\Module\Ui\Component\Listing\Columns\CustomerName">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="filter" xsi:type="string">text</item>
                <item name="editor" xsi:type="string">text</item>
                <item name="sortable" xsi:type="string">true</item>
                <item name="label" xsi:type="string" translate="true">Customer Name</item>
                <item name="sortOrder" xsi:type="number">30</item>
            </item>
        </argument>
    </column>

In my CustomerName class I create values for this column:
public function prepareDataSource(array $dataSource)
{
    $fieldName = $this->getData('name');
    foreach ($dataSource['data']['items'] as & $item) {
        $customer = $this->customerRepository->getById($item['customer_id']);
        $name = $customer ? $customer->getFirstName().' <'.$customer->getEmail().'>' : '';
        $item[$fieldName] = $name;
    }
    return $dataSource;
}

It shows in the grid as expected. But when I try to sort by this column or filter - an error occurred
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'customer_name' in 'order clause'

How can I fix this?
UPDATE
Now I try to resolve this problem by deleting CustomerName class (and remove reference to it in column tag in XML) and instead I added the _renderFiltersBefore() function in my collection class
 protected function _renderFiltersBefore() {
     $joinTable = $this->getTable('customer_entity');
     $this->getSelect()->join($joinTable.' as customer_entity','main_table.customer_id = customer_entity.entity_id', array('*'));
     $this->getSelect()->columns('CONCAT(firstname," <",email,">") as customer_name');
     parent::_renderFiltersBefore();
}

Now sorting is working, but filtering does not (get the same error)


texts: How to check product has parent id using product object ($product = $item->getProduct();) in magento 2

texts:
I just need to Get parent id from child product.
If anyone knows, could you provide suggestions on this.


texts: Magento 2 how to disable Magento catalog indexing after product save

texts:
In Magento 2 in want to disable magento catalog indexing after product save . I want disable it using magento pulgin or event observer.
How can I do this?


texts:
I want display the amount of items in the cart outside of magento.
Thus I created this script inside a scripts folder in the magento directory:

<?php
require __DIR__ . '/../../app/bootstrap.php';
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER);
/** @var \Magento\Framework\App\Http $app */
$obj = $bootstrap->getObjectManager();

// Set the state (not sure if this is neccessary)
$state = $obj->get('Magento\Framework\App\State');
$state->setAreaCode('frontend');

// Getting the object managers dependencies
$quote = $obj->get('Magento\Checkout\Model\Session')->getQuote();
$helper = $obj->get('\Magento\Checkout\Helper\Cart');

echo json_encode(['items' => $helper->getItemsQty()]);

But for an unknown reason this suddenly just returns zero. I did not update the version so I think it might be some setting maybe?

How do I get the amount of items in the cart outside of magento?

PS: I know there are several answers already but I tried them all and they did not work either for different reasons like errors or so.

update:

This seems to be some sort of Magento problem. After a night I called the page again and there is this strange behavior:

the cart amount on the magento page still shows a number and the popover shows my items although I did not setup persistent cart but I set the session time to a high value
if I go to the cart it is empty
the script still shows zero

Now if I clear my browser data and call magento and the script again both display zero (as there is nothing in the cart for real). If I then add items to the cart both display the correct value.


texts: Magento 2 - How to validate wysiwyg editor in frontend PHTML file?

texts:
In Magento 2.3.2, I have added the wysiwyg editor in frontend PHTML file with the following codes.

  HTML:

<form class="form" action="<?php echo $block->escapeUrl($block->getSavePostUrl()); ?>" method="post" id="post-form" enctype="multipart/form-data">
<fieldset class="fieldset">

        <?php echo $block->escapeHtmlAttr(__('Post Name')); ?>

            <input type="text" name="post_name" value="" title="<?php echo $block->escapeHtmlAttr(__('Post Name')); ?>" class="input-text required-entry" id="post_name">

        <?php echo $block->escapeHtmlAttr(__('Post Content')); ?>

            <textarea name="post_content" title="<?php echo $block->escapeHtmlAttr(__('Post Content')); ?>" class="input-text required-entry" id="post_content">
            </textarea>

</fieldset>

        <button type="submit" class="action save primary" title="<?php echo $block->escapeHtmlAttr(__('Save Post')); ?>">
            <?php echo $block->escapeHtml(__('Save Post')); ?>
        </button>

</form>

  Javascript:

With the above code, post_name textbox validates for required-entry but post_content editor doesn’t.

Am I missing anything or Is there any other way to validate editor in frontend PHTML file?


texts:
I'm running a Magento Commerce Cloud in my new machine and I need to install the Magento Cloud CLI.

How could I do it?


texts: How to write conditional statement using {{if}} in the content of CMS page in admin side?

texts:
I want to show two different contents of a cms page (e.g. about us) in two different themes.
I know it can be possible if I create a template where I can have the theme specific condition and include the template in the cms page as

{{block type="core/template" template="path/to/template.phtml"}}

But I want the contents for both the theme should be handled in the admin cms page content section.
So is it possible to apply condition for themes using {{if}} syntax in the cms page content section?

I tried to write a simple {{if}} statement for testing but it just printed it in the frontend.

So could anyone suggest what is correct method of writing these statements ?


texts: magento 2 add unique key on multiple columns using installschema

texts:
Here i am trying to create unique key using installSchema . Array of
column names is defined here on which columns combinedly i want to
apply unique key

$arrayOfColumnsName = array('column1', 'column2');

here defined the addIndex method for creating the unique key

->addIndex(
            $installer->getIdxName(
                $installer->getTable('table_name'),
                $arrayOfColumnsName,
               \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE
            ),
            $arrayOfColumnsName,
            ['type' => \Magento\Framework\DB\Adapter\AdapterInterface::INDEX_TYPE_UNIQUE]
        )

This creates unique key for only first column instead of both columns, needs help for the same


texts: Product attribute show/hide in admin depending on other attribute value

texts:
I have a product attribute but it is only relevant if another product attribute is selected (a dropdown yes/no) value.

In the admin view I would like show/hide my custom attribute depending on the yes/no value of the other system attribute.

I believe this is possible using javascript but im not sure how to get the javascript on the page with my attribute.


texts: How do I change “city” label when customers are checking out In magento2

texts: I want to change the "city" section to "suburb" please. how do I do that?


texts: How to limit the product reviews shown in product page in magento 2

texts:
I have created review form as popup modal, And I have also removed reviews tab in product page. And I have created new section before footer which contains the collection of customer reviews which is shown in frontend, Now I need to Limit the reviews via xml, Please provide me a solution

Catalog_product_view.xml

<page layout="1column" 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.review">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">XXX_YYY::review.phtml</argument>
            </action>
            <!--To display popup and form-->
            <block class="Magento\Review\Block\Form" name="custom.review.popup" template="XXX_YYY::popup.phtml">
                <block class="Magento\Review\Block\Form" name="custom.product.review.form" as="custom.review_form" template="XXX_YYY::form.phtml">
                    <container name="product.review.form.fields.before" as="form_fields_before" label="Review Form Fields Before"/>
                    <arguments>
                        <argument name="jsLayout" xsi:type="array">
                            <item name="components" xsi:type="array">
                                <item name="review-form" xsi:type="array">
                                    <item name="component" xsi:type="string">Magento_Review/js/view/review</item>
                                </item>
                            </item>
                        </argument>
                    </arguments>
                </block>
            </block>
        </referenceBlock>
        <!--Removes the review tab-->
        <referenceBlock name="product.info.details">
            <referenceBlock name="reviews.tab" remove="true" />
        </referenceBlock>
        <!--Display Customer reviews collection-->
        <referenceContainer name="product.info.additional">
            <block class="Magento\Review\Block\Product\View\ListView"  name="custom.product.section.info" template="XXX_YYY::customer-reviews.phtml"/>
        </referenceContainer>
    </body>
</page>


texts: Magento 2 : add custom class on checkout page shipping address field

texts:
I am using magento 2.1.7. I want to add one class in country select box on checkout page shipping address.

If anyone knows please help to add class.


texts: Error: Call to a member function setActive() on bool display in Magento Admin Grid Edit and Add Post display

texts:
This is my code for Add New Post action
<?php

    namespace Vt\First\Controller\Adminhtml\Post;

    use Magento\Backend\App\Action;
    use Magento\Backend\App\Action\Context;
    use Magento\Framework\View\Result\Page;
    use Magento\Framework\View\Result\PageFactory;
    use Vt\First\Model\PostFactory;

    /**
     * Class NewAction
     * @package Vt\First\Controller\Adminhtml\Post
     */
    class NewAction extends Action
    {
        /**
         * @var PageFactory
         */
        private $pageFactory;

        /**
         * @var PostFactory
         */
        protected $_postFactory;

        /**
         * @var \Magento\Framework\Registry
         */
        private $coreRegistry;

        /**
         * NewAction constructor.
         * @param Context $context
         * @param PageFactory $rawFactory
         * @param PostFactory $_postFactory
         * @param \Magento\Framework\Registry $coreRegistry
         */
        public function __construct(
            Context $context,
            PageFactory $rawFactory,
            PostFactory $_postFactory,
            \Magento\Framework\Registry $coreRegistry
        )
        {
            $this->pageFactory = $rawFactory;
            $this->_postFactory = $_postFactory;
            $this->coreRegistry = $coreRegistry;
            parent::__construct($context);
        }

        /**
         * @return Page
         */
        public function execute(): Page
        {
            $resultPage = $this->pageFactory->create();
            $resultPage->setActiveMenu('Magento_Catalog::catalog_products');
            $title = __('Add Post');
            $resultPage->getConfig()->getTitle()->prepend($title);
            return $resultPage;
        }

        /**
         * @return bool
         */
        protected function _isAllowed()
        {
            return $this->_authorization->isAllowed('Vt_First::home');
        }
    }

Displays following error for Add and Edit also

Error: Call to a member function setActive() on bool in
/var/www/html/magento2/vendor/magento/module-backend/Model/View/Result/Page.php:27
Stack trace: #0
/var/www/html/magento2/generated/code/Magento/Backend/Model/View/Result/Page/Interceptor.php(23):
Magento\Backend\Model\View\Result\Page->setActiveMenu('Magento_Catalog...')
#1 /var/www/html/magento2/app/code/Vt/First/Controller/Adminhtml/Post/NewAction.php(59):
Magento\Backend\Model\View\Result\Page\Interceptor->setActiveMenu('Magento_Catalog...')
#2 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(58):
Vt\First\Controller\Adminhtml\Post\NewAction->execute()


texts: Magento Editing Grid Items Not Retrieving Data

texts:
I am creating Custom Admin Module.

Everything working fine but when I click on grid row to edit item it redirects correctly but the text field doesn’t contains any data.

But if I input some text into the text filrd and click on Save, the fields gets updated correctly.

And i am using this tutorial : https://www.youtube.com/watch?v=EFoplTYKFVc. Thanks in Advance

Below is my code:

public function editAction()
{
    if ($eventId = $this->getRequest()->getParam('event_id')) {
        Mage::register('current_event', Mage::getModel('example/event')->load('$eventId'));
    }

    $this->loadLayout();
    $this->_setActiveMenu('example/events');

    $this->_addContent(
        $this->getLayout()->createBlock('example/adminhtml_event_edit')
     );

    return $this->renderLayout();
}

And here is the form.php

class MasteringMagento_Example_Block_Adminhtml_Event_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
{
    protected function _initFormValues()
    {
       //for editing existing events
        if ($event = Mage::registry('current_event')) {
            $data = $event->getData();
            //Manipulate the data
            $this->getForm()->setValues($data);
        }

        //in order to keeo post data during a failed save
        if ($data = Mage::getSingleton('adminhtml/session')->getData('event_form_data',true)) {
            $this->getForm()->setValues($data);
        }
    }

    protected function _prepareForm()
    {
        $form = new Varien_Data_Form(
            array('id' => 'edit_form',
                  'action' => $this->getData('action'),
                  'method' => 'post'
            )
        );

        $fieldset = $form->addFieldset(
            'base_fieldset',array('legend'=> Mage::helper('example')->__('General Information'),'class'=> 'fieldset-wide'));

        $fieldset->addField('name','text',array(
            'name'    => 'name',
            'label'   => Mage::helper('example')->__('Event Name'),
            'title'   => Mage::helper('example')->__('Event Name'),
            'required' => true
        ));

        $dateFormatIso = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);

        $fieldset->addField('start','date',array(
            'name'     => 'start',
            'format'   => $dateFormatIso,
            'image'    => $this->getSkinUrl('images/grid-cal.gif'),
            'label'   => Mage::helper('example')->__('Start Date'),
            'title'   => Mage::helper('example')->__('Start Date'),
            'required' => true
        ));

        $fieldset->addField('end','date',array(
            'name'     => 'end',
            'format'   => $dateFormatIso,
            'image'    => $this->getSkinUrl('images/grid-cal.gif'),
            'label'   => Mage::helper('example')->__('Start Date'),
            'title'   => Mage::helper('example')->__('Start Date'),
            'required' => true
        ));

        $form->setUseContainer(true);
        $this->setForm($form);

        return parent::_prepareForm();
    }
}


texts: How to disabled cloud-zoom click from product page?

texts:
I am working on eCommerce website. link: http://www.ultimatespares.com/motorcycleparts/crash-pads-screens/crash-pads-r12-for-ducati-monster-696-2014.html

I want to disabled click from magnifying glass .cloud-zoom-lens. On click new window open.

I tried to add

css for that class pointer-events: none;
and tried in js.

but use....I think plugin is working perfectly beacuse http://www.ultimatespares.com/motorcycleparts/crash-pads-screens.html
(click on quick view and check)

So what should i do?


texts: Magento 2 : To find out whether Single Store Mode value changed or not

texts:
Is there any class/file from module-config module that can be useful whether single_store_mode value has been changed from yes to no or vice-versa.

Have checked admin_config related events but these are not useful as these are calling after save.

EDIT:

I want to have before Save as well as after Save value so i can compare whether value has been changed or not?

Tried to implement two approaches but unfortunately it's not working.

By applying source_model on the general/single_store_mode/enabled in custom module's system.xml
Using beforeSave() plugin on Magento\Config\Model\Config


texts: I have upgraded from Magento EE 2.2.10 to 2.3.4, I had some content blocks with custom html used for navigation links on various pages that were just  tags.  After upgrading If I try to edit a content block It is now wrapped in the html below.  This extra html breaks the CSS and JavaScript I had for the nav links.  Is there a way to remove this html wrapper?


texts:
What is the best way on resolving git conflicts with composer.json and composer.lock .

I have two extensions created from master installed through composer , one is approved to be merge , the other extension got the approved later on to be merged but while synchronizing files of master in the second extension got conflicts on those 2 files composer.json and composer.lock .

Im using git, bitbucket , phpstorm for this . Is there any fix on this (i don`t want to delete that branch and create a new one from master and install the second extension again. I want to fix the conflicts. ) ?


texts: Why is the loading of scripts via RequireJS incredibly slow when they are not cached?

texts:
First of all, this is not a question about general Magento 2 performance. I'm already aware of how to speed up Magento 2, in general.

My question is specifically about RequireJS and the assets served via the pub/static directory.

I've just installed a fresh copy of Magento 2.3.4. Even without any further custom additions from me, the pages load incredibly slowly. I've noticed this is due to a massive number of requests (mostly for scripts) being served via require.js and the pub/static URL.

There are two problems I notice:

The scripts only load in small batches of about 10 at a time.
Each script takes at least several seconds to load, even if I open its URL directly in a new browser tab.

These issues combined result in a massive 3-4 minute page load time.

Take a look at this network graph as I load a category page:

Here is an example of the timings for a typical JavaScript file (they are all like this):

Even accepting the fact the assets are not cached, it should not take this long to fetch and copy or symlink assets via pub/static, in my opinion.

I have tried using both the "copy" and "symlink" strategies and both are equally as slow.

Why is this happening? How is this considered remotely acceptable? When I was learning development the "golden rule" was that caching is not an acceptable solution for terrible performance. If the application can't perform at least "reasonably" well without a cache, then something is wrong.

What is wrong here?


texts: Magento 2.2.1 - Remove Free Shipping for a Specific Product

texts: I recently upgraded to Magento 2.2.1 and there are 3 products that I make and sell. I recently set up free shipping for any orders over $500. However, for these 3 products, I need to remove the free shipping. Is there a way you can do this in Magento 2 or do I need an extension to do this?


texts: how to get attribute_set_id in magento 2 custom collection

texts: I have created custom table and display the values as grid in admin by UI component.In my custom table already I have SKU column .now I need attribute set id Name of the product in custom grid .how to get attribute setid by joining in collection.what are the tables needs to be joined to get attribute set_id name ?


texts: Magento extension that adds code before_body_end OR header based on route/uri I select

texts:
We were Googling to find an extension that maybe existed that adds code (or not_ based on certain routes.

Based on the router it either adds some code in before_body_end or header. Much like Config->Miscellaneous Scripts only with a little more granularity.

We have come across some solutions to add custom code to a router via extension.

But I was wondering if a more robust solution already exists. Where one would select the route from a dropdown list (of routes) and then enter the code or external JS one would want to add. And if not, how would we begin the task of setting this up.

Almost sounds like a great idea ;)

Links

Adding external JS

Magento routes


texts: Magento 2 external PHP script with block output always has template hints

texts:
I am creating a playground external PHP script in Magento 2, trying to output a static block. It works but the block output always has template path hints -- how can I get rid of the red? Template hints are disabled everywhere in config and Mage mode is set to "developer".

Block class

/app/code/Ont/Ax/Block/Aif/Agreements.php

<?php
namespace Ont\Ax\Block\Aif;
use Magento\Framework\View\Element\Template;
class Agreements extends Template {
    function __construct(Template\Context $context) {
        parent::__construct($context);
    }
    public function foo() {
        return "bar";
    }
}

Block template

/app/code/Ont/Ax/view/frontend/templates/aif/agreements.phtml

Agreements

Foo? <?php echo $this->foo() ?>

Test file

/__local.test.brief.php

use Magento\Framework\App\Bootstrap;
require __DIR__ . '/app/bootstrap.php';
$params = $_SERVER;
$bootstrap = Bootstrap::create(BP, $params);
$obj = $bootstrap->getObjectManager();
$state = $obj->get('Magento\Framework\App\State');
$state->setAreaCode('frontend');
/* @var Magento\Store\Model\StoreManagerInterface $storeManager */
$storeManager = $obj->create("\Magento\Store\Model\StoreManagerInterface");
$storeManager->setCurrentStore(1);
/* @var \Magento\Framework\View\LayoutInterface $layout */
$layout = $obj->create("\Magento\Framework\View\LayoutInterface");
$block = $layout->createBlock("Ont\Ax\Block\Aif\Agreements");
$block->setTemplate("aif/agreements.phtml");
echo $block->toHtml();

Result


texts: How to map the images with magento product import process by csv

texts: When i am updating the products using csv import in magento, i am having  one issue. unable to map my images in import process. Please check with the sample file and Image url please.                                                                                Sample file: https://www.dropbox.com/s/jqsb8uxjriidqui/catalog_product_20160928_134010.csv?dl=0                                                                                Image URL: http://mastoraretail.com/media/catalog/product/1458110863-1.JPG      Please check and update the right way to update.


texts: Guest checkout, returning customer information from order

texts:
How can I get (if possible) information about whether the order is a guest checkout and if it is a logged in customer, it is a returning customer?

edit:

Unfortunately the previously marked solution does not work in all cases. Sometimes even though a customer has already ordered the order collection return nothing.
I tried this alternative approach but it does not work as well:

<?php
// ...

private function getCustomerType(Order $order, Address $billingAddress = null, Address $shippingAddress = null)
{
    if ($order->getCustomerIsGuest()) {
        return self::ORDER_TYPE_GUEST;
    }

    $orderCollection = $this->orderCollectionFactory->create()->addAttributeToSelect('entity_id')
        ->addFieldToFilter('customer_email', $this->getUserEmail($order, $billingAddress, $shippingAddress));
    /** @var Order\Item $firstItem */
    $firstItem = $orderCollection->getFirstItem();
    if($firstItem instanceof Order\Item) {
        if (!empty($firstItem->getId())) {
            return self::ORDER_TYPE_RETURN;
        }
    }
    return self::ORDER_TYPE_NEW;
}


texts: Link store view to different Url in magento 2

texts:
I created a new store view with code 'fr'. I have changed the base Url of that store view to 'http://127.0.0.1/magento/fr/'. I created the new folder with name 'fr' and copied .htaccess file and index.php inside it. Now I changed index.php like below:

$params = $_SERVER;
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = 'fr';
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = 'store';
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $params);
/** @var \Magento\Framework\App\Http $app */
$app = $bootstrap->createApplication(\Magento\Framework\App\Http::class);
$bootstrap->run($app);

Now when I am hitting 'http://127.0.0.1/magento/fr/' it's showing the default store view instead of store view with code 'fr'. Can anyone tell what's wrong with the procedure ? Thanks!


texts:
I am new into Magento development, I have created some basic modules also with the help of available tutorials. However, I am not able to understand the difference between <module>...</module> & <namespace_module>...</namespace_module>. Most of the time I saw in config.xml.

For example, I am creating a module Vaibhav_Customproduct under this module I am going to create a Model folder inside that Customproduct.php class.

Now, if I have to declare my model in config.xml I have seen in 2 different ways. I just want to understand the difference between below to declaration type.

  Example 1

    <models>
        <Customproduct>
            <class>Vaibhav_Customproduct_Model</class>
        </Customproduct>
    </models>

  Example 2

    <models>
        <Vaibhav_Customproduct>
            <class>Vaibhav_Customproduct_Model</class>
        </Vaibhav_Customproduct>
    </models>


texts: How do you install the latest enterprise edition with n98-magerun?

texts: I'm trying to figure out how to install the latest enterprise edition using n98-magerun. Can you install from a zip on the local filesystem using n98-magerun? Is the latest Enterprise Edition available on a git repository?


texts:
I am trying to follow

http://codemagento.com/2011/03/creating-custom-magento-reports/

the simple report example.

I get the following error:

  Fatal error: Call to a member function getReadConnection() on a non-object in /Volumes/Apache/mage/app/code/core/Mage/Core/Model/Resource/Db/Collection/Abstract.php on line 134

I can pastebin any code you wanna see but does anyone have any idea why I'm seeing that?


texts: Magento 2 Luma Theme inherence error 2.2.1 CE

texts:
I have a problem when I add a new theme in my new Magento 2.2.1 CE from scratch, and I try to inherent Luma theme. I sow to many examples but nothing work for me. If I put as parent blank work well but not for Luma.
I created inside

app/design/frontend/[vendor_name]/[theme_name]/

my files
registrations.php

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::THEME,
    'frontend/[vendor_name]/[theme_code]',
    __DIR__
);

and theme.xml

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
    <title>Mbs Tutorial Theme</title>
    <parent>Magento/luma</parent>
</theme>

On the database my theme parent_id is Luma (id = 2), and I added to the store view design without problems, but they don't inherent Luma.


texts: Admin backend: display sum of orders in multiple currencies

texts:
in Magento 1.9 I created 3 websites and assigned to them different currencies: eur, gbp, usd

I need to display in the dashboard the global values of each parameter (orders, revenues, etc) in eur, summing the values from each website and automatically converting gbp and usd to eur.

I.e. If
Ws 1 total sales: 100 eur
Ws 2 total sales: 50 usd
Ws 3 total sales: 10 gbp

I want to display in the dashboard (Magento should convert gbp and usd to eur then calculate the global sum)
Global sales: 156 eur

How can I do this?
Thanks in advance


texts:
We have develop own module for wedding planner. We post multiple products with description on form submit. How to get the "wedding" array in the below values.

Array
(
    [weeding] => Array
        (
            [pCategory] => Array
                (
                    [0] => -1
                    [1] => 45
                )

            [product_cat] => Array
                (
                    [0] =>
                    [1] => 14
                )

            [product_cat_input] => Array
                (
                    [0] => 23423
                    [1] =>
                )

            [product_qty] => Array
                (
                    [0] => 24
                    [1] => 23423
                )

            [product_description] => Array
                (
                    [0] => 234
                    [1] => 234
                )

            [metal_type] => Array
                (
                    [0] => 23
                    [1] => 234
                )

            [stone] => Array
                (
                    [0] => 2423423
                    [1] => 234
                )

            [weight] => Array
                (
                    [0] => 23
                    [1] => 23
                )

            [size] => Array
                (
                    [0] => 23
                    [1] => 23
                )

        )

    [fromprice] => 2
    [toprice] => 23
    [description] => 234
    [name] => vijay Kumar
    [email] => test@test.com
    [address] => Address
    [telephone] => 89
    [country] => IN
    [region_id] =>
    [region] => tamilnadu
    [city] => chennai
    [postcode] => 641029
)

We tried the below line. but this get all the value of post.

$post = $this->getRequest()->getParams('wedding');

Please advice for this.


texts: Magento 2: Cannot read property 'dialog' of undefined, 'timepicker' of undefined,'RFC_2822' of undefined

texts:
Sometimes I'm getting following errors in the console after reloading the page:-

Cannot read property 'dialog' of undefined

Cannot read property 'timepicker' of undefined

Cannot read property 'RFC_2822' of undefined

But sometimes not getting it.actually when this issue did not come in the console then "Add To Quote" happening as expected via AJAX  else it's redirecting to 404 page after clicking on this button.

I've also R&D but they were suggesting to add requires JS on custom JS files but there are lots of extensions,files of the custom JS so it's very difficult to debug everywhere so please help me to resolve the issue ASAP.

Please see the attached image for more clarification:-


texts: Validate required custom options server side

texts:
Currently, if you set a custom option as required, it will apply a class required-entry to the input or select, and it will be validated with JavaScript.

On occasion, we get an order that is missing required custom options. These customers then have to be manually contacted to get the custom option.

I find when I use inspect element to remove the required-entry class, or delete the input entirely, I can replicate the issue. The customers are likely replicating this issue differently, such as with a certain combination of actions that trip up validation, or simply using a browser that interprets the validation logic differently.

Whatever the case, I would like to validate this logic server side. I see that I can detect this by extending /app/code/core/Mage/Checkout/controllers/CartController.php, either using addAction() for on add or indexAction() for when cart page is visited. I've used $options = $product->getOptions(); to get options, but it doesn't tell me if the option was required, and it seems it doesn't give me options that aren't submitted.

How can I validate required custom options server side?


texts:
Is there a way to get the direct RSS Feed Url for new products?

I dont mean domain.com/rss/catalog/new/store_id/1/

I Mean domain.com/rss/catalog/new/store_id/1/RSSFEED.RSS

Thanks