texts: In Magento 2, How to apply Discount code to order

texts: In Magento 2, I am Creating order programmatically using this tutorial. I need to apply Discount code(Cart) to order. I am using this link. But not working. Any other solutions worked out.


texts:
Creating a theme for a site I am working on and would like to know what would be the best solution for my problem.

On the home page I would like a full width slider under the header ( I have the header all built). Under the slider I would like a left column which has the navigation for product categories and the main body to the right of that with Sale and Clearance items product view.

I'm not sure if possible but should I set the home page as a 2 column and add the slider in or make the homepage a one column and do it that way.

If I do do it one of these ways what would be the best way to implement the slider.

I'm using CE lastest version the slider I'm looking at implementing is http://www.jssor.com/demos/simple-fade-slideshow.html

I'm also using the bootstrap framework for the theme as well.

Any input would be great, thanks


texts: Apache Configuration. Magento Your web server is configured incorrectly

texts:
Right now I am facing some problems with my web server running Magento CE 1.9.2.1. In adminhtml I do get the security message, that says my web server seems to be configured incorrectly.

I’ve done almost everything to solve the problem. The answer of this post seems to be the most common solution for everybody  (Apache Configuration local.xml warning)

I’ve checked the .htaccess files in root, app, var, lib etc. and everything will be blocked correctly with a 403 by .htaccess if one tries to get those data through the webserver (like BASE-URL/app/etc/local.xml). I do also get a new entry in my apache log that says, that the access was (successfully) denied by server configuration.

In the default server configuration, vhost configuration and .htaccess I made sure, that I entered

Options FollowSymlinks
AllowOverride All
for the <Directory "srv/www/htdocs"></Directory>

My file permissions were set to

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
chmod 550 mage
chmod 550 cron.sh
chmod 550 app/etc/local.xml (also tried 644 and 600)
chmod 550 app/etc/config.xml (also tried 644 and 600)

I do still get this security message in my backend. Does anybody know a solution for this problem?


texts:
Today i uploaded my Magento Project to my Domain everything works fine but when i try to open configration from admin its show this error

  Fatal error: Class 'Magestore_Magenotification_Helper_Data' not found
  in /home/ashoocom/public_html/Magento/ashoo/app/Mage.php on line 547

after editing Magestore_Magenotification.xml in /app/etc/modules i.e changed from true to false

<?xml version="1.0"?>
<config>
    <modules>
        <Magestore_Magenotification>
            <active>false</active>
            <codePool>local</codePool>
        </Magestore_Magenotification>
    </modules>
</config>

then i am able to open configration from admin panel

now first off all i don't know that why its being used is it fine to leave it false??
if not then what should i do?
in addition i don't have config.xml file in my theme as i searched this problem on google and many people suggested to make changes in config.xml and local.xml

please help


texts: magento 1.9.3.2 backend reset password error

texts:
I upgraded from magento1.9.3.0 to 1.9.3.2, the site after the reset password can not click.
The chrome browser displays an error。

  Refused to execute script from
  'http://localhost/js/index.php/x.js?f=prototype/prototype.js,prototype/…s,mage/adminhtml/events.js,mage/adminhtml/form.js,scriptaculous/effects.js'
  because its MIME type ('text/html') is not executable, and strict MIME
  type checking is enabled. captcha.js:25 Uncaught ReferenceError: Class
  is not defined
      at captcha.js:25 (anonymous) @ captcha.js:25 (index):40 Uncaught ReferenceError: varienForm is not defined
      at (index):40 (anonymous) @ (index):40

、


texts: Save 2 objects with a reference to each other in one transaction

texts:
for some security reasons I try to save 2 custom objects (different models) into the database, via:

try {
    $transaction = Mage::getResourceModel('core/transaction')
        ->addObject($object1)
        ->addObject($object2);
    $transaction->save();
} catch (Exception $e) {
    echo $e->getMessage();
}

The problem is, that the database table of $object2 contains a reference id to $object1, but this is auto incremented in $object1 and unknown at this point.

To visualize my problem:

database table of $object1:

 entity_id  |  ...  |  ...
 -----------------------------
 1234       |  ...  |  ...

the database table of $object2 should looks like this:

 entity_id  |  object_1_id  |  ...
 ---------------------------------
 5678       |  1234         |  ...

How can I get the auto incremented id of $object1 and save within the same transaction to $object2 table? Is it possible? Makes that sense?

Thanks for help.


texts:
One Magento Installation
Two websites on subdomains
sub1.xxxxxxx.com
sub2.xxxxxxx.com

Customer1 subscribes to sub1.xxxxxxx.com.
Email address is in database and customer can login with the same credentials to sub2.xxxxxxx.com.

In Store Email Addresses, sender email address are different in each website for “CustomerSupport” sender name. eg sub1@xxxxxxx.com and sub2@xxxxxxx.com

When Customer1 tries to login to sub2.xxxxxxx.com and forget his password, Password Reset Confirmation email is coming from sub1@xxxxxxx.com instead of sub2@xxxxxxx.com and mail comes in spam folder.

Any suggestions ?


texts: I am getting fatal error helper data not found

texts:
Fatal error: Uncaught Error: Class 'Bms_Banners_Helper_Data' not found in /var/www/html/app/Mage.php:547

But there is no Bms_Banners module

please help


texts: Magento2: On Custom page layout header search is not working

texts:
I have created a new page custom page layout with a custom header and footer.
Here is the code:
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
    <update handle="1column"/>
    <referenceContainer name="header.panel" >
        <referenceBlock name="top.links" remove="true" />
        <block class="Magento\Customer\Block\Account\Navigation" name="top.links.new" template="Magento_Theme::html/header-new.phtml"/>
    </referenceContainer>

    <referenceContainer name="footer" >
        <referenceBlock name="copyright" remove="true" />
        <block class="Magento\Theme\Block\Html\Footer" name="copyright-new" template="Magento_Theme::html/copyright-new.phtml"/>
    </referenceContainer>
</layout>

But with this, the search and cart button html is not loading
Here is the code
$block->getChildHtml('topSearch');
$this->getChildHtml('minicart');

Both are not working for a custom page layout with a new header and footer.
Anyone have an idea for this.
Thanks in advance.


texts: Magento 2.2 admin domain and front domain is different so loaded iframe

texts:
We have 2 domain. and set into magento 2.2 as

Front-Domain : abcxyz.com

Admin-Domain : test.com

Admin section called one iframe from front-end.

Means: on admin call URL of the iframe is

abcxyz.com/productid/ID

Getting Error is on a console.

  Refused to display 'abcxyz.com/productid/ID' in a frame because it set
  'X-Frame-Options' to 'sameorigin'.

Can you please help me how to solve it.


texts: Adding custom attribute to checkout order summary not reflecting on payment page

texts:
I wanted to add product flavor to order summary. I achieved this in following way.

Files:

Registration.php : app\code\Sejal\Flavor\registration.php
di.xml : app\code\Sejal\Flavor\etc\di.xml
module.xml : app\code\Sejal\Flavor\etc\di.xml
ConfigProviderPlugin.php : app\code\Sejal\Flavor\Plugin\ConfigProviderPlugin.php
details.html : app\design\frontend\Vendor\themename\Magento_Checkout\web\template\summary\item\details.html

registration.php

<?php

\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Sejal_Flavor',
    __DIR__
);

di.xml

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Checkout\Model\DefaultConfigProvider">
        <plugin name="AddAttPlug" type="Sejal\Flavor\Plugin\ConfigProviderPlugin" />
    </type>
</config>

module.xml

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Sejal_Flavor" setup_version="1.0.0">
    </module>
</config>

ConfigProviderPlugin.php

<?php

namespace Sejal\Flavor\Plugin;

class ConfigProviderPlugin extends \Magento\Framework\Model\AbstractModel
{

    public function afterGetConfig(\Magento\Checkout\Model\DefaultConfigProvider $subject, array $result)
    {

        $items = $result['totalsData']['items'];

        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        for($i=0;$i<count($items);$i++){

            $quoteId = $items[$i]['item_id'];
            $quote = $objectManager->create('\Magento\Quote\Model\Quote\Item')->load($quoteId);
            $productId = $quote->getProductId();
            $product = $objectManager->create('\Magento\Catalog\Model\Product')->load($productId);
            $productFlavours = $product->getResource()->getAttribute('flavors')->getFrontend()->getValue($product);
            if($productFlavours == 'No' || $productFlavours == 'NA'){
                $productFlavours = '';
            }
            $items[$i]['flavor'] = $productFlavours;
        }
        $result['totalsData']['items'] = $items;
        return $result;
    }

}

details.html

Copied vendor\magento\module-checkout\view\frontend\web\template\summary\item\details.html in theme and added

below

It reflected on checkout shipping information page. However, I can not see flavor on payment page.


texts: Ultimate Multi Flat Shipping extension, stop rounding price

texts: I have installed Ultimate Multi Flat Shipping extension to my magento application. I want to stop rounding price.As example when I enter 3.325,it saved as 3.33. I want to stop this and want to keep it as 3.325. How can I do this?


texts: Somebody suggested that I create a custom even within an observer to stop my first observer from holding up the event i.e. the event should occur whether or not the processes inside the observer have completed. It seems a strange idea. I don't know if it will work and could not find any thing on this method. Is there another way to free an event from its observer? Can they both go on simultaneously? I ask this knowing event observers are synchronous.


texts: Hipay on multistore multiple currency/language issue

texts:
I'm using hipay on my magento 1.9. Indeed, I have 2 sub account on hipay :
the first one uses french and euro, the second one uses english and pound.
The problem is when a client choose english and euro / frenchand pound
and try to final checkout it redirects to empty cart.
Do you have any clue?


texts:
I recently installed magento 2.1.6 and I was trying to view the php info page at www.mywebsite.com/phpinfo.php but I'm getting the 404 error but the file is in the root directory where it is supposed to be and I'm using nginx and the nginx user has ownership of the entire magento directory. I ran the chown command just to be sure. I'm not using a cdn or anything fancy.

My full setup is varnish + redis + nginx and I restarted all of them just to be sure. I'm also using php 7.0

What do I need to do to view the php info page?

  UPDATE: I'm getting these errors in my nginx log but I have nothing in
  my nginx settings preventing this so I'm thinking it is an htaccess
  file issue

2017/05/08 15:01:48 [error] 17024#0: *998370 access forbidden by rule, client: 127.0.0.1, server: website.com, request: "GET /phpinfo.php HTTP/1.1", host: "website.com"

  UPDATE #2: I changed the htaccess rules and I'm not getting the 404
  error anymore but it is redirecting me to the website with the sid
  added to the end of the url so is there anyway I can turn off this
  redirect for this file only?


