texts: Tried styling order print page, but css is not active. What do i do wrong

texts:
So a customer registers and creates an account. They order something (at least, they should ;-))

After that they can visit their My Account > My Orders and select to print an order, shipment or whatever is in there.

When this action is performed on screen you are presented with the e.g. invoice (and a print dialog)

i added styling for this page to custom.css but it is not used.

Where would i need to do this or do i need to add something in a certain file?

Thanks


texts: On choosing payment through Paypal via Braintree it gives an error Internal Server Error in Magento 2.2.6

texts:
I have a store in Magento 2 on Choosing Paypal via Braintree and using the Live Account it gives an error Internal Server Error in Magento 2.
But on working with Sandbox Cred. it will working fine.
After Checking Payment.log in Error Log Files. It gives me this error :
'client' => 'Magento\\Braintree\\Gateway\\Http\\Client\\TransactionSale',
'response' =>
array (
  'success' => false,
  '' . "\0" . '*' . "\0" . '_attributes' =>
  array (
    'errors' =>
    Braintree\Error\ErrorCollection::__set_state(array(
       '_errors' =>
      Braintree\Error\ValidationErrorCollection::__set_state(array(
         '_errors' =>
        array (
        ),
         '_nested' =>
        array (
          'transaction' =>
          Braintree\Error\ValidationErrorCollection::__set_state(array(
             '_errors' =>
            array (
              0 =>
              Braintree\Error\Validation::__set_state(array(
                 '_attribute' => 'base',
                 '_code' => '91508',
                 '_message' => 'Cannot determine payment method.',
              )),
            ),
             '_nested' =>
            array (
              'billing' =>
              Braintree\Error\ValidationErrorCollection::__set_state(array(
                 '_errors' =>
                array (
                ),
                 '_nested' =>
                array (
                ),
                 '_collection' =>
                array (
                ),
              )),
              'customer' =>
              Braintree\Error\ValidationErrorCollection::__set_state(array(
                 '_errors' =>
                array (
                ),
                 '_nested' =>
                array (
                ),
                 '_collection' =>
                array (
                ),
              )),
              'shipping' =>
              Braintree\Error\ValidationErrorCollection::__set_state(array(
                 '_errors' =>
                array (
                ),
                 '_nested' =>
                array (
                ),
                 '_collection' =>
                array (
                ),
              )),
            ),
             '_collection' =>
            array (
            ),
          )),
        ),
         '_collection' =>
        array (
        ),
      )),
    )),
    'message' => 'Cannot determine payment method.',
    'creditCardVerification' => NULL,
    'transaction' => NULL,
    'subscription' => NULL,
    'merchantAccount' => NULL,
    'verification' => NULL,
  ),
),

So the error code is 91508 and message is Cannot determine payment.

Any one have any idea why it is doing this My Magento Version is 2.2.6.
Any help is appriciated.

method.


texts: Magento 2 Model getData for field at specific store_id

texts:
In my Model I have a method getSummary() E.G:

public function getSummary() {
        return $this->getData(BlogInterface::SUMMARY);
    }

I have 3 stores: en_1,fr_2,de_3

I've only set summary in the default store view therefore the summary will have store_id = 0;

What I have tried:

public function getSummary() {
            $this->setStoreId('0'); //try setting store id to fetch summary for store view 0
            return $this->getData(BlogInterface::SUMMARY);
        }

My DB field: notice store_id field has 0 with
Default Summary</

I've also tried return $this->getData(BlogInterface::Summary, '0');

Any ideas how one can fetch specific field data for specific store id?

Best!


texts: How to group the products to their respective category in cart page?

texts:
I want the cart page to be like the added products like apple, orange etc into fruits category and fish into fresh fish category. How can i group them accordingly in the cart page ? For example:

Cart page:-
Fruits -> apple, orange.

Fresh Fish-> Bangude (Medium) fish, Kolathuru.

Please help. Thank You.


texts: Cant create a new Produkt - Error at Auto-Generate Meta-Information

texts:
When i try to create a new Product, i cant save the product of couse an Error on the Auto-Generate Meta-Information Site.

Error-Code(my free translation :P )

The Value of the Attributes "Auto-Generate Meta-Information" must be uniquely.

Error-Code (in German)

Der Wert des Attributes "Auto-Generate Meta-Information" muss einmalig sein.


texts: Create Single sign-on using Magento sessions

texts:
I have an application hosted on a different server, and I want to authenticate using Magento instead of maintaining two separate user lists. I've already done this for applications on the same server using the common method:

require_once('path/to/app/Mage.php');
umask(0);
Mage::app('default');
Mage::getSingleton('core/session', array('name'=>'frontend'));
$session = Mage::getSingleton('customer/session');

if($session->isLoggedIn()) {
    echo "logged in";
} else {
    echo "not logged in";
}

How do you do this without direct access to Mage.php? I've attempted setting up a helper script that uses the above code, and making an AJAX call to it, but it always returns "not logged in".

Has anyone else ran into this issue?


texts: Error : Memory limit has been reached on product image upload after server migration - magento 1.9

texts:
After migrating my Magento site to a new server (CentOS 6 ) I can't update or upload new images to any of my products. its showing Memory limit has been reached while uploading any images.

logs :

2016-02-04T07:24:35+00:00 ERR (3): Notice: Undefined index: httponly  in /var/www/vhosts/luxyprints.com/httpdocs/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 96
2016-02-04T07:24:35+00:00 ERR (3): Notice: Undefined index: httponly  in /var/www/vhosts/domain.com/httpdocs/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 96
2016-02-04T07:24:35+00:00 ERR (3): Notice: Undefined index: secure  in /var/www/vhosts/domain.com/httpdocs/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 98
2016-02-04T07:24:35+00:00 ERR (3): Notice: Undefined index: domain  in /var/www/vhosts/domain.com/httpdocs/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 100


texts:
Error: One or more of the Cache Types are invalidated: Configuration, Page Cache. Please go to Cache Management and refresh cache types.
how can i resolve


texts:
Hi I recently installed Magento 1.9.2.4.

Everything is working fine except the cart button functionality. When I click the "Add to Cart" button on product details page, nothing is happening.

I tested with firebug. I found that when I click the button a class, validation-passed, is added to the button and no ajax is calling against the button click (found in firebug console). How to find the error behind this? Please help to debug the error.


texts: Magento Multistore onepage checkout not working

texts:
My problem is , Onepage checkout is not working in multistore website.

In console i got this error:
POST http://www.domain.com/xx/index.php/onepage/json/saveBilling - 404 Not Found

But it is working in main website.

Could you please help me to solve this issue..


texts:
I'm looking to retrieve all URLs of a Magento website (CMS pages, categories, products...) subdivided by store view.
Something like the default Magento Sitemap, but with a different format: specifically I'm trying to get a "one URL per row" plain text file, one for each store view.


texts: Magento 2 - Start delta anew with deleting orders, customers directly in the database

texts:
Is there any way to start the delta process bin/magento migrate:delta -r --reset completely anew with truncating the order and the customer tables in the target database before?

Do I have to truncate some tables on the source database as well to make it possible?

Thanks


texts: I am using MagePal SMTP extension, but on testing through admin portal it is giving error could not open socket in fresh installation without any other extension. Any solution?


texts: Set default direction (ordenation) in Catalog Search Result

texts:
Magento 2 uses default "asc" ordenation for category page and Layered Navigation. But in catalog search result page, the default direction is setted to "desc" and I've debugged the code, I've found the method configureToolbar in \Magento\Catalog\Block\Product\ListProduct these lines:

$dir = $this->getDefaultDirection();
if ($dir) {
   $toolbar->setDefaultDirection($dir);
}

I have debugged this, following the call stack until I reach the DataObject.php, where the default_direction property is setted, but I don't know where this value came from, so how can I change this default direction in my search result page? Thanks in advance.


texts: Magento Admin Panel page is blank - /vendor/magento/framework doesnt exist?

texts:
I came from reading Magento 2.2.7 admin panel blank page

However, i have an even more weird issue: The /magento/framework folder doesnt exist. Does anyone have an idea what is going on? I followed the step-by-step guide, created a DB called magento, and then did the installation on the /setup page, then tried to acess admin panel, and its blank.

Found that question, but when i tried to go and fix this, i found out the folder doesnt exist:


texts: Could someone please help with some questions related to using Magento 1 database backup functionality?

texts:
I want to get a Magento 1 backup using Magento's backup functionality. (Reference:https://docs.magento.com/m1/ee/user_guide/system-operations/server-backup-create.html)

I'm are running Magento ver. 1.14.0.1

I would like to get the menu option for backups enabled under
System->Tools->Backups as this option is not currently available.
How can this be done?
Would taking a backup in this way, have a significant server performance impact considering there are a large number of records?
Will this include custom field data or just the default Magento fields?
Could this backup be used for a migrating date to M2 using the migration tool in Magento 2?

Thanks a lot in advance!

Regards,


texts: Custom Attribute no longer available in the TopMenu since Magento 2.1

texts:
In a Module I configured my custom attribute redirect_url for categories to be included in the collection using catalog_attributes.xml

This seems to no longer work in Magento 2.1

My module defines a plugin for Magento\Catalog\Helper\Category

public function aroundGetCategoryUrl(\Magento\Catalog\Helper\Category $subject, \Closure $proceed, $category) {

    if ($category instanceof \Magento\Catalog\Model\Category) {
        $redirect = $category->getRedirectUrl();
    } else {
        $category = $this->_categoryFactory->create()->setData($category->getData());
        $redirect = $category->getRedirectUrl();
    }

    if ($redirect) {
        return $this->_helper->buildUrl($redirect);
    }

    return $proceed($category);
}

I have the following integration test:

/**
 * @var \Magento\Catalog\Model\Category
 */
protected $category;

/**
 * @var \Magento\Catalog\Model\ResourceModel\Category\Tree
 */
protected $tree;

protected function setUp()
{
    /**
     * Create category
     * @source \Magento\Catalog\Model\Indexer\FlatTest::testCreateCategory
     */

    /** @var \Magento\Catalog\Model\Category $category */
    $category = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
        'Magento\Catalog\Model\Category'
    );
    $category->getResource()->load($category, 2);

    /** @var \Magento\Catalog\Model\Category $categoryOne */
    $categoryOne = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
        'Magento\Catalog\Model\Category'
    );
    $categoryOne
        ->setName('Home Category ' . uniqid())->setPath($category->getPath())
        ->setIsActive(true)
        ->setRedirectUrl('/');
    $category->getResource()->save($categoryOne);

    $this->category = $categoryOne;

    $this->tree = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
        'Magento\Catalog\Model\ResourceModel\Category\Tree'
    );
}

