texts: Return string from webapi gives an unwanted extra character

texts:
I am using a webapi observer.

In the model, I am requiring a legacy file that echo a well-formed XML for SOAP communication. However, Magento2 echo the result of the Model method, and it does it after the XML document. The resulting output is a badly formatted XML document.

One way I have tried to tackle that issue is to buffer the output of the legacy file, and return the resulting string. However, the resulting string is escaped by magento2 to become a json.

How to get only the legacy XML well-formatted result (with no extra character printed from Magento itself)?

  etc/webapi.xml

<?xml version="1.0"?>
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
    <route url="/v1/liaison/:serial_code" method="POST">
        <service class="\MyCompany\MyModule\Api\Liaison" method="fromOldModule"/>
        <resources>
            <resource ref="anonymous"/>
        </resources>
    </route>
</routes>

  etc/di.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <virtualType name="moduleConfig" type="Magento\Core\Model\Config">
        <arguments>
            <argument name="type" xsi:type="string">system</argument>
        </arguments>
    </virtualType>
    <type name="Magento\Core\Model\App">
        <arguments>
            <argument name="config" xsi:type="object">moduleConfig</argument>
        </arguments>
    </type>
</config>

  Api/Liaison.php

namespace MyCompany\MyModule\Api;

class Liaison {
    /**
     * @param string $serial_code
     * @return array le XML est déjà affiché via distant.php, donc on n'a pas besoni d'afficher (returnà n'importe quelle autre information
     */
    public function fromOldModule($serial_code) {
        require __DIR__ . '/../v1/liaison/legacyFile.php'; // <-- This legacy code outputs a well-formated XML document
        return '';
    }
}

  Result : (the "" at the very end are the characters printed by Magento that should be removed)

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:Liaison" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:enc="http://www.w3.org/2003/05/soap-encoding"><env:Body xmlns:rpc="http://www.w3.org/2003/05/soap-rpc"><ns1:ReceiverResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"><rpc:result>return</rpc:result><return xsi:type="xsd:boolean">true</return></ns1:ReceiverResponse></env:Body></env:Envelope>
""

I have tried to return null or an empty sting with no success. I have tried to transform the legacy SOAP return statement into an array so that Magento will use it and print it, but that was not successful.


texts: Magento 2 add extra field for customer group create/edit form at the backend

texts:
I have added column at "customer_group" table and able to display the column customer group table at  back-end , and fields for the added column is showing at edit form , but the value are not saved in the database

Here is my code
di.xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">

Form.php
<?php

namespace Belvg\Customer_group_ext\Model\Plugin;
use Magento\Customer\Api\GroupRepositoryInterface;
use Magento\Customer\Model\GroupFactory;
use Magento\Framework\Api\SearchCriteriaBuilder;
use Magento\Framework\Api\FilterBuilder;
class Form {
protected $_filterBuilder;
protected $_groupFactory;
protected $_groupRepository;
protected $_searchCriteriaBuilder;
public function __construct(FilterBuilder $filterBuilder,GroupRepositoryInterface $groupRepository, SearchCriteriaBuilder $searchCriteriaBuilder, GroupFactory $groupFactory)
{
$this->_filterBuilder = $filterBuilder;
$this->_groupRepository = $groupRepository;
$this->_searchCriteriaBuilder = $searchCriteriaBuilder;
$this->_groupFactory = $groupFactory;
}
public function aftersetForm(
\Magento\Customer\Block\Adminhtml\Group\Edit\Form $forma)
{
$form = $forma->getForm();
$fieldset=$form->addFieldset('base1_fieldset', ['legend' => __('Envio')]);
$shipping = $fieldset->addField('admin_comment',
'text',
[
'name' => 'admin_comment',
'label' => __('admin_comment'),
'title' => __('admin_comment Method'),
'class' => 'required-entry',
'required' => true,
'values' => '',
]);
return $form;
} //this shows ok!
public function afterexecute(\Magento\Customer\Controller\Adminhtml\Group\Save $save, $result)
{
// $active = $save->getRequest()->getParam('hp_active');
// $msg = $save->getRequest()->getParam('admin_comment');
$code = $save->getRequest()->getParam('code');
//if(empty($code))
//$code = 'NOT LOGGED IN';
$_filter = [ $this->_filterBuilder->setField('customer_group_code')->setConditionType('eq')->setValue($code)->create() ];
$customerGroups = $this->_groupRepository->getList($this->_searchCriteriaBuilder->addFilters($_filter)->create())->getItems();
$customerGroup = array_shift($customerGroups);
// if($customerGroup){
$group = $this->_groupFactory->create();
$group->load($customerGroup->getId());
$group->setCode($customerGroup->getCode());
//$group->setData('hp_active',$active);
$group->setData('admin_comment','kl');
$group->save();
//}
return $result;
}
}


texts:
I am seeing an error/notice in my Magento install when I have errors enabled, it is displayed after the response from the payment gateway.

I believe this error is being caused when magento is saving the order and updating the payment status.

$order->addStatusToHistory(
   $model->getConfigData('order_successful_status'),
   Mage::helper('CUSTOM')->__($orderInfo),
   $order->getPayment()->setAdditionalInformation('Information',$orderInfo)
);

$order->save();
$order->sendNewOrderEmail();

This is the error that I am getting:

Notice: Object of class Mage_Sales_Model_Order_Payment could not be converted to int  in ...\magento\lib\Varien\Db\Adapter\Pdo\Mysql.php on line 2935

Under this I then see:

#0 ...\magento\lib\Varien\Db\Adapter\Pdo\Mysql.php(2935): mageCoreErrorHandler(8, 'Object of class...', 'C:\\xampp\\htdocs...', 2935, Array)
#1 ...\magento\app\code\core\Mage\Core\Model\Resource\Abstract.php(221): Varien_Db_Adapter_Pdo_Mysql->prepareColumnValue(Array, Object(Mage_Sales_Model_Order_Payment))
#2 ...\magento\app\code\core\Mage\Core\Model\Resource\Db\Abstract.php(586): Mage_Core_Model_Resource_Abstract->_prepareDataForTable(Object(Mage_Sales_Model_Order_Status_History), 'sales_flat_orde...')
#3 ...\magento\app\code\core\Mage\Sales\Model\Resource\Abstract.php(50): Mage_Core_Model_Resource_Db_Abstract->_prepareDataForSave(Object(Mage_Sales_Model_Order_Status_History))
#4 ...\magento\app\code\core\Mage\Core\Model\Resource\Db\Abstract.php(449): Mage_Sales_Model_Resource_Abstract->_prepareDataForSave(Object(Mage_Sales_Model_Order_Status_History))
#5 ...\magento\app\code\core\Mage\Sales\Model\Resource\Order\Abstract.php(425): Mage_Core_Model_Resource_Db_Abstract->save(Object(Mage_Sales_Model_Order_Status_History))
#6 ...\magento\app\code\core\Mage\Core\Model\Abstract.php(318): Mage_Sales_Model_Resource_Order_Abstract->save(Object(Mage_Sales_Model_Order_Status_History))
#7 ...\magento\app\code\core\Mage\Core\Model\Resource\Db\Collection\Abstract.php(652): Mage_Core_Model_Abstract->save()
#8 ...\magento\app\code\core\Mage\Sales\Model\Order.php(2219): Mage_Core_Model_Resource_Db_Collection_Abstract->save()
#9 ...\magento\app\code\core\Mage\Core\Model\Abstract.php(319): Mage_Sales_Model_Order->_afterSave()
#10 ...\magento\app\code\community\CUSTOM_MODULE\controllers\PaymentController.php(105): Mage_Core_Model_Abstract->save()
#11 ...\magento\app\code\core\Mage\Core\Controller\Varien\Action.php(418): CUSTOM_PaymentController->returnAction()
#12 ...\magento\app\code\core\Mage\Core\Controller\Varien\Router\Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('return')
#13 ...\magento\app\code\core\Mage\Core\Controller\Varien\Front.php(172): Mage_Core_Controller_Varien_Router_Standard->\match(Object(Mage_Core_Controller_Request_Http))
#14 ...\magento\app\code\core\Mage\Core\Model\App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#15 ...\magento\app\Mage.php(684): Mage_Core_Model_App->run(Array)
#16 ...\magento\index.php(87): Mage::run('', 'store')
#17 {main}

Any clues to what could be causing this would really help.

Thanks


texts: Magento 2 : Is there a way to customize the labels of an admin form toggle?

texts:
For admin form UI checkbox components that use the 'toggle' (like Catalog > Product > [product record] > Enabled) - I can see a few references to the UI component configuration using:

<field name="my_field">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
             <item name="sortOrder" xsi:type="number">15</item>
             <item name="dataType" xsi:type="string">boolean</item>
             <item name="formElement" xsi:type="string">checkbox</item>
             <item name="prefer" xsi:type="string">toggle</item>
             <item name="label" xsi:type="string" translate="true">Enabled</item>
             <item name="valueMap" xsi:type="array">
                  <item name="true" xsi:type="string">1</item>
                  <item name="false" xsi:type="string">0</item>
             </item>
             <item name="default" xsi:type="string">1</item>
        </argument>
     </field>

That'll give me the little toggle with the 'Yes / No' labels - is it possible to change the 'Yes / No' to something else? (Active / Inactive)


texts: How to add 0 quantity product to add to cart in Magento 2?

texts:
I have to display the 0 quantity size product in frontend but addtocart button is missing.
How can i add 0 quantity product to cart in Magento 2?


texts:
The Problem is not loaded stylesheet because its MIME type, "text/html", is not "text/css".

We are using cdn on aws.

I added to below line on apache server.

AddType text/css .css
AddType text/javascript .js


texts: Custom field get but dont set the value in customer registration

texts:
I want to know how to solve this issue, I have a problem with the saving value of the custom attribute, i referred to this tutorial .I had done the same thing as the tutorial thats why I didn't put my code. So when i create or edit an account he dont save the value of this custom attribute, but when i edit it manually in a backend and i save, i can get it in front !

The field that doesn't set value:

   <?php echo $this->__('Telephone') ?>

         <input type="text" name="w_telephone" id="w_telephone" value="<?php echo $this->htmlEscape($this->getCustomer()->getWTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text" />

the new one for testing:

   *<?php echo $this->__('Code pin') ?>

        <input type="text" name="w_pincode" id="w_pincode" value="<?php echo $this->escapeHtml($this->getCustomer()->getWPincode()) ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Code pin')) ?>" class="input-text required-entry" />

I tried to add a new one for testing, this new one "w_pine" works fine  but not that of before "w_telephone".