texts: I save my cc values in additional information now I want to get this information in js. How can i get this in js in Magento 2?


texts:
Giving the whole backsotry.

I upĺoaded all files from version 2.1.3 using git to a remote Ubuntu server and I got the following error

Vendor autoload is not found. Please run 'composer install' under application root directory

I googled a bit and found this http://www.technetexperts.com/web/magento-2-installation-guide/

After that, it started appearing the error pelago/emogrifier v0.1.1 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system, which lead me to this page https://stackoverflow.com/questions/32943762/composer-install-issues. I installed all extensions following these steps and the magento-check.php that I found somewhere.

After all that, I get error 500 on my home page and have no idea on how to proceed. Does anyone know what might be happening? Am I missing something?


texts: Magento 2 order confirmation email not sent

texts:
I'm working on a clients' store, and face a problem with no order confirmations being sent.

The following error is logged in system.log:

[2019-06-11 11:53:04] main.ERROR: Invalid address format [] []

Looking for that error, I see that it is generated here:

Zend\Mail\Address.php

public static function fromString($address, $comment = null)
    {
        if (! preg_match('/^((?P<name>.*)<(?P<namedEmail>[^>]+)>|(?P<email>.+))$/', $address, $matches)) {
            throw new Exception\InvalidArgumentException('Invalid address format');
        }

Address used:
Firstname Surname
Street 1
Village, 4444GH
Nederland
T: 1234567890
info@modl-design.com

What is the exact issue? Im not the best at reading Regex so looking for the problem is hard in this case.


texts: Magento 2- Product list sorting issue for alphanumeric product name

texts:
I am facing problem in product list sorting by product name if the name is alphanumeric, Such as "Facewash, 50ml", "Facewash, 200ml" and "Facewash, 500ml".

Expected result:-
"Facewash,50ml", "Facewash,200ml" and "Facewash, 500ml".

Actual Result:-
"Facewash,200ml", "Facewash, 5ooml", "Facewash,50ml".

Below are the screenshots of configuration settings and the frontend list page.

Product List page.

Please suggest what I suppose to do.


texts: Display prices in different currencies according to the store selected but for invoices always show prices in AUD in magento 2

texts:
I have created multistore functionality in Magento 2 and its working fine.
The invoice generated after payment shows price according to the selected store currency, for example, if we select Canada store then generated invoice will show prices in Canadian Dollar, but I want to show prices in default currency i.e AUD
How this can be done?


texts: How to change the order number's prefix of a specific store, Magento2

texts:
Magento2.2.4, php7;

I have multiple stores where I want each one of them to have a different order number's prefix. Is there anyway to realize that?

Thanks!

Edit: I'm trying to avoid using raw queries, any other (safer) way ?


texts:
In Magento_Catalog/layout/catalog_category_view.xml I tried to change it's layout from 2columns-left to 1column.

I did override to by 1column but overriding layout didn't show any effect to the structure. Can you please help me about this.

Thank You in advance.


texts: Set data to custom field in product not working

texts:
I added a custom field to product module which is getting a multi-select list.
When i'm using SetData to get data added to my table for specified product, it is not working.
$product = $observer->getEvent()->getProduct();

if ($product instanceof \Magento\Catalog\Model\Product) {
    $product->setData("custom_field", '1,2');
}


texts: Magento2 : Remove decimal from quantity in product grid in magento admin

texts: I want to remove .000 after quantity in admin grid is there any way to remove decimal from quantity column.


texts:
Can someone tell me what I have to do to fix it ?

local:/data/web/public/app/code/community:/data/web/public/app/code/core:/data/web/public/lib:.:/usr/share/php:/usr/share/pear')  in /data/web/public/lib/Varien/Autoload.php on line 94
2015-12-30T08:55:04+00:00 ERR (3): Warning: include(Composer\Command\Helper\DialogHelper.php): failed to open stream: No such file or directory  in /data/web/public/lib/Varien/Autoload.php on line 94
2015-12-30T08:55:04+00:00 ERR (3): Warning: include(Composer\Command\Helper\DialogHelper.php): failed to open stream: No such file or directory  in /data/web/public/lib/Varien/Autoload.php on line 94
2015-12-30T08:55:04+00:00 ERR (3): Warning: include(): Failed opening 'Composer\Command\Helper\DialogHelper.php' for inclusion (include_path='/data/web/public/app/code/local:/data/web/public/app/code/community:/data/web/public/app/code/core:/data/web/public/lib:.:/usr/share/php:/usr/share/pear')  in /data/web/public/lib/Varien/Autoload.php on line 94

Code in Autoload.php line 94 : return include $classFile;

   public function autoload($class)
{
    if ($this->_collectClasses) {
        $this->_arrLoadedClasses[self::$_scope][] = $class;
    }
    if ($this->_isIncludePathDefined) {
        $classFile =  COMPILER_INCLUDE_PATH . DIRECTORY_SEPARATOR . $class;
    } else {
        $classFile = str_replace(' ', DIRECTORY_SEPARATOR, ucwords(str_replace('_', ' ', $class)));
    }
    $classFile.= '.php';
    //echo $classFile;die();
    return include $classFile;
}


texts:
I am building my first ever site with magento. And I'm trying to create a popup with the login form in it. How can I load the content of the login page in a block or in a template?

Thank you very much for your help


texts: Where can I find Magento Connect Manager for Magento 1.9.1

texts: Please tell me How to go on Magento Connect Manager. I want to add a Banner Slider on Magento 1.9.1.0


texts: Fetch products from several SKUs where their price don't match from a list

texts:
I have a predefined list of SKUs with prices in an array, and I would like to return the products within Magento that matches those SKUs but not the price. As a quick solution, I have constructed an SQL query that does this (attribute 77 is the product price):

SELECT product.sku FROM catalog_product_entity product
INNER JOIN catalog_product_entity_decimal price
ON product.entity_id = price.entity_id AND price.attribute_id = 77
WHERE (product.sku = 'FR050866' AND price.value != 132.2)
OR (product.sku = 'FR050869' AND price.value != 55.06)
OR (product.sku = 'FR230116' AND price.value != 210.93)
OR (product.sku = 'FS010048' AND price.value != 37.63)
OR (product.sku = 'FS010049' AND price.value != 13.44)

I then retrieved the matching SKUs as an array, and plugged it into the SearchCriteria:

// Fetch the SKUs as an array
$product_skus_to_amend = $connection->fetchCol($sql);

// Find the products by those SKUs
$this->_filterGroup->setFilters([
    $this->_filterBuilder
     ->setField('sku')
     ->setConditionType('in')
     ->setValue($product_skus_to_amend)
     ->create()
]);

$this->_searchCriteria->setFilterGroups([$this->_filterGroup]);
$products = $this->_productRepositiry->getList($this->_searchCriteria);

Is there a better method of doing this that doesn't rely on creating my own SQL query, thus potentially only requiring one database call, instead of the two using the method above? I've been trying to figure this out using the Magento\Framework\Api\SearchCriteriaInterface or Magento\Framework\Api\SearchCriteriaBuilder classes, but to no avail. Every guide I have found, which included Magento's Documentation,  constructs queries like the below:

WHERE (x OR y) AND (a OR b)

However I can't find anything that constructs the below:

WHERE (x AND y) OR (a AND b)

Any help will be greatly appreciated!


texts:
I'm using the Magento 2.1.6 and I want to apply the patch CE-MAGETWO-67805.patch.

How can I apply the *.patch files?


texts: Native Magento search in an autocomplete like dropdown

texts:
On my site i have an input textbox where you can enter some searchtext. The results of this search should show up in a dropdown below the textbox (autocomplete like).

When i hit enter in the textbox Magento searches like this:

../catalogsearch/result/?q=some+searchtext

I want the dropdown results to be the same as what Magento gives back with the above searchmethod.

I tried with following code:

        $_query = Mage::helper('catalogsearch')->getQuery();

        $_productCollection = Mage::getModel('catalogsearch/fulltext')->getCollection()
        ->addSearchFilter($_query)
        ->addAttributeToSelect('name')
        ->addAttributeToSelect('description')
        ->addAttributeToSelect('price')
        ->addAttributeToSelect('short_description')
        ->setPageSize($pagesize)
        ->load();

The problem here is that it only works on searchcriteria that has already been processed by the first method (by hitting enter in the textbox).

Can anyone point me out how Magento manages this search? I know that the ResultController handles this method in a way, but i can't figure it out.

Thank you in advance.

UPDATE:
Turns out to be that the query needed to be prepared first

        $_query = Mage::helper('catalogsearch')->getQuery()
             ->prepare();

        $_productCollection = Mage::getResourceModel('catalogsearch/fulltext_collection')
             ->addAttributeToSelect('name')
             ->addAttributeToSelect('description')
             ->addAttributeToSelect('price')
             ->addAttributeToSelect('short_description')
             ->addAttributeToSelect('thumbnail')
             ->addSearchFilter($_query)
             ->setPageSize($pagesize);


texts: Magento 2.3 - custom import module with magmi integration

texts:
I'm trying to write a magento module for importing products from a csv file. I would like to use Magmi to achieve the import. I tried the following code but it doesn't work:

   namespace My\Module\Controller\Adminhtml\Home;
  require_once(dirname(__FILE__) . "/../../../../../../../lib/magmi/inc/magmi_defs.php");
  require_once(dirname(__FILE__) . "/../../../../../../../lib/magmi/integration/inc/magmi_datapump.php");

  class Import extends \Magento\Backend\App\Action{

     public function execute()
    {

        // getting data from a casv file

        for ($items as $item){
           $dp = Magmi_DataPumpFactory::getDataPumpInstance("productimport");
           $dp->beginImportSession("default", "xcreate");
           $item = "product field array";
           $run = $dp->ingest($item);
           $dp->endImportSession();
        }

    }

}

I receive errors on the Magmi classes "class not found". I tried also different code but the only way a think it can works is using class file named, e.g. Datapump.php with e defined class named Datapump. But I cannot rewrite all files of magmi to make it works, so maybe I'm doing something wrong.

I hope someone of you knows how to do this.

Thanks


texts:
I can't find where this error comes from my custom child theme.

  Error: Script error for: priceBox

  http://requirejs.org/docs/errors.html#scripterror

  Error: Script error for: jquery/jquery-storageapi

  Error: Script error for: ko

  http://requirejs.org/docs/errors.html#scripterror

Nb: I also noticed that the error is present in all the themes even the Magento/blank or luma !

I created a child theme from Magento/blank parent <parent>Magento/blank</parent>.
I cleaned the cache, pub/static, var/view_preprocessed/ except .htaccess,
I deployed the static content php bin/magento setup:static-content:deploy -f


texts:
I just created the magento site and everything is working properly except Email system :(
Magento is not sending emails when customer place order and not even when i send email from orders.

  I don't know what happened  with it  i tried everything on magento
  forum i also installed cron jobs and config email in system
  configuration but now luck :(  Any help would be really appreciated.


texts:
I have a page that I listed products, that's it. Its kind of catalog/view.phtml clone. Just included app/Mage.php.

In this page I use

Mage::getSingleton('core/session')->getFormKey();

but it's different to other page's formKey

What am I doing wrong?


texts: Override Attribute Value on Duplicated Product

texts:
We're using the catalog_model_product_duplicate to override some of the attribute values upon duplicating a product. However, this only works on the global value:

$newProduct = $observer->getEvent()->getNewProduct();
$newProduct->setCustomAttrNewValue('fixed_value');

If I add a store ID to the new product, still, the global value and not store specific value is modified:

$newProduct = $observer->getEvent()->getNewProduct();
$newProduct->setStoreId($_store)->setCustomAttrNewValue('fixed_value');

setStoreId() has no effect. Is there a way I can override the product attribute value if there's a store selected?


texts: How does magento encrypt credit card numbers?

texts:
I have been playing around with the Credit cards (saved) payment option and noticed it encrypts the credit card numbers. What algorithm is it using? What are the specifics? I quite interested to see what method they are using.

Note: I am not going to use the Credit card (saved) payment option on my live site. I understand it is a huge security issue. I am just curious about how strong of encryption it uses!


texts: Dashboard links not showing my Custom Form in Magento 2

texts:
I am created a New Link in Dashboard Navigation Panel and it is showing and working fine. But when I navigating the dashboard links are not showing in my form.

See below pic My Custom Link in Dashboard page.

When I navigating it is not showing Dasboard links.

for this I am written below code.

view/frontend/layout/customer_account.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

        <referenceBlock name="customer_account_navigation">
            <block class="Magento\Framework\View\Element\Html\Link\Current" name="demo-link">
                <arguments>
                    <argument name="path" xsi:type="string">custompagelink</argument>
                    <argument name="label" xsi:type="string">Demo Link</argument>
                </arguments>
            </block>
        </referenceBlock>

</page>

Controller/Index/Index.php

<?php
namespace Test\CustomLink\Controller\Index;

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

    /**
     * @param \Magento\Framework\App\Action\Context $context
     * @param \Magento\Framework\View\Result\PageFactory resultPageFactory
     */
    public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Magento\Framework\View\Result\PageFactory $resultPageFactory
    )
    {
        $this->resultPageFactory = $resultPageFactory;
        parent::__construct($context);
    }

    /**
     * Default customer account page
     *
     * @return void
     */
    public function execute()
    {
        return $this->resultPageFactory->create();
    }
}

view/frontend/layout/custompagelink_index_index.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">

        <referenceContainer name="content">
            <block class="Test\CustomLink\Block\CustomPage" name="custompage" template="custompage.phtml" />
        </referenceContainer>

</page>

Block/CustomPage.php

<?php
namespace Test\CustomLink\Block;

class CustomPage extends \Magento\Framework\View\Element\Template
{

}

view/frontend/templates/custompage.phtml

Custom Form

Any help on this?


texts: Magento 2: Remove shipping address from customer account view order

texts:
I need to override this in my custom theme -

  /vendor/magento/module-sales/view/frontend/layout/sales_order_view.xml

I remove or commented in core files directly, this block line -

<block class="Magento\Sales\Block\Order\Info" as="info" name="sales.order.info" after="sales.order.view"/>

then it is working fine but when I override this XML in my custom theme then it is not working.

/app/design/frontend/Custom/theme/Magento_Sales/layout/sales_order_view.xml


texts: How to speed up a registration of various products using API Magento SOAP 1?

texts:
I am registering more than 20 thousand products via API soap Magento 1.
But it is taking 5 seconds to register 1 product!

  Is there a way to streamline this procedure?


texts: Magento : Multiple Taxes for different Simple Products associated with a Single Configurable Product

texts: I have two simple products associated with a configurable product. However, each of the simple product has a different tax rate applicable to it. It appears Magento picks the tax class of the configurable product and applies it to all simple products. Can I have Magento pick the Tax Class / Tax Rate of the simple product instead?


texts: Moving header account dropdown - CE 1.9.1

texts:
I'm working on some fairly minor changes to the default rwd 1.9.1 theme.

I've created my own package and theme, and modified header.phtml by copy and pasting in order to move Search, Account and Cart into the top nav bar (ie the header-language-container.) So far so good!

As I've moved the buttons around my layout around by editing the controlling CSS, I've noticed that while the mini cart will follow along wherever the cart button goes, the account dropdown stays resolutely put.

I've compared the css positioning of #header-cart.skip-active and #header-account.skip-active and cannot find any glaring difference. What is controlling the position of this menu?

#header-account.skip-active {
    @include menu;
    display: block;
    position: absolute;
    z-index: 200;
    top: 40px;
    right: 115px;
    width: 200px;
}

