texts: Magento 2: Load product data-block (via webservice) on product page

texts:
We use Magento 2.3.
We should be able to load a data block (containing a message related to the speed of delivery) on the product page.
The message should be loaded real time as it depends on the current stock of the SKU in 2 external databases. We need to call a web service (sku is the parameter) and the webservice returns a message that we need to display on the product page.
Or in other words: we want to show a product attribute where the value is retrieved on the fly (instead of prefixed in the database)
How can this be achieved?
Do we need to be afraid of performance slow down (possible in lazyload)?
Br
Mike
PS: We also use configuables so this might be an extra complexity.


texts: how to apply design fallback only on one module? is that possible?

texts:
so I am creating a custom grid template named grid.phtml(I will tell why i did not rename it) , here is the configuration :

when I did this:

It didn't pick up the scosche first, it again goes to the default/default I solved it, I added this code in my config.xml module:

 <stores>
    <admin>
        <design>
            <package>
                <name>default</name>
            </package>
            <theme>
                <default>scosche</default>
            </theme>
        </design>
    </admin>
</stores>

everything now works fine, it will first go search in scosche folder and grab grid.phtml and if it is not there it will read from the default one

the thing is grid.phtml in all other modules(like manage products grid) will now read from scosche folder, though I just wanted to specifically read from here for this specific module, to solve, I can go to my module Grid.php and rename the grid and do this:

$this->setTemplate('widget/customgrid.phtml');

and then have this:

so other modules go search in scosche and they see grid.phtml is not there and so go to default folder, and for only this one it is customgrid.phtml

I am changing the whole concept through all the design fallback I just wanted to have it specifically for one module. I am working on a test stage, what if by adding this fallback, the scosche had some files and read them?! in some other places?! so seems my solution is not that effective at least I think it is not.

also I do not want to change the design tab of configuration at all, I want to just customize my module.

I am curious if there is a way that I can have design fall back only on my module not in the whole thing.


texts: It's time to migrate to Magento 2.0 or it's unstable?

texts:
The Magento 2.0 has been developed for a long time, but I have some fear to migrate from 1.9 version.

My question is about:

Security
Stability
Modules

It's safe to migrate old stores to Magento 2.0 or not?


texts: 503 only on products detail pages with images

texts:
I am using Magento 2.2.7
Can't visit product details pages or edit them if any image was added to product.

Also when I am login into admin part and go into Content - Configuration - Edit theme. Page loading infinitely. I have tried all browsers and have also tried to change theme in database.

Screenshot

I think that this could be related to Magento update or ssl certificate installation.

I wasn't able to find any helpful information in logs. Have tried to remove extensions. Have tried to flush cache. Have tried even to restore website from backup.


texts: Get admin detail via load by user_id in magento 2

texts:
username = 'admin';
$user_data = Mage::getModel('admin/user')->getCollection()->addFieldToFilter('username',$username)->getData();
var_dump($user_data);

//By Username get admin User's Role Details
$username = 'admin';
$role_data = Mage::getModel('admin/user')->getCollection()->addFieldToFilter('username',$username)->getFirstItem()->getRole()->getData();
var_dump($role_data);

//By ID get admin User's Details
$id = 1;
$user_data = Mage::getModel('admin/user')->load($id)->getData();
var_dump($user_data);

//By ID get admin User's Role Details
$id = 1;
$role_data = Mage::getModel('admin/user')->load($id)->getRole()->getData();
var_dump($role_data);

this code for magento1 . am working on magento 2 . can anyone guide me how get user detail of specific user_id.


texts: Using variables in static block for email template

texts:
I used a static block in my email templates

{{block type="cms/block" block_id="mail_include_header"}}

Now I would like to use variables like {{var logo_url}} in that block but it does not resolve it. Instead {{var logo_url}} get's printed out into the mail.

I would like Magento to show the logo url.

I tried things like

{{block type="cms/block" block_id="mail_include_header" logo_url="{{var logo_url}}"}}

Of course this only breaks it completely... I read that you can pass variables using the xml layout but no idea what layout is used here.

I also tried:

{{block type="cms/block" block_id="mail_include_header" logo_url=$logo_url }}

But that also did not work.

Update: Half solved

Feels like this is a bug because this is working:

{{block type="cms/block" block_id="mail_include_header" }}
{{var logo_url}}

If I use the variable in the mail template I can also use it in the included block. Otherwise I can not. Still I did not found the responsible code in app/code/core.

As a workaround I will include and hide the needed variables in the main template. Until someone can bring some light into this:

{{var logo_url}} {{var logo_alt}}


texts: How to get the Quote Id from Masked Quote Id (QuoteIdMask) in magento 2

texts:
I need to do something after applying the coupon code in the checkout page, So I have created the ajax call in the response of set-coupon-code.js in Sales Rule module.

But I got the Masked quote Id in set-coupon-code.js.

I have passing quote Id and Coupon code which is applied by the customer to my controller.

  QuoteIdMask 2a79ff3a9dfc16b963779118e8c9e4c0

How Do I get Quote Id form masked quote ID? Please provide me a solution

set-coupon-code.js (I have modified the core code in my custom module)

/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

/**
 * Customer store credit(balance) application
 */
define([
    'ko',
    'jquery',
    'Magento_Checkout/js/model/quote',
    'Magento_Checkout/js/model/resource-url-manager',
    'Magento_Checkout/js/model/error-processor',
    'Magento_SalesRule/js/model/payment/discount-messages',
    'mage/storage',
    'mage/translate',
    'Magento_Checkout/js/action/get-payment-information',
    'Magento_Checkout/js/model/totals',
    'Magento_Checkout/js/model/full-screen-loader'
], function (ko, $, quote, urlManager, errorProcessor, messageContainer, storage, $t, getPaymentInformationAction,
        totals, fullScreenLoader
        ) {
    'use strict';

    return function (couponCode, isApplied) {
        var quoteId = quote.getQuoteId(),
                url = urlManager.getApplyCouponUrl(couponCode, quoteId),
                message = $t('Your coupon was successfully applied.');

        fullScreenLoader.startLoader();

        return storage.put(
                url,
                {},
                false
                ).done(function (response) {
            var deferred;

            if (response) {
                deferred = $.Deferred();

                isApplied(true);
                totals.isLoading(true);
                getPaymentInformationAction(deferred);
                $.when(deferred).done(function () {
                    fullScreenLoader.stopLoader();
                    totals.isLoading(false);
                });
                messageContainer.addSuccessMessage({
                    'message': message
                });

                return storage.post(
                        'xxx/index/index',
                        JSON.stringify({quoteId: quoteId, couponCode: couponCode})
                        ).done(
                        function (response) {
                            alert("test");

                        }

                ).fail(
                        function (response) {

                        }
                );
            }
        }).fail(function (response) {
            fullScreenLoader.stopLoader();
            totals.isLoading(false);
            errorProcessor.process(response, messageContainer);
        });
    };
});

Controller

public function execute()
    {

        $data = $this->_jsonHelper->jsonDecode($this->getRequest()->getContent());

        $quoteId = $data['quoteId'];
        $couponCode = $data['couponCode'];
echo $quoteId;

}


texts: Magento 2: Location of uiRegistry.js file

texts:
I am mapping some files for advanced javascript bundling in Magento 2 and I am trying to find the file uiRegistry.js.

Does anybody know where to find it?

Thanks.


texts: SQLSTATE[42000]: Syntax error or access violation:Magento

texts:
I am start getting this error suddenly how i can resolve this inorder my site work fine:

SQLSTATE[42000]: Syntax error or access violation: 1142 SELECT command denied to user 'yukamagentonew'@'173.201.196.168' for table 'core_resource'


texts:
What is a proper way to implement offline payment method in Magento 2.2.*?

I did it old style like in module magento/module-offline-payments and it is working.

My payment model extends Magento\Payment\Model\Method\AbstractMethod.

I wonder that Magento\Payment\Model\Method\AbstractMethod is deprecated and a suggestion is that custom payment method should extend Magento\Payment\Model\Method\Adapter but I don't want to make integration with any payment provider gateway.

In Magento 2 guides I found only integration with the third-party approach:

https://devdocs.magento.com/guides/v2.2/payments-integrations/bk-payments-integrations.html

Sample:

https://github.com/magento/magento2-samples/tree/master/sample-module-payment-gateway


texts: Admin is blank after product import, frontend still working

texts:
I did a product import and the admin side of the website is no longer working. I can see the top nav menu but that's it. The front end is also working so I'm guessing the database is not affected.

Any idea on what I could try to do?

FYI, I did cleared /var/cache & var/session folders without any luck.


texts: Magento 2 Is there a way to use Cyber Source Fraud Detection for Braintree Payments instead of Kount?

texts:
We are using Braintree Payment Gateway and the Kount is out of the box feature of Braintree for Fraud Prevention and Detection.

For some reason, we want to move out of Kount and use CyberSource Fraud Detection for Braintree. Is there a way to do this?

I appreciate your thoughts. Thanks in advance.


texts: Mage registry key “application_params” already exists

texts:
I'm using paypal express check out.In order review if i click place order button i'm getting this error. I don't have idea why this error coming.Any one can give some idea to resolve this issue.

