texts:
Magento custom module model returns empty data array,what would be the issue.I am new to magento.Trying to create custom module.Please help me out.please check below screen

/Model/Suites.php:

<?php

class Bespoke_Suites_Model_Suites extends Mage_Core_Model_Abstract{

public function _construct(){
    parent::_construct();
    $this->_init('bespoke_suites/suites');
}

/Model/Resource/Suites.php :

<?php
class Bespoke_Suites_Model_Resource_Suites extends Mage_Core_Model_Resource_Db_Abstract{

public function _construct(){
    //parent::_construct();
    $this->_init('bespoke_suites/suites','suites_id');
}
}

config.xml

.....
<bespoke_suites_resource>
    <class>Bespoke_Suites_Model_Resource</class>
    <entities>
        <suites>

bespoke_suites

        </suites>
    </entities>
</bespoke_suites_resource>
.....


texts: Magento 2 - SessionHandler::gc(): ps_files_cleanup_dir Permission denied (13) in vendor/magento/framework/Session/SaveHandler.php on line 138

texts:
Sometimes I am getting this error lately in Enterprise 2.3.5-p2 after saving CMS pages for example.

Notice: SessionHandler::gc(): ps_files_cleanup_dir:
opendir(/var/cpanel/php/sessions/ea-php73) failed: Permission denied
(13) in
/home/company/company.de/vendor/magento/framework/Session/SaveHandler.php
on line 138

Why is this showing and how can I fix it?


texts: Catalog price rule calculates incorrectly

texts:
Recently upgraded from 1.7 to the latest version (1.9) of CE.

Having a problem with a catalog price rule - and it's the first rule I've set up since the upgrade.

The rule is set up to be 10% off all products from a particular brand. Very simple. Priority is zero and have it set to stop processing after this rule. There are other rules set as 'active' but they're all expired.

When I make this rule active and apply it, the discount shown on the front end is much larger than 10%, it's more like 30%.

And if I apply a discount of 0%, the items all show a discount of around 10%.

I'm not sure if the rule is getting applied multiple times, or there are deleted rules that are being applied in correctly.


texts: Magento 2.1: Trigger event after "super-attribute-select" is populated

texts:
I have a bunch of configurable products with just one attribute each.

I need to select the first product in the super-attribute-select <select> box (e.g. the second <option>).

This code works from the console...

jQuery('select.super-attribute-select option:nth-of-type(2)').prop('selected', 'selected');
jQuery('select.super-attribute-select').change();

...but not from document.ready, as the <select> box is only populated after the page loads.

Does anyone know the proper technique for doing this?


texts: Rewrite catalog/image helper function for all pages but subcategory_listing

texts:
I am using a third party module which is rewriting catalog/image helper function for product images.

<global>
        <models>
            <pio>
                <class>Kadro_PIO_Model</class>
            </pio>
            <catalog>
                <rewrite>
                    <product_image>Kadro_PIO_Model_Product_Image</product_image>
                </rewrite>
            </catalog>
        </models>

Is it possible to disable this Extension/overwrite for catalog/navigation/subcategory_listing.phtml only so that there is used the standard Magento category/image function?


texts: i need set flag in model save before event and get in model save after event in magento 2

texts:
I have Create two event model save before and after i get specific object and set flag in before model and get in after model.
for example
in before model

    public function execute(\Magento\Framework\Event\Observer $observer)
    {
            $obj = $observer->getEvent()->getObject();
            if ($obj instanceof \Magento\Customer\Model\Customer)
            {
             $this->isNew = is_null($obj->getId());
             //var_dump($this->isNew);die; //true
             return;
            }
}

in after model

 public function execute(\Magento\Framework\Event\Observer $observer)
 {
     var_dump($this->isNew); die; //Null
 }


texts: Magento2, Access item options through ObjectManager in minicart observer does not work

texts:
I'm trying to get the value of custom options value in minicart observer. Using Objectmanager results to error "We can't add this item to your shopping cart right now."

<?php
/**
 *  CustomPrice Observer
 *
 * @category    CustomPricing
 * @package     CustomPricing_RentPricing
 *
 */
namespace CustomPricing\RentPricing\Observer;

use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\App\RequestInterface;

class CustomPrice implements ObserverInterface
{
    public function execute(\Magento\Framework\Event\Observer $observer) {
        $item=$observer->getEvent()->getData('quote_item');
        $product=$observer->getEvent()->getData('product');
        $item = ( $item->getParentItem() ? $item->getParentItem() : $item );
        if ($product->getData('rent_price')) {

                        $product_id = $product->getId();
                        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
                        $_product = $objectManager->create('Magento\Catalog\Model\ProductFactory')->create()->load($product_id);
                        foreach ($_product->getOptions() as $options) {
                            $optionData = $options->getValues();
                            foreach ($optionData as $data) {
                                $optionPrice[] = $data->getPrice();
                                $optionDuration[] = $data->getTitle();
                            }
                        }

            } else {
        $price = $product->getPrice();
            }
        $item->setCustomPrice($price);
        $item->setOriginalCustomPrice($price);
        $item->getProduct()->setIsSuperMode(true);
    }
}


texts:
I have created a coupon code for free shipping following steps similar to described here, but when I try to use valid or not valid coupon code Magento (1.4.1.1) does nothing.

Site URL and coupon code is TEST

Any clue?

Thanks


texts:
I am new to M2 so please bear with me.
I have purchased a theme "Ultimo 2" the problem is that on the demo theme on checkout it goes to /checkout/onepage. I have installed this theme on my local but on the checkout I only have 2 steps Shipping and Review and it redirect to /checkout page not on /checkout/onpage

Can anyone suggest what is wrong? I have checked the admin panel and set OnePage to Yes in the Cart option.

Onepage Checkout

My Checkout page


texts: Add external JS tracking script to tracking/popup.phtml

texts:
I want to insert an external js to popup tracking page to get shipping information provided by an API service.

I need to pass the shipping number (that is yet in the popup tracking) to this js... here is the code:

I use 2 approach:

  edit details.phtml adding the JS but not working
  Insert code in a block and call via widget but I don't know how to call shipping tracking number.

Here where I want to display the tracking

Here the tracking script


texts: Order replaced/overwritten by another order

texts:
So far this issue has happened with two orders on the site.

User A places an order and gets their order confirmation email for order #123
User B places an order except that their order # is also 123.
User A and all traces of their order are all gone and overwritten by User B's order #123

I've searched in the database tables and order grids for the original user's name, email address, address, etc but nothing comes up at all. It's as if the entire order and everything associated with it was replaced by another order.

Both customers were billed for their orders and payment was made.

What could have happened to the original order? There's no relevant error messages in the logs. Where might be a good place to look for more info on what caused this?

UPDATE

The hosting provider was experiencing electrical issues on the same day that all the orders in question were placed on. They ended up having to restore from a backup that didn't have all the orders placed that day on it.

Magento just continued writing orders at the increment id where it left off as if nothing happened.


texts: Magento 2 MEQP2 WARNING | The use of function file_get_contents() is discouraged

texts:
I am getting WARNING | The use of function file_get_contents() is discouraged. but its working fine but not for MEQP2 its giving WARNING so how use alternate of function file_get_contents() in the code.

public function importFromTranslationFile($filePath)
{
    $fileContent = file_get_contents($filePath);
    if ($fileContent !== false) {
        $fileContent = trim($fileContent, '`');

        return json_decode($fileContent, true);
    } else {
        return false;
    }
}


texts: Add taxes in the price filter - Magento 2.3

texts:
The prices of my products are added without taxes. The price filter that appears on my page is without taxes as you can see in the following picture

Is it possible to add taxes to this price filter?


texts: How to install module-sample-scss in Magento 2

texts:
I'm trying to install this module (magento/module-sample-scss) in Magento 2 with composer as described here, but with no success.

If I run this from the Magento root folder:

$ composer require magento/module-sample-scss

I get this error:

  Could not find package magento/module-sample-scss at any version for your minimum-stability (alpha). Check the package spelling or your minimum-stability

What am I doing wrong? Any help is really appreciated.

Updates

I tried with "minimum-stability": "dev" => Same error.

I tried to run composer update: it normally works and it say Nothing to install or update. But I get the same error when I try to install the module.


texts: I have 60 Million product in my Magento 2 but indexer:redindex not working

texts:
I have 60 Millions products in my Magento 2 Store.
But when i run bin/magento indexer:reindex command.
It is struck on Category Product Index.

When i check on backend it is stuck here.
[![enter image description here][2]][2]
How to solve this error.Any help is appreciated.


texts: Magento 2 Send email when unlocking customer

texts:
I'm a newbie in Magento 2, and this past days I've been cracking my head by trying to send an email when clicking the "Unlock" button/link to Unlock a customer on the admin panel.
I've done it with a Plugin and an Observer, but so far when clicking the "Unlock" button/link nothing happens, I mean, the normal flow of the application continues and it unlocks the customer.
This is the code that I have for the plugin (in the upper part i've already set up the namespace and everything else), I just pasted here the class.

class Unlock
{
    /**
     * @var \Magento\Customer\Api\CustomerRepositoryInterface
     */
    protected $_customerRepositoryInterface;

    /**
     * @var \Magento\Framework\Event\Manager
     */
    protected $_eventManager;

    /**
     * @var \Magento\Framework\Message\Manager
     */
    protected $_messageManager;

    /**
     * Unlock constructor.
     * @param \Magento\Customer\Api\CustomerRepositoryInterface $customerRepositoryInterface
     * @param \Magento\Framework\Event\Manager $eventManager
     * @param \Magento\Framework\Message\Manager $messageManager
     */
    public function __construct(
        \Magento\Customer\Api\CustomerRepositoryInterface $customerRepositoryInterface,
        \Magento\Framework\Event\Manager $eventManager,
        \Magento\Framework\Message\Manager $messageManager
    )
    {
        $this->_customerRepositoryInterface = $customerRepositoryInterface;
        $this->_eventManager = $eventManager;
        $this->_messageManager = $messageManager;
    }

    /**
     * @param \Magento\Customer\Controller\Adminhtml\Locks\Unlock $subject
     * @param $result
     * @return mixed
     */
    public function beforeExecute(
        \Magento\Customer\Controller\Adminhtml\Locks\Unlock $subject,
        $result
    )
    {
        $customerId = $subject->getRequest()->getParam('customer_id');
        try {
            // unlock customer
            $customer = $this->_customerRepositoryInterface->getById($customerId);
            echo $customer->getEmail();
            exit;
        } catch (\Exception $e) {
            $this->messageManager->addError($e->getMessage());
        }
        return $result;
    }
}

What I'm trying to do here is at least to print the customer email and exit the app, but so far it doesn't reach up to this point.
Can anyone point me in the right direction as to at least reach to this point? or is it that I'm not going the right direction with this?
Any help will be much appreciated.
Thanks.


texts: Change Error Message - Checkout Page - Failed Transaction

texts: I would like to change the default error message when a transaction fails on the checkout page. right now it just says system error. this is too vague and I need to change this as customers are complaining. does anyone know where I can look to make this change in magento 2.1.7


texts: url automatically redirect to my magento2 site

texts: When user type url "xyz" that will automatically  redirect to my magento2 website "https://mywebsite". How can I achieve this in magento2? Please help me to do this.


texts: failed to open stream: No such file or directory in site/link/goes/here/Varien/Autoload.php on line 94

texts:
I am getting an error with my Magento site; here's an example of what I am seeing in my error log:

[Tue Sep 19 00:02:39.321749 2017] [:error] [pid ######:tid ###########] [client ##.##.###:#####]
PHP Warning:  include(WfWAFGeoIP.php):
failed to open stream:
No such file or directory in my/local/site/link/magento/lib/Varien/Autoload.php on line 94

I am having a hard time understanding why this error is appearing, and how to fix this on my end. I recently learned that I am having a sync error with my Magento channel in Stitch Labs. Would this be related to the sync issue?


texts: Magento 2 timing of transactional emails sent

texts:
By default it takes around 10-15 minutes from what I can tell to receive a transactional email.  The email cron on the server is set to every minute.

How / Where in Magento 2 (2.0.7) can I shorten the time it takes to send a transactional email?  Thoughts?


texts:
I want to change the name of the 'My Downloadable Products' page to 'Recipes'. I want this to be changed in the navigation, and the page title.

Is there a way to achieve this, other than to translate the string?


texts: How to display Price Range Slider block to filter products

texts: I used AJAX Layered Navigation & Toolbar with Price Slider 2.2.0 Extension. But AJAX Price Slider is not displaying in frontend. It is showing in backend and update all required field to set price slider in front side. How to display AJAX Price Slider in frontend left navigation sidebar.


texts: Anybody have working example of test case in EcomDevPHPUnit with Magento Enterprise?

texts:
I have installed EcomDEV PHPUnit extension in Magento Enterprise. I have created Test Case as well. like "Mymage_Myutest_Test_Model_Product" with the proper folder structure.

  class Mymage_Myutest_Test_Model_Product extends
  EcomDev_PHPUnit_Test_Case {
                /**
                 * Product count test
                 *
                 * @test
               * @doNotIndexAll
                */
         public function productList()   {

    $collection = Mage::getModel('catalog/product')->getCollection();
    // Check that number of items the same as expected value
    $this->assertEquals(
        1,
        $collection->count()
    );    }  }

When i run like this phpunit UnitTests.php, it shows "FAILURES!".


texts: Custom URL rewrite for reviews in Magento

texts:
I have a review page for each product which can be accessed through : "example.com/shop/feedback/review/index/product_id/2931/"

Where feedback is the module, review is the controller and index is the action.

Magento provides an automated URL rewrite for products and category based on urlkey where "example.com/shop/category-name/product-name" is rewritten to "example.com/shop/123/2931" for the router to make sense of the url.

I wanted to know if there is a way where I can rewrite "example.com/shop/feedback/review/index/product-name" to "example.com/shop/feedback/review/index/product_id/2931/" without using the manual url rewrite management tool since there would be hundreds of these pages and I can't really make one manually for each.


texts: How can I reset two factor authentication on 2.3.5?

texts: I am using Magento 2.3.5. I need to move my 2fa to a new phone. When looking at the docs- https://docs.magento.com/user-guide/stores/security-two-factor-authentication-manage.html (these docs are also for 2.4) it talks about a box on the left panel. I do not have that box and I am admin. Is it different for 2.3.5?


texts:
I am using custom RabbitMQ message queues in custom Magento 2 extension.

When i run consumer using below command

sudo php bin/magento  queue:consumers:start custom.json.update

Consumer works for 2 to 3 seconds and gives below error.

"fwrite(): send of 21 bytes failed with errno=32 Broken pipe".

I found same issue reported in github but no solution there as well.
https://github.com/magento/magento2/issues/25947

My Magento version is 2.3.2.

Please anyone know how to resolve this issue?


texts: Magento Security Updates - Can't Get Help

texts:
I've been trying to contact Magento for the last month and have had no success. We have Enterprise, but there I cannot find the area Magento recommends for downloading the security updates:

Navigate to Download Tab (Where? I have never seen this tab)

Magento Enterprise Edition > Support Patches (Can't find this)

It then says if you can't download request by making a support ticket. When I click on the support ticket area it takes me to my account and does nothing.

Please assist in any way possible. Is there a Magento Support Email I can use directly or a number or suggestions as to why all of this is not working.


texts: How to get Bundle product id using bundle item?

texts:
I can get bundle item id, using that id I wants bundle product Id.
I have used below code, but it is not working:

   $grouped_product_model = Mage::getModel('catalog/product_type_bundle');
   $groupedParentIds = $grouped_product_model->getParentIdsByChild(#productid); //#productid will be bundle item id.

Thanks


texts: How do I call an External API in Magento 2? And what file/folder do I do it in?


texts:
In magento backend, if I click on save button loads the page but the saving modal dialog newer stop. you see this on the screenshot. Page is not loading but the saving popup is not stopping.

Also if I open a product sometimes the backend doesen't loads the whole site. It stops loading before all data is displayes.

It looks like that page stops loading before all processes are finished.

Not sure if you understand the problem but maybe some one help.


texts:
Little confused on this PWA stuff. Everything I've seen shows the PWA URL to be localhost like PWADevServer ready at https://magento-venia.local.pwadev:8001:

How do I make this live?


texts: Header and footer is not loading for inner cms pages in magento 2

texts: After indexing the cms block and flush the cache, Header and footer is not loading for inner CMS pages in Magento 2.


texts: Magento 2.3.5 create boolean custom Customer Attribute

texts:
I am trying to create a Yes/No attribute for Customer in the admin panel, but its not working. I have tried several available solutions but didn't seem to work. My code is given below.
/Setup/InstallData.php

class InstallData implements InstallDataInterface {
protected $customerSetupFactory;

private $eavSetupFactory;
private $eavConfig;
private $attributeResource;

public function __construct(
    CustomerSetupFactory $customerSetupFactory,
    EavSetupFactory $eavSetupFactory,
    Config $eavConfig,
    \Magento\Customer\Model\ResourceModel\Attribute $attributeResource
)
{
    $this->eavSetupFactory = $eavSetupFactory;
    $this->eavConfig = $eavConfig;
    $this->customerSetupFactory = $customerSetupFactory;
    $this->attributeResource = $attributeResource;
}

public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
{
    $setup->startSetup();

    /** @var CustomerSetup $customerSetup */
    $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);

    $customerSetup->addAttribute(\Magento\Customer\Model\Customer::ENTITY,
    'random_customer', [
        'type' => 'int',
        'label' => 'Attribute Approved',
        'input' => 'select',
        'source' => 'Magento\Eav\Model\Entity\Attribute\Source\Boolean',
        'default' => '0',
        'required' => false,
        'visible' => true,
        'user_defined' => true,
        'system' => 0,
        'position' => 999,
        'is_used_in_grid' => true,
        'is_visible_in_grid' => true,
    ]);

    $myAttribute = $customerSetup->getEavConfig()->getAttribute(\Magento\Customer\Model\Customer::ENTITY,
 'random_customer');

    $myAttribute->setData('used_in_forms', ['adminhtml_customer']);

    $this->attributeResource->save($myAttribute);

    $setup->endSetup();
} }

I upgraded and regenerated code & static files but I do not see the option. However, if I try to add the text attribute, it works fine. But I am trying to create Boolean (Yes/No) attribute.


texts: Magento2 - Filter out Configurable Products with out of stock child products from product collection

texts:
I want to filter the custom product collection by stock. My code works only with simple products. Here is my code.

<?php
namespace Company\Module\Block;
use Magento\Catalog\Api\CategoryRepositoryInterface;

class customProducts extends \Magento\Catalog\Block\Product\ListProduct
{

    protected $productFactory;
    protected $product;
    protected $_categoryCollectionFactory;
    protected $_categoryHelper;
    protected $categoryFlatConfig;

    public function __construct(
        \Magento\Catalog\Block\Product\Context $context,
        \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory  $productFactory,
        \Magento\Catalog\Model\ResourceModel\Category\CollectionFactory $categoryCollectionFactory,
        \Magento\Catalog\Model\Indexer\Category\Flat\State $categoryFlatState,
        \Magento\Catalog\Helper\Category $categoryHelper,
        \Magento\Catalog\Model\Product $product,
        \Magento\Framework\Data\Helper\PostHelper $postDataHelper,
        \Magento\Catalog\Model\Layer\Resolver $layerResolver,
        CategoryRepositoryInterface $categoryRepository,
        \Magento\Framework\Url\Helper\Data $urlHelper,
        array $data = [])
    {
        $this->product = $product;
        $this->_categoryCollectionFactory = $categoryCollectionFactory;
        $this->_categoryHelper = $categoryHelper;
        $this->productFactory = $productFactory;
        $this->categoryFlatConfig = $categoryFlatState;
        parent::__construct($context, $postDataHelper, $layerResolver,$categoryRepository, $urlHelper, $data);
    }

    /**
     * Retrieve loaded category collection
     *
     * @return AbstractCollection
     */
    protected function _getProductCollection()
    {
        $collection = $this->productFactory->create();
        $collection->addAttributeToFilter('visibility', \Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH);
        $collection->addAttributeToFilter('status',\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED);
        $collection->addAttributeToSelect('*');
        $joinTable = $collection->getTable('customtable_product');
        $collection->getSelect()
        ->join($joinTable.' as product','e.entity_id = product.product_id and product.product_status = 1',array('*'));
        $collection->joinField(
        'qty', 'cataloginventory_stock_item', 'qty', 'product_id=entity_id', '{{table}}.stock_id=1 and {{table}}.is_in_stock=1', 'inner' );

        $this->_productCollection = $collection;
        return $this->_productCollection;

    }

}

Please help.
Thanks


texts:
The above picture shows the review managed by admin.

I need to add a new column near action which should have the reply of the admin.

What should I do to make the new column for the admin and to comment by the admin to respective reviews?

Thanks in advance.


texts: Displaying Magento Custom Payment Methods Form (Extension Development)

texts:
I was unable to display the payment form for "My Custom Gateway" when the method is selected.

I have created the form.phtml template and it is loaded correctly. I can see the tag is loaded properly. Moreover it is visible even when I have not choose that method yet. Thus I have to hide the form until the the gateway is selected, so I have the following form.phtml:

<?php
// PHP Code
?>
<ul class="form-list" id="mygateway_form_<?php echo $this->getMethodCode() ?>" style="display:none;">

            This will be the Forms

In my Model, I'm extending Mage_Payment_Model_Method_Abstract instead of CC

I couldn't find any reference in the Magento source code that take care this trivial logic: hiding and showing payment form.

So, in magento, how to make my payment form visible when the user click on that particular payment methods?

Reference List

Create Payment Method Module
Stackoverflow


texts: Editing Custom Options Across Store Views

texts: We're running a Magento 2.3 multi-store that makes heavy use of custom options. Lately, we're frequently running into an issue where we've updated the options in "All Store Views" but the changes aren't reflected in the store-specific views. Is there a way to ensure that changes to custom options are made across all store views?


texts: Missing add to cart button on some items

texts:
We're experiencing a strange issue with our catalog, I'm scratching my head of where to start looking for...

Here are the symptoms:

Item X - doesn't have the "Add to Cart" Button.
When I go to the catalog, enable and disable the item refresh the
item and I see the button.

Good up to here.

Then I went to do the mass changes:

Disabled the cache
Selected the item group (more or less 1700 items)
Re-indexed all the catalog.

The strange thing is that when I inspect the item, the the Add to Cart container is missing, when manually update the item (simply open the item and save it in the backend) it appears and solves the issue for that particular item, but no bulk action solves the issue from admin.

Examples:

with error
fixed

Any ideas?

UPDATE

Found the js issue on the pages, implemented the fix specified here:
Product.OptionsPrice is not a constructor magento 1.9.3

The given error disapered, but the initial issue still persists.

At this moment, at frontend console no errors.

// Cleaned cache
// Reindexed all (exept URL's, because it takes 3 hours to index)

UPDATE 2

httpd - access & error logs: nothing strange there.

var/logs - checked the most recent logs, can't see anything there all the data seems to be regular.

<Magento_root>/var/log/system.log and exception.log - system log is empty? Exeption log, nothing strange there (no errors).


texts: How to override a function of a third party / custom plugin in Magento 2?

texts:
From Magento 2 (http://devdocs.magento.com/guides/v2.1/extension-dev-guide/plugins.html)

  Prioritizing plugins

  The sortOrder property for plugins determine when their before, after,
  or around methods get called when several plugins are observing the
  same method.

  The prioritization rules for ordering plugins:

  Prior to execution of the observed method, plugins will be executed
  from lowest to greatest sortOrder.

  During each plugin execution, the current plugin’s before method is
  executed first. After the before plugin is executed, the current
  plugin’s around method will wrap and execute the next plugin or
  observed method. Following the execution of the observed method,
  plugins will be executed from greatest to lowest sortOrder.

  During each plugin execution, the current plugin will first finish
  executing its around method. When the around method is complete, the
  plugin executes its after method before moving on to the next plugin.

However, I want to stop / remove a process in a function of a third party / custom plugin. So I don't want it runs if a condition broken. It means I don't want the function can run in some situations. So how can I override that function to do that ?

I can create a plugin has a method with lower priority than the method, then it can be run earlier than the method. But as I understand, after my function runs then the function runs too. I can not stop it to run as Magento states.

More details about the function I want to override:

 public function aroundSavePaymentInformation(
        \Magento\Checkout\Model\GuestPaymentInformationManagement $subject,
        \Closure $proceed,
        $cartId,
        $email,
        \Magento\Quote\Api\Data\PaymentInterface $paymentMethod,
        \Magento\Quote\Api\Data\AddressInterface $billingAddress = null
    )
    {
        $orderAttributes = $billingAddress->getOrderAttributes(); => It will be fail if there is no $billingAddress, so I want to add a check to make sure if we have $billingAddress, then the process will be called, if not then return.
        $this->sessionHelper->setOrderAttributesToSession($cartId, $orderAttributes);
        return $proceed($cartId,  $email, $paymentMethod, $billingAddress);
    }

Please suggest some solutions that you may have, I am really appreciate it.


texts: Magento 2 Product collection AddAttributeToFilter with AND/OR and !findinset and is null

texts:
How can i add " AND (at_product_userclass.value IS NULL) OR !FIND_IN_SET('1', at_product_userclass.value)" filter condition using addAttributeToFilter in product collection.

Thanks


texts:
I have used below code for Grid Products Image in shopping cart tab, Its showing same image in all products, Please help , Kindly check attached snap-shot for more detail.

$this->addColumn('Image', array(
        'header'=> Mage::helper('catalog')->__('Image'),
        'type'  => 'image',
        'width' => '100px',
        'index' => 'image',
        'frame_callback' => array($this, 'callback_image')

    ));

public function callback_image()
{

          $_productCollection = $this->getCollection();
    foreach ($_productCollection as $_product){
        $product_id = $_product->getProductId();
    }
    if(isset($product_id)){
        $product = Mage::getModel('catalog/product')->load($product_id);
        $productMediaConfig = Mage::getModel('catalog/product_media_config');
        $smallImageUrl = $productMediaConfig->getMediaUrl($product->getSmallImage());
        $width = 70;
        $height = 70;
        return "<img src='".$smallImageUrl."' width=".$width." height=".$height."/>";
    }
}


texts: Backend view of data from custom database

texts:
I have made a custom database, that stores the data from a form.
Now i want the data to be displayed backend.

What is the best way to do this?
If you need to se my code just say so :)


texts: Magmi- products are assigning to new categories instead of existing categories

texts:
we are using magmi to import products and also we are assigning products to categories using csv format as below :

sku::categories

sku1::Mobile Cases and Covers/Photography/Apple iPhone 4

products are uploading fine, but instead of assigning to exisitng categories, its creating new categories and assigning products to new categories.


texts: special prices are showing only in product list page in one magento site

texts:
price.phtml = >http://pastebin.com/T8xhyqp7

we used above code to display price and special price in produt list and product view page.

but in one site, this above code is working fine in product list and product view page,

but in another page, it's working only in product list page.

please help me to find solution.

thanks in advance.


texts: I have created two stores(store1 and store2) in Magento. I have productA 100 quantities for store1 and 50 quantities for store2. How can I manage this using single product(single sku).


texts: Migrate Custom Module Magento 1.9.X to Magento 2.4.1

texts:
I have run the data migration tool for Magento 1.9.2.4 to M 2.4.1
All Magento's default tables data is migrated.
Now I want to migrate data of custom modules of M1.
I have followed the instructions mention in this link.
https://devdocs.magento.com/guides/v2.4/migration/extend-the-tool.html
Now I have some queries:
 1. I just need to comment all the data, delta and setting steps which are not required in config.xml file located at app/code/Vendor/Migration/etc/opensource-to-opensource/1.9.2.4/config.xml?
 2. If there is no new table for M2 only so can I remove <integrity> from my modules step in config.xml?
 3. What about <volume> is it required?

Screenshot for point 2 & 3

 4. The custom map file for module will be empty if nothing is there to put into it? Take a look at screenshot:

5. Integrity.php file for custom step for custom module, What will be the values in MapInterface::TYPE_SOURCE & MapInterface::TYPE_DEST

6. Data.php  (in Step/Module/ folder) file's perform function $sourceDocName & $destinationDocName contains M2'table name for that custom module or something else?

7. Volume.php file's perform () 's $documentName contains M2's table name of that custom module?

 8. I only need to run the migrate:data command without -a and --reset or anything else?


texts: Create docker image for nginx, php 7, mysql and magento2

texts:
I want to create a docker image which has nginx, php7 (and required modules), mysql and magento2. Also, want to create docker-compose scripts.

Any help will be appreciated.


texts: Catalog view incorrectly indicating special pricing on a product

texts:
I've sometimes noticed (somewhat rare) behavior whereby a product will show a special price in the catalogue view (i.e when browsing through a category), though when you click onto it no special pricing is indicated.

The product in-fact does not have special pricing set in the backend, nor did it previously, so this is not a caching issue
The special pricing visible in the catalog view is definitely incorrect and not visible on the product page

If I do a full cache refresh, the issue is not resolved. If I do a product save in the backend, it is corrected. Any ideas?


texts: Is there a way to list a single sku as multiple variations on eBay?

texts:
Our client sells motor parts. So Product A may fit Car X, Car Y and Car Z. It's the same product sku. But they want to list each variation as a separate listing e.g. three listings:

Product A for Car X
Product A for Car Y
Product A for Car Z

eBay has a feature called Parts Compatibility Listing for these instances. http://www.ebay.com/autos/compatibility/FAQ/ListingFAQ.html

We have been considering using M2E Pro extension http://m2epro.com/ to manage listings on eBay and Amazon. It would be good to know if we can do it with this extension or similar.

We need to know if there is a better native solution than using an extension, or if using an extension, how best to go about it.


texts:
I keep getting this error from the Image attributes processor v1.0.25

plugin;ImageAttributeItemProcessor;warning:Image attributes processor v1.0.25 - error copying media/catalog/product/g/e/getimage_new.asp_id_801875_imagetype_2_noimagetype_2_colorimagesize_3_lineartimagesize_3 : download error,URL https://images.truevalue.com/getimage_new.asp?id=801875&ImageType=2&NoImageType=2&ColorImageSize=3&LineArtImageSize=3 is unreachable

What does this mean and how can I fix it!

EDIT

When I go to http://images.truevalue.com/ I get the following.

Directory Listing Denied

This Virtual Directory does not allow contents to be listed.

Could this be the error?


texts: How to open pop on a click of link in magento 2

texts:
hi i want to know that how can i show pop when a link or say button is clicked.
 i know how to display pop up on over a click in PHP but am completely unaware about it in magento coz i have never tried that.

in case of displaying popup in php we can use this code

<a href="link"  target="popup"  onclick="window.open('yourLink','popup','width=600,height=600,scrollbars=no,resizable=no'); return false;">
    Open Popup
</a>

can i use same code for magento also

do i have to use any custom module to achieve this or it is possible thorough .phtml file.


texts: Magento2.3: How to move the custom block in account navigation sidebar?

texts:
I want to show the customer profile pic and the name after he/she logged in on the account navigation sidebar. I have successfully got those details. Please see below.

However, I want to show them above the My Account link. I have tried moving but not success.

Can anyone please guide me on this?

<referenceContainer name="sidebar.main">
<block class="Vendor\Module\Block\Testing" name="customer.session.data" template="Vendor_Module::Test.phtml" before="customer-account-navigation-account-edit-link" cacheable="false" />


texts: Theme etc/view.xml throws error after upgrading to Magento 2.4.1

texts:
Recently I have upgraded the site from Magento 2.3.3 to Magento 2.4.1 And my etc/view.xml Throws an error

app/design/frontend/etc/view.xml" is invalid: Element
'aspect_ratio': This element is not expected. Expected is ( background
).

<image id="product_page_image_large" type="image">
    <transparency>true</transparency>
    <aspect_ratio>true</aspect_ratio>
    <frame>true</frame>
    <constrain>true</constrain>
</image>
<image id="product_page_image_medium" type="image">
   <transparency>true</transparency>
    <aspect_ratio>true</aspect_ratio>
    <frame>true</frame>
     <constrain>true</constrain>
</image>


texts: Magento Shipping country ID is shown as NULL in the reports

texts:
I'm using PostgreSQL in my data ware house for reporting purposes, and for a certain report I have to show the sum of revenue for each month grouped by country.  When i pulled the report the shipping_country_id is showing as null for the last two months (previous months it seems fine - Facing the problem from 2019,April onwards).

When I cross checked there were about 36000 orders having the shipping country ID as null in the database, but in the Magento portal it is showing correctly.

So I'm not sure the table where which I'm taking the data is correct or not. Are there any alternative tables or columns to look for?

Any help will be deeply appreciated !  Thanks in advance.

Note: currently using magento 1.7 (in the process of upgrading it to 2)

Below is the query i'm using,

select shipping_address_id, billing_address_id
FROM sales_flat_order
WHERE entity_id = 537273;

-- The result of this query is
--    1074074(shipping_address_id),1074073(billing_address_id)

SELECT *
FROM sales_flat_order_address
WHERE entity_id = 1074074
OR entity_id = 1074073;

-- The above query is showing nothing.


texts: Access-denied, changing the user (admin) restriction in 3rd party module controller to allow non-admin user access

texts: In a 3rd party module that we have, the controllers for routes are configured with <use>admin</use>. So then it extends Mage_Adminhtml_Controller_Action and adding function _isAllowed() does not solves the access denied for non-admin user. would removing <use>admin</use> be the solution?


texts: How to get CUSTOM REST API Response in JSON FORMAT in MAGENTO2

texts:
Hello I have created one custom API Extension i got response in JSON but with some "Backslash"
Below is my code:
<?php
namespace Vendor\NameSpace\Model;
use Vendor\NameSpace\Api\ColorInterface;

class Color implements ColorInterface
{
    /**
     * Returns greeting message to user
     *
     * @api
     * @param string $name Users name.
     * @return string Greeting message with users name.
     */
    public function name() {

        $response=[
            "name"=>"Jose",
            "lname"=>"Sell"
        ];
        return json_encode($response);

    }
}

webapi.xml
<?xml version="1.0"?>
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
    <route url="/V1/custom/color/" method="GET">
        <service class="Vendor\Namespace\Api\ColorInterface" method="name"/>
        <resources>
            <resource ref="anonymous"/>
        </resources>
    </route>
</routes>

Getting Output is:
"{\"name\":\"Jose\",\"lname\":\"Sell\"}"

Expected Output is
{
    "name":"Jose",
    "lname":"Sell"
}

Can anybody help me please?


texts: main.INFO: Broken reference: and throws 404 error?

texts:
[2019-04-18 09:56:18] main.INFO: Broken reference: the 'notification.messages' tries to reorder itself towards 'user', but their parents are different: 'header.inner.right' and 'header' respectively. [] []

This is the error in exception log and system got stuck in the controller after completing its functionality rather then returning value and throws 404 error.


texts: Am getting error " Zend_Db_Adapter_Abstract->fetchAll('UPDATE nmcatalo...') "when am executing UPDATE Query?

texts:
public function listAction()
{
    $resource = Mage::getSingleton('core/resource');
    $readConnection = $resource->getConnection('core_read');
    $qur = 'SELECT * FROM nmcatalog_category_product where category_id = 3 AND product_id = 1';
    $results1 = $readConnection->fetchAll($qur);
    if(!empty($results1)){
      $writeConnection = $resource->getConnection('core_write');
      $updatequry = 'UPDATE nmcatalog_category_product SET position = 6 where category_id = 3 AND product_id = 1';
      $updateresult = $writeConnection->fetchAll($updatequry);
    }else{
      echo "Array Empty";
    }

}


texts: Insert image popup showing blank in magento backend

texts: In my static block page i can't able to add image if i click inser image it showing blank page


texts: After applying SUPEE-6788 can't create customer

texts: After installing the patch, customers are unable to register accounts.


texts: Why would a Static Block that contains an image hang/timeout on save?

texts:
I'm troubleshooting an issue with Static Blocks.

When I create a new Static Block with an image, it works fine, but if I then go back into the Static Block to edit it, even without making any changes, it will hang/timeout on save.

Static Blocks without images are working fine.

The error that I'm receiving after about a minute is in a Nginx "502 Bad Gateway", which is closely related to "504 Gateway Timeout".

The code for my Static Block is below.

Do you have any idea why a Static Block with an image hang/timeout on saving?


texts: email validation on create an account page

texts: I want my "create an account" form to only accept .gov emails. If the user doesn't have a .gov email, they cannot create an account. Is this possible?


texts: Magento 2 Shopping Cart Buy 2 products, get 25% off on cheapest one

texts: Can we make this rule Buy 2 products, get 25% off on cheapest one without third party extension?


texts: Magento 2.3.3 customer password update after customer login not working

texts:
I have customer password change using this way and password change successfully
after i am login customer then login is not working below type error showing and before password change also not login this customer

SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction, query was: UPDATE `customer_entity` SET `failures_num` = ?, `first_failure` = ?, `lock_expires` = ? WHERE (entity_id = '20377')

customer login 1205 Lock wait timeout exceeded; try restarting transaction,

After i have also truncate customer_visitor table and restart mysql server but still no luck for me

then i am login customer and it's going 504 Gateway Timeout


texts: Getting 404 on front end and back end after installed Magento 2.4.2 in XAMPP, Windows 10 HOw to fix these

texts:
I'm new in magento and need to fix these issue
error appears - "Not Found
The requested URL was not found on this server.
Apache/2.4.46 (Win64) OpenSSL/1.1.1h PHP/7.4.15 Server at localhost Port 80"
appears 404 on front end and back-end also
OS: Windows 10,
Xampp v3.2.4,
Composer tried both v1 & v2,
Mangento Version: 2.4.2,
elasticsearch-7.11.2,
please help to get these fix!!!!


texts: How to add a image after breadcrumb for inner pages Magento 2.3

texts: How to add a image after breadcrumb for inner pages ? I use this link but it doesn't work for me link


texts: How to show configurable product attributes on homepage

texts:
I just want to display all products with the attribute options on homepage whatever available but mainly color attribute. I was able to get for the simple product but when it comes with the configurable product it doesn't show anything.

The option is displaying on the product page but how can I make it happen on homepage.


texts: How to duplicate sales rule programmatically in Magento2

texts:
Im try to duplicate some salesrule exist, i can duplicate this, but i can't use setConditionsSerialized and setActionsSerialized with getCondition and getActionCondition, its dont working

    use Magento\SalesRule\Model\RuleRepository;
    use Magento\SalesRule\Model\RuleFactory;

        protected $_ruleRepostitory;

        protected $_ruleFactory;

 public function __construct(
        RuleFactory $ruleFactory,
        RuleRepository $ruleRepostitory,
) {
        $this->_ruleRepostitory = $ruleRepostitory;
        $this->_ruleFactory = $ruleFactory;
}

                $id = 1;
                $getRule = $this->_ruleRepostitory->getById($id);
                $ruleModel = $this->_ruleFactory->create();
                $Default = 'ABCZXC';
                $randomNumber = random_int(000, 999);
                $ruleModel->setName($getRule->getName())
                    ->setDescription($getRule->getDescription())
                    ->setCouponType(2)
                    ->setConditionsSerialized(json_encode($getRule->getCondition()))
                    ->setActionsSerialized(json_encode($getRule->getActionCondition()))
                    ->setCouponCode($random = $Default . " - " . $randomNumber)
                    ->setFromDate($getRule->getFromDate())
                    ->setToDate($getRule->getFromDate())
                    ->setUsesPerCustomer($getRule->getUsesPerCustomer())
                    ->setCustomerGroupIds($getRule->getCustomerGroupIds())
                    ->setIsActive($getRule->getIsActive())
                    ->setStopRulesProcessing($getRule->getStopRulesProcessing())
                    ->setIsAdvanced($getRule->getIsAdvanced())
                    ->setProductIds($getRule->getProductIds())
                    ->setSortOrder($getRule->getSortOrder())
                    ->setSimpleAction($getRule->getSimpleAction())
                    ->setDiscountAmount($getRule->getDiscountAmount())
                    ->setDiscountQty($getRule->getDiscountQty())
                    ->setDiscountStep($getRule->getDiscountStep())
                    ->setSimpleFreeShipping($getRule->getSimpleFreeShipping())
                    ->setApplyToShipping($getRule->getApplyToShipping())
                    ->setTimesUsed($getRule->getTimesUsed())
                    ->setIsRss($getRule->getIsRss())
                    ->setWebsiteIds($getRule->getWebsiteIds())
                    ->setUsesPerCoupon($getRule->getUsesPerCoupon());
  $ruleModel->save();


texts: Image Uploader not working magento 1.8 due to Adobe flash outdated

texts:
Since end of 2020 adobe flash player going outdated because of that,Magneto 1.8 version image upload function not working. is there any solution to fix this issue.
Here attached screenshot


texts: Readiness Check Error during extension installation

texts:
When I install any extension in Magento 2 the Readiness Check shows my following errors:

(Your PHP version is . The required PHP version is .)
(PHP Settings check & missing PHP extensions) but doesn't show which settings/extensions were required.

I install Magento 2.1.11 and php verison 7.0.27


texts: Do you enter your new products directly into your live site?

texts:
Our admin side of our site has been running extremely slow when we're entering new products and saving them. We typically have 8 people entering products at once and we're being told that because of all the people in there adding stuff at once that is causing our store to run slowly.

This is unacceptable to me! We're still quite small. What do companies with 50 data entry people do???

We're kicking around the idea of getting a server here at our store to run a bare bones Magento installation on with very few extensions (our live store has quite a few) and then at the end of the day exporting the products out of that server into our live site. Uploading products via csv import has been going very fast for us but when we load them on the admin side that's when it gets slow.

Do any of you upload your new items like this???

(Our store has about 300,000 products)


texts: Add to cart product using ajax magento 1.9.2.4

texts:
How can add to cart  product using ajax on Magento 1.9.2.4
after adding to cart item update on cart items by ajax?


texts: Why aren't product stock alerts being sent?

texts:
When an item comes back in stock, I expect people who are listed to receive notifications to be sent an email when the product comes back in stock, but they are not.

All other emails are being sent fine.

/cron.php is being called once every 15 minutes via crontab using curl.  I have also visited it manually in my browser.

The settings in System > Configuration > Catalog > Catalog > Product Alerts Run Settings seem good, set to Daily at 15:00:00, with myself as an error contact. I don't get an error email. I've tried numerous time values for this, including +1/-1 hour from current time in case of system time discrepancies.

My cron_schedule database table is also empty.

Anything else I'm missing?


texts: Getting the custom product attribute in the Checkout summary Magento 2

texts:
I have a custom product attribute which we are using in place of name for some reason. I need to change this through  out the site. I got success in getting this in minicart , product and cart page.
but i am unable to find how it is getting render on the checkout summary section

for minicart it is rendering from the file

  vendor/magento/module-checkout/CustomerData/DefaultItem.php

protected function doGetItemData()
    {
       .......
        return [
            'options' => $this->getOptionList(),
            'qty' => $this->item->getQty() * 1,
            'item_id' => $this->item->getId(),
            'configure_url' => $this->getConfigureUrl(),
            'is_visible_in_site_visibility' => $this->item->getProduct()->isVisibleInSiteVisibility(),
            'product_name' => $this->item->getProduct()->getName(),
            'product_url' => $this->getProductUrl(),
            'product_has_url' => $this->hasProductUrl(),
           .....
    }

but in checkout summary i can't find how it works. Please suggest how can i achieve this.

Thanks


texts:
I am facing an issue with our product zoom functionality.

You can see under zoomed image we can see qty + and - signs clearly.
Can someone assist me with how to fix this?


texts:
I'm implementing product price calculation based on a formula that uses customizible options in Magento 2 (ver. 2.3.1). I added some code to _applyOptionsPrice() to "Magento/Catalog/Model/Product/Type/Price.php and it works like a charm. Now I want to take my code out of magento code, and implement it as an custom module, but as much as I try I can not get it to work as it's suppose to do.

Here is my code:

in app/code/ABPPRK/ModulePrice/registration.php:

<?php

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

in app/code/ABPPRK/ModulePrice/etc/di.xml:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\Catalog\Model\Product\Type\Price" type="ABPPRK\ModulePrice\Model\Price" />
</config>

module.xml:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="ABPPRK_ModulePrice" setup_version="1.0.1"></module>
</config>

And finally app/code/ABPPRK/ModulePrice/Model/Price.php:

<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
namespace ABPPRK\ModulePrice\Model;

class Price extends \Magento\Catalog\Model\Product\Type\Price
{

    public function getFinalPrice($qty, $product)
    {

        return 0;
    }

}

Of course the return of the method to override (getFinalPrice) should not be that one. This is just a simple implementation to test with xdebug that does not work, as neither the real code.

There are no errors during "bin/magento setup:di:compile". And I can tell that command is considering my module because at some past point it gave the error:

"Warning: Declaration of ABPPRK\ModulePrice\Model\Price::getFinalPrice() should be compatible with Magento\Catalog\Model\Product\Type\Price::getFinalPrice($qty, $product)"

What is missing here? I've followed all the tutorials I've found about overriding class methods but Iven't found anyone specific for this method. :-(

Thanks in advance,
Armando.


texts: Magento collection where (a AND b) OR (c and d)

texts:
I have a collection $c. If I write

$c->addFieldToFilter('id',array(1,2,3,4))
  ->addFieldToFilter('sku',array('a','b','c','d'));

The resulting SQL WHERE-part will be:

 WHERE (((id = '1') OR (id = '2') OR (id = '3') OR (id = '4'))) AND (((sku = 'a') OR (sku = 'b') OR (sku = 'c') OR (sku = 'd')))

What I would need is

WHERE (id = '1' AND sku = 'a') OR (id ='2' AND sku = 'b') OR ...

Can I do this with Magento collections? How?


texts: How to set priority for two custom module in magento

texts:
I have created two custom module in magento and use sales_order_place_after event in both module.

For example first module is Custom_Guest(community) and second is Assel_Sms (local). sales_order_place_after event in Assel_Sms execute first and then Custom_Guest but I want to execute sales_order_place_after event of Assel_Sms after Custom_Guest event.

Custom_Guset.xml code is :

<?xml version="1.0"?>
<config>
    <modules>
        <Custom_Guest>
            <active>true</active>
            <codePool>community</codePool>
            <depends>
                <Assel_Sms />
            </depends>
        </Custom_Guest>
    </modules>
</config>

How to execute Assel_Sms plugin's event after Custom_Guest plugin's event execution?


texts:
I have a Magento 2 site hosted on a VPS with Plesk.
A few days ago both frontend and backend showed error 404.
After taking the time to understand the problem, without success, I contacted my hosting provider who after a check identified the problem in "mod security".
Then I initially disabled mod security and the site is visible again without any error.

The log error shows this type of error(my site oscured with xxx):

[Mon Jun 24 17:38:00.572617 2019] [:error] [pid 568:tid 140699999577856] [client 151.18.6.144:45598] [client 151.18.6.144] ModSecurity: Warning. Pattern match "(?:'\\\\xbf?\\\\x22|\\\\x22\\\\xbf?'|^\\\\+?$)" at REQUEST_COOKIES:mage-messages. [file "/etc/apache2/modsecurity.d/rules/comodo/02_Global_Generic.conf"] [line "199"] [id "211290"] [rev "3"] [msg "COMODO WAF: XSS and SQLi vulnerability||www.xxxxx.it|F|2"] [severity "CRITICAL"] [tag "CWAF"] [tag "Generic"] [hostname "www.xxxxxx.it"] [uri "/customer/section/load/"] [unique_id "XRDuWM@02LUAAAI4PUkAAACX"], referer: https://www.xxxxxxxxx.it/

Here my questions, since it seems to be an important vulnerability:

Does this vulnerability depend on a Magento 2.3.1 bug?
in this case, what is the best configuration for mod security?

Thank you


texts:
When I go to my Magento Admin it say:

503 Service Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

Additionally, a 503 Service Unavailable error was encountered while trying to use an ErrorDocument to handle the request.

But it is not maintenance because I have disabled it and don't see maintenance.flag in root or var

It's out of the blue something else while I did nothing

Anybody please know?

Thanks


texts: Can we believe the Google Pagespeed insight results?

texts:
I have checked the speed of our Magento site on Google pagespeed insight and see that its showing inconsistent pagespeed scores.

For better understanding, please see the below images

I have read about this inconsistency of results but not got a satisfied results. Could anyone please help me to understand about this?

Looking forward to hearing from you.


texts:
I cant for the life of me figure out what the issue is with Magento using SMTP Pro connecting to gmail in google apps to send email from the site to customers. HTTPS on the site works if that makes any difference. I suspect some disconnect between openssl and php 5.6.

The Error I receive from SMTP Pro when running Self Test
" SMTP Pro Self Test Results
Sending test email to your contact form address: info@mysite.com from: admin@mysite.com. Unable to send test email.
Exception message was: Unable to connect via TLS
Please check the user guide for frequent error messages and their solutions.
Default templates exist.
Email communications are enabled."

the config looks like:

Other logs from Magento are:

"ERR (3):
exception 'Zend_Mail_Protocol_Exception' with message 'Unable to connect via TLS' in /var/www/html/mysite.com/lib/Zend/Mail/Protocol/Smtp.php:211
Stack trace:
#0 /var/www/html/mysite.com/lib/Zend/Mail/Transport/Smtp.php(200): Zend_Mail_Protocol_Smtp->helo('localhost')
#1 /var/www/html/mysite.com/lib/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Smtp->_sendMail()
#2 /var/www/html/mysite.com/lib/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#3 /var/www/html/mysite.com/app/code/local/Aschroder/SMTPPro/controllers/Smtp/TestController.php(136): Zend_Mail->send(Object(Zend_Mail_Transport_Smtp))
#4 /var/www/html/mysite.com/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Aschroder_SMTPPro_Smtp_TestController->indexAction()
#5 /var/www/html/mysite.com/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')
#6 /var/www/html/mysite.com/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#7 /var/www/html/mysite.com/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#8 /var/www/html/mysite.com/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#9 /var/www/html/mysite.com/index.php(83): Mage::run('', 'store')
#10 {main}"

AND one more:

Warning: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed  in /var/www/html/mysite.com/lib/Zend/Mail/Protocol/Smtp.php on line 206

Line 206 of the mentioned file is:

// If a TLS session is required, commence negotiation
if ($this->_secure == 'tls') {
    $this->_send('STARTTLS');
    $this->_expect(220, 180);
    if (!stream_socket_enable_crypto($this->_socket, true, STREAM_CRYPTO_METHOD_TLS_CLIENT)) {
        /**
         * @see Zend_Mail_Protocol_Exception
         */
        #require_once 'Zend/Mail/Protocol/Exception.php';
        throw new Zend_Mail_Protocol_Exception('Unable to connect via TLS');
    }
    $this->_ehlo($host);
}

$this->_startSession();
$this->auth();

Hoping someone out there know more than I do on this stuff. Thanks for any help/guidance that comes in


texts:
I need to filter a collection by a negative FIND_IN_SET.

I know I can do this:

$collection->addAttributeToFilter(
    'attribute_code',
    [['finset' => 4], ['null' => true]]
);

This filters the collection by FIND_IN_SET(...) OR value IS NULL. But the FIND_IN_SET needs to be negative (NOT FIND_IN_SET). How can I achieve this?

Do I really need to create a custom Zend_Db_Expr for this?

Edit: After the answer of @Marius I solved this with Zend_Db_Expr. In case anyone else bumps into this 'issue', here's how I solved it:

$collection->getSelect()->where(
    new \Zend_Db_Expr(
        sprintf('NOT FIND_IN_SET(%1$d, at_excluded_customer_groups.value) OR at_excluded_customer_groups.value IS NULL',
            $customerGroupId
        )
    )
);

My situation was to filter on customer group ID or NULL.


texts: How can I use and insert Brand and Model Rich Snippets properties?

texts:
I wonder how I can use and implement the properties "Brand" and "model" for my schema.org/product.

My catalog is something like:
(e.g.)
Samsung (Brand) -> 32F5000 (Model)


texts: Custom customer area tab not showing as current due to no controller name

texts:
I have set a new page in the customer area with link that links to my new controller with below code:

            <block class="Magento\Framework\View\Element\Html\Link\Current" name="customer-account-navigation-address-link">
                <arguments>
                    <argument name="label" xsi:type="string" translate="true">Address Book</argument>
                    <argument name="path" xsi:type="string">customer/index/products</argument>
                </arguments>
            </block>

My controller is like below:

<?php
namespace Vendor\Module\Controller\Customer\Index;

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

protected $resultPageFactory;

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

public function execute()
{
    $resultPage = $this->resultPageFactory->create();
    return $this->resultPageFactory->create();
}
}

This creates a link fine and can visit my controller URL however the link within navigation is not set as "current".

Upon investigating vendor/magento/framework/view/element/html/link/current.php where the isCurrent function works out if this is the current page i can see that my controller does not seem to be given a controller name.

 $this->_request->getControllerName();

Does return the controller name however but the getMCA function does not seem to build it into the full path.

return $this->getCurrent() || $this->getUrl($this->getPath()) == $this->getUrl($this->getMca());

So for my controller it's showing that /customer/contract/products != /customer/contract and so not current however it is and just want to know why this function is not working as expected here.

So I was wondering if anyone knows where i am going wrong?


texts:
I am trying to retrieve information about an order to display a custom success page.  I have a custom module setup extending

\Magento\Checkout\Block\Onepage\Success

and it is working perfectly fine.  Below is my code used to call the order information.

    public function orderListings($ID)
            {
                echo $ID;
                $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
                $order = $objectManager->create('Magento\Sales\Model\Order')->load($ID);
                $class_methods = get_class_methods($order);
                $totall = $order->getGrandTotal();
                echo "Order Total:".$totall."<br/>";
}

I am calling this method in my custom success.phtml template, where I can access the getOrderId() method of the $block object:

$ID = $block->getOrderId();
$block->orderListings($ID);

However, whenever I call my custom method orderListings and pass in the order ID, the method fails to function properly and won't retrieve the correct order information.  No errors are thrown, the $totall variable just simply is empty.  If I call the same method and statically enter an order Id,

$order = $objectManager->create('Magento\Sales\Model\Order')->load(000000146);

then it functions properly and outputs the grand total.

When I echo the $ID variable, it is the exact same as the number I entered manually.  What could possibly be causing this issue?


texts: Magento 2 - Name Prefix has first dropdown empty

texts:
I have a problem with the prefix field.

I have set it to be optional and I added two values in "Prefix Dropdown Options": Mr;Mrs.

Everything it's correct except from the first option of the generated select, which is empty.

Here is the code:

<div class="select select__wrapper">
  <select class="select" data-bind="
    attr: {
        name: inputName,
        id: uid,
        disabled: disabled,
        'aria-describedby': getDescriptionId(),
        'aria-required': required,
        'aria-invalid': error() ? true : 'false',
        placeholder: placeholder
    },
    hasFocus: focused,
    optgroup: options,
    value: value,
    optionsCaption: caption,
    optionsValue: 'value',
    optionsText: 'label',
    optionsAfterRender: function(option, item) {
        if (item &amp;&amp; item.disabled) {
            ko.applyBindingsToNode(option, {attr: {disabled: true}}, item);
        }
    }" name="prefix" id="SO7RWP3" aria-invalid="false">
    <option data-title="" value=" "></option>
    <option data-title="Mr" value="Mr">Mr</option>
    <option data-title="Mrs" value="Mrs">Mrs</option>
  </select>
</div>

Any ideas on how to add a translation for the first option like "Select a prefix"?
Thanks


texts: In my configuration, I have two field number x and number y. I want to add a condition in which the number y must be less than the number x. How can I write this condition in a configuration file (system.xml)


texts: Add block to each product in category view

texts:
I'm trying to add a small form to the category view to each product by using the <catalog_category_view> layout handle. The block of my module already works on product detail pages (<catalog_product_view> in product.info block).

Is there some requirement for the product_list block to accept another child block which I'm calling explicitly by name within the catalog/product/list.phtml? My form block class extends the basic Mage_Core_Block_Template if it makes any difference.

edit: added source

<!-- working -->
<catalog_product_view>
    <reference name="product.info">
        <block type="annotations/form" template="productannotations/form.phtml" name="product_annotations" />
    </reference>
</catalog_product_view>

<!-- not working -->
<catalog_category_view>
    <reference name="product_list">
        <block type="annotations/form" template="productannotations/form.phtml" name="product_annotations" />
    </reference>
</catalog_category_view>

embeding the block directly via
echo $this->getLayout()->createBlock('annotations/form', 'product_annotations')->setTemplate('productannotations/form.phtml')->toHtml() works on the other hand.


texts:
Need to find out product type and create it in magento 2

check image - https://prnt.sc/rsrc42


texts: Magento Search Friendly URLs not working

texts: I changed the config/web/seo/server rewrites to YES. However my urls are still showing /catalog/category/view/s/electric/id/911/


texts: Magento2 - How to remove/disable Custom Free Shipping Method from front-end only?

texts:
I created a Custom Free Shipping method and want to disable only in front end.
I try using getAreaCode() check here..but not working in Magento 2.4.0.
Please help if you know.


texts: Admin: Link fields attribute to checkbox value using linking properties of UI components

texts:
How to use linking properties of UI components to trigger 'disabled' on input based on checkbox 'value'?
From documentation, there are few ways to use export / import / links / listens to trigger disabled value of one input based on the value of another. I've tried few combinations but only thing I achieved is disabling field. How do I link  monday_status value to trigger monday_open disabled flag?
XML:
<field name="monday_status">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            ...
            <item name="dataScope" xsi:type="string">monday_status</item>
            <item name="default" xsi:type="number">1</item>
            <item name="links" xsi:type="array">
                <item name="disabled" xsi:type="string">value</item>
            </item>
        </item>
    </argument>
</field>
<field name="monday_open">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            ...
            <item name="formElement" xsi:type="string">select</item>
            <item name="dataScope" xsi:type="string">monday_open</item>
            <item name="links" xsi:type="array">
                <item name="disabled" xsi:type="string">disabled</item>
            </item>
        </item>
    </argument>
</field>

I've removed redundant code.


texts: Layered Navigation accordion not working

texts:
I have created a custom theme. Which is extended from blank theme.
 In the catalog page, there is no accordion. All filter fields expanded automatically.
I am using Magento 2.3


texts:
Hi I am editing the way the email for the Invoice on my store works and I need to get the customer collection for the order the invoice is being sent to so I can grab some customer info.

My code for the email is below, what is the best method of getting the customers First Name? I tried using $customer but it is not set as an object. I also currently am trying to load a customer entity by using their email address which I do have access to but I get an empty variable in my log.

It is also worth noting I am issuing invoices from the backend when testing and I am not sure if this changes how I need to get the customers collection.

public function send()
{
    $emailTemplate = Mage::getModel('core/email_template');
    // Send all emails from corresponding list
    while (!empty($this->_emailInfos)) {
        $emailInfo = array_pop($this->_emailInfos);

        Mage::app();
        $customeremail = $emailInfo->getToEmails();
        $customeremail = $customeremail[0];
        $customer = Mage::getModel("customer/customer");
        $customer->setWebsiteId(Mage::app()->getStore()->getWebsiteId());
        $customer->loadByEmail($customeremail);
        $test = $customer->getId();
        Mage::log($test, null, 'logfile.log');
        $customerAttr = $customer->getMaconomy();
        // Handle "Bcc" recepients of the current email
        $emailTemplate->addBcc($emailInfo->getBccEmails());
        // Set required design parameters and delegate email sending to Mage_Core_Model_Email_Template
        if (!empty($this->_afile)) {
            $emailTemplate->setEmAttachments($this->_afile); //(by dw)
        }
        $emailTemplate->setDesignConfig(array('area' => 'frontend', 'store' => $this->getStoreId()))->addBCC($customerAttr)
            ->sendTransactional(
                $this->getTemplateId(),
                $this->getSender(),
                $emailInfo->getToEmails(),
                $emailInfo->getToNames(),
                $this->getTemplateParams(),
                $this->getStoreId()
            );
    }
    return $this;
}

EDIT:

When I print_r $customer I get a lot of protected items, how can I resolve this??

2016-04-14T12:30:03+01:00 DEBUG (7): EH_CustomerApprove_Model_Customer Object
(
    [_customAttributes:protected] => Array
        (
        )

    [_fileAttributes:protected] => Array
        (
        )

    [_savedFileNames:protected] => Array
        (
        )

    [_eventPrefix:protected] => customer
    [_eventObject:protected] => customer
    [_errors:protected] => Array
        (
        )

    [_attributes:protected] =>
    [_addresses:protected] =>
    [_addressesCollection:protected] =>
    [_isDeleteable:protected] => 1
    [_isReadonly:protected] =>
    [_cacheTag:protected] => customer
    [_resourceName:protected] => customer/customer
    [_resource:protected] =>
    [_resourceCollectionName:protected] => customer/customer_collection
    [_dataSaveAllowed:protected] => 1
    [_isObjectNew:protected] =>
    [_data:protected] => Array
        (
        )

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

    [_syncFieldsMap:protected] => Array
        (
        )

)


texts:
I have taken over a magento store that over 3 years has built up a large amount of product images that are no longer in use but were never deleted.

Is there a way i can delete all images that are no longer in use, whilst keeping all images that are being used? I searched for a module/extension but couldn't find one that worked with magento 1.9 community.


texts: margin parameter not working in Owl Carousel slider magento 2.3

texts: Please check my code,if anyone have any idea please guide me -


texts: Why is there no partial re-indexing for EAV and tags?

texts:
This question was puzzling me for quite a while.

Why is the improvement bugfix introduced in Magento 1.13.x.x called partial re-indexing not covering "Product Attributes" and "Tags Aggregation Data" indexers? Why do these two have to be re-indexed manually?

To my opinion EAV index is one of the most critical. Not having a partial re-indexing for it means that after each sale (and some people have them) the index is invalidated which means the layered navigation is not valid anymore which results in inconsistent data display and loss of sales.

Am I missing something obvious?

Update:

So here is the description of this bug. Once the sale is made and product goes out of stock the layered navigation reflects the changes for products attributes only for simple products but not for configurables (have not tested bundles and grouped).

So let's assume in your catalog you have a configurable product like t-shirt available in different sizes and "Size" attribute is "Filterable (with results)". Then in a layered navigation of appropriate category or search results you will have the sizes section where all available sizes are listed. If after one of the sales, a particular size goes out of stock you would expect it to disappear from layered navigation. This doesn't happen unless you refresh attributes index and flush blocks cache.

This bug is really critical. It's a two way threat. First, the end customer who sees his size in a layered navigation and then sees that it is actually not available will leave your shop in frustration. Even worse thing is once the product is back in stock it will not be visible in layered navigation, so the end customer will not be able to purchase it. So it's hard to underestimate the amount of revenue losses.


texts: I have written a cron that updates the inventory of my products every night. What indexes need to be reindexed for products to display correctly after stock is changed via script? Does cache need to be refreshed? Trying to pinpoint the exact issue of why "add to cart" was missing from products last week. Reindexing solved that issue last week but need to know if my stock script caused the need to reindex.


texts: Magento 2 - Unable to connect on development environment

texts:
I am facing an issue after changing the permissions on 777 to the var/media files.
I can't connect to the website because the page shows these errors:

If I try to use PuTTY or Filezilla I get these notifications:

On PuTTY:

  Network error: Software caused connection abort.

On Filezilla:

  Error: Server unexpectedly closed network connection
  Error: Could not connect to the server
  Status: Waiting to retry...
  Status: Connecting to xx.xx.xx.xx...
  Response: fzSftp started, protocol_version=8
  Command: open "root@xx.xx.xx.xx" 22
  Error:  Network error: Software caused connection abort
  Error:  Could not connect to the server.

Could you please help me solve this issue?


texts: When Payment Fails on a Redirect Payment Method should the Order be Cancelled?

texts:
We have a payment method that redirects off the magento site to make payment then returns to the success or failed controller.

When the Place Order button is pressed on the Payment page, it redirects to the payment website and Creates an Order with no status.

When the payment is successful the Order status is set to Processing. If it fails the order is Cancelled.

Is this correct?


texts:
This code is found in my frontpage. Where to go to remove this crap?

:root topadblock, :root input[onclick^="window.open('http://www.FriendlyDuck.com/"], :root img[alt^="Fuckbook"], :root iframe[src^="http://static.mozo.com.au/strips/"], :root iframe[src^="http://cdn2.adexprt.com/"], :root iframe[id^="google_ads_iframe"], :root header#hdr + #main > div[data-hveid],

etc etc


texts: Tiered pricing based on total quantity purchased

texts:
I am selling note cards, and there is no price difference between any of them, the same pricing structure applies to all.

What I would like to do is calculate a total based on the total quantity of cards rather than individual cards.

So, a set of 3 cards = $15 regardless of which 3 is selected. Right now, my Paypal cart only allows me to have 3 cards of the same kind.  Can I do what I want with Magento?  And, what is the pricing structure for Magento?

Is it a stand alone program or can I integrate with my current site?  See http://www.miriweiblefineart.com/notecards to see the site.


texts:
It is driving me crazy.
What I want to do is creating a new Action in the controller:

Mage/Adminhtml/controllers/Sales/OrderController.php

I have done the rewrite using that:

<admin>
        <routers>
            <adminhtml>
                <args>
                    <modules>
                        <mymodule_resetdownloads before="Mage_Adminhtml">Mymodule_Resetdownloads_Adminhtml</mymodule_resetdownloads>
                    </modules>
                </args>
            </adminhtml>
        </routers>
    </admin>

and the class is:

require_once (Mage::getModuleDir('controllers','Mage_Adminhtml').DS.'Sales/OrderController.php');
class Mymodule_Resetdownloads_Adminhtml_Sales_OrderController extends Mage_Adminhtml_Sales_OrderController
{

    public function resetAction() {

        $id = $this->getRequest()->getParam('id');
        $this->loadLayout();
        $this->renderLayout();
        echo $id;
    }

}

Now the rewrite works and I know that because if I create another action like viewAction() it uses mine. But my problem is that I can't create a new one. Any idea why? Am I doing something wrong. I am not getting any error from what I have done, it just redirects me to dashboard.


texts: Magento 2 : Run/Execute Javascript after KnockoutJS has rendered all elements

texts:
I am trying to run custom Javascript code after the page is loaded completely with all the form elements/fields.

I am trying this on Magento2 Admin while adding new product.

  For example:

  I am trying to disable Quantity field in New Product add page in
  Magento2 Admin.

The page content is rendered through KnockoutJS. So, the following jQuery on load are not working:

jQuery(window).bind("load", function() {
    // your code
});

// OR

jQuery(window).on('load', function() {
    // your code
});

How to run Javascript code in Magento 2 after KnockoutJS has completed rendering all the DOM elements?


texts: Help uploading pictures - keeps coming up error

texts:
I'm a newbie to magento, i have had a designer build site and now i am trying to add extra products and having a few issues. The first issue is i cant add a product image it comes up with error, i have used chrome, firefox, changed wording on image and size format. What a i doing wrong please. I am currently selecting images from my desktop.

Thank you in advance


texts: JS Files empty After Running > php bin/magento setup:static-content:deploy

texts:
I have noticed that requireJs and other files are empty after running
> php bin/magento setup:static-content:deploy

It will create the file but nothing is ever written to the file.
Per another recommendation I have set the following from symlink to Copy
<item name="view_preprocessed" xsi:type="object">
Magento\Framework\App\View\Asset\MaterializationStrategy\Copy
</item>


texts:
see "shop by" on left side in above link.

there you can see 3 values....

1)black[remove]
2)white 1
3)white 3

I want to hide black [remove] option from layered navigation, i don't want to delete it.

please help me to find solutiion.

thanks in advance.

hide "one of the attribute label name" in layered navigation


texts:
I'm creating a custom form in Magento 2.3 admin.

