texts: Magento 2 "Layout Update XML" in Admin not working

texts:
I need to update sorting on just one category in our Magento CE 2.1.3 site.  I tried placing the following code in the Layout Update XML field on the category in the admin, but it doesn't seem to do anything.  If I put this same thing in an XML file in my theme it works like a charm, although it changes sorting throughout the whole site.

    <referenceContainer name="content">
        <referenceBlock name="product_list_toolbar">
            <action method="setDefaultDirection">
                <argument name="dir" xsi:type="string">asc</argument>
            </action>
        </referenceBlock>
    </referenceContainer>

As an alternative, I know in Magento 1 you can put some category specific layout updates by category ID using the <CATEGORY_123>, so does Magento 2 have something similar?

Update #1

After testing the code above on a clean install I confirmed that it does indeed work.  I tracked it down to the fact that our theme is extending the catalog_category_view.xml file...

app/code/design/frontend/<vendor_name>/<theme_name>/Magento_Catalog/layout/catalog_category_view.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="content">
            <referenceBlock name="product_list_toolbar">
                <action method="setDefaultDirection">
                    <argument name="dir" xsi:type="string">desc</argument>
                </action>
            </referenceBlock>
        </referenceContainer>
    </body>
</page>

If I remove the <action method="setDefaultDirection"> section, the "Layout Update XML" code I'm using in the admin seems to work great (only switching asc to desc, of course).  Is this expected behavior?  Does the extended theme file trump the Layout Update XML settings from the admin?

Update #2

Regarding my question for an alternative to the Magento 1 category id specific handle <CATEGORY_123>, thanks to this link I found that you can do this by using an ID specific file.  Instead of the global catalog_category_view.xml you can create a file called catalog_category_view_id_123.xml to update that specific category ID.

My question still stands, though, as to why the admin "Layout Update XML" field is ignored if you have a theme specific sorting set in an XML file.  It seems broken to me, but maybe it's expected behavior?


texts:
Any idea of how to make my site show the global message only on newsletter events?
subscribe events, the rest of the messages like add to cart I don't want to show...


texts:
I'm setting up a vhost for my magento site. So basically I have 2 store namely store1 and store2. Since this 2 store is using the same code and DB I setup the vhost in NGINX almost identical. The only difference are their server_name now when I try to restart my nginx I get the emerg duplicate upstream "fastcgi_backend" error. Not sure what happen. Below is my code
upstream fastcgi_backend {
    server unix:/var/run/php/php7.4-fpm.sock;
}

server {
    listen 80;
    listen 443 ssl http2;
    server_name site1.com.test;
    set $MAGE_MODE developer;
    set $MAGE_ROOT /home/vagrant/code;
    include /home/vagrant/code/nginx.conf.sample;

    index index.html index.htm index.php;
    sendfile off;

    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_intercept_errors off;
        fastcgi_buffer_size 16k;
        fastcgi_buffers 4 16k;
        fastcgi_connect_timeout 300;
        fastcgi_send_timeout 300;
        fastcgi_read_timeout 300;
    }

    location ~ /\.ht {
        deny all;
    }

    ssl_certificate     /etc/nginx/ssl/site1.com.test.crt;
    ssl_certificate_key /etc/nginx/ssl/site1.com.test.key;
}

And here is my conf for the second site
upstream fastcgi_backend {
    server unix:/var/run/php/php7.4-fpm.sock;
}

server {
    listen 80;
    listen 443 ssl http2;
    server_name site2.com.test;
    set $MAGE_MODE developer;
    set $MAGE_ROOT /home/vagrant/code;
    include /home/vagrant/code/nginx.conf.sample;

    index index.html index.htm index.php;
    sendfile off;

    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_intercept_errors off;
        fastcgi_buffer_size 16k;
        fastcgi_buffers 4 16k;
        fastcgi_connect_timeout 300;
        fastcgi_send_timeout 300;
        fastcgi_read_timeout 300;
    }

    location ~ /\.ht {
        deny all;
    }

    ssl_certificate     /etc/nginx/ssl/site2.com.test.crt;
    ssl_certificate_key /etc/nginx/ssl/site2.com.test.key;
}

So it's almost identical except for the servername. But I have no idea why I'm getting this error emerg duplicate upstream "fastcgi_backend"
Would really appreciate any help here.
Note: I only tried just 1 config in the site-enabled and the config was working. Only when I try to load/enable a second site that I experience that error


texts: Bulk adding & updating product attribute

texts:
[M1]

I have over 2000 products in my Magento store. I want to add a new attribute called 'Warranty Terms' to display it on the frontend. This is going to be the same for all products. I know how to add a new attribute, but how do I mass update it for all products? Warranty terms attribute is going to require WYSIWYG editor.

I added a new attribute & tried bulk updating it through Catalog > Products > Select All > Update attributes, however, this new attribute is not displaying in the list of attributes that could be mass updated. Is there a way using codes or maybe through SQL query?


texts:
How to increase width only on homepage?
If I change style.css it will affect the other ones.

Read something about <reference> but not sure how to accomplish that.


texts: Magento 2 Add Custom tab in Product Page

texts: I like to view my product page information details like "accordion-toggle" and let me need to add custom tab with static text in same page information details.


texts:
I have tried all solution available in stackoverflow and stackexchange but not able to resolve it.

I have override Head.php in my module and i am using AjaxCart.

Whenever i enable my module i am getting error header already sent.

Here is exact error what i am getting.

Cannot send headers; headers already sent in /public_html/app/code/local/[Namespace]/[Module]/Block/Html/Head.php, line 1

Here is the code of Head.php

<?php
class Namespace_Module_Block_Html_Head extends Mage_Page_Block_Html_Head
{
    protected function &_prepareStaticAndSkinElements($format, array $staticItems, array $skinItems, $mergeCallback = null)
    {
        //Logic
    }
}

Here is the code of IndexController.php of AjaxCart

public function indexAction(){
    //Logic
    //Response
    $this->getResponse()->clearHeaders()->setHeader('Content-type','application/json',true);
    $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($json_encode));
}

Help is highly appreciated.


texts: Sign in popup on checkout even after user is logged in

texts:
I'm having this issue with Magento 2.3.0.
When the user logs in to their account and adds products to cart. They click "Proceed to Checkout" either in Cart page and the Login/Signup popup shows. However the user is already logged in. I've disabled all of my modules and tried different themes and it still occurs.


texts: Shipping Address in Magento 2 logged in customer on checkout

texts: form where this coming . this is login customer shipping address


texts: Email Service is communicate Magento to angular front-end

texts: I will make website front-end in angular,but back-end is magento.Please Tell me how to communicate reset password,forgot password and other email-service.


texts: Magento 2 Ajax Add to Cart for recently viewed products

texts:
I am struggling with enabling Ajax Add to cart option for recently viewed products.

Currently, the page is reloaded while adding the product to cart. In place of that, I have to use AJAX add to cart option.

I am using Ultimo Theme.


texts: Unable to load the collection in DataProvider by matching values in array

texts:
I am trying to fetch Collection of specific ids by using filters in my custom DataProvider

    public function getData()
{
    $id =$this->request->getParam('id');//returns 5
    $answerids=$this->helper->getRelatedAnswerArray($id);//returns array with value 9 and 10 from HelperData

    $this->collection->addFieldToFilter('answer_id',$answerids);

    $arrItems = [
        'items' => [],
    ];

    foreach ($this->getCollection() as $item) {
        $arrItems['items'][] = $item->toArray([]);
    }

    return $arrItems;
}
}

the getRelatedAnswerArray() returns 9,10 in an array but the getData() returns no collection at all.
But if I put the value 9,10 in an array and pass it to collection it returns the related Data.

$answerids=array(9,10);

this returns the collection but the helper data which is returning the exact same array in $answerids doesn't return any collection ...

My Helper Data Function is

    public function getRelatedAnswerArray($id)
{
    if(isset($id))
    {
        $answerRelated = $this->_answerFactory->create()->getCollection();
        $answerRelated->getSelect()
            ->joinInner(
                ['related_answer'  =>  'questionanswer'],
                'main_table.answer_id = related_answer.answer_id'
            );
        $answerRelated->addFieldToFilter('related_answer.question_id', ['eq' => $id]);
        $answerRelated->getSelect()
            ->reset(\Zend_Db_Select::COLUMNS)
            ->columns(['related_answer.answer_id']);
        foreach ($answerRelated as $key => $value)
            $postArr[]=$value->getAnswerId();
        if(!empty($postArr))
            return $postArr;
        else
            return '';
    }
}


texts:
My client asked me to make a small change in his online store, I have never tried it and hope before starting maybe someone could give me some insights, mayble a class or script that already exists that someone knows about.

Basically I have some pdf files in my magento store  which are generated from a api that I use them for the invoice company management. So the client asked me to use some kind of cloud technology such that when a invoice is generated it should be automatically stored in cloud (google drive), and then organize them by year, and month folders.

Does anybody know about how may I do it? Or does anyone know if such plugins or code already available serving the purpose?


texts: Can I manipulate the render order of UI Components

texts:
Lets say I want to add a custom field to my checkout. I know I can do that by adding a UI Component to my custom checkout_index_index.xml, like explained in the official documentation and covered in various questions on this site.

However, I am wondering if it's also possible to manipulate the order in which these components are rendered? The various layout XML files are merged into one and it seems that the order of how elements are added to <item name="children" xsi:type="array"/> is leading for the order of rendering.

Is there anyway how I can manipulate this (preferably by only using XML)?


texts: Catalog URL Rewrites stuck in processing

texts: SO last night I had to delete alot of products to start over and now Catalog URL Rewrites Index is stuck in processing.  With some research I saw that this might be able to be handled via SSH but I do not have access to SSH on this server.  Any ideas?


texts: Do I have a security hole? Is there anything in my Magento installed from a 3rd?

texts:
I can use my 1.8.1 Shop very well on my Ubuntu Desktop as well as in IE in my VirtualBox.

But now I had the second visitor reporting issues like:
If they click on a product, they are being forwarded to another website which tried to install a trojan or similar.

I checked the HTML code and couldn't find anything suspicious.
After that I tried to used those free online malware scanners but they didn't find anything as well.

But I'd like to take this issue serious :-S


texts: Magento - Form field validate against list