texts:
Site_Link
I have refer above link,
I want to create this site in Magento 2,
In this site it has main functionality name is Virtual Room.
I want to create that kind of functionality.
So is there any extension available in Magento 2?
Please suggest me some advice on this..
Thanks in advance...


texts: couldn't overwrite template via xml added by external module

texts:
I have added a zoom module which has added this below code to replace media.php file

<reference name="product.info">
        <action ifconfig="amzoom/general/enable" method="unsetChild"><name>product.info.media</name></action>
        <block type="amzoom/catalog_product_view_media"  name="product.info.media" as="media">
            <action method="setTemplate">
                <template>catalog/product/view/media.phtml</template>
            </action>
            <action method="setTemplate" ifconfig="amzoom/general/enable">
                <template>amasty/amzoom/media.phtml</template>
            </action>
        </block>
    </reference>
</catalog_product_view>

Now i want one of the product (id=779) to use media-custom-hood.phtml file instead of amasty/amzoom/media.phtml.

and this is what i tried below with product_id layout handle

<PRODUCT_779>
   <reference name="product.info.media">
            <action method="setTemplate"> <!--/ ifconfig="amzoom/general/enable" -->
                <template>catalog/product/view/media-custom-hood.phtml</template>
            </action>
        </reference>
    </PRODUCT_779>

Also

 <PRODUCT_779>
        <reference name="product.info">
            <reference name="product.info.media">
                <block type="amzoom/catalog_product_view_media"  name="product.info.media" as="media">
                    <action method="setTemplate" ifconfig="amzoom/general/enable">
                        <template>catalog/product/view/media-custom-hood.phtml</template>
                    </action>
                </block>
            </reference>
        </reference>
</PRODUCT_779>

but it's not replacing that amasty/amzoom/media.phtml from external module


texts: I am about start my project in magento . How many products can be handled by magento with best hosting providers.


texts: Best way to GET the default Image for Magento 2 using the Rest API

texts:
This seems simple but I see a few options for pulling images using /V1/products/{sku}. One is the media_gallery_entries which works fine other than the fact that the first image is not always the default image.

I see under custom_attributes there is

{
      "attribute_code": "image",
      "value": "/1/8/18so03801-blu_1143_front_6.jpg"
}

I also see an array of "types" nested inside of the media_gallery_entries

"types": [
        "image",
        "small_image",
        "thumbnail"
      ]

Which makes more sense to use but my question is:

Is this available by default for ALL instances as I could not find any documentation on this, and if not is there a better way to get the default image.


texts: How to Display Out of Stock Simple Products For Bundle Product Types (Magento 2.2.4)

texts:
Is there any way to show out of stock simple products which are assigned to a bundle product. Current functionality hides out of stock simple products from the bundle product page.

I know we can display out of stock via the config however is the anywhere in the collection where we can simply show these products. We need the config to stay as is and only have this for bundle products. I want to style them to display out of stock rather than hiding them completely.

Any guidance we be most welcomed thank you.


texts: Is it possible to have multiple sales email templates for one site?

texts:
I am in the process of setting up a multi-site Magento installation

My sales team need to have a variety of 'standard' blocks of text to send to the customer, which aren't standard Order Confirmation etc.

For example:
- "Your order tracking reference is:...."
- "Our bank details for BACS transfer are..."
- "Your payment has been flagged as possible fraud..."
etc

I can set up a new Email Template, but how do I add a button / section for the sales team to send it?
And can someone supply a list of all the emails that Magento sends, and explain where you can change the template used for that email.
Thanks.


texts: I can't see prices in cart without login in

texts:
Currently I can't see product price until log in.
I checked CNS, under static block, and found this formula;

  Login to see the price.

I disabled this block, deleted but still prices are not visible in cart.
Also "Minimum Advertised Price" is set "NO" in sales configuration>sales.

packagingsquare.com.au


texts: How to add tier pricing from the vendor panel

texts:
When we add product from Admin Panel there is an option of Advanced Pricing where I have tier pricing option.
The same option I would like in the vendor dashboard when I am adding or editing a product.
I don't see that option in vendor dashboard. Is it possible?


texts: Event to observe invoice creation and get the invoiced item quantities

texts:
I need to observe the invoice creation event and get only the invoiced item quantities since I use partial invoicing sometimes.

I tried the events sales_order_invoice_save_after and sales_order_invoice_pay and found that sales_order_invoice_save_after is fired every time a change is made to invoice. So i used sales_order_invoice_pay and got the items into a log using this code

$invoice = $observer->getEvent()->getInvoice();
foreach ($invoice->getAllItems() as $item) {
      $name = $item->getName();
      $type = $item->getSku();
      $id = $item->getProductId();
      $qty = $item->getQty();
      Mage::log($name.' '.$type.' '.$id.' '.$qty.' '.$parentId , null, 'test.log', true);
}

Most of my products are configurable products. In the log file I get two lines for the same order, configurable product details and simple product details. Also the $qty value for the configurable product shows the invoiced quantity(in case of partial invoice) and the simple product $qty shows the ordered quantity.

How do I get only the simple product details with the invoiced qunatity?


texts:
I am new to magento. I have override the Contact form, but in home page not displaying the Contacts link.

my code is:

etc\module\Easylife_Contacts.xml

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

magento\app\code\local\Easylife\Contacts\controllers\IndexController.php

<?php
include_once('Mage/Contacts/controllers/IndexController.php');

class Easylife_Contacts_IndexController extends Mage_Contacts_IndexController
{

    const XML_PATH_EMAIL_RECIPIENT  = 'contacts/email/recipient_email';
    const XML_PATH_EMAIL_SENDER     = 'contacts/email/sender_email_identity';
    const XML_PATH_EMAIL_TEMPLATE   = 'contacts/email/email_template';
    const XML_PATH_ENABLED          = 'contacts/contacts/enabled';

    public function preDispatch()
    {
        parent::preDispatch();

        if( !Mage::getStoreConfigFlag(self::XML_PATH_ENABLED) ) {
            $this->norouteAction();
        }
    }

    public function indexAction()
    {
        $this->loadLayout();
        $this->getLayout()->getBlock('contactForm')
            ->setFormAction( Mage::getUrl('*/*/post') );

        $this->_initLayoutMessages('customer/session');
        $this->_initLayoutMessages('catalog/session');
        $this->renderLayout();
    }

    public function postAction()
    {
        ....
    }

}

magento\app\code\local\Easylife\Contacts\etc\config.xml

<?xml version="1.0" encoding="utf-8"?>

<config>
    <modules>
        <Easylife_Contacts>
            <version>0.1.0</version>
        </Easylife_Contacts>
    </modules>
    <frontend>
        <routers>
            <contacts>
                <args>
                    <modules>
                        <Easylife_Contacts before="Mage_Contacts">Easylife_Contacts</Easylife_Contacts>
                    </modules>
                </args>
            </contacts>
        </routers>
    </frontend>
     <layout>
        <updates>
            <contacts>
                <file>contacts.xml</file>
            </contacts>
        </updates>
    </layout>
</config>

magento\app\design\frontend\easylife\default\layout\contacts.xml

<?xml version="1.0"?>

<layout version="0.1.0">

    <contacts_index_index translate="label">

        <reference name="content">
            <block type="core/template" name="contactForms" template="contacts/form.phtml"/>
        </reference>

        <update handle="contactForm"></update>
    </contacts_index_index>
</layout>

magento\app\design\frontend\easylife\default\template\contacts\form.phtml

<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>

<?php echo Mage::helper('contacts')->__('Contact Us') ?>

<form action="<?php echo $this->getFormAction(); ?>" id="contactForm" method="post">
  ....
</form>

Can anyone tell me where I went wrong?

thanks.


texts: What aspects should be considered for creating separate nodes of Magento on AWS

texts:
What aspects should I consider to divide the Magento processes as separate nodes on AWS? Currently there are two nodes running, one for backend and other for frontend. Is that enough or should I suggest the client to use a separate node for any process. BTW client is not worried about the charges, all he needs is, his site should run smoothly in peak hours.
The site is using Varnish, ERP and M2E's Ebay/Amazon modules. The site has two stores and around 25k products.


texts: Magento 2: What Determines if a Request is "Full Page Cacheable"

texts:
Magento 2 comes stock with a full page caching feature.  However, it's not clear how the framework determines which URL end-points need to be cached. For example, if I create a simple controller that acts as a JSON endpoint

$data = ...;
$result = $this->resultJsonFactory->create();
return $result->setData($data);

The system seems smart enough to know not to cache this.

curl -I 'http://magento2.example.com/my/custom/endpoint'
//...
X-Magento-Cache-Debug: MISS

I've been able to track the built in caching functionality to this method (used by the built-in plugin)

#File: lib/internal/Magento/Framework/App/PageCache/Kernel.php
public function process(\Magento\Framework\App\Response\Http $response)
{
    if (preg_match('/public.*s-maxage=(\d+)/', $response->getHeader('Cache-Control')->getFieldValue(), $matches)) {
        $maxAge = $matches[1];
        $response->setNoCacheHeaders();
        if ($response->getHttpResponseCode() == 200 && ($this->request->isGet() || $this->request->isHead())) {
            $tagsHeader = $response->getHeader('X-Magento-Tags');
            $tags = $tagsHeader ? explode(',', $tagsHeader->getFieldValue()) : [];

            $response->clearHeader('Set-Cookie');
            $response->clearHeader('X-Magento-Tags');
            if (!headers_sent()) {
                header_remove('Set-Cookie');
            }
            $this->cache->save(serialize($response), $this->identifier->getValue(), $tags, $maxAge);
        }
    }
}

Which seems to examine the response object, and only cache requests if they're a HTTP 200, either a GET or HEAD request.  It also uses the Max-Age Cache-Control header to ensure values are saved in the cache for an appropriate amount of time.

So, it's clear from this code that something instructs the system (i.e. sets cache headers on the response) to cache the request.  What's not clear is where this happens during Magento's request flow, and which requests gets full page caching and which do not.


texts:
Going throught the demo store https://venia.magento.com/ and installing the headless version with our production instance it seems a lot of basic features are still msissing with PWA Studio provided by Magento an Adobe company now.
They have it as a major highlight of their list of major features as well on Version 2.4.2. You'll be able to see this on this link: https://magento.com/products/new-releases
However it's very clear that the PWA implementation lacks a lot of features already present in the Luma theme. This project has been running since 2019 and it's very frustrating as an enterprise client that Magento teams asks us to go through a 3rd party agency to have a workable fully featured PWA website in production when we are paying tens of thousands of dollars a month on license fees.
Putting up my question as a open discussion on PWA Studio and it's production readines.