public function testAttributeInstalled()
{
    /**
     * @var $attribute \Magento\Catalog\Model\Category\Attribute
     */
    $attribute = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
        '\Magento\Catalog\Model\Category\Attribute'
    );
    $attribute->loadByCode('catalog_category', 'redirect_url');
    $this->assertNotNull($attribute->getId());
}

public function testRedirectUrlAttributeIsInCollection()
{
    $collection = $this->tree->getCollection()->addAttributeToFilter('entity_id' , $this->category->getId());
    $this->assertEquals('/', $collection->getFirstItem()->getRedirectUrl());
}

Those tests pass, but the following fails:

/**
 * Check if menu items have the right URL
 *
 * @magentoAppArea frontend
 */
public function testUrlInMenu()
{
    \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
        'Magento\Framework\View\DesignInterface'
    )->setDesignTheme(
        'Magento/blank'
    );

    /**
     * @var $layout \Magento\Framework\View\LayoutInterface
     */
    $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
        \Magento\Framework\View\LayoutInterface::class
    );

    $block = $layout->addBlock(\Magento\Theme\Block\Html\Topmenu::class, 'test');

    $block->setTemplate('Magento_Theme::html/topmenu.phtml');

    $result = $block->toHtml();
    $this->assertContains('http://localhost/index.php/foo-bar', $result);
}


texts: Trouble optimizing Magento permissions reset script

texts:
Currently, when I want to reset Magento permissions to ensure security, I execute the following from the root of my Magento project (planning on moving it to ./shell).

On Git

#!/bin/bash

#This is designed to work with 'apache' as the file owner and 'webroot' as the assigned group.

touch maintenance.flag

if [ ! -f ./app/etc/local.xml ]; then
    echo "-- ERROR"
    echo "-- This doesn't look like a Magento install.  Please make sure"
    echo "-- that you are running this from the Magento main doc root dir"
    exit
fi

if [ `id -u` != 0 ]; then
    echo "-- ERROR"
    echo "-- This script should be run as root so that file ownership"
    echo "-- changes can be set correctly"
    exit
fi

echo "1/8 Setting all files to owner apache and group webroot"
chown -R apache:webroot .
echo "2/8 Magento didn't seem to like SELinux. Patching that up..."
sudo chcon -R -t httpd_sys_rw_content_t .
chmod -R a+w .
#is this next line the same as the lines above?
chmod g+s -R .
echo "3/8 Setting all files to 470 (Apache read access and webroot group read/write/execute)..."
find . -type f -exec chmod 2470 {} \;
echo "4/8 Setting all directories to 570 (Apache read/execute access and webroot group read/write/execute)..."
find . -type d -exec chmod 2570 {} \;
echo "5/8 Setting var and media files to 670 (Apache read/execute access and webroot group read/write/execute)..."
find var/ -type f -exec chmod 2770 {} \;
find media/ -type f -exec chmod 2670 {} \;
chmod -R 2770 sitemap;
echo "6/8 Making modules directory and files writable for extendware extension..."
chmod -R 2770 app/etc
echo "7/8 Setting var and media directories to 770 (Apache read/write/execute access and webroot group read/write/execute)..."
find var/ -type d -exec chmod 2770 {} \;
find media/ -type d -exec chmod 2770 {} \;
echo "8/8 Securing all .htaccess files..."
find . -name ".htaccess" -exec chmod 2440 {} \;
echo "Protecting some directories."
chmod 2070 -R ./downloader
chmod 2070 -R ./.git
echo "Removing Maintenance.flag"
rm maintenance.flag

##If Fishpig WordPress installed
echo "reseting wordpress"
cd wp
sh resetWpPermissions.sh

This does the job, but with my image directory included in the reset, it takes a couple of minutes sometimes. That is a few minutes with the maintenance.flag file enabled.

I'm hoping that someone can "learn me" in how to make this more efficient or point me to an alternative solution to keeping Magento permissions static.


texts: Magento 2.1 adminhtml Action 'Edit' give 404 while Index works

texts:
Update:

Here is what the Developer Toolbar gives me on the 404 page:

  Mode: Developer Controler
  Module: Magento_Backend
  Controler Class: Magento\Backend\Controller\Adminhtml\Noroute\Index
  Controler Action Name: execute

Note the "Noroute" in the Class URI.

Original :

I'm creating my first Magento Module and My Index is working with a fully working filtering.

Index URL is :

http://local.com/admin/multiuseraccounts/permission/

I created the Edit action but the url trigger a 404 error :

Edit URL is :

http://local.com/admin/multiuseraccounts/permission/edit/permission_id/2

Here is my route.xml:

<router id="admin">
    <route id="multiuseraccounts" frontName="multiuseraccounts">
        <module name="Ramlam_MultiUserAccounts" before="Magento_Customer"/>
    </route>
</router>

Here is my module.xml

<module name="Ramlam_MultiUserAccounts" setup_version="1.0.0">
    <sequence>
        <module name="Magento_Customer"/>
    </sequence>
</module>

Index and Edit are in

Ramlam/MultiUserAccounts/Controller/Adminhtml/Permission/Index.php
Ramlam/MultiUserAccounts/Controller/Adminhtml/Permission/Edit.php

I deactivated the secure key but it didn't solve anything.

Index action is OK, Edit action triggers an error.

I tried every url combinaison possible

Magento never trigger the Edit class either xdebug nor die() is ever triggered in Edit class.

here is how the Edit url is built :

$this->urlBuilder->getUrl(
    'multiuseraccounts/permission/edit',
    'permission_id' => $item['permission_id']]
);

Here is the acl:

 <acl>
     <resources>
        <resource id="Magento_Backend::admin">
            <resource id="Magento_Customer::customer">
                <resource id="Ramlam_MultiUserAccounts::multiuseraccounts" title="MultiUserAccounts" sortOrder="10" >
                    <resource id="Ramlam_MultiUserAccounts::multiuseraccounts_permission" title="Permission" sortOrder="40">
                        <resource id="Ramlam_MultiUserAccounts::multiuseraccounts_permission_save" title="Save" sortOrder="10" />
                        <resource id="Ramlam_MultiUserAccounts::multiuseraccounts_permission_delete" title="Delete" sortOrder="20" />
                    </resource>
                </resource>
            </resource>
        </resource>
    </resources>
</acl>


texts: Installation & Varnish Test Results and MFTF Magento Supplied Results Fails on Magento Marketplace

texts:
composer.json

{
    "name": "vendor/preorder",
    "description": "preorder",
    "type": "magento2-module",
    "version": "2.0.4",
    "license": [
        "OSL-3.0"
    ],
    "require": {
        "php": "~7.0.13||~7.1.0||~7.2.0||~7.3.0||~7.4.0"
    },
    "extra": {
        "installer-paths": {
            "app/code/Vendor/Preorder": ["vendor/preorder"]
        }
    },
    "repositories": [
        {
            "type": "composer",
            "url": "https://repo.magento.com"
        },
        {
            "type": "package",
            "package": {
                "name": "magento/marketplace-tools",
                "version": "dev-master",
                "source": {
                    "url": "https://github.com/magento/marketplace-tools",
                    "type": "git",
                    "reference": "origin/master"
                }
            }
        }
    ],
    "autoload": {
        "files": [
            "registration.php"
        ],
        "psr-4": {
            "Vendor\\Preorder\\": ""
        }
    }
}


texts: How to convert layout block to cms block?

texts:
I have created a block programmatically which shows category name and image on home page.
Following is my code:

  cms_index_index.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="content">
            <block name="homepage.category.thumbnail"
                   class="Magento\Framework\View\Element\Template"
                   template="Vendor_CategoryCms::list.phtml">
                <arguments>
                    <argument name="category_list" xsi:type="object">\Vendor\CategoryCms\ViewModel\CategoryList</argument>
                </arguments>
            </block>
        </referenceContainer>
    </body>
</page>

This block taking data from viewmodal and showing in phtml file.
If I need to place it on any other page, I need to override that page layout. Is there any way to convert this block to cms block so that we can place it anywhere from admin panel?


texts:
Payment section on checkout progress block is updating wrong details.When you select saved cc method as payment method and click on continue after filling up all the required fields. the progress block updates itself with the details I have added in saved cc form.

Now, when I click on payment method again and select paypal as my payment method,

It updates the payment section on progress block but it also displays me the credit card number.Any help will be much appreciated.Attached is the screenshot for my PayPal payment method.


texts: Custom Extension Need to save Input Text and Output It in the Template

texts:
Here is what I have so far. I am not sure how to save the text fields (url's) and insert them into the template. Any help with this would be great :)

config.xml

http://pastebin.com/UZfVLs6P

system.xml

http://pastebin.com/y5rkKfE0

adminhtml.xml

http://pastebin.com/syx88dyZ

Helper/Data.php

http://pastebin.com/DqMkc2JA

And the template file. This is where I would like to replace the # sign in the url's with the users input if it exists:

<?php if (Mage::helper('themesettings')->getCfg('socialaccounts/enable')): ?>

<img title="Facebook" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); ?>media/beckin/social/facebook.png" alt="Facebook" />

<img title="Twitter" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); ?>media/beckin/social/twitter.png" alt="Twitter" />

<img title="Youtube" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); ?>media/beckin/social/youtube.png" alt="Youtube" />

<img title="Google" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); ?>media/beckin/social/google.png" alt="Google" />

<img title="Flickr" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); ?>media/beckin/social/flickr.png" alt="Flickr" />

<img title="Linkedin" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); ?>media/beckin/social/linkedin.png" alt="Linkedin" />

<?php endif; ?>


texts: configurable attribute options are not saved while creating order with configurable product

texts:
While creating order programmatically, attribute of Configurable product are not saved, I have a configurable product which entity id is 64 and having one attribute which id is 136 and the id of option value is 10, When I run this code I see in magento admin panel that the order was placed but attribute are not added and price was default as set for parent product.

$customer_id = 5;
$quote = Mage::getModel('sales/quote');
$customer = Mage::getModel('customer/customer')->load($customer_id);
$quote->assignCustomer($customer);
$quote->setStore(Mage::app()->getStore());
$product = Mage::getModel('catalog/product')->load(64);
$quoteItem = Mage::getModel('sales/quote_item')->setProduct($product);
$quoteItem->setQuote($quote);
$quoteItem->setQty(1);
$options = array(
    "product"=>$product,
    "super_attribute"=>array(
        136=>10
    )
);
$quoteItem->addOption(new Varien_Object($options)); //$quoteItem->setProductOptions($options); tried both
$quote->addItem($quoteItem);