a:4:{i:0;s:53:"Mage registry key "application_params" already exists";i:1;s:2487:"#0 /home/bd/public_html/staging/app/Mage.php(222): Mage::throwException('Mage registry k...')
        #1 /home/bd/public_html/staging/app/code/core/Mage/Core/Model/App.php(338): Mage::register('application_par...', Array)
        #2 /home/bd/public_html/staging/app/Mage.php(683): Mage_Core_Model_App->run(Array)
        #3 /home/bd/public_html/staging/app/code/core/Mage/Sales/Model/Order/Item.php(98): Mage::run('', 'store')
        #4 /home/bd/public_html/staging/lib/Varien/Autoload.php(96): include('/home/bd/...')
        #5 [internal function]: Varien_Autoload->autoload('Mage_Sales_Mode...')
        #6 [internal function]: spl_autoload_call('Mage_Sales_Mode...')
        #7 /home/bd/public_html/staging/app/code/core/Mage/Core/Model/Config.php(1346): class_exists('Mage_Sales_Mode...')
        #8 /home/bd/public_html/staging/app/Mage.php(462): Mage_Core_Model_Config->getModelInstance('sales/order_ite...', Array)
        #9 /home/bd/public_html/staging/app/code/core/Mage/Sales/Model/Convert/Quote.php(128): Mage::getModel('sales/order_ite...')
        #10 /home/bd/public_html/staging/app/code/core/Mage/Sales/Model/Service/Quote.php(170): Mage_Sales_Model_Convert_Quote->itemToOrderItem(Object(Mage_Sales_Model_Quote_Item))
        #11 /home/bd/public_html/staging/app/code/core/Mage/Sales/Model/Service/Quote.php(249): Mage_Sales_Model_Service_Quote->submitOrder()
        #12 /home/bd/public_html/staging/app/code/core/Mage/Paypal/Model/Express/Checkout.php(560): Mage_Sales_Model_Service_Quote->submitAll()
        #13 /home/bd/public_html/staging/app/code/core/Mage/Paypal/Controller/Express/Abstract.php(320): Mage_Paypal_Model_Express_Checkout->place('EC-5R2755885S34...')
        #14 /home/bd/public_html/staging/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Paypal_Controller_Express_Abstract->placeOrderAction()
        #15 /home/bd/public_html/staging/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('placeOrder')
        #16 /home/bd/public_html/staging/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
        #17 /home/bd/public_html/staging/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
        #18 /home/bd/public_html/staging/app/Mage.php(683): Mage_Core_Model_App->run(Array)
        #19 /home/bd/public_html/staging/index.php(97): Mage::run('', 'store')
        #20 {main}";s:3:"url";s:29:"/paypaluk/express/placeOrder/";s:11:"script_name";s:10:"/index.php";}


texts: Magento 2 REST API Products - limit which custom_attributes returned

texts:
There can be a lot of custom attributes for a product and some have very long values. Is there a way to filter the responses to include just one specific attribute_code value?

Note: this is not talking about filtering the Products returned, I have other criteria to filter the top level products, I just don't want to return the full custom_attributes array, but rather something like this in SQL SELECT * FROM custom_attributes WHERE attribute_code = 'some value'


texts: Magento extensions, production environment & git

texts:
I have been testing magento latetly and I have been trying to figure the best way to track it with git. I created a new clean repository on GitHub and deployed it on a demo server where I invited colleagues to test drive it. The issue I faced is that several plugins where installed on production that made the branch on git & the production to be diverged. What's the suggested way to resolve this?

Install plugins / extensions ONLY on development, push it to git and then deploy to production? What if these plugins have db changes? Do migrations exist in magento?


texts: Programatically add images to product using sku

texts:
i have uploaded 1000's of product with images wrong so i deleted images from table , now issue is that i want to correct all images via mapping with sku.

How i add images to product programatically using product sku?

For product i have array of images for example for product with sku 123
I have image array 1.png,2.png,3.png . now i want 1.png should be thumbnail,small_image,image and rest all to be added to gallery .

How can it be done?

atached is my code that works fine but all images comes as gallery image i want to set first one as base small and thumb image

<?php
require_once 'app/Mage.php';
Mage::app();
Mage::app()->getStore()->setId(1);

$importDir = 'bulkimages/101/';

$productsData = array('Purple-Crown-Ring-MFAS.jpg','Purple-Crown-Ring-MFC.jpg','Purple-Crown-Ring-MSAS.jpg','Purple-Crown-Ring-MSF.jpg');

foreach($productsData as $fileName){
    $productSKU = '111';
    $ourProduct = Mage::getModel('catalog/product')->loadByAttribute('sku',$productSKU);
    $filePath = $importDir.$fileName;
    if (file_exists($filePath)) {
        $ourProduct->addImageToMediaGallery($filePath, array('image', 'small_image', 'thumbnail'), false, false);
        $ourProduct->save();
        echo "done ";
    } else {
        echo $productSKU . " not done";
        echo "<br>";
    }
}

?>


texts: php : How to get localities based on ip address

texts:
I want to get localities based on IP address in php.

I'm using geoplugin for based on IP, I got cities by using this

  $ip_address = $_SERVER['REMOTE_ADDR'];
 /*Get user ip address details with geoplugin.net*/
  $geopluginURL='http://www.geoplugin.net/php.gp?ip='.$ip_address;
  $addrDetailsArr = unserialize(file_get_contents($geopluginURL));
 /*Get City name by return array*/
  $city = $addrDetailsArr['geoplugin_city'];

 /*Get Country name by return array*/
   $country = $addrDetailsArr['geoplugin_countryName'];

Then how to get locations of the city in selected field using this


texts: User Authentication Failed after Updating Password in Magento and Paypal Payment Advanced

texts: Paypal Payment Advanced is working until I updated the password in Paypal and now it gives me error of "User Authentication Failed". I confirm my credentials and redo all the steps in setting up the PayPal in manager.paypal.com and also on Magento. It occurs after clicking the "Place Order" button. Can someone give me pointers on this problem? Thanks.


texts: How to modify phtml file of a custom module in magento 2?

texts:
Given a custom or a purchased module,
How do you modify a phtml file without editing the source code?


texts:
can anyone please tell me the less in magento2, i know how to use custom less files, but i can not understand , which is there in default magento2 like ,
In vendor it is having much less files like inside the source file having like variables.less, global.less ...

Please let me know if anybody know this. how we can override with all these.

Thanks


texts: Getting x number of products from a category that are in stock

texts:
I'm trying to get the first 4 products from a category that are in stock to show on the home page. I've got everything working the way I would like except it's pulling products that are out of stock.

I've tried addAttributeToFilter('is_in_stock', 1) and isSaleable() but those didn't work.

$collection = Mage::getModel('catalog/category')->
                    load('33')->
                    getProductCollection()->
                    addAttributeToFilter('status', 1)->
                    addAttributeToSelect('*')->
                    addAttributeToSort('position')->
                    setPageSize(4);


texts:
Magento 2, what are the Magento 2 rules to be added & where to run Magento 2 in Nginx.
My server guy asked me to add rule in mnt/data/home/xyz/redirector.conf file
But I am unaware of the what rules to be added in it.
My server Home page is working fine by all internal pages are 404


texts:
I have developed a niche Magento store that only uses some of Magento's features. It also has a custom back end that I have developed over time.

So here is the issue, I now need to deploy another store identically the same as the store I have developed.

I want to be able to do this fast without installing a new version of Magento on my server and having to disable all of the settings that are disabled on my first site and apply all of the changes to the back-end once again.

I basically need a copy of my admin and the settings within it. The front end theme will be different so I'm not bothered about that being the same.

Can anyone think of a solution for this?


texts:
we are taking scheduled backup everyday, we have some 3000 products and it add more....

its a live site and usually we will keep scheduled backup night time.

it take about 2 hours for taking complete system backup.

at the time the backup is going on , the site will not load.

is there any way to run the site as normal when we are taking scheduled backup or normal backup


texts: Magento Admin Panel Error While Saving any Product at Catalog

texts:
We are getting this error while trying to save a product at Catalog > Products
"A technical problem with the server created an error. Try again to continue what you were doing. If the problem persists, try again later."
We are running Magento ver. 2.3.5-p1
We did try:
php bin/magento indexer:reset
php bin/magento indexer:reindex
php bin/magento c:fl
php bin/magento cache:clean
php bin/magento cache:flush
Logout and Logged In again and problem still there.
Thanks,
Daniel


texts: Magento 2 how can i change url of color filter layer navigation?

texts:
On category page click color filter getting below url
/laminate-flooring.html?color=18

I want to change color=red instead of color=18.

I have change here :
vendor\magento\module-catalog\Model\Layer\Filter\Item.php we have getUrl() function

public function getUrl()
{
    $query = array(
        $this->getFilter()->getRequestVar()=>$this->getValue(),
        Mage::getBlockSingleton('page/html_pager')->getPageVarName() => null // exclude current page from urls
    );
    return Mage::getUrl('*/*/*', array('_current'=>true, '_use_rewrite'=>true, '_query'=>$query));
}

to

public function getUrl()
    {
        $query = array(
            $this->getFilter()->getRequestVar()=>$this->getLabel(),
            Mage::getBlockSingleton('page/html_pager')->getPageVarName() => null // exclude current page from urls
        );
        return Mage::getUrl('*/*/*', array('_current'=>true, '_use_rewrite'=>true, '_query'=>$query));
    }

after change $this->getLabel() my filter is not working.


texts:
I need to put a function allowing to remove spaces at the end of the first name field in the information of a customer's account. Can you help me implement this fix ? Can be with a trim function.
Do you have an idea of the affected file ?
Magento 1.9


texts: M2 | Convert language to French for API response

texts:
I have a custom API whose response message is in English. I wanted to convert it to french language when it reaches the frontend. e.g now my API is sending a message as:

if (!strcmp($gcode,$giftcode)) {
         result=array();
         $result['message']='Gift card already redeemed';
         echo json_encode($result);
         exit;
   }

My backend is Magento 2(English) and the frontend is in Vue Js storefront (French language).

I have used some built-in APIs also, so how can I change their language.

Or the language will be changed by Vue Js storefront when any API (built-in, custom) response is received. Or it should be handled in the backend (Magento 2)?


texts: Mechanics of the new Changelog Tables (ex: catalog_category_product_cat_cl)

texts:
I just spotted the mentioned tables in the database. I think they are new in Magento EE 1.13 and might be related to the new indexing.

+----------------------------------------+
| catalog_category_flat_cl               |
| catalog_category_product_cat_cl        |
| catalog_category_product_index_cl      |
| catalog_product_flat_cl                |
| catalog_product_index_price_cl         |
| cataloginventory_stock_status_cl       |
| catalogsearch_fulltext_cl              |
| enterprise_url_rewrite_category_cl     |
| enterprise_url_rewrite_product_cl      |
| enterprise_url_rewrite_redirect_cl     |
+----------------------------------------+

How do those tables function? What is the purpose?

Are they automatically cleaned after some time?

Does it make sense to include those tables into backups?


texts: Who to "enable Magento to use the distributed configuration file .htaccess"?

texts:
One of the steps in this Magento Apache2 installation guide is to "enable Magento to use the distributed configuration file .htaccess". In that step, they have a link to Apache2 page guideline ....
That Apache2 page is so confusing and I'm lost what to do exactly to enable Magento2 to use the distributed configuration file .htaccess...

Can anyone list the steps to achieve so in simple words? .... please :)