texts: Cannot find the register link phtml file

texts:
I enabled the path template suggestion and It doesn't show the path for the 'Create an account' link.
Reading the html home page source I've saw these tags:

        Login

Create an account

This is the path for the greeting block:

/var/www/vhosts/mysite/httpdocs/vendor/magento/module-theme/view/frontend/templates/html/header.phtml

For the Login block:

/var/www/vhosts/mysite/httpdocs/vendor/magento/module-customer/view/frontend/templates/account/link/authorization.phtml

Where is the 'create an account' phtml file that contains the 'li' tag?


texts: How to get product url with category key on home page

texts:
I want to get product url with category key in it on home page.

for example:

www.example.com/category/product.html

Thanks


texts: Magento 2 dimensions attribute code changed

texts:
Currently I am trying to import products from Magento 2.1.15 store to Magento 2.3.1.

I have noticed i cannot import my dimensions like height, length, width.

apparently magento changed the attribute code from height etc. to ts_dimensions_height and it will not let me import my information even if i change the columns from height to ts_dimensions_height in my .csv file that I am importing.

Any help would be appreciated :)


texts: How to Set Custom Order Number in Magento2

texts:
We have b2b model for one ecommerce website. They are generating Vendor order id in seperate column of sales_order_items table. Now i want to display vendor order id instead of magento order id.

 Order # 000000483 Pending
March 23, 2019
Reorder

I need this change in Customer , My Orders page. How can i do that?


texts: How to allow admin only manage the products category

texts: I need to create a role that admin can only edit attach products to category nothing more. In Permission/Role i can see only "Manage Product" to enable/disable but it is too big scope. How can I only allow admin to manage category and hide everything else? The only way is create a new grid for adminpanel?


texts: I want to show another product that can be added to cart  when you tick the check box near it.It must be something like a combo product.


texts: How to get full list of product with Simple Product SKU Number and Category Name from MySql with Query in Magento?

texts:
I want to pull data from Mysql with query in magento, I need data in three columns
SKU Number, Category name and product Name etc.


texts: Is it possible to execute code for every fired event without too much boilerplate code?

texts:
This is mostly out of curiousity, as I think it would be very useful in some situations. Is there are a way in Magento to execute a piece of code every time an event is fired, regardless of the event?

Thanks in advance.


texts:
I want to logout customer from external request based on the customer ID.

For example, I have created custom controller action that accepts customer email in a GET request. I want to perform logout operation for that user.

I have written code to logout customer programmatically. But when I execute curl request, customer did not logs-out. I have tried everything but couldn't find the solution.

URL to perform logout: http://magento.local/sso/logout?user=example@mail.com

In short, I want to perform user logout operation based on user email via CURL.

Can anyone help ?


texts: I want to remove element from catalog.xml, but no matter what I will change in this file (and in other xml files too), changes will not apply to site. I can even delete whole catalog.xml code, and after flushing the cache there is still no changes. Is there anything I missed?


texts: Magento 2 development: use or not Redis and Varnish?

texts:
I have several issues using Varnish and Redis, so I disabled to develop. In the Alan Kent's (Magento Chief Architect) post said to use both to develop, I'm using this image Docker below with Redis and without Varnish, and it's very fast in Mac and Linux, so what is the better way, use both, use only one?

https://github.com/clean-docker/Magento2


texts:
I've installed a third party module, and a specific one of it's blocks was not added via the layout file, and was instead just initialised within the template.

I now wish to make a slight layout adjustment to it, so is there a way I can reference this block in my local.xml file, even though it doesn't have a reference name in the same way that a layout enabled blocks does?


texts: Zip/Postal Code validation not working properly

texts:
In billing.phtml file Zip/Postal Code validation is not working properly.

1) When I field is empty it's asking it's required fine.

2) But letter's also allowing this field. I don't want to allow letters only Numeric values will allow.

my code is

                        *<?php echo $this->__('Zip/Postal Code') ?>

                            <input type="text" title="<?php echo $this->__('Zip/Postal Code') ?>" name="billing[postcode]" id="billing:postcode" value="<?php echo $this->escapeHtml($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international <?php echo $this->helper('customer/address')->getAttributeValidationClass('postcode') ?>" />

and

I set to true in javascript also

var billingForm = new VarienForm('co-billing-form',true);

May I know Where I went wrong? or how to do this?

Thanks.


texts: How to use Magento's default form validation in a pop-up?

texts:
I have a form in a popup that I've been trying to use the default Magento validation with. I tried various tutorials with no luck. Even tried HTML5.