#header-cart.skip-active {
  @include menu;
    display: block;
    position: absolute;
    z-index: 200;
    top: 40px;
    right: 0;
    width: 320px;
    background: white;
}


texts: Magento 2.3 | Display specific categories on "list" mode rather than "grid"

texts: Is there a way to display specific categories on list mode rather than the usuall grid mode. A few categories of mine would need that due to the product standards and the used short_description within them.


texts: How to introduce a new type for widget parameter in Magento2?

texts:
I am working on an extension which offers custom widgets that include wysiwyg editor and image fields:

<widget id="masonry_category" class="MyCompany\Module\Block\Widget\Category" is_email_compatible="true">
Masonry: Category
<description translate="true">Category Image with Link</description>
<parameters>
    ...
    <parameter name="featured_image" xsi:type="image" visible="true" required="false">
        Category Image
    </parameter>
</parameters>

However, as far as I can see, we are not allowed to use these types:

  Element 'parameter', attribute
  '{http://www.w3.org/2001/XMLSchema-instance}type': The QName value
  'image' of the xsi:type attribute does not resolve to a type
  definition.

I see some rules for widgets in Magento_Widget:etc/widget.xsd, but I am not sure how would I go about extending this. Unfortunately, the official documentation didn't help me to figure this out.

BTW, one very weird thing about this: I don't see these errors on my local environment (with development mode turned ON + PHP mode for displaying all errors). And my types (editor and image) are working fine. I run into trouble as soon as I deploy the code to our staging environment, which doesn't make sense to me.


texts:
The question which I am asking is a bit complex. I didn't get any idea how to achieve this in Magento. I am developing a Jewellery Shop. Base product is Gold and Diamond jewellery. So what I want is instead of setting prices for individual products I want to apply a formula. I will set a rate of Gold and Diamond. Then will create the products made of Gold and Diamonds and set their weights individually. So the selling price of those products would be Rate x Weight = Item Selling Price.

Any one is having the answer please help me.


texts: Redirect to customer account dashbaord to change password

texts:
In one of my project, there is requirement of redirect the customer to his/her account to dashboard for changing the password even after click of any links. Actually the customer password is being expired after 30 days.

So, customer can login with the old password even after 30 days but he/she can't browse any thing without changing his/her password.

So, problem is how can we redirect customer to the customer account dashboard change password screen after login and even after click of any links.

Any suggestions on fixing the issue?


texts: Would Magento handle multidomain e-shop with different skins but the same products?

texts:
Would Magento be able to provide system for

few e-shops
sharing the same products (the same info about products)
but (maybe) different pricing for some of them
different shipping based on the country where the warehouse is
on the other hand I will start operating from one country so I will have one 1 warehouse. So I want to have one system that would track how many items are on stock.
but the whole system would run on different domains like shop1.com, some_other_shop.com.au and the_best_shop_ever.net
different type of account for 'normal' user and resellers with different pricing, bulk discounts etc.

Thank you for any direction ...


texts:
I tried using a Adobe Typekit font with the following method. I add this to my default_head_blocks.xml inside my <head> tag:

<script src="https://use.typekit.net/oti3nzu.js" src_type="url"/>
<script src="js/typekit_loader.js"/>

the javascript file looks like this:

try {
Typekit.load({
    async: true
    });
}catch(e){}

Then, in <theme_dir>/web/css/source/_variables.less I changed the font name to this:

//  Fonts
@font-family-name__base: 'niveau-grotesk';
@font-family__base: @font-family-name__base, @font-family__sans-serif;

Now, when I deploy my static content and reload the site (cache cleared) the font isn't applied. When I check the sourcecode I see this:

body {
color: #333;
font-family: "niveau-grotesk", 'Helvetica Neue', Helvetica, Arial,  sans-serif;
font-style: normal;
font-weight: 400;
line-height: 1.42857143;
font-size: 1.4rem;
}

The only thing I can think of that goes wrong is that in _typography.less it says:

.lib-font-face(
    @family-name: @font-family-name__base,
    @font-path: '@{baseDir}fonts/opensans/light/opensans-300',
    @font-weight: 300,
    @font-style: normal
);

So the font-path is still the one that leads to opensans, it is just named differently in CSS now because of my changes inside the _variables.less file, right? But what should I put as path? I mean it's an online font and there is no path available to an actual font file.

What should I do?


texts: Magento 2.3.2 google shopping ads channel have keep uploading product feeds after uninstall by composer

texts:
Do you know how to uninstall this module completely with database?
or How I can stop using google content api?

and I noticed that google merchant center account created within installing process of this extension become  a sub account and it is not able to close this account without permission of main account.


texts: Magento 2 : Add a new input field in custom checkout step

texts:
I want to add new checkout step in magento 2.1 checkout page.

