texts: Magento 2 We can't find products matching the selection

texts:
Maybe duplicate of other tickets but I couldn't found solutions in other questions.

I get no products in category in frontend, Products are in stocks and all other parameters are checked and they are perfect, After debugging I found that in following query if I manually remove following code

INNER JOIN
    `search_tmp_5cd96fa8932f95_44809536` AS `search_result`
ON
    e.entity_id = search_result.entity_id

then it is returning product list

Following is result of

 $_productCollection = $block->getLoadedProductCollection();
 echo $_productCollection->getSelect();

SELECT
    `e`.*,
    `cat_index`.`position` AS `cat_index_position`,
    `price_index`.`price`,
    `price_index`.`tax_class_id`,
    `price_index`.`final_price`,
    IF(
        price_index.tier_price IS NOT NULL,
        LEAST(
            price_index.min_price,
            price_index.tier_price
        ),
        price_index.min_price
    ) AS `minimal_price`,
    `price_index`.`min_price`,
    `price_index`.`max_price`,
    `price_index`.`tier_price`,
    `stock_status_index`.`stock_status` AS `is_salable`
FROM
    `catalog_product_entity` AS `e`
INNER JOIN
    `catalog_category_product_index_store1` AS `cat_index`
ON
    cat_index.product_id = e.entity_id AND cat_index.store_id = 1 AND cat_index.visibility IN(2, 4) AND cat_index.category_id = '85'
INNER JOIN
    `catalog_product_index_price` AS `price_index`
ON
    price_index.entity_id = e.entity_id AND price_index.website_id = '1' AND price_index.customer_group_id = 0
INNER JOIN
    `search_tmp_5cd96fa8932f95_44809536` AS `search_result`
ON
    e.entity_id = search_result.entity_id
LEFT JOIN
    `cataloginventory_stock_status` AS `stock_status_index`
ON
    e.entity_id = stock_status_index.product_id AND stock_status_index.website_id = 0 AND stock_status_index.stock_id = 1
WHERE
    (e.created_in <= '1557643741') AND(e.updated_in > '1557643741')
ORDER BY
    `e`.`entity_id`
DESC
    ,
    `e`.`entity_id`
DESC
LIMIT 12


texts: Compile command not running in staging environment

texts:
When I run $ php bin/magento setup:di:compile command on local machine, it recompiles dependencies right away. When I do the same on staging server, it displays a message:

DI configuration must be cleared before running compiler. Please delete '/var/www/html/staging/var/di'.

Of course, when I delete var/di, it works. But my question is, why it does not require that directory to be deleted when running on local?

Local runs MAMP with php7.0.0.
Staging runs centos7 with php7.0.7, php-fpm and SElinux.

What difference between these two environments could lead to different command behavior?


texts: How to send an automatic email after payment ("Processing" status)