What happens is if someone just clicks the submit button the pop-up disappears and the red error message says to enter a valid email. But the pop-up is no longer there. What I need is to validate the form when they click the submit button without the form disappearing. When I tried using HTML5 I keep getting "Please match the pattern btw the pattern was pattern="/^[a-zA-Z0-9.!#$%&'*+/=?^_{|}~-]+@[a-zA-Z0-9-]+(?:.[a-zA-Z0-9-]+)*$/"` Anyway, I think the default Magento should be at least reliable but I haven't been able to get it to work.

Here is my code:

                            <form id="newsletter-registration-form" action="<?php echo $this->getUrl('newsletter/subscriber/new/') ?>" method="post" id="newsletter-validate-detail">

                                            <input name="email" id="email" onfocus="if(this.value=='Enter Your Email') this.value=''" onblur="if(this.value=='') this.value='Enter Your Email'" class="input-text required-entry validate-email" type="text" value="Enter Your Email">

                                        <button type="submit" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Subscribe')) ?>" class="button"><?php echo $this->__('Subscribe') ?></button>

                            </form>

Thanks


texts:
I just cant figure out where im going wrong.. can someone tell me?

app/etc/modules/Mynamespace_CheckoutOverrides.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Mynamespace_CheckoutOverrides>
            <active>true</active>
            <codePool>local</codePool>
            <depends>
                <Made_Streamcheckout />
            </depends>
        </Mynamespace_CheckoutOverrides>
    </modules>
</config>

app/code/local/Mynamespace/CheckoutOverrides/etc/config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Mynamespace_CheckoutOverrides>
            <version>1.0.0</version>
        </Mynamespace_CheckoutOverrides>
    </modules>
    <global>
        <models>
            <streamcheckout>
                <rewrite>
                    <url>Mynamespace_CheckoutOverrides_Model</url>
                </rewrite>
            </streamcheckout>
        </models>
    </global>
</config>

app/code/local/Mynamespace/CheckoutOverrides/Model/Streamcheckout.php

<?php
class Mynamespace_CheckoutOverrides_Model_Streamcheckout extends Made_Streamcheckout_Model_Streamcheckout
{

    public function saveAll($data)
    {
        mage::log('works');
    }

}

What am i missing here? :/

The streamcheckout config:

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Made_Streamcheckout>
            <version>1.3.0</version>
        </Made_Streamcheckout>
    </modules>
    <global>
        <resources>
            <streamcheckout_setup>
                <setup>
                    <module>Made_Streamcheckout</module>
                </setup>
            </streamcheckout_setup>
        </resources>
        <models>
            <streamcheckout>
                <class>Made_Streamcheckout_Model</class>
                <resourceModel>streamcheckout_resource</resourceModel>
            </streamcheckout>
            <streamcheckout_resource>
                <class>Made_Streamcheckout_Model_Resource</class>
                <entities>
                    <sales_order_additional>

streamcheckout_sales_order_additional

                    </sales_order_additional>
                    <sales_quote_additional>

streamcheckout_sales_quote_additional

                    </sales_quote_additional>
                </entities>
            </streamcheckout_resource>
            <sales>
                <rewrite>
                    <quote_address_total>Made_Streamcheckout_Model_Sales_Quote_Address_Total</quote_address_total>
                </rewrite>
            </sales>
        </models>
    </global>
</config>


texts: Where are the PDF invoices totals pulled from? I see that it is an array in abstract.php, but where does the original files come from?


texts: unable to change password no response while clicking on save password in megento 2


texts: Magento 2 compare only those products which are having same parent category?

texts:
anyone having an idea how to compare only that category which is having the same parent.

for example, a customer can compare Samsung washing machine with LG washing machine but if customer wants to compare Microwave or Oven with washing machine then it will not allow a customer to compare those products.

i tried to override default catalog compare controller.

<?php
namespace Custom\Compare\Controller\Product\Compare;

class CustomAdd extends \Magento\Catalog\Controller\Product\Compare
{

    public function execute()
    {
        $resultRedirect = $this->resultRedirectFactory->create();
        if (!$this->_formKeyValidator->validate($this->getRequest())) {
            return $resultRedirect->setRefererUrl();
        }

        $productId = (int)$this->getRequest()->getParam('product');
        if ($productId && ($this->_customerVisitor->getId() || $this->_customerSession->isLoggedIn())) {
            $storeId = $this->_storeManager->getStore()->getId();
            try {
                $product = $this->productRepository->getById($productId, false, $storeId);
            } catch (NoSuchEntityException $e) {
                $product = null;
            }

            if ($product) {
                $this->_catalogProductCompareList->addProduct($product);
                $productName = $this->_objectManager->get(
                    \Magento\Framework\Escaper::class
                )->escapeHtml($product->getName());
                $this->messageManager->addSuccess(__('You added product %1 to the comparison list.', $productName));
                $this->_eventManager->dispatch('catalog_product_compare_add_product', ['product' => $product]);
            }

            $this->_objectManager->get(\Magento\Catalog\Helper\Product\Compare::class)->calculate();
        }
        return $resultRedirect->setRefererOrBaseUrl();
    }
}


texts: Unable to Create SKU attribute as a Promotion Condition

texts: I am trying to create a promotional rule "20% OFF for specific SKU" on Magento 1.9.0.1, however I did not see the SKU attribute in the "Shopping Cart Price Rules". Is that something that I missed out?


texts: Magento 2 Products not showing in categories and search (visible in backend)

texts:
Got an issue with displaying the products in frontend although they all can be seen in backend. Products also can't be searched but can be accessed via url e.g. example.com/catalog/product/view/id/111769 so the product page works.

Things I've done so far:

Cleared Cached
Re-indexed everything
Remove/Re-added products to the same category
Removed/Reimported the products
Made sure the products are enabled
Made sure the items are in stock
Made sure the inventory qty is more than 0
Made sure the product visibility is set to "Catalog, Search"
Made sure the products are assigned to website
Disabled all custom modules
Changed the custom theme to luma
Upgraded Magento to 2.3.1
Looked through magento, apache, mysql logs

Do you have an idea what the problem could be or what else could I try?

Update 15.05:

Figured out that records in catalog_product_index_eav are not being generated and when I add the product record there manually it shows up in frontend.

Does someone has any idea how I could fix this?


texts: Parse OrderId into Fooman PDF template file

texts:
I'm stuck trying to parse an OrderId into a PDF template in order to get QTY of Items in the Order but it won't load the ID variable.

I can add the ID as a static value but when I use my variable I get nothing,

Here's my code:

<?php

        $orderId = '{{var order.increment_id}}';
        $order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
//      print_r($orderId);
    if ($order->hasInvoices()) {
        $invIncrementIDs = array();
        $invItems = array();
        $total = 0;
        foreach ($order->getInvoiceCollection() as $inv) {
            $invIncrementIDs[] = $inv->getIncrementId();
            foreach ($inv->getAllItems() as $item) {
                $invItems[] = $item->getQty();
                $total = $total + ($item->getQty());
            }
        }
    }
?>

    <?php echo $this->__("Number of items:") ?><?php echo $total; ?>

The above doesn't work but parsing in the static value does:

<?php

        $orderId = '{{var order.increment_id}}';
        $order = Mage::getModel('sales/order')->loadByIncrementId('1000003');
//      print_r($orderId);
    if ($order->hasInvoices()) {
        $invIncrementIDs = array();
        $invItems = array();
        $total = 0;
        foreach ($order->getInvoiceCollection() as $inv) {
            $invIncrementIDs[] = $inv->getIncrementId();
            foreach ($inv->getAllItems() as $item) {
                $invItems[] = $item->getQty();
                $total = $total + ($item->getQty());
            }
        }
    }
?>

    <?php echo $this->__("Number of items:") ?><?php echo $total; ?>

I'm absolutely baffled!


texts: Magento 1.9 Where is the translation file defined?

texts:
In my Magento folder, under locale/ I have a list of folders with translation files, and I have configured different Magento stores in Admin.

But some stores don't use the correct translation file. Where Can I set the correct file for each Magento store? Does this need to be done in code or in Admin?


texts:
In checkout page I try to add validation for postal code.

I already find a list with javascript validation for magento 2 here validation rule and I found this rule "validate-zip-international "but I don't know where to apply this rule.
In magento 1 you can add your javascript class in input class on billing.phtml.
Does anyone know what it's in Magento 2?

Now by defaul if a type a wrong postal code it only tell me that my code is wrong, and i can pass over this step(like in the next screen-shot)


texts: Add order data to custom template on Admin magento 2

texts:
I have a layout/template and including it within the Orders View page.

Adding static info to the layout/template is no problem but when I include order data (e.g. getBillingAddres) I get the following message on a blank page:

Order View

"Information Changes have been made to this section that have not been saved. This tab contains invalid data. Please resolve this before saving."

here's my template:

<?php $_order = $block->getOrder(); ?>

    <?php /* @escapeNotVerified */ echo __('Custom Order Information') ?>

        <?php /* Custom Order Information */?>
           <address class="admin__page-section-item-content"><?php /* @escapeNotVerified */ echo $block->getFormattedAddress($_order->getBillingAddress()); ?></address>

What am I doing wrong?


texts: Table prefix error when running - setup:db-declaration:generate-whitelist

texts:
I've run the command php bin/magento setup:db-declaration:generate-whitelist --module-name={Vendor_Module}
and receive the following error...
Magento was installed with a table prefix. Please re-install without prefix.
My table names do have a prefix name. What is the best way I can add this prefix for my commands?
I have 2 installations of Magento on the server.
Magento version 2.3.5


texts: show product reviews and form in category view

texts:
Client wants to show part of product information in category view. Got all descriptions, images and related products, but have problems with reviews and form. Can anyone help me, please?

Code:

In app/design/frontend/catalog/product/list.phtml

<?php echo $this->getChildHtml('review_form')->setProduct($product)->toHtml(); ?>

In local.xml made same changes as ProxiBlue told to make in catalog.xml :

<catalog_category_default>
    <reference name="content">
        <reference name="product_list">
            <block type="review/form" name="product.review.form" as="review_form">
                <block type="page/html_wrapper" name="product.review.form.fields.before" as="form_fields_before" translate="label">
                    <label>Review Form Fields Before</label>
                    <action method="setMayBeInvisible"><value>1</value></action>
                    <action method="setElementClass"><value>rewards</value></action>
                </block>
            </block>
        </reference>
    </reference>
</catalog_category_default>

So, after I made this changes I got error in frontend:

Fatal error: Call to a member function setProduct() on a non-object.

Then I opened app/code/Mage/Review/Block/Form.php and edited getAction() function like this:

public function getAction()
{
    $productId = $this->getProduct()->getId();
    return Mage::getUrl('review/product/post', array('id' => $productId));
}

After that I see text for first product on page 'Write your own review' and that's all, other products doesn't load, but no errors appeared in console or frontend. I guess, I should do smth more in Form.php file.

Also I need to get not only form, but reviews too.

Thanks for any help.


texts:
What I'm trying to do is use Magento's SOAP API v2 in Powershell to update products, create products, manage categories, etc.

So the simplest way I've found so far is from this page.

Here's a bit of what I have as far as logging in (and it does log in successfully)-

$uri = "http://mydomainname.com/api/v2_soap?wsdl=1"
$proxy = new-webserviceproxy $uri
$sessionid = $proxy.login("username","password")

Now, I should be able to put in things like $proxy.catelogproductinfo($sessionid,(a sku number), (a store number)) and get back product info for a specified product.

My problem is that I don't quite know what's wrong with some of the syntax I'm using. For that method above, here is Magento's devdocs help page.

It seems like even if an argument is marked as optional, if I leave it out of my request, I get an error saying it expected more arguments. It also looks like it's expecting an array for the fourth parameter, but when I try to enter it as an array (either written literally in the request, or as a variable) the API returns an error saying it can't read it.

For methods that I'm able to fill out all arguments for, the API does work and reply with what I'm looking for. I successfully got information on a category in Magento using this method. That call required a hash table, which I constructed in the form of $hash = @{"value1" = "something";"value2" = "something2"}.

Is there an easier way altogether to communicate with an API through Powershell? I tried some methods of invoke-webrequest, and Magento also offers a REST API, but I couldn't get anything else to work other than what I have above.

EDIT: so I figured out that if I just add $null to the optional arguments, it accepts them. But I still don't know how to enter an argument when it asks for an array.


texts:
I have issue regarding category page.

While I click on mode switcher in grid view to list view its not
 working. and also try to change Sort by value and Show number of product its not working.

Following configuration setting
Store > Configuration > Catalog > Catalog > Storefront

Current Magento version is 2.2.1,
Any idea what is wrong with this ?


texts:
I want to redirect to the home page (xyx.com) using the observer object & i am using the event controller_action_predispatch_cms_index_index.
below syntax is working fine when moving to the login page by the observer, Even I can move to any custom URL with the help of an observer object but unable to redirect to the home page.
below code is just for example.
$observer->getControllerAction()->getResponse()->setRedirect('customer/account/login');
I have tried many solutions:
Try Solution 1 :
$observer->getControllerAction()->getResponse()->setRedirect('home');

but it will redirect to xyz.com/home
Try Solution 2:
(a) $Url = $this->url->getUrl(''); OR (b) $Url = $this->url->getBaseUrl();  or (c) $Url = $this->url->getUrl('/');
& pass $Url to setRedirect but that is also not working.
 $observer->getControllerAction()->getResponse()->setRedirect($Url);

My Question is how to pass home page address to setRedirect.
Updated: Don't know the getUrl behaviour. Everthing thing is working & even custom url also working on getUrl on passing on observer & i am able to redirect anywhere accpording to my wish.
  $url =  getUrl('custom/url') or getUrl('home')
     or getUrl('customer/account/login')

all the above are working on setRedirect => $observer->getControllerAction()->getResponse()->setRedirect($url);
but $url =  getUrl() is not working.
Does anyone face the same issue on redirection from observer. ?


texts: Magento 2 : Not getting selected products in edit form

texts:
Added product grid in custom admin form using :

products_form.xml

   <fieldset name="assign_products">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="label" xsi:type="string" translate="true">Products</item>
                <item name="collapsible" xsi:type="boolean">true</item>
                <item name="sortOrder" xsi:type="number">40</item>
            </item>
        </argument>
        <container name="assign_products_container" >
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="sortOrder" xsi:type="number">60</item>
                </item>
            </argument>
            <htmlContent name="html_content">
                <argument name="block" xsi:type="object">Companyname\Modulename\Block\Adminhtml\Productgrid\AssignProducts</argument>
            </htmlContent>
        </container>
    </fieldset>

I have saved the product ids into my db as comma separated values. Now I want those products as selected in edit form.
Please share some ideas.


texts:
I'm currently trying to create (or find how to) a field to display the Media browser (or media storage manager) in admin Edit on a custom module.

Type file / image work fine, but it could be much more efficient if this button open the panel like in the wysiwyg. I see the javascript call in the wysiwyg

javascript:openBrowser('filebrowser','src', 'media','media_media_browser_callback');

but i didn't find a way to call that out of this field.

Have anyone done that before ?


texts: Chinese Flag is not changing in the language switcher

texts:
On my website: if i switch to Chinese language the flag is not changing in the language switcher? The other languages are working fine. E.g. if you switch to French, its showing the French flag...

This is the language.phtml i am using:

<?php if(count($this->getStores())>1): ?>

        <?php foreach ($this->getStores() as $_lang):?>

<a href="<?php echo $_lang->getCurrentUrl() ?>" title="<?php echo $this->htmlEscape($_lang->getName()) ?>" data-lang-id="<?php echo $this->htmlEscape($_lang->getCode()) ?>"><img src="<?php echo $this->getSkinUrl('images/flags/' . $_lang->getCode() . '.png');?>" alt=""> <?php echo $this->htmlEscape($_lang->getName()) ?>

        <?php endforeach;?>

<?php endif; ?>


texts: Magento 1.9 : SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row

texts:
I have one used advertisement purpose Magento extension in website,when i click on upload Images Button then make this error.

Please help me Developers,Thanks

Error :

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`carparts_mage`.`#sql-952f8_1ffc720`, CONSTRAINT `FK_CAT_PRD_FLAT_1_ENTT_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE )


texts: Error after upgrade from Magento 1.3 to 1.9.24 ( PHP 7 )

texts:
I have upgraded Magento 1.3 to Magento 1.9 and implemented inchoo php 7 extension in the process ( so running on php 7 )

Everything appears to work on the front end and the back end - except if I try and get grouped products through the API I start getting the following errors - repeatedly.  Ideas?

Next Zend_Db_Statement_Exception: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'session_id' cannot be null, query was: INSERT INTO log_visitor (session_id, first_visit_at, last_visit_at, last_url_id, store_id) VALUES (?, ?, ?, ?, ?) in /html/lib/Zend/Db/Statement/Pdo.php:235


texts: How to change price (Custom Price) of Bundle Child products during add to cart using observer

texts:
I am trying to change the price of Bundle products during add to cart using observer in Magento 1.9

Till now I am using below code in observer but it changes the price of parent product not the child products.

<?php class Easylife_Meta_Model_Observer {

public function autoMetaDescription($observer) {

    $item = $observer->getEvent()->getQuoteItem();
    if ($item->getParentItem()) {
       $item = $item->getParentItem();
    }

       $product = Mage::getModel('catalog/product')->setStoreId(Mage::app()->getStore()->getId())->load($item->getProductId());

         $bundleType = $product->getTypeId();

         if ($bundleType == 'bundle') {

         $collection = $product->getTypeInstance(true)->getSelectionsCollection($product->getTypeInstance(true)->getOptionsIds($product), $product);

         foreach ($item->getQuote()->getAllItems() as $_item) {
$custom_price = 20;
$productPrice = Mage::getModel('catalog/product')->load($_item->getProductId())->getFinalPrice();

  $finalPrice = (int)$custom_price + (int)$productPrice;

    if($finalPrice > 0){
        $_item->setCustomPrice($finalPrice);
        $_item->setOriginalCustomPrice($finalPrice);
        $_item->getProduct()->setIsSuperMode(true);
    }

         }

         }

}
}

Please help me How can I change the price of child products.

Thanks


texts: SUPEE-9767 Patch increasing JPG image sizes

texts:
Is anyone else seeing issues with uploading images through the WYSIWYG editor in the admin as far as images becoming larger? For example, I uploaded a JPG image optimized in Photoshop that's 168KB but after uploading it's over 460KB.

I looked into the patch code and it looks like they're resampling images and saving them at 100% quality in the validate method (core/Mage/Core/Model/File/Validator/Image.php) instead of just passing the image as uploaded into the wysiwyg media directory.

I've applied V2 of the patch as well as trying to update the code myself from the many other posts here that were dealing with the PNG background issue but the issue is always going to be that they're doing imagejpeg($img, $filePath, 100);. This is recreating the image at 100% quality and that's a big problem.

Am I crazy or are other people able to duplicate this? If so, this is a huge problem for store owners as they'll start seeing their Google Page Speed score go down because images are now so large.


texts:
I am new here.

My client just sent me magento2 mega menu extention for setup and manage their menu and I installed it on their website but after installation their website gone down.

according to megamenu provider documentation I installed activation with the following commands.

first I run: php bin/magento cache:disable

Then I uploaded files and after files uploaded i run this command:
php bin/magento setup:upgrade

then I run this command: php bin/magento cache:enable

after installation website gone down.

I'm getting this error

  Exception #0 (Exception): Notice: Undefined property: Magezon\NinjaMenus\Block\TopMenu\Interceptor::$_helper in /mnt/data/home/202257.cloudwaysapps.com/tzpdyygggw/public_html/vendor/magento/framework/View/TemplateEngine/Php.php on line 110

Please provide me solution for this how to fix line 110 or how to bypass this error.

Waiting for reply.


texts: PayPal Express rounding issue in Configurable Product (MCE 1.9.1.0 / 1.9.0.1)

texts:
PayPal Express creates a rounding issue error in Magento CE 1.9

Magento have confirmed this is a bug here:  - but this bug was reported in April and still no confirmation from Magento if/when this will be fixed.

Can anyone help with a work-around?

Full steps with screenshots to recreate the bug are in the link http://www.magentocommerce.com/bug-tracking/issue/index/id/710

Thanks in advance


texts:
I created a module with a Custom Widget. When logging into the admin, going to content->widgets, creating an instance, and setting that instance to appear on the homepage, the widget appears as expected.

I have removed this instance and am now trying to create the widget by going to content->pages, editing the homepage -> content section, and selecting insert widget. I created a new instance of the widget and added some additional text into the homepage -> content section.

When I load the homepage the widget does not appear, though the rest of the text does appear.

The block for the widget is being called ( I tested this with a var_dump and exit).

The template is not being rendered however.

Here is my Block:

<?php

namespace MyNamespace\Slider\Block\Widget;

use Magento\Framework\View\Element\Template;
use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory;
use Magento\Catalog\Block\Product\Context;

class Slider extends Template
{
    protected $_template = "Yamazaki_Slider::widget/slider.phtml";

    /**
     * @var CollectionFactory
     */
    protected $_productCollectionFactory;

    /**
     * @var CollectionFactory
     */
    protected $_imageHelper;

    /**
     * @param Context $context
     * @param CollectionFactory $productCollectionFactory
     */
    public function __construct(Context $context, CollectionFactory $productCollectionFactory)
    {
        $this->_imageHelper = $context->getImageHelper();
        $this->_productCollectionFactory = $productCollectionFactory;
        parent::__construct($context);
    }

    /**
     * Retrieve featured products collection
     */
    public function getProducts()
    {
        $collection = $this->_productCollectionFactory->create();
        return $collection->addAttributeToSelect('*')->addAttributeToFilter('is_featured','1');
    }
}

and my Template:

<?php $imageBlock = $block->getLayout()->createBlock('Magento\Catalog\Block\Product\ListProduct'); ?>

<?php foreach($this->getProducts() as $product): ?>
    <?php $productImage = $imageBlock->getImage($product, 'product_page_image_large'); ?>
    <?php echo $productImage->toHtml(); ?>
<?php endforeach ?>

Update

If I "Hide the Editor" inside content->pages->edit->content I see:

<p>{{widget type="MyNamespace\Slider\Block\Widget\Slider"}}</p>`

If I replace this with

{{block class="MyNamespace\Slider\Block\Widget\Slider" template="widget/slider.phtml"}}

The Content appears as expected


texts: Add Category Tree to mass update product functionality

texts:
I need to add Category option to mass update product functionality as shown below

As these three are being added from htdocs/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/, need some guidance about it.


texts: Error 400 and error 503 by /customer/section/load/? and ?sections=messages

texts:
I have upgraded my stage site from Magento 2.2.9 to 2.3.3, but now it's getting long loading time by the

  /customer/section/load/?sections=gtm&force_new_section_timestamp=false&_=...

and

  ?sections=messages....

I'm not sure if it's caused by default Magento or 3rd party extension. I have tried to change to default luma theme and disabled 3rd party extensions, but no luck. Below is the screenshot from the google chrome developer tab.

i get these server error logs after my stage site hits 503 server unavailable.  However, my stage site files are at /home/demo4756/stage2/index.php. the "public_html/" is for live site. any ideas?

  [Tue Oct 29 12:06:33.935692 2019] [:error] [pid 32922] Execute of
  /home/demo4756/public_html/index.php stopped because of load 109.04
  [Tue Oct 29 12:06:33.933996 2019] [:error] [pid 32922] Execute of
  /home/demo4756/public_html/index.php stopped because of load 109.04
  [Tue Oct 29 12:06:33.697460 2019] [:error] [pid 32089] Execute of
  /home/demo4756/public_html/index.php stopped because of load 109.04
  [Tue Oct 29 12:06:33.696386 2019] [:error] [pid 32089] Execute of
  /home/demo4756/public_html/index.php stopped because of load 109.04
  [Tue Oct 29 12:06:03.834089 2019] [:error] [pid 32957] Execute of
  /home/demo4756/public_html/index.php stopped because of load 91.28
  [Tue Oct 29 12:06:03.783058 2019] [:error] [pid 32957] Execute of
  /home/demo4756/public_html/index.php stopped because of load 91.28
  [Tue Oct 29 12:06:02.346288 2019] [:error] [pid 32957] Execute of
  /home/demo4756/public_html/index.php stopped because of load 66.93
  [Tue Oct 29 12:06:02.344956 2019] [:error] [pid 32957] Execute of
  /home/myuserid/public_html/index.php stopped because of load 66.93
  [Tue Oct 29 12:06:00.001466 2019] [:error] [pid 32941] Execute of
  /home/myuserid/public_html/index.php stopped because of load 66.93
  [Tue Oct 29 12:05:59.999731 2019] [:error] [pid 32941] Execute of
  /home/myuserid/public_html/index.php stopped because of load 66.93
  [Tue Oct 29 12:05:59.757994 2019] [:error] [pid 32950] Execute of
  /home/myuserid/public_html/index.php stopped because of load 66.93
  [Tue Oct 29 12:05:59.757285 2019] [:error] [pid 32950] Execute of
  /home/myuserid/public_html/index.php stopped because of load 66.93
  [Tue Oct 29 12:05:57.837707 2019] [:error] [pid 32952] Execute of
  /home/myuserid/stage2/index.php stopped because of load 66.93 [Tue Oct
  29 12:05:57.836374 2019] [:error] [pid 32952] Execute of
  /home/myuserid/stage2/index.php stopped because of load 66.93 [Tue Oct
  29 12:05:55.614984 2019] [:error] [pid 32950] Execute of
  /home/myuserid/public_html/index.php stopped because of load 37.94
  [Tue Oct 29 12:05:55.563016 2019] [:error] [pid 32950] Execute of
  /home/myuserid/public_html/index.php stopped because of load 37.94
  [Tue Oct 29 12:05:53.816650 2019] [:error] [pid 32956] Execute of
  /home/myuserid/public_html/index.php stopped because of load 37.94
  [Tue Oct 29 12:05:53.815636 2019] [:error] [pid 32956] Execute of
  /home/myuserid/public_html/index.php stopped because of load 37.94


texts:
I am trying to rewrite app/code/core/Mage/Adminhtml/contollers/Catalog/ProductController.php. In my config.xml I have the following:

<?xml version="1.0"?>
<config>
    <modules>
        <Product_CustomProduct>
            <version>0.1.0</version>
        </Product_CustomProduct>
    </modules>
    <admin>
    <routers>
        <adminhtml>
            <args>
                <modules>
                    <Product_CustomProduct before="Mage_Adminhtml">Product_CustomProduct</Product_CustomProduct>
                </modules>
            </args>
        </adminhtml>
    </routers>
</admin>
</config>

and in app/code/local/Product/CustomProduct/controllers/Catalog/ProductController.php I have:

<?php
include_once("Mage/Adminhtml/controllers/Catalog/ProductController.php");

class Product_CustomProduct_Catalog_ProductController extends Mage_Adminhtml_Catalog_ProductController
{
    /**
     * Save product action
     */
    public function saveAction()
    {
        echo 123456;
        die;
    }
}

I want to change saveAction function of core controller. But after product save my file echo is not working. My module is displayu on admin and it is enable. I dont know why my code is not working.

My newAction also not changed dont understand what is wrong in my structure.I dont want to change core file of magento.


texts: Magento 2 , How to remove the loader for every page load?

texts:
After loading every page , I am getting loader and hiding . I want to remove that loader for every page , the loader html is loading after Body tag as follows

Please wait...

I have checked all files and settings still unable to find from where these loader is loading. Please help me resolve this.


texts:
I need to Set Promotion Buy A or B and Buy C Get Free D

Example:

  Buy pen or pencil and buy ruler i will get free soap 1 piece

Please suggest me to set  cart price rule ?


texts: Magento 2.2.6 Cannot create a symlink for... after Update

texts:
I update my magento webstore to 2.2.6 using following guide:
https://devdocs.magento.com/guides/v2.0/comp-mgr/cli/cli-upgrade.html

Not everything seems to be fine. I have some css files that do not get generated (calendar.css for example). When I try to view the source of these files in the browser I get following error:

  annot create a symlink for "C:/xampp/htdocs/magitas/lib/web/mage/calendar.css" and place it to "C:/xampp/htdocs/magitas/pub/static/frontend/Magento/luma/nl_NL/mage/calendar.css" Warning!symlink(): Cannot create symlink, error code(1314)

I tried changing the theme from  my own theme to magento/luma but I got the same message.

I also tried the php bin/magento setup:static-content:deploy -f command but with the same result.


texts: add a new address field in backend with autogenerating value

texts: I want to create a new field for every address (say 'new_address_code') in the backend which shouldn't be visible in the frontend. When ever a customer adds a new address through address book or in checkout, the field's value should be generated automatically based on the 'customername'._.'serialNumberOfHisAddresses'. Could any one guide me how to do this. Thanks in advance..


texts: How does SKU number is generating in Magento 2?

texts:
I would like to know how Magento 2 generates SKU number?

While checking Mask for SKU in admin, there is filled as {{name}}. So when I create a product, the SKU automatically filled with the product name I have given.

Could anyone please help me to understand SKU in detail?


texts: In Layer navigation side bar how to display the all category

texts: I have three main categories and for each, I have 2 subcategories. I want to display all the category in layered navigation.


texts: Overriding Block file is not working in Magento 2

texts:
Today I am trying to overwrite the \Magento\Sales\Block\Adminhtml\Order\View file, but it's not working. The same coding working on core files.

My Code is

<?php

namespace SR\StackExchange\Block\Adminhtml\Order;

class View extends \Magento\Sales\Block\Adminhtml\Order\View
{

    /**
     * Get URL for back (reset) button
     *
     * @return string
     */
    public function getCustomOrderUrl()
    {
        $params = [
            'id' => $this->getOrderId(),
            'store' => 0
        ];

        return $this->getUrl('stackexchange/stackexchange/order');
    }

    /**
     * Constructor
     *
     * @return void
     * @SuppressWarnings(PHPMD.CyclomaticComplexity)
     * @SuppressWarnings(PHPMD.NPathComplexity)
     * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
     */
    protected function _construct()
    {

        $this->buttonList->add(
            'custom_button',
            [
                'label' => __('Custom Button'),
                'class' => 'action-secondary',
                'on_click' => sprintf("location.href = '%s';", $this->getCustomOrderUrl()),
            ]
        );

        parent::_construct();
    }

}

etc/adminhtml/di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Sales\Block\Adminhtml\Order\View">
        <plugin name="custom_button" type="SR\StackExchange\Block\Adminhtml\Order\View" sortOrder="1"/>
    </type>
</config>


texts: How Can I Include Customized phtml file in email template

texts:
I am trying to send coupon code with email on new account registration. For that I created email template system > transactional emails.

Here in this email template I have included coupon.phtml file which is located at app/design/frontend/theme/default/template/email/coupon.phtml using below code.

{{block type="core/template" name="email_coupon" template="email/coupon.phtml"}}

But this is not working. I am not getting any html which I have added in coupon.html. Please guide where I have mistaken.


texts: Configuration to get new user email confirmation

texts:
I set the Require Emails Confirmation in System->Configuration->Customers->Customer Configurations to Yes but im not getting any email.
I wonder if i need any more configuration to make the confirmation emails to work.
Thanks!


texts:
We're seeing the search term "user" as one of our top 5 search terms with a popularity of 9520 that continues to increase. While it does return 3 products, this seems like an unusual search for our site. Google Analytics does not show this term in its site search metrics for our site, so it doesn't appear to be user generated.

How can I understand where this unusual search term is coming from and take measures to correct it?


texts: Magento 2 Get Product Price Including Tax

texts:
I have simple product name is "Test Product" with Price = 100$
Also, I assign the tax class name "Default" with 7% Tax Rate

So how can I Calculate the product price including tax?

  Default.phtml

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$ProductId = 1;
$product = $objectManager->create('Magento\Catalog\Model\Product')->load($ProductId);
$taxCalculation = $objectManager->create('\Magento\Tax\Api\TaxCalculationInterface');
$scopeConfig = $objectManager->create('\Magento\Framework\App\Config\ScopeConfigInterface');

if ($taxAttribute = $product->getCustomAttribute('tax_class_id')) {
    $productRateId = $taxAttribute->getValue();
    $taxCalculation = $objectManager->create('Magento\Tax\Model\Calculation\Rate')->load($productRateId);
    $rate = $taxCalculation->getRate();

    if ((int) $scopeConfig->getValue('tax/calculation/price_includes_tax', \Magento\Store\Model\ScopeInterface::SCOPE_STORE) === 1) {
        $priceExcludingTax = $product->getPrice() / (1 + ($rate / 100));
    } else {
        $priceExcludingTax = $product->getPrice();
    }
}
$priceIncludingTax = $priceExcludingTax + ($priceExcludingTax * ($rate / 100));

Thanks in Advance!


texts: How to set default value in custom option in magento2

texts:
I want to set default option to the custom options value in the product level.

How to do that in Magento 2 ?

Please help me to resolve on this.


texts: Retrieving size attribute text via MySQL in Magento 2

texts:
I'm working on a PHP file that will run on cron (outside of the Magento 2 directory). I'm writing some scripts that fetch various data such as customer details and the items they've ordered. Retrieving customer information was easy as it was available in the sales_order table.

All my products are set up as configurable products so I'm struggling to work out how I can get the "size" attribute. I can see ID's throughout the catalog_product and eav tables that link together but I can't quite figure it out!

In this case, I need to retrieve "Small" or "Large", for example - which are value attributes of the "size" EAV attribute.


texts: addAttributeToSelect for multiple fields not working

texts:
I am trying to get the user orders history, used the following query and its working fine. But its returning all the order related fields from table

    $collection     = Mage::getModel("sales/order")->getCollection()
                               ->addAttributeToSelect('*')
                               ->addFieldToFilter('customer_id', 400)
                               ->setOrder('created_at', 'desc');

I want to fetch only particular fields, so in case of ->addAttributeToSelect('*')

     used the following code

 ->addAttributeToSelect(array('created_at','customer_id','increment_id','updated_at','status','entity_id','state'))

But getting error as "Cannot determine the field name."


texts: How to override admin template with layout, how to get reference block

texts:
I want to override below templates. I tried with placing core layout in my custom module and place template in same directory structure.

Can any one please tell me where I am making mistakes.

Templates:

1) adminhtml\templates\sales\invoice\create\items\renderer.phtml