  Vendor/Module/view/adminhtml/layout/route_folder_index.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="content">
            <block class="Vendor\Module\Block\Adminhtml\NewFunction\Edit" name="newfunction.form.container" template="newfunction.phtml"/>
        </referenceContainer>
    </body>
</page>

  Vendor/Module/Block/Adminhtml/NewFunction/Edit.php

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

/**
 * Export edit block
 *
 * @author      Magento Core Team <core@magentocommerce.com>
 */
namespace Vendor\Module\Block\Adminhtml\NewFunction;

/**
 * @api
 * @since 100.0.2
 */
class Edit extends \Magento\Backend\Block\Template
{
    public function getNewFunctionUrl()
    {
        return $this->getUrl('route/folder/newfunction');
    }

}

  Vendor/Module/view/adminhtml/templates/newfunction.phtml

<form action="<?php echo $block->getNewFunctionUrl()?>" method="post" enctype="multipart/form-data">
    <input type="text" name="hello"/>
    <input type="submit" value="Submit" />
</form>

  Vendor/Module/Controller/Adminhtml/Folder/NewFunction.php

<?php

namespace Vendor\Module\Controller\Adminhtml\Folder;

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

    public function execute()
    {

        $params = $this->getRequest()->getParams();

    }
}

The form submits perfectly but when I debug the $params variable it shows only two parameters