Magento Admin Order Page
 Parent Product is showing without configurable options and their price.


texts: Magento 2 Customer Listing action: get customer's telephone

texts:
I have a module where I have added an additional action on admin panel, under Customers -> All Customers grid. I show the new action by populating file: view/adminhtml/ui_component/customer_listing.xml:

<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <listingToolbar name="listing_top">
        <massaction name="listing_massaction">
            <action name="mynewaction">
                <argument name="data" xsi:type="array">
                    <item name="config" xsi:type="array">
                        <item name="type" xsi:type="string">mynewaction</item>
                        <item name="label" xsi:type="string" translate="true">Execute a custom action</item>
                        <item name="url" xsi:type="url" path="modulename/customfolder/customAction"/>
                        <item name="confirm" xsi:type="array">
                            <item name="title" xsi:type="string" translate="true">Execute a custom action</item>
                            <item name="message" xsi:type="string" translate="true">Custom question to confirm my custom action?</item>
                        </item>
                    </item>
                </argument>
            </action>
        </massaction>
    </listingToolbar>
</listing>

The implementation of the custom mass action is on Controller/Adminhtml/Customfolder/CustomAction.php

<?php
namespace MyModule\Controller\Adminhtml\Customfolder;

use Magento\Framework\Controller\ResultFactory;
use Magento\Backend\App\Action\Context;
use Magento\Ui\Component\MassAction\Filter;

class CustomAction extends \Magento\Backend\App\Action
{
    protected $filter;
    protected $customerCollectionFactory;
    protected $_helper;

    public function __construct(Context $context, Filter $filter,
            \MyModule\Helper\Data $helper,
            \Magento\Customer\Model\ResourceModel\Customer\CollectionFactory $customerCollectionFactory
    ) {
        $this->filter = $filter;
        $this->_helper = $helper;
        $this->customerCollectionFactory = $customerCollectionFactory;
        parent::__construct($context);
    }
    public function execute()
    {
        $collection = $this->filter->getCollection($this->customerCollectionFactory->create());
        foreach ($collection as $item) {
            $sms = $item->getEmail();
        }

        $resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
        return $resultRedirect->setUrl($this->_redirect->getRefererUrl());
    }
}

Instead of getEmail() I need to get the customer's phone (if any). However function getTelephone() doesn't seem to work. How can I access customer's phone?

Keep in mind that the customer is not associated with any order, so I can't get the phone from the order object


texts: large space in dashboard of Magento 2.1.9

texts:
I'm using Magento 2.1.9. I don't know why the view of pages in dashboards as in the image. I must go down to see the content of the page and there is large space at the beginning of the page.
any help, please?

also, store view not appear on a product page in admin panel.
I have two store view. I need a solution quickly please, is there any help?


texts:
I want move static block landing in Category. I found code in file

  /app/design/frontend/base/default/template/catalog/category/view.phtml

<?php elseif($this->isMixedMode()): ?>
<?php echo $this->getCmsBlockHtml() ?>
<?php echo $this->getProductListHtml() ?>

I tried copy or move <?php echo $this->getCmsBlockHtml() ?> in file 2columns-left.phtml but it does not work.


texts: How to update product price on a multi website environment using API (different price for different website)

texts:
How to update a product price on a multi website environment using API (different price for different website)

For single website the following code working, but if I give only one website id in "website" array it is un selecting the product from other website.

$client = new SoapClient('http://example.com/api/soap/?wsdl');
$session = $client->login('exapmple*', 'exapmple');
$result = $client->call($session, 'catalog_product.update', array(
    'PRIN-SKU',
    array(
        'websites' => array(5),
        'price' => '100',
    )
));


texts:
I'm trying to integrate my M2 store with my 3rd party service by using oAuth.
Based on information from here: http://devdocs.magento.com/guides/v2.0/get-started/authentication/gs-authentication-oauth.html - I need to:

Get a request token
Get an access token

I'm making valid POST request from my service back to my M2 store with that fields:

oauth_consumer_key
oauth_nonce
oauth_signature_method
oauth_timestamp
oauth_version
oauth_signature

Unfortunatelly my oauth_signature is every time wrong. I'm receving this response: oauth_problem=Invalid+signature
I tried many ways how to create oauth_signature - with different quotes, with different order of values, with different encoding etc. No luck.

Could anybody show an example in a raw PHP of a working request token method please?


texts: How to add a button to the Customer Edit Page within the admin?

texts:
I've been working on a module to put a custom button, that opens a popup for input values, onto the Customer Edit page (customer/index/edit/id/) within the admin:

I've been using this for the module.xml :

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

This for the Block :

<?php

namespace Foo\CustomerResetPass\Block\Adminhtml\Customer\Edit;

use Magento\Customer\Block\Adminhtml\Edit\GenericButton;
use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface;

/**
 * Set Cust Pass button
 */
class Login extends GenericButton implements ButtonProviderInterface
{
    /**
     * @var \Magento\Framework\AuthorizationInterface
     */
    protected $_authorization;

    /**
     * Constructor
     *
     * @param \Magento\Backend\Block\Widget\Context $context
     * @param \Magento\Framework\Registry $registry
     * @param AccountManagementInterface $customerAccountManagement
     */
    public function __construct(
        \Magento\Backend\Block\Widget\Context $context,
        \Magento\Framework\Registry $registry
    ) {
        parent::__construct($context, $registry);
        $this->_authorization = $context->getAuthorization();
    }

    /**
     * @return array
     */
    public function getButtonData()
    {
        $customerId = $this->getCustomerId();
        $data = [];
        $canModify = $customerId && $this->_authorization->isAllowed('Foo_CustomerResetPass::reset_button');
        if ($canModify) {
            $data = [
                'label' => __('Set Customer Password'),
                'class' => 'reset reset-button',
                'on_click' => 'window.open( \'' . $this->getInvalidateTokenUrl() .
                    '\')',
                'sort_order' => 80,
            ];
        }
        return $data;
    }

    /**
     * @return string
     */
    public function getInvalidateTokenUrl()
    {
        return $this->getUrl('/foo/reset.php', ['customer_id' => $this->getCustomerId()]);
    }

}

And this is for the index.xml under view/adminhtml/layout

<?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">
    <update handle="formkey"/>
    <update handle="resetpass_login_grid_block"/>
    <body>
        <referenceContainer name="content">
            <block class="Foo\CustomerResetPass\Block\Adminhtml\ResetPass" name="resetpass.container"/>
        </referenceContainer>
    </body>
</page>

Any help or if anyone could point me in the right direction it would be greatly appreciated and thanks in advance!


texts: Some Admin Functionality on the frontend?

texts:
I am very new to Magento and still learning all the functionality this e-commerce platform offers.

I have a new project that uses Magento. This project will not be public facing but will hold customer and product data. The system will be used by a customer service team, which will take orders on behalf of the customers on the telephone.

Is it possible if a member of the customer services team can search and make orders on behalf of the customers through the frontend and not by logging into Magento backend? I know the functionality exists in the admin side, but I don't want the customer services team to use the admin side of Magento, I would like to use the frontend if possible.


texts: How to Join an EAV to a Flat Table & Import Flat Table and Update EAV

texts:
This will be two parts
1.) Join an EAV to a Flat Table the Magento way
2.) Import into Flat Table that will update the EAV Table.

Basically be able to Export(Flat Table) and Import(with flat table) but be able to extend the data into the EAV during import.


texts: Adding frontend and backend URL to Mage_Adminhtml_Block_Sales_Items_Column_Name

texts:
I am trying to add both an ahref link to the backend order view + the frontend store view (items grid) @ Mage_Adminhtml_Block_Sales_Items_Column_Name. This is not working; some small things that are boggling me.

How can we retrieve the frontend url? (the problem is you have to detect what store it was sold in + build the URL)
How can we retrieve the backend URL to directly edit (and see) the product
Suppose it is a simple product: how would we then retrieve the same as above; only this time with the parent information (if it exists ... we probably need to add some HasParent() information)

The end link would look something like this

online: getSKU (if has parent show parent link)

online: getSKU

parent link: getSKU (if has parent show parent link)

Greatly appreciate your insights


texts: Magento 2.4: How to get the Invoice Collection of Logged In Customers?

texts:
I have to show the invoice collection of logged-in customers in the frontend. I have referred this link how to get current login customer invoice list and shipments in magento 2? invoice-list-and-shipments-in-magento-2 but when I implement this, I'm getting the below error
Exception #0 (Exception): Warning: Invalid argument supplied for foreach()

Please help me to get the invoice collection.
Thanks in advance.


texts:
i have added two new attributes in product form for state and city (India only).
i want that when i select state, city select option will only show cities related to that state.
Is it possible. if yes than please tell me how. urgent.
Thanks in advance


texts: Magento 2: Add custom code before closing head tag

texts:
I am new to Magento.

I have some products in my Magento 2 website. I want to add some custom meta code before closing of head tag.

Example

if (page_id==1){
 some code
}
if(page_id==2){
other code
}

So in which php / phtml file have to add this code?**


texts:
Is there any extension or service that will provide this FedEx Cross Border - Bongo?
any idea please share.


texts:
I'm facing a problem with a new customer custom attribute. i added the new attribute with the following code
 //$this->customerSetupFactory Magento\Customer\Setup\CustomerSetupFactory;
    $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);
    $customerEntity = $customerSetup->getEavConfig()->getEntityType('customer');
    $attributeSetId = $customerEntity->getDefaultAttributeSetId();
    //$this->attributeSetFactory Magento\Eav\Model\Entity\Attribute\SetFactory
    $attributeSet = $this->attributeSetFactory->create();
    $attributeGroupId = $attributeSet->getDefaultGroupId($attributeSetId);
    $customerSetup->addAttribute(Customer::ENTITY, 'loyalty_total_points', [
        'type' => 'varchar',
        'label' => 'Loyalty Total Points',
        'input' => 'text',
        'required' => false,
        'visible' => true,
        'user_defined' => true,
        'is_user_defined' => true,
        'position' => 999,
        'system' => 0,
        'default' => 0,
        'source' => '',
        'backend' => '',
        'is_used_in_grid' => false,
        'is_visible_in_grid' => false,
        'is_filterable_in_grid' => false,
        'is_searchable_in_grid' => false,
    ]);

    $attribute = $customerSetup->getEavConfig()->getAttribute(Customer::ENTITY, 'loyalty_total_points')
        ->addData([
            'attribute_set_id' => $attributeSetId,
            'attribute_group_id' => $attributeGroupId,
            'used_in_forms' => ['adminhtml_customer'],
        ]);

    $attribute->save();