2) adminhtml\templates\sales\invoice\view\items\renderer.phtml

3) adminhtml\templates\sales\creditmemo\create\items\renderer.phtml

4) adminhtml\templates\sales\creditmemo\view\items\renderer.phtml

5) adminhtml\templates\sales\shipment\create\items\renderer.phtml

6) adminhtml\templates\sales\shipment\view\items\renderer.phtml

Layouts I placed in my modules are:

=> adminhtml_order_shipment_new, => adminhtml_order_shipment_view, => sales_order_creditmemo_new, => sales_order_creditmemo_view, => sales_order_invoice_new, => sales_order_invoice_view.

In Layout Code is like

<referenceBlock name="order_items">
            <block class="Magento\Bundle\Block\Adminhtml\Sales\Order\Items\Renderer" as="bundle" template="sales/invoice/create/items/renderer.phtml"/>
        </referenceBlock>

Can any one please tell me what is the correct way to override this template.


texts: Customer can't register an account during order process

texts:
I am setting up a new multi-store Magento 1.9.3.3.

Problem:
If the customer wants to register a new account during the order process (onepage-checkout), the account won't get created in the DB. The order getting placed neatly but not the customer account itself.

No errors or exceptions are thrown concerning this issue.
But when I create directly an account in the frontend without processing an order, it works.