After following link provided by Magento (http://devdocs.magento.com/guides/v2.0/howdoi/checkout/checkout_new_step.html) that works fine.

However, I would like to add a new step having a new input form on a checkout page. I'm still stuck on it.

Here it's the screen shot i've got an output

Can u please help me anyone to do this? Thank you


texts:
I need to figure out a method to check whether a coupon code is valid or not and add this method to a boolean.  I have a few cases as to why:

1.controller is offered a valid coupon code

2.controller is offered an invalid coupon code

3.controller is offered no coupon code and this will generate coupon code removal functionality.

If(valid){
    coupon is added to order, ajax response (1) is prepared
}
elseif(!valid){
    ajax response (2) is prepared
}
else{
    coupon is removed from order, ajax response (3) is prepared
}

TLDR:  How do I check whether a coupon code is valid or not?


texts:
I'm debugging an extension that allows recurring Paypal payments in Magento 1.9, and I've found a major issue with it--if a customer has placed a subscription order in the past, the Magento's API does not request a new billing agreement id from Paypal when placing the order. Instead, it looks in the 'sales_billing_agreement' table, and if it finds an active billing agreement, it omits the 'BILLINGTYPE' of 'MerchantInitiatedBilling' from the SetExpressCheckout call.

It does this here, in Mage_Paypal_Model_Express_Checkout, where needToCreateForCustomer($this->_customerId) returns false if the number of rows with active status found in the 'sales_billing_agreement' table for the customers ID is greater than zero:

protected function _setBillingAgreementRequest()
{
    if (!$this->_customerId || $this->_quote->hasNominalItems()) {
        return $this;
    }

    $isRequested = $this->_isBARequested || $this->_quote->getPayment()
        ->getAdditionalInformation(self::PAYMENT_INFO_TRANSPORT_BILLING_AGREEMENT);

    if (!($this->_config->allow_ba_signup == Mage_Paypal_Model_Config::EC_BA_SIGNUP_AUTO
        || $isRequested && $this->_config->shouldAskToCreateBillingAgreement())) {
        return $this;
    }

    if (!Mage::getModel('sales/billing_agreement')->needToCreateForCustomer($this->_customerId)) {
        return $this;
    }

    $this->_api->setBillingType($this->_api->getBillingAgreementType());
    return $this;
}

The problem with this is that, if a customer cancels a billing agreement through their Paypal account, that billing ID is no longer valid and Paypal will reject future payments that attempt to use this billing ID. However, Magento is not notified that the billing ID has been invalidated and continues to assign it to new orders.

That means customers who cancel a subscription through their Paypal accounts cannot be charged for any current subscriptions or future sign ups.

Why would Magento set things up this way? Is this just a bug, and will I cause any problems if I create a model rewrite that eliminates this check?


texts: How can i change "Create an Account" position

texts:
i am new at Magento.
How can i do this

How can i do this


texts: After Upgrade magento 2.1.8 to 2.2.1 got below error

texts:
1 exception(s):
Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'head': Character content other than whitespace is not allowed because the content type is 'element-only'.
Line: 49

Element 'block', attribute 'class': [facet 'pattern'] The value '\\Magento\Framework\View\Element\Template' is not accepted by the pattern '[A-Z][a-zA-Z\d]*(\\[A-Z][a-zA-Z\d]*)*'.
Line: 735

Element 'block', attribute 'class': '\\Magento\Framework\View\Element\Template' is not a valid value of the atomic type 'blockClassType'.
Line: 735

Element 'remove', attribute 'src_type': The attribute 'src_type' is not allowed.
Line: 778

Element 'block', attribute 'remove': The attribute 'remove' is not allowed.
Line: 824

Element 'block', attribute 'class': [facet 'pattern'] The value '\\Magento\Framework\View\Element\Template' is not accepted by the pattern '[A-Z][a-zA-Z\d]*(\\[A-Z][a-zA-Z\d]*)*'.
Line: 838

Element 'block', attribute 'class': '\\Magento\Framework\View\Element\Template' is not a valid value of the atomic type 'blockClassType'.
Line: 838

Element 'move', attribute 'name': The attribute 'name' is not allowed.
Line: 890

Element 'move', attribute 'name': The attribute 'name' is not allowed.
Line: 891

Element 'remove': This element is not expected. Expected is one of ( block, container, referenceBlock, referenceContainer, uiComponent ).
Line: 909

Element 'move': This element is not expected. Expected is one of ( action, arguments, block, container, referenceBlock, uiComponent ).
Line: 1293

Element 'move', attribute 'name': The attribute 'name' is not allowed.
Line: 1317

Element 'move', attribute 'name': The attribute 'name' is not allowed.
Line: 1318


texts: Magento 2: How to remove var/generation folder programatically?

texts:
How to remove var/generation folder programmatically.
I have used below via command line:

sudo rm -rf var/cache var/generation var/di

But I want to do it programmatically. Is it possible?


texts: What are the rest api's for the Magento2 modules

texts:
We are working on Magento2.2.6 website.

We are planning to build the mobile application. For this, we need the Rest api's for the following :

Sort by options api
Layer navigation
Login with otp api's
Re-order
Product Reviews
Product Rating
Wishlist api's
Social Logins
Buy now api's
Pin code Validation at check availability


texts:
I have problem with session_start()

AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Exception: Warning: session_start(): Failed to decode session object. Session has been destroyed in /var/www/vhosts/my-domains.com/vendor/magento/framework/Session/SessionManager.php on line 191 in /var/www/vhosts/my-domains.com/vendor/magento/framework/App/ErrorHandler.php:61\nStack trace:\n#0 [internal function]: Magento\\Framework\\App\\ErrorHandler->handler(2, 'session_start()...', '/var/www/vhosts...', 191, Array)\n#1 /var/www/vhosts/my-domains.com/vendor/magento/framework/Session/SessionManager.php(191): session_start()\n#2 /var/www/vhosts/my-domains.com/generated/code/Magento/Backend/Model/Auth/Session/Interceptor.php(167): Magento\\Framework\\Session\\SessionManager->start()\n#3 /var/www/vhosts/my-domains.com/vendor/magento/framework/Session/SessionManager.php(127): Magento\\Backend\\Model\\Auth\\Session\\Interceptor->start()\n#4 /var/www/vhosts/my-domains.com\n', referer: https://my-domains.com/setup/


texts: How to remove secondary UI component in Magento 2?

texts:
I want to remove export component from order toolbar page in Magento 2 admin.

I have already created an custom export component in my module but I want to remove default one.

See screenshot.

Here is my code in "sales_order_grid.xml" in following folder

 app/code/VENDOR/MODULE/view/adminhtml/ui_component

    <?xml version="1.0" encoding="UTF-8"?>
    <listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <container name="listing_top">
            <exportButton class="Magento\Ui\Component\ExportButton">
                <argument name="data" xsi:type="array">
                    <item name="config" xsi:type="array">
                        <item name="options" xsi:type="array">
                            <item name="cvs" xsi:type="array">
                                <item name="value" xsi:type="string">csv</item>
                                <item name="label" xsi:type="string" translate="true">CSV</item>
                                <item name="url" xsi:type="string">mui/export/gridToCsv</item>
                            </item>
                            <item name="xml" xsi:type="array">
                                <item name="value" xsi:type="string">xml</item>
                                <item name="label" xsi:type="string" translate="true">Excel XML</item>
                                <item name="url" xsi:type="string">mui/export/gridToXml</item>
                            </item>
                            <item name="mom" xsi:type="array">
                                <item name="value" xsi:type="string">mom</item>
                                <item name="label" xsi:type="string" translate="true">MOM</item>
                                <item name="url" xsi:type="string">mom/export/gridToMom</item>
                            </item>
                        </item>
                    </item>
                </argument>
            </exportButton>
        </container>
    </listing>

My question is how to remove default one or override that in my module?


texts: "Attention Something went wrong" on backend product page

texts:
This error shows up everytime I click on a product. The product loads and saves properly. It began to appear before I updated to 2.1 and still continues to appear after the update.

error http://ttothefourth.com/errorimg/error.png

This is what I got from Chrome Inspect:
error http://ttothefourth.com/errorimg/error1.png
When I clicked the link:

  1 exception(s):

  Exception #0 (Magento\Framework\Exception\LocalizedException): Object DOMDocument should be created.
  error http://ttothefourth.com/errorimg/error2.png

This was in var/report

  a:4:{i:0;s:37:"Object DOMDocument should be created.";i:1;s:5384:"#0 /home/ttothef1/public_html/vendor/magento/framework/View/Element/UiComponent/Config/Reader.php(95): Magento\Framework\View\Element\UiComponent\Config\DomMerger->getDom()

error http://ttothefourth.com/errorimg/error3.png


texts: How to debug Magento 2.3 queue's consumers with Xdebug?

texts:
I'm working with a Magento 2 queue at the moment. To debug Magento 2 console scripts I normally just hit 'listen to external connections' in PHPstorm and execute the CLI script (i'm using Valet+ with Xdebug on Mac).
With the new queue system of Magento 2.3 this, however, doesn't work. When I start my normal debugging workflow and I start queue processing with  bin/magento queue:consumers:start someConsumer and PHPstorm stops at the first line of \Magento\MessageQueue\Console\StartConsumerCommand::execute:

But it never reaches my actual consumer class. In my case this is Vendor\Module\Model\Queue\Consumer::processMessage (as specified in queue_consumer.xml). The processMessage function is executed, and the breakpoints aren't hit.
So, how do I setup Xdebug to debug queue consumers in Magento 2.3?


texts:
I have a request which to make custom report, and data for the report need to calculate by helper function and will generate a data array with row and columns.

Is there any solution to let data array being the resource for admin report?

Thanks a lot!


texts: I can't load default_head_blocks.xml and default.xml file in magento 2

texts:
I tried to load css file from default_head_blocks.xml but nothing happen, so if you can provide what did I do wrong?Is it wrong in structure files or something else ? Thank you

Note : This theme inheritance from magento/blank and is activated it from dashboard.

File :  default_head_blocks.xml

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

Structure file :


texts: sometimes.Recently my website always throws 522.My database is AWS RDS.I looked at the Magento log and the RDS log.I've been looking at Google for a long time and I haven't been able to find a solution


texts: Browse button is missing from media storage

texts:
I am trying to upload a photo into media storage.

but I do not have browse or upload button , it only allows me to see the photos already uploaded to storage.


texts: Magento2 add color & size filter in top navigation menu

texts:
How can I add Color, Size filter in top navigation menu of Magento2.
As per my requirement when user hovers on top menu category there needs to be option of selecting sub category based on color & size. Which is basically a filter for that category.
How can I achieve this?
Any advice will be appreciable.


texts: Custom Select Attribut in admin have different values set than InstallData

texts:
I'm trying to make a 3 value select attribut in the customer edit page in admin.
The attribut is created in DB after setup:upgrade but stored in eav_attribute_option table as follow :

the value sent in post request when editing a customer is the option_id not the values set in the InstallData.php

'label' => 'My Label',
'type' => 'varchar',
'input' => 'select',
'source' => 'Magento\Eav\Model\Entity\Attribute\Source\Table',
'position' => 1001,
'visible' => true,
'required' => false,
'is_used_in_grid' => true,
'is_visible_in_grid' => true,
'is_filterable_in_grid' => true,
'system' => 0,
'user_defined' => true,
'option' => [
    'values' => [
        0 => 'Default',
        1 => 'No',
        2 => 'Yes',
    ]
]

Labels are shown correctly in admin but not their values.

I suspect source, and trying int instead of varchar produced an error.


texts: Magento 2.2.3 - Remove price from select field on product page

texts:
I was trying to remove the price which Magento adds to the options in a Select field but can't seem to get rid of the price. From what I could find on the internet it should be edited on the following location: app\code\Magento\Catalog\Block\Product\View\Options\Type\Select.php

At rule 62

$_value->getTitle() . ' ' . strip_tags($priceStr) . '',

And the following bit at rule 170 - 173

$_value->getTitle() .
' ' .
$priceStr .
'';

I changed these but the price still shows up in the select field as can be seen on the Image below.

Does anyone know where I can change this?


texts:
I need to customize the list display only for the home page.
I've duplicated catalog/produtcs/list.phtml to catalog/produtcs/list_home.phtml and in the home page content, in the CMS section of the admin I've added the code:

{{block type="catalog/product_list_home" name="home.catalog.product.list" alias="produtos_home" template="catalog/product/list_home.phtml"}}

But that just didn't load anything. How do I register this "new" block?

Thanks in advance.


texts:
I have created shipping programmatically in magento2, it created shipment but order status didn't not change

if ($_order->canShip()) {
        $this->_helper->debug('creating order shipment');
        $items = [];

        foreach ($_order->getAllItems() AS $orderItem) {
            if (!$orderItem->getQtyToShip() || $orderItem->getIsVirtual()) {
                continue;
            }
            $qtyShipped = $orderItem->getQtyToShip();
            $items[$orderItem->getId()] = $qtyShipped;
        }
        $shipment = $this->_shipmentFactory->create($_order, $items);
        $data = [
            ShipmentTrackInterface::ENTITY_ID => null,
            ShipmentTrackInterface::ORDER_ID => $shipment->getOrderId(),
            ShipmentTrackInterface::PARENT_ID => $shipment->getId(),
            ShipmentTrackInterface::TRACK_NUMBER => $tracking_no,
            ShipmentTrackInterface::DESCRIPTION => 'abc',
            ShipmentTrackInterface::TITLE => 'abc',
            ShipmentTrackInterface::CARRIER_CODE => 'abc',
        ];
        $track = $this->_trackFactory->create()->addData($data);
        $shipment->addTrack($track);
        $this->_shipmentRepository->save($shipment);

        /* Notify the customer */
        $this->_shipmentNotifier->notify($shipment);
    } else {
        $this->_helper->debug('in else check can ship');
    }
};