texts:
I am currently using Magento version 1.9. I would like to create a form with one field of data validation against a list of finite numbers (A list that I can upload in the back-end of Magento). The user will enter a unique number to match the number on the list I've uploaded previously. In order to continue with the form, there can be a validate button to validate the number on the form before submitting the entire form. Example form screenshot below. How can this be done?

Thank you for your time,
Elvis


texts: magento2 Enforce character limits across multiple custom product fields

texts:
I'm trying to enforce character limits, across multiple custom product fields.
So a product has custom fields name First Name and Last Name, and that combined they must be less than 23 characters.
How can this be done?


texts: Magento2 : What is the difference between regular price and final price?

texts:
What is the difference between regular price and final price in magento2?

product->getPriceInfo()->getPrice('final_price')->getAmount()->getBaseAmount();

and

$product->getPriceInfo()->getPrice('regular_price')->getAmount()->getValue();


texts:
We switch our shop live (changed domain, cleared cache) and now ajax requests returns empty blocks.

Problem accrued with the Hardik/Ajaxcart extension. If you add an article to your cart it makes a ajax request and updates some blocks in the view.

Ajax requests is ok and does return data but blocks are missing:

/checkout/cart/add/uenc/aHR0cHM6Ly93d3...0bWw,/product/399/form_key/kKNZaJaumNoauq1z/

Here the blocks are supposed to load in Hardik_Ajaxcart_Model_Response::addUpdatedBlocks()

    $updated_blocks = unserialize(Mage::getStoreConfig('ajaxcart/general/update_blocks'));

    if ($updated_blocks) {
        $layout = Mage::getSingleton('core/layout');
        $res = array();

        foreach ($updated_blocks['id'] as $index => $block) {
            $value = $layout->getBlock($updated_blocks['xml'][$index]);

Settings are loaded into $updated_blocks but $layout->getBlock() returns nothing.

Update

Could this be apache config or proxy?

Via:1.1 rproxy (squid)
X-Cache:MISS from rproxy

Update 2

Looks like proxy is eating POST parameters...


texts:
a:5:{i:0;s:80:"Source model "productslider/source_feature" not found
  for attribute "is_feature"";i:1;s:3510:"


texts:
I use Vladimir Popov(?)'s very nice Webforms extension to enable user submitted custom forms.  I want to capture all the http header information from the user who is submitting the form.  Vladimir has kindly supplied me with a php call that works in a hidden field in the form, for him.

<?php foreach(getallheaders() as $key=>$value){echo $key.": ".$value."\n";}; ?>

this works for him on his environment for either logged in or  not logged in users and produces the attached output.  Unfortunately, it does not work for me on my Magento 1.9.2.2 environment. I don't get any information at all.  Vladimir can only suggest that there is something about my server configuration. It looks as if this is either a php issue or a data model issue, and I know very little about either. Can someone who is an expert help me figure out what's going on?


texts: Magento2 call WebPixel module after Algolia module

texts:
I have facing issue when 2 modules are overriding the same core Module

\Magento\CatalogSearch\Model\Layer\Filter\Attribute

Both are extending same file.

In Webpixel
WeltPixel\LayeredNavigation\Model\Layer\Filter\Attribute

In Algolia
Algolia\AlgoliaSearch\Model\Layer\Filter\Attribute

Currently, Algolia Attribute.php is called in frontend, I want to call Webpixel file at last to use isMultiSelect() functionality.


texts: Magento 2.3: I am trying to add text into the small cart, but it's not working

texts:
I want to add text into the cart showed in the picture, but unfortunately my code does not work.

This is my file structure:

Code in ButtonGet.php:

<?php
namespace MassiveArt\ShoppingCart\Block;
class ButtonGet extends \Magento\Framework\View\Element\Template
{
    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        array $data = []
    ) {
        parent::__construct($context, $data);
    }

}

Code in get_cart_index.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">
        <referenceContainer name="minicart.addons">
                <block class="MassiveArt\ShoppingCart\Block\ButtonGet" after="-" name="custom_button" template="MassiveArt_ShoppingCart::button_getcart.phtml" />
        </referenceContainer>
</page>

Code in button_getcart.phtml:

Hello

The Rest of my Module is working proberly, but this Text not. Can you help me?


texts: how to disable free shipping if an attribute is true

texts:
I have created an if statement which I have on my shipping page. Where if the attribute "direct delivery" is true then it will display an error message and not show free delivery. I have put the If statement below.

<?php $quote = Mage::getSingleton('checkout/session')->getQuote();
        $cartItems = $quote->getAllVisibleItems();

        foreach ($cartItems as $item)
        {
            $productId = $item->getProductId();
            $product = Mage::getModel('catalog/product')->load($productId);
                   if($product->getData('direct_delivery_product')==1){?>

             <?php echo 'You have direct delivery products in your shopping cart. This means it may take longer than the standard 2-5 working days to deliver.';?>

                <?php unset($_shippingRateGroups["freeshipping"]);
                 break;
             }

                }

?>

However on my basket page where it displays the total it still says the delivery is free. I tried adding my IF statement to the template file where it displays the shipping but that didnt work. Could anyone tell me how i can get it display the standard shipping fee instead of free shipping. If the attribute is true. This is my the template file which shows the delivery on the basket page.

<?php if ($this->displayBoth()):?>

    <td style="<?php echo $this->getStyle() ?>" class="a-right" colspan="<?php echo $this->getColspan(); ?>">
        <?php echo $this->getExcludeTaxLabel() ?>

    <td style="<?php echo $this->getStyle() ?>" class="a-right">
        <?php echo $this->helper('checkout')->formatPrice($this->getShippingExcludeTax()) ?>

    <td style="<?php echo $this->getStyle() ?>" class="a-right" colspan="<?php echo $this->getColspan(); ?>">
        <?php echo $this->getIncludeTaxLabel() ?>

    <td style="<?php echo $this->getStyle() ?>" class="a-right">
        <?php echo $this->helper('checkout')->formatPrice($this->getShippingIncludeTax()) ?>

<?php elseif($this->displayIncludeTax()) : ?>

    <td style="<?php echo $this->getStyle() ?>" class="a-right" colspan="<?php echo $this->getColspan(); ?>">
        <?php echo $this->getTotal()->getTitle() ?>

    <td style="<?php echo $this->getStyle() ?>" class="a-right">
        <?php echo $this->helper('checkout')->formatPrice($this->getShippingIncludeTax()) ?>

<?php else:?>

    <td style="<?php echo $this->getStyle() ?>" class="a-right" colspan="<?php echo $this->getColspan(); ?>">
        <?php echo $this->escapeHtml($this->getTotal()->getTitle()) ?>

    <td style="<?php echo $this->getStyle() ?>" class="a-right">
        <?php echo $this->helper('checkout')->formatPrice($this->getShippingExcludeTax()) ?>

<?php endif;?>


texts: I created the one custom dropdown attribute in customer side. I need to show in frontend phtml all the dropdown list because a user can select any one of this. can anyone help me.


texts:
Every answer I can find for setting the page title (H1 tag not the tab title) uses this format:

<action method="setPageTitle">
    <argument translate="true" name="title" xsi:type="string">Title goes here</argument>
</action>

As the action tag has been deprecated I don't want to use this.

When I try the below method it is ignored.

<arguments>
    <argument translate="true" name="title" xsi:type="string">Title goes here</argument>
</arguments>

How do I achieve the same result using <arguments>?

Does Magento really force us to use deprecated tags to achieve this?


texts: After adding column and dropping that column, i can face some issue related to Database!

texts:
I tried to add Time Stamp column on some tables under this issue. But some fatal errors came out after adding Time Stamp. Because I just create column without setting on either foreign key or primary key.

  Anyway, i drop that column but i can face some issues.

I have some simple products on website, when i try to add them to cart but i see the error sql messages

What causes this problem? I even delete the column under the issue !


texts: Magento 2 how to disable cart sharing between stores?

texts:
I wan't to disable the shared cart between stores under same website.
I wan't accounts to be shared, but not carts, is it possible?
I tried the following solutions: Disable cart sharing between different Stores of website in Magento 2?
I created the plugin for QuoteRepository but did not work.
Greetings!


texts:
im trying to get a div to wrap the second level nav items in my navigation and have found out about the $childrenWrapClass attribute of renderCategoryMenuItemHtml call in the top.phtml file

What is the correct way of setting this to true so my children nav gets wrapped in the div?

thanks

EDIT
I have implemented the answer below but seem to have an error in this part of the process:

<?xml version="1.0"?>
<layout>
<default>
    <reference name="catalog.topnav">
        <action><template>cranbri/vertnavflyout/page/html/topmenu.phtml</template></action>
    </reference>
</default>

I have an error on the action tags saying "tag has wrong closing name" any ideas?

Also i have a 3 tier menu, will this wrap  ONLY the 2nd tier or both the second and third? If it wraps both is there any way i can add a unique identifier to the class? say like a 1 for the 2nd tier and a 2 on the third tier?

Thanks


texts: magento - bilingual store - limit display of category tabs (menus)

texts:
Desired behavior:  I would like to see a Welcome Category Tab on French Store View, Bienvenue Category Tab on French store View

Actual Behavior: I get both English and French tabs (menus) in both stores!

Methodology:

I set up two store views (which works OK for all other translation requirements).

I set up two CMS static blocks - for 1) English store view 2) french store view.

Then I set up two categories - 1) Welcome 2) Bienvenue

For Each Category, in Display Settings, I set:

Display Mode = static block only
CMS = my language

Problem: I can make text language specific, but I don't know how to only show category tab for  the appropriate Store View.


texts:
I install Aschroder_SMTPPro but mail not send it gives error

  Warning: stream_socket_enable_crypto(): SSL operation failed with
  code 1. OpenSSL Error messages: error:14090086:SSL
  routines:ssl3_get_server_certificate:certificate verify failed  in
  C:\xampp\htdocs\charge\lib\Zend\Mail\Protocol\Smtp.php on line 206

Anyone Have solution For this ??

SSL Support Is also enable
http://prntscr.com/hp1c9g


texts: Magento SOAP product update hangs for over 20 minutes

texts:
our magento instance has a lot of products.
An update of one product using the soap v2 interface is running into a timeout. If I set the timeout to 40 minutes, I get the following error message:

Next exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away, query was:
SELECT core_url_rewrite.product_id, core_url_rewrite.request_path FROM core_url_rewrite WHERE (store_id = 1) AND (is_system = 1) AND (category_id = 2 OR category_id IS NULL) AND (product_id IN('2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '29', '30', '31', '33', '34', '35', '38', '39', '40', '41', '44', '45', '46', '47', '48', '49', '50',
...
, '3077897')) ORDER BY category_id DESC