I am using a custom template. Apparently it don't touches the process. Aswell other extensions, as far as I can say.
Does someone have perhaps a clue to look for or an idea what could cause this issue?


texts:
I want to display quantity in mini cart as following:

This is how it displays now.The field Qty is a text field

I want to display it as qty X productprice

This is the code

                    <input data-bind="attr: {
                           id: 'cart-item-'+item_id+'-qty',
                           'data-cart-item': item_id,
                           'data-item-qty': qty,
                           'data-cart-item-id': product_sku
                           }, value: qty"
                           type="number"
                           size="4"
                           class="item-qty cart-item-qty"
                           maxlength="12"/>
                    <button data-bind="attr: {
                           id: 'update-cart-item-'+item_id,
                           'data-cart-item': item_id,
                           title: $t('Update')
                           }"
                            class="update-cart-item"
                            style="display: none">

                    </button>

Please suggest some methods.


texts: Disable Product URL without Category Path

texts:
My website I only use category URLs, I want to disable/redirect direct product link to link with category

i.e

example.com/catname/productname
example.com/productname [want to disable this]

I have set the SEO settings correctly for this:

Use Categories Path for Product URLs -> Yes

Create Permanent Redirect for URLs if URL Key Changed -> Yes

Use Canonical Link Meta Tag For Categories -> Yes

Use Canonical Link Meta Tag For Products -> No

We want to disable direct product access URL or redirect them with category URL.

Rewrite example.com/productname ---> example.com/catname/productname

Or

Disable this redirect: example.com/productname

I referred this but it's not working in my case.
Ref Link


texts: Is there any method of writing a mysql query and saving the result in a .csv file from Magento?

texts:
i'm pretty new at sql queries and using the terminal in general for accessing data in MySQL and Magento. I've been asked to export a daily list of database entries in a Magento database and export this into a .csv file. Basically, I need to select what I need from the orders tables in the database and then write that to a csv file which I can then save and send to my client. I've done some research and I know which tables I need to target, but I'm not sure how to put together my script to write the query and save the file.
Any help would be appreciated.
Thanks in advance.