texts: My host is wildly unstable. Recommendations for Magento 2?

texts:
I'm on my 4th host trying to get a basic install working, but its been nothing but nightmares.

I am currently on what is regarded by many as one of the best Magento hosts, Nexcess.  They advertise full Magento compatibility, but in the last 8 weeks, they have yet to prove it, and are now telling me things that I need to consult with you all on.

For 7 weeks they tried to get my 2.0.7 install to become stable, (super-simple install, 4 extensions, 200 products, 15000 customers, Luma template). Attempts at a empty install with no products, customers, orders, etc yielded same errors and issues.  So after 7 weeks of issues and errors I requested a new server.  They recommended I also update to 2.1, and all my problems are solved!

Nope.

I allowed them to install to 2.1 per their recommendation, and when completed all seemed fine.  I then attempted to reinstall my 4 extensions.  Each failed with the error:

Package fabpot/php-cs-fixer is abandoned, you should avoid using it. Use friendsofphp/php-cs-fixer instead.

I contacted my host, who informed me that none of my extensions were compatible with 2.1. and that's why I got the error.

I've contacted each Dev to confirm that their extension works with 2.1.  They all appear to.

EDIT  So now its been 8 weeks and here is where I stand.  My host suggested I go to 2.1.  But no extensions 'are compatible' (again, I confirmed this to be false with all devs) with 2.1.  So despite having no stability with 2.0.x, they suggested I go back to that if I want the extensions to work.  So my two options are 2.1 with no extensions, or a broken environment for 2.0.7, but 'with extensions.

I don't know where to turn.  Can anyone here recommend a host that is successfully hosting a Magento 2.1 site with robust stability?  Or am I asking too much, is Magento 2 too unstable still, have I migrated too soon?


texts: Magento 1.9 Invalid block type: Mage_Checkout_Block_1cart_Header

texts:
Magento home page shows white screen. In var/log/exception.log, i have

2018-12-19T03:30:18+00:00 ERR (3):
exception 'Mage_Core_Exception' with message 'Invalid block type: Mage_Checkout_Block_Cart_Header' in /mnt/data/sites/teamattitude.com.au/html/app/Mage.php:595
Stack trace:
#0 /mnt/data/sites/teamattitude.com.au/html/app/code/core/Mage/Core/Model/Layout.php(495): Mage::throwException('Invalid block t...')
#1 /mnt/data/sites/teamattitude.com.au/html/app/code/core/Mage/Core/Model/Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance('checkout/cart_h...', Array)
#2 /mnt/data/sites/teamattitude.com.au/html/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('checkout/cart_h...', 'top_cart')
#3 /mnt/data/sites/teamattitude.com.au/html/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('checkout/cart_h...', 'top_cart')
#4 /mnt/data/sites/teamattitude.com.au/html/app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#5 /mnt/data/sites/teamattitude.com.au/html/app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#6 /mnt/data/sites/teamattitude.com.au/html/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#7 /mnt/data/sites/teamattitude.com.au/html/app/code/core/Mage/Cms/Helper/Page.php(113): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#8 /mnt/data/sites/teamattitude.com.au/html/app/code/core/Mage/Cms/Helper/Page.php(52): Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController), 'home|21')
#9 /mnt/data/sites/teamattitude.com.au/html/app/code/core/Mage/Cms/controllers/IndexController.php(45): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), 'home|21')
#10 /mnt/data/sites/teamattitude.com.au/html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Cms_IndexController->indexAction()
#11 /mnt/data/sites/teamattitude.com.au/html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')
#12 /mnt/data/sites/teamattitude.com.au/html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#13 /mnt/data/sites/teamattitude.com.au/html/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#14 /mnt/data/sites/teamattitude.com.au/html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#15 /mnt/data/sites/teamattitude.com.au/html/index.php(93): Mage::run('teamattitude', 'website')
#16 {main}

I have the class  Mage_Checkout_Block_1cart_Header in following 2 locations.

app/code/local/Mage/Checkout/Block/Cart/Header.php
includes/src/Mage_Checkout_Block_Cart_Header.php

Content of both files are identical.

app/design/frontend/mercado/default/layout/checkout.xml  have following code

<block type="checkout/cart_header" name="top_cart" template="checkout/cart/mini_cart_top.phtml"></block>

file "mini_cart_top.phtml" exists in app/design/frontend/mercado/default/template/checkout/cart/mini_cart_top.phtml

mercado is the theme site use.

Any idea how to fix this error ?


texts: Magento 2.3.4 Braintree Paypal problem / HTTPError 500

texts:
after paying with Braintree/Paypal sandbox I get redirected to:

  myshop.com/braintree/paypal/placeOrder/

Which gives me a HTTP error 500.

Anyone has an idea how to fix this and show the user the  order success page?


texts: Order without shipping address(downloadable product) not show in Sale Order Grid

texts: I have issue that sales order without shipping address (downloadable products) not appeared in admin sales order grid. Anyone know how to solve this? M2.3.5p2


texts: custom builder product option magento extension

texts:
My client website want to build Custom product builder similar to this website: http://www.villycustoms.com/custom-builder/

Is there any Magento or Wordpress extension can do ?

Concept is customer need to pick up part of product style step by step.

Suppose Bicycle Product

customer need to choose style(color and patter style) of 8 parts (8 steps). step by step STEPS:

Frames
Tires
Wheels
Pedals
Chains
Accent
Seats
Grips

Each of step customer need to pick up some color style, pattern and that style will appear on product image also price.


texts:
Hi in past i have raised

this issue on how to display image over breadcrumbs in catg and though i have found an ans by myself but i have also got an ans from peoples

but now am facing another related to this those catg images are visible any new cms page that i have created.
for refrence am putting an image below

breadcrumbs.phtml

<?php if ($crumbs && is_array($crumbs)) : ?>

<?php
echo $this->getLayout()
->createBlock('Magento\Cms\Block\Block')
->setBlockId('catg-image')
->toHtml();
?>

        <?php foreach ($crumbs as $crumbName => $crumbInfo) : ?>
            <li class="item <?= $block->escapeHtmlAttr($crumbName) ?>">
            <?php if ($crumbInfo['link']) : ?>
                <a href="<?= $block->escapeUrl($crumbInfo['link']) ?>"
                   title="<?= $block->escapeHtml($crumbInfo['title']) ?>">
                    <?= $block->escapeHtml($crumbInfo['label']) ?>

            <?php elseif ($crumbInfo['last']) : ?>
                <?= $block->escapeHtml($crumbInfo['label']) ?>
             <?php else : ?>
                <?= $block->escapeHtml($crumbInfo['label']) ?>
            <?php endif; ?>

        <?php endforeach; ?>

<?php endif; ?>

and i dont want this image to be displayed in cms pages
thanks in advance


texts:
I am facing the below issue while saving products from the backend or via script.
Magento 2 The update with the "1609327541" ID doesn't exist. Verify the ID and try again. [ M2 EE 2.3.3 ]
[2021-01-04 13:20:34] report.CRITICAL: The update with the "1609327541" ID doesn't exist. Verify the ID and try again. {"exception":"[object] (Magento\Framework\Exception\NoSuchEntityException(code: 0): The update with the "1609327541" ID doesn't exist. Verify the ID and try again. at /var/www/html/vendor/magento/module-staging/Model/UpdateRepository.php:104)"} []n


texts:
Using Magento 2.4.1, we are unable to login to our admin area. Error message is as below:

UI config provider for "" is not configured.

Any ideas how to resolve please?
Error as below screenshot:


texts: How to update product custom options on Cart Page?

texts:
I have a simple product with custom options. When someone select any option and click on add to cart the product with the option goes to the cart where the product and selected option is shown.

Now here comes the situation where I need to alter the flow of Magento. I want to update that option value on cart page. Being more specific I want to make  customer able to select or change option on cart page.

What i have done so far is that I have traced that items are shown from template/checkoput/cart/item/default.phtml.

I have placed my custom option dropdown there in a row of product and placed a save button near the dropdown. But again how do I get it updated?


texts: How to call a controller action outside magento?

texts:
We can create php scripts which runs outside magento. And also use magento functionalities by using the following code snippet in it.

define('ROOT', '');
    $mage_php_url = ROOT.'app/Mage.php';

    if (!empty($mage_php_url) && file_exists($mage_php_url) && !is_dir($mage_php_url))
    {
        // Include Magento's Mage.php file.
        require_once ( $mage_php_url );
        umask(0);
        Mage::app();
    }

In these type of scripts we can directly call models, blocks, helpers etc. But how can we call to a controller action in here ? Any suggestions will be appreciated.


texts:
On this online store - https://nammu.com/

Sorting is not working, all time gives random result for sort

I checked and changed the settings in the admin panel, in the category section and in the section configuration, did not help.

Having reviewed and tried many recommendations on stackexchange.com and on other resources did not help.

Even wrote my extension,

but the same result

can someone suggest where to look further to fix the error

Thanks


texts:
I wanted to connect my magento store to MS SQL.I was searching online for this weather this is possible or not.

Here http://devdocs.magento.com/guides/m1x/system-requirements.html i saw that Magento Enterprise Edition will support Oracle or Percona as well but i am not sure whether Magento EE will support MS SQL.

If we can connect magento with MSSQL please let me know how can I achieve this

why I want this is I have one of my site in the .net and using mysql and I want to use that database.


texts: I want to know what JS file and where can I find the JS file that triggers the cart->delete. I'm using Magento 2.3 and upon searching I found a file in vendor/magento/module-checkout/Helper/Cart.php and it has the function getDeletePostJson which return the json_encode action and url. This action is located in vendor/magento/module-checkout/controller/cart/delete.php but I don't know which JS file calls this? and after calling this function what is the next step to this script? I'm trying to debug why upon deleting an item in the cart it's redirecting me back to the homepage eventhough I have a few more items in the cart


texts:
I have a custom module Name as OrderTracking and have a table order_tracking. I just want that whenever an order will place Magento will save "Order_id" and "customer_id" to my custom table -> order_tracking
My Custom table have these columns

id
customer_id
order_id
longitude
latitude

Thanks in advance.


texts: Can't log into Magento Admin, "Invalid Captcha" error appears

texts:
I cannot login to Magento admin, I just get this response every time, when I initially entered my login details, there was no captcha there, it appears after I try to login.

then once I've tried to login using the captcha:

any help please?