key
adminhtml

I was expecting the hello text as one of the parameter but didn't
receive one on form submit.

Is there anything wrong with the process or code?


texts: Move quantity field to top of product options?

texts:
I'm looking to move my quantity field to the top of my product options. I'd like to have it under the short description if possible. Just having a hard time locating where you change the layout for this stuff.

Thanks.


texts: Uploading an image for a thumbnail or category image is failing. Why?

texts:
I am on Magento 2.2.5. When I got to a category and try to upload a thumbnail or a category image it doesn't save. I hit upload, can see the image displayed, hit save and it is gone. I have no errors in the console or from Magento. I have tried multiple images in both jpg and png as well as different browsers. I have regenerated static content, reindexed and flushed the cache. When I try to go do a different category I get this error that I assume is related

Uncaught TypeError: value.map is not a function
at UiClass.setInitialValue (file-uploader.js:74)
at UiClass.initialize (abstract.js:73)
at UiClass.initialize (wrapper.js:109)
at new UiClass (class.js:49)
at Object.initComponent (layout.js:137)
at fire (jquery.js:3232)
at Object.fireWith [as resolveWith] (jquery.js:3362)
at Object.deferred.(/admin/catalog/category/edit/key/009308a5b7762b4bfa04bfd90c973f56d60bf2e78fd7ff9602868d309be843c5/id/165/anonymous function) (/static/version1532616807/adminhtml/Magento/backend/en_US/jquery.js:3461:37)
at fire (jquery.js:3232)
at Object.fireWith [as resolveWith] (jquery.js:3362)