texts: Created a custom module (custom admin-form)

texts:
I have Created a custom module (custom form). But when i have seen user feedback from admin backend. There is no. of comments.
Total no. of record is 350 in just 1 day. How can this possible ?

attached screenshot.


texts: Magento 2.2.3 Minicart missing proceed to checkout text

texts:
I would like you help on this I have been reading and reading and cant find an answer.
Magento 2.2.3 with a templatemonster theme

This is my minicart.phtml, and the problem is the proceeed to checkout button text is missing on home page, however if I click on edit cart, I can see the text working. In the browser console I get $(...).find(...).dropdownDialog is not a function error.

But if I'm in www.site.com/checkout/cart/configure/etc on the product page I get no error at all. I have tried changing the template files with the core files and it screws up everything else.

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

// @codingStandardsIgnoreFile

/** @var $block \Magento\Checkout\Block\Cart\Sidebar */
?>

             <?= /* @escapeNotVerified */  __('My Cart') ?>

    <?php if ($block->getIsNeedToDisplaySideBar()): ?>

                <?= $block->getChildHtml('minicart.addons') ?>

    <?php endif ?>

Ok, so, I have been checking both minicart.phtml files (core and template). If I add

data-role="dropdownDialog"
         data-mage-init='{"dropdownDialog":{
            "appendTo":"[data-block=minicart]",
            "triggerTarget":".showcart",
            "timeout": "2000",
            "closeOnMouseLeave": false,
            "closeOnEscape": true,
            "triggerClass":"active",
            "parentClass":"active",
            "buttons":[]}}'>

Under

<div class="block block-minicart empty"

The error in the console goes away, but the minicart does not work in any page, so I'm thinking there has to be something bad in the template, I can post the content.html file too, if you think the error might be there instead. Thank you!

SOLVED


texts: How to change background color of only this section which mark at logo


texts: Magento 1.9.4.0 admin not working on php 7.2

texts:
I have upgrade my site form 1.9.3 to 1.9.4 and update php version from 5.6 to 7.2.
In php version 5.6 both admin and front working fine but on php 7.2 front working fine, but when i login into admin it shows me blank screen.
There is no any error,warning or notice and not any log created.
please see the screenshot.


texts: Change images as per Swatches using Custom Slider on Product Detail page

texts:
I have created Custom Slick slider to display product images on Product detail page.

But I want to change images as per change on color Swatches.

Note : I'm using getGalleryImagesJson() to retrieve image data.

So I want to change images as per swatches which works on fotorama (default slider).
Any suggestions would be appreciated.


texts: Magento 2 How can I find where/what is making MySQL calls

texts:
I have Tideways profiling on my Magento 2 product page which is very slow. The profiling shows that the same 2 queries are run about 60,000 times each. (120,000 queries per page load!)
The queries are:

SELECT
  l.product_id,
  l.parent_id
FROM
  catalog_product_super_link AS l
  INNER JOIN catalog_product_entity AS p ON p.entity_id = l.parent_id
  INNER JOIN catalog_product_entity AS e ON e.entity_id = l.product_id
  AND e.required_options = ?
WHERE
  (p.entity_id IN ([..]))

And

SELECT
  tbl_selection.product_id,
  tbl_selection.parent_product_id,
  [..]
FROM
  catalog_product_bundle_selection AS tbl_selection
  INNER JOIN catalog_product_entity AS e ON e.entity_id = tbl_selection.product_id
  AND e.required_options = ?
  INNER JOIN catalog_product_entity AS parent ON tbl_selection.parent_product_id = parent.entity_id
  INNER JOIN catalog_product_bundle_option AS tbl_option ON tbl_option.option_id = tbl_selection.option_id
WHERE
  (parent.entity_id = :parent_id)

These both seem to be coming from core Magento code:

vendor\magento\module-bundle\Model\ResourceModel\Selection.php:getChildrenIds()
vendor\magento\module-configurable-product\Model\ResourceModel\Product\Type\Configurable.php:getChildrenIds()

I don't have any configurable or bundle products in the catalog.

I have (temporarily) commented out the code in vendor\magento\module-bundle\Model\ResourceModel\Selection.php:getChildrenIds() that calls the queries. and this does stop 1 of the queries running. But commenting out the code in the configurable one causes an error.

How can I find out which block/piece of code is actually calling these?
(Magento 2.3.3)


texts:
I have following code:

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$customer = $objectManager->create('Magento\Customer\Api\CustomerRepositoryInterface')->getById($order->getCustomerId());
$mitgliedsnummer = $customer->getCustomAttribute('mitgliedsnummer');

When a customer has been deleted and this code gets executed it throws

  NoSuchEntityException

However I want the code to continue.
What can I do?

Thanks!

Update:

After applying simonthesorcerers suggestion it still happens.

    try {
        $customer = $objectManager->create('Magento\Customer\Api\CustomerRepositoryInterface')->getById($order->getCustomerId());
    } catch(NoSuchEntityException $e) {
        $customer = null;
    }
    error_log("Test");

Update 2:
include

  use \Magento\Framework\Exception\NoSuchEntityException;
  to your namespace.

Thanks to simonthesorcerer!


texts: I just move my site from a server to new server. Everything works well excepting switching language. The style cannot load after switching language. I have been stuck whole day. Please HELP! THANK YOU!


texts: Many-to-many database relationship magento

texts:
Hello I want to create a Magento store which is going to sell books.

Every book is going to have Authors and the database relationship will be "Many-to-Many"
Example: 1 book has many authors and 1 Author has many books.

How can I achieve a system like this with Magento? I tried to create an attribute Author but I can only select 1 author.


texts: On Checkout: what is in $parent.item_id? Not the product ID, not the database ID for the product... What else?

texts:
If you try to get item_id in default.html (module-checkout/web/templates/summary/item/details.html), you don't get the products ID, you get something very different.

What is this ID and how can I turn this ID into a valid product ID? It has to be linked to the product anyhow, but how?

Looks like it is the quote's ID. Now I do need to get the Products ID based on this ID. How could I possibly do this?


texts:
Can I use asterisk within the Zip/Postal Code column in the Table Rates in Magento 2?
For example, if I wanted to include every BT & IV postcode would the CSV file pick up:
BT*
IV*

Please see image for reference.
Or, do I have to add in each BT & IV postcode individually? For example:
BT1 1AA
BT1 1AB
etc
Thank you for your help.


texts: Email template fonts not rendering in gmail

texts:
I want to know how we can use our custom fonts rendering inside email template. I searched a lot to this answer but didn't find how to do that.

So far I have already changed the content of email-fonts.css and email-inline.css and put my font-face declaration in the email-fonts.css file.