texts: Cache Issue, configuration cache is always showing invalidate in the admin panel

texts: Configuration cache is always showing invalidate in the admin panel, even after I clear the cache, it will invalidate again shortly. I'm not exactly sure which error log files to look for this problem.


texts: How to add custom attribute to custom tab?

texts:
I have added a new tab to customer admin area using info provided here

Now i want to add attributes to this custom tab. I have installed an extension for customer attributes but it adds the attributes to Account Information tab. How to get this done?


texts: Magento quick search showing no results, advanced search does work

texts:
I have a very strange problem with a customer.

The quicksearch of magento (form.mini) does not show any results. When I switch to the advanced search, the search results does appear correctly.

What I've done so far:

Checked all the product attributes if they are searchable;
Reindexed the complete shop;
Flushed all the caches;
truncated catalogsearch.fulltext;
Switched to the default magento theme

You can check it at this URL https://www.compel.nl

The advanced search is over here: https://www.compel.nl/catalogsearch/advanced/


texts: Magento 2 Plugin / After in response All api as json in webrest Module

texts: I want to create a Plugin / After method for all Api response return in json format  in web rest Module Magento 2


texts: When having 2 stores, how do you add a product to a specific store using the REST API?

texts:
I have two stores ("A" and "B"). Store "A" is selected as the default store. I want to add product "X" to store "B" using Magento 2's REST API.

I'm currently trying to do a POST request to http://localhost:8888/magento/index.php/rest/V1/products with the following JSON data:

{
   "product":{
      "sku":"3",
      "name":"Product X",
      "attribute_set_id":4,
      "price":1,
      "status":1,
      "visibility":4,
      "type_id":"simple"
   }
}

When doing this, the product gets added to the default store, which is store "A". My question is, how do I add a product to store "B" using the REST API?

I could not find anything in the docs about how to do this.


texts: Multi store product enabled only for (store 1) showing under (store 2) review form

texts:
I am not sure if this is a bug or something with my configuration.

I have one database on one magento install running two stores.

Some products are only enabled in (store 1) and these do only show up under (store 1). However through analytics I found some 404 pages that come from /review/product/list/id/nnn pages which brought to my attention, that products not in (store 2) are showing the product name, price and image. (the product did once exist and was in the sitemap so this would be why and how it was brought to my attention).

When you click the link back from the product review form page, you get as expected a 404 not found page so my question is why and how does this much of the product show up at all ? The product review templates all seem to come from the same templates that already do not allow the product to show up, so I am wondering is this more the routing url controlling what shows or within the code itself ?

Even if i output the value for $_product = $this->getProduct(); I get info on the product, and the info does show it is store2 which this product should by all accounts not exist in.


texts: Magento 2 error when try to set production mode on

texts:
I'm trying to put my Magento 2 installation into production mode, when I try it I get following error

Something went wrong while compiling generated code. See the error log for details.
Command returned non-zero exit code:
`/opt/alt/php56/usr/bin/php -f /home/magento2/public_html/bin/magento setup:di:compile`
#0 /home/magento2/public_html/vendor/magento/module-deploy/Model/Filesystem.php(245): Magento\Framework\App\Shell->execute('/opt/alt/php56/...')
#1 /home/magento2/public_html/vendor/magento/module-deploy/Model/Filesystem.php(143): Magento\Deploy\Model\Filesystem->compile(Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 /home/magento2/public_html/vendor/magento/module-deploy/Model/Mode.php(83): Magento\Deploy\Model\Filesystem->regenerateStatic(Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /home/magento2/public_html/vendor/magento/module-deploy/Console/Command/SetModeCommand.php(100): Magento\Deploy\Model\Mode->enableProductionMode()
#4 /home/magento2/public_html/vendor/symfony/console/Symfony/Component/Console/Command/Command.php(257): Magento\Deploy\Console\Command\SetModeCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /home/magento2/public_html/vendor/symfony/console/Symfony/Component/Console/Application.php(874): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /home/magento2/public_html/vendor/symfony/console/Symfony/Component/Console/Application.php(195): Symfony\Component\Console\Application->doRunCommand(Object(Magento\Deploy\Console\Command\SetModeCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /home/magento2/public_html/vendor/magento/framework/Console/Cli.php(96): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /home/magento2/public_html/vendor/symfony/console/Symfony/Component/Console/Application.php(126): Magento\Framework\Console\Cli->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /home/magento2/public_html/bin/magento(23): Symfony\Component\Console\Application->run()
#10 {main}

But I was able to run setup:di:compile successfully, this error occures only when run deploy:mode:set production

please help me to understand this issue and resolve it.


texts: Magento API 2.1 catalogProductRepositoryV1 - cannot submit price

texts:
I am using magento 2.0 API catalogProductRepositoryV1 to POST my product to the magento. Below is my body. The problem that I am facing is that when I submit this product for the first time to create the product in magento the price does not gets submitted, although the product submission is successful(in the GUI, Price is a mandatory field while submitting a product however from API if I dont pass $price, it still submits the product). Then when I submit the same product again with same body as below, the price shows up in both GUI as well as api call from postman. Same behavior is there with PUT.