texts:
Does magento send automatic emails to confirm payments? (I'm using v1.6.2)
This field is only for manual emails?


texts:
I have put my custom logic for change price in product listing page using below event

catalog_product_collection_load_after

This event set successfully set custom price in product listing page but it display wrong price in layered navigation .

so my question is How to set custom price in layered navigation ?

Any help or guidance will be appreciated

Thank you


texts: Product Description showing at short description place

texts:
My website is showing product short description at wrong place in product view page. Instead it is showing at place of Description tab.

Please help me out.


texts:
Just in case I might need it some day ... is there a place where I can inform the Magento guys of a license validation? Searched a bit but found nothing.

Thanks


texts: Reindexing - browser window during re-indexing

texts:
Does the browser window need to remain open when re-indexing from the admin panel? i.e. once I start the re-index process, what happens if the browser window is closed. I am guessing re-indexing would continue as normal in the background, but can you confirm one way or the other?
If that is the case, i.e. re-indexing continues, then how do we know when re-indexing is completed (as we had closed that particular window in which we started the re-indexing process)?

Thanks!


texts: 404 Error when clicking Add Reviews in Admin Panel

texts:
I'm having problems with adding Reviews in the backend.
The review system works, because they can be added in the front end by guests and users.
Here's the list of reviews:

I can edit these reviews as normal.

But when I try to create a new review in the back end, I get the following 404:

What can I do?

regards
Phil


texts: How to call phone number field [Attribute] to register form, Which is present in checkout form?

texts: I am new to Magento 2. I want to know how could I display text field[phone number] in create account page. Which is already present in checkout page.


texts: Is there a CMS page before delete observer?

texts:
First of all, I'm attempting to tap into the pre-deletion events of the following:

Categories
Products
CMS Pages

Categories and products are fairly straight-forward, tapping the catalog_category_controller_category_delete and catalog_product_delete_before events, respectively.  CMS pages on the other hand are another story...

I've browsed the source code inside app/code/core/adminhtml/controllers/cms/PageController.php to find the following:

public function deleteAction()
{
    // check if we know what should be deleted
    if ($id = $this->getRequest()->getParam('page_id')) {
        $title = "";
        try {
            // init model and delete
            $model = Mage::getModel('cms/page');
            $model->load($id);
            $title = $model->getTitle();
            $model->delete();
            // display success message
            Mage::getSingleton('adminhtml/session')->addSuccess(
                Mage::helper('cms')->__('The page has been deleted.'));
            // go to grid
            Mage::dispatchEvent('adminhtml_cmspage_on_delete', array('title' => $title, 'status' => 'success'));
            $this->_redirect('*/*/');
            return;

        } catch (Exception $e) {
            Mage::dispatchEvent('adminhtml_cmspage_on_delete', array('title' => $title, 'status' => 'fail'));
            // display error message
            Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
            // go back to edit form
            $this->_redirect('*/*/edit', array('page_id' => $id));
            return;
        }
    }
    // display error message
    Mage::getSingleton('adminhtml/session')->addError(Mage::helper('cms')->__('Unable to find a page to delete.'));
    // go to grid
    $this->_redirect('*/*/');
}

There is no indication that there is any event emitted prior to deleting a CMS page, nor does there appear to be any way to retrieve which CMS page ID has been deleted.  Am I missing something or is this just another instance of Magento's excessive inconsistency?


texts: How to write query to find out products which visibility is 4 for configurable product but his child product visibility is 1?

texts:
I need to help here to get product display only configurable product not his child products.

So here I have one configurable product name ==> Product 1

and his child products such
Product 1-White-20
Product 1-White-30
Product 1-Red-20
Product 1-Red-30

these all 4 child product visibility 1 .

now ist particular size attribute
Product 1-White-20(attribute size ==20)
Product 1-White-30(attribute size ==30)
Product 1-Red-20 (attribute size ==20)
Product 1-Red-30 (attribute size ==30)

but my main product has not any size selected.

so when I want to filter by size then no products comes in filter result.

So in may main product not a size but in child product there are size attribute so i need to display only main product in filter result.

so please help me.
Thanks in Advance.


texts:
2018-07-17T20:04:13+00:00 DEBUG (7): Exception message: Invalid method Mage_Customer_Model_Customer::cleanPasswordsValidationData(Array

(
)
)
Trace: #0 /home/cdqkqjkb/public_html/app/code/core/Mage/Customer/controllers/AccountController.php(821): Varien_Object->__call('cleanPasswordsV...', Array)
1 /home/cdqkqjkb/public_html/app/code/core/Mage/Customer/controllers/AccountController.php(821): Mage_Customer_Model_Customer->cleanPasswordsValidationData()
2 /home/cdqkqjkb/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Customer_AccountController->resetPasswordPostAction()
3 /home/cdqkqjkb/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('resetpasswordpo...')
4 /home/cdqkqjkb/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
5 /home/cdqkqjkb/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
6 /home/cdqkqjkb/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
7 /home/cdqkqjkb/public_html/index.php(102): Mage::run('', 'store')
8 {main}


texts: Function name must be a string in .../lib/Varien/File/Uploader.php:259 when I try to upload an image

texts:
I get this error:

Function name must be a string in  .../lib/Varien/File/Uploader.php:259

,when I try to upload an image. The media directory has been set to writable with chmod -R 777 media . What can be the cause for this?


texts: magento Cannot add or update a child row when import database

texts:
I tried to move Magento site from sub-doamin into new main domain.

when I tried to import a database, I got following error :

"Magento Cannot add or update a child row: a foreign key constraint fails importing database"

i am beginner in Sql, please help me to find solution.

thanks in advance.


texts: How to create new attributes for products and make them appear in the form like price M2

texts: I want to create new attributes from BO and make them appear like price and Sku and Quantity.Thanks in advance


texts: I want to edit my invoice PDF in magento 2.3, In below mentioned image. the 'red' bordered section move top on 'green' bordered section (Change Position). how to achieve my requirement ?


texts: add product to cart with product options

texts:
i try to add product to cart wih this code :

    $proxy = new SoapClient('http://example.com/index.php/api/v2_soap/?wsdl');
    try{
    $result = $proxy->shoppingCartProductAdd($sessionID, $cartID, array(array(
    'product_id' => $productID,
    'sku' => $sku,
    'qty' => $qty,
    'options' => null,
    'bundle_option' => null,
    'bundle_option_qty' => null,
    'links' => null
    )));

    } catch(SoapFault $e){

       $result = $e->getMessage();
       }

i found it from this link : Magento API

on link example it`s pass null for options if i want to add options like color or size or ... to product and then add the prodoct to cart what should i do ?


texts: Set input length for checkout form magento 1.9

texts: How do I go about setting the character length for input forms, preferably checkout, on magento 1.9. I'm aware that Magento has a MaxLength variable but am Unsure on how to implement it.


texts: How to call products from the cart on the homepage in Magento 2

texts:
I need a solution to be able to call the products that have been added to the cart to be displayed on the homepage.

I can think of a few ways but looking for the simplest cleanest way to do it.. can anyone help?

Thanks in advance


texts: Magento 2.3 - Almost blank page after adding to shoppingcart

texts:
I've upgraded my Magento from 2.2.6 to 2.3, everything went well, but I got some errors.

The first thing I saw in the system.log was something with an attribute, I fixed that. But when I add a product to the shoppingcart I only get to see this:

Translated to English it says: view shipping costs and Tax

What could that be, yesterday I spend almost a day searching for the solution but nothing found :(

The system.log says this:

[2019-03-14 08:01:08] main.INFO: Broken reference: the 'catalog.compare.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2019-03-14 08:01:08] main.INFO: Broken reference: the 'wishlist_sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2019-03-14 08:01:08] main.INFO: Broken reference: the 'sale.reorder.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2019-03-14 08:01:08] main.INFO: Broken reference: the 'custom.sidebar.content' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2019-03-14 08:01:08] main.INFO: Broken reference: the 'checkout.cart.item.renderers.gift-card.actions.gift_options' element cannot be added as child to 'checkout.cart.item.renderers.gift-card.actions', because the latter doesn't exist [] []
[2019-03-14 08:01:08] main.INFO: Broken reference: the 'minicart' tries to reorder itself towards 'logo', but their parents are different: 'header-wrapper' and 'header' respectively. [] []
[2019-03-14 08:01:08] main.INFO: Broken reference: the 'custom.sidebar.content' tries to reorder itself towards '', but their parents are different: 'sidebar.additional' and '' respectively. [] []
[2019-03-14 08:01:08] main.INFO: Broken reference: the 'checkout.cart.item.renderers.gift-card.actions.gift_options' tries to reorder itself towards '', but their parents are different: 'checkout.cart.item.renderers.gift-card.actions' and '' respectively. [] []
[2019-03-14 08:01:08] main.INFO: Broken reference: the 'cart.summary' tries to reorder itself towards 'checkout.cart.totals.container', but their parents are different: 'cart.bottom.col2' and 'cart.summary' respectively. [] []

But I have no idea if that has something to do with adding to shoppingcart because every other page is showing normal.

Update:

These were the latest errors in the exception.log (they are fixed)

[2019-03-13 10:12:34] main.CRITICAL: No linked stock found {"exception":"[object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): No linked stock found at /home/bootm2/domains/bootkoffie2.nl/public_html/vendor/magento/module-inventory-sales/Model/GetStockBySalesChannel.php:55)"} []
[2019-03-13 11:58:31] main.CRITICAL: No linked stock found {"exception":"[object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): No linked stock found at /home/bootm2/domains/bootkoffie2.nl/public_html/vendor/magento/module-inventory-sales/Model/GetStockBySalesChannel.php:55)"} []
[2019-03-13 12:00:05] main.CRITICAL: No linked stock found {"exception":"[object] (Magento\\Framework\\Exception\\LocalizedException(code: 0): No linked stock found at /home/bootm2/domains/bootkoffie2.nl/public_html/vendor/magento/module-catalog/Model/Indexer/Product/Price/Action/Full.php:163, Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): No linked stock found at /home/bootm2/domains/bootkoffie2.nl/public_html/vendor/magento/module-inventory-sales/Model/GetStockBySalesChannel.php:55)"} []
[2019-03-13 12:10:04] main.CRITICAL: No linked stock found {"exception":"[object] (Magento\\Framework\\Exception\\LocalizedException(code: 0): No linked stock found at /home/bootm2/domains/bootkoffie2.nl/public_html/vendor/magento/module-catalog/Model/Indexer/Product/Price/Action/Full.php:163, Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): No linked stock found at /home/bootm2/domains/bootkoffie2.nl/public_html/vendor/magento/module-inventory-sales/Model/GetStockBySalesChannel.php:55)"} []


texts: Get values for customer note to order grid

texts:
I need fast solution and I will temporarily change core class.

I need new element, customer note field in order grid (sales->orders). It already exist in database in
sales_flat_order.customer_note

In class:

Mage_Adminhtml_Block_Sales_Order_Grid (\app\code\core\Mage\Adminhtml\Block\Sales\Order\Grid.php)

I added this:

    $this->addColumn('customer_note', array(
        'header'       => Mage::helper('sales')->__('Customer note'),
        'index'        => 'customer_note'
    ));

Now I see customer note field, but it is empty, it shows no data. How can I get data in that field ?

(I am using Magento 1.7 and order comment field is suppressed with one plugin)


texts: Magento2 : How to add custom block on product page

texts:
I want to add my custom template on product page just like $this->getChildHtml('custom_product_info').

As in magento1.9 to use $this->getChildHtml('custom_product_info') we add layout xml like below :

<catalog_product_view>
    <reference name="product.info">
        <block type="core/template"  name="custom_product_info" template="custom.phtml"/>
    </reference>
</catalog_product_view>

What is the xml and process to add custom template in Magento2.1?


texts: Magento 2 how to change customer group based on order status with cron jobs

texts:
If customer order status is pending and more than 30 days, how to change customer group to wholesale in crons?

crons should run at every one minute.

This is my code

public function execute()
{
     $today          = date("Y-m-d h:i:s");
     $to             = strtotime('-02 min', strtotime($today));
     $to             = date('Y-m-d h:i:s', $to);

    $filterGroupDate      = $this->filterGroup;
    $filterGroupStatus    = clone($filterGroupDate);

     $filterDate      = $this->filterBuilder
         ->setField('updated_at')
         ->setConditionType('to')
         ->setValue($to)
         ->create();
    $filterStatus    = $this->filterBuilder
        ->setField('status')
        ->setConditionType('eq')
        ->setValue('pending_payment')
        ->create();

    $filterGroupDate->setFilters([$filterDate]);
    $filterGroupStatus->setFilters([$filterStatus]);

    $searchCriteria = $this->searchCriteriaBuilder->setFilterGroups(
        [$filterGroupStatus]
    );
    $searchResults  = $this->orderRepository->getList($searchCriteria->create());

    $selectedgroup=3;

    /** @var Order $order */
    foreach ($searchResults->getItems() as $order) {
        $this->orderManagement->cancel($order->getId());
         $customer = $order->getCustomer();
         $customer->setData('customer_group_id', $selectedgroup)->save();

    }
}


texts: Can categories and attributes be added to search results

texts: Our company is running Magento 1.9. Can you add so categories and attributes come up on to filter down the search results?


texts:
I wonder if anyone has any idea on how to fix the error below.

There has been an error processing your request
Module "Mage_XmlConnect" requires module "Mage_Weee".

Trace:

#0 /home/kokorugs/public_html/online-carpet-store/app/code/core/Mage/Core/Model/Config.php(849): Mage::throwException('Module "Mage_Xm...')
#1 /home/kokorugs/public_html/online-carpet-store/app/code/core/Mage/Core/Model/Config.php(812): Mage_Core_Model_Config->_sortModuleDepends(Array)
#2 /home/kokorugs/public_html/online-carpet-store/app/code/core/Mage/Core/Model/Config.php(315): Mage_Core_Model_Config->_loadDeclaredModules()
#3 /home/kokorugs/public_html/online-carpet-store/app/code/core/Mage/Core/Model/App.php(414): Mage_Core_Model_Config->loadModules()
#4 /home/kokorugs/public_html/online-carpet-store/app/code/core/Mage/Core/Model/App.php(343): Mage_Core_Model_App->_initModules()
#5 /home/kokorugs/public_html/online-carpet-store/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#6 /home/kokorugs/public_html/online-carpet-store/index.php(87): Mage::run('', 'store')
#7 {main}


texts:
How to configure the maximum discount percent in magento for the cart amount.

Example: Cart value is 3,50,000

Coupon Code discount applicable : 20%

Discount applicable 70,000

However I want to limit this to 50,000 only.


texts: Product Images are uploading but not showing up after upload in bakend

texts:
Image upload is not working, it stays stuck on "Complete" like this and nothing happens.

My magento version is 1.9.1.0. I've changed the media folder permissions also checked removing the cache storage and magento cache, reindexed the data but nothing seems to work for me

this.uploader.removeFile(item.id); comment line this line but it not working..

Your help will be appreciated


texts: Incredible latency with hosting provider

texts:
Our customer care team cannot use admin panel of Magento efficiently. Throughout the day, it happens randomly there will be periods of time where it takes up to 60 seconds to make an entry for a customer. Then they go to the next part of the process and another 60 seconds. This seems rather slow and time consuming.

Is there a way to speed up how magento processes things like this or is it possible server related?

I have though about setting up a local installation of magento on each of the employees desktops and then having them all point to a local server where we would hold the database. All sales would also have to go through this database too, meaning our online hosted sites with other servers would have to point to this one.

I am not trying to start a task like this unless I've check every other way to speed this up.

Yes I've opened a ticket with nexcess our hosting provider.


texts: Add attribute to Shopping Cart Price Rule coupon

texts: Is there any way to add an attribute to a Shopping Cart Price Rule in Magento? I need to add a field called "featured" for every Shopping Cart Price Rule and after that, be able to filter rules by this attribute.


texts: Magento2 Get Category Id like breadcrumbs of Current Product

texts:
If product belongs to Blue-Shirt(may be Shirt also). and category and tree is like

-Root(Id-2)
 -Shirt (Id-35)
  -Blue-Shirt(Id-36)

I want to get category ID like breadcrumbs 1/2/35/36
.May be i can get it from breadcrumbs somewhere?


texts: url magento 2 to get manufacturer value on all website

texts: why url like this do not work when we try to access to all product of a specific attribute value. let's take manufacturer as an example::https://website.com//?manufacturer=1437


texts: Magento2 : Remove disabled product from wishlist

texts:
I need to remove all the disabled products from wishlist and for this I write a product status check in Magento_Wishlist/templates/item/list.phtml like this:

if($product->getStatus() == \Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED):
------------
endif;

I also add a plugin to update wishlist count in the header part like below:

/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">
    <type name="Magento\Wishlist\CustomerData\Wishlist">
        <plugin name="vendor-customer-wishlist"
                type="Vendor\Customer\Plugin\WishlistPlugin" sortOrder="1" />
    </type>
</config>

Vendor/Customer/Plugin/WishlistPlugin

<?php
namespace Vendor\Customer\Plugin;

use Magento\Catalog\Model\Product\Attribute\Source\Status;

/**
 * Class WishlistPlugin
 * @package Vendor\Customer\Plugin
 */
class WishlistPlugin
{
    /**
     * @var \Magento\Wishlist\Helper\Data
     */
    protected $wishlistHelper;

    /**
      * WishlistPlugin constructor.
      * @param \Magento\Wishlist\Helper\Data $wishlistHelper
      * @param \Magento\Wishlist\Model\Wishlist $wishlist
      * @param \Magento\Customer\Model\Session $customerSession
    */
   public function __construct(
     \Magento\Wishlist\Helper\Data $wishlistHelper,
     \Magento\Wishlist\Model\Wishlist $wishlist,
     \Magento\Customer\Model\Session $customerSession
   ) {
     $this->wishlistHelper = $wishlistHelper;
     $this->wishlist = $wishlist;
     $this->customerSession = $customerSession;
  }

    /**
     * Plugin function after get section data
     *
     * @param \Magento\Wishlist\CustomerData\Wishlist $subject
     * @param $result
     * @return mixed
     */
    public function afterGetSectionData(\Magento\Wishlist\CustomerData\Wishlist $subject, $result)
    {
        $disabledProductsCount = 0;
        $customerId = $this->customerSession->getCustomerId();
        $wishlistItems = $this->wishlist->loadByCustomerId($customerId, true)->getItemCollection();

        foreach ($wishlistItems as $item) {
          if($item->getProduct()->getStatus() == Status::STATUS_DISABLED) $disabledProductsCount++;
        }

        $counterNumber = $this->wishlistHelper->getItemCount();

        if($disabledProductsCount) {
         $counterNumber -= $disabledProductsCount;
        }

        $result['counternumber'] = $counterNumber;

        return $result;
    }

}

But when I add three items in wishlist and disable one product from that, then the wishlist counter not updating properly and it remains three. Anybody please help me to resolve this?


texts: Where is the code for "{{store url="example/example"}}

texts: I would like to know how Magento converts {{store url="example/example"}} into http://www.example.com/example/example/


texts: Language switcher is broken when using multiple times : Magento 2.2.1

texts:
In language switcher when i switch from the default storeview (French in my example) to English, the url changes to: https://example.com/?___store=en
Using the language switcher in the header, switch again from English to French, the url changes to: https://example.com/?___store=en?___store=fr and the shop crashes


texts: Possible to have configurations without creating new products?

texts:
I am exploring the options of Magento 2 and particularly the "configurations" for a product (shirt color or size).
I have a type of product that can be declined in various colors, sizes and such, and I'd prefer to have one page with options rather than 41 pages for all possibilities.
However, it seems that when "creating" the different configurations for the product, it automatically creates new products for those configuration. The thing is, the products are already created and there. I'd like to know if it's possible to create configurations but "link" existing products, instead of having Magento create new ones.
Let me know if I can provide anything else
~cheers


texts: Add note on invoices for specific countries

texts:
I am searching for a way to add a note at the bottom (tax regarding) for specific invoices for orders outside the EU. We are from germany, and by law we have to add some notes on all invoices for outside EU countries.
I have searched the backend, but can not find a solution for this.

Maybe I have to hardcode some conditional coding inside the PDF generator? Or does someone knows a better/cleaner way  or maybe some extension doing this?


texts: How to send mail by getting the details from database?

texts:
I had created a dropdown list with fields lab,pharmacy and food.When

1.I select the lab it has to send the mail for those islab checkbox is true.

2.when I select the pharmacy it has to send the mail for those ispharmacy checkbox is true and in the same way for food.

I have tried for islab but I could not add for rest of them.
Please help me.

mail.phtml

   <?php
   $connectionresource = Mage::getSingleton('core/resource');
   $readconnection = $connectionresource->getConnection('core_read');
     $allrecord = $readconnection->select()->from(array('serviceprovider'=>'mg_serviceprovider'))->where('serviceprovider.islab=?', '1'
 );
       $alldata =$readconnection->fetchAll($allrecord);
     foreach($alldata as $data)
     {
          sendMailserviceAction($data['email'],$data['name']);
     }

     function sendMailserviceAction($email,$pname){
 //Mage::getModel('sales/order')->load(24999);
 $cemail=$_POST['email'];
 $bloodgroup=$_POST['bloodgroup'];
 $unitsrequired=$_POST['unitsrequired'];
 $requireddate=$_POST['requiredby'];
 $rcity=$_POST['rcity'];
 $city=$_POST['city'];
 $hospital=$_POST['hospital'];
 //$location=$_POST['location'];

 $name=$_POST['name'];
 $mobile=$_POST['mobile'];
 $yourbloodgroup=$_POST['yourbloodgroup'];

 $html=
'Hi,

Requisition Details:

Bloodgroup: '.$bloodgroup.'

Units Required:'.$unitsrequired.'

Required By:'. $requireddate.'

City: '.$rcity.'

Hospital:'.$hospital.'

Seeker Details:

Name: '.$name.'

Email : '.$cemail.'

Mobile Number: '.$mobile.'

City: '.$city.'

YourBloodgroup:'.$yourbloodgroup.'
'

;

 $mail = Mage::getModel('core/email');
  $mail->setToName($pname);
 $mail->setToEmail($email);
 $mail->setBody($html);
 $mail->setSubject('Blood Donor');
 $mail->setFromEmail('admin@labwise.in');
 $mail->setFromName("Labwise");
//$mail->addBcc("admin@labwise.in");
$mail->setType('html');// YOu can use Html or text as Mail format

   try {
  $mail->send();
  //Mage::getSingleton('core/session')->addSuccess('Your Order is successfully Completed');
  //Mage::app()->getResponse()->setRedirect(Mage::getBaseUrl());
//return '
Your Order has been submitted. Thank you for using labwise.
';
  //$this->_redirect('');
  }
 catch (Exception $e) {
  //Mage::getSingleton('core/session')->addError('Unable to send.');
   //Mage::app()->getResponse()->setRedirect(Mage::getBaseUrl());
 // return '
Unable to submit.
';
 //$this->_redirect('');
 }
 }
 echo sendMailserviceAction();

 ?>


texts:
I am trying to change the layout of home page to 2columns-left.phtml.

According to my understanding if I change the template file of the "root" block, in page.xml layout file, to the above template file then the layout should change. But it is not happening.

By default, as I can see, the root block has page/3columns.phtml template file applied in page.xml. But when I used template hints, I have seen that the page is rendering with 2columns-right.phtml.

So, I searched for page/2columns-right.phtml in every file and replaced it with page/2columns-left.phtml. Still the page is rendering the layout of page/2columns-right.phtml.

I made the above changes in catalogsearch.xml and catalog.xml files. (By overriding in my new theme folder).

what I am missing here?


texts: Magento2 - Destination fields are not mapped. Document: paypal_settlement_report_row. Fields: store_id

texts:
I tried to do migration from Magento1.9.3.8 to Magento2.3.4, when I ran the Magento Data migration tool I always got this error:

  Destination fields are not mapped. Document:
  paypal_settlement_report_row. Fields: store_id

I tried to fix it by modifying the map_file in etc/opensource-to-opensource/1.9.3.8/map.xml.dist, but no luck

<destination>
     ....
     <field_rules>
         ....
         <ignore>
            <datatype>paypal_settlement_report_row.store_id</datatype>
        </ignore>
    </field_rules>
</destination>


texts: Only allow 6 digit number as customer password

texts: Is there a way to make magento 2 only allow 6 digit number format as customer password?


texts: How to enable search for rendered field in custom module admin grid

texts:
I have added a custom column to the "Company" table of the B2B magento version. And rendered it on the grid like following.
'000'.$actual_column_value.' '.'Another string from other table'

so now I want to enable the search for this column in admin grid.
I tried with expression field in the collection but not sure how I would add it to collection.
$this->join(
        [
            'test_table' => $this->getTable('test_table')
        ],
        'main_table.actual_column = test_table.actual_column',
        [
            'string_field'             => 'string_field'
        ]
    )


texts:
I am developing custom plugin, in which i'm adding note in customer information data from Manage customer.
I also want to show that note in order with customer information. I need to override one file

design/adminhtml/default/default/template/sales/order/view/info.phtml

My config file is

    <?xml version="1.0" ?>
<config>
  <modules>
    <Company_Module>
      <version>1.0.0.1</version>
    </Company_Module>
  </modules>
  <global>
    <blocks>
      <module>
        <class>Company_Module_Block</class>
      </module>
      <adminhtml>
        <rewrite>
         <customer_grid>Company_Module_Block_Adminhtml_Customer_Grid</customer_grid>
        </rewrite>
        <rewrite>
        <sales_order_view_info>Company_Module_Block_Sales_Order_View_Info</sales_order_view_info>
        </rewrite>
     </adminhtml>
    </blocks>
    <models>
      <module>
        <class>Company_Module_Model</class>
        <resourceModel>module_mysql4</resourceModel>
      </module>
    </models>
    <resources>
      <module_setup>
        <setup>
          <module>Company_Module</module>
          <class>Company_Module_Model_Mysql4_Setup</class>
        </setup>
      </module_setup>
    </resources>
  </global>
  <adminhtml>
    <layout>
      <updates>
        <module>
          <file>module.xml</file>
        </module>
      </updates>
    </layout>
    <events>
      <adminhtml_customer_save_after>
        <observers>
          <module>
            <type>singleton</type>
            <class>Company_Module_Model_Observer</class>
            <method>saveCustomerTabData</method>
          </module>
        </observers>
      </adminhtml_customer_save_after>
    </events>
  </adminhtml>
</config>

And Block file is app/local/Company/Module/Block/Sales/Order/View/Info.php

<?php

class Company_Module_Block_Sales_Order_View_Info extends Mage_Adminhtml_Block_Sales_Order_View_Info
{
    public function __construct()
    {

        $this->setTemplate('module/sales/order/view/info.phtml');
        echo $this->getTemplate(); //correct path showing

    }

    public function getCommentCustomer($orderID)
    {
        $customer = Mage::getModel('customer/customer')->load($orderID);
        return $customer->getComment(); // comment i have added from tab
    }
}

I am using template hint extension.  Its showing correct Correct Block but showing wrong  .phtml path.  Instead of module/sales/order/view/info.phtml it shows /adminhtml/default/default/template/sales/order/view/info.phtml

Thanks in advance.


texts: Magento 2: Cannot open the Product Detail Page

texts:
I'm trying to open the product detail page from the listing page but its not working, and its showing the below error:

2 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid block type: Magento\Review\Block\Product\Review
Exception #1 (ReflectionException): Class Magento\Review\Block\Product\Review does not exist

Can anyone please help me to rectify this error?

When I try to open the product page, its not opening and I can see the below error in view-source:

<meta property="og:type" content="product" />
<meta property="og:title" content="

Fatal error:  Uncaught Error: Call to a member function getName() on null in /var/www/html/vendor/magento/module-catalog/view/frontend/templates/product/view/opengraph/general.phtml:13
Stack trace:
#0 /var/www/html/vendor/magento/framework/View/TemplateEngine/Php.php(59): include()
#1 /var/www/html/vendor/magento/framework/View/Element/Template.php(271): Magento\Framework\View\TemplateEngine\Php-&gt;render(Object(vendor\module\Block\Index\Index), '/var/www/html/v...', Array)
#2 /var/www/html/vendor/magento/framework/View/Element/Template.php(301): Magento\Framework\View\Element\Template-&gt;fetchView('/var/www/html/v...')
#3 /var/www/html/vendor/magento/framework/View/Element/AbstractBlock.php(1094): Magento\Framework\View\Element\Template-&gt;_toHtml()
#4 /var/www/html/vendor/magento/framework/View/Element/AbstractBlock.php(1098): Magento\Framework\View\Element\AbstractBlock-&gt;Magento\Framework\View\Element\{closure}()
#5 /var/www/html/vendor/magento/framework/View/Element/AbstractBlock.php(671): Magento\Framework\View\Element\Abst in /var/www/html/vendor/magento/module-catalog/view/frontend/templates/product/view/opengraph/general.phtml on line 13


texts: Is this correct event to observe: To fire once order is completely paid?

texts:
I have a working observer using sales_order_place_after and I am changing it to use sales_order_invoice_pay. Is this is the correct method? Will this to fire only if the invoice is fully paid, front-end or admin? My test seems to indicate this is correct but I'd appreciate a look.

in Observer.php

   $invoice = $observer->getEvent()->getInvoice();
   $order = $invoice->getOrder();
        if (!$order->canInvoice() ) {
            Mage::getModel('myapps_orderman/export_mscrmapi')
            ->exportOrder($order);
        }


texts: Programmatically Delete Product Attribute Sets

texts:
Due to some shoddy code from a previous employee I have inherited a Magento 2 store with thousands of erroneous product attributes and hundreds of attribute sets.

I've been able to delete the attributes and move all the products back on to the Default attribute set, but now I'm left with hundreds of empty, unused product attribute sets that I can't find how to delete easily?


texts:
I have to integrate a custom search engine in a Magento installation.

Please note: before you recommend me not to change the search engine and rather to tweak the existing one, my client demands that a search services of theirs is used in this installation. So no, I can't consider other options - I have to use their custom search engine and integrate it in Magento.

What would be the best way to proceed? I think I could go with using a custom search box that will point to a non-Magento page of mine, but I'm not sure this would be a good approach. Maybe it would be better to replace the search results generation? I'm not sure either way.


texts: Magento "Remind passowrd" email template issue

texts:
By default, when you change a user password from backend using  Send Auto-Generated Password a email is automatically send to the user with the new password.
In the Transactional Emails area, for this email we have the template called "Remind Password".

I have created a new template based on this one, and i want to add a new variable.

Does anyone know where i can find the PHP files that insert variables in this email template?


texts: Is these possible synchronisation of two tables first handle the request from php and second from magento

texts: if php table value change then also update the magento table. FrontEnd is any thing its website or something else.


texts: how to get custom attribute value from bestseller products collections in block magento 2?

texts:
Here I am trying to get custom attribute value from bestseller products collections magento 2??

<?php
namespace Vendor\Module\Block;
class BestSeller extends \Magento\Framework\View\Element\Template
{
   protected $_collectionFactory;
   protected $_storeManager;
   protected $_productloader;
   protected $categoryFactory;
   public function __construct(
       \Magento\Backend\Block\Template\Context $context,
       \Magento\Sales\Model\ResourceModel\Report\Bestsellers\CollectionFactory $collectionFactory,
       \Magento\Store\Model\StoreManagerInterface $storeManager,
       \Magento\Catalog\Model\ProductFactory $_productloader,
       \Magento\Catalog\Model\CategoryFactory $categoryFactory,
       array $data = []
   ) {
       $this->_collectionFactory = $collectionFactory;
       $this->_storeManager = $storeManager;
       $this->_productloader = $_productloader;
       $this->categoryFactory = $categoryFactory;
       parent::__construct($context, $data);
   }

    public function getBestSellerData(){

        $bestSellerProdcutCollection = $this->_collectionFactory->create()
                    ->setModel('Magento\Catalog\Model\Product')
                    ->setPeriod('month') //you can add period daily,yearly
                    ->setPageSize(8);

        return $bestSellerProdcutCollection;

    }

}

  In phtml file i am trying like this

$bestCollection = $block->getBestSellerData();
foreach($bestCollection as $bproduct){
$ProductType = $bproduct->getData('type_product');
}


texts: Get list of All products and transfer to different store

texts: I want to get a list of all the products in my Magento stores. the problem is configurable and grouped products. i want to transfer products to another server with external framework, i want to get configurable and grouped products with their associated simple products as a field.


texts: Where can I find CMS pages from magento 2?

texts:
I accidentally overwrote CMS pages when I migrated from M1 to M2.
I still have the backup of the old M2. So my question is, where can I find the file location of the M2 CMS pages?


texts: How to remove 404 error in admin panel after uploading module in running website in magento1.9?

texts:
Hello everyone i uploaded live chat module in my running website.But after uploading i get 404 error in live chat module.i tried many ways to remove it like flush cache,logout and login again.but still it appear. what should i do for this??
plz help me


texts:
I have a getChildHtml in my login.phtml for my module:

<?php echo $this->getChildHtml('inchoo_socialconnect_google_login_button'); ?>

but it doesn't appear to be getting the child html

snippet of customer_account_login.xml:

<block class="Inchoo\SocialConnect\Block\Login" name="inchoo_socialconnect_login" template="Inchoo_SocialConnect::inchoo/socialconnect/login.phtml">
    <block class="Inchoo\SocialConnect\Block\Google\Button" name="inchoo_socialconnect_login_google_button" template="Inchoo_SocialConnect::inchoo/socialconnect/google/button.phtml"/>
</block>

I think i've set the layout file out correctly but i could be wrong


texts:
I found a nice popup implementation https://magento.stackexchange.com/a/222160/85778, but how do I define new users?
For example. If 48 hours have not passed since the creation of the user, then it is considered new.


texts: Adding multiple simple products belonging to a configurable product to cart

texts:
I am trying to add multiple simple products that belong to a configurable product to the cart at the same time.

This is example code that should add 1 of each simple product (in my case 5 simples) belonging to a configurable product:

<?php
    $product = $this->product->load(12345); //get configurable product
    $simple_products = $product->getTypeInstance()->getUsedProducts($product); //get all simple products
    $attributes = $product->getTypeInstance(true)->getConfigurableAttributesAsArray($product); //get all possible attributes

    foreach ($simple_products as $simple_product) {
        /* get super attributes for simple product */
        $super_attributes = array();
        foreach ($attributes as $attribute) {
            $text = $simple_product->getAttributeText($attribute['attribute_code']);
            foreach ($attribute['values'] as $value) {
                if ($value['label'] == $text) {
                    $super_attributes[$attribute['attribute_id']] = $value['value_index'];
                }
            }
        }

        $this->cart->addProduct($product, array(
            'qty' => 1,
            'super_attribute' => $super_attributes
        ));
        $this->cart->save();
    }

What it does instead is adds 5 of the first simple product to the cart. I believe this is because $this->cart->addProduct is changing the value of $product from the configurable product to the simple product so for the next 4 add to carts it is adding the 1st simple product but I can't find any way to stop it doing it or setting product back to the configurable.


texts: How can I create a custom link Magento 1.9.3.x admin side menu?

texts: I'm trying to create a custom section with custom links on Magento 1.9 admin side menu, but it doesn't redirect me to my controller action


texts:
I get a report error when I try to edit my theme configuration in "Content -> Design -> Configuration

When I click on Edit over my Theme I See a error sended to Report, and in teh report the follow error:

a:4:{i:0;s:87:"The configuration parameter "componentType" is a required for "swatch_image" component.";i:1;s:7760:"#0 /var/www/html/www.solopide.me/html/vendor/magento/framework/View/Element/UiComponentFactory.php(360): Magento\Framework\View\Element\UiComponentFactory->mergeMetadataItem(Array, Array, false)
    #1 /var/www/html/www.solopide.me/html/vendor/magento/framework/View/Element/UiComponentFactory.php(360): Magento\Framework\View\Element\UiComponentFactory->mergeMetadataItem(Array, Array, false)
    #2 /var/www/html/www.solopide.me/html/vendor/magento/framework/View/Element/UiComponentFactory.php(360): Magento\Framework\View\Element\UiComponentFactory->mergeMetadataItem(Array, Array, false)
    #3 /var/www/html/www.solopide.me/html/vendor/magento/framework/View/Element/UiComponentFactory.php(272): Magento\Framework\View\Element\UiComponentFactory->mergeMetadataItem(Array, Array, false)
    #4 /var/www/html/www.solopide.me/html/vendor/magento/framework/View/Element/UiComponentFactory.php(164): Magento\Framework\View\Element\UiComponentFactory->mergeMetadata('design_config_f...', Array, false)
    #5 /var/www/html/www.solopide.me/html/vendor/magento/framework/View/Layout/Generator/UiComponent.php(124): Magento\Framework\View\Element\UiComponentFactory->create('design_config_f...', NULL, Array)
    #6 /var/www/html/www.solopide.me/html/vendor/magento/framework/View/Layout/Generator/UiComponent.php(93): Magento\Framework\View\Layout\Generator\UiComponent->generateComponent(Object(Magento\Framework\View\Layout\Data\Structure), 'design_config_f...', Array, Object(Magento\Framework\View\Layout\Interceptor))
    #7 /var/www/html/www.solopide.me/html/vendor/magento/framework/View/Layout/GeneratorPool.php(86): Magento\Framework\View\Layout\Generator\UiComponent->process(Object(Magento\Framework\View\Layout\Reader\Context), Object(Magento\Framework\View\Layout\Generator\Context))
    #8 /var/www/html/www.solopide.me/html/vendor/magento/framework/View/Layout.php(327): Magento\Framework\View\Layout\GeneratorPool->process(Object(Magento\Framework\View\Layout\Reader\Context), Object(Magento\Framework\View\Layout\Generator\Context))
    #9 /var/www/html/www.solopide.me/html/vendor/magento/framework/View/Layout/Builder.php(129): Magento\Framework\View\Layout->generateElements()
    #10 /var/www/html/www.solopide.me/html/vendor/magento/framework/View/Page/Builder.php(55): Magento\Framework\View\Layout\Builder->generateLayoutBlocks()
    #11 /var/www/html/www.solopide.me/html/vendor/magento/framework/View/Layout/Builder.php(65): Magento\Framework\View\Page\Builder->generateLayoutBlocks()
    #12 /var/www/html/www.solopide.me/html/vendor/magento/framework/View/Layout.php(244): Magento\Framework\View\Layout\Builder->build()
    #13 /var/www/html/www.solopide.me/html/vendor/magento/framework/View/Layout.php(859): Magento\Framework\View\Layout->build()
    #14 /var/www/html/www.solopide.me/html/vendor/magento/module-backend/Model/View/Result/Page.php(59): Magento\Framework\View\Layout->getBlock('menu')
...

I'm using Magento 2.1.3 in production Mode.

Any idea about what is the problem?

Thank!


texts: Magento 2: How to run CLI command on admin store (storeId:0)?

texts:
I have a multi-store setup with Magento 2.1.7 CE on the domain a, domain b, domain c. I want to apply images to some products programmatically. When I make an API call on any domain with the "all" path:

(index.php/rest/**all**/V1/my/apply/images. instead of index.php/rest/V1/my/apply/images)

The store is 0 - that's what I want. The api calls a helper method in this case.

But I do not want to call the REST API but do this by CLI to avoid timeouts. So I wrote a command and this is calling the same helper method as the REST API call does. So I wonder how to set the store. It's running the default store only.

Using the storeManager->setCurrentStore(0) before calling the helper method doesn't have any effects.

Do you have any suggestions?


texts: Magento admin user logging-out after some time

texts:
I am facing an issue in Magento 1.9.2.1 that is my admin user is getting
logged-out automatically after few minutes.

I have checked in back-end for the settings and all seems correct.

This majorly happens, when on front-end any guest user is adding product to the cart which actually not getting added sometimes and hence at admin end, the user logs out automatically.


texts: Magento 2 Store email addresses not editable

texts:
So, in Magento 2 under:

Stores > config > General > Store Email addresses

I want to edit the Sales Representative email address, however, it seems to be disabled - the store is currently set into single store mode. I'm running Magento 2.2.5 on a php7.1 box in production mode.
I've not been able to modify these email addresses before, if I remove the disabled via the inspect DOM modifier, I can edit them and then on save it resets to the example .... but updates the database.
Here's a quick screengrab.

I simply can't edit them, I'm at a loss, I don't know why it works in a local environment but doesn't work on the server.
I'd just like to point out it works on a local machine but not on the live one.


texts: How do I enable Index Management in 1.13.1?

texts:
In the Upgrading to and Verifying Magento Community Edition 1.8 and Enterprise Edition 1.13 - Part 1 document, step 3.h reads:

  Set all indexers to update when scheduled (System > Configuration > ADVANCED > Index Management, Update when scheduled.

That's awesome, but I don't have Index Management in my ADVANCED menu. What's the missing step to enable this?


texts: Varnish + nginx + Turpentine: Making 'Allowed IPs' work

texts:
so I have a Magento instance running with Varnish in front (port 80) and nginx running in the back on port 8080. Turpentine does all the Magento hole-punching magic.

There are quite a few resources on making the REMOTE_ADDR work so that the Developer Client Restrictions under Admin -> Advanced -> Developer work properly based on my IP. The thing is that the resources are conflicting and I am seeking a best practice way to handle this in 2014.


texts: Magento 2: Setting the product url key with REST API

texts:
Is it possible? I see no mention of a url_key in the Swagger docs.

I have a large database of product I need to import, and the names (which seem to determine the url) are not unique.


texts: Load popup only based on session timeout

texts:
I have initialized a popup
var popup = modal(options, $('#notification-modal'));
    $("#notification-link").on('click', function () {
        $("#notification-modal").modal("openModal");
    });

    $(document).ready(function () {
        $("#notification-link").trigger("click");
    });

But the above popup triggers on every refresh.
I want the popup to load once once the site is called or closing and opening the browser again to the page (based on session expire).


texts: Foreign key constraint fails Entity_Type_ID

texts:
Transferring my website database from 1.9.2.2 to 2.2.3 is successful.
However if I then export and import again my database with foreign key checks enabled the below error is displayed.

  -- Constraints for table eav_entity_store
  -- ALTER TABLE eav_entity_store   ADD CONSTRAINT EAV_ENTITY_STORE_ENTITY_TYPE_ID_EAV_ENTITY_TYPE_ENTITY_TYPE_ID
  FOREIGN KEY (entity_type_id) REFERENCES eav_entity_type
  (entity_type_id) ON DELETE CASCADE,   ADD CONSTRAINT
  EAV_ENTITY_STORE_STORE_ID_STORE_STORE_ID FOREIGN KEY (store_id)
  REFERENCES store (store_id) ON DELETE CASCADE

  MySQL said:
  **#1452 - Cannot add or update a child row: a foreign key constraint fails (mydatabase.#sql-44f8_43, CONSTRAINT
  EAV_ENTITY_STORE_STORE_ID_STORE_STORE_ID FOREIGN KEY (store_id)
  REFERENCES store (store_id) ON DELETE CASCADE)

As I understand EAV_ENTITY_STORE is the increment of ID's for orders, invoices, credit memos and shipments. The foreign key relates to eav_entity_type which defines the type of entity

5 = Order
6 = Invoice
7 = Credit memo
8 = Shipment

I only have one store on the new website

Is the problem that there is no longer store_id=2 and is it safe to just delete this?
I know i could just import with foreign key checks disabled but I would like to avoid doing this as it normally creates problems later.


texts: Gift wrap still showing when disabled in Admin

texts:
I met an issue when using gift wrap of M2.
I added gift wrap in Shopping cart, then I disabled that gift wrap in Admin but it's still showing and applying amount into cart like the below image.

It's the default Magento


texts: Magento Different Transactional Emails Per Store View

texts:
I am looking to have different Transaction Emails per Store View (or even just per website).
In particular, I would like to have different Newsletter Subscription Success emails.

I have created a new Transaction Email Template, then I went to Configuration, and selected the Website / Site View in Current Configuration Scope.
Then I went to Customers -> Newsletter -> Subscription Options -> Success Email Template, deselected "Use Default" and selected the new Template, and saved the config.

But despite doing all the above, the "Global" / Default Success Email Template is still being sent out for customers linked to that Site View.

What am I doing wrong?


texts: How to import custom option values with magmi

texts: I would like to create a customizable options with magmi. For example I have a menu drop-down or choose a texture type. I read that should add a custom_option column, but what do I put in this column?


texts: Create a block dynamically in controller and send its html in response to ajax request

texts:
I had done this a lot of times but i got stuck on this.
In my block class i have set the template file and in my controller i'm trying to get the html but every time it is returning an empty string.

Here are the code files

Products.php (Block class)

<?php
namespace
Vendor\Module\Block\Catalog\Product\View\Type\Bundle\Option;

class Products extends
\Magento\Bundle\Block\Catalog\Product\View\Type\Bundle\Option
{
/**
 * @var string
 */
protected $_template =
'catalog/product/view/type/bundle/option/products.phtml';

protected $products;

public function setProducts($products)
{
    $this->products= $products;
    return $this;
}

public function getProducts()
{
    return $this->products;
}
}

In Controller, wrote this code to get html,

$html = $this->_view->getLayout()
        ->createBlock('Vendor\Module\Block\Catalog\Product\View\Type\Bundle\Option\Products')
        ->setProducts($productList)
        ->toHtml();

I have tried it with resultPageFactory in place of _view object.

I have exactly the same implementation working fine in other template file.


texts: Magento 2 - Access customer address list on checkout

texts:
I'm trying to custom the checkout of Magento 2 by hiding specific customer addresses on checkout.

Everything is working fine except for the file "magento/web/vendor/magento/module-checkout/view/frontend/web/js/model/shipping-save-processor/default.js", I would like from this file to access the customer address list defined in shipping-address/list.js but I do not understand how can I do it ?

I tried the code below but I have the error : Uncaught TypeError: billingAddress.getCacheKey is not a function

var customerData = window.customerData;
var shippingAddress = quote.shippingAddress();

customerData.addresses.forEach(function (address) {
   if(shippingAddress['customerId'] == address['customer_id'] && address['default_billing'] == true) {
       selectBillingAddressAction(address);
   }
});


texts: magento order view information is blank page

texts: when I click order view in admin panel, the information is blank page.Anyone can help me out?? Thanks a lot.


texts: Installing Data-Migration Tool in M2.3.3 without Composer

texts:
Is it Possible to install Data Migration Tool Without using Composer ?
After Copying the files in vendor/magento/data-migration-tool, when i run migrate command this error occurs ..

 [InvalidArgumentException]There are no commands defined in the "migrate" namespace.

TIA.


texts: Place Order on Whatsapp at product category page Magneto 2

texts:
I have created Order on WhatsApp button using the following code and my code is working. I can show Order on WhatsApp button at product category page so please tell me how to show WhatsApp button at category page below side of add to cart button

code place at app/design/frontend/Smartwave/porto/Magento_Catalog/templates/product/view/addtocart.phtml

<?php if($_product->getWhatsapp_order()){ //yes or no button?>
<button type="button"
        title="<?php echo $_product->getWhatapp_button_name() ;?>"
        class="action primary"
        onclick=" window.open('https://wa.me/0000000000?text=I want to order this product *<?php echo $_product->getName() ?>* Price <?php echo $_product->getPrice() ?> Link <?php echo $_product->getProductUrl() ;?>/ ')"><?php echo $_product->getWhatapp_button_name() ;?></button>


texts: Magento 2 product page price rounding up on new store view

texts:
I've created 2 store view under 1 wesbites->stores

store view 1 = default has Euro currency.
store view 2 = Swiss has Swiss franc currency.

I've added a product on both store view now that costs 9.99 for both currencies.
But the Swiss store view rounds up CHF 10.00 I am missing any settings?
I can see that it's using javascript as the DOM data is correct as the price also flicker from 9.99 to 10.00

By the way I've added 1 to 1 in currency rates:


texts: How to make multi store view sharing same translation?

texts:
I have a default website in Magento and only one store, but I had to create a new store view, which will share everything, except layout that will be different, it's just to publicize another brand of same company. I duplicated the template, layout and skin folders in order to work around the newest store view, but some words I translated before are being shown different, e.g below:

In default store view, I changed "Regular Price" to "was" and "Special Price" to "now", so, on the product page we can see "was $99 now $79". However, after creating a new store view in admin, I'm seing the old default text "Regular Price: $99 Special Price: $79" instead of "was $99 now $79".

How to use exactly the same locale for multiple store views? The locale (translation) needs always to be the same doesn't matter the store view.

Any help?


texts: How to remove a extension from vendor folder?

texts:
I installed an extension using this command:

composer require magestore/module-bannerslider

The installation went ok, but now I do not want to use the extension anymore because it is giving compilation errors. I tried removing the folder magestore/bannerslider from the vendor folder, but this results in an error during upgrade. I checked the tables core_config_data and setup_module for entries from that extension, but there arent any.

So, how can I remove that extension or any extension that resides in the vendor folder?

Thanks


texts: How do I add watermark programmatically?

texts:
I don't if it is possible to add watermark to product images programmatically. Here is my situation:

On the category pages and the product details pages, I want to show the product images WITHOUT watermarks. However, we have a function that a customer can add some of the products to their favorites, and we can send an email to the customer along with their favorite product images. Within the email, I want all the product images to be watermarked.

If I setup the watermark in Magento Admin, the product images on category pages will have watermarks, which is not what I want. Can Magento do some magic like $product->getWatermarkedImageUrl() when I want to watermark images?

I am using Magento 1.6.1.0 Community version.

Thanks.


texts:
///////////UPDATED QUESTION/////////////

Ok i found the reason it wasn't working it because i was selecting "general" as a customer group, and it doesnt include non-logged in customers as "general" Do you know if there is a way to make this rule apply to everyone in all groups included not logged in??

///////////UPDATED QUESTION/////////////

I created a Shopping cart rule for buy one get one free with these actions

Apply:Percentage of product price discount

Discount Amount * : 50

Maximum Qty Discount is Applied To:0

Discount Qty Step (Buy X):2

Apply to Shipping Amount:no

Free Shipping:no

Stop Further Rules Processing:no

and the condition:
If ALL  of these conditions are TRUE :
SKU  is  1526.

but it is not doing anything to that product when i get to my shopping cart.

so i added this under the conditions tab
If ALL  of these conditions are TRUE :
If an item is FOUND  in the cart with ALL  of these conditions true:
SKU  is  1526.

But still nothing is happening. So i was wondering do i need to do anything after the rule like reindex, clear cache or does it take a while to kick in or am i just doing it wrong??

Thank you


texts: How to add custom block beside the header logo of magento 2?

texts:
I having a problem inserting a block after magento header logo. I want to know how it's done in my default.xml.

Currently this is my code:

    <referenceContainer name="top.search">
        <block class="Crystal\Customblocks\Block\Cti"  template="default/cti.phtml" after="header.links"/>
    </referenceContainer>


texts: Magento 2.3 - Disable Payment Method for Certain Customer Groups by using Observer

texts:
Source : https://www.magedelight.com/resources/how-to-disable-payment-method-for-certain-customer-groups-in-magento-2/ Stright opposite i just enable certain customer group,
app/code/Gta/EnablePaymentMethod/registration.php
<?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Gta_EnablePaymentMethod',
    __DIR__
);

app/code/Gta/EnablePaymentMethod/etc/events.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="payment_method_is_active">
        <observer name="enable_payment_customer_group" instance="Gta\EnablePaymentMethod\Observer\PaymentMethodEnable" />
    </event>
</config>

app/code/Gta/EnablePaymentMethod/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="Gta_EnablePaymentMethod" setup_version="1.0.0" schema_version="1.0.0"/>
</config>

app/code/Gta/EnablePaymentMethod/Observer/PaymentMethodEnable.php
<?php
namespace Gta\EnablePaymentMethod\Observer;
use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface;
class PaymentMethodEnable implements ObserverInterface {
    protected $_customerSession;
    public function __construct(
       \Magento\Customer\Model\Session $customerSession
    ) {
       $this->_customerSession = $customerSession;
    }
    public function execute(Observer $observer) {
       $payment_method_code = $observer->getEvent()->getMethodInstance()->getCode();
       if ($payment_method_code == 'paypal_express') {
           $result = $observer->getEvent()->getResult();
           if ($this->_customerSession->isLoggedIn()) {
               $customerGroupId = $this->_customerSession->getCustomer()->getGroupId();
               if ($customerGroupId == 9) {
                   $result->setData('is_available', true);
               }
           }
       }
    }
}

Anything else i forget to do?


texts: How does the errors/[THEME]/404.phtml get called for 404 pages

texts:
when we get a 404 by going to something like www.yoursite.com/cowsaremyfriends you get the cms page that has been set as the 404 page in the backened

however, in the errors folder, there is a 404.phtml, what i've been tasked to do i set up the 404 page so that instead of it just being a dead end it's a bit more smarter like suggesting what page you might have been trying to go to

i am wondering how does this 404.phtml page gets called over the CMS one set in the backened as it would be easier to pull off what i am trying to do in that rather than a CMS page


texts: Related product does not show when selecting product from configurable product

texts:
I have created a configurable product with subproducts (simple products)- so far so good - I select and price and picture change and I can place the correct product in the basket - but I would like the text, SKU and my related products to change as well.

NB. The related product is assigned to the children (simple products) - I would like to show related depending on selection.

I hope someone can help with this - thanks

Christian


texts:
Looking to log customers in based on a posted email address from a subdomain url. Should I be posting to a separate php file that contains

include_once "../app/Mage.php";
Mage::init();
$app = Mage::app()->setCurrentStore('4');

$email = $_POST['email'];
$customer = Mage::getModel('customer/customer');
$customer->setWebsiteId('4');
$customer->loadByEmail(trim($email));
Mage::getSingleton('customer/session')->loginById($customer->getId());

$app->getFrontController()->getResponse()->setRedirect(Mage::getBaseUrl() . '?SID=' . $custSessionId)->sendResponse();

Or should this code be utilized somewhere else (such as on the index.php)? How should I be logging in my customers from a remote site automatically?


texts: How to disable Paypal from just one of the stores in a multi-store setup?

texts: I have Magento 1.9.1 with Paypal Payments Pro (Includes Express Checkout) and Express Checkout. I don't see how to disable those in just one of the stores? When I switch to the Configuration scope for the other store - it does not give me the option to disable it...Any ideas? :-*


texts: The code (provided by magento) against admin password-guessing to protect magento does not work for me

texts:
Using this link I made below changes to protect magento installation, but after restating the fail2ban, I could overpass the maxretry to enter wrong password and no banning happens. Considering that other configurations are working well.

Code to add to /etc/fail2ban/jail.local :

[hn-nginx-retry-ban]
# Only ban after multiple retries.
# Use this for "soft" bad behaviour.
port = http,https
filter = hn-nginx-retry-ban
logpath = /var/log/nginx/access.log
bantime = 7200
maxretry = 10

Code to add to /etc/fail2ban/filter.d/hn-nginx-retry-ban.conf :

[Definition]
# Use this for "soft" bad behaviour, as the source will only be banned after multiple retries.
failregex = ^<HOST> .+"POST \S+(/downloader/|/downloader/index.php\?A=loggedin|/admin/index/|/admin/)\s
ignoreregex =


texts: How to change a variable in price-bundle.js?

texts:
In Magento/Bundle/view/base/web/js/price-bundle.js

I want to change the globalOptions variable:

var globalOptions = {
    optionConfig: null,
    productBundleSelector: 'input.bundle.option, select.bundle.option, textarea.bundle.option',
    qtyFieldSelector: 'input.qty',
    priceBoxSelector: '.price-box',
    optionHandlers: {},
    optionTemplate: '<%- data.label %>' +
    '<% if (data.finalPrice.value) { %>' +
    ' +<%- data.finalPrice.formatted %>' +
    '<% } %>',
    controlContainer: 'dd', // should be eliminated
    priceFormat: {},
    isFixedPrice: false
};

How d you do this?


texts: "Your session has expired" - Magento 2.2.7 fresh install

texts:
I've started out with Magento 2. Everything's working fine, except for Magento's formKeyValidator which isn't able to validate the incoming request. It's happening on the frontend.

While adding a product to the cart or creating an account. This isn't passing::

// module-checkout/Controller/Cart/Add.php - function execute()
$this->_formKeyValidator->validate($this->getRequest())

I've increased the cookie lifetime, set the valid domain, and path ( http://localhost/mysite, domain:localhost, path:/mysite  ) from the backend config panel, yet for some reason I keep getting this:

"Your session has expired"


texts:
I've read various posts here but none of them have been helpful.

Steps I have taken:

Remove My_Module from setup_module in DB
Add Setup/InstallSchema.php
Clear generated/* directory
Clear cache
Execute magento setup:upgrade
I've also tried throwing an exception within the install method. No exception is ever thrown.

<?php

namespace My\Module\AttributeMapper\Setup;

use Magento\Framework\Setup\InstallSchemaInterface;
use Magento\Framework\Setup\SchemaSetupInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use My\Module\AttributeMapper\Helper\Product\AttributeData;

/**
 * Upgrade the Catalog module DB scheme
 */
class InstallSchema implements InstallSchemaInterface
{
    /**
     * {@inheritdoc}
     * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
     * @SuppressWarnings(PHPMD.CyclomaticComplexity)
     * @SuppressWarnings(PHPMD.NPathComplexity)
     */
    public function install(SchemaSetupInterface $setup, ModuleContextInterface $context)
    {
        $setup->startSetup();

        $this->addCatalogEav($setup);

        $setup->endSetup();
    }

    /**
     * @param SchemaSetupInterface $installer
     * @return void
     */
    private function addCatalogEav(SchemaSetupInterface $installer)
    {
        $catalogEavTable = $installer->getTable('catalog_eav_attribute');
        $installer->getConnection()->addColumn(
            $catalogEavTable,
            AttributeData::PRODUCT_ATTRIBUTE_OPTION_API_ATTRIBUTE_ID,
            [
                'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
                'comment' => 'API Attribute GUID Mapping for Product Attribute'
            ]
        );
    }
}


texts: Moving Magento from server to server - Archive files too large

texts: As my e-stores are too big to zip and download everything, I want to know what folders I should download from the old server and move to the new Magento installation, in order to get it quickly up and running?


texts: Display message notification instead error message log Magento

texts:
In my cart observer, I block 1 item in the cart and then display a notification to the user something like "you could select just one item" the problem that it appears to be the error log Magento first then when I return to the home page. I find my message displayed. I just want to display it in my page and not also in the error log page or display it in the cart page without adding a second item of course.

Observer.php :

class Amir_Prince_Model_ObserverCountItemCart{
    public function limiter_panier(Varient_Event_Observer $observer) {

    $session = Mage::getSingleton('checkout/session');
    $quote = $session->getQuote();

    if($quote->getItemsCount()>=1){
    $message = 'You can select only one item.';
    $session->addError($message);
    // Mage::thrownewException($message); // the log error commented
    throw new Exception($message);// the frontend notification

      }
    }
}


texts: v2_Soap API on an elastic beanstalk setup with a separate admin server stopped working after 1.81 upgrade

texts:
Currently, I have my app servers deployed through Amazon Web Services Elastic Beanstalk. I have a separate EC2 instance set up as a backend admin server that is only accessible from our office. The admin server also shares the media folder with the app servers through NFS.

I have recently upgraded everything to CE 1.8.1 and installed the latest patches. I just noticed that the magento API stopped working - specifically v2_soap, although none of them seem to work. If I remember correctly, everything worked fairly well in 1.7. It probably even worked in 1.8. I am currently in the middle of testing the previous versions to make sure.

If I enter any of the following (as well as other variations) in a browser, I get a wsdl:

http://www.example.com/api/v2_soap?wsdl
http://www.example.com/index.php/api/v2_soap?wsdl\
http://www.example.com/index.php/api/v2_soap/index/?wsdl

But in the wsdl, the <soap:address location> is

http://admin.example.com/index.php/api/V2_soap/index/

in all 3 cases.

Entering that url or the url with a ?wsdl at the end redirects me to the frontend www.example.com. Pretty much anything starting with admin.example.com/index.php redirects to the frontend(exception is index.php/admin).

Trying to post a soap request (login) to that admin soap address using Firefox SOA client returns

SOAP-ERROR: Parsing WSDL: Couldn't load from
'http://admin.example.com/index.php/api/v2_soap/index/?wsdl=1' :
failed to load external entity
"http://admin.example.com/index.php/api/v2_soap/index/?wsdl=1"

Similar results with my vb.net program that I wrote for syncing inventory.

I've also tried a bunch of other stuff. i tried posting soap to

http://www.example.com/index.php/api/v2_soap/index/

and other variations. No luck with anything.

The only way that I can get a wsdl through the admin server without getting redirected is to go to:

http://admin.example.com/api.php?type=v2_soap&wsdl=1

But that gives a <soap:address location> of

http://admin.example.com/index.php/?type=v2_soap

which is weird and useless. I tried a lot of other stuff, like changing the api server rewrites on the app and admin servers in .htaccess. NOthing seems to work.

Does anyone know if there were any changes in 1.81, the patches or 1.8 that might cause this odd behavior? Or did I change something else that resulted in this weird behavior?

Edit: I forgot an important fact. If I don't use the admin server (No to "Use Custom Admin URL"), the api works fine.


texts: How to limit products selection for a bundle product in Magento?

texts:
My customer wants to offer a "kit" with only 2 products/items and customers could select only 2 products between the available ones, and also pick a color and size per product. I couldn't think how to achieve that in Magento. As an alternative option, we could have a generic kit/bundle and users should be able to type on a comment box on the checkout page which SKU's to be delivered with their respective sizes and colors.

Anyone has some thoughts to do the magic??


texts: Magento direct SQL query for coupon based orders?

texts:
I am trying to write a SQL query for Magento that will show orders which were paid (non-zero total) and those which were coupon based (zero total). The Coupon-based orders should be divided by the promotion that the coupon was from. Then each row of the report show the following:

The promo name (Shopping cart price rule name)
Number of orders
Percentage of total orders
Average order total

I realize this is could be an extremely complex query, so would be happy with someone pointing out the table(s) that I will need in order to execute this. Any an all help is welcome and thanked =)


texts:
Does anyone know how to create upvote and downvote on frontend?
http://i.imgur.com/XyiUjxw.png  like this one.


texts: Magento multi store setup get only store view wise products

texts: I am working on magento one website - multiple store admin panel. As seen in screen shot, i want when i choose tee store view of main website then product of only tee store view displayed.


texts: Magento 2.3 - Topmenu tabs with wrong (cached) 'active' class

texts:
I have a small menu problem. The active tabs do not match the active class. If I disable the static_block cache it works again, so it actually looks like the menu is cached and continues to display the content that is cached regardless of the tab selected.
I tried to put cacheable=false on the block of the topmenu concerned in the default.xml layout but this didn't change anything.
if someone has already had this problem or has a lead...

Edit :
I fixed it quickly, by removing the topmenu from the cache, (if I understood what I did correctly) but as you can see it's not terrible, but it works very well now

<?php

namespace MyNamespace\Indo\Block\Html;

use Magento\Framework\Data\Tree\NodeFactory;
use Magento\Framework\Data\TreeFactory;
use Magento\Framework\View\Element\Template;
use Magento\Framework\View\LayoutFactory;
use TemplateMonster\Megamenu\Helper\Data;

class Topmenu extends \Magento\Theme\Block\Html\Topmenu
{

    public $_helper;

    public $_layoutFactory;

    public function __construct(
        Template\Context $context,
        NodeFactory $nodeFactory,
        TreeFactory $treeFactory,
        Data $helper,
        LayoutFactory $layoutFactory,
        array $data = []
    )
    {
        parent::__construct($context, $nodeFactory, $treeFactory, $data);
        $this->_helper        = $helper;
        $this->_layoutFactory = $layoutFactory;
    }

    /**
     * Get block cache life time
     *
     * @return int
     * @since 100.1.0
     */
    protected function getCacheLifetime()
    {
        return 0;
    }
}


texts: I need to show products pagination in the file template\catalog\product\list.phtml. How can I do it? Probably I need to edit catalog.xml but what to change I don't know.


texts:
I used below event

<event name="currency_display_options_forming">
    <observer name="vendor_extension_change_currency_position" instance="Vendor\Module\Observer\ChangeCurrencySymbol" />
</event>

then,

<?php
namespace Vendor\Module\Observer;
use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\Locale\Currency;
use Magento\Directory\Model\CurrencyFactory;
class ChangeCurrencySymbol implements ObserverInterface
{
    private $logger;
    protected $symbolFactory;
    protected $_coreSession;
    private $currencyCode;
    public function __construct(
        \Psr\Log\LoggerInterface $logger,
        \Magento\CurrencySymbol\Model\System\CurrencysymbolFactory $symbolFactory,
        \Magento\Framework\Session\SessionManagerInterface $coreSession,
        CurrencyFactory $currencyFactory
    ){
        $this->logger = $logger;
        $this->symbolFactory = $symbolFactory;
        $this->_coreSession = $coreSession;
        $this->currencyCode = $currencyFactory->create();
    }

    public function execute(\Magento\Framework\Event\Observer $observer)
    {

        $baseCode = $observer->getEvent()->getBaseCode();
        $currencyOptions = $observer->getEvent()->getCurrencyOptions();
        $currencyOptions->addData($this->getCurrencyOptions($baseCode));
        return $this;
    }

    protected function getCurrencyOptions($baseCode)
    {
        $currencyCode = $this->getActiveCurrencyCode();

        $currencyOptions = [];
        if ($baseCode) {

            //$customCurrencySymbol = $this->symbolFactory->create()->getCurrencySymbol($baseCode);
            $currency = $this->currencyCode->load($currencyCode);
            $currencySymbol = $currency->getCurrencySymbol();
            $this->logger->info('currencySymbolObs'.$currencySymbol);

            $this->logger->info('customCurrencySymbol'.$customCurrencySymbol);
            if ($customCurrencySymbol) {
                $currencyOptions[Currency::CURRENCY_OPTION_SYMBOL] = $customCurrencySymbol;
                $currencyOptions[Currency::CURRENCY_OPTION_DISPLAY] = \Magento\Framework\Currency::USE_SYMBOL;
            }
        }
        return $currencyOptions;
    }

    public function getActiveCurrencyCode(){
        $this->_coreSession->start();
        $sessionCurrency = $this->_coreSession->getActiveCurrency();
        if(isset($sessionCurrency) && $sessionCurrency != ''){
            return $sessionCurrency;
        }else{
            $sessionCurrency = GBP;
            return $sessionCurrency;
        }

    }
}

I have drop down in header with countries, Once any country is selected, I am setting value(Currency Code) in session by calling custom controller.

$currencyCode = $this->getRequest()->getPostValue('currency_code');
$this->_coreSession->setActiveCurrency($currencyCode);

I am looking for code how can we show custom currency symbol in all the pages.

I need to get the currency Symbol from currency code and show that symbol everywhere where prices are displayed. getActiveCurrencyCode() function returns the currency code.

Above code is not working as expected, This is hitting page continuously and site is getting hanged.

Can anyone help me to achieve this functionality.

Is this approach is good to achieve that functionality? Please look into it and share your thoughts with better approach. Thanks!!


texts:
Can Any one Please Advise me on this Topics:-

1) How to learn PWA in magento 2 ?

2) How to integerate PWA With Magento Custom Theme ?

3) How PWA Works in magento 2 ?


texts: When a product is added to the cart, a coupon code field is available. But after pressing continue to checkout, the coupon code field is no longer available. Anyway to make it appear through other steps in the checkout process?


texts:
How do I add company and group name to this collection

$collection = Mage::getResourceModel('customer/customer_collection')
               ->addAttributeToSelect('*')
               ->joinAttribute('billing_street', 'customer_address/street', 'default_billing', null, 'left')
               ->joinAttribute('billing_postcode', 'customer_address/postcode', 'default_billing', null, 'left')
               ->joinAttribute('billing_city', 'customer_address/city', 'default_billing', null, 'left')
               ->joinAttribute('billing_telephone', 'customer_address/telephone', 'default_billing', null, 'left')
               ->joinAttribute('billing_fax', 'customer_address/fax', 'default_billing', null, 'left')
               ->joinAttribute('billing_region', 'customer_address/region', 'default_billing', null, 'left')
               ->joinAttribute('billing_country_code', 'customer_address/country_id', 'default_billing', null, 'left')

               ->joinAttribute('shipping_street', 'customer_address/street', 'default_shipping', null, 'left')
               ->joinAttribute('shipping_postcode', 'customer_address/postcode', 'default_shipping', null, 'left')
               ->joinAttribute('shipping_city', 'customer_address/city', 'default_shipping', null, 'left')
               ->joinAttribute('shipping_telephone', 'customer_address/telephone', 'default_shipping', null, 'left')
               ->joinAttribute('shipping_fax', 'customer_address/fax', 'default_shipping', null, 'left')
               ->joinAttribute('shipping_region', 'customer_address/region', 'default_shipping', null, 'left')
               ->joinAttribute('shipping_country_code', 'customer_address/country_id', 'default_shipping', null, 'left')
               ->joinAttribute('taxvat', 'customer/taxvat', 'entity_id', null, 'left');


texts: How to check final price or special price is valid or expire on magento 1.9

texts: I am trying to add a condition for checked the special price is valid or not for list page but did not able to find.


texts: How to set the Product Default Price while increasing or decreasing quantity in cart and checkout page in Magento 2

texts:
I don't want to increase or decrease product prices based on quantity. Please help me with how we can achieve this. Suppose Bag product price is 10 and the quantity added is 20, the price should be 10 only on the cart and checkout page.
In short, price should remain the same while increment and decrement of quantity
Like
1qty = 10$
2qty = 10$
3qty = 10$
Instead of
1qty = 10$
2qty = 20$
3qty = 30$
Thanks


texts: How to get Credit Memos items for an order

texts:
I want to get all refund items of an order only. I am using below code for this:

$order_id = "100001451";

$creditMemos = Mage::getResourceModel('sales/order_creditmemo_collection');
$creditMemos->addFieldToFilter('order_id', $order_id);
$creditMemos->setOrder('created_at','DESC');
$creditMemos->load();

foreach ($creditMemos->getAllItems() as $item) {
   //var_dump($creditMemo->getData());
    //echo $ceditMemoGrandTotal = $creditMemo->getGrandTotal();
    echo $item->getId();
    echo $item->getSku();
    echo $item->getPrice();
}

Please help how to get refund items of an order.


texts: Magento 2.3 How add additional links in tag ?

texts:
How to add information to the tag, please tell me?! I want to add .phtml file
I can change the class along this path and add this way, but it seems to me that there is another way

Magento\Framework\View\Result\Page

In the method render
And I know about way in admin panel Magento:

https://docs.magento.com/user-guide/design/html-head.html

But I want to find a way how I can add data without changing this code.


texts: How to change the thumnail image of associated product on selecting option in configurable ptoduct?

texts:
Hi i want to show all the images of associated product when i click on attribute options in frontend.

Currently it is changing only base image and not showing any other images.
Please suggest.


texts: How to filter orders grid with order items quantity total weight?

texts:
I am try to add extra column on admin order grid and try to filter order with total quantity weight.
Please help !!


texts: I have magento 2.1.9, When  add product to cart .It redirects to white blank page.I have tried all solutions, enabled PHP error reporting but no error any where. tried different browsers.same issue


texts:
i want get content in CMS Block, i tryed this code but it not show content

My code :

<?php foreach ($this->getAgreements() as $_a): ?>
     <?php echo $_a->getContent() ?>
<?php endforeach ?>

It not show content, but show this:

{{block type="cms/block" block_id="gs_business_terms"}}


texts: Magento Theming Between Community & Enterprise

texts:
I have recently been developing a theme for Magento Community v.1.7, and have found out that my client needs to launch on Enterprise.

My current theme is built on top of the Base Community theme.

If I use this theme in a Enterprise install, will it work properly? Is the Base theme for Enterprise the same as in Community?

Thank you for your help!


texts: Magento override Catalog Compare controller doesn't work

texts:
for some reason the Compare controller override doesn't work for me, I tried about everything I could find, but it just doesn't happen and I am running out of ideas. Do you see anything I am doing wrong?

etc/modules/Unirack_CatalogExtended.xml :

<?xml version="1.0"?>
<config>
    <modules>
        <Unirack_CatalogExtended>
            <active>true</active>
            <codepool>local</codepool>
        </Unirack_CatalogExtended>
    </modules>
</config>

(but I see the module in Admin > Configuration > Advanced, so I reckon it is registered correctly)

code/local/Unirack/CatalogExtended/etc/config.xml :

<?xml version="1.0"?>
<config>
    <modules>
        <Unirack_CatalogExtended>
            <version>0.1.0</version>
        </Unirack_CatalogExtended>
    </modules>
    <frontend>
        <routers>
            <catalog>
                <args>
                    <modules>
                        <Unirack_CatalogExtended before="Mage_Catalog">Unirack_CatalogExtended</Unirack_CatalogExtended>
                    </modules>
                </args>
            </catalog>
        </routers>
    </frontend>
</config>

code/local/Unirack/CatalogExtended/controllers/Product/CompareController.php :

<?php
require_once Mage::getModuleDir('controllers', 'Mage_Catalog').DS.'Product'.DS.'CompareController.php';

class Unirack_CatalogExtended_Product_CompareController extends Mage_Catalog_Product_CompareController
{
    public function indexAction()
    {
        die('overriden'); // never happens
    }
}

Even if I put die(); statement at the beginning of my custom CompareController.php, it doesn't happen, the file is just not loaded at all. So I reckon it must be somewhere in the config.xml where I register it, or in paths structure, but I've already checked all this several times and just cannot find anything. Sometimes Magento can really be frustrating  :/


texts: How to check why magento store can't send email with new order

texts: I'm meeting the problem with my store, I'm using 1.9.3.2, the email with orders can't send such as new order, new shipment, new invoice but contact email is working, I have checked the log file and nothing appear.


texts: How to Extend and initialize a JS Widget with Proper Custom Namespace / Replace Existing Widget

texts:
I want to modify the mage.catalogAddToCart JS widget of Magento 2.

According to http://devdocs.magento.com/guides/v2.0/javascript-dev-guide/javascript/custom_js.html I have to do a

$.widget('foobar.myCatalogAddToCart', $.mage.catalogAddToCart, {

}

But I was not able to init it with a

<script type="text/x-magento-init">
            "#product_addtocart_form": {
                "myCatalogAddToCart": { }
            }
        }
</script>

also not

<script type="text/x-magento-init">
            "#product_addtocart_form": {
                "foobar.myCatalogAddToCart": { }
            }
        }
</script>

I am confused, because Magento Base also does not use the Namespace in its initialization. It is just

<script type="text/x-magento-init">
            "#product_addtocart_form": {
                "catalogAddToCart": { }
            }
        }
</script>

When I call my Widget mage.myCatalogAddToCart it works.

Questions:

How can I use a proper custom namespace (foobar in the example)?

Bonus:

Can I also rewrite catalogAddToCart compeletly, so I do not have to change the .phtml initialization?

Edit

Answer to Question 1.) I must have made some other mistake. The first one (init with "myCatalogAddToCart") is working now. The namespace just does not seem to matter.

But still try to figure out the answer to question 2.)


texts: Magento 2 - How to create FAQ page with accordion

texts:
I want to create a FAQ page with the Accordion widget (http://devdocs.magento.com/guides/v2.0/javascript-dev-guide/widgets/widget_accordion.html).

Is it possible to use it on a CMS page?


texts: Magento 2.3: How do I retrieve the product price in form.phtml file and assign it to an HTML attribute data-purchase-amount?

texts:
How do I retrieve the product price in form.phtml and assign it to an HTML attribute data-purchase-amount ="" as code snippet meant for Klarna tagline placement as seen in the file below.

    <form data-product-sku="<?= $block->escapeHtmlAttr($_product->getSku()) ?>"
          action="<?= $block->escapeUrl($block->getSubmitUrl($_product)) ?>" method="post"
          id="product_addtocart_form"<?php if ($_product->getOptions()) :?> enctype="multipart/form-data"<?php endif; ?>>
        <input type="hidden" name="product" value="<?= (int)$_product->getId() ?>" />
        <input type="hidden" name="selected_configurable_option" value="" />
        <input type="hidden" name="related_product" id="related-products-field" value="" />
        <input type="hidden" name="item"  value="<?= (int)$block->getRequest()->getParam('id') ?>" />
        <?= $block->getBlockHtml('formkey') ?>
        <?= $block->getChildHtml('form_top') ?>
        <?php if (!$block->hasOptions()) :?>
            <?= $block->getChildHtml('product_info_form_content') ?>
        <?php else :?>
            <?php if ($_product->isSaleable() && $block->getOptionsContainer() == 'container1') :?>
                <?= $block->getChildChildHtml('options_container') ?>
            <?php endif;?>
        <?php endif; ?>

        <?php if ($_product->isSaleable() && $block->hasOptions() && $block->getOptionsContainer() == 'container2') :?>
            <?= $block->getChildChildHtml('options_container') ?>
        <?php endif;?>
        <?= $block->getChildHtml('form_bottom') ?>
    </form>

<klarna-placement
  data-key="credit-promotion-badge"
  data-locale="en-US"
  data-purchase-amount=""
></klarna-placement>


texts: Magento 2 : Custom quote column value not copied on quote merge

texts:
I have created a custom column named 'campaign_id' through UpgradeSchema in quote table as below.

$installer->getConnection()->addColumn(
     $installer->getTable('quote'),
     'campaign_id',
     [
         'type' => \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
         'length' => 11,
         'nullable' => false,
         'comment' => 'Campaign ID'
     ]
);

I am setting its value through custom controller on add to cart as below

// \Magento\Checkout\Model\Session

$this->checkoutSession->getQuote()
     ->setCampaignId($campaign_id)
     ->save();

The value is getting saved properly when I'm adding product as a guest user or as a logged in user.

However when I add the product as a guest user and then log in, the custom quote column value from guest quote is not getting copied to customer quote on quote merge.


texts: Shopping Cart Price Rule not applied when using "Subtotal greater than xxx"

texts:
I set currency IDR (Rupiah) and i want to use shopping cart price rule on my store,

But This Rule not applied when i'm using Subtotal greater than 200000 (price example).

How to resolve this issue?

Please help me...


texts: Conditionallity filtering a product collection

texts:
Below is a function that i'm unsure how to implement.  I need to conditionally filter this collection.  Is there a way without continuously applying one filter after one another?  Thanks

public function filterProducts($collection, $params)
{
    if ($model = $params['product_model']) {
        //filter collection by model
    }
    if ($productType = $params['product_type']) {
        //filter collection by productType
    }
    if ($brand = $params['brand_name']) {
        //filter collection by brand
    }
    if ($year = $params['product_application_year']) {
        //filter collection by year
    }
    elseif($year = Mage::getModel('core/cookie')->get('cookie')){
        //filter collection by year
    }
    return $collection;
}

Below is what i've come up with thus far.

public function filterProducts($collection, $params)
{
    if ($params['product_model']) {
        $collection->addAttributeToFilter('product_model',$params['product_model']);
    }
    if ($params['product_type']) {
        $collection->addAttributeToFilter('product_type',$params['product_type']);
    }
    if ($params['brand_name']) {
        $collection->addAttributeToFilter('brand_name',$params['brand_name']);
    }
    if ($params['product_application_year']) {
        $collection->addAttributeToFilter('product_application_year',$params['product_application_year']);
    } elseif (Mage::getModel('core/cookie')->get('myMustang')) {
        $collection->addAttributeToFilter('product_application_year',$params['product_application_year']);

    }
    return $collection;
}

This is how i'm calling this function:

$_products = $this->filterProducts($this->getProductCollection(),$this->getRequest()->getParams());


texts: Register button is displaying in different locations in differnt pages in magento

texts:
If you observe in left,

In both links, REGISTER AND SIGN IN are displaying in different locations.

In home page its displaying below news letter.

In catalog view page, it's dislaying in another place. In product view page , its in  another place.


texts: How to add browse button in contacts us form i want to send browse image in contacts us email with browse image.


texts:
How to override MaintenanceMode.php in magento 2 in my custom module?

  /vendor/magento/framework/App/MaintenanceMode.php


texts: Importing attribute sets into Magento programmatically? Magmi?

texts: Is there any way to import attribute sets into Magento? I'd like to be able to import products into attributes within new attribute sets. I've seen the Magmi import documentation but don't understand the requirements or required csv files to create new attribute sets.


texts: Reindex is in processing since 10 days why it is not going to complete in magento2

texts:
See the date of reindex in processing since 10 days why it is not going to finish
  Cron jobs running in every 21 hours for reindex
  I try also manually reindex but taking too long time in days
  Also I am using CDN and AWS server


texts:
I am writing one extension in Magento that need to override Magento customer adapter class namely Mage_Customer_Model_Convert_Adapter_Customer.

But when I rewrite it and the profile it is showing me below error.

  Fatal error: Class ' Bs_Crm_Model_Customer ' not found in
  E:\xampp\htdocs\mag\app\code\core\Mage\Dataflow\Model\Convert\Action\Abstract.php
  on line 182

Thanks in advance.

<?xml version="1.0"?>
<config>
    <modules>
        <Bs_Crm>
            <version>1.0.0</version>
        </Bs_Crm>
    </modules>
    <global>
        <models>
            <crm>
                <class>Bs_Crm_Model</class>
            </crm>
            <customer>
                <rewrite>
                    <convert_adapter_customer>
                        Bs_Crm_Model_Customer
                    </convert_adapter_customer>
                </rewrite>
            </customer>
        </models>
    </global>
</config>

Model File.

class Bs_Crm_Model_Customer extends Mage_Customer_Model_Convert_Adapter_Customer
{
    public function saveRow($importData){
        parent::saveRow($importData);
        $id = $this->getCustomerId();
         die($id);
    }
}


texts: Getting fopen errors in my etensions after Update to 2.4.2, any idea why?

texts:
Updated my Magento 2.4.1 installation to 2.4.2
In some of my extensions I do have some fopen('var/xxxx.txt', 'w' ) commands, but do get now errors like main.CRITICAL: Warning: fopen(var/invoicelayout.txt): failed to open stream:
What the hell happened here?
Any ideas?
Regards,
Chequille


texts:
I have created product programmatically but when i try to update attribute value with code:

$product->setData($attributeCode, '')->save();

It won't change. The update will work only after i have saved the product in Magento admin GUI. What might be the reason of that?

Code I use to create product:

  $_product->setName($productName)
    ->setId($productID)
    ->setAttributeSetId($attributeSetId)
    ->setStoreId($storeId)
    ->setVisibility(4)
    ->setStatus(1)
    ->setWebsiteIds(array(1))
    ->setSku($Sku)
    ->setPrice($price)
    ->setDescription($description)
    ->setShortDescription($shortDescription)
    ->setStockData(array(
         'use_config_manage_stock' => 0,
         'is_in_stock' => $stock,
         'qty' => $qty
    ))
    ->setUrlKey($urlKey)
    ->setCategoryIds(array($CategoryId))
    ->setTypeId("simple")
    ->setData($attributeCode, 5)
    ->save();

Editing script

`$_product->load($productID)->setStoreId($storeId)->setData($attributeCode, 'Blue')->save();`

$_product is an instance of \Magento\Catalog\Model\Product.


texts: Minicart doesn't update after successful PayPal payment, magento2

texts:
When a customer does an payment trough PayPal the minicart in Mage2 doesn't get cleared. However, the cart itself is absolutely empty.

Is there any way to reset the mini cart on the success.phtml, or deleting the whole cart in the success.phtml ?
Thanks