texts: How to get customer email list who purchased anything?

texts:
I want to retrieve customers who purchase anything from all registered customers. I have use following to retrieve all registered customers.

$users = mage::getModel('customer/customer')->getCollection()->addAttributeToSelect('email');

      foreach ($users as $user)
      var_dump($user->getData());

How do I filter purchased customers from them? Need to export the list of customers who have ever made the purchase (not just registered ones).


texts: Assoicated Products relation with Main Products, SQL Query

texts:
Our magento store products have three drop downs like color, size & weight. The price of main product changes when we select from size or weight etc. Stuck to run a query to get assoicated products data. Ideally need a query but if you have answer of any these please comment below, cheers

Question 1: How magento uses relation(column names, product id etc ) between main product and associated items and in which tables data store etc.?
Question 2: By using mysql query, how can I pull out data using unique product id (attribute_id or SKU).


texts: Multi view store (CA and USA) sitemaps on different domains

texts:
We have 2 domains: www.website.com and www.website.ca

Both websites are using the same root folder on the same Magento instance.  What is the best way to create sitemaps for each site that use the same directory?


texts: WishlistCollection keeps returning 0 products

texts:
I'm trying to make a widget using the wishlist to show whether you've added the current product to the wishlist already or not. I've seen some other threads with answers and I can safely say I tried most if not all of them.
Please help a beginning Magento 2 Dev out
Wishlist has 3 items (Can be seen in the wishlist page and Database)
    /**
     * @param Product $inputProduct
     *
     * @return WishlistCollectionFactory
     */
    public function checkWishlistItem(Product $inputProduct)
    {

        $wishlistCollection = $this->_wishlistProvider->getWishlist()->getItemCollection();

        $wishlistItemList = [];

        /** @var Product $wishlistItem */
        foreach ($wishlistCollection as $wishlistItem) {
            array_add($wishlistItemList, 'product_id', $wishlistItem->getId());
        }

        return $wishlistCollection->addFieldToFilter('main_table.product_id', $inputProduct->getId());
    }