@font-face {
    font-family: 'museo_sans500';
    src: url('../fonts/museosans_500-webfont.woff2') format('woff2'), url('../fonts/museosans_500-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;

  }

But I am only getting the font-family being applied to the element and actual font is not rendering in email template inside gmail. Font location is also local as in case of luma theme.


texts:
I have a problem with the cart because it has nothing options.
I can share a image:

I don't know if it is a bug to magento 2.1.2 or what, because I don't touch this part but not works.
Thanks!


texts: Config file in payment section in magento2?

texts:
I have an extension that has some config fields in the payment section. The extension does not supply a payment method, I just want to have the settings in the Payment Methods section.

The system.xmllooks like this:

 <?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>

            <tab>sales</tab>
            <resource>Xxx_Fee::config</resource>
            <group id="fee_config" translate="label" type="text" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="1">
                 Fee Configuration
                <field id="fee_enabled" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                    Enable Cod Fee Functionality
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="fee_type" translate="label" type="select" sortOrder="11" showInDefault="1" showInWebsite="1" showInStore="1">
                    Fee Type
                    <source_model>Magento\Shipping\Model\Source\HandlingType</source_model>
                </field>
          </group>

      </system>
    </config>

So everything's fine until now. Now I want to have a default value, so I create config.xml.

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <default>
        <payment>
            <fee_config>
                <fee_enabled>1</fee_enabled>
<fee_title>CodFeeAmount</fee_title>
            </config>
        </payment>
    </default>
</config>

When I try to open the configuration, I see nothing and get the following error in system.log:

  Payment model name is not provided in config!

How to solve it ...


texts: Magento 2: Filter order collection by payment method

texts:
I need to filter order collection based on payment method. I tried the following:
$customerOrderCollection = $this->orderCollectionFactory->create()->addFieldToFilter('customer_id', $customerId)
                                                            ->addFieldToFilter('status', 'pending');
    /* join with payment table */
$customerOrders = $customerOrderCollection->getSelect()
                                              ->join(["sop" => "sales_order_payment"],
                                                      'main_table.entity_id = sop.parent_id',
                                                       array('method')
                                                )
                                              ->where('sop.method = ?',$paymentMethod );

But I am not able to apply getData() method on the above collection. I need to check if at least a single order exists based on above conditions
Is there a way to join collection and also get data?


texts: Invalid template file error on enabling Ajax Cart module

texts:
I have installed Magento 2.3.5 on my hosting and uploaded a a theme Ethan theme by magesolution. I am getting the following error on home page on enabling MGS AjaxCart module
1 exception(s):
Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file: 'MGS_AjaxCart::config.phtml' in module: 'MGS_AjaxCart' block's name: 'mgs.ajaxcart.config'
This a link to the error page I am getting
Any help would be appreciated.


texts: I want to add parent product to cart using child product id, it's configurable options in magento 2.1

texts:
I want to add parent product to cart using child product id, it's configurable options in.
Do like this

Get child id & using child id we can get parent product id.

Load the Configurable Attributes names of a product with it's(parent id). Then use In

  $childid='15';$rep=
  $obj->create('Magento\Catalog\Model\ProductRepository');
  $childObj=$rep->getById($childid);
  $aray[$att['attribute_id']]=$childObj->getData($attr->getData('attribute_code'));
  now we have only child product configurableoptions
  $params2=array();$params2['selected_configurable_option'] =
  $childid;$params2['super_attribute'] = $aray;$params2['qty'] = 1;
  $this->cart->addProduct($parentid,$params2); $this->cart->save();

Note : Added the content from the comments to clear information


texts: Where can I edit "X-UA-Compatible" to my Magento2 Store?

texts:
As I saw the source from the front end of the site.
I would like to edit

  meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"

It seems to me that there should be something like web.config but I cannot find a file.
Which file is suppose to be edited for X-UA-Compatible?


texts: How to add contact form on category page?

texts:
I have to add custom contact form on product listing page.For this i am adding in local.xml file.

<catalog_category_default translate="label">
    <reference name="root">
        <action method="setTemplate">
            <template>page/2columns-left.phtml</template>
        </action>
    </reference>
    <reference name="content">
        <block type="catalog/category_view" name="category.products" template="catalog/category/view.phtml">
            <block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">
                <block type="core/template" name="contactForm" as="contactForm" template="contacts/form.phtml"/>
            </block>
        </block>
    </reference>
</catalog_category_default>

But it is not displaying anything.


texts:
I have a native Magento 2.2. I added a static attribute for customer named ficalcode.

On the backoffice, no problem, I can update the attribute. From the frontend it's more complex.

I'm logged with customer #2, on the execute of my controller these line do not modify the fiscalcode :

 67     public function execute()
 68     {
 69         try {
 70             //$customer = $this->customerFactory->create()->load($this->customerSession->getCustomerId());
 71             $customer = $this->customerFactory->create()->load(2);
 72             $customer
 73                 ->setFiscalcode($this->getRequest()->getPost('fiscalcode'))
 74                 ->setCustomAttribute('fiscalcode', $this->getRequest()->getPost('fiscalcode'))
 75                 ->save();
 76

But if I change the id of the customer for 1 and if I'm still logged with customer #2, all is working :

 67     public function execute()
 68     {
 69         try {
 70             //$customer = $this->customerFactory->create()->load($this->customerSession->getCustomerId());
 71             $customer = $this->customerFactory->create()->load(1);
 72             $customer
 73                 ->setFiscalcode($this->getRequest()->getPost('fiscalcode'))
 74                 ->setCustomAttribute('fiscalcode', $this->getRequest()->getPost('fiscalcode'))
 75                 ->save();
 76

Does anyone know the reason?


texts:
Above is my cron setting from admin.
My email transactional emails suddenly stopped working couple of days back. it was delaying email sending since I upgraded to Magento version 1.9.2.3 since then I am facing this issue. I have Already Added AOE Scheduler and all my crons look fine. it was working but has suddenly stopped since a couple of days
I installed SMTP pro. but now my Emails are sent to spam except of inbox


texts: Removing various states/provinces from shipping but not billing address

texts:
I've searched all around and haven't been able to find a solution to this.

I'm on Magento 2.1.7 and need to remove the option for shipping to any province other than Ontario (Canada) from my check-out page. But at the same time I need billing addresses from other provinces to be accepted, just no shipments to anywhere other than Ontario.

Thanks in advance for the help!


texts: Adding default value for magento2 admin form select field

texts:
I am adding a select option with below code in my form

$fieldset->addField(
            'is_active',
            'select',
            [
                'label' => __('Status'),
                'title' => __('Status'),
                'name' => 'is_active',
                'required' => true,
                'options' => ['1' => __('Enabled'), '0' => __('Disabled')]

            ]
        );

Now I need to add default value as 'Enabled'. Adding below line not helping.

'value' => '1'

I checked in vendor/magento/framework/Data/Form/Element/Select.php, below code ( line #57) is having empty value.

$value = $this->getValue();

Dont know if I am missing something. Can someone help?


texts: How to add more Browse by sidebar blocks

texts:
At the moment in my 2 column website design, in my left sidebar i have the standard browse by category when there are sub categories, then once you have clicked on the sub category, i have nothing in my sidebar.

What i would like to do is add another browse by or sort by block for things like brand, price, length etc.

Whats the easiest way to do this?

I have added these properties as attributes.

I have looked around on the web but cant find much information, whether that's because there isn't or im not terming it correctly im not sure.

If you want more explanation please ask.

Thanks


texts:
Can we add specific product size to a different category?

For example if product a (sizes--s,m,l) is in category a. but I want only product a (size--l) in category b.


texts:
I've just applied the last 5 security patches to a client's site and now some of their 3rd party modules are misbehaving in the admin dashboard. I've fixed most of them but 2 in particular are vexing me.
Magestore PDF Invoice Plus and FME Percentage Pricing
When I click on the "Manage Templates" link (for PDF Plus) and "Manage Rules" (for Percentage Pricing) in the menu I get a screen with no content. The header, menu and footer are loading, there's no PHP errors and there's no grid.

The customer's support period has run out and he doesn't want to buy the extensions again. Any ideas on how to fix the blank grids?


texts: I have recently imported my products to my theme but now all the product descriptions are in  Title Case. How can I change it to normal sentence case? Can it be done in admin panel?


texts: Special Price With Configurable And Simple Products

texts:
I am adding a configurable product with some associated products.

In that configurable product I am entering both special price and old price. In that configurable product i have 4 associated product. But the thing is that 3 associated products have both special price and old price, and one contains only old price.

The result I am getting is that all associated products have both special price and old price.

But this result is wrong because 3 products have both special price and old price and one product have only old price.

How it that possible?


texts: Magento 1 - Convert Object into an array value

texts:
I was trying to get the information of tracking in the UPS. I got on of the method from the core (app/code/core/Mage/Usa/Model/Shipping/Carrier/Ups.php => method name getTracking($trackings)) that gives me the output that I want. But it's format in object form kind of as shown below.

So my question is how can I convert object in array?

Mage_Shipping_Model_Tracking_Result Object
(
    [_trackings:protected] => Array
        (
            [0] => Mage_Shipping_Model_Tracking_Result_Status Object
                (
                    [_data:protected] => Array
                        (
                            [carrier] => ups
                            [carrier_title] => United Parcel Service
                            [tracking] => 1Z90Y8A21294899248
                            [service] => UPS 3 Day Select
                            [shippeddate] => 20180910
                            [weight] => 6.00 LBS
                            [status] => Order Processed: Ready for UPS
                            [deliverydate] => 2018-09-10
                            [deliverytime] => 06:31:46
                            [deliverylocation] =>
                            [signedby] =>
                            [deliveryto] => US
                            [progressdetail] => Array
                                (
                                )

                        )

                    [_hasDataChanges:protected] => 1
                    [_origData:protected] =>
                    [_idFieldName:protected] =>
                    [_isDeleted:protected] =>
                    [_oldFieldsMap:protected] => Array
                        (
                        )

                    [_syncFieldsMap:protected] => Array
                        (
                        )

                )

        )

    [_error:protected] =>
)

I have already tried with the getData(), also (array) $obj but that's not working giving blank responce.


texts:
I sending email from one custom module so everything is working fine but If I change from , I am not getting emails.

 public function beforeSendMessage(\Magento\Email\Model\Transport $subject)    {
    $message = $subject->getMessage();
    $message->setFrom(array('email' => 'someemail@email.com', 'name' => 'SenderName'));`

}

I tried Sales Emails going via wrong email address magento 2.2.x but doesnt help


texts: How to add custom URLs to sitemap in Magento 2?

texts: I need to add the custom links to sitemap.xml in Magento 2. How can I do this?


texts: Some product categories keep loading without results

texts:
I am uncertain what is happening over here, but it is realy bugging me.
We installed the module Tierprices from MagPleasure (version 1.2.2) on our website, but it seems to load some of our product categories endless.

We disabled and enabled all third party modules to see if this works.
But the results remain the same.
This is what we have tried to make it work:
1. Contacted MagPleasure about this bug (they fixed a lot but couldn't find the issue about this one).
2. Disabled all modules one by one via app/etc/all xml files.
3. Disabled all modules via database.
4. Edited a couple of errors in the log (nothing to worry about and nothing had to do anything with the tierprices).
5. We even changed template to default.

But all for naught.
I hope someone knows anything about this bug/error (nothing specific is reported in the logs) and would mind sharing their experience.
If I find out about anything I will ofcourse report back.
Thanks for the help.

This is one of our endless loading pages: www.dekabelexpert.nl/testlocation/utp-stp-sftp/patchkabels.html


texts: Getting order/invoice emails when paying with paypal

texts:
I am using Magento 1.9.2.4 and the payment method "Paypal Website Payments Standard (Includes Express Checkout)" with live data.

I also configured that when Emails are being sent that I get the order and invoice emails as BCC.

Unfortunately only the buyer gets an email.

Could you help me solve the issue? And maybe explain why I don't get e copy of the mail?


texts: Magento - By default add product to website / add default tax class

texts:
I have a multi-language website with 2 websites.

I would like these checkboxes to be checked by default.

How can i set this up?

And how can i have a tax class be selected by default?

I have magento 1.8.2CE

I would like this to be checked when creating a product, not in a bluk update.


texts:
I am not sure if this question has been asked before but I badly need to know if AB testing can be set up for Magento 2.3.1 community edition. I know it can be done for Magento 2 enterprise edition but currently we are using the community edition.
Thank you in advance


texts:
In My Magento website, There are around 1800 URLs which follow this pattern

www.mywebsite.com/(subcategory)/brands-1/(brand)
These need to be redirected to www.mywebsite.com/brands-1/(brand)

Can any one help me how to implement this?

Thanks,
Kumar


texts: Third level categories Url is not working in magento 2

texts:
Shop
   Colors
       Rushmore
       Boston Mill
       Little Cottonwood

This my category structure. But child category URLs are not working.

  Link: mysite.com/shop/colors/rushmore.html


texts: Invalid From Key please refresh the page issue when product is addto cart Aws server using Magento 2.3.5p1?

texts:
I am using AWS server for Magento 2.3.5p1 installation.Everything is working fine when i use Mozilla Firefox.The issue is with Chrome browser.I am using php version 7.2 .
I have also increase the the following values to
max_input_vars = 200000
max_input_time = 600
max_execution_time = 3600

in php.ini file and restart the Apache.
Then also delete this from database.
DELETE FROM core_config_data WHERE path='web/cookie/cookie_domain';
DELETE FROM core_config_data WHERE path='web/cookie/cookie_path';

I have also checked the cookies configuration from admin and set to Cookie Restriction Mode to No.
Then i removed var and generated folder then upgrade and compile  then code


texts: magento 2.3.3 konckout translation doesn't work

texts:
Hello I have the official stripe module for magento 2 which is not trasnlated correctly.
This is the piece of code:

I created the csv file into the i18n directory but the text is not translated.
I take a look into the js-translation.json file and the string it is not there.
If I manually put the string into that file it is translated. It seem that the process to insert the string into that file doesn't work.


texts: Magento SOAP v1 - updating product by SKU

texts:
I want to update product by it's  SKU. I've found that it is possible to do with following code:

$client->call($sessionId, 'catalog_product.update', array($product_sku, array(
            'stock' => $stock)), null, 'SKU');

And... it doesn't work.

What am I doing wrong ?