texts: URL is appending if I click more than once

texts:
We have created megamenu for our site. But the issue we are facing is that the url is appending if click more than once instead of showing corresponding page.

How to resolve this issue?

Below is the code:

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

// @codingStandardsIgnoreFile

?>
<?php
/**
 * Top menu for store
 *
 * @var $block \Magento\Theme\Block\Html\Topmenu
 */
?>

    <link rel="stylesheet" type="text/css" href="<?php echo $block->getViewFileUrl('css/cart.css')?>">

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

// @codingStandardsIgnoreFile

?>
<?php
/**
 * Top menu for store
 *
 * @var $block \Magento\Theme\Block\Html\Topmenu
 */
?>

              Login

              Sign Up

          <?php
          $categories = $block->getStoreCategories();

          foreach ($categories as $category):

          ?>

<a href="<?php echo $category->getRequestPath();?>"><?php echo $category->getName(); ?>

            <?php
            $subCategories = $block->getCategoryById($category->getId());
            $subCats = $subCategories->getChildrenCategories();
            if(count($subCats) > 0): ?>

            <?php endif; ?>

            <?php
            foreach ($subCats as $subCategory):
            ?>

<a href="<?php echo $subCategory->getRequestPath();?>"><?php echo $subCategory->getName(); ?>

          <?php endforeach; ?>

        <?php echo $block->getSubcategories($subCategories); ?>
        <?php endforeach; ?>


texts: When we disable module from System > Configuration > Advanced Which type of file still we can access And which type of File cannot access?


texts:
Magento 1.9.1
Porto theme
Amasty Full Page Cache

We got the following Email from a CFO of a large company:

"Your website is horrible!!  I tried to order from my ipad yesterday and kept getting kicked out.  Logged on to the computer this morning and it is almost as bad.  I can’t seem to get the order placed. When you are trying to place an order and you press continue, it will often kick you out.  Then you either have to start over or possibly it saves part of the info, but I always had to reenter the state for ship to and bill to.  It even kicked me out on the regular computer.  I gave up on the Ipad yesterday and then tried the computer this morning."

He was eventually able to place the order.

I wonder - are we having these issues because of the Full Page Cache and if so - what do I need to do to tweak it in such a way that this would not happen?


texts:
When I put the new configurable product appear the label ON SALE but the product isn't on sale. How can I remove it?

thanks


texts: Magento 1.9.2.4 sub-category listing not working

texts:
I managed to get sub-categories showing on the category page with images, but now since updating 1.9.2.1 up to 1.9.2.4 it no longer works. I cant imagine what may have changed and haven't altered anything.

I followed this tutorial:

http://www.templatemonster.com/help/magento-listing-sub-categories-on-a-category-page.html#gref

Looks like the block code:

{{block type="catalog/navigation" template="catalog/navigation/subcategory_listing.phtml"}}

in the static block just wont get executed. Any help please????


texts: Magento 2: Print arabic invoice character problem

texts: When I print invoice of arabic language order, I am getting incorrect characters in PDF file as per below image. Any solution for this ?


texts: Magento 2.2 error: Unable to unserialize value

texts:
After upgrade to the version 2.2 my modules which has serialized values does not work any more.

Here is some info from the Magento 2.2 release notes:

  Significant enhancements in platform security and developer
  experience. Security improvements include the removal of unserialize
  calls and protection of this functionality to increase resilence
  against dangerous code execution attacks. We have also continued to
  review and improve our protection against Cross-Site Scripting (XSS)
  attacks.
  ...
  In general, we’ve removed serialize/unserialize from most the code to
  improve protection against remote code execution attacks. We’ve
  enhanced protection of code where use of object serialization or
  unserialization was unavoidable. Additionally, we’ve increased our use
  of output escaping to protect against cross-site scripting (XSS)
  attacks.

Its seems ok, but how I can correctly convert a data when a customer updates a module to the new version? In my case update to the version 2.2 does brokes the site with the error:

  Unable to unserialize value.

I've added the correct serializer (Magento\Framework\Serialize\Serializer\Serialize) to the my resource models, but seems it is not correct solution.

In the Magento\Framework\Flag class I seen interesting solution, but seems it's not good enough:

/**
 * Retrieve flag data
 *
 * @return mixed
 */
public function getFlagData()
{
    if ($this->hasFlagData()) {
        $flagData = $this->getData('flag_data');
        try {
            $data = $this->json->unserialize($flagData);
        } catch (\InvalidArgumentException $exception) {
            $data = $this->serialize->unserialize($flagData);
        }
        return $data;
    }
}

where:

$this->json instance of Magento\Framework\Serialize\Serializer\Json
$this->serialize instance of Magento\Framework\Serialize\Serializer\Serialize

So, the question is: what is the correct solution for this case? Should I write the UpgradeData script that does unserialize the old values and serializes them back using Json (re-save all models)?

PS: I've read this posts

Notice: unserialize(); Error at offset in Magento 2.2
Magento 2.2: Unable to unserialize value?
Magento 2 Unable to unserialize value

but there is no answer for my question.


texts:
We are seeing a new option in v2.3.5 "Synchronize with Catalog" and can read about it here. https://docs.magento.com/user-guide/configuration/catalog/inventory.html
But what does it do exactly? The explanation is ambiguous
Synchronize with Catalog: When set to Yes, inventory data is adjusted according to the catalog changes (such as product removals, product SKU changes, and product type changes) and keeps consistency between inventory and catalog. Options: Yes / No
Question: Magento2 MSI v2.3.5 and up: What does "Synchronize with Catalog" do exactly?
What are the suggested values for a normal shop using MSI? It defaults to NO when I would expect YES


texts:
i am adding a phtml with after_body_start reference

how do I display the SKU of a product if the phtml is being added to a product page?


texts: magento2, position of the custom attribute in product page

texts:
I would like to display my custom attribute name "teaser" after the short description.

Below in catalog_product_view.xml didn't work.

<page layout="2columns-right" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
 <body>
   <referenceBlock name="product.info.details">
     <block class="Magento\Catalog\Block\Product\View\Description" name="product.teaser" as="product.teaser" template="product/view/teaser.phtml" after="product.info.overview">
        <argument translate="true" name="title" xsi:type="string">teaser</argument>
        </arguments>
     </block>
   </referenceBlock>
 </body>
</page>


texts: Adding extra fields to products to display on the front end

texts:
Apologies if this is something of an elementary question. I've been trawling google and unable to find an answer to my query.

I need to add a few new fields to products for the admin to display more info on the product (video embed code (textarea), hero image (image upload) and strap line (text field)).

I thought this could be achieved using product attributes and followed this: http://www.pixafy.com/blog/2012/12/adding-a-fourth-image-position-to-the-admin-for-a-magento-product/ (for the hero image)

All I was able to achieve with this was to allow images to be set as type "hero" and the new hero image became just another product image in the product image switcher.

How can I specify these fields to the admin and then go on to display them in the template?

Thank you


texts:
I have a team for which we would all like to be editing the same MySQL database for Magento.  We have one installed on a test site on a server we all have access to.

However, I would like to be theming the site on my local computer since SFTP and SSH mounting have been far too slow for me for editing/switching between files.

I have figured out how to connect my local installation to the remote database, however, I don't know how to make Magento look for the theme files on each of our developer's local machines, rather than on the server.

Is this possible?


texts: How to Magento 2 Customer Login Notification Email Sent to Customer whenever they login they will get Notification via email


texts: How to get information about Magento security patches?

texts:
Today a friend alerted me about a critical security update for Magento - SUPEE-5344. I didn't see any articles about this patch on major IT websites. Even if I google for this update, I see SE pages about this update, but no Magentocommerce information, except then the download page. The Magento commerce forums are read only.

This makes me wonder - where can I find alerts, where can I subscribe to a mailing list?


texts: How to remove parent category from subcategory URL?

texts:
I want to remove the parent category from the subcategory URL.

For example, I would like to change:

www.magento2.com/Category1/Category2/gear/bags.html

to