But whenever I save a new value in the customer page via the Magento admin, I always see the default value (0). occasionally it shows an error like
"Invalid method Magento \ Eav \ Model \ Entity \ Attribute :: isScopeStore"

I tried clearing the caches, it no longer gives an error but still doesn't save the attribute.
In addition to this, I tried to read it from the customer via code with:
$customer_attribute = $customer->getCustomAttribute($attribute_code)->getValue();

but without result
this being a site that I recently took over and I don't know very well the configurations. I noticed however that other attributes are not saved as well. So I don't know if the problem is the way I declared the attribute or there is some configuration problem on Magento side


texts: Custom module does not translates admin panel

texts:
I created a custom module and it does not translate grid columns or header.
Here is my config.xml

<config>
...
    <frontend>
        <translate>
          <modules>
            <syncreports>
                <files>
                    <default>Mycompany_Syncreports.csv</default>
                </files>
            </syncreports>
        </modules>
       </translate>
    </frontend>
...
</config>

In app/locale/en_US/Mycompany_Syncreports.csv

"Synchronization reports123", "Reports"

And this is how I call it:

$this->_headerText = Mage::helper('syncreports')->__('Synchronization reports123');

This is how it looks in admin panel:


texts: How to get list to store views collection along with stores in magento2

texts:
I have two stores Sweeden and France and two storeviews for each sweedish,english and french,english respectively.
i.e

Store Sweeden(SE) has two Storeviews Sweedish(se) and English(se_en)
Store France(FR) has two Storeviews French(fr) and English(fr_en)

I'm trying to get the list of stores collection in the frontend.
But I'm getting storeviews details directly.
1-default
0-admin
2-se
3-en
4-fr
5-fr_en

This is the code I used to get stores collection
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$storeManager = $objectManager->create("\Magento\Store\Model\StoreManagerInterface");
$stores = $storeManager->getStores(true, false);
foreach($stores as $store){
echo $store->getId()."-".$store->getCode()."<br>";
//echo $store->getAll();
}

Thanks in Advance.


texts: how can I set Compare product at bottom in left panel?

texts: I want to change the compare product block position at the bottom of the left panel.


texts:
I received a transaction note from Authorize.net

transaction number 100000056

I don't see it at all on Magento


texts: I want to add a weight dropdown on product grid like bigbasket

texts: I just want the code and the files which needs to be edited.


texts: Display record count in custom report on the basis of row count. Magento 1.9 custom report

texts:
In my Custom Report.

I have created a collection which count is 25.

But After this I have applied some joins on that by another collection.

but on which I have made join is returning 25 records.

and after making join my final output is only one row but the first one collection returns 25 record.

I want that count should be 1 instead of 25.

check for reference with code
Set custom Record Count to Collection pagination in Report Grid


texts:
I accidentally deleted admin_user table and when I created it again, I'm unable to access the backend. It keeps throwing the error page with a new report number every time. On checking var/reports, it shows :

  "Role id 'G1' already exists in the registry";i:1;s:2565:"#0
  /home/cpanel/public_html/lib/Zend/Acl.php(160):
  Zend_Acl_Role_Registry->add(Object(Mage_Admin_Model_Acl_Role_Group),
  NULL)

What should I do now ? I'm completely unable to access the backend.


texts: How to add item status for an order in magento 2

texts:
I have multiple items in my order. How can I add item status and its tracking information for that order in My Account Orders?

I am using this to get orders

$_orders = $block->getOrders();

And for order status I do

$_order->getStatusLabel();

How to get the item status and its tracking information.

Like I have to show the

1) item status which I have hardcoded right now as Shipped and

2)  item tracking information.

I have found Item.php which have this function

public function getStatus()
{
    return $this->getStatusName($this->getStatusId());
}

Is this php class ?
How can I call this function in my phtml?


texts: Add DropDown in Sales Order Grid Section in Magento 2.2.5

texts:
I have checked some of the links but they do not work my need so Please help someone who did this before

sales_order_grid.xml

<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <columns name="sales_order_columns">
        <column name="company_status">
            <argument name="data" xsi:type="array">
                <item name="options" xsi:type="object">Magento\CompanyStatus\Ui\Component\Listing\Column\CompanyStatus\Options</item>
                <item name="config" xsi:type="array">
                    <item name="filter" xsi:type="string">select</item>
                    <item name="component" xsi:type="string">Magento_Ui/js/grid/columns/select</item>
                    <item name="dataType" xsi:type="string">select</item>
                    <item name="label" xsi:type="string" translate="true">Company Status</item>
                </item>
            </argument>
        </column>
    </columns>
</listing>

Options.php

<?php

namespace Magento\CompanyStatus\Ui\Component\Listing\Column\CompanyStatus;

use Magento\Framework\Data\OptionSourceInterface;

class Options implements OptionSourceInterface
{
    public function toOptionArray()
    {
        $options = [];
        $options[] = [
            'label' => 'Payment & Artwork: Y > Vplus',
            'value' => 0
        ];
        $options[] = [
            'label' => 'Payment or Artwork: N',
            'value' => 1
        ];
        $options[] = [
            'label' => 'Payment & Artwork: N',
            'value' => 2
        ];
        return $options;
    }
}


texts: Magento2 How to Discount Description add on Checkout order summary

texts:
I Want to add Coupon Description in Order Summary

I have to Find the file here

  app/design/frontend/[VendorName]/[theme]/Magento_SalesRule/web/template/cart/totals/discount.html

Here Hoe can I get Coupon Description

Note: I have added coupon description in Backend.


texts: Calling a static block in footer for homepage only

texts:
I want to call a static block after my footer and I want it to appear only on my homepage. Here below is my xml code as referred to This Question. But, it is loading the content above the footer when used after and not coming at all when used before.

    <reference name="content">
        <block type="cms/block" name="home_page_content"  before="footer">
          <action method="setBlockId"><home_page_content>home_page_content</home_page_content></action>
        </block>
    </reference>


texts:
How can I implement a captcha in my custom form?

Actually I have installed a forum module where I need to implement a captcha for preventing spam.

<form action="<?php echo $this->getFormAction(); ?>" id="messageForm" method="post">
  <input name="title" id="title" title="<?php echo $this->__('Title') ?>" value="<?php echo $this->__('RE : %s',$this->htmlEscape($this->topic->getTitle())) ?>"  />
  <textarea name="content" id="content" title="<?php echo $this->__('Message') ?>" value="" class="required-entry"></textarea>
  <button class="button" type="submit"><?php echo $this->__('Submit') ?></button>


texts: Magento 1 - Convert type Administrator to Guest in Reviews

texts: I would like to change my own created reviews from type Administrator to Guest. Normally it should be an easy change inside the database but it isn't. I investigated the database with no luck. Type Customer has customer's id number value set up in a field, but for both types Administrator and Guest values are NULL. I would like to know where in database Magento makes the difference between types Administrator and Guest for a review.


texts: In Current variation product weight not showing

texts: I have added weight to the product but weight is not displaying in grid section


texts: Magento 2: Marketplace upload issue. Custom Admin menu missing

texts: My extension is working properly on my local but when I submit my extension to the Marketplace they decline it. The Manual QA fails. And the report says that according to the document the custom admin menu is not visible. However, on my local the menu is shown. The Manual QA testing fails for the Magento version 2.3.7.


texts:
I've planned to make a small module which allows the creation of a custom formula. Though I'm a little bit lost at the creation of the admin section. I managed to write a system.xml with sections, groups and fields but I have no idea how to give the user the option to add an element (like adding a new entry for the formula).
So I took a look at Grids and those seem to be the right way but also a bit too much for the little task I want to accomplish.

So what's the proper way to give the user the option to add an element with its own variables (e.g title="test", id=1, sort_order=1    etc.)?


texts: Editing TopLinks via local.xml - changing LogOut and LogIn based on

texts:
I can't seem to get Magento to react to the customer_logged_in or customer_logged_out tags in local.xml

The LogOut link does not display unless I remove the customer_logged_in tag then the link displays and works correctly. I would like it to only show when the customer is logged in.

    <reference name="header">
        <block type="page/template_links" name="top.links2" as="topLinks"/>
    </reference>

    <reference name="top.links2">
        <block type="checkout/links" name="checkout_cart_link">
            <action method="addCartLink"></action>
        </block>
    </reference>

    <customer_logged_in>
    <reference name="top.links2">
        <action method="addLink" translate="label title" module="customer">
            <label>Log Out</label>
            <url helper="customer/getLogoutUrl"/>
            <title>Log Out</title>
            <prepare/>
            <urlParams/>
            <position>4</position>
            <liParams>id="top-logout"</liParams>
            <aParams/>
        </action>
    </reference>
    </customer_logged_in>


texts:
When adding a product via the admin I'm getting the error below:

Can't create directory /home/dorodo/staging/generated/code/Magento/Catalog/Model/Product/Gallery/CreateHandler/. in [Magento\Catalog\Model\Product\Gallery\CreateHandler\Interceptor]

It looks like a write issue. When trying to change the permissions as my user I get "permission denied." Since MageMojo doesn't offer root access and I'm not a part of sudoers is there a workaround or suggestion?


texts: How to use Category Heading instead of Category name in Magento?

texts:
There is a field in the backend called "Category Heading" that I would like to use instead of "Category Name" under View. Current code is like

<?php echo $_helper->categoryAttribute($_category, $_category->getName(), 'name') ?>

Please guide me how to fetch it. Also, is there simple documentation for all this stuff?


texts: While importing bulk product data in CSV format what will be the field separator?

texts:
Am using field separator as comma but in product categories I have -> to separate . when I am changing field separator as comma to -> its not working. What is the problem?  How can I import ?
Categories
Hardware & Fittings->Tri-Clamp Fittings->Fittings Threaded->1/2 Inch


texts: magento 1.9: How to load customers by mobile number

texts:
I want to load customer and get his data from telephone number
we have load() methods, to load customer by id as well as we have loadByEmail() to load customer by Email but i want to load customer by providing his telephone number and get his data.


texts: 2. Assigning multiple drop ship vendors for a single SKU in Magento 2.4.2

texts:
Assigning multiple drop ship vendors for a single SKU:

What would be best way to have an item record store “Drop Ship Vendor Information” for that specific SKU or SKU Variant (i.e. product comes in two sizes: small and large.  Size Small via drop ship supplier 1 and size large via drop ship supplier 2).  In addition, we will connect to the drop ship vendors via EDI to obtain up-to-date costs and QTY Available (aka stock availability).
For instance, each SKU should have an option to add a minimum of 4 drop ship vendors:
Vendor 1 Name       Vendor 1 SKU       Vendor 1 Cost      Vender 1 QTY Available
Vendor 2 Name       Vendor 2 SKU       Vendor 2 Cost       Vender 2 QTY Available
Vendor 3 Name       Vendor 3 SKU       Vendor 3 Cost       Vender 3 QTY Available
Vendor 4 Name       Vendor 4 SKU       Vendor 4 Cost       Vender 4 QTY Available
This way, our system and our customer service agents are able to know which vendor or vendors have this item.  I need to have this info on the Magento item record since my CS agents won’t have to our ERP system.
This is how it’s done now with our NetSuite ERP (from the item record):
NOTE: Not all Drop Ship vendors use the same SKU (Code) for the same exact item, therefore, it’s important to have SKU for each vendor.
Any suggestions, please?


texts: After Upgrade Magento from 2.3.4 to 2.4 Cannot instantiate interface Magento\InventoryApi\Api\SourceRepositoryInterface

texts:
After Upgrade Magento from 2.3.4 to 2.4  getting error.
main.CRITICAL: Error: Cannot instantiate interface Magento\InventoryApi\Api\SourceRepositoryInterface in /public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:121


texts:
I have just installed Magento 2 and am starting to go through the configuration.
In Stores > Configuration, I notice that the fields are all greyed out (under General for example) and a checkbox is ticked next to them saying "Use System Value".

After searching for a while, I found this link:
https://magento.stackexchange.com/a/146480/1884

So I think I have found the System values for this element, however, I assume I need to know how to override these defaults, instead of editing this file?
Am I correct in thinking this?

If so, How do I override this file. Where do I copy it to?

In Magento 1, it would be app/code/local... but in Magento 2?


texts: Magento 2 : Bundle product can't add products with custom options

texts: A binding product is created, but a simple product with custom options can't be added.


texts: How to set Sort Order for PayPal Credit?

texts:
I've been trying to set the sort order for PayPals pay with credit option. In the admin you have the option to Enable Paypal Credit but no sort order setting. Also in the database there's no sort order for paypal credit either that I can locate in core_config_data table.

PayPal Credit is always listed in the top position in the checkout payments.

I can't find anything about this except  How to sort bill me later under the Paypal

Anyone know how to set the sort order for PayPal Credit?


texts: Apply unique images by attribute to each sku magento 2 programmatically

texts:
In magento2 - How can I perform this task through a script?

I already relate the configurations to the product with this segment

$attributeModel = $this->objectManager->create('Magento\ConfigurableProduct\Model\Product\Type\Configurable\Attribute');
$position = 0;
$attSetId = $product->getAttributeSetId();
if ($attSetId == self::DEFAULT_ATTRIBUTE_SET_ID) {
    $attributes = array(self::ATTRIBUTE_ID_SIZE, self::ATTRIBUTE_ID_COLOR);
} else {
    $attributes = array(self::ATTRIBUTE_ID_COLOR);
}
$associatedProductIds = array_keys($variants);
if ($isNew) {
    foreach ($attributes as $attributeId) {
        echo "Setting attribute $attributeId\n";
        $data = array('attribute_id' => $attributeId, 'product_id' => $product->getId(), 'position' => $position);
        $position++;
        $attributeModel->setData($data)->save();
    }
}
echo "Setting affected configurable product attributes\n";
try {
    $product->setAffectConfigurableProductAttributes($attSetId);
    $this->objectManager->create('Magento\ConfigurableProduct\Model\Product\Type\Configurable')->setUsedProductAttributes($product, $attributes);
    $product->setNewVariationsAttributeSetId($attSetId);
    $product->setAssociatedProductIds($associatedProductIds); // Setting Associated Products
    $product->setCanSaveConfigurableAttributes(true);
    $product->setImageFromChildProduct($product);
    $product->save();
} catch (Exception $e) {
    echo $e->getMessage();
}

But I'm a little bit lost with the images by colour.

Thanks in advance.


texts: How to check if a sales rules coupon is allowed

texts:
I'm trying to know how can I check if a sales rules coupon is allowed for a quote in magento 1.9.

Here the scenario :

I have a few active rules in my shop and I would like to check if one of them is allow when a customer going to add a product in the cart.

Here my code :

 public function detectQuoteAction(){

    //Quote is equivalent to the cart information
    $oQuote = Mage::getSingleton('checkout/session')->getQuote();
    $sDateNow = Mage::getModel('core/date')->gmtDate('Y-m-d');

    $oCollectionRule = Mage::getModel('salesrule/rule')->getCollection()
        ->addFieldToFilter('is_active', 1)
        ->addFieldToFilter('is_rss', 1)
        ->addFieldToFilter('from_date', array('lteq' => $sDateNow))
        ->addFieldToFilter('to_date', array('gteq' => $sDateNow));

    foreach ($oCollectionRule as $rule)
    {
        if (!$rule->getCode()) {
            continue;
        }

        if rule valid
          set coupon code
    }

Someone can help me about this check ?

Thanks !


texts: Checkout: How to redirect back to cart after customer logged in within the onepage checkout process?

texts:
in the default onepage checkout, an existing customer can choose to login within the checkout process. this fires the usual observers. my module is observing the event sales_quote_merge_before to check if a persistent cart quote is being merged into the current quote. if so, the customer should be redirected to the /checkout/cart page.

this works fine for non-checkout pages. but setting the setBeforeAuthUrl and/or setAfterAuthUrl on the \Magento\Customer\Model\Session object does not seem to work for logins within the checkout process.

here's my (simplified) observer that works for non-checkout logins, that I now need to make work with the checkout login as well:

namespace My\Module\Observer;

class SalesQuoteMergeBefore implements \Magento\Framework\Event\ObserverInterface
{
    /**
     * @var \Magento\Customer\Model\Session
     */
    protected $_customerSession;

    /**
     * @var \Magento\Framework\View\Element\Context
     */
    protected $_context;

    /**
     * SalesQuoteMergeBefore constructor.
     * @param \Magento\Customer\Model\Session $customerSession
     * @param \Magento\Framework\View\Element\Context $context
     */
    public function __construct(
        \Magento\Customer\Model\Session $customerSession,
        \Magento\Framework\View\Element\Context $context
    )
    {
        $this->_customerSession = $customerSession;
        $this->_context = $context;
    }

    /**
     * redirect to cart when quote was merged
     *
     * @see \Magento\Quote\Model\Quote::merge()
     * @param \Magento\Framework\Event\Observer $observer
     * @return $this
     */
    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        /** @var \Magento\Quote\Model\Quote $target */
        $target = $observer->getData('source');
        if ($target && $target->hasItems())
        {
            $url = $this->_context->getUrlBuilder()->getUrl('checkout/cart');

            // setting just the after_auth_url does not seem to be enough...
            $this->_customerSession->setBeforeAuthUrl($url);
            $this->_customerSession->setAfterAuthUrl($url);
        }

        return $this;
    }
}

my understanding is that I somehow need to signal the javascript app a redirect should happen, but I failed to find any way to do this.


texts: Handling email attachments through Filesystem, correct or unnecessary?

texts:
I have a custom contact form for sending emails. One of the options is to attach a PDF.

This is the part of the controller that handles checking the attachments and uploading them.

    $files = $this->getRequest()->getFiles();

        if ($files['attachments'] && $files['attachments']['size'] > 0) {
            if ($files['attachments']['size'] > self::ATTACHMENT_SIZE_LIMIT) {
                $this->messageManager->addErrorMessage(__('File size too large.'));
                return $this->_redirect('*/*/');
            }
            try {
                $uploader = $this->fileUploaderFactory->create(['fileId' => 'attachments']);
                $uploader->setAllowRenameFiles(true);
                $uploader->setFilesDispersion(true);
                $uploader->setAllowCreateFolders(true);
                $uploader->setAllowedExtensions(['pdf']);

            // write to the TMP directory since we don't need the file once it's emailed

                $directory = $this->fileSystem->getDirectoryWrite(DirectoryList::TMP);

                $filePath = $directory->getAbsolutePath('contact-attachments');

                $result = $uploader->save($filePath);
                $resultName = $uploader->getUploadedFileName();

                $attachmentPath = $result['path'] . $result['file'];
                $attachmentName = $resultName;

            } catch (\Exception $e) {
                $this->messageManager->addErrorMessage(__('File format not supported.'));
                $this->logger->error($e);
                return $this->_redirect('*/*/');
            }
        } else {
            $attachmentPath = '';
            $attachmentName = '';
        }

Is there any benefit to doing this vs. something simple like:

$attachmentPath = $files['attachments']['tmp_name'];
$attachmentName = $files['attachments']['name'];

With the necessary validations for type and size limit? Am I overthinking this? Both work, I'm just wondering if injecting the Filesystem and Uploader Factory is really necessary.

The transport builder is extended by using the Zend Framework createAttachment function, which for whatever reason is not included in Magento 2's base TransportBuilder.


texts: Magento 2.3 Javascript widget get defaultqty

texts:
I want to extend a js widget that applies plus minus buttons. Is there a way to get the defaultqty of a product inside the widget?