magento seems to generate a sql query with IN() and all of the product ids.
This very big query seems to be too much for mysql.

This query is also executed, when I want to delete a product image (catalogProductAttributeMediaRemove), which makes no sense, because it has nothing todo with url rewriting.

It worked fine before upgrading to version 1.9.2.1 (from 1.9.1),

Is this behaviour normal? Is there a way to use url_rewrite with 2.000.000 products and the last version of magento?


texts: I need bundle Product options to display automatically - i.e. without having to click the "customize and add to cart" button

texts:
I am upgrading to Magento 2 and they have changed the way that bundles display. With a brand new clean install of M2.4 I am reluctant to start messing about with the code too much. I thought I had found an extension which does the trick, but in reality, what I need is very simple.
Instead of displaying (and having to click "Customize and Ad to Cart" to see the options, I want the options to display by default.
Please help anyone! This response rate on this forum seems to be abysmal!


texts: Help!!!! Homepage is broke. Styles are all messed up but only on the homepage

texts:
I need help. Our site Front end home page is broke. I have rm -rf pub/static/* var/cache/* var/generation/* var/di/* var/view_preprocessed/* generated/*. Then I ran magento Commands.
1- set maintenance mode
php bin/magento maintenance:enable

2- Upload module or use composer to install module using cli

3- Enable module
php bin/magento module:enable MyCompany_MyModule

4- upgrade database
php bin/magento setup:upgrade

5-compile your code
php bin/magento setup:di:compile

6-static content deploy
php bin/magento setup:static-content:deploy en_US

7-reindex (optional)
php bin/magento indexer:reindex

8-clear cache
php bin/magento cache:flush

9-Disable maintenance mode
php bin/magento maintenance:disable


texts: Magento 2: Override Magento_Payment::info/default.phtml

texts: What is the best way to Override Magento_Payment::info/default.phtml in module ?


texts: Get all the details of sales order via order id in my controller?

texts:
I want to get all the details of a sale order in my controller and then update the status of that order.

Plus how can I pass order ID in URL string and then get it as Magento 1.9 doesn't allow $_GET[] and $_POST[]


texts: Customize and display navigation on the top right of header

texts:
I'm working with Magento 2.2.5 i want to move navigation menu to the top right of header.
also i want to know which file i can edit to customize navigation menu
Thanks.
UPDATE :
I want my headr to look like that :


texts: Magento 2 : pending registration activation email - reminder mail module/extension

texts:
Is there any free module or extension in magento 2 which allows to configure and send the email as a reminder email,if user have not activated their account by the user registration activation link sent in the earlier email.

Any existing reference modules from which i can implement above functionality,please do suggest that also.

Thanks in advance....


texts: "Could not open input file" error while running php command in windows

texts:
I have installed Magento 2.2.5 on my loaclhost windows system. I use wamp server.
I am unable to run any php command and getting the error Could not open input file: C:\wamp64\www\magento2

I got this

C:\wamp64\bin\php\php7.0.32>php  C:\wamp64\www\magento2 cache:flush
Could not open input file: C:\wamp64\www\magento2

I gave all permissions on magento2 folder using system property still it doesn't work.
Please suggest me a way out.


texts:
I want display Terms and Conditions in file payments.phtml, how i can do better?

when i try add <?php echo $this->getChildHtml('agreements') ?> in payments.phtml - not working and block Terms and Conditions not display. Where wrong?

Thanks


texts:
We have a very awkward and frustrating problem with our Magento store.

After several hours (sometimes days, sometimes a few hours) our site get broken (CSS and JS are not loaded anymore). We found out that it has something to do with the Magento base_url. When the problem occures the my CSS and JS are missing the prefix base_url. After I flush the cache the base urls are restored and the website is functioning normally again.

We use Lesti FPC.


texts:
How can I use my custom font-face in magento email templates?

I use the next codes:

     @import url('https://fonts.googleapis.com/css?family=Roboto');

And

     @font-face {
           font-family: 'Roboto';
           font-style: normal;
           font-weight: 400;
           src:url(https://fonts.gstatic.com/s/roboto/v18/ek4gzZ-GeXAPcSbHtCeQI_esZW2xOQ-xsNqO47m55DA.woff2) format('woff2');
           unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
    }

But in gmail no head or styles tags appears and I can´t use the font.

Thanks in advance!


texts: Overriding Core Admin Model not Adminhtml

texts:
I am trying to override /app/code/core/Mage/Admin/Model/Resource/User.php to my local but my override seem not to work. When I did some investigation I only find solution for adminhtml not admin.

here is my code:

app/code/local/Invent/Admin/etc/config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Invent_Admin>
            <version>0.1</version>
        </Invent_Admin>
    </modules>
    <global>
        <models>
            <admin>
                    <rewrite>
                        <resource_user>Invent_Admin_Model_Resource_User</resource_user>
                    </rewrite>
            </admin>
        </models>
    </global>
</config>

then for app/code/local/Invent/Admin/Model/Resource/User.php

class Invent_Admin_Model_Resource_User extends Mage_Admin_Model_Resource_User{

  //my code goes here
}

then for app/etc/modules/Invent_Admin.xml

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Invent_Admin>
            <active>true</active>
            <codePool>local</codePool>
        </Invent_Admin>
        <Invent_Admin_Adminhtml>
            <active>true</active>
            <codePool>local</codePool>
            <depends>
                <Mage_Adminhtml />
            </depends>
        </Invent_Admin_Adminhtml>
    </modules>
</config>

I cant seem to find out where is the problem with the xml above. Any help would be appreciated.


texts: Is it possible to get a list of the table columns that are related to a model ?


texts:
I have created a custom customer attribute (profile_image) when I display it in the profile page it throws error

  Forbidden You don't have permission to access
  /media/customer/1/0/100876954-Untitled-2.240x240.jpg on this server.
  Apache/2.2.15 (CentOS) Server at 192.168.1.243 Port 1208

but this media folder have the 0777 permission.

and the  error log have mention the following error

lient denied by server configuration: /home/vhosts/FederalLawyer/app/etc/local.xml


texts: Best practice to connect Magento 2 to price/product service

texts:
I have my own price/product service that I need to connect to Magento.
The service has a variable amount of products with very variable prices.
The price can change with every request a customer makes. So it needs to be fetched every time a customer requests the page at least. But probably even in between, informing him/her of an updated price.

What is the best practice to do this in Magento 2?
Do I completely drag out the price part of Magento to my API?
Do I overwrite prices in the Magento database with my API?
Do I fetch prices on the fly with the API or do I overwrite them after Magento sets the prices?
Or ...?

At most I want to prevent being forced to maintain products and prices in two places (Magento, my database).

Thanks for any information, read-ups, books about the topic!


texts: Price filter showing prices excluding taxes

texts:
Facing some issue for pricing filter, Maybe someone has a good solution for this issue https://github.com/magento/magento2/issues/7199.
I would be appreciated if someone could share the temporary fix.


texts: Free shipping to specific customers group in Magento 2

texts:
I need to setup a free shipping method to a certain user group. I can use a custom module (developed for ASM) or create another one, The important thing is how to make "show this Method to this customer group".

Sounds simple, but I can't get it to work.


texts:
I have incorrect customer added in back-end . its virus or something else anyone facing this kind of the issue .

Thanks !


texts:
I am facing some strange behaviour in catalogsearch/result page

in this website I have a product called "del rio"

This is my url search: https://www.wed2b.co.uk/catalogsearch/result/?q=Del+rio

strange it does not show the product not even on first page it's around 4 or 5 when actually it should show in page 1 and first product.
does anyone have any idea why and if there is a fix?

Thank you.


texts: Magento 2 Soap API with Web Service Studio Client?

texts:
I am programing an API Client with Filemaker and MBS Plug-in.

With Magento1 Soap API I could use a client called "Web Service Studio" https://webservicestudio.codeplex.com/ to try things out. Later i could use the XML a use within Filemaker.

Using an URL under Magento1 like

www.url.com/api/v2_soap/?wsdl

gave me a result with which I could request a Token and could login with token I got.

To request a Token within Magento2 Soap Api I found this URL:

www.url.com/soap/?wsdl&services=integrationAdminTokenServiceV1

If I request a WSDL like I did before like

www.url.com/soap/default?wsdl&services=catalogProductRepositoryV1

I only get a 401 Unauthorised.

So where do I place my token or where do I get a WSDL like before in Magento1?


texts: I think that I'm going crazy, how can I add the "required" attribute to Vat number and company field in the checkout form??


texts: Magento 2 - How to create a module that adds a flag to the product and restricts adding it to the cart before logging in?

texts:
I'm new to magento 2 and would like to know if it is possible to make a module that generates flags on products with purchase restriction?
For example, the product can only be added to the cart when the user is logged in.


texts:
I want to set shipping amount in cart and checkout page. i don't know what to do? I didn't see any reference. So anyone please guide me and help me,
Thanks,


texts: magento 2 custom css in custom theme not being applied

texts:
I am having a problem with my custom theme in magento 2, for some reason the css I'm writing isn't showing up on the site.

I have created my custom theme at

app/design/frontend/Matt/New/

it's parent is the blank theme and I am able to apply the theme with no errors. I have created a less file at

web/css/source/style.less

the contents of the file is

#maincontent{
  background-color: blue;
}

I can run "grunt exec:New" and that works without any errors. I can then deploy with no errors. If I then restart xampp and reload the site the style is not applied. I have checked the source by pressing "ctrl +  u" and I can see that the style.less file is there under

<link  href="http://test.dev/pub/static/version1484246990/frontend/Matt/New/en_GB/css/source/style.less" />

The styles are not in the either of the files styles-m.css or styles-l.css though. I have tried clearing cache, deleting pub/static. I'm not sure what else to do or what the problem could be, does anyone have any possible solutions?


texts: When i upload images, its fine to look frond end, but it does not appear in the backend.


texts: Error on checkout: "Code: 1000001. Message: Incorrect Credentials : Unable to read Authorization header value"

texts:
I am getting this error in checkout last step, during the onepage checkout:

Code: 1000001. Message: Incorrect Credentials : Unable to read Authorization header value

How can I fix this?


texts: adding attributes to quote items via config

texts:
can someone tell me what the purpose of this is in the config?

<sales>
    <quote>
        <item>
            <product_attributes>
                <sku/>
                <type_id/>
                <name/>
                <status/>
                <visibility/>
                <price/>
                <weight/>
                <url_path/>
                <url_key/>
                <thumbnail/>
                <small_image/>
                <tax_class_id/>
                <special_from_date/>
                <special_to_date/>
                <special_price/>
                <cost/>
                <is_recurring/>
                <recurring_profile/>
                <gift_message_available/>
                <msrp_enabled/>
                <msrp/>
                <msrp_display_actual_price_type/>
            </product_attributes>
        </item>
    </quote>
</sales>

i understand that it has something to do with adding attributes to the quote item, and that you can add your own attributes using this method.

does it have to do with collections?

i'm going through the Magento OnePage Checkout class, and the exercise is to use a converter to add an attribute to the quote and order items. it suggested using an observer to get the product attribute to the quote item (which i did), and using a converter to get it to the order item.

i had it working even before i added the attribute in the config (like above), so not sure where this config comes into play.

thanks!


texts: I have Magento, our warehouses use AMT as their primary ERM system. They use .txt files via FTP to keep track of orders and update inventory. I need to know what extension I can use that can output .txt files to their FTP when order is placed and also is able to grab files from the FTP to update inventory and also notify user when the item is shipped.


texts: How to show attribute before product title?

texts:
This is the attributes.phtml located in \vendor\magento\module-catalog\view\frontend\templates\product\view which shows additional attributes:
<?php
$_helper = $this->helper('Magento\Catalog\Helper\Output');
$_product = $block->getProduct();
?>
<?php if ($_additional = $block->getAdditionalData()): ?>

<?= /* @escapeNotVerified */ __('More Information') ?>

        <?php foreach ($_additional as $_data): ?>

                <?= $block->escapeHtml($_data['label']) ?>
                <td class="col data" data-th="<?= $block->escapeHtml($_data['label']) ?>"><?= /* @escapeNotVerified */ $_helper->productAttribute($_product, $_data['value'], $_data['code']) ?>

        <?php endforeach; ?>

I try to use this code for getting the attribute modell in the title.phtml located in \app\design\frontend\Company\Vendor\Magento_Theme\templates\html but it doesn't work:
if ($block->$_data['label'] = 'modell'):

The code for title.phtml is:
<?php if ($title): ?>
<div class="page-title-wrapper<?php /* @escapeNotVerified */
echo $cssClass; ?>">
    <h1 class="page-title"
        <?php if ($block->getId()): ?> id="<?php /* @escapeNotVerified */
        echo $block->getId(); ?>" <?php endif; ?>
        <?php if ($block->getAddBaseAttributeAria()): ?>
            aria-labelledby="<?php /* @escapeNotVerified */
            echo $block->getAddBaseAttributeAria(); ?>"
        <?php endif; ?>>
        <?php /* @escapeNotVerified */

        $_helper = $this->helper('Magento\Catalog\Helper\Output');
        $_product = $block->getProduct();
        if ($_additional = $block->getAdditionalData()):
            foreach ($_additional as $_data):
                if ($block->$_data['label'] = 'modell'): //Tried here
                    echo $block->escapeHtml($_data['label']);
                    echo $_helper->productAttribute($_product, $_data['value'], $_data['code']);
                endif;
            endforeach;
        endif;

        echo $title ?>

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

How can I get this work? Thanks
Edit:
I want to display this attribute for the product which has the attribute_code modell


texts: Magento 2 - How to set shipping method per item in REST API?

texts: Does any one having idea about this please update here.


texts: Magento 2: Left Category Sidebar from Sebwite (copy of question)

texts:
I am trying to create left sidebar category navigation for my website. But it shows only default category. It does not show any other subcategories.

I activated all category is_anchor, and re-indexing also setup flat category. but still having the same issue any help.


texts: How add Cart price rules on my conditions

texts:
you can help me settings cart rules on my conditions:
When the amount in the cart reaches a certain value, then 1 .... 000 included free shipping. because i not know how can right now add rules on this requirement

Please help me if you have time

Very Thanks


texts: Is it possible not to override default grid filters when clicking on a filtered grid URL?

texts:
Using the following code

$filter = 'foo=1&bar=2';
$filter = base64_encode($filter);
$url = Mage::helper('adminhtml')->getUrl('adminhtml/moo/index', array('filter'=>$filter));

The URL stored in the $url var would thus link to the moo grid, with foo filtered to 1 & bar filtered to 2.

By default, foo is filtered to 0 and bar is filtered to 0 as well.

After accessing the $url, the grid will keep loading with your newly applied filters (foo = 1 and bar = 2) until you restart your admin session. Is it somehow possible to force Magento not to do this? I.E.

$filter = 'foo=1&bar=2&DoNotRemember=1';
$filter = base64_encode($filter);
$url = Mage::helper('adminhtml')->getUrl('adminhtml/moo/index', array('filter'=>$filter));


texts: I am unable to scroll on minicart dropdown

texts: How  can I enable scroll or something on minicart? As I tried 1,2 solution for configuration and limit of products to 5 in minicart. but it didn't worked for me.


texts:
Hi am unable to find the source code of this file.

I want to change to pin code input type.
Where Can I find the checkout form page on guest checkout.
I searched in the template folder but could not identify the file.


texts: Change condition to add new address if no address save in customer My address book

texts: I want to change the condition that redirect you to customer/address/new if you want to see your address book. I just want to open the address book empty without force users to add a new address in order to see the page. But can not find where change that condition in my files.


texts: How to Solve Wamp Server - 3 Showing Code Instead of Execute in Windows?

texts:
My wamp server showing source code instead of excute?

Any help?


texts: Magento 2.0.7 Component Manager Problem (Please wait)

texts: I upgraded from setup wizard from 2.0.6. I can get to system upgrade and system config. I've tried with cache disabled and enabled.


texts:
If one goes by the traditional Magento methodology to repeat a class in layout files, then the following should work:

Magento Example in Catalog:

<block class="Magento\Catalog\Block\Category\View" name="category.image" template="Magento_Catalog::category/image.phtml"/>
<block class="Magento\Catalog\Block\Category\View" name="category.description" template="Magento_Catalog::category/description.phtml"/>

So I want to create a new file in Catalog Search

<block class="Magento\CatalogSearch\Block\Result" name="search.result" template="Magento_CatalogSearch::result.phtml" cacheable="false">
<!-- ^ Magento default -->
<block class="Magento\CatalogSearch\Block\Result" name="search.count" template="Magento_CatalogSearch::count.phtml" cacheable="false">

That will yield a glorious:

Fatal error: Uncaught Error: Call to a member function getLoadedProductCollection() on boolean. Why?!

Thank you for your help.


texts:
I would like to ask if there is a setting in the admin to limit customers quantity order.

Example. product limit per user is 4.

First transaction is 4 ordered products. Next transaction should not allow me to checkout because I already reached my quantity limit.

Is there a setting like that or should I create a module? Because if there is a default setting and I create a module, that module would be a waste.

Thanks. I hope someone answers.


texts: Magento2 change sort order of block using plugin

texts:
I have used a plugin to add new template at end of the page in Order view page in admin but the issue is I cannot see it at end of the page, instead, it is showing inside Address Information, Please find below code of plugin I have used:

   <type name="Magento\Sales\Block\Adminhtml\Order\View\Info">
            <plugin name="commercepundit_dealerregistration-show_order_histiry"
type="Commercepundit\Dealerregistration\Plugin\Block\Adminhtml\SalesOrderViewInfo"
sortOrder="99999" />
        </type>

It's showing like following right now:

code of Plugin:

<?php
namespace Commercepundit\Dealerregistration\Plugin\Block\Adminhtml;

class SalesOrderViewInfo
{
    /**
     * @param \Magento\Sales\Block\Adminhtml\Order\View\Info $subject
     * @param string $result
     * @return string
     * @throws \Magento\Framework\Exception\LocalizedException
     */
    public function afterToHtml(
        \Magento\Sales\Block\Adminhtml\Order\View\Info $subject,
        $result
    ) {
        $commentBlock = $subject->getLayout()->getBlock('order_status_history');
        if ($commentBlock !== false && $subject->getNameInLayout() == 'order_info') {
            $commentBlock->setOrder($subject->getOrder());
            $result = $result . $commentBlock->toHtml();
        }

        return $result;
    }
}


texts:
If I run code to load a product and its options in a product view template file app/design/frontend/mymodule/default/template/catalog/product/view.phtml

$product = Mage::getModel("catalog/product")->load($productId);
$options = $product->getOptions();

it works as expected. However, if I run the same code for the same product in a controller of my custom module $options is an empty array.

Is there some initialization code I'm missing?


texts:
I'm trying to replace a class method "wrapResult" from:

  \Magento\Catalog\Pricing\Render\FinalPriceBox

Never enter into this method. Try to stop the execution with die () or with xdebug, enter directly to the parent method.

What I can be doing wrong?

DI XML:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\Catalog\Pricing\Render\FinalPriceBox"
                type="Mod\RepSales\Pricing\Render\FinalPriceBox"/></config>

Class FinalPriceBox:

namespace Mod\RepSales\Pricing\Render;

use Magento\Catalog\Model\Product\Pricing\Renderer\SalableResolverInterface;
use Magento\Catalog\Pricing\Price\MinimalPriceCalculatorInterface;
use Magento\Framework\Pricing\Price\PriceInterface;
use Magento\Framework\Pricing\Render\RendererPool;
use Magento\Framework\Pricing\SaleableInterface;
use Magento\Framework\View\Element\Template\Context;

class FinalPriceBox extends \Magento\Catalog\Pricing\Render\FinalPriceBox
{
    const ATTR_PVP = 'sgi_pvp';

    protected $helperPrice;
    protected $helperRepSalesPrices;

    public function __construct(
        Context $context,
        SaleableInterface $saleableItem,
        PriceInterface $price,
        RendererPool $rendererPool,
        array $data = [],
        SalableResolverInterface $salableResolver = null,
        MinimalPriceCalculatorInterface $minimalPriceCalculator = null,
        \Mod\RepSales\Helper\RepSalesPrices $helperRepSalesPrices,
        \Magento\Framework\Pricing\Helper\Data $helperPrice
    )
    {
        $this->helperRepSalesPrices = $helperRepSalesPrices;
        $this->helperPrice = $helperPrice;
        parent::__construct($context, $saleableItem, $price, $rendererPool, $data, $salableResolver, $minimalPriceCalculator);
    }

    protected function wrapResult($html)
    {

        if ($this->helperRepSalesPrices->changePrices()) {
            $price = $this->getSaleableItem()->getData(self::ATTR_PVP);
            $price = floatval(str_replace(',', '.', $price));
            $priceFormat = $this->helperPrice->currency(number_format($price, 2), true, false);

            $html = '' .
                'getSaleableItem()->getId() . '" data-price-amount="' . $price . '" data-price-type="finalPrice" class="price-wrapper ">' .
                '' . $priceFormat . '' .
                '' .
                '';
        }

        return '
getData('css_classes') . '" ' .
            'data-role="priceBox" ' .
            'data-product-id="' . $this->getSaleableItem()->getId() . '"' .
            '>' . $html . '
';
    }
}


texts: Magento 1.9 - How to filter product reviews with status APPROVED or PENDING?

texts:
How to get Magento product reviews of status APPROVED and/or PENDING?

None of these attempts work. Anyone know how to achieve this?

$reviews = Mage::getModel('review/review')->getResourceCollection();
$reviews->addStatusFilter(Mage_Review_Model_Review::STATUS_APPROVED && STATUS_PENDING)

or:

$reviews = Mage::getModel('review/review')->getResourceCollection();
$reviews->addStatusFilter(Mage_Review_Model_Review::STATUS_APPROVED && Mage_Review_Model_Review::STATUS_PENDING)

or:

$reviews = Mage::getModel('review/review')->getResourceCollection();
$reviews->addStatusFilter(Mage_Review_Model_Review::STATUS_APPROVED || Mage_Review_Model_Review::STATUS_PENDING)

What is the correct syntax to filter both Approved and Pending reviews?

So all reviews but excluding STATUS_NOT_APPROVED reviews


texts: How I can maintain an active session in Magento?

texts: Anyone know how I can keep a user session within Magento , I wish that even if the user closes the browser or turn off the computer to access my website your account or session is still open , as I can do it active ? so far I have only lengthened the time Cookie, someone will know a method that can be applied or how this is done ?


texts: Magento 2 | Is there an observable event for when the checkout begins?

texts:
when the checkout is started I need to modify the quote.

Is there an event when the checkout is started?

Thanks in Advance!


texts: How would I move a custom block to above the review block?

texts:
I added a custom block on the Item Page using this code-

<referenceContainer name="product.info.main">
        <block class="Magento\Catalog\Block\Product\View\Description" name="product.info.manufacturer" template="product/view/manufacturer.phtml" before="-">
                    <arguments>
                        <argument name="at_call" xsi:type="string">getManufacturer</argument>
                        <argument name="at_code" xsi:type="string">manufacturer</argument>
                        <argument name="css_class" xsi:type="string">manufacturer </argument>
                        <argument name="at_label" xsi:type="string"></argument>
                        <argument name="add_attribute" xsi:type="string">itemprop="manufacturer"</argument>
                    </arguments>
        </block>
    </referenceContainer>

The code displays the correct attribute but it displays the attribute under the review block and I need it above the review block. I tried changing both the 'before' in this code but also using a few different ways of the move element-

 <move element="product.info.manufacturer" destination="content" as="product.info.manufacturer" after="-"/>
 <move element="product.info.manufacturer" destination="product.info.main" before="product.review.form.fields.before"/>
 <move element="product.info.manufacturer" destination="product-view-wrapper" as="product.info.manufacturer" before="product.info.review"/>

It never goes above the review block. I am using the Ultimo theme for Magento 2.I am going to remove the page.title block and use manufacturer/sku as the item name. I can remove the page.title block, I just need to be able to move the manufacturer attribute.


texts: Unable to save the product stock status as "Out of stock" in magento 2

texts:
I have imported a single product via backend.

The product stock status is mentioned as 0 ("is_in_stock => 0") in csv sheet which i imported.

The product successfully saved. But while opening the product in backend the stock status saved as "In stock".

Then I have manually tried to change the stock status as "Out of stock" and saved the product. But the stock status is not updated.

Still shows as "In Stock".Please provide me a solution.

  Note: But I can change the stock status of some of the
   products

My question is why Magento not automatically change the stock status as "out of stock" if the quantity is 0?

I have tried to change the the status by using Advance Inventory option, but no luck


texts: Disable Ajax Add to Cart on product page

texts:
In our web-shop, we use an AJAX add to cart, so the page doesn't have to reload. But when the order is bigger than the stock, the ajax keeps loading and doesn't show a message the order isn't available.

The console error is 503 (Service Unavailable)

Is there a way to fix this or to disable ajax add to cart only on the product page but keep it working on other pages!

Error Log:

  a:5:{i:0;s:81:"De gevraagde hoeveelheid voor "Restorative Hair Mask
  250 ml" is niet beschikbaar.";i:1;s:1539:"#0
  /home/users/beaxmftp/beautyballoon.nl/app/code/core/Mage/Checkout/Model/Cart.php(284):
  Mage::throwException('De gevraagde ho...')
      #1 /home/users/beaxmftp/beautyballoon.nl/app/code/local/Cmsmart/AjaxCart/controllers/IndexController.php(154):
  Mage_Checkout_Model_Cart->addProduct('53', Array)
      #2 /home/users/beaxmftp/beautyballoon.nl/app/code/local/Cmsmart/AjaxCart/controllers/IndexController.php(67):
  Cmsmart_AjaxCart_IndexController->tryaddAction(Object(Mage_Catalog_Model_Product),
  Array)
      #3 /home/users/beaxmftp/beautyballoon.nl/app/code/core/Mage/Core/Controller/Varien/Action.php(418):
  Cmsmart_AjaxCart_IndexController->indexAction()
      #4 /home/users/beaxmftp/beautyballoon.nl/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254):
  Mage_Core_Controller_Varien_Action->dispatch('index')
      #5 /home/users/beaxmftp/beautyballoon.nl/app/code/community/ArtsOnIT/OfflineMaintenance/Controller/Router/Standard.php(46):
  Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
      #6 /home/users/beaxmftp/beautyballoon.nl/app/code/core/Mage/Core/Controller/Varien/Front.php(172):
  ArtsOnIT_OfflineMaintenance_Controller_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
      #7 /home/users/beaxmftp/beautyballoon.nl/app/code/core/Mage/Core/Model/App.php(354):
  Mage_Core_Controller_Varien_Front->dispatch()
      #8 /home/users/beaxmftp/beautyballoon.nl/app/Mage.php(684): Mage_Core_Model_App->run(Array)
      #9 /home/users/beaxmftp/beautyballoon.nl/index.php(89): Mage::run('', 'store')
      #10 {main}";s:3:"url";s:98:"/ajaxcart/index/index/?form_key=hGxTgs9rzs7WqBfZ&product=53&related_product=&qty=5&_=1446135436562";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:2:"nl";}


texts: How to get custom option price in cart in Magento 2

texts:
I have some customizable options in my products. I would like the checkout/cart page to show the individual prices of each option and not just the total price. Unfortunately I am missing any approach. Similar to the picture of a question from 6 years ago:

But I use Magento 2.3.4 and can't get the old code to work.

Update/Edit 2:

I have been able to collect quite a few things so far, but unfortunately I still cannot get the price. The price is 0.00 or is empty. What do I have to do to see the price of each option?
Here is my code, which gives me all options but not the prices:

<?php
/**
 * @var \Learning\Js\Block\CustomOption $block
 */

$_objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$product = $_objectManager->get('Magento\Catalog\Model\Product')->load(3);
$customOptions = $_objectManager->get('Magento\Catalog\Model\Product\Option')->getProductOptionCollection($product);
$productTypeInstance = $_objectManager->get('Magento\ConfigurableProduct\Model\Product\Type\Configurable');
$productAttributeOptions = $productTypeInstance->getConfigurableAttributesAsArray($product);
foreach($customOptions as $option) {
    $values = $option->getValues();
    if (empty($values)) {
        continue;
    }

    foreach($values as $value) {
        echo $value->getTitle();
    }

}


texts:
I generated a sitemap from magento admin panel -

caralog -> google sitemap

There are many links in my site which are not included, like

http://www.website.com/wishlist/
http://www.website.com/contactscutom/index
http://www.website.com/mysite-faq#refer

It seems only the links ending with .html are generated in sitemap.xml file, because all links in sitemap.xml are ending with .html.

Also the product sitemap only have url links which are enabled and whose visibility is Catalog, search. These filter are present in /app/code/core/Mage/Sitemap/Model/Resource/Catalog/Product.php file on line numbers 164 and 165 :

        $this->_addFilter($storeId, 'visibility', Mage::getSingleton('catalog/product_visibility')->getVisibleInSiteIds(), 'in');
        $this->_addFilter($storeId, 'status', Mage::getSingleton('catalog/product_status')->getVisibleStatusIds(), 'in');

I would like to know is this is the way sitemaps are generated? or should it include all the URL's present in magento website, including all products.


texts: Where can I find the full syntax specification for Markup Tags (double curly braces)?

texts:
I have found some documentation for Magento's Markup Tags, but nothing that would appear to be complete. For search-ability, I've also seen them described as "double curly brace syntax", "double curly bracket syntax", and "short codes".

Magento Docs / User-Guide / Marketing / Markup
Tags

Provides some examples inserting custom variables, urls, blocks, and widgets.

Magento Docs / Frontend Developer Guide / Templates / Email Templates

This Email Templates page provides several examples, but does not call them "Markup Tags", or refer to any language in particular, simply the directives in those examples, such as...

"...these two directives: {{template config_path="design/email/header_template"}} and..."
"...the Store Hours ({{config path="general/store_information/hours"}}) variable..."
"...an inlinecss directive: {{inlinecss file="css/email-inline.css"}}..."
"Example: ... {{if logo_width}} ... the if/else conditional statement..."

I need to edit some email templates, and would like to know my options, before prodding it with trial and error. Looking for documentation details that could answer several questions such as:

Is this a specific markup/templating language?
Is "if-then-else" the only flow control, or are there other conditionals? "else-if"? "switch"?
I've only seen if statement examples with relational operators — are arithmetic and logical operators allowed?

Thank you!
John


texts: Magento 2: Class ParadoxLabs\TokenBase\Model\CardFactory does not exist

texts: When tried to run the compile command I got this error. I run the cache flush, set the permission for var, generated folders but no luck. I don't have this custom module on my project (ParadoxLabs\TokenBase\Model\CardFactory)?.this is coming from core files ?? not sure. Any guidelines will be appreciated. Thanks


texts:
I've written an ajax call to get some user specific content. But I found that the response of the ajax call is very slow. Indeed, I found that this is due to the slow response of the controller class. The controller class takes at least 2 seconds to give a empty json respnse while the controller is just a simple controller to handle the ajax call.

<?php

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

namespace Vendor\ModuleName\Controller\Program;

class TestAjax extends \Magento\Framework\App\Action\Action {

    public function __construct(
    \Magento\Framework\App\Action\Context $context
    ) {
        parent::__construct($context);
    }

    /**
     * Forgot customer account information page
     *
     * @return \Magento\Framework\View\Result\Page
     */
    public function execute() {
        $testing= null;

        $arr = array('testing' => $testing);
        $jsonData = json_encode($arr);
        $this->getResponse()->setHeader('Content-type', 'application/json');
        $this->getResponse()->setBody($jsonData);
        $this->getResponse()->sendResponse();
    }

}


texts: Magento 1.9: get data from text area in observer using event?

texts: I need get data from text area in which customer write comment, than that comment I need add to order using sales_order_place_before event and save order to sales_flat_order. Customer comment must add to table with new column which I created, it's named 'comment'


texts: i am working on magento2 checkout page and i want to add tool tip after street address in shipping information section how can i do this please adivce.


texts: How to configure InfiniteScroll with my (Porto) theme?

texts:
Magento 1.9.1
Porto theme

I installed the InfiniteScroll extension by Strategery as suggested in my post here:

How to load less products on the mobile/tablet front page?

On the Github page of the extension ( https://github.com/Strategery-Inc/Magento-InfiniteScroll ) it says:

If you have a different theme other than the default, you will need to copy the default theme files to your custom theme folder and configure the plugin by going to System / Configuration / Strategery / InfiniteScroll.

So the extension is there on the back-end but it does not seem to work on the front end. I searched the Internet on InfiniteScroll with Magento Porto but am unable to find a solution. How would one do what it says above? The configuration fields are as follows:

Selectors:

Content: .category-products ((Selector for the element that surrounds the items you will be loading more of.))
Pagination: .toolbar .pager  ((Selector for pagination))
Toolbar: .toolbar ((Selector for the toolbar (normally pagination, sort-by and display type are inside here))
Next: .next ((Selector for the link to the next page.))
Previous: .previous ((Selector for the link to the previous page.))
Items (grid mode): .products-grid ((Selector for all items you'll retrieve.))
Items (list mode): .products-list


texts: Magmi: On the fly category creator/importer root catalog

texts:
We are using a multistore deployment. In the csv we have as follows:

(mind you these are not literal, just examples)

store: using the store code for the store view, e.g.: substore1_en
websites: using the same as store: substore1_en
categories: [Root Category for Sub Store 1]/category 1/subcategory 2

We are getting an error returned by magmi:
Cannot find site root with names : Root Category for Sub Store 1

We've read the documentation and are quite certain everything was set up correctly. Anyone have any idea why magmi can't seem to find the root catalog specified?


texts:
I have this piece of code, which generates me 6 related products from a total number of products. I want to generate it randomly. Is there a function in magento to do that ? thx

This is the LINK  to the page

<?php
    $_collectionSize = count($this->getItemCollection()->getItems());
    $x = $this->getItemCollection()->getItems();
    //var_dump($x);
?>
<?php if($_collectionSize): ?>
<?php
    $theme = $this->helper('ultimo');

    //Default image size
    $imgWidth = 220;
    $imgHeight = 220;

    if ($theme->getCfg('category/aspect_ratio'))
        $imgHeight = 0; //Height will be computed automatically (based on width) to keep the aspect ratio

    //Modify slider depending on number of slides
    $sliderClasses = '';
    if($_collectionSize > 0)
    {
        if($_collectionSize <= 5)
            $sliderClasses .= " count-$_collectionSize";
        else
            $sliderClasses .= " count-multi";
    }
?>

<?php echo $this->__('Suntem mandri sa va prezentam clientii TRENDfurniture:'); ?>

    <div class="itemslider itemslider-horizontal itemslider-x<?php if($sliderClasses) echo $sliderClasses; ?>">

            <?php $this->resetItemsIterator() ?>
            <?php foreach($this->getItemCollection()->getItems() as $_product): //$_link replaced with $_product ?>

                    <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>" class="product-image"><img src="<?php echo $theme->getImgUrl($this, $_product, $imgWidth, $imgHeight, 'thumbnail'); ?>" alt="<?php echo $this->htmlEscape($_product->getName()) ?>" />

            <?php endforeach; ?>

<?php endif; ?>

This is hte Related.php content:

class Mage_Catalog_Block_Product_List_Related extends Mage_Catalog_Block_Product_Abstract
{
    /**
     * Default MAP renderer type
     *
     * @var string
     */
    protected $_mapRenderer = 'msrp_noform';

    protected $_itemCollection;

    protected function _prepareData()
    {
        $product = Mage::registry('product');
        /* @var $product Mage_Catalog_Model_Product */

        $this->_itemCollection = $product->getRelatedProductCollection()
            ->addAttributeToSelect('required_options')
            ->setPositionOrder()
            ->addStoreFilter()
        ;

        if (Mage::helper('catalog')->isModuleEnabled('Mage_Checkout')) {
            Mage::getResourceSingleton('checkout/cart')->addExcludeProductFilter($this->_itemCollection,
                Mage::getSingleton('checkout/session')->getQuoteId()
            );
            $this->_addProductAttributesAndPrices($this->_itemCollection);
        }
//        Mage::getSingleton('catalog/product_status')->addSaleableFilterToCollection($this->_itemCollection);
        Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($this->_itemCollection);
        $this->_itemCollection->getSelect()->order('rand()');
        $this->_itemCollection->load();

        foreach ($this->_itemCollection as $product) {
            $product->setDoNotUseCategoryId(true);
        }

        return $this;
    }

    protected function _beforeToHtml()
    {
        $this->_prepareData();
        return parent::_beforeToHtml();
    }

    public function getItems()
    {
        return $this->_itemCollection;
    }
}


texts: Magento 2: How to pre Open Apply Voucher Code in Checkout page

texts:
When checkout page is loaded it shows apply discount code section like this

We want that it should be preopen as shown in below image

How to modify core magento functionality to pre open this section when we go to checkout page.


texts: config.xml: How to overwrite Mage_Adminhtml_Sales_Order_InvoiceController.php save function

texts:
I try the override the protected function _saveInvoice($invoice) contained in Mage_Adminhtml_Sales_Order_InvoiceController.php but I did not manage...

I Have :

<?php
require_once "Mage_Adminhtml_Sales_Order_InvoiceController.php";
class Mine_Shipmentmodule_Adminhtml_Sales_Order_InvoiceController extends Mage_Adminhtml_Sales_Order_InvoiceController
{
    protected function _saveInvoice($invoice)
    {
        Mage::log("totototo");
    }
}
?>

and my config.xml is

<?xml version="1.0"?>
<config>
    <modules>
        <Mine_shipmentmodule>
            <version>0.0.1</version>
        </Mine_shipmentmodule>
    </modules>

    <frontend>
...
    </frontend>

  <admin>
    <routers>
      <adminhtml>
        <args>
          <modules>
            <Mine_Shipmentmodule before="Mage_Adminhtml">Mine_Shipmentmodule_Adminhtml</Mine_Shipmentmodule>
          </modules>
        </args>
      </adminhtml>
    </routers>
  </admin>

    <global>
   ...
    </global>

</config>

EDIT : Mine_Shipmentmodule.xml

<config>
    <modules>
        <Mine_Shipmentmodule>
            <active>true</active>
            <codePool>community</codePool>
        </Mine_Shipmentmodule>
    </modules>
</config>

Thank you for your help,


texts: what are the zend components using by magento2?

texts:
Magento2 now using zend framewok 1 ,zend framework 2 ,symfony etc.

I want to know what are the components taken from zend framewok 1 and components taken from zend framewok 2.

For example:

Zend_Db (from zend 1)
Zend_Json (from zend 2)
Zend_mvc(from Zend 1)

etc.

And also how much percent from each framework(not exactly..i know its difficult)

for example:

zend framewok 1: 45 %
zend framewok 2: 25 %
symfony: 30%

update:through composer i cant identify which component using magento.

for example:
symfony/config or zend/config ( both components existed in composer)


texts: How to load cart with a specified quote id (with all products) and redirect user to cart on clicking a url?

texts:
I have a custom module which share the cart to others users via email.
I want to to add a link in the email template so that on clicking the user should be redirected to cart page with populated cart.

I will be using quote id to load the cart but I am not getting the logic that how can I encrypt the url and share it.

What should be the parameters that I should pass in the url?

I can load like following

$cartId = 774;
$cart = Mage::getModel('sales/quote')->load($cartId);
print_r($cart);

Now I want a url on clicking which the cart must be populated with this quote.

Please suggest some idea.


texts: How to save the size preferences of the customer in magento 2?

texts: I need to create a module in which I need to save the size preferences for the customer. If a customer chooses the a specific size(for e.g:XL) filer for a category then on all the subsequent visits to that category, only the products of the selected size must be displayed and also when the customer navigates to any other category then also he must see only the product of the selected size from the previous category. Please help. Thanks in advance.


texts: Magento 2.3.X Country of Origin or Manufacture attribute doesn't save on product page

texts: I'm trying to save 'country of manufacture' attribute on product page but it's not save it. Other attributes is save successful. How can i fix it ?


texts: why magento2 choose adaptive web design?

texts:
As we know website can be developed either Responsive Web Design(RWD) or Adaptive Web Design (AWD).

RWD: No matter what the browser width may be, the site adjusts its layout

AWD: Adapt to the width of the browser at a specific points

is there any reason behind with magento choose AWD?

magento2 official documents refer magento2 use RWD. I felt which is not correct, RWD does not bother about break points (screen height and width). If I'm wrong please correct me.


texts:
Would there be any adverse effect deleting products via PHPMyAdmin with Magento 1.9?

I have reached the limit of my MYSQL Database with my hosting company however, I am unable to delete old products from within Magento or Linnworks as I get an access denied.  My hosting company advised I could delete via PHPMyAdmin however I am unsure if doing this would have serious consequences on any linked data within Magento database.  In the meantime my website is in an error state and my customers cannot view it's contents.


texts: using sql query get all product ids sku and custom attribute (with option fields) value

texts:
How can i get the following fields using sql query
entity_id, sku , Brand
where brand is custom drop-down attribute.


texts: How can I add an extra "Checkout" button in our shopping basket at the top of the page?

texts: Default Magento themes and pretty much every custom theme as the checkout button at the bottom after the totals of the cart etc. Looking to create the exact same button at the top of the shopping basket page too. I would imagine floating using css would be the best method? Had a quick play about with, but can't get anything happening at all. I've tried editing my theme's styles.css file. I wonder if any editing of the xml page for the basket is needed though? I thought it would be pretty straight forward, but seems to be more complex than I had hoped! Any help would be appreciated.


texts: Get order address VAT ID via soap api v2 webservice

texts:
How can I get VAT ID for my orders through SOAP API 2?
The field name is vat_id and is visible in order addresses (Billing Address and Shipping Address) like below:

John Doe
Company Co.
Street 1
11111 City
Poland
T: 99879879879
NIP: 111-11-11-111

I use multishipping checkout.
Is it possible to get it?

Part of salesOrderInfo response is below:

<shipping_address>
    <parent_id>81</parent_id>
    <address_type>shipping</address_type>
    <firstname>John</firstname>
    <lastname>Doe</lastname>
    <company>Company Co.</company>
    <street>Street 1</street>
    <city>City</city>
    <postcode>11111</postcode>
    <country_id>PL</country_id>
    <telephone>99879879879</telephone>
    <address_id>162</address_id>
</shipping_address>
<billing_address>
    <parent_id>81</parent_id>
    <address_type>billing</address_type>
    <firstname>John</firstname>
    <lastname>Doe</lastname>
    <company>Company Co.</company>
    <street>Street 1</street>
    <city>City</city>
    <postcode>11111</postcode>
    <country_id>PL</country_id>
    <telephone>99879879879</telephone>
    <address_id>161</address_id>
</billing_address>

It lacks vat_id.


texts: Show method from module in cms static block

texts: I have plugin who method show text. I would like call the function from my block in cms static block. How to do this? Any hints?


texts: Show products with zero quantity last in Magento 1.9

texts: I want to show products with zero quantity last in all site categories, search results, etc. But the sort order should be as follows: the products with a non-zero quantity (not in decreasing, default (or selected) order!) are displayed first, and then with zero quantity. That is, programmatically: qty>0 (not qty DESC!), qty=0. How can I do this with an catalog_product_collection_load_before event hook (observer)?


texts: Magento 2.1 : how to add profit column to admin order grid

texts: Want to add order profit column on order grid. Any reference?


texts:
I have created an API key using [link][1]

[1]: https://console.developers.google.com and created a new project
and enable API anfter that save that API in Store > configuration > catalog > Product Video and save it

After that I insert video link to my product using but it is not saving showing error
Could not get preview image information. Please check your connection and try again.

Please help


texts: add to wishlist button not showing on product page

texts:
I did enable the wishlist module, but I don't see the "Add to wishlist" button or link inside the product page.
What can I do? Can I manually add this "Add to wishlist" link to the product page or even category page as well?
Thanks!


texts: Magento 2: Swatch image upload not working due to js error

texts:
I am working on magento 2 and when i try to upload a swatch attribute image but each time i get the below error. Please check the below screenshot.

I debug code more and found that image path error.

This is my js path : vendor/magento/module-swatches/view/adminhtml/web/js

iframeHandler = function () {
       var imageParams = $.parseJSON($(this).contents().find('body').html()),
       fullMediaUrl = imageParams['swatch_path'] + imageParams['file_path'];

imageParams['file_path'] value is undefined.

Please help me to resolve this error.


texts: Magento find out from which csv file are the translations loaded

texts:
I have Magento-1.9.2.4 ce installed in one of my client's site along with module Scommerce CashBack.

Now when I place an order which has cashback amount applied to it, I want to translate the label Discount (%s) to Discount124 (%s) in the Transactional Email generated for New Order. I am able to do translation for Discount in Order review in frontend and also in Cart page, but the same translation doesn't work in transactional email. What could be the reason for this ?

Moreover, how to put a debug line (also, what line should I put ?) to find out when label "Discount" is found in email template by mailer object, it's translation is done by exactly which csv file ?

I tried some debugging in overrided app/code/core/Mage/Core/Model/Translate.php after line 401 as per below:

if (stripos(strtolower($text), 'Discount') !== false) {
                $translationData[] = array('code' => $code, 'module' => $module, 'text' => $text, 'translated' => $translated);
                echo "<pre/>";print_r($translationData);
}

But even this throws me off instead of giving me the exact csv file from where the word 'Discount' is translated, how to find it as it is very crucial for me.


texts:
What is the purpose of rendering the custom module page in Magento2 using the result factory \Magento\Framework\View\Result\PageFactory class injected in the constructor and making the page to display

$resultPage = $this->resultFactory->create(ResultFactory::TYPE_PAGE);

rather than doing these below kind of display which is same like in Magento 1.x approach

$this->_view->loadLayout();

$this->_view->renderLayout();


texts: Magento: update customer attribute to be "required"

texts:
apparently we have to add "||$attribute->getAttributeCode()=="email" in our checkout template to show the e-mail field, because isREquired returns false. See below.

My question is: how can I set the customer attribute e-mail to required=1 in the database?

I am looking in all tables related to customer and know there should be a column required, but I cannot find it. thanks!

```

    // add system required attributes
    foreach ($customerForm->getSystemAttributes() as $attribute) {
        /* @var $attribute Mage_Customer_Model_Attribute */
        if ($attribute->getIsRequired()||$attribute->getAttributeCode()=="email") {
            $attributes[$attribute->getAttributeCode()] = $attribute;
        }
    }

```


texts: Magento 2 : How Edit Product Detail Page Layout - Luma Theme as Parent

texts:
I have created theme by using Luma as parent theme.

I have updated header and footer area by customising default.xml in app/design/frontend/Mypackage/mytheme/Magento_Theme/layout/. It works without any issue. Also I have updated home page layout by updateing cms_index_index.xml in  /app/design/frontend/Mypackage/mytheme/Magento_Cms/layout/. It is also working & I can update layout.

But to edit single product page layout, I have created catalog_product_view.xml in /app/design/frontend/Mypackage/mytheme/Magento_Catalog/layout/. But that layout can't update single product view page.

Here is the Magento dev doc link.

http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/xml-manage.html#layout_markup_rearrange

I have added below code in catalog_product_view.xml file & there is no effect.

<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xs`i:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
  <css src="css/zoo.css"/>
</head>
<body>
    <referenceBlock name="product.info.stock.sku" remove="true"/>
    <referenceBlock name="product.info.price" remove="true"/>
</body>
</page>

Why this layout is not working for single product page?


texts: Magento 2 Plugin implementation for js frontend?

texts:
A plugin as far as I read is created for intercepting a PHP function call and running code before, after, or around that function call. Is there a way how to accomplish that in js file?

How can i intercept Magento 2 module js file function call with another function that is located in another module?

Example: js generates an array and i want to add additional element into that array with another module, before it gets processed by another js function. Similar to what is done in magento checkout customization tutorials but only using js file(s) (adding layout elements dynamically).

PS: Can it be done and if not then why? What might be cons? Sorry if that is against any js patterns or best practices?


texts: Can't find Magento 2.1.7 authorize.net md5 hash patch

texts: I can't find patch file for magento open source 2.1.7 version addressing authorize.net md5 hash issue. Is there any patch for 2.1.x? I don't want to upgrade magento version right now.


texts: How can i call attribute filters in magento catelog page

texts:
I am using magento 1.9.0.1, we are using a customized theme for my website. I need to call attribute filters to particular place in catalog page, So for this requirement I am using this code for displaying filters.

echo $this->getLayout()->createBlock('catalog/layer_view')->setTemplate('catalog/layer/view.phtml')->toHtml()?>

Using this code I am able to display attributes and I am able to pass parameters also but products are not filtered can any one help me out from this.


texts: Using SQL to get the Comments Associated with an Order

texts:
Anyone know what the query looks like to grab the comments from an order directly out of the database?
Specifically I want to grab the user_id of the comments.

Thanks!


texts: Delete Magento database or site settings config?

texts:
I want to start my Magento installation from scratch. I'm unfamiliar with Magento, but in Drupal you can delete a settings.php and you db and it will be as if no Drupal has ever been installed. Then you can essentially go to the admin page and run setup like you do in the beginning.

Is there some file like this for Magento? If yes, please let me know the path to it as well. Thanks.


texts: Should we keep Magento compiler enabled or disabled?

texts:
I am currently using Magento EE 1.14.2.1 and memcache is also enabled on the server.
So the question is whether it's worth keeping Magento compiler enabled? I have read online that the compiler can increase website speed by 25% to 50% but I am not sure whether it's good to do it.
Also, PHP APC is disabled on the server.


texts: Url Not working - Category Pages not Loading

texts:
I ran the following commands to enable a module on magento 2.4.1:
bin/magento module:enable testapp
bin/magento setup:upgrade
The command executed successfully, but this caused the images on my website [CSS] to stop displaying and. The navigation tab on my Admin panel also stopped working.
I then ran the following command: - php bin/magento setup:static-content:deploy -f and the issue was fixed [The front page css is now showing properly].
However, the other category pages on the navigation tab of the website are not loading. seems like the URL's are broken. it gives an error: - This page isn’t working
Can any one help with this please?
Thanks


texts: Debug/Disable automatic set out of stock when lower qty reached

texts:
Magento Automatically set a product when a certain qty limit is reached:
system -> configuration -> catalog -> inventory -> Qty for Item's Status to Become Out of Stock

As pointed out by @pitmeister,Allow qty Below 0 should disable this behavior.

The problem is:

I already have Allow qty Below 0 (frontend/backend works as expected so status is not changed)
BUT: I'm importing stock information using a third party extension and the import action set product out of stock in case the qty imported is 0.

How can I debug this ? Where is the code that change product stock status to out of stock because of the Qty ?


texts: Change base urls and backend catalog not loading

texts:
After changing the base urls into database core_config_data, clear cache, reindex, if I go to my domain works fine but if I go to my admin site when I push over catalog the page not loading

It is showing the loading icon infinitely. What can I do?

The solution was to clean the browser cache :-)


texts: I installed a module via composer and now my page load this error


texts: How to solve warning "fetchAll can be memory inefficient for large data sets" in magento2

texts:
I am getting a warning as
 "fetch All can be memory inefficient for large data sets",
When I did MEQP2.
 Please anyone can help me to resolve this warning.

I am getting a warning in below line

$expr = $this->zendExprFactory->create(['expression' => 'COUNT(*)']);

$productMappingQry = $connection->select()->from($this->resourceConfig->getTable($tableName), [$expr])->where('store=?', $storeId);

$finalData = $connection->fetchAll($Qry);

Thank you  in advance


texts: Magento 2 - Categroy, CMS and Product page changes are updating along with Page Cache

texts:
I have page cache enabled and it is working fine.

In Magento 1.9 when I update anything on website then I have to flush full page cache (Amasty plugin) otherwise changes wont reflect on frontend.

Whereas, in Magento 2.2.5, I am using built-in Page cache, and every time I update anything on website, I don't need to flush cache, it is updating on frontend instantly.

Is there something wrong with the Page cache? Is it working or not?


texts: Magento Enterprise - unable to login to admin and products & assets do not appear

texts:
Hello I copied a client' magento enterprise installation (ftp) and database to my local server (I’ve done this many times with a community edition but never enterprise).  I changed the “values” web/secure and web/unsecure in core_config_data to reflect localhost.

I can get to home pages and category pages.  However, no products and merchants assets show up on my localhost.

I then tried logging into admin and even though the user/password are correct it just refreshes the admin login page.

Not sure what I’m doing wrong.  Can I copy a enterprise instance to localhost?  Besides changing core_config_data is there anything I need to do?

Thanks


texts:
I have created a custom module which will read order edi files and import orders in magento. To run this in scheduled basis, I have written cron for this job.

<job name="import_order_edi" instance="Singh\Import\Cron\OrderImport" method="execute">
        <schedule>* * * * *</schedule>
</job>

in my OrderImport.php file I am calling the execute method of main controller class where code to create order is written.

$this->_order->execute();

$this->_order is the object of main controller class where code to  read file and create order is written.
But when I run the cron, the memory of server reaches to 97 and CPU to 99%, and cron stops,  with no orders imported in magento.
But when I run this controller from web-browser, order got created.
Why my cron stops executing ? But through web-browser its working?


texts:
I'd like to enable the 2FA extension  but I'd like to write my own provider (e.g. not Authy or Google Authenticator).

Anybody who can point me in the right direction? I have been working with WordPress for several years, but Magento is all new to me.


texts:
I have a javascript running on my home page to provide a read more facility, so part of the content is hidden until the read more link is clicked.

This works well but I would like to use an image instead of text.. I have managed to do this initially, but if you click the image it is replaced with text again.

The code I use is:

Any help would be appreciated.


texts:
Readiness check says all modules are installed

But on  Database step it gives error that pdo_mysqli extension is missing.

Magento Version: Magento-CE-2.1.2

PHP Version: PHP 5.6.27-1+deb.sury.org~trusty+1 (cli)

OS Version:  Ubuntu 14.04

mysql  Ver 14.14 Distrib 5.6.33
Output of: php -m | grep mysql

mysql
-mysqli
mysqlnd
pdo_mysql


texts: Disable redirect after product add to basket

texts:
When I add something from the category to the basket/cart it redirects me to the basket/cart.

After searching I found that I could turn this functionality of in the admin system via

Configuration > Sales | Checkout > After Adding a Product Redirect to Shopping Cart

It now redirects to the Home page. I don't know if this a bug in the redirect?


texts: How to add color attribute value for product when creating pragmatically in magneto 2

texts:
I am creating a product programmatically.There is a custom color attribute.I want to add the value for attribute and save it for product.

            $product->setColor('White'); // color attribute


texts:
By accident, I managed to delete/remove something from the code for the homepage carousel. I have re-built so code so far so a banner will now appear on the homepage, but the banner does not scroll. The buttons at the bottom of the banner are there, but I am unable to click on them to access the other banners on the carousel.

1234567891011

         [...]

Am I missing something basic from the above code that I need to include to active the carousel scroll?

Any help would be hugely hugely appreciated.

Edit from OP mispost

There is back-up/help-sheets for all other coding issues for the homepage but nothing for the carousel. The homepage of the website is www.cmsplc.com, you will be able to see the first banner and the buttons at the bottom, these buttons do not function and the carousel doesn't scroll automatically. Is there any code missing?


texts: Programmatically create new attribute set while inheriting from another

texts:
I am programmatically creating attributes and attribute sets. The attributes work like they should, but with the attribute sets I have a problem.

When I create an attribute set, I can not let it inherit from another set (for example the default set). I have searched a lot but could not find any good info that could help me further.

My first thought there should be some function that lets you duplicate a set and edit it. I could not find it.

My second thought was recreating the whole set, but I could not find a function to get the groups from an attribute set, which I do want.

I'm pretty new to Magento, so sorry if I just missed something, but I am currently stuck. Any solutions / suggestions will be greatly appreciated.


texts: shipping information was unable to be saved .Verify the input data and try again

texts: I am using magento 2.3.2. While I am doing checkout and enter my mail id then immediately I am receiving this error.I am attaching the issue. Please let me know the exact issue I am facing.Initially I am doing checking with this email id only.But that time I never get this type of issue.


texts: Connect Ionic App to Magento 2.3 REST API

texts: I'm a Magento developer and I need to connect an app developed in Ionic with the Magento 2 REST API. I need to make an extension that grants more access to a customer token, additionally, I need to allow CRUD in custom tables created inside the Magento database. Anyone with some advice?


texts: Get Magento quote totals in base currency

texts:
[Cross-posted from StackOverflow]

Is there a way to get the quote/cart totals in the base currency from a Mage_Sales_Model_Quote object?

Ideally something like getTotals() but with the base currency instead of the user's selected currency.

This is a single store, multiple currencies site.

Thanks in advance!

Edit: example code for what I've tried -

// value - 1917.47
$value = $observer->getEvent()->getCart()->getQuote()->getTotals()['grand_total'];

// localCurr - "EUR"
$localCurr = Mage::app()->getStore()->getBaseCurrencyCode();

// baseCurr - "GBP"
$baseCurr = Mage::app()->getStore()->getCurrentCurrencyCode();

Mage::helper('directory')->currencyConvert($value, $localCurr, $baseCurr);

This results in an error like

Fatal error: Call to a member function getCode() on a non-object in <..>\magento\app\code\core\Mage\Directory\Model\Currency.php on line 194

Edit 2: I saw this which seems to generate the same kind of error, but my currencies do exist in the backend

Programmatically Converting Currency

Edit 3: I don't feel this is a duplicate of the above question because that's just relevant to a solution I tried. The initial problem I have is different, I'm looking for the best solution to that. Converting the currency back is just a (somewhat kludgey) solution I tried.


texts: Permission on OpenLiteSpeed Server localhost with Magento 2

texts:
I'm using CentOS 8 as my OS on my laptop and currently running OpenLiteServer (lsphp73) and have been successfully installed phpmyadmin and magento 2.3.4. Then, it comes with a problem that everytime I want to run something related to cache it always said:

Permission denied / Operation not permitted because /var/cache owned by nobody:nobody always has 775 file permission.

I have to chown first with my username and do some bin/magento command then change it back to nobody:nobody to make it run on localhost subfolder and show in the browser.

It's not a big problem but quite irritated by this. I'm quite new with CentOS 8 anyway and trying to learn a bit deeper in Magento. Has anyone facing the same issue?


texts: Cannot see My account link in header on one of the category page in magento 2

texts:
I have one category page which contains static block, I don't see My account and shopping cart in the header when I visit that page. See https://prnt.sc/r4y5n3
However, it is appearing on all other pages see https://prnt.sc/r4y5zs
I checked there is no CSS issue.
What can be the reason behind this?


texts: Magento 2.2.3: cart page showing only "Estimate Shipping and Tax"

texts:
In magento 2.2.3, cart page only shows the "Estimate Shipping and Tax" text. Is there any way to remove that text and shows cart items? But in view source, js contains the country list and some other data. And in the end, it seems script is broken.

<script>
        window.checkoutConfig =


texts: Changing default tab order in admin Product Information

texts:
I wish to change the default order of tabs in Product Information when adding a new product. I want to put the Categories tab beneath the General tab (or even above it) - like here:

I'm struggling to figure out how to do this, as the majority of guides deal with custom tabs and thus allow you to use the after tags in the layout.xml file. From what I have found, editing the Tabs.php (app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php) file is recommended by some - however; I tried to do this and it had no effect. Making the below code modification should have put the Catalog tab above the Inventory tab, but didn't:

$this->addTab('categories', array(
                'label'     => Mage::helper('catalog')->__('Categories'),
                'url'       => $this->getUrl('*/*/categories', array('_current' => true)),
                'class'     => 'ajax',
            ));

if (Mage::helper('core')->isModuleEnabled('Mage_CatalogInventory')) {
                $this->addTab('inventory', array(
                    'label'     => Mage::helper('catalog')->__('Inventory'),
                    'content'   => $this->_translateHtml($this->getLayout()
                        ->createBlock('adminhtml/catalog_product_edit_tab_inventory')->toHtml()),
                ));

(I know it's not ideal to edit core files, but I just wanted to test it.)

In any case, because I want the Categories tab beneath the General tab, I would need to edit this for loop which retrieves the user configurable tabs first no?

foreach ($groupCollection as $group) {
                $attributes = $product->getAttributes($group->getId(), true);
                // do not add groups without attributes

                foreach ($attributes as $key => $attribute) {
                    if( !$attribute->getIsVisible() ) {
                        unset($attributes[$key]);
                    }
                }

                if (count($attributes)==0) {
                    continue;
                }

                $this->addTab('group_'.$group->getId(), array(
                    'label'     => Mage::helper('catalog')->__($group->getAttributeGroupName()),
                    'content'   => $this->_translateHtml($this->getLayout()->createBlock($this->getAttributeTabBlock(),
                        'adminhtml.catalog.product.edit.tab.attributes')->setGroup($group)
                            ->setGroupAttributes($attributes)
                            ->toHtml()),
                ));
            }

Any suggestions? Thanks!