www.magento2.com/bags.html

Is there any way to programmatically remove parent category from subcategory URL?


texts: How do i get to Magento Table value using API

texts:
I am using the WebShopApps MatrixRate – #1 Multiple Table Rates Extension for User Selection of courier service. I need to get this table Values by API. how do I get to Magento table value using API? Actually, I need this values for my DotNet Platform.

Extension Url : https://goo.gl/Lj3P3u


texts:
What's the best way to get the current mode Magento 2 is running with code?

In my case it's for a headless Magento, but I can see a number of cases where this might be required.


texts: How to prevent logged in user from skipping Billing step?

texts:
Apparently on my shop, once the user logs in at the checkout process (very first step), the user automatically skips the Billing step and jumps right to the shipping step.

How can I set this up so the logged in user goes through the same process as a guest user?


texts: How to preview custom page in magento for mouseover?

texts:
I have a custom page named mywallet.phtml. I have a button named named mywallet. I want to preview the custom page when i hover the mouse on mywallet. What do i need to do? I am new to magento.
thanks
This is my code for the button

          <li  <?php echo strpos($magentoCurrentUrl,'mywallet')? "class=current":"";?>>
                <?php if(strpos($magentoCurrentUrl,'mywallet')){ ?>
                    <?php echo $helper->__('My Wallet') ?>
                    <?php }
                    else{ ?>
                        <a href="<?php echo $this->getUrl('marketplace/marketplaceaccount/mywallet'); ?>">
                            <?php echo $helper->__('My Wallet') ?>

                    <?php } ?>


texts:
Is it possible to reload same page on successful logout in magento. Currently it will redirect to home page after redirecting to the page that says you will be redirected to home page in 5 secs.

This is from AccountController- logoutSuccessAction.

SMALL EDIT IN THE LOGIC I NEED

After going to the intermediate page (you have logged out and you will be re directed to home page in 10 seconds) only I need to redirect the user to page previous to the intermediate page.

If the current page is https then I want the user to be re directed to home page.


texts: I have used extension for Check availability by zip/postal code from magento connect. By default it has to create checkdelivery table but its not creating,,, so i'm getting following error as in snapshot. i have reinstalled many times. So please guide me what steps have to done. and also show steps how to import and export files. Give me proper instructions.


texts:
I tried to upload product through magmi. After run import i got an error

SQLSTATE[HY000] [2002] Connection timed out

How can i fix this


texts: Magento 2: How to set default value of SKU in new product page

texts:
Is Magento provided a way to set default value of sku  in admin new product page?

I have gone through their document but not understanding
http://devdocs.magento.com/guides/v2.1/howdoi/customize_product.html


texts:
I just want to ask, have a cart price rules on magento that if its equal or less than 349 AED the shipping is flat rate of 25 (This first rule is working fine) but if its equal or more than 350 it will be free shipping.(This Rule is not working fine. Because when i purchase 2000k it shows me 2 option of shipping method. The free shipping and the with shipping fee.) How can i fix this problem please. Please check the screenshot attach.

Tax I have a Tax rules that each product when they check out they will be automatically 5% added for VAT but on the summary it shows that TAX 0. How can i fix this. please check attach image.


texts: My Client want to implement FedEx Cash On Delivery Service. We are already using FedEx Shipping API.Any one have any information about Fedex COD in magento or even in php please share with me. Any Help is appreciable.


texts: i am using magento 2 with porto theme. and i am facing issue in checkout page my checkout load speed very slow and my website other pages load speed 2 sec per page also i have run website production mode but still slow speed on checkout page 7 to 10 sec  . please help me anyone


texts: product link for Multistore search result

texts:
Current magento search results are not going to repeated store. It open at the current store. But the product is not included in current store. We would like to go the related store when click on the product.

Example:

Current store is mainstore. Search rice in search box.
In the mainstore there is no rice product. rice is only have in store1.
When click on the rice, it's showing the product under mainstore.

Excepted Result

When click on the rice, it's showing the product under store1 instead of mainstore. The link should be store1 link.

Is it possible to change the link of product in search result ?


texts: Magento 1.9 configurable swatches not showing on layered navigation

texts:
I am trying out the new configurable swatched in magento 1.9.
Works fine on the product detail page and the product listing page but the images don't show in the category layered navigation, anybody knows how to fix this?


texts:
1 exception(s):
Exception #0 (Exception): Warning: include(/home/milkezuq/public_html/magetest/generated/metadata/frontend.php): failed to open stream: No such file or directory in /home/milkezuq/public_html/magetest/vendor/magento/framework/App/ObjectManager/ConfigLoader/Compiled.php on line 31

Exception #0 (Exception): Warning: include(/home/milkezuq/public_html/magetest/generated/metadata/frontend.php): failed to open stream: No such file or directory in /home/milkezuq/public_html/magetest/vendor/magento/framework/App/ObjectManager/ConfigLoader/Compiled.php on line 31
#0 /home/milkezuq/public_html/magetest/vendor/magento/framework/App/ObjectManager/ConfigLoader/Compiled.php(31): Magento\Framework\App\ErrorHandler->handler(2, 'include(/home/m...', '/home/milkezuq/...', 31, Array)
#1 /home/milkezuq/public_html/magetest/vendor/magento/framework/App/ObjectManager/ConfigLoader/Compiled.php(31): include()
#2 /home/milkezuq/public_html/magetest/vendor/magento/framework/App/Http.php(132): Magento\Framework\App\ObjectManager\ConfigLoader\Compiled->load('frontend')
#3 /home/milkezuq/public_html/magetest/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http->launch()
#4 /home/milkezuq/public_html/magetest/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#5 {main}


texts: Magento2 : How to validate cart rule using plugin?

texts:
I was trying to validate the cart rule using plugin, but not able to do this, here I am explaining my approach in form of code files, please let me know how to do this.

app\code\Vendor\Module\Plugin\Condition\Product.php

<?php

namespace Vendor\Module\Plugin\Condition;

use Magento\Framework\Exception\NoSuchEntityException;

/**
 * Additional attr for validator.
 */
class Product
{
    /**
     * @var \Magento\Catalog\Api\ProductRepositoryInterface
     */
    private $productRepository;

    private $stockItem;

    public function __construct(
        \Magento\Catalog\Api\ProductRepositoryInterface $productRepository,
        \Magento\CatalogInventory\Api\StockStateInterface $stockItem
    ) {
        $this->productRepository = $productRepository;
        $this->stockItem = $stockItem;
    }

    /**
     * @param \Magento\Rule\Model\Condition\Product\AbstractProduct $subject
     * @param \Magento\Framework\Model\AbstractModel $object
     */
    public function beforeValidate(
        \Magento\Rule\Model\Condition\Product\AbstractProduct $subject,
        \Magento\Framework\Model\AbstractModel $object
    ) {
        if ($object->getProduct() instanceof \Magento\Catalog\Model\Product) {
            /** @var \Magento\Catalog\Model\Product $product */
            $product = $object->getProduct();
        } else {
            try {
                $product = $this->productRepository->getById($object->getProductId());
            } catch (NoSuchEntityException $e) {
                $product = null;
            }
        }

        $qty = $this->stockItem->getStockQty($product->getId(), $product->getStore()->getWebsiteId());

        $logger = \Magento\Framework\App\ObjectManager::getInstance()->get('\Psr\Log\LoggerInterface');
        $logger->debug($qty."<= plugin working =>".$product->getProductId());

        $object->setData('product_qty', $qty);
        //return parent::validate($object);
    }
}

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\SalesRule\Model\Rule\Condition\Product">
        <plugin name="Custom_Rules::Condition_Product" type="Vendor\Module\Plugin\Condition\Product" />
    </type>
</config>

My cart rule condition is as below:-

If product qty condition is true then rule will apply for that product in cart.

Any help would be much appreciated.


texts: Write to debug log from core code module

texts:
I am trying to track down some bugs in an extension, but I need answers from the core code (specifically vendor/magento/module-quote/Model/QuoteRepository.php).

I've tried adding "private $_logger;" to the class declarations, along with adding to the constructor:

public function __construct(
    QuoteFactory $quoteFactory,
    StoreManagerInterface $storeManager,
    \Magento\Quote\Model\ResourceModel\Quote\Collection $quoteCollection,
    \Magento\Quote\Api\Data\CartSearchResultsInterfaceFactory $searchResultsDataFactory,
    JoinProcessorInterface $extensionAttributesJoinProcessor,
    \Psr\Log\LoggerInterface $logger
) {
    $this->quoteFactory = $quoteFactory;
    $this->storeManager = $storeManager;
    $this->searchResultsDataFactory = $searchResultsDataFactory;
    $this->extensionAttributesJoinProcessor = $extensionAttributesJoinProcessor;
    $this->_logger = $logger;
}

Then I try to write to the log like this:

public function get($cartId, array $sharedStoreIds = [])
{
    $this->_logger->log(\Psr\Log\LogLevel::DEBUG, 'Hello I wrote to the log!');

when the page runs I get the error:

Fatal error: Uncaught TypeError: Argument 6 passed to Magento\Quote\Model\QuoteRepository::__construct() must implement interface Psr\Log\LoggerInterface, none given, called in /home/livean9/public_new/var/generation/Magento/Quote/Model/QuoteRepository/Interceptor.php on line 14 and defined in /home/livean9/public_new/vendor/magento/module-quote/Model/QuoteRepository.php:89

What am I doing wrong?


texts:
I can't seem to get request params from a Data Provider. I've modified Magento\Review\Ui\DataProvider\Product\ReviewDataProvider.php to log (also tried var_dump) the information, but it always returns null.

The following code is from Magento\Review\Ui\DataProvider\Product\ReviewDataProvider.php,

   public function getData()
    {

        $this->getCollection()->addEntityFilter($this->request->getParam('current_product_id', 0))
            ->addStoreData();

        $arrItems = [
            'totalRecords' => $this->getCollection()->getSize(),
            'items' => [],
        ];

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

        return $arrItems;
    }

If I try to var_dump or log $this->request->getParam('current_product_id', 0), the result is null. This is the only point for the Collection to be filtered by the product ID (that I've found).
I've also tried $this->getCollection()->getParams(), which shows some parameters, but the current_product_id is not included.
Why does this happen and how can I view the request parameter?


texts: How to update order status to shipped instead of preparing

texts:
When i add tracking no to the order and click on Submit Shipment , Order status becomes preparing and Preparing email is sent to customer . Then again ,i have to change the status to Shipped .

What i want is to change order status to Shipped when Submit Shipment is clicked . Is this possible ?


texts:
I am working in localhost with Magento 1.7. When I fill the form under the contact us page (myurl/contacts/), I don't receive any email at all.

I have checked Admin -> System -> Genera -> Conctacts, and I have the option enabled, and the email set to my email account. I tried 'Custom Email 1' and 'Custom Email 2'. Still, I receive no email when I fill and send the contacts form.

I already tried to change $this->getFormAction(); and use getUrl() as suggested in other posts, but I obtained no result.

Whenever I create a new user, for example, I receive an email, so I guess that the problem is not sending emails but there must be another problem.

Any ideas on how to solve this?


texts: Issue in pragmatically create orders in magento 2

texts:
I want to create orders pragmatically by getting the data from xml.
Reading data from xml part is done.
when creating order steps i am getting this error.

  Parse error: syntax error, unexpected '$quote' (T_VARIABLE) in

Below is my code lines

<?php
namespace Eight25media\MpowerSync\Controller\Adminhtml\mpowersync;

use Magento\Backend\App\Action\Context;

class Testorderimport extends \Magento\Backend\App\Action
{
......some code here.....
protected $quote;
protected $quoteManagement;
......some code here.....
public function __construct(
    Context $context,
......some code here.....
\Magento\Quote\Model\QuoteFactory $quote,
\Magento\Quote\Model\QuoteManagement $quoteManagement,
......some code here.....
) {
parent::__construct($context);
......some code here.....
$this->quote = $quote;
$this->quoteManagement = $quoteManagement;
......some code here.....
}

public function execute(){
......some code here.....
$websiteId  = $this->_storeManager->getWebsite()->getWebsiteId();
$customer = $this->customer;
if ($websiteId) {
 $customer->setWebsiteId($websiteId);
}
$customer->loadByEmail($email);
$customer_id = $customer->getId();
if(!$customer->getId()){
//create customer
}

$store = $this->_storeManager->getStore();
$quote = $this->quote->create();
$quote->setStore($store);

$customer = $this->customerRepository->getById($customer_id);
$quote->setCurrency($order_currency_code);
$quote->assignCustomer($customer);
......some code here.....

I am getting this error $quote->assignCustomer($customer) here in this line.

May be some one faced the same issue you before, any help would be great for me to short it out or else suggest me a tutorial.

I tried Magecamp, mageplaza,webkul tutorials.


texts: how to use a custom block in a custom theme template

texts: I am using Magento 2.3 and I have a problem, I have a custom theme that displays the sale price of a product in the path app/design/frontend/mytheme/theme/Magento_ConfigurableProduct/templates/product/price/final_price.phtml and use the block in route vendor/magento/module-configurable-product/Pricing/Render/FinalPriceBox.php, How can I use a custom block to add more functions and call them in the template? for example app/code/myvendor/mymodule/Block/Product/Price/FinalPriceBox.php


texts: Error: You cannot define a correlation name 'type_shirt_idx' more than once

texts:
I've been trying to find the culprit giving me this error message "You cannot define a correlation name 'type_shirt_idx' more than once"

Question: does anyone know what the error can be in layered navigation?

a:5:{i:0;s:68:"You cannot define a correlation name 'type_shirt_idx' more than once";i:1;s:3939:"0 /lib/Varien/Db/Select.php(281): Zend_Db_Select->_join('inner join', Array, 'type_shirt_idx....', Array, NULL)
1 /lib/Zend/Db/Select.php(336): Varien_Db_Select->_join('inner join', Array, 'type_shirt_idx....', Array, NULL)
2 /lib/Zend/Db/Select.php(315): Zend_Db_Select->joinInner(Array, 'type_shirt_idx....', Array, NULL)
3 /app/code/core/Mage/Catalog/Model/Resource/Layer/Filter/Attribute.php(70): Zend_Db_Select->join(Array, 'type_shirt_idx....', Array)
4 /app/code/core/Mage/Catalog/Model/Layer/Filter/Attribute.php(94): Mage_Catalog_Model_Resource_Layer_Filter_Attribute->applyFilterToCollection(Object(Mage_Catalog_Model_Layer_Filter_Attribute), '142')
5 /app/code/core/Mage/Catalog/Block/Layer/Filter/Abstract.php(91): Mage_Catalog_Model_Layer_Filter_Attribute->apply(Object(Mage_Core_Controller_Request_Http), Object(Mage_Catalog_Block_Layer_Filter_Attribute))
6 /app/code/core/Mage/Catalog/Block/Layer/Filter/Abstract.php(73): Mage_Catalog_Block_Layer_Filter_Abstract->_initFilter()
7 /app/code/core/Mage/Catalog/Block/Layer/View.php(136): Mage_Catalog_Block_Layer_Filter_Abstract->init()
8 /app/code/core/Mage/Core/Block/Abstract.php(293): Mage_Catalog_Block_Layer_View->_prepareLayout()
9 /app/code/core/Mage/Core/Model/Layout.php(456): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
10 /app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('catalog/layer_v...', 'catalog.leftnav')
11 /app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('catalog/layer_v...', 'catalog.leftnav')
12 /app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
13 /app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
14 /app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
15 /app/code/core/Mage/Catalog/controllers/CategoryController.php(148): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
16 /app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Catalog_CategoryController->viewAction()
17 /app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('view')
18 /app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
19 /app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
20 /app/Mage.php(705): Mage_Core_Model_App->run(Array)
21 /index.php(89): Mage::run('ml7_default', 'store')
22 {main}";s:3:"url";s:108:"/category/excellent-katoen-overhemd?occasion=184&shirt_size=12&shirt_weving=188&type_shirt=142";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:11:"ml7_default";}


texts:
How to add slide transitions when product description, additional data accordion is clicked.

Is this code needs to be edited in app.js

function toggleClasses(clickedItem, group) {
            var index = group.index(clickedItem);
            var i;
            for (i = 0; i < groups.length; i++) {
                groups[i].removeClass('current');
                groups[i].eq(index).addClass('current');
            }
        }


texts: Magento2 Move billing address below shipping address

texts:
I have Magento 2.3 and in My custom OnePageCheckout I moved Billing Address to Shipping Address. I changed LayoutProcessor.php:
$jsLayout['components']['checkout']['children']['steps']['children']['billing-step']
            ['children']['payment']['children']['payments-list']['children']
            ['billing-address-form-shared'] = $component;

added:
unset(
            $jsLayout['components']['checkout']['children']['steps']['children']['billing-step']
            ['children']['payment']['children']['payments-list']['children']
            ['billing-address-form-shared']
            );

$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
        ['shippingAddress']['children']['shipping-address-fieldset']['children']
            ['billing-address-form-shared'] = $component;
        }
        if (isset($jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
        ['shippingAddress']['children']['shipping-address-fieldset']['children']['billing-address-form-shared'])) {
            $jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
        ['shippingAddress']['children']['shipping-address-fieldset']['children']['billing-address-form-shared']['sortOrder'] = 100;
      }

I also changed a few other files and it worked, but if the customer is logged, under the Shipping Address and New Address button it is not showing "My biling and shipping address are the same". It is showing up in popup under Shipping Address. How can I move it?


texts: How to create a Custom Product Detail Page

texts: We are working on the Product Quick View option on the Category page. We need to load the product details on a popup. How can we get all the product details kinda a duplicate PDP layout? We dont need to load the Original PDP layout (catalog_product_view.xml), it renders the whole page again in the popup.


texts: Magento 2: How to install not enabled packages

texts:
when I try to run 'composer install' into my folder /web I got this problem triggered, can anyone tell me how to install all of this extensions, please?

 Problem 1
    - Installation request for magento/framework 101.0.6 -> satisfiable by magento/framework[101.0.6].
    - magento/framework 101.0.6 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system.
  Problem 2
    - Installation request for magento/product-community-edition 2.2.6 -> satisfiable by magento/product-community-edition[2.2.6].
    - magento/product-community-edition 2.2.6 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system.
  Problem 3
    - Installation request for vertex/module-tax 2.1.10 -> satisfiable by vertex/module-tax[2.1.10].
    - vertex/module-tax 2.1.10 requires ext-soap * -> the requested PHP extension soap is missing from your system.
  Problem 4
    - Installation request for zendframework/zend-soap 2.7.0 -> satisfiable by zendframework/zend-soap[2.7.0].
    - zendframework/zend-soap 2.7.0 requires ext-soap * -> the requested PHP extension soap is missing from your system.
  Problem 5
    - magento/framework 101.0.6 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system.
    - owebia/magento2-module-advanced-setting-core 2.1.0 requires magento/framework ^100.0|^101.0 -> satisfiable by magento/framework[101.0.6].
    - Installation request for owebia/magento2-module-advanced-setting-core 2.1.0 -> satisfiable by owebia/magento2-module-advanced-setting-core[2.1.0].

  To enable extensions, verify that they are enabled in your .ini files:
    - /etc/php/7.1/cli/php.ini
    - /etc/php/7.1/cli/conf.d/10-mysqlnd.ini
    - /etc/php/7.1/cli/conf.d/10-opcache.ini
    - /etc/php/7.1/cli/conf.d/10-pdo.ini
    - /etc/php/7.1/cli/conf.d/15-xml.ini
    - /etc/php/7.1/cli/conf.d/20-calendar.ini
    - /etc/php/7.1/cli/conf.d/20-ctype.ini
    - /etc/php/7.1/cli/conf.d/20-curl.ini
    - /etc/php/7.1/cli/conf.d/20-dom.ini
    - /etc/php/7.1/cli/conf.d/20-exif.ini
    - /etc/php/7.1/cli/conf.d/20-fileinfo.ini
    - /etc/php/7.1/cli/conf.d/20-ftp.ini
    - /etc/php/7.1/cli/conf.d/20-gd.ini
    - /etc/php/7.1/cli/conf.d/20-gettext.ini
    - /etc/php/7.1/cli/conf.d/20-iconv.ini
    - /etc/php/7.1/cli/conf.d/20-intl.ini
    - /etc/php/7.1/cli/conf.d/20-json.ini
    - /etc/php/7.1/cli/conf.d/20-mbstring.ini
    - /etc/php/7.1/cli/conf.d/20-mcrypt.ini
    - /etc/php/7.1/cli/conf.d/20-mysqli.ini
    - /etc/php/7.1/cli/conf.d/20-pdo_mysql.ini
    - /etc/php/7.1/cli/conf.d/20-pdo_sqlite.ini
    - /etc/php/7.1/cli/conf.d/20-phar.ini
    - /etc/php/7.1/cli/conf.d/20-posix.ini
    - /etc/php/7.1/cli/conf.d/20-readline.ini
    - /etc/php/7.1/cli/conf.d/20-shmop.ini
    - /etc/php/7.1/cli/conf.d/20-simplexml.ini
    - /etc/php/7.1/cli/conf.d/20-sockets.ini
    - /etc/php/7.1/cli/conf.d/20-sqlite3.ini
    - /etc/php/7.1/cli/conf.d/20-sysvmsg.ini
    - /etc/php/7.1/cli/conf.d/20-sysvsem.ini
    - /etc/php/7.1/cli/conf.d/20-sysvshm.ini
    - /etc/php/7.1/cli/conf.d/20-tokenizer.ini
    - /etc/php/7.1/cli/conf.d/20-wddx.ini
    - /etc/php/7.1/cli/conf.d/20-xmlreader.ini
    - /etc/php/7.1/cli/conf.d/20-xmlwriter.ini
    - /etc/php/7.1/cli/conf.d/20-xsl.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.


texts: How to bill shipping charges on customer FedEx or UPS account in Magento 2?

texts: I want to add functionality that customer can pay their shipping charges on their FedEx or ups account like this.


texts: When I am going to install Magento in my xampp server having following issue, please help

texts:
[ERROR] LogicException: Unknown module in the requested list:
  'TemplateMonster_AjaxCatalog' in
  C:\xampp\htdocs\magento\setup\src\Magento\Setup\Model\Installer.php:429
  Stack trace: #0
  C:\xampp\htdocs\magento\setup\src\Magento\Setup\Model\Installer.php(388):
  Magento\Setup\Model\Installer->readListOfModules(Array, Array,
  'enable_modules') #1
  C:\xampp\htdocs\magento\setup\src\Magento\Setup\Model\Installer.php(334):
  Magento\Setup\Model\Installer->createModulesConfig(Array, true) #2
  C:\xampp\htdocs\magento\setup\src\Magento\Setup\Controller\Install.php(109):
  Magento\Setup\Model\Installer->install(Array) #3
  C:\xampp\htdocs\magento\vendor\zendframework\zend-mvc\src\Controller\AbstractActionController.php(84):
  Magento\Setup\Controller\Install->startAction() #4 [internal
  function]:
  Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
   #5 C:\xampp\htdocs\magento\vendor\zendframework\zend-eventmanager\src\EventManager.php(490):
  call_user_func(Array, Object(Zend\Mvc\MvcEvent)) #6
  C:\xampp\htdocs\magento\vendor\zendframework\zend-eventmanager\src\EventManager.php(260):
  Zend\EventManager\EventManager->triggerListeners('dispatch',
  Object(Zend\Mvc\MvcEvent), Object(Closure)) #7
  C:\xampp\htdocs\magento\vendor\zendframework\zend-mvc\src\Controller\AbstractController.php(118):
  Zend\EventManager\EventManager->triggerEventUntil(Object(Closure),
  Object(Zend\Mvc\MvcEvent)) #8
  C:\xampp\htdocs\magento\vendor\zendframework\zend-mvc\src\DispatchListener.php(118):
  Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request),
  Object(Zend\Http\PhpEnvironment\Response)) #9 [internal function]:
  Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent)) #10
  C:\xampp\htdocs\magento\vendor\zendframework\zend-eventmanager\src\EventManager.php(490):
  call_user_func(Array, Object(Zend\Mvc\MvcEvent)) #11
  C:\xampp\htdocs\magento\vendor\zendframework\zend-eventmanager\src\EventManager.php(260):
  Zend\EventManager\EventManager->triggerListeners('dispatch',
  Object(Zend\Mvc\MvcEvent), Object(Closure)) #12
  C:\xampp\htdocs\magento\vendor\zendframework\zend-mvc\src\Application.php(340):
  Zend\EventManager\EventManager->triggerEventUntil(Object(Closure),
  Object(Zend\Mvc\MvcEvent)) #13
  C:\xampp\htdocs\magento\setup\index.php(35):
  Zend\Mvc\Application->run() #14 {main}