Other block I've tried:
$wishlistCollection = $this->_wishlistHelper->getWishlistItemCollection();
        $inWishlist = false;
        foreach ($wishlistCollection as $wishlistItem) {
            if ($inputProduct->getId() == $wishlistItem->getProduct()->getId()) {
                $inWishlist = true;
            }
        }

I have created a single php file that does all the work in Block/Widget. I can use all the feedback I can get so feel free to tell me another way of doing things if you feel like I'm doing things wrong.


texts: Magento 2 js error appears after adding new custom component to checkout_index_index.xml

texts:
js error at checkout page:

  collection.js:53 Uncaught TypeError: elem.initContainer is not a function

new component:
Magento 2 How to add onKeyUp to a text field in customer checkout address form?

How to deal with it? Thanks.


texts: Add same static block to all category pages

texts:
Offering a global discount on all products for specific holiday period.

Want to add the same header image as global category static block to appear on all category pages to promote the sale.

Is the only way to add static block in display manually for each category or by modifiying xml or phtml files?

Been searching and can't seem to find any easy way to do it.

regards


texts:
I am having an error while working on claue theme on magento 2.4 after installation.
1 exception(s):
Exception #0 (Exception): Notice: Undefined offset: 1 in /opt/lampp/htdocs/app/code/MGS/PurchasedProduct/view/frontend/templates/recentorder.phtml on line 63