;(function ($, window, document, undefined) {

$.widget("infortis.qtycontrol", {

    options: {
        qtyButtonSelector: '.qty-button'
        , qtyButtonsWrapperSelector: '.qty-buttons-wrapper'
        , errorColor: 'red'
    }

    , inputField: undefined
    , qtyButtons: undefined

    , _create: function()
    {
        this._initPlugin();
    }

    , _initPlugin: function()
    {
        var _self = this;

        // Get quantity field
        this.inputField = this.element;

        // Insert plus/minus buttons
        this.inputField.after('

');
        this.inputField.before('

');

        // Activate plus/minus buttons
        this.qtyButtons = this.inputField.next(this.options.qtyButtonsWrapperSelector).find(this.options.qtyButtonSelector);
        this.qtyButtons.on('click', function() {

            var $button = $(this);
            var oldValue = _self.inputField.val();
            var newVal = 0;

            if (isNaN(oldValue))
            {
                _self.inputField.css('color', _self.options.errorColor);
            }
            else
            {
                if ($button.hasClass('increase'))
                {
                    newVal = _self.qtyAdd(parseFloat(oldValue), 1, 4);
                    _self.inputField.css('color', '');
                }
                else
                {
                    var candidateNewValue = _self.qtySubtract(parseFloat(oldValue), 1, 4);
                    if (oldValue > 0 && candidateNewValue > 0)
                    {
                        newVal = candidateNewValue;
                    }
                    else
                    {
                        newVal = 0;
                        _self.inputField.css('color', _self.options.errorColor);
                    }
                }

                _self.inputField.val(newVal);
            }

        });

    }

    , qtyAdd: function(a, b, precision)
    {
        var x = Math.pow(10, precision || 2);
        return (Math.round(a * x) + Math.round(b * x)) / x;
    }

    , qtySubtract: function(a, b, precision)
    {
        var x = Math.pow(10, precision || 2);
        return (Math.round(a * x) - Math.round(b * x)) / x;
    }

  }); //end: widget

})(jQuery, window, document);


texts: Magento Connect no longer works after migration

texts: I moved a site from a dev server to production and Magento Connect no longer works.  I've seen several posts on the /downloader/perlib fix but I'm using 1.9.1 and that file isn't there.


texts: To remove "Grand Total (Excl.Tax)" from Invoice email Magento 2

texts:
I want to remove this line from my invoice email.
"Grand Total (Excl.Tax)"

can anyone please tell me the file name or the process to remove this line from invoice email.

thank you


texts:
I am getting this error on my controller

  PHP Fatal error:  Uncaught Error: Cannot instantiate abstract class
  Magenest\QuickBooksOnline\Controller\Adminhtml\AbstractQueue in
  magento/framework/ObjectManager/Factory/AbstractFactory.php:116

how can we fix this error ?


texts: converting Data Object to Magento 2 collection not working

texts:
I have a function defined in Magento 1

public function getStatusMappingCollection()
{
    if (is_null($this->_statusCollection)) {
        $this->_plentyStatusCollection = new Varien_Data_Collection;
        $configStatusMapping = $this->_helper()->getOrderStatusMapping();
        foreach ($configStatusMapping as $status) {
            $item = new Varien_Object();
            if (isset($status['plenty_order_status'])) {
                $item->setPlentyStatus($status['plenty_order_status']);
            }
            if (isset($status['magento_order_status'])) {
                $item->setMageStatus($status['magento_order_status']);
            }
            $this->_plentyStatusCollection->addItem($item);
        }
    }
    echo "<pre>";print_r($this->_plentyStatusCollection);die;
    return $this->_plentyStatusCollection;
}

I am trying to replicate it in Magento 2. I have done something like this using the code-migration-develop tool.

public function __construct(
    \Plenty\Orders\Helper\Data $ordersHelper,
    \Magento\Framework\Data\CollectionFactory $collectionFactory,
    \Magento\Framework\DataObjectFactory $dataObjectFactory
    array $data = []
) {
    $this->ordersHelper = $ordersHelper;
    $this->collectionFactory = $collectionFactory;
    $this->dataObjectFactory = $dataObjectFactory;
    parent::__construct(
        $data
    );
}

public function getStatusMappingCollection()
{
    if (is_null($this->_statusCollection)) {
        $this->_plentyStatusCollection = $this->collectionFactory->create();
        $configStatusMapping = $this->ordersHelper()->getOrderStatusMapping();
        foreach ($configStatusMapping as $status) {
            $item = $this->dataObjectFactory->create();
            if (isset($status['plenty_order_status'])) {
                $item->setPlentyStatus($status['plenty_order_status']);
            }
            if (isset($status['magento_order_status'])) {
                $item->setMageStatus($status['magento_order_status']);
            }
            $this->_plentyStatusCollection->addItem($item);
        }
    }
    echo "<pre>";print_r($this->_plentyStatusCollection);die;
    return $this->_plentyStatusCollection;
}

In Magento 1 code I was able to print the collection $this->_plentyStatusCollection and check the values in it, but when I try to print the same value in magento 2 I get an error

 Allowed memory size of 792723456 bytes exhausted.

I have checked in php.ini file, a memory limit is specified as

memory_limit=4G

This should be sufficient.

I also checked by using getData().

echo "<pre>";print_r($this->_plentyStatusCollection->getData());die;

After using getData() I get the following error.

Fatal error:  Uncaught Error: Call to undefined method Magento\Framework\Data\Collection::getData()

It means something is wrong with my way of assigning object to collection but I googled it and found that this is the correct way. I followed this thread
Magento2: Convert DataObject/Array into magento2 Collection?

My question is If it is the correct way of assigning object to a collection and also how I can check the values inside collection.


texts:
I'm creating a mobile app using the Ionic 2 framework. Can anybody please point me in the direction of getting started or some boilerplate code for using Magento's XML_Connect through Javascript?

I have searched but haven't come up with anything.

Thank you!

EDIT

I apologise if this question seems rather broad, but I honestly am drawing a blank with getting started with XML_Connect. As I am building a mobile app, my understanding is that XML_Connect is better to use than the SOAP or REST APIs, as it already provides all the necessary functions. At a very basic I need to learn how to:

Create a new session;
Login/Create a customer;
Pull in categories;
Render products from a category;
Render the Product detail (Simple and Configurable products);
Add products to a cart; and
Checkout

Additionally, as I'm building my app using the Ionic Framework, the only scripting language I'm able to use is Javascript.

I should add that I have already activated the module in Magento, have the new Mobile menu available, and have generated a new app code.

The article: http://inchoo.net/ecommerce/magento/develop-your-own-magento-mobile-application/ didn't help much.


texts: How to call knockout functions from html (Magento 2)

texts:
I have functions defined in my knockout js,

define([
    'Magento_Ui/js/form/form',
    'ko'
], function (Component, ko) {
    'use strict';

    function viewedProducts() {
        let rvp = JSON.parse(window.localStorage.getItem("viewed_recently_products"));
        return Object.values(rvp);
    }

    function initYXProductsCarousel() {
        YX_UI_UTIL.initYXProductsCarousel('#rv-content .yx-products-carousel');
    }

    function initRecentlyProductsLocalStorage() {
        console.log("in initRecentlyProductsLocalStorage ");
        if (!(localStorage.getItem("viewed_recently_products"))) {
            localStorage.setItem("viewed_recently_products", YX_UI_UTIL.pageVariables.newRecentlyProducts);
        } else {
            localStorage.setItem("viewed_recently_products", YX_UI_UTIL.pageVariables.oldRecentlyProducts);
        }
    }

    return Component.extend({

        recently: viewedProducts,
        rvCarousel: initYXProductsCarousel,
        rvStorage: initRecentlyProductsLocalStorage,
        initialize: function () {
            this._super();
        },
    });
});

and I want to call rvStorage function first and rvCarousel at the end of html.

I tried this code (Html content):

 <-- ko $parent.rvStorage() -->

 <-- ko foreach: { data: recently(), as: 'productView' } -->

 <--/ko-->
 <--ko $parent.rvCarousel() -->

and this too:

<-- ko rvStorage() -->
<-- ko foreach: { data: recently(), as: 'productView' } -->

<--/ko-->
<--ko rvCarousel() -->

But both of them don't work.


texts: Magento 2 Assign a custom group to the company and its admin on new company registration

texts:
I would like to assign a custom B2B group to the company and its admin when a new company account is created so I modified module-company/Controller/Account/CreatePost.php
I added a custom method which can get the group id of "B2B" group and set it to the company admin
private function setB2bGroup($customer)
{
   $om = \Magento\Framework\App\ObjectManager::getInstance();
   $b2bHelper = $om->get('my_vendor\Common\Helper\Utils');
   $customer->setGroupId($b2bHelper->getB2BGroupId());
   return $customer;
}

and use it in execute()

then the registration works fine, both the company and the admin were created.
However, they are still assigned to group Default (General). I am sure my setB2bGroup() does its work and I tried to look into createAccount() method and it really did nothing to modify group id so I wonder which part I did was wrong to get the company and its admin assigned to the right group


texts: My Custom Column "QR Code" Don't Have Data in my CSV Export

texts:
I added a QR Code column in my admin grid, where I concatenate my order_id and increment_id.

class QrCode extends Column
{
    public function prepareDataSource(array $dataSource)
    {
        if(isset($dataSource['data']['items'])) {
            foreach($dataSource['data']['items'] as &$items) {
                $increment_id = $items['increment_id'];
                $order_id = $items['order_id'];

                $items['qrcode'] = $increment_id." ".$order_id;
            }
        }

        return $dataSource;
    }
}

It worked and displayed in my admin grid perfectly but it won't show when I export it to CSV. What should I do?


texts: I have writing more than 300 rating and review so here display all review but i want to display as pagination?

texts:
I have writing  more than 300 rating and review so here display all review but i want to display as pagination if any better solution please suggest me.

because when product view more than 1500 goes its not good appear for customer as well as site.


texts: Automatically fill in custom customer attribute based on name when customer registers

texts:
I have a custom customer attribute called 'nickname' in my magento store.

When a new customer registers i want to be able to automatically fill this in based on their combined first and lastname. So if a customer registers as John Doe the nickname attribute will automatically be filled in as johndoe

I know in PHP i can turn John Doe into johndoe by doing:

$name = 'John Doe';
$nickname = str_replace(' ', '', $name);
$nickname = strtolower($nickname);

I just need to know how I can set this at the time of registering? What existing file/files would I have change?


texts:
I am placing an order using the bank transfer payment method and when I watch the network traffic, I can see that I get a 302 redirect to the cart on my checkout/onepage/success page. It used to work just fine and suddenly stopped. Any idea what might be causing this behaviour or where to look?

The logs do not show anything suspicious. It happens with the default bank transfer payment.

Magento 2.1.12


texts:
I have used this in my custom module and this is working.
https://magento.stackexchange.com/a/256280/55674

What i want to know is if there is a way to show/hide an entire fieldset using above method.

Can anyone provide a better way for that?
Thanks


texts: How can I add a custom Middleware for header validation in Rest API?

texts:
I have added 2 new Web APIs for the customer, but I want to add a new HTTP Header authentication with parallel to Authorization token.

My customer header is AppToken. How can I add a middleware to the Web APIs ?


texts: Magento 2: Possible to set up drop-down attribute without selecting "Is Default"?

texts:
We're in the process of setting up our Magento 2 dev site, and in creating some drop-down elements that will display on the front-end if selected, it occurred to me that there doesn't appear to be a way to create a drop-down type element that doesn't have a value set as "Is Default."

I'd like to have it work so that if a product has a value for that particular attribute, then it displays the value on the product page, but if it doesn't have that attribute in our data, then the field doesn't display. As it is, I can't not have data in a drop-down element, because the "Is Default" is required to be set, so whatever that's set to appears on our site.

Now, I could always create a default value of, say, "none selected" and then use php in the product page templates to say something like:

if($attribute name != "none selected"): [code to display attribute value]...

But, I'd prefer it if I wasn't forced to select a default value in the first place. Is there something I'm missing?


texts: Magento 2 How to set up restrictive attributes?

texts:
I would like to know how I can set up an attribute that would filter the items listed with multiple values selected.
For example if I offer rings and I set a material attribute.
I would have among others the values, silver, gold, wood etc...
I would like that by checking silver and wood, appear ONLY the products made of these two materials (and not one or the other).
Thanks for your help


texts:
ok... I have an ecommerce site that I like they way it looks and want to use it for another different domain/site. I only have a few products on the site and a couple users. I also haven't setup a payment system on this site.

I want to transfer the whole site and database to a new server/new url as a base for the new site... do I need to copy the same encryption key from the original site or make up a new one for the new site?

Thanks


texts: How do I find the number value for an attribute?

texts: I'm editing existing code on a product page that was made by a third party.  They've got an $ignore on attribute number values that block attributes from displaying on the page.  Instead of trial and error is their something that will show me a list of  attributes and numbers?


texts: How can I get Magento Each Session values by using Magento frontend cookie value through Web Service?

texts:
We are developing separate home page from Magento and accessing information from Magento through Web Services and will integrate this external home page with existing Magento website.

But on this home page I am facing a problem related to session I have created a frontend cookie on this external home page. But I have no idea how can I get session values by using frontend cookie value.

I am working on this problem from last 1 week please post your valuable answer from which I can resolve my problem.

Thanks


texts:
Hello everybody,

I need to for my webshop to have free shipping when you buy 3 or more products. When you buy less then 3 product it will cost you €6,75. I have made the free shipping and flat rate through admin>system>configuration but now it show free shipping and flat rate. Costumers can choose which one they want. I have set miminum amount of products to 3 by free shipping but that doesn't work. When i put 1 product in my cart and go to Shipping Method i still see both. Does anybody knows how to fix this? Tnx

Tnx guys for helping me with this problem. It's working now. Instead of working with products i did it with price.I took the amount between the prices of 2 and 3 products


texts: Weird upload image bug creating a blank image? - Magento 1.7

texts:
Hey guys hope you're doing well, I have an interesting issue that has persisted since I started working that is becoming more and more of a hassle.

In the Admin Panel when I go to Catalog-->ManageProducts-->Click on a Product then on the left click "Images"

I click on "Browse Files" and select an image:

Then I click on "Upload Files" and I get:

The problem now is that I select that image for 'Base Image', 'Small Image', and 'Thumbnail' and click "Save and Continue Edit" which results in:

This is super annoying because I have to manually upload images and this makes it take about twice as long.  Where is the controller for this function in the admin?  Is the Save and Continue Edit calling an extra product->save() somewhere?


texts: Edit existing shipping address on checkout page not working - magento 2

texts:
The feature required is to allow the logged in user to edit any of his previously added address on the checkout page.

Initially, the edit option was not there against the existing addresses. I changed the following lines in the following file

  /Magento_Customer/web/js/model/customer/address.js

 isEditable: function ()
 {
     return true;
 },

In doing so the edit link does appear on the addresses. ( please see the screenshot )

Now the problem is when I click on the edit link, the popup which gets displayed doesn't have the fields populated with the address selected ( please check the screenshot below ). If I fill the fields up and save the address, it gets added as a new address.

Another point to notice here:
If I add a new address and save it and without refreshing/redirecting I click on edit then the form fields populate properly and gets saved properly as well.

Does anyone have any suggestion or solution as to how to allow edit of the old addresses properly on the checkout step?


texts: Email validation on Registration and checkout page on magento 2

texts:
At registration and checkout page there is bug related to email validation like if you enter

john@mail.test.com

in email field then magento will accept such wrong email format.
Actually magento doesn't verify domain format.
Anybody knows how can we fix it?
Thank you,
Vijay


texts: How to model country specific product information?

texts:
I am struggeling to find a suitable modelling approach for the following situation.

Base requirements:

One store for each country, each store having one main currency
Each country store can support multiple languages
Some languages are used in multiple stores (i.e. German is used in Germany and Switzerland)

Product management / modelling requirements:

Products are stock managed
Products should be shared over the multiple country stores. But they have to vary in the attributes "price in store currency" and "power plug type". The german store should offer the toaster with the german plug only for EUR 35, whereas the swiss shop should offer the "same" product with the swiss plug only for CHF 40.
The plug selection should properly impact the stock inventory.
Avoid redundancy: It should be possible to edit the language specific attributes only once and then share it over multiple stores.
Avoid redundancy: It should be possible to edit shared attributes only once: i.e. images, weight.

I tried different approaches but I always ended up having a lot of redundant product data to maintain.

Any suggestions on how to model the scenario in a way that fulfills the requirements but does not lead to product redundancy?

-- UPDATE --

Since the requirements only seemed to be misleading, I'm adding a short descripion of the actual scenario:

3 shops, each with its own domain: One for the netherlands (.nl), one for Switzerland (.ch) and one for Germany (*.de).
Switzerland supporting 3 languages (german, french, italian), all product listed in CHF (Swiss Franc)
Germany supporting german only, all products listed in EUR
Netherlands supporting dutch only, all products listed in EUR
All shops sell the same about 300 products. They only differ in price, language specific description and in power plug type.

We are trying to find a solution that doesn't force us to duplicate those products 3 or more times.


texts: How to set whole website as 2 column left in magento 2?

texts:
I have installed magento2 and created the categories. I need to show all categories on left hand side vertically and all the content on right hand side?

Is that can be done? I am able to remove all categories from top navigation by below code.

 <referenceBlock name="catalog.topnav" remove="true" />

How i need to show all the categories vertically in left hand side? Please anyone suggest me.I couldn't find any appropriate solution.


texts: Product Page View Blank For Some Products

texts:
So if you take a look at this page:

http://www.butterfliesbridal.co.uk/wedding/mother-of-the-bride/70825.html

You will notice that the product page view.phtml seems to be blank, however if I go to the category page and click on some other products the view displays. Any idea why this might be happening?

So far I have tried a re-index and reset my cache.


texts:
I am using Magento 1.9. I had configure the mail setting and my newsletter mail also working properly.

But when I tried "About Us" it show me the below error message

  Unable to submit your request. Please, try again later

i had also go through the code. The $mail->send(); function generate an exception

  Unable to send mail.

i am not getting the issue.
Please help me to solve same.


texts: Recreate sales order grid in custom admin page

texts:
I'm looking to create a custom admin page and add a grid similar to the sales_order_grid.
I've already created my admin route, menu item and page -- just can't seem to figure out how to duplicate the sales order grid so I can customize it a bit more.
In my admin layout, I can do the following to duplicate the Sales Order Grid:
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="content">
            <uiComponent name="sales_order_grid"/>
        </referenceContainer>
    </body>
</page>

But is there a way I can now extend or customize just this page without it updating the original Sale > Order Grid? I'm basically looking to keep the sorting / filtering of orders, I just need to customize the columns for this particular page.


texts: Is there a way to temporary change a configuration value during runtime? (no saving)

texts:
I want to change a variable during runtime in Magento 2. Is this possible? If I look at how scope configuration works it only exists of getters, but I cannot find a way to manipulate this during runtime.

Please note that I do not want to save the value.

My use case: for some specific pages I want to hide the suffix. I want to do this by changing the configuration value design/head/title_suffix during runtime so it's reflected everywhere where this value is used.


texts: link redirection not working on live server

texts:
I have a link in static block footer which is
Affiliates. It's working fine in my local server but when I  uploaded it to live it'snot redirecting ..It's getting stopped at my controller url www.mydomain.com/affiliate/account/create/ and showing blank page. I have already checked for typos. What else could be the problem?

 public function createAction() {
        $this->loadLayout();
        $this->renderLayout();
    }

EDIT: noticed all my controller links to that particular controller file are not working only one template file which I had in dashboard which doesn't require controller to load is running properly other than that all the links related to controllers are not running (500 internal error showing in the browser console).


texts:
after adding module i get below error

Maximum function nesting level of '100' reached, aborting!

i have seen lots of solution availble for it

i tried to change php.ini inside my folder and set
max_nesting_level = 200

still getting same error and could not find any such line in my php.ini file "max_nesting_level "

what have i to do to make it work

below is my code for observer

    public function loadaftercatalog(Varien_Event_Observer $event) {
        if($_GET['id']){
            $_producttoadd=Mage::getModel('catalog/product')->load($_GET['id'])->getPrice();// if i remove this line it works fine

            $product = $event->getEvent()->getProduct();
            $originalprice = $product->getPrice();
            $customprice = $originalprice+$pricetoadd;
            $product->setPrice($customprice);
        }
   }

/********************************************************************/
    For solution check :

http://magento.stackexchange.com/questions/50244/observer-getting-called-more-than-once


texts:
I came through a problem with shipping labels on Magento 1.9.

When I try to create a label for UPS (using button "ship" and checking "create shipping label") a popup appears (so far so good) BUT after I create my package and clicking "ok" I got an

"Missing or invalid ship from address line 1".

As far as I know this is coming from UPS API.

My addresses are OK, I tried with several ones, but still got this error message.

Does someone have an idea about what is going on?


texts: Configurable with Same Configuration Options but different SKUs from different Vendors

texts:
In Magento 1.9 , please consider this problem.

One Jersey with different colors and sizes is manifested as a Configurable in my System. (For example, with Colors: REd,Blue,Green and Sizes : AS,AM,AL,AXL)

So JERSEY-RED-AM is a Simple product in the System that can be chosen from the configurable in the website.

But for me, JERSEY-RED-AM is supplied by different sources. And they have different pricing .  So I catalog them internally as different SKUS.
JERSEY-RED-AM : SKU1 - $10.50
JERSEY-RED-AM : SKU2 - $12.00
JERSEY-RED-AM : SKU3 - $13.00

I'd like to sell the SKU1 first as part of the configurable, then when that runs out of stock, automatically add the SKU2 to the configurable .

Is this even possible? How can I use Magento to solve this problem? is it possible to do this without custom coding? Any pre-existing extensions?
If custom code, any ideas on how to approach this?


texts: Given the image above, How can i remove the highlighted element above on my new order email? i tried removing it via local xml      didnt work. Any help wpuld be appreciated.


texts: Upgraded from 1.9.2.4 to 1.9.3 Bundle "Price as configured" Price Shows Zero

texts: I just upgraded from 1.9.2.4 to 1.9.3 and having a problem with the Bundle "Price as configured" price. The problem is it always shows zero no matter which bundle sub-products are selected. It was completely fine in 1.9.2.4 and only started happening in 1.9.3. By the way, this only happens to the price at the bottom near the "add to cart" button. The price at the top (right after the product title) updates as expected. This is plain unmodified RWD theme. Please help.


texts: Magento 2 : Get Customer ID Based on Nickname of Review

texts:
I want to get customer_id from a customer that has written a review.

In review_details there is a row for that, and there is function getNickname().

How can I get customer_id in my module? What do I need to create in order to get that piece of information?


texts: Checking if user is newsletter subscriber or not

texts:
I want to check that the user is newsletter subscriber or not in email footer template in admin panel. I am unable to find a variable which can check like this:

{{ if($userIsSubscriber) { //Code//}}}

I know above syntax is wrong but I need code somewhat like this as I want to show some specific part of template to our user who are subscribers.

Thanks


texts: Magento 2.3.5 Content Security Policy false positive cdn fonts

texts:
Since the update of 2.3.5 that came out today Magento built in "Content Security Policy" and that's great but now I'm wondering how to ignore/whitelist CDN font's that are now being reported as a false positive in the console log.
Also it says Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

Does someone have more experience with "Content Security Policy" that can help me out?

[Report Only] Refused to load the script 'https://kit.fontawesome.com/a0b92fa8c0.js' because it violates the following Content Security Policy directive:
"script-src assets.adobedtm.com geostag.cardinalcommerce.com 1eafstag.cardinalcommerce.com geoapi.cardinalcommerce.com 1eafapi.cardinalcommerce.com songbird.cardinalcommerce.com includestest.ccdc02.com www.googleadservices.com www.google-analytics.com secure.authorize.net test.authorize.net www.paypal.com www.sandbox.paypal.com www.paypalobjects.com t.paypal.com s.ytimg.com video.google.com vimeo.com www.vimeo.com js.authorize.net jstest.authorize.net js.braintreegateway.com cdn-scripts.signifyd.com www.youtube.com 'self' 'unsafe-inline' 'unsafe-eval'".
Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.


texts: how to manually migrate custom module in magento 1.9.2.2 to magento 2.1

texts:
I have created a custom module in magento 1.9.2.2 and now I want to move the custom module in magento 2.
I read few articles and also the magento2 custom module creation but i am getting confused from where to start.
Since the syntax of magento2 is different from magento 1.9.2.2
Controller Action functions are separate in magento2 so do i have to create separate php file for every action function of a controller in magento 1.9.2.2?


texts:
I have set up a multi store in magento, so I have example.com and example.com/wholesaler what I need to do is have everyone who is in customer group wholesale redirected to example.com/wholesaler from the example.com store.

I originally tried this http://www.magentocommerce.com/magento-connect/custom-login-redirect-extension.html works perfectly for redirecting on the example.com site, but because when you login the url changes to example.com/index.php it creates example.com/index.php/wholesaler which is a 404.

Does anyone have a solution to get my customers in the wholesale group across to my other store?


texts: How can I use Namespaces and USE function in magento 1.9?

texts:
How can I use Namespaces and USE function in magento 1.9 ?
I dont want to use require or include function just set one namespaces and use this in my controller like laravel or magento 2.
Is it possible in magento 1.9.


texts: Change and Extend Credit Card Expiration Years in Drop Down

texts:
Can someone tell me what the path is to change or add and apply additional years in the credit card "expiration date" drop down fields. We have a credit card we need to run that expires in 2023 and the drop down only goes to 2020
I need to extend and add another 10 years to the code.  But i cannot find the path in the control panel to add to the following code:

            Expiration Date *

                                        January
                            February
                            March
                            April
                            May
                            June
                            July
                            August
                            September
                            October
                            November
                            December

                            2012
                            2013
                            2014
                            2015
                            2016
                            2017
                            2018
                            2019
                            2020


texts: Email sending issue in Magento CE 1.9.2.1

texts:
I am using Magento 1.9.2.1 and have installed SMTP pro module to send email.

When I run smtp self test from admin, it successfully sends email to provided email id.

But on customer signup, order placed and click on send email button from admin, there is no mail sent to customer/guest.

When I load "mydomain.com/cron.php" or set cron setting in cpanel, no mail is sent to customer.

Please tell me the email settings for Magento 1.9.2.1 and what is the problem here?


texts: Magento 2.1: Custom Option IDs regenerated during site edit - how to manage?

texts:
I am developing an interface between Magento and Epicor 9 and we access our customer's orders using the REST API.  When the customer buys one of our custom products, they modify their order using Custom Options.  Their choices appear in the API response packet as follows:

{
  "items": [
     {
       ...
      "sku": "custom-product-1",
       ...
      "product_option": {
        "extension_attributes": {
          "custom_options": [
            {
              "option_id": "867",
              "option_value": "952"
            },
            {
              "option_id": "868",
              "option_value": "Please make sure that art is centered. Thank you!"
            },
            {
              "option_id": "869",
              "option_value": "image/jpeg,Our_Company_Logo.jpg,custom_options/quote/T/h/f311f8f7f56a74b8c8a95c310895930a.jpg,custom_options/order/T/h/f311f8f7f56a74b8c8a95c310895930a.jpg,/var/www/vhosts/ourdomain.com/pub/media/custom_options/quote/T/h/f389f8f7f56a74b8c8a95c310895930a.jpg,25550,200,199,f311f8f7f56a74b8c8a9"
            }
          ],
         ...

Apparently, Magento changes the option_id and option_value values every time the site structure is changed and re-saved (bringing me to my first question: REALLY??!?).  Luckily, Magento provides this information via the REST interface (fragment below part of response to GET /rest/V1/products/custom-product-1/options, note use of sku as key):

[
 ...
{
    "product_sku": "custom-product-1",
    "option_id": 867,
    "title": "White Option",
    "type": "drop_down",
    "sort_order": 2,
    "is_require": true,
    "max_characters": 0,
    "image_size_x": 0,
    "image_size_y": 0,
    "values": [
      {
        "title": "No White",
        "sort_order": 1,
        "price": null,
        "price_type": null,
        "option_type_id": 950
      },
      {
        "title": "Spot White",
        "sort_order": 1,
        "price": null,
        "price_type": null,
        "option_type_id": 951
      },
      {
        "title": "Flood White",
        "sort_order": 2,
        "price": null,
        "price_type": null,
        "option_type_id": 952
      }
    ]
  },
   ...
]

As long as my co-developers do not change the title of the option from 'White Option', this can work.
However, edits to the site will change ALL option_id and option_value values in the site, which means that orders placed before the change become impossible to translate, even knowing the correct title attributes.

Sure, we can save the option definitions every time they change, and look up the correct translation based on created_at, but before we do that, I wanted to check with the community.  How do you code against these changing values?  Is there something we missed?


texts: Automatically add my logo in products images

texts:
is there a way to add automatically my logo in the bottom right(whatever) position of my product images?
Thanks.


texts: Magento 2 checkout page showing "No items to ship found in rates request" error

texts:
I'm new in Magento. I have purchased a theme and setup it.

After that, I have uploaded some products, but I can't complete the order process.

When I tried to order it showing below error in Payment Review section.

Below I have attached the screenshot.


texts: Magento2 having Issue in language installation "Duplicated translation is found, but it is not allowed"

texts:
I am trying to install German language pack and its showing me error
' Duplicated translation is found, but it is not allowed '

Commands:

wget https://github.com/mageplaza/magento-2-german-language-pack/raw/master/de_DE.csv

php bin/magento i18n:pack -m replace de_DE.csv de_DE

php bin/magento cache:clean

php bin/magento setup:static-content:deploy de_DE

php bin/magento indexer:reindex

php bin/magento cache:clean

php bin/magento cache:flush

when I run the third command the error is shown. Please help me to fix this error.

Thanks in Advance..


texts: Magento2 - Wordpress5.2.4 installation issue

texts:
I am using a magento 2.2.5 site. I have installed WordPress in a sub directory of my root directory. I have integrated the WordPress 5.2.4 in magento site by using fishpig WordPress extension. All other things are working fine. Now I got all my WordPress post in this url www.example.com/blog

The issue is i tried saving post in WordPress admin but it reflects error as below
api-fetch.min.js?ver=3.1.2:1 POST hwww.example.com/blog/wp-json/wp/v2/posts/6978?_locale=user 404 (Not Found).

How can I do it? When ?

I tried the permalinks extension in WordPress,but still the issue exist.


texts: new orders are not showing in orders grid

texts:
I upgraded from Magento 2.5.0 to 2.3.1

I am using only PayPal as a payement method.

new orders are not showing in the orders grid in Admin > Sales > Orders

when I check PayPal summary I can find the invoice number so it is created in Magento but not showing in the grid

I already tried to change

Store > Configuration > Advance > Developer > Grid Settings

Enable / Disable, flush cache, reindex,  but not working

Any fix please.

update:
When I check sales_invoice there is no recent invoice !!but in PayPal summary I have the invoice number and items !!


texts: Magento 2.3 - Updating a customer without store_id sets the store_id to default using REST

texts:
There are multiple store views in my site. I created a customer and set his store view to some value that is not the default.

Use the rest api to change the first name of the customer (Like: put to PUT rest/V1/customers/8)

I used the following body

{ "customer":         {
            "id": 1,
            "group_id": 1,
            "default_billing": "0",
            "default_shipping": "0",
            "created_at": "2019-05-13 14:33:11",
            "updated_at": "2019-05-13 14:33:11",
            "created_in": "alternate store view",
            "email": "xxx@redacted.com",
            "firstname": "firstname alternate",
            "lastname": "lastname",
            "gender": 0,
            "website_id": 1,
            "addresses": [],
            "disable_auto_group_change": 0
        }
}

So All the fields not passed in the PUT call are not changed (Including store_id) but it changed the store_id to default store_id.

I need to know why it changed the store_id, is store_id is mandatory if yes then why it does not show the error or it just save with default store_id if store_id not given in the request.

Any help, experience and knowledge sharing would be appreciated.