texts:
I am developing a store in which you can buy a card at fixed price and can add any amount as per users wish.

So when product added to cart product price should be calculated in such a way that product price+amount choosen by customer. in addition to this other concepts are as same as magento default function like shipping mod charges, delivery charges etc..

To do this I am creating an observer event checkout_cart_product_add_after.

I created a module and calling checkout_cart_product_add_after event.

Below in my module config file

<config>
.
.
.
<global>
<events>
        <checkout_cart_product_add_after>
            <observers>
                <ucs_catalogorder_checkout_cart_product_add_after>
                    <type>model</type>
                    <class>Ucs_CatalogOrder_Model_Observer</class>
                    <method>checkoutCartProductAddAfter</method>
                </ucs_catalogorder_checkout_cart_product_add_after>
            </observers>
        </checkout_cart_product_add_after>

    </events>
</global>
</config>

and below is the Observer.php

<?php
class Ucs_CatalogOrder_Model_Observer
{
    public function checkoutCartProductAddAfter($observer) {
        $item = $observer->getEvent()->getQuoteItem();

        $walletAmount = Mage::app()->getRequest()->getPost('card_wallet_amount');

        $item->setCustomPrice($walletAmount);
        $item->setOriginalCustomPrice($walletAmount);
        $item->setCardWalletAmount($walletAmount);
        //$item->save();
        $item->getProduct()->setIsSuperMode(true);

        return $this;
    }

I have a custom field card_wallet_amount in my sales_flat_quote_item table, this field, custom_price and original_custom_price fields are getting updated with custom value, but total price is not updating based on the changes.

please suggest what goes wrong here.

As per my question database level, custom prices updating but on cart page, it is still showing only original product price.


texts: Does Magento automatically convert a guest's old order to his new account?

texts:
Suppose a guest has 10 orders with his email id xx@yy.com.
Later he registered as a customer. Does Magento automatically convert his old order to his new account, or do we need to do this manually?


texts: Magento 2: Alternative solution to large number of values inside 1 attribute

texts:
We have Product Attribute called "Authors" with "Multiselect option". It has entries up to 51k. When we edit product page in backend it becomes very slow to load page and specially this attribute with values inside it. Now we have another 400k authors with products to import and i am expecting its not good to load all values inside 1 product author attribute, it can crash or slow down the whole website.
Attribute code: authors
Attribute label: Authors
Catalog Input Type for Store Owner: Multi select

Any suggestion would be great on that ?


texts: Setup store email address to send to more than one address in Magento 2

texts:
In admin panel Stores > Configuration > General > Store Email Addresses I can add one email to the 'Custom Email 1' section. I'd like to add two email addresses to the field rather than one, so for example the email is sent to me@mydomain.com and me2@mydomain.com.

How can I achieve this please in Magento 2?


texts: Undefined index encrypter.php after admin login in magento 2

texts:
1 exception(s):
Exception #0 (Exception): Notice: Undefined offset: 2 in /var/www/html/Registration/vendor/magento/framework/Encryption/Encryptor.php on line 588


texts: Magento2 call to specific function in controller

texts:
I have a controller class called Index that is called in a javascript AJAX request, but rather than have the code in the constructor i would like to call specific functions in the Index.php, so i dont have to create a seperate class for every required function. Is it possible to call SavePricingChanges function from javascript?

Vendor/Pricing/Controller/Adminhtml/Ajaxcontroller/Index.php

<?php
namespace Vendor\Pricing\Controller\Adminhtml\Ajaxcontroller;

use Magento\Framework\Controller\Result\JsonFactory;
use Magento\Customer\Model\Session;

class Index extends \Magento\Framework\App\Action\Action
{
    /**
     * @var JsonFactory
     */
    private $resultJsonFactory;
        /**
     * @var Session
     */
    private $customerSession;

    /**
     * @param JsonFactory $resultJsonFactory
     */
    public function __construct(
        \Magento\Framework\App\Action\Context $context,
        JsonFactory $resultJsonFactory,
        Session $customerSession
    ) {
        parent::__construct($context);
        $this->resultJsonFactory = $resultJsonFactory;
        $this->customerSession = $customerSession;
    }

    /**
     * @return \Magento\Framework\App\ResponseInterface|\Magento\Framework\Controller\Result\Json|\Magento\Framework\Controller\ResultInterface
     */
    public function execute()
    {

    }

    public function SavePricingChanges(){
        $response = $this->resultFactory
             ->create(\Magento\Framework\Controller\ResultFactory::TYPE_JSON)
             ->setData([
                 'status'  => "success",
                 'message' => "form submitted correctly"
             ]);

        return $response;
    }
}

etc/adminhtml/routes.xml

 <?xml version="1.0"?>
    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
        <router id="admin">
            <route id="adminpath" frontName="adminpath">
                <module name="Vendor_Pricing" />
            </route>
        </router>
    </config>

my javascript in the phtml file

<script type="text/javascript">
    require(["jquery"],function($) {
        $('#savePricing').click(function() {
            var customurl = "<?php echo $block->getUrl('adminpath/ajaxcontroller'); ?>";
            $.ajax({
                url: customurl,
                type: 'POST',
                dataType: 'json',
                data: {form_key: window.FORM_KEY},
                showLoader: true,
            complete: function(response) {
                var status = response.responseJSON.status;
                   if(status == "success"){
                        //there is a response from index.php
                   }
                },
                error: function (xhr, status, errorThrown) {
                    console.log('Error happens. Try again. error : ' + errorThrown);
                }
            });
        });
    });
</script>

I can get a response if i put the code from Index.php in the constructor but i need to call specific functions


texts: Magento 2 Add 35% price to product and 16% tax

texts:
Is it possible to add 35% more price to products in one category, and also add 16% as tax?

I want products from certain categories to have 35% more prices in catalog price, and then add 16% of taxes in the summary cart.

I tried with price rules but it only applies for discounts.
And I don't know if it's possible to add 2 taxes, 1 for catalog price and the other for summary cart.

Greetings!


texts: Magento 2 : Phpunit test for catalog module, mock error for setExtensionAttributes()

texts:
Magento 2 phpunit test for catalog module error display below:

I want to run test for catalog model folder files,

Run phptest using command like:

var/www/html/magento2/vendor/phpunit/phpunit$ php phpunit /var/www/html/magento2/vendor/magento/module-catalog/Test/Unit/Model/

Result for above command display error:

Magento\Catalog\Test\Unit\Model\CustomOptions\CustomOptionProcessorTest::testConvertToBuyRequest
PHPUnit_Framework_MockObject_RuntimeException: Cannot mock Magento\Quote\Api\Data\CartItemInterface::setExtensionAttributes() because a class or interface used in the signature is not loaded

i am using magento catalog native module for phpunit test and error are display after run test.