I am working on maching that is : centos/lampp stack./elasticsuite
Any help please.?


texts:
i have this:

After clicking open, nothing happens. Clicking Upload Files does nothing too then.

There are no errors in the console at any time.

The Uploader works on Produktpages.

What can i do? Thanks.


texts: Paypal Doesn't Show The Currency By Which We Checkout In Magento

texts:
Our site is having INR as the base currency & having Paypal Standard checkout.
Now what happens.....when we checkout & when our site redirects to paypal then in paypal page it is converted to USD. Now that is right because paypal doesn't support INR so INR gets converted to USD. That's right no issue.

But the issue is if in our website we switch currency (not base currency) to GBP then checkout, then when site is redirected to paypal then also it is converted to USD.....GBP is accepted in paypal right? Then also why it is converted to USD & not coming in GBP?

Can anyone help us with this?

Please note :
1) Our base currency is INR
2) We are using sandbox for testing

Thank you.


texts: Magento 1.9 show 404 page for Product Feed Generator Extension

texts:
I'm using a free extension to generate product feed,
https://www.magentocommerce.com/magento-connect/product-feed-generator.html
Everything works fine when I install the extension on a clean Magento installation 1.9.3.2
But When I install it on my Magento (1.9.3.2), which has many other extensions installed, on live site, it gives me a 404 page not found when creating product feed.
I don't see anything in log file. How can I find out what caused this 404 issue?