{
"product": {
  "Name": "TEST",
  "price": 4,
  "sku": "ABC",
  "status": 1,
  "attribute_set_id": "4",
  "custom_attributes": [
    {
      "attribute_code": "category_ids",
      "value": [
        "5"
      ]
    }
  ]
}

Any Idea if this is a product bug or am I missing something or its a product bug?

I am using this URL : http://magento-url/index.php/rest/V1/products/


texts: Magento 2 - Recently viewed product not working with FPC

texts:
Magento default functionality of recently viewed product uses the following event to save viewed history

catalog_controller_product_view

And it stores in following tables

report_viewed_product_aggregated_daily
report_viewed_product_aggregated_monthly
report_viewed_product_aggregated_yearly
report_viewed_product_index /*(Probably this one too)*/

It worked perfectly until you enable FPC the event catalog_controller_product_view would not work with FPC.

I know the event that will work with FPC. it is controller_front_send_response_before but the problem is, you can not get current product from $this->_registry->registry('current_product'); this will also stopped working with FPC.

My question is, how can we resolve this issue, how can we store recently viewed information in above tables while FPC is enabled.


texts: Canonical not updating after adding trailing slashes

texts:
I'm in the process of trying to add trailing slashes to all of the pages of the site. I managed to get it working with by adding the suffix to the products and categories from the settings.

I have added some htaccess to manage the 301's to the trailing slashes.

My issues are:

For some reason, this doesn't add it to the homepage. I couldn't find where to add this
Also, the canonical tags were pointing at the non-trailing slash URL.


texts: Does small images and all other resolution of all images, Magento create only in cache folder ? I tried to find in FTP but I found only original of img that I downloaded to admin.


texts: How to display Out Of Stock product for only One Category while hiding them in all other category magento 2

texts:
Hi @all actually i wanted to display Out of stock products only in one category(Parent Category and it's all child categories) with  "Display Out Of Stock" option "Yes" in the admin?

It means here i need to hide Out of stock products for all rest of the categories.

Here i tried to follow this link

If Anyone having any idea please help here.
Thanks in Advance.


texts:
I have generated a test key on fedex developer account & configured all needed details in Magento 2, but all the time I am getting message:

  Sorry, no quotes are available for this order at this time

at frontend cart & checkout page. The credentials are correct than why it is not calculating shipping cost ?


texts: Magento 1.9 - How to add serial number in sales orders list & invoice list?

texts:
How to add serial number for both order list and invoice list,

sales->order

sales->order->invoice

If i add below code in ->

app\design\adminhtml\default\default\template\sales\order\view\items.phtml

<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magento.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magento.com for more information.
 *
 * @category    design
 * @package     default_default
 * @copyright   Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
?>
<?php $_order = $this->getOrder() ?>

        <col width="1">
        <col />
        <col width="1" />
        <col width="1" />
        <col width="1" />
        <col width="1" />
        <col width="1" />
        <col width="1" />
        <col width="1" />
        <col width="1" />
        <col width="1" />

                <?php echo $this->helper('sales')->__('SNo.') ?>
                <?php echo $this->helper('sales')->__('Product') ?>
                <?php echo $this->helper('sales')->__('Item Status') ?>
                <?php echo $this->helper('sales')->__('Original Price') ?>
                <?php echo $this->helper('sales')->__('Price') ?>
                <?php echo $this->helper('sales')->__('Qty') ?>
                <?php echo $this->helper('sales')->__('Subtotal') ?>
                <?php echo $this->helper('sales')->__('Tax Amount') ?>
                <?php echo $this->helper('sales')->__('Tax Percent') ?>
                <?php echo $this->helper('sales')->__('Discount Amount') ?>
                <?php echo $this->helper('sales')->__('Row Total') ?>

        <?php $_items = $this->getItemsCollection() ?>
        <?php $i=0;foreach ($_items as $_item):?>
            <?php if ($_item->getParentItem()) continue; else $i++;?>
            <tbody class="<?php echo $i%2?'even':'odd' ?>">
                <?php echo $i ?>
                <?php echo $this->getItemHtml($_item) ?>
                <?php echo $this->getItemExtraInfoHtml($_item) ?>

        <?php endforeach; ?>

align mismatch,

Screenshot :

Any help to solve the alignment error, thanks.


texts:
In Magento 1.x you could get the store date time via

Mage::getModel('core/date')->gmtDate();

What would be the equivalent to this in Magento 2.x?


texts: How to add HTML content in notice for checkout form fields in Magento 2

texts:
I want to add some text below the Country field on checkout page. See below:

I followed this answer: https://magento.stackexchange.com/a/240048/2358 It worked perfectly, but only issue with that is I am not able to add HTML content in code.

I have added this code:

$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']
        ['children']['shippingAddress']['children']['shipping-address-fieldset']['children']['country_id']['notice'] = 'Should you wish for your purchase to be shipped internationally, please contact us';

But when it outputs HTML element as plain text.

Do anyone know how to resolve this and display HTML content in notice section for form fields on checkout page in Magento 2?

Please help, thanks!


texts:
Is there any plan to introduce a rounding function in Magento that caters for rounding to either the nearest 10 cents or, even better, nearest 5 cents?
In Switzerland, all prices are inclusive of tax and rounded to the nearest 5 cents as this is the smallest coin in the Swiss currency.
12.72 becomes 12.70 and 12.73 becomes 12.75, etc.
I did find, and buy, a solution from an Italian company. It allows rounding to 1 digit but then 12.72 becomes 12.7 whereas I want to display 12.70.


texts: Magento2: Product detail page redirect to catalog search page

texts:
While upgrade Magento2.3.2 to Magento2.3.3, we got some error in product detail page. If i click product detail page automatically redirect to catalog search page.

Eg:www.example.com/sameple-test => www.example.com?g=sameple-test

Thanks


texts: Magento 2 : Add to cart out of stock products

texts:
I would like to be able to add to cart products that are Out of Stock. I've already set the

  System --> Configuration --> Catalog --> Inventor --> Backorders =
  Allow Qty

Below 0 but the add to cart button still not appear.

I tried to write an observer the make the product salable :

$salable = $observer->getEvent()->getSalable();
$salable->setIsSalable(true);

The add to cart button is displayed but when I add the product to the cart I get the default Magento error: This product is out of stock.

Thanks!


texts: How does Magento model distinguish column names in its get/set Model methods?

texts:
Let's say I have a Model associated to a table with a column called title. I understand that I can do a $model->setTitle("Hello"); to set a value to this field. I can probably do the same for reading like so ``$model->getTitle();`.

An example would be:

$blogpost = Mage::getModel('weblog/blogpost');
    $blogpost->setTitle('Code Post!');
    $blogpost->setPost('This post was created from code!');
    $blogpost->save();

However, what if the column name was title_name? I could do it with $this->getTitleName() and it worked.

So, I was thinking, if I could use getTitleName() for a column called title_name, then what if I had another column called titleName in the database? How is Magento going to decide between titleName and title_name? How is Magento going to know which column I am referring to?


texts:
I am moving a Magento 1.8.1.0 website on an Ubuntu 16.04 LTS server.

The same website is working fine on another machine running openSUSE 12.3.

The website seems to be correctly working on the new machine, however the frontend is incredibly slow (it takes 5 minutes to load every page, even the contacts page). The backend is pretty fast instead.

I tried clearing the cache, disabling it but nothing changes.

The profiler output shows me the following top results (ordered by time in excel)

Do you have any suggestion on what is possibly going wrong?


texts: Have category page main menu based on current category

texts:
I've tried Google - but maybe I just can't word this question correctly to get an answer.

I want my top-level category pages to change the main menu to only show the current category.  So, for example, say I have a site selling PC Software and Mac Software.  If the user goes to "site.com", then the main menu should have two entries, "PC Software" and "Mac Software", and the subcategories below that.

But if the user is at "site.com/pc", then I want the main menu to show the subcategories of PC Software.  So the main menu categories might be "Games", "Utilities", "Productivity", "Graphics", etc.  Same thing at "site.com/mac".

Any other pages in the "/pc" section would have that same main menu.

I know I could do this by making them in to separate stores, but there are other reasons I'd prefer not to, if possible. I want it to function as one store, with just the main menu changed.


texts: Magento 2 | Display Catalog prices for specific groups without Tax

texts:
I'm currently experiencing a weird problem on my Magento 2.2.6 Store. While giving some customer-groups a 0% Tax Rule the prices on the catalog get still displayed with tax, even tho the "tax info text" says its 0%. Am I missing a configuration or do I miss configure something? Cross-Border Trade setting is "off"

I've attached 2 images to visualize the problem a bit better. The first picture shows the price without tax inside the shopping cart ( thats how it is supposed to be ). The second image shows the product at the catalog ( including tax ).

EDIT 25.10.2018
I had the idea that it was probably an issue from my custom theme but after checking that in comparison with the default Luma Theme I can confirm that this issue still exists.

EDIT 26.10.2018
I thought I had an issue in my taxrules but that look correct  for me, i'll attach an image of the configurations below:

EDIT 29.10.2018
As wished I upload the Rates.csv for you guys to take a look at it:
http://www.sharecsv.com/s/65c899e359d20a9033efb56b01b9eea9/rates.csv

Basically all 0% Tax-rates are assigned to the "tax free" Customer groups.


texts: How to upload local file to server via sftp

texts:
Hi I want to upload tar gz format file to server using varien sftp

Please give suggestion


texts:
I am receiving the following error:
[2021-02-25 12:37:07] main.CRITICAL: Could not read from smtp.gmail.com {"exception":"[object] (Magento\\Framework\\Exception\\MailException(code: 0): Could not read from smtp.gmail.com at /var/www/html/hoesjes/app/code/Mageplaza/Smtp/Mail/Transport.php:134, Zend\\Mail\\Protocol\\Exception\\RuntimeException(code: 0): Could not read from smtp.gmail.com at /var/www/html/hoesjes/vendor/zendframework/zend-mail/src/Protocol/AbstractProtocol.php:305)"} []
[2021-02-25 12:37:07] main.CRITICAL: Warning: fwrite(): SSL operation failed with code 1. OpenSSL Error messages:
error:1420C0CF:SSL routines:ssl_write_internal:protocol is shutdown in /var/www/html/hoesjes/vendor/zendframework/zend-mail/src/Protocol/AbstractProtocol.php on line 260 {"exception":"[object] (Magento\\Framework\\Exception\\MailException(code: 0): Warning: fwrite(): SSL operation failed with code 1. OpenSSL Error messages:

The interesting part is that this message is showing up after I've sent exactly 96 emails out :) so when i am doing a mass email send out.
Is there a limit or something which prevents smtp.gmail.com to send out more then 96 emails in one go ?


texts: Docker container show "Fatal error: Uncaught Error: Class 'Cli' not found in /bin/magento"

texts:
I have installed docker for my local magento 2 development
Following this stuff https://github.com/redbox-digital/magento-docker
This currently best setup magento for linux container running docker. Hope team magento should port to linux soon
Back to my question

I can go to docker container and run

  composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition .

Yes i got all latest code version
But when i run php bin/magento i got not found Cli
Could anyone tell me why it happens and how to fix it?
php -v show Cli 7.0.14 version


texts: Products import success but products not imported

texts:
I am trying to import products using the system>import in Magento 2.
The system say:

CSV file has no errors.

Import works fine.

But still no products are created from the given data.

Also reindexed every index.

Where are the products which I just imported?


texts:
How to create text swatch programmatically?

If, I follow method from saving controller in the product-attribute module (admin) then, I got first and the third field saved but not actual text swatch.


texts: Add a block to programmatically generated widget

texts:
I need to generate a widget block with upgradeData.php and assign a block to this widget how can I do this?

Folowing is my code for widget generation:

Setup/UpgradeData.php

public function __construct(
        \Magento\Cms\Model\BlockFactory $blockFactory,
        \Magento\Widget\Model\Widget\InstanceFactory $widgetFactory,
        \Magento\Framework\App\State $state
    )
    {
        $this->blockFactory = $blockFactory;
        $this->widgetFactory = $widgetFactory;
        $this->state = $state;
    }

    /**
     * Upgrade data for the module
     *
     * @param ModuleDataSetupInterface $setup
     * @param ModuleContextInterface $context
     * @return void
     * @throws \Exception
     */
    public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
    {
        $setup->startSetup();
        if (version_compare($context->getVersion(), '0.1.1') < 0) {
             $cmsBlockData = [
                'title' => 'Test Block',
                'identifier' => 'test-block',
                'content' => "

Test block

Test block empty content.

",
                'is_active' => 1,
                'stores' => [0],
                'sort_order' => 0
            ];

            $cmsBlock = $this->blockFactory->create()->setData($cmsBlockData)->save();

            $widgetData = [
                'instance_type' => 'Magento\Cms\Block\Widget\Block',
                'instance_code' => 'cms_static_block',
                'theme_id' => 5,
                'title' => 'Test Widget',
                'store_ids' => '0',
                'widget_parameters' => '{"block_id":"'.$cmsBlock->getId().'"}',
                'sort_order' => 0,
                'page_groups' => [[
                    'page_id' => 1,
                    'page_group' => 'all_pages',
                    'layout_handle' => 'default',
                    'for' => 'all',
                    'all_pages' => [
                        'page_id' => null,
                        'layout_handle' => 'default',
                        'block' => 'sidebar.additional',
                        'for' => 'all',
                        'template' => 'widget/static_block/default.phtml'
                    ]
                ]]
            ];

            $this->widgetFactory->create()->setData($widgetData)->save();
        }
        $setup->endSetup();
    }

but this produces exception during setup:upgrade like

[Magento\Framework\Exception\LocalizedException]

Area code is not set


texts: Multilple file upload not working in magento2.3.0?

texts:
I am not able to upload multiple files in magento2.3.0?

Here is my code:

$fieldset->addField(
            'commercial_pic',
            'file',
            [
                'name' => 'commercial_pic',
                'data-form-part' => $this->getData('target_form'),
                'label' => __('Commercial Doc'),
                'title' => __('Commercial Doc'),
                'multiple'=> 'multiple',
                'value' => $partner['commercial_pic'],
                'after_element_html' => '<label style="width:100%;">
                    Allowed File Type : [jpg, jpeg, gif, png]
                </label>
                <img style="margin:5px 0;width:250px;"
                src="'.$this->getBaseUrl().'pub/media/avatar/customer/commercial/'.$partner['commercial_pic'].'"
                />',
            ]
        );

Any help would be appreciated.


texts: Magento Wishlist Grouped Products with 0 quantity

texts:
Ok, so i have grouped product pages that show the different individual items all with text fields that start off with having 0 displayed in them.

(please understand that changing this to a drop down is not an option)

The issue i have here, is that with a grouped product page that has for example 10 products, if on 1 line i change quantity to 1 and leave rest 0, then click add to wishlist, on the wishlist page it will show every line including the ones with 0 quantity, which starts to look really bad.

I am sure its possible, but i have spent a long time trying to figure this one out.

How would i go about either hiding those lines from the wishlist page, or maybe looping through and not processing the ones that equal 0.

app\design\frontend\enterprise\My_Theme\template\wishlist\options_list.phtml is where it cycles through to put the information down

Any help would be appreciated


texts: Editing custom module installed in VENDOR folder through a custom theme

texts:
I have a custom theme setup in Magento 2.2.5 where I am able to modify module files.

I know that to modify something installed in app/code i do this;
    app/code/WeltPixel/ProductPage/view/frontend/templates/product/view/addto.phtml

becomes

app/design/frontend/Pearl/weltpixel_custom/WeltPixel_ProductPage/templates/product/view/addto.phtml

This all works ok and my modifications are shown in the front end

However I have a module installed that i wish to change at;

vendor/cart2quote/module-quotation-encoded/view/frontend/templates/quote/form.phtml

Can somebody please tell me what what the path would be to modify this file in my custom theme? i.e.

app/design/frontend/Pearl/weltpixel_custom/XXXX/XXXX/XXXX/form.phtml


texts:
Is it normal if checkout page takes around 17 - 20s to fully load until the loader image disappears and user can enter some data?

I am running magento 2.3-dev branch in production mode, all the cache is on, redis installed on the server. DOM is loaded under 1s, but then there are a lot of html files loaded by ajax and also many minified js. That's why I have to wait around 20 s.

I tried to compare some magento 2 shops and found this cache extension, but even on their shop the checkout page takes around 20s to fully load.

My question is, if this is what I can expect on our live server and if it's normal loading time? Is there something I can do about it?


texts: Is it possible to get a list of all sites programatically?


texts: add an event after people click confirmation link email

texts:
I want to add an event when people click the confirmation email link to confirm the as a newsletter subscriber.

where I should add this event inside the magento?

Thanks


texts: Access Sub-category without Parent Category

texts:
We have following category and sub-category in our store.

Category: http://yoursite.com/category.html

Sub-category: http://yoursite.com/category/sub-category.html

Is it possible to access sub-category listing page using below URL

Sub-category: http://yoursite.com/sub-category.html

Case 1 : Access sub-category listing page, even if its main category id disabled

Case 2: Access sub-category listing page without using main category in URL

Also if my product is assigned to any sub-category and set the visibility to Catalog, will it appear on sub-category listing page when its category id disabled  ?

How can I achieve this ?

Thanks


texts:
I have just updated to magento 1.9.1.2 from 1.9.0.1.

(In the new magento, I use the database i was using in previous version)

when i try to disable the magento cache in backend, i have an error.

here is the log :

a:5:{i:0;s:1077:"Error in file: "/***/app/code/core/Mage/Core/sql/core_setup/upgrade-1.6.0.5-1.6.0.6.php" - SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'core_email_queue' already exists, query was: CREATE TABLE `core_email_queue` (
  `message_id` int UNSIGNED NOT NULL auto_increment COMMENT 'Message Id' ,
  `entity_id` int UNSIGNED NULL COMMENT 'Entity ID' ,
  `entity_type` varchar(128) NULL COMMENT 'Entity Type' ,
  `event_type` varchar(128) NULL COMMENT 'Event Type' ,
  `message_body_hash` varchar(64) NOT NULL COMMENT 'Message Body Hash' ,
  `message_body` mediumtext NOT NULL COMMENT 'Message Body' ,
  `message_parameters` text NOT NULL COMMENT 'Message Parameters' ,
  `created_at` timestamp NULL default NULL COMMENT 'Creation Time' ,
  `processed_at` timestamp NULL default NULL COMMENT 'Finish Time' ,
  PRIMARY KEY (`message_id`),
  INDEX `0ADECE62FD629241C147389ADF20706E` (`entity_id`, `entity_type`, `event_type`, `message_body_hash`)
) COMMENT='Email Queue' ENGINE=INNODB charset=utf8 COLLATE=utf8_general_ci";i:1;s:1202:"#0 /***/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
#1 /***/app/code/core/Mage/Core/Model/Resource/Setup.php(437): Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade', '1.6.0.4', '1.6.0.6')
#2 /***/app/code/core/Mage/Core/Model/Resource/Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('1.6.0.4', '1.6.0.6')
#3 /***/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /***/app/code/core/Mage/Core/Model/App.php(428): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /***/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Model_App->_initModules()
#6 /***/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#7 /***/index.php(96): Mage::run('fr_store', 'store')
#8 {main}";s:3:"url";s:66:"/index.php/admin/cache/index/key/91230960375950b4c11a2b6fd88965f9/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}

How can I solve that?


texts: Cannot create new list.phtml file on Custom Magento Theme

texts: I have copied list.phtml from Magento's rwd theme; however, no products load when I add it to my custom Magento theme. Does this happen when the original files have been edited?


texts: Add product custom options and only saved once

texts:
$values = [
        [
            'title'=>'Red',
            'price'=>10,
            'price_type'=>"fixed",
            'sort_order'=>1
        ],
        [
            'title'=>'White',
            'price'=>10,
            'price_type'=>"fixed",
            'sort_order'=>1
        ],
        [
            'title'=>'Black',
            'price'=>10,
            'price_type'=>"fixed",
            'sort_order'=>1
        ]
    ];

    $_options = [
        [
            "sort_order"    => 1,
            "title"         => "Field Option",
            "price_type"    => "fixed",
            "price"         => "",
            "type"          => "field",
            "is_require"    => 0
        ],[
            "sort_order"    => 2,
            "title"         => "Color",
            "price_type"    => "fixed",
            "price"         => "",
            "type"          => "drop_down",
            "is_require"    => 0,
            "values"        => $values
        ],[
            "sort_order"    => 3,
            "title"         => "Multiple Option",
            "price_type"    => "fixed",
            "price"         => "",
            "type"          => "drop_down",
            "values"        => $values,
            "is_require"    => 0
        ]
    ];
    foreach ($_options as $_option) {

        $option = $this->optionFactory
            ->setProductId($product->getId())
            ->setStoreId($product->getStoreId())
            ->addData($_option)
            ->save();

        $product->addOption($option);
        // must save product to add options in product
        $this->productRepository->save($product);
    }

When I saved multi custom options, Only saved the first option.The database also saved once.Please help me


texts: Magento How to change product availability text

texts:
I have Magento 1.9 with Fortis II theme.
I need to change the "Availability: In stock" text to "Availability: Available. Will be shipped in 3 working days" and the relevant translations.
I have found and changed accordingly all references of these phrase in Mage_Catalog.csv and in translate.csv which should be applied after the core settings, but nothing happened. Searching fo an answer in the forums I found a relevant topic with an answer about core_translation database table. I have searched this table but no reference found.
So, ho am I going to set the availability text as needed?
Further more, there are products that are available in stock, other products with an aailabity of 3 working days, other on 10 and other are available on order. How ca I set all those availability statuses?

Thank you


texts: Magento 2 | CPU Load goes High showing php-fpm7 process ID on top Command

texts: we have setup Magento 2.0 on Ubuntu 16.04 TLS, We are using nginx Web Server and php 7.0 installed on Machine. When we run application all CPU Utilisation showing 100% and eating server memory very quickly, We have changed www.conf file in php-fpm but not fixed the problem due to this website not responding after 5 minutes of reboot the machine we are not rebooting the machine every minute.Kindly share the valuable feedback on this so that we can fix the problem


texts: Magento 2 : How to Override frontend Template File?

texts: I'm developing a custom module in magento 2. I need to change the file located in Magento/Sales/view/Frontend/Templates/Email/Items/Order/default.phtml.


texts: Magento2: Installing issue on MacBook Air

texts:
I m trying to install Magento2 in MacBook Air.
But having an issue of PHP extension
mcrypt
intl

Did all try to install this extension but not get success.
Please give me your suggestion if you faced the same thing on your mac.


texts:
I've been looking over the Magento 2 Docs for using custom JS and have been trying to add a modified version of 'configurable':'Magento_ConfigurableProduct/js/configurable' to my theme directory so that I can treat the drop downs for product sizes differently than other drop downs.

I've created a requirejs.config.js file in the root of my theme directory with the following:

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

I've then copied vendor/magento/module-configurable-product/view/frontend/web/js/configurable.js to my themes Magento_ConfigurableProduct/web/js directory and added a alert to the _fillSelect method. However it doesn't seem to be taking effect.

I've run a deploy and cache clear and the file does show up in the pub/static directory correctly, however I can;t work out why this file is not being used in place of the old one.


texts: Adding an order comments block to onepage checkout

texts: I am trying to add customer comments to the onepage checkout review tab. I would like to eventually post the results in the sales order email that is sent back on checkout. Based on research I think that I need to build an observer to tie to the event checkout_type_onepage_save_order. Any help with this is much appreciated.


texts:
Here is my code i just want to update order column that are in collection in foreach i have tried model and modelfactory both to save but it sets Queued column but unable to save it anyone kindly help is a great help.
public function execute()
        {
        //all order collection
        $collection = $this->_orderCollectionFactory->create()->addFieldToFilter('queued',['in' => 0]);
        $ordercollection = $collection->getData();

        foreach ($ordercollection as $key=>$order) {

            try {
                //$this->saveOrderqueued($order['entity_id']);
                $this->saveOrderqueued($order['increment_id']);
            } catch (\Exception $e) {
                $this->logger->critical($e->getMessage());
            }
        }
    }

    public function saveOrderqueued($orderId){
//        $orderdetails = $this->_modelOrder->load($entityid);
        $orderdetails = $this->orderFactory->create()->loadByIncrementId($orderId);
        $orderdetails->setQueued("1");
//unable to save
        $orderdetails->save();
    }

Thanks in advance


texts: Magento review module(Magento/Review) consists two templates in (Magento/Review/view/frontend/templates/helper) folder. Those templates are summary.phtml and summary_short.phtml. In which scenario which template is used to display the review link. Please explain


texts: Buy X Get Y rules - how are they supposed to work?

texts:
Looking through the Magento code (specifically the process() method of the Mage_SalesRule_Model_Validator class), the handling section for case Mage_SalesRule_Model_Rule::BUY_X_GET_Y_ACTION: seems to want to take the total ITEM PRICE * QUANTITY of the "discount quantity" off of the quote item. However, that only works when you have > X quantity of the item in the cart: EG

If you have a Buy 3 Get 1 free rule, it only applies if you actually have 4 in the cart. This is a basic rule, no conditions or special action conditions. If you have a Buy 1 Get 1 free rule, you would have to have 2 in your cart, etc. I have a bugfix ticket in the queue for my workplace so it applies to the actual quantity in the cart, but for Buy 1 Get 1 free it would essentially equate to "Buy 1 get it free", which is definitely not the right solution.

Is this supposed to be actually adding additional quantity to the cart? If not, what is the intended behavior? If so, where exactly does it do that? Is there already a patch available to fix this?


texts: Admin form factory multiselect / checkbox

texts:
I am trying to implement a multi choice for a custom field.

Currently i use form factory with this for simple fields :

$fieldset->addField(
            'mail',
            'text',
            ['name' => 'mail', 'label' => __('Mail'), 'title' => __('Mail'), 'required' => true]
        );

Now i want checkbox or multiselect, i already see this :

$fieldset->addField(
            'test',
            'multiselect',
            [
                'name' => 'name',
                'label' => __('test'),
                'title' => __('test'),
                'required' => true,
                'values' => $optionLanguage,
                'disabled' => false
            ]
        );

But I don't know how to write my $optionLanguage array, I just want simple option (option 1: Fr, option 2: En).

Don't matter checkbox or multiselect, checkbox is better for me but if multiselect is easier i will go for it.


texts: Why don't possible rewrite this class on Magento\Payment\Model\Method\Cc

texts:
I create the rewrite of that class but for some reason magento ignores it, is it because it inherits from an abstract class?
etc/di.xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\Payment\Model\Method\Cc" type="Trezo\DmCard\Model\Method\Cc" />
</config>


texts: Magento 2.2.7. Best way -according to the Magento guidelines- to apply some custom javascript to specific products

texts:
At app/design/frontend/Custom/Theme/Magento_Catalog/templates/product/list.phtml I'm trying to apply a javascript for certain products (not all of them) as follows:

<?php foreach ($_productCollection as $_product): ?>
    <?php if ($_product->getData('custom_attribute')): ?>
        //some javascript that apply for the products that contain the attribute
    <?php endif; ?>
<?php endforeach; ?>

What would be the best approach to achieve this in a way that the Magento good practices are guaranteed. Thanks for your input and collaborations


texts: Add custom link in customer account navigation

texts:
I want to add custom link in customer's navigation.I have developed below code but getting 404 - not found issue while click on the tab.

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceBlock name="customer_account_navigation">
        <block class="Magento\Framework\View\Element\Html\Link\Current" name="module">
            <arguments>
                <argument name="path" xsi:type="string">module/customer/list</argument>
                <argument name="label" xsi:type="string" translate="true">My Data</argument>
            </arguments>
        </block>
    </referenceBlock>
</body>
</page>

Then I create a controller file name : List.php at modulename/controller/customer

<?php
    namespace namespace\modulename\Controller\Customer;
    use Magento\Sales\Controller\OrderInterface;
    use Magento\Framework\App\Action\Context;
    use Magento\Framework\View\Result\PageFactory;

    class List extends \Magento\Framework\App\Action\Action
    {
     /**
     * @var PageFactory
     */
    protected $resultPageFactory;

    /**
     * @param Context $context
     * @param PageFactory $resultPageFactory
     */
    public function __construct(
        Context $context,
        PageFactory $resultPageFactory
    ) {
        $this->resultPageFactory = $resultPageFactory;
        parent::__construct($context);
    }

    /**
     * Customer order history
     *
     * @return \Magento\Framework\View\Result\Page
     */
        public function execute()
        {
        $resultPage = $this->resultPageFactory->create();
        $resultPage->getConfig()->getTitle()->set(__('My Data'));

        $block = $resultPage->getLayout()->getBlock('customer.account.link.back');
        if ($block) {
            $block->setRefererUrl($this->_redirect->getRefererUrl());
        }
        return $resultPage;
    }
    }

Block file at namespace/module/block/customer/test/list.php

<?php

namespace namespace\modulename\Controller\Customer;

use Magento\Sales\Controller\OrderInterface;
use Magento\Framework\App\Action\Context;
use Magento\Framework\View\Result\PageFactory;

class List extends \Magento\Framework\App\Action\Action
{
 /**
 * @var PageFactory
 */
protected $resultPageFactory;

/**
 * @param Context $context
 * @param PageFactory $resultPageFactory
 */
public function __construct(
    Context $context,
    PageFactory $resultPageFactory
) {
    $this->resultPageFactory = $resultPageFactory;
    parent::__construct($context);
}

/**
 * Customer order history
 *
 * @return \Magento\Framework\View\Result\Page
 */
public function execute()
{
    $resultPage = $this->resultPageFactory->create();
    $resultPage->getConfig()->getTitle()->set(__('My Orders'));

    $block = $resultPage->getLayout()->getBlock('customer.account.link.back');
    if ($block) {
        $block->setRefererUrl($this->_redirect->getRefererUrl());
    }
    return $resultPage;
}
}

and add xml file : modulename_test_list.xml

<?xml version="1.0"?>

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceBlock name="customer_account_navigation">
        <block class="Magento\Framework\View\Element\Html\Link\Current" name="modulename">
            <arguments>
                <argument name="path" xsi:type="string">modulename/customer/list</argument>
                <argument name="label" xsi:type="string" translate="true">My Data</argument>
            </arguments>
        </block>
    </referenceBlock>
</body>


texts: How does one get the order prefix programmatically?

texts:
We use separate order prefixes for our production and lower environments. For each environment we run a sequel statement to update so each environment is unique.

update `sales_sequence_profile` set prefix = "PREFIX";

How would I return the prefix value programmatically?

I am currently working on Magento 2.2.10


texts: date of birth value doesn't show up in account information in admin panel on magento 1.9

texts:
I am trying to fetch the date of birth of end user but i show there no date of birth enter or saved in admin.

<div class="dob-full" style="display:none;">
  <input type="hidden" id="<?php echo $this->getFieldId('dob')?>" name="<?php echo $this->getFieldName('dob')?>" />
</div>


texts: How to include order pictures in order_confirmation email?

texts: I am new to Magento and I am trying to find a way how to include a picture of the product the customer ordered from my website in the order confirmation email?


texts: Magento 2 - Pixel code on specific products

texts:
I have a pixel tracking code and I want to add this code to some products

If I add this in

  Content -> Design -> Configuratoin

But it will appear on all pages, I want to add it in some specific products. How can I do this?

Please help me on this. Thanks


texts: Magento 2: What Populates "elems" in a UI Component

texts:
The top level KnockoutJS template of listing UI Component looks like this

<!-- File: vendor/magento//module-ui/view/base/web/templates/collection.html -->

<each args="data: elems, as: 'element'">
    <render if="hasTemplate()"/>
</each>

This is translated by Magento into the following raw KnockoutJS code.

<!-- ko foreach: {data: elems, as: 'element'} -->
    <!-- ko if: hasTemplate() --><!-- ko template: getTemplate() --><!-- /ko --><!-- /ko -->
<!-- /ko -->

In either case, this template will foreach over the view model's elems property.

If I look at the RequireJS module that (I think>) returns the view model's constructor class

vendor/magento/module-ui/view/base/web/js/lib/core/collection.js

I see the insertChild method appears to add to the elems property.

What's less clear to me is: Where does Magento actually call insertChild to populate the elems and/or how is elems populated with the view models that make up a collection of UI Components?


texts: How can I remove these side boxes: "Call Us Toll Free", "Free Shipping", "Now accepting PayPal" ?


texts: Update product quantity in mini cart if product is already added in the cart

texts:
I want to update the mini cart on button click.

If the product is not exist in the cart, it should add the product in the cart.

If product already added, it should update the quantity (increase or decrease) of product in the cart.

How can I achieve this?

Currently, quantity is only increasing if the product is already added in the cart.

Edit:
if product exist i am changing form action to following url:

<?php echo Mage::getBaseUrl(); ?>checkout/cart/updateItemOptions/id/<?php echo $_product->getId(); ?>


texts: Why some html tags in not saving in cms pages?

texts:
I am trying to put some html in my home page but whenever I save the page the tags are gone, it doesn't save.

Here is the html which I am trying to save in the page ie.

Now when I click on the save button the
 and
 tags are disappeared and my html looks like this

How can I save these tags in the cms page. Does magento can save these tags or not.
Thanks...


texts: The JS Message container doesn't show error messages in the Payment checkout step

texts:
Maybe due to our configuration (maybe due to M2), error messages are not printed anymore in Onepage checkout.

It's a simple case of throwing a \LocalizedException during capture() for reason X. That results in a 400 response for the /V1/carts/mine/payment-information request. All good.
M2 creates a JSON out of that exception, with a message property, which is then handled here. Superb.
The error message is then pushed onto an error message container here. Omg, brilliant.
Then nothing happens, what.

I was expecting the error message to be printed. Mind you, the above behaviour was tracked down with a JS debugger, I'm not assuming it happens.

Trying to fix this, I've stumbled upon \Magento\Framework\Message\ManagerInterface. Using that in my capture() method, it correctly added another message which this time was fetched with that customer/section/load request I dearly hate. And, although the messages property of the response was what I wanted, I still couldn't see my message appear.

Ok...

Then I saw that, for checkout only, M2 removes the messages container in favour of UI Components. It was too simple, you see. They had to put JSON in HTML through a PHP-parsed XML.

If I put back that message block, the message is finally showing, hooray. But I don't think M2 devs removed that block by mistake.

Do any of you know how exactly the JS message container does its job? Who triggers its rendering?


texts: How to define a special template for a product option in the account / order view page?

texts:
I have implemented a module to have a custom input product option type (following this tutorial)

This module defines 2 different template for the frontend :

one for the catalog view
another one used both for the shopping cart, the "view order" page of the client account/oderhistory and invoice. This template uses product option customview possibility.

I would like to define a special template for the "order view" page / invoice?
Is it possible?

my layout files is : (app/design/frontend/rwd/default/layout/custoptiontype.xml)

<?xml version="1.0"?>
<layout version="0.1.0">
<catalog_product_view>
    <reference name="product.info.options">
        <action method="addOptionRenderer">
            <type>filesstate</type>
            <block>custoptiontype/catalog_product_view_options_type_filesstate</block>
            <template>custoptiontype/catalog/product/view/options/type/filesstate.phtml</template>
        </action>
    </reference>
</catalog_product_view>
</layout>

the called class

<?php
class Mine_Custoptiontype_Block_Catalog_Product_View_Options_Type_Filesstate
        extends Mage_Catalog_Block_Product_View_Options_Abstract
{
}
?>

the catalog template is defined by app/design/frontend/base/default/template/custoptiontype/catalog/product/view/options/type/filesstate.phtml

Regarding the second template (option customview), the template is in app/design/frontend/base/default/template/custoptiontype/options/customview/filesstate.phtml

called by

<?php
class Mine_Custoptiontype_Model_Catalog_Product_Option_Type_Filesstatetype
    extends Mage_Catalog_Model_Product_Option_Type_Default
{
    public function isCustomizedView()
    {
        return true;
    }

    public function getCustomizedView($optionInfo)
    {
        $customizeBlock = new Mine_Custoptiontype_Block_Options_Type_Customview_Filesstate();
        $customizeBlock->setInfo($optionInfo);
        return $customizeBlock->toHtml();
    }
}
?>

with

<?php
class Mine_Custoptiontype_Block_Options_Type_Customview_Filesstate
    extends Mage_Core_Block_Template
{
    protected $_template = 'custoptiontype/options/customview/filesstate.phtml';
}
?>

thank you for your help,

Alex


texts: Received orders with a duplicate order ids

texts:
We have received 2 orders with the same order id.
Like We have 2 orders with the following order Ids:
000001256
000001256
How is this possible?
Does anyone has faced this type of issue OR any idea on this case?
We are using Magento ver: 2.1.2
Note => That issue we faced one day only and on that day we have server space issue so is there any relation between Server space and Duplicate order Ids issue?
Appreciated any thought from the community!


texts:
I have changed my config.xml so that it doesnt have admin however my when I try to access the extension in the back in its still sending me to a 404 page.

Below is my config.xml, could someone advise what else I need to do

<?xml version="1.0"?>
    <config>
        <modules>
            <Namespace_ModuleName>
                <version>0.9</version>
            </Namespace_ModuleName>
        </modules>
        <global>
            <models>
                <custom_export>
                    <class>Namespace_ModuleName_Model</class>
                </custom_export>
            </models>
            <helpers>
                <custom_export>
                    <class>Namespace_ModuleName_Helper</class>
                </custom_export>
            </helpers>
        </global>
        <admin>
            <routers>
                <adminhtml>
                    <args>
                        <modules>
                            <Namespace_ModuleName after="Mage_Adminhtml">Namespace_ModuleName_Adminhtml</Namespace_ModuleName>
                        </modules>
                    </args>
                </adminhtml>
            </routers>
        </admin>
        <adminhtml>
            <events>
                <adminhtml_block_html_before>
                    <observers>
                        <option_in_custom_export>
                            <class>custom_export/Observer</class>
                            <method>includeOption</method>
                        </option_in_custom_export>
                    </observers>
                </adminhtml_block_html_before>
            </events>
        </adminhtml>
    </config>


texts:
I want to prevent a certain plugin from loading, namely 'authorization' plugin in

module-quote/Model/GuestCartManagement/Plugin/Authorization.php.

What i tried to do is to comment lines in di.xml where this plugin seems to be declared. After i modified the files, i removed var/generation, and var/di folders, cleared cache and ran grunt exec.
 These lines are in:

magento/vendor/magento/module-quote/etc/webapi_rest/di.xml
magento/vendor/magento/module-quote/etc/webapi_soap/di.xml

Unfortunately, plugin still keeps loading according to what xdebug shows me:

So, how do i prevent the plugin from loading?


texts: Magento 1.9 custom product tabs based on parent category

texts:
I have successfully created some custom tabs on my product pages via my local.xml file.  However, I would like to show/hide different tabs based on the parent category of the product.

Can this be done in the local.xml file or do I have to create some if/else statements in my template files?

Any suggestions?

Here is my local.xml code:

<?xml version="1.0"?>

<catalog_product_view>
    <reference name="product.info">
        <block type="core/template" name="safety_data" as="safety_data" template="peptide/safety_data.phtml">
            <action method="addToParentGroup"><group>detailed_info</group></action>
            <action method="setTitle" translate="value"><value>Safety Data</value></action>
        </block>
    </reference>
</catalog_product_view>

<catalog_product_view>
    <reference name="product.info">
        <block type="core/template" name="quality_control" as="quality_control" template="peptide/quality_control.phtml">
            <action method="addToParentGroup"><group>detailed_info</group></action>
            <action method="setTitle" translate="value"><value>Quality Control</value></action>
        </block>
    </reference>
</catalog_product_view>


texts: Display customer_note in order confirmation email

texts:
I am using this code to display customer_note in order confirmation email:
{{var order.getCustomerNote()|escape|nl2br}}

But it does not show up in the email. I also checked the value of customer_note in sales_order table to make sure it's not null.
And i went to Order model:

vendor/magento/module-sales/Model/Order.php

And return a test string:
/**
 * Return customer_note
 *
 * @return string|null
 */
public function getCustomerNote()
{
    return "i was here!";
    return $this->getData(OrderInterface::CUSTOMER_NOTE);
}

Surprisingly i can see my test string show up in email.
Do you have any ideas why it doesnt work?
Many thanks.


texts: Add a drop-down field in checkout form Magento 2

texts:
I want to add a drop-down here

I can add area text field but when it comes to drop-down, I am facing problem.


texts:
I am new to Magento and I've inherited a Magento built website.

I have been asked to reduce the number of store views we have. Is it possible to put a redirect on a store view and all of it's URL's so its redirecting to a different store view e.g mystore.com/fr/variableproducts would redirect to mystore.com/de/variableproducts
The store view it requires a redirect to is not the default store and I need to do this redirect from several stores to several stores.

Please can anyone point me in the right direction. I have researched and as yet haven't found a suitable answer to what I need.

Thank you in advance


texts: How to get a product new from and to date in phtml file in magento 2


texts: How to sell video or music streams with Magento?

texts:
Is there a way to sell video or music streams with Magento and do it so that the stream address would be secure in a way that makes it impossible to redistribute the stream?

There does not seem to be an extension available for this particular need.

It would also be a huge plus if it would be possible to have some kind of monthly subscription option for registered customers so that they could access all videos sold in the store for limited time.

What you can do with basic Magento is to sell a downloadable video file, but it's not good enough for our needs. It might also be possible to sell an address to a static and encrypted html file that would load the stream, but this needs a bit tinkering to get it to work well enough and it might not be secure enough solution.

Any ideas?


texts: Filter Magento2 Fulltext\Collection by OR condition

texts:
How can i filter the Magento2 Fulltext\Collection (Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection)
by an OR condition between 2 product attributes, with respecting also the searchcriteria results ?
What I tried so far:

Just to use addAttributeToFilter from the ProductCollection, because acutally the CatalogSearch Fulltext Collection extends the ProductCollection.
This works fine on the first look, but while other filters in the Fulltext Collection are
applied using addFieldToFilter instead of addAttributeToFilter, using
addAttributeToFilter is not adding the filters to the searchCriteriaBuilder of the Fulltext Collection.
This results in that core functionality which uses the searchCriteria results directly, instead of the full result of the ProductCollection won't work with the applied filters.

Use addFieldToFilter with multi fields, because you can add or conditions with the addFieldToFilter from the AbstractCollection, no ?
no! - because addFieldToFilter is overwritten in the Fulltext Collection, and this overwritten method does only support single fields.

Use SearchCriteriaBuilder with DI in an own class and add the OR condition like described here: Magento2: How to add multiple AND and OR conditions to filter/filterGroups? .
This again also does'nt work because the Fulltext Collection uses the \Magento\Framework\Api\Search\SearchCriteriaBuilder instead of \Magento\Framework\Api\SearchCriteriaBuilder, which does not support this functionality.

Some code snippet to the way i implemented it for (1.) to help you understand what i want to achieve:
$fulltextCollection->addAttributeToFilter(
  [
    [
      'attribute' => 'custom_attribute',
      'eq' => 2
    ],
    [
      'attribute' => 'another_custom_attribute',
      'eq' => 1
    ]
  ],
  [],
  Select::JOIN_LEFT
);

Any ideas are welcome!


texts: Menu and dropdown not opening when click on any link


texts: Magento2.4 decrease stock quantity when invoice is generated

texts:
Magento2.4 I need to decrease qty only when payment is successful which is when invoice is generated.
In short, need to reduce qty when Invoice is generated
For that I uesd this module https://github.com/Vendic/magento2-stock-change-after-payment
But the issue is quantity is also getting reduced when shipment is done. i.e. Quantity decrease twice


texts: How to know the credentials for Magento Connect?

texts:
I'm now responsable of manager a Magento store 1.9.3 located in Google cloud Server. I need to update one of our extension via Magento connect.
The problem is that I don't know the credentials to login to Magento Connect.

There is a way to get the credentials? I have access to the server via FTP and SSH.


texts: How to display featured products in cms homepage...?

texts:
I installed this module(https://www.magentocommerce.com/magento-connect/featured-products-10.html) but i don't know.

How to display this in my cms homepage?


texts: Product Category is not displaying in front end in magento 1

texts:
I have created a new category in the backend.

But it is not automatically showing in front end.


texts: Microsite or Custom Landing Page for a Separate Domain

texts:
I'm looking to create either a "microsite" or a custom landing page for a separate domain. Ideally, myproduct.com would land on a hidden page in my Magento site with its own look and feel. I do not want this page to appear in search results.

I am using Magento Enterprise 1.12 running on RHEL, Nginx, and Apache.


texts: Will front-end built in angular js and three js work with magento?

texts:
We are currently building a web app e-commerce store using mainly Angular JS and Three JS. We are only offering one product in six different sizes. The user can then customize the product with colors, texts, etc.

An example of the project we’re building would be similar to a web app that allows the user to customize and purchase a t-shirt in different sizes. I don't know if it matters, but the store will serve one single market to begin with (Sweden).

We're almost done with the front-end and my question is what type of platform and why, should we use for the back-end? We just want to use something very simple to get the store running, but with options for development further down the road.

Our initial plan was to use Magento as our back-end platform together with hosting as it offers many possibilities for new products or features, however, we don't want to be limiting ourselves.

For example, we have created our check-out process for the front-end, but it seems that Magento has its own check-out process that can only be visually modified? (I know very little about Magento so far).

So, the most critical questions that I am looking to learn about:

What platform to use, and why?
What do I need in addition to the back-end in order for the store to function? Hosting? From what I have understood, payment processing etc. is something that you install through Magento?
Any advice on this would be greatly appreciated as I am eager to learn all about this.

Thanks!


texts: shopping cart page increment and decrement button

texts: how to add increment and decrements button on shopping cart quantity block and   refresh product price on increment or decrements of price using buttons