texts: how to insert custom customers attributes in orders and emails

texts:
I have successfully created custom customer attributes in Magento 2.3.2 (like doctor name and doctor zipcode) and I can see/modify them in my adminhtml customer view. What I would like is to have them inserted into customer orders and order e-mails. Has anyone already done that ?
Thank you for your pointers/hints/solutions !
Edit :

I tried using observers :
1 for customer signup, 1 on successful order.
So I added 2 modules

One called CustomerRegister : registration.php :

<?php

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

etc/events.xml

<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <event name="customer_register_success">
<observer name="customerregister" instance="CustomerRegister\Emails\Observer\AddCustomerData">
    </event>
</config>

etc/module.xml:

?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="CustomerRegister" setup_version="1.0.1">
<sequence>
<module name="Magento_CustomerRegister"/>
</sequence>
    </module>
</config>

Observer/AddCustomerData.php :

<?php

namespace Anshu\Emails\Observer;

use Magento\Framework\Event\ObserverInterface;

class AddCustomerData implements ObserverInterface
{
 public function __construct(
    \Magento\Customer\Api\CustomerRepositoryInterface $customerRepositoryInterface
  ){
    $this->_customerRepositoryInterface = $customerRepositoryInterface;
  }

  public function execute(\Magento\Framework\Event\Observer $observer)
  {
    $transport = $observer->getEvent()->getTransport();
    $customer = $this->_customerRepositoryInterface->getById($transport->getOrder()->GetCustomerId());

$transport->addData([
'nommedecin' => $customer->getCustomAttribute('nommedecin')->getValue()

]);
}
}

If I insert the {{ var nommedecin }} in my new customer email template, it's empty...
If you have any clues, please do not hesitate


texts: Magento 2 "something went wrong" issue with request fields

texts:
We've had a recurring issue with Magento 2.2 where (for some reason I don't understand) the "Attention: Something went wrong." message appears on every page.

We get the default message about a "technical error on the server" but there is nothing in any error log to indicate what might be going wrong, and nothing loads and no form entries work.

However, I have discovered what is causing the issue and I am rather perplexed by it.

The issue is that when an AJAX call is made, the parameters in POST/GET/REQUEST are not making it to the Magento system, and I don't understand why.

To be clear, when the admin makes a call to /admin/mui/index/render/ to get notifications, it sends several parameters (namespace, sorting[field], sorting[direction] and isAjax). When the action is executed in the PHP, the $_REQUEST array is empty.

It is not limited to just that one call - any call over AJAX seems to be affected, and it is causing quite a few issues with even doing basic things like saving configuration changes.

It seems that forcing a condition Magento doesn't expect (fatal exception, or die()) puts it back to normal for a while, but it keeps recurring so there is a persistent issue, and fixing it for one AJAX call doesn't seem to fix it for others.

What I'm wondering is if someone has any clue what the issue might be (willing to accept it could be a misconfigured server) or whether I should be raising this as an issue in the repo. I've not found any sign anyone else is having the same issue which seems to suggest that it could be a localised issue but I have no idea what it could be.


texts: Why is function productAddToCartForm.submit(this) repeating in Firefox?

texts:
My add to cart function is working fine in Chrome, but in firefox when you add to cart it adds the product over and over again and never redirects to cart. Do you have any idea what this could be? The only javascript error I receive is this: "ReferenceError: control is not defined" but this error displays when the page is loaded. I do not think it is relevant.

Where add to cart is performed:

//Add to cart function
                    $j("button.btn-cart").on("click", function(event){
                        if (loggedInFlag==1){
                            var IDs=[];
                            var vendorID = $j('input[name="customPrice"]:checked').attr('id');
                            $j('#attribute136 option[value="' + vendorID + '"]').prop('selected',true);
                            $j('#attribute136').removeClass('validation-failed').addClass('validation-passed');
                            IDs[0]= vendorID;

                            updatePrices(IDs, function(){
                                setInterval(function(){productAddToCartForm.submit(this)},2500);
                            });
                        }
                        else{
                            alert('You must be registered and logged in to add to cart.');
                        }
                    });

I checked to make sure updatePrices was not repeating for some reason. I put a console.log("hey im here") within it, but no.. it was not repeating.

This is what's going on with the network:


texts: How to display Multiple price currencies in product page?

texts: I want to display 2 currencies at a same time on product page, just like $50 and AED200 something like this : https://miatlantic.ae/ws-c3850-24t-s


texts:
I created a Magento Child Theme under 2.3.0 based on Luma.

I tested in Developer and Default Magento Mode. I expect the custom _theme.less file to be generated on the fly.

But this does not work. I have to run "php bin/magento setup:upgrade" after every single css line change to take the changes affected in front-end.

Also there is a Child Theme based Folder in pub/static folder. Why is this created? Im running default/developer mode so i don't expect the system to create any /pub/static/ files?

I already tried cache:flush and cache:clean.

It workes too when i change modes in magento from dev to production and visaversa.

New Info: I added a new .css File to the Theme and it works like expected. So i think the problem with the _theme.less is about the .less compiling is not working on the fly?


texts: I have tried sending a newsletter from the newsletter section in Magento but it is not sending. I am new to this stuff so not sure what the issue is. Please help.


texts: Magento2 display custom Block after product Name on Product Page

texts:
In my custom Block I am trying this code:
which is not working:

<referenceBlock name="product.info.main">
      <block class="Magento\Catalog\Block\Product\View"
        name="product.view.extra"
        template="Ced_CsMarketplace::vendor.phtml" after="product.info.name">
         </block>
 </referenceBlock>

but when I am trying:

<referenceBlock name="product.info.price">
      <block class="Magento\Catalog\Block\Product\View"
        name="product.view.extra"
        template="Ced_CsMarketplace::vendor.phtml" before="-">
         </block>
 </referenceBlock>

It is working fine.

How I can show the block below Product Name and before product review.

I tried many alternative, but nothing seems to work


texts:
In short, Magento returns status 200 for the 404 Not Found CMS page, for what seems to be a pretty standard configuration:

Everything works fine when the URL is changed to cms/index/defaultNoRoute, the default Not Found page is loaded with status 404.

Also, absolutely everything works fine on a copy of the website on a different server. Which would lead me to suspect the Apache configuration. Not sure though what to look out for.

Here are response headers for both defaultNoRoute and noRoute actions:

$ curl -I http://www.server.com/cms/index/defaultNoRoute
HTTP/1.1 404 Not Found
Date: Thu, 25 Apr 2013 12:56:07 GMT
Server: Apache
X-Powered-By: PHP/5.2.17
Set-Cookie: frontend=332f53c81eee1f730f430c0f59e0dd83; expires=Thu, 25-Apr-2013 13:56:08 GMT; path=/; domain=www.server.com; HttpOnly
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Status: 404 File not found
Vary: Accept-Encoding,User-Agent
Content-Type: text/html; charset=UTF-8

$ curl -I http://www.server.com/cms/index/noRoute
HTTP/1.1 200 OK
Date: Thu, 25 Apr 2013 12:56:11 GMT
Server: Apache
X-Powered-By: PHP/5.2.17
Set-Cookie: frontend=361b3804feaea66a6fcdf1aee048ce44; expires=Thu, 25-Apr-2013 13:56:12 GMT; path=/; domain=www.server.com; HttpOnly
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Vary: Accept-Encoding,User-Agent
Content-Type: text/html

Anyone can point me in the right direction? Cheers.