texts: How can i disable Related Post tab on product page magento 2?

texts: I want detail tab to active at first also related product tab to be hidden or disable.


texts: Is there a way to make a free shipping for the first order for customer?

texts:
Is there a way to enable a free shipping for the first order for all of customers?
and that is without the need of generating/entering a coupon code.


texts: The shipment couldn't be saved. {"exception":"[object] (Magento\Framework\Exception\CouldNotSaveException(code: 0): The shipment couldn't be saved. at /vendor/magento/module-sales/Model/Order/ShipmentRepository.php:150, Magento\Framework\Exception\LocalizedException(code: 0): Not all of your products are available in the requested quantity. at /vendor/magento/module-inventory-source-deduction-api/Model/SourceDeductionService.php:86)"} []


texts: customer name is not visible in newsletter conformation mail

texts:
We want to contact our registered customers in the newsletter confirmation mail with their names. Every template we tried to configure the names weren't shown in the mails. Anybody out there who's able to tell why the first- and lastnames in the newsletter mails aren't shown?

our magento-1.8.1

We tried using the following variables from the documentation that doesn't work:

{{htmlescape var=$customer.name}}

{{var customer.name}}

{{var customer.firstname}} {{var customer.lastname}}


texts: List of categories and cms pages in single widget instance

texts:
need a bit of advice with widget instance's.
I need to great a widget instance which lists both cms pages and categories which the client can change easily. here is what it needs to look like:

Now any of these links can be CMS or category pages, whichever the client decides they want, hence why i would ideally be a widget instance
What would be the best way to accomplish this?
A widget within a widget? If so how would i do that?
I have build custom widgets so i pretty much understand that process, so any advice is welcome
Thanks


texts: Showing Price Tiers EX TAX Whilst Showing Prices Inc & Excluding Elsewhere

texts:
I am having trouble getting price tier breaks for Complex products to show "excluding" VAT only.

I am UK based so need to show prices both inc. and exc. tax in most places. We are running a modified LUMA theme.

Our tax settings are configured as the below screenshot.

What I want to achieve is loading all price tiers without tax as we predominantly deal with trade customers.

For simple products, the prices are loaded in "with and without VAT" on the luma theme. So this has been an easy fix using CSS.

For complex products, though the price that is loaded in is loaded inc VAT only.

What it currently Loads:

MAIN PRICE £20.00 Ex VAT, £24.00 Inc VAT

10 Qty |  £22.00 INC VAT | Saving %
20 Qty |  £21.00 INC VAT | Saving %
30 Qty |  £21.00 INC VAT | Saving %

What I want:

MAIN PRICE £20.00Ex VAT £24.00 Inc VAT
10 Qty |  £18.33 INC VAT | Saving %
20 Qty |  £17.50 INC VAT | Saving %
30 Qty |  £17.50 INC VAT | Saving %

I have a jquery script doing it, but it is very "hacky" and would prefer to load the page with it correct off the bat.

I can see \Magento_ConfigurableProduct\templates\product\price\tier_price.phtml is responsible for loading the data. But I am not sure how to amend what is pushed to the phtml. Any help much appreciated.


texts: Which event is responsible for after Customer account reset password?

texts:
I need event after customer reset passoword successful or unsuccessful to perform next operation but I am unable to get any proper solution.
event.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="controller_action_postdispatch_customer_account_resetpasswordpost">
        <observer name="rave_customer_forgot_link" instance="Namespace\Modulename\Observer\PostdispatchCustomerAccountResetpasswordObserver"/>
    </event>
</config>

PostdispatchCustomerAccountResetpasswordObserver.php
<?php
namespace  Namespace\Modulename\Observer;

use Magento\Framework\Event\ObserverInterface;
use Magento\Customer\Api\AccountManagementInterface;

class PostdispatchCustomerAccountResetpasswordObserver implements ObserverInterface
{
    /**
     * @var ObjectManagerInterface
     */
    protected $_objectManager;

    /**
     * @param \Magento\Framework\ObjectManagerInterface $objectManager
     */
    public function __construct(
        \Magento\Framework\ObjectManagerInterface $objectManager,
        AccountManagementInterface $accountManagement
    ) {
        $this->_objectManager = $objectManager;
        $this->accountManagement = $accountManagement;
    }

    /**
     * customer register event handler
     *
     * @param \Magento\Framework\Event\Observer $observer
     * @return void
     */
    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        //How I will get customer email id here ?
        die('FDFASDFDS');
    }
}


texts: M2.2 Recently view products remove Learn More Link

texts:
I have created a Recently Viewed Products widget and in the widget option I can select what is shown for every product, attributes and buttons.

In the attributes there is an option of a Learn More Link which is not selected. However in the Recently viewed products, there is a Learn More link.

How could I remove it?


texts: Magento 1.9 Mage, execute javascript command when customer successfully registers

texts:
I'm trying to execute a java-script command when the customer successfully registers an account, I tried the following, but the java-script command doesn't get executed.

Does somebody now how I can achieve this? Thank you in advance.

[EDIT]
I actually fixed it myself, I wanted to send some customer data to the html page via javascript. If you want to achieve this, please read my answer.


texts:
We want to use Facebook pixels to track Facebook ads we post for certain shows.

Our site is a little different.  We have events under one site with 4 different store.

Should we post the pixel code just at check out?  Or on the events/band page?

Just unsure of where to place the code in magento to get the best results.

Thanks


texts: Default menus not visible in backend , also frontend not loading properly

texts:
I disabled some modules in backend in System > configuration > Advanced > Advanced

Then I logged out and login and then some default magento menus are not visible.

Please have a look at core_config_data table view after searching for all modules for their enabled status:


texts: Proper steps for translating from CSV file in magento

texts:
I want to translate some text using CSV file by going through following steps.

Created CSV file named "Mynamspace_Mymodule.csv" in app/locale/en_US/ and feeded it with my translations like, "text to translate", "translated text"
Then added the following xml in config.xml of my Module under frontend tag.

<translate>
        <modules>
            <Mynamspace_Mymodule>
                <files>
                    <default>Mynamspace_Mymodule.csv</default>
                </files>
            </Mynamspace_Mymodule>
        </modules>
    </translate>

Then I tried to translate my text like,

  echo Mage::helper('Mynamspace_Mymodule')->__("text to translate");

and it returned the following error.

Class 'Mage_Mynamspace_Mymodule_Helper_Data' not found in app/Mage.php on line 547

Please help!


texts: observer to change status after invoicing

texts:
I would like to know what is the correct method for change status of order when i create the invoice.
I created an observer on the basis of what I saw on the internet :

class statutafterinvoice implements ObserverInterface{

/**
 * Message manager
 *
 * @var \Magento\Framework\Message\ManagerInterface
 */
protected $messageManager;

/**
 * Constructor
 *
 * @param  \Magento\Framework\Message\ManagerInterface $messageManager Message Manager
 *
 * @return void
 */
public function __construct(
) {
    //$this->messageManager = $messageManager;
}

/**
 * Display a custom message when customer log in
 *
 * @param  \Magento\Framework\Event\Observer $observer Observer
 *
 * @return void
 */
public function execute(\Magento\Framework\Event\Observer $observer)
{
    $methode = $observer->getEvent()->getInvoice()->getOrder()->getPayment()->getMethodInstance()->getCode();
    if($methode=="xxx_bvr"){
        $observer->getEvent()->getInvoice()->getOrder()->setStatus('attente_paiement', true);

    }
}

}

and here is my 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="sales_order_invoice_save_after">
       <observer name="bvr_statut_after_invoice" instance="Acme\BVR\Observer\statutafterinvoice"/>
       </event>
</config>

this code dont't work.

do you know the solution for change the status when i invoice the order?
i thank you very much


texts: Added products automatically restrict quantity to 1 in cart and checkout

texts:
I have a module that adds a free product to the cart automatically if a product exists.

The issue:

If the customer keeps shopping and adds other products. The quantity for the free automatic product increases to quantity of 2.

What I need:

I need the quantity of the free automatic product restricted to 1.  I've tried to code this but I'm unsuccessful.

I can't figure out how to say, If productID is 222 then change quantity to 1 if > 1.  Can someone help?

Here's the code:

public function addSubAction($observer)
{
    $productId = 123;
    $quote = Mage::getSingleton('checkout/session')->getQuote();
    foreach ($quote->getAllVisibleItems() as $item) {
        if ($item->getData('product_id') == $productId) {
            $cart     = Mage::getSingleton('checkout/cart');
            $addprod  = 222;
            $qty      = 1;
            $quote    =  Mage::getSingleton('checkout/session')->getQuote()
                ->addProduct( Mage::getModel('catalog/product')->load($addprod), $qty)
                ->save();
            $cart->save();
        }
    }
}


texts: jQuery.easing[this.easing] for Magento2 Custom Theme

texts:
I am making a custom theme and for no reason at all, I am now getting :

jQuery.easing[this.easing]

I wasnt previously getting this. Any Ideas?

Below is my requirejs config file:

var config = {
    map: {
        '*' : {
            owlcarousel  : 'js/owl-carousel/owl.carousel',
            easing:        'jquery/jquery-ui',
            customscript : 'js/custom'
        }
    },
    paths:{

            'owlcarousel'  : 'js/owl-carousel/owl.carousel',
            'easing':        'jquery/jquery-ui',
            'customscript' : 'js/custom'

    },
    shim: {
           'owlcarousel': {
                deps: ['jquery']
            },
            'easing': {
                deps: ['jquery']
            },
            'customscript': {
                deps: ['jquery']
            }
    }
};

    require([
        'jquery',
        'easing',
        'owlcarousel',
        'customscript',
    ], function ($) {

          $(document).ready(function () {

            // -- Hero Carousel
           $("#owl-demo").owlCarousel({
                nav: true,
                items: 1,
                loop:true,
                autoplay:true,
                autoplayTimeout:3000,
                autoplaySpeed: 3000,
                autoplayHoverPause:true
            });

           // -- Sub Navigation

           openSubNav($);

        });
    });

The Problem occurs when I am calling the function  openSubNav($); however it has previously worked. I added jquery ui to the map after a previous suggestion but still not working


texts: Execute code after "text/x-magento-init" code finished loading

texts:
I need to call a piece of code right after my fotorama gallery loaded. The gallery is called like this in vendor\magento\module-catalog\view\frontend\templates\product\view\gallery.phtml:

<div class="gallery-placeholder _block-content-loading" data-gallery-role="gallery-placeholder">
    <img
        alt="main product photo"
        class="gallery-placeholder__image"
        src="<?= /* @noEscape */ $mainImageData ?>"
    />
</div>

<script type="text/x-magento-init">
    {
        "[data-gallery-role=gallery-placeholder]": {
            "mage/gallery/gallery": {
                "mixins":["magnifier/magnify"],
                "magnifierOpts": <?= /* @escapeNotVerified */ $block->getMagnifier() ?>,
                "data": <?= /* @escapeNotVerified */ $block->getGalleryImagesJson() ?>,
                "options": <?= /* @noEscape */ $block->getGalleryOptions()->getOptionsJson() ?>,
                "fullscreen": <?= /* @noEscape */ $block->getGalleryOptions()->getFSOptionsJson() ?>,
                "breakpoints": <?= /* @escapeNotVerified */ $block->getBreakpoints() ?>
            }
        }
    }
</script>

I need to call a workaround script, to move some elements of the gallery in the DOM.

Currently I solved it rather hacky by calling javascript right after the above snippet:

<script>
    require([
        'jquery',
        'domReady!' // wait for dom ready
    ], function ($) {

        setTimeout(function() {

            console.log("workaround executed");
            $('.fotorama__thumb__arr').appendTo('.fotorama__nav-wrap');
        }, 1450);

    });
</script>

The code moves the navigation arrows to another place in the DOM, since it is not possible to configure them via the fotorama options and I need a workaround... (related question)

But this does not always work. It is really hacky.

Is there a callback function?


texts: Magento 2 - Custom style _listings.less not working

texts:
We are using Porto theme. We have our product list with the style:

<div class="product details product-item-details"> code </div>

We checked the porto .less which corresponds to:

  app\design\frontend\Smartwave\porto\Magento_Catalog\web\css\source\module_listings.less

Where the part where we have the style:

.products-list {
    .product {
        &-item {
            display: table;
            width: 100%;
            padding: 10px 0;

            &-info {
                display: table-row;
                text-align: left;

                &:after {
                    display: table;
                    content: '';
                    clear: both;
                }
            }
            &-photo {
                width: 20%;
                display: block;
                float: left;
                margin-bottom: 20px;
            }
            &-details {
                display: block;
                width: 80%;
                padding: 0 0 20px 20px;
                float: left;

                .actions-primary {
                    display: inline-block;
                }
                .actions-secondary {
                    margin-left: 2px;
                }
            }
            &-name {
                font-size: 18px;
                line-height: 1;
                margin: 10px 0;
            }
            .product-reviews-summary {
                background: none;
            }
        }
    }
    .product-image-wrapper {
        &:extend(.abs-reset-image-wrapper all);
    }
}

I have overwritten the file:

  app\design\frontend\Smartwave\porto_customTheme\web\css\source\module_listings.less

And the part I want to change is this one:

& when (@media-common = true) {

  .products-list {
    .product {
      &-item {
        display: table;
        width: 100%;
        padding: 10px 0;
        &-details {
          display: block;
          width: 100%;
          padding: 0 0 20px 20px;
          float: left;
        }
      }
    }
  }
}

Basically the issue I have is that the products show with width: 80% instead of width 100%:

80%:

100%:

I run these commands:

rm -rf pub/static/*;
php bin/magento setup:upgrade;
php bin/magento setup:di:compile;
php bin/magento setup:static-content:deploy ca_ES;
php bin/magento setup:static-content:deploy es_ES;
php bin/magento setup:static-content:deploy;


texts: Adding Metadata to a Product-Category Relationship

texts:
I have a category that represents different store vendors, which are then assigned to the appropriate product.

The goal is to attach a unique URL to the category relationship, so each product assigned to the category will have its own URL associated with it.

The idea is to create a Buy Now where each product has its own vendor specific URL. So, the URL cannot be stored in the category, but needs to be stored as metadata of the relationship.

Any ideas on how to accomplish this? After searching I'm starting to think it will be a custom solution, but even then I'm not sure exactly where to start.

Thanks in advance.


texts: How to send different currency to PayPal

texts:
I am not sure if this is a Magento or a PayPal setup, but here is my problem:

Our Magento 1.9.2.4 has the base currency is US Dollar. All my products have US Dollar price. I also have multiple websites in my Magento for different countries. When someone access from a different country (Canada, for example), the user will see the prices in Canadian Dollar.

I am doing that using Magento Conversion Rate and setting my Canadian website to use Canadian Dollar as default currency. So the product is still in US Dollar but Magento converts it to show in the frontend as Canadian Dollar.

The problem is, when the user selects PayPal to make the purchase, Magento is sending the price to PayPal in US Dollar, and then PayPal will convert it to Canadian Dollar (using a different conversion rate than ours).

Is there a way to fix that (send the amount in Canadian Dollar to PayPal)? Right now we have a discount in our conversion rate and the user is "paying more" because PayPal is using their own rates.

Thank you!


texts:
I have tried using this code, but it doesn't return the product's quantity
private $registry;

  public function __construct(
    Template\Context $context,
    Registry $registry,
    array $data = []
  )
  {
      parent::__construct($context, $data);
      $this->registry = $registry;
  }

  public function getCurrentStock(){
    $product = $this->getCurrentProduct();
    return $product->getQty();
  }

  public function getCurrentProduct(){
    return $this->registry->registry('product');
  }

but if I change
return $product->getQty();

to
return $product->getCreatedAt();

it will return the products created_at date.


texts:
Hi I've created Ajax menu in a .phtml file using some lib and JavaScript & html code however I called the file for 1 product type. I don't want it to appear except in this product.
However the location is going in a different location than where I want this block to be. I'm quite new to magento so it's not easy for me to figure out the file locations in server side or where to find each file separate to put the code in directly.
this picture
is where the file appears when I called the block in the product page.
but I want it as this :

any advice on how to actually change block position and where?
thanks


texts:
I'm getting tons of these running Magento ver. 1.8.1.0, has anybody ever seen this?

TL;DR It's trying to enter a session key in core_session where one already exists.

We're running a standard, single instance setup on AWS.

  PHP Fatal error:  Uncaught exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'e1af8078f907ce3ccc52520d2ebe3088' for key 'PRIMARY'' in /var/www/magento/shop/lib/Zend/Db/Statement/Pdo.php:228\nStack trace:\n#0 /var/www/magento/shop/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)\n#1 /var/www/magento/shop/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)\n#2 /var/www/magento/shop/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)\n#3 /var/www/magento/shop/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)\n#4 /var/www/magento/shop/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO co...', Array)\n#5 /var/www/magento/shop/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTOco...', Array)\n#6 /var/www/magento/shop/lib/Zend/Db/Adapter/Abstract.php(574): Varien_Db_Adapter_Pdo_Mysql->query('INSERT IN in /var/www/magento/shop/lib/Zend/Db/Statement/Pdo.php on line 234, referer: ...

The session_id and referer vary, of course.
Thanks in advance!


texts: Magento 2.3 : Use a dropdown select for the shipping address on the Onepage Checkout

texts:
select the shipping address with a dropdown, similar to how you can if you choose to change the billing address.

I would like it to work similarly to when you change the billing address, with a dropdown:


texts: Custom module observer makes "invalid shipping method"

texts:
The following code is a observer function when a customer apply a coupon code which will be saved in a table

public function trackcode($observer) {

  $event = $observer->getEvent();
  $eventName = $event->getName();
  $connection = Mage::getSingleton('core/resource')->getConnection('core_write');
  $connection->beginTransaction();

  $__fields = array();
  $quote = $event->getQuote();
  $item = $observer->getEvent()->getItem();

  //$item = $event->getItem();
  $action = strtolower(Mage::app()->getFrontController()->getAction()->getFullActionName());
    if ($action == 'checkout_cart_couponpost') { //if on the apply coupon action
          if ($quote->getCouponCode()) {
              $coupon_code = $quote->getCouponCode();
              $__fields['quote_item_id'] = $item->getId();
              $__fields['coupon_code'] = $coupon_code;
              $__fields['sku'] =  $item->getSku();
              $__fields['customer_email'] = $this->getCustomerEmail();
              $connection->insert('name_trackcode', $__fields);
              $connection->commit();
          }
    }

}

config.xml

<global>
        <events>
            <salesrule_validator_process>
                <observers>
                    <name_trackcode>
                        <type>model</type>
                        <class>Name__Trackcode_Model_Observer</class>
                        <method>trackcode</method>
                    </name__trackcode>
                </observers>
            </salesrule_validator_process>
        </events>
<global>

But at the onestepcheckout page, at the shipping method step, i pressed "continue", there will be a

  invalid shipping method

alert message.

It seems that the events not only run at the time the coupon apply, but also view cart page, view checkout page.

Anyone know what are the problems?


texts: Magento2: How to get tax rate and tax percent from product

texts:
How can I get tax rate and tax percent from a product in magento2?
In magento1 we use below code:

        $taxClassId = $item->getData("tax_class_id");
        $taxClasses = Mage::helper("core")->jsonDecode(Mage::helper("tax")->getAllRatesByProductClass());
        $taxRate = $taxClasses["value_" . $taxClassId];
        $taxAmount = (($item->getQty() * $itemPrice * $taxRate) / 100);


texts: magento 2.0.7 sampledata:deploy|remove fatal error after composer update

texts:
I've updated magento from 2.0.4 to 2.0.7 via composer.
And then I tried to remove sample data using CLI

php70 bin/magento sampledata:remove

and got following error.

     PHP Fatal error: Uncaught TypeError: Argument 1 passed to
Symfony\Component\Console\Input\ArrayInput::__construct()
    must be of the type array, object given, called in
 /srv/mat24/web/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php
on line 97 and defined in
    /srv/mat24/web/vendor/symfony/console/Symfony/Component/Console/Input/ArrayInput.php:37
        Stack trace:
        #0 /srv/mat24/web/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(97): Symfony\Component\Console\Input\ArrayInput->__construct(Object(Magento\Framework\ObjectManager\ObjectManager))
        #1 /srv/mat24/web/vendor/magento/framework/ObjectManager/Factory/Compiled.php(88): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Symfony\Compone...', Array)
        #2 /srv/mat24/web/vendor/magento/framework/ObjectManager/ObjectManager.php(57): Magento\Framework\ObjectManager\Factory\Compiled->create('Symfony\Compone...', Array)
        #3 /srv/mat24/web/var/generation/Symfony/Component/Console/Input/ArrayInputFactory.php(43): Magento\Framework\Obje in /srv/mat24/web/vendor/symfony/console/Symfony/Component/Console/Input/ArrayInput.php on line 37

What could be the reason and how to fix that?


texts: How to collaborate on building Magento 2 site

texts:
We are a group of developers that need to develop a Magento 2.4 site - not just develop a single plugin.
From previous work on other (non-Magento) systems we are using version control which is set up to auto deploy to a staging server automatically.
Right now, the issue for is that we have tasks that may require more than just regular code changes.
So far we have identified 3 areas where our current code-only setup fails us:

Site Configuration
CMS Content
Catalog

So pretty much anything that involves the database.
Is there a nice, established way to create a Magento site (so not just plugins) in a collaborative way?
Perhaps these settings can be made into code somehow and be deployed in (our) usual fashion?


texts: Correct syntax for multiple category ID's in array

texts:
Trying to exclude the rendering of something based on category ID using the following...

<?php if ($_category_id == 2) { ?>
    <?php //do nothing ?>
<?php } else { ?>
    <?php //do something ?>
<?php } ?>

I need to specify multiple category ID's for exclusion however so I gather these need to be loaded into an array.

<?php $ignoredcats = array(2,360,124); ?>
<?php if (count(array_intersect($ignoredcats,$_category_id))) { ?>
    <?php //do nothing ?>
<?php } else { ?>
    <?php //do something ?>
<?php } ?>

This doesn't work though. How should I be specifying by multiple category ID please?


texts: Custom price range for a filter in Magento 2

texts:
I want a custom price range for filter like this:

0-1999.
2000-4999.
5000-8999.

How can I do that?


texts: Magento 2 Get simple product image URL instead of parent image

texts:
the below code getting parent configurable parent image even if simple, So how to get the simple url also?

$_item = $block->getItem();
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$_product = $objectManager->get('Magento\Catalog\Model\Product')->load($_item->getProductId());
$productImageUrl = $block->getBaseUrl().'pub/media/catalog/product'.$_product->getImage();

Thanks


texts: Store switcher does not work in first click

texts:
In my single magento 2 instance have 2 websites and each website have 6 store means total 12 store views in single magento instance, each store have own language and currency and separate domain.
My default domain is magento2.testdomain.co.uk (where magento 2 is install)
magento2.testdomain.de
magento2.testdomain.it
magento2.testdomain.es
magento2.testdomain.fr
magento2.testdomain.com
magento2.testdomainother.fr
magento2.testdomainother.de
magento2.testdomainother.it
magento2.testdomainother.es
magento2.testdomainother.com
magento2.testdomainother.co.uk
When we open website and switch domain in first click page refresh but domain does not change  and second click domain change.
In first click in India it redirect .com domain and in UK it redirect .co.uk means at the time of first click it detect browser language or location and redirect there and after that second click it redirect correct domain.
Any one let me know why fist click it detect browser language or location, Domain should change always on first click.
Magento version is 2.3.5-p1
Thanks


texts: Magento 2 How to create product rule condition on Category Edit Page

texts: How to create and save rule condition product on category edit page admin.


texts: indexer:reindex not running in Magento 2

texts:
I have 60 million product in my Magento 2 Store.
On running sudo php bin/magento indexer:reindex it will run successfull for only 2 the don't know why it doesn't show any error.

Any it will not validate further so my product are not visible on froentend
Any help is appreciated.


texts: Product page taking a lot of time to move automatically to next page

texts:
We are using template monster Theme  Magitique
Link: https://www.templatemonster.com/magetique.html
We are using varnish cache as well
The product page loading time took 14 seconds in loading but after applying advance JS Bundling the loading speed was decreased to 9 seconds only
There are a lot of performance issues in our product page
1.) The loading should be less
what technniques should be applied done with minify css etc
but after Advance JS bundling we can not minify js
2.) On going to page 2 It automatically loads products but sometime It does not and stuck in loading

any solution for this?
The main problem is Javascripts are taking a lot of time to load
I am done with the necessary steps for optimization even the Images are comming from cloufront
Help and guide is appreciated
Thanks


texts: Fatal error: Class 'Mage_Groupdeals_Helper_Data' not found in magento\app\Mage.php on line 547

texts:
I installed groupdeals extension and now when I uninstalled it. Its giving frontend error:

  Fatal error: Class 'Mage_Groupdeals_Helper_Data' not found in
  C:\xampp\htdocs\magento\app\Mage.php on line 547

Backend is working fine for me..

I cleared cache, session files and done lots of changes told in stackoverflow question answers like

1) magento-fatal-error-class-mage-foomancommon-helper-data-not-found

2) magento-php-fatal-error-class-xxxxxx-not-found-in-mage-php-on-line-516

3) magento-1-7-fatal-error-class-mage-profile-helper-data-not-found-in-mage-php

and so on.


texts: I'm looking for a way to server my pages by category name. So for example I have Cellphones as the category . I then want the URL to be cellphone.mystore.com. How would I make this possible?


texts:
Magento 2 Most view product collection return 0 but in database i have data

class Index extends \Magento\Framework\View\Element\Template {
    protected $_coreRegistry = null;
    protected $_collectionFactory;
    protected $_productsFactory;

   public function __construct(
       \Magento\Backend\Block\Template\Context $context,
       \Magento\Framework\Registry $registry,
      \Magento\Sales\Model\ResourceModel\Report\Bestsellers\CollectionFactory $collectionFactory,
        \Magento\Reports\Model\ResourceModel\Product\CollectionFactory $productsFactory,
       array $data = []
   ) {
       $this->_collectionFactory = $collectionFactory;
       $this->_coreRegistry = $registry;
       $this->_productsFactory = $productsFactory;
       parent::__construct($context, $data);
   }
    public function getCollection(){
            $currentStoreId = $this->_storeManager->getStore()->getId();
            $collection = $this->_productsFactory->create()
            ->addAttributeToSelect(
                '*'
            )->addViewsCount()->setStoreId(
                    $currentStoreId
            )->addStoreFilter(
                    $currentStoreId
            );
            $items = $collection->getItems();
            return $collection;
        }

phtml

<?php
    $items = $block->getCollection();
    echo count($items);
    foreach($items as $item) {
        echo $item->getName() .'<br/>';
    }
?>


texts: Get the number of orders with status 'processing'

texts:
I am trying to get the number of orders with status 'processing' and below is the code.

$countProcessingOrders = 0;

$processingOrders = Mage::getModel('sales/order')->getCollection()
    ->addFilter('status', Mage_Sales_Model_Order::STATE_PROCESSING)
    ->addAttributeToSelect('created_at');

foreach ($processingOrders as $order) {
        $countProcessingOrders++;
}

For some reason, the (count) output compared to Magento Admin is off by one.
It would be helpful if anyone can give clues as to why this may occur?

Note: I am selecting the 'created_at' attribute for some other purpose.


texts: Magento 2 : Custom module plugin is not working

texts:
I have created module for newsletter extra fields.In my module plugin file is not working pls someone help me

My plugin path is
Vendor/Module/Plugin/Newsletter
and my code is

namespace Vendor\Module\Plugin\Newsletter;

use Magento\Framework\App\Request\Http;

class Subscriber {
  protected $request;

  public function __construct(
    Http $request
  ) {
    $this->request = $request;
  }
  public function aroundSubscribe($subject, \Closure $proceed, $email) {
    $result = $proceed($email);
    if ($this->request->isPost() && $this->request->getPost('firstname')) {
      $firstname = $this->request->getPost('firstname');
      $lastname = $this->request->getPost('lastname');
      $gender = $this->request->getPost('gender');

      $subject->setCFirstname($firstname);
      $subject->setCLastname($lastname);
      $subject->setGender($gender);

      try {
        $subject->save();
      }catch (\Exception $e) {
        throw new \Exception($e->getMessage());
      }
    }

    return $result;
  }
}


texts:
I'm trying to override visual swatches rendering in a custom module so that I can tweak some of the default behavior.
I believe two of the important files for this are:

module-swatches/view/frontend/templates/product/layered/renderer.phtml (file 1)
module-swatches/Block/LayeredNavigation/RenderLayered.php (file 2)

I also have noticed that file 2 has a variable $_template referring file 1.
Also, file 2 is referred in variable $block of another file:

module-swatches/Model/Plugin/FilterRenderer.php

So, my approach is using preference in di.xml to override these classes and variables $_template and $block. But nothing works!
I would really appreciate some help! Thank you very much.


texts: how to get customer group id from last order id in magento 2

texts: I want to change customer group after placing an order so I need Customer Group id which can be update in observer . How to achieve it?


texts: I am new to magento. I need to stored my media files on google cloud. I have search for an extension but not found anything.


texts: How can I change validation for registration form

texts:
I want to change the firstname and lastname field validation in registration form.

I want first name and last name should be only characters with maxlength 15.

And in which file I can find the code for first name and last name.

How can I?


texts:
I want to update <meta charset="utf-8"> tag which was added in header.

I research in admin but not found anything related to that does anyone have an idea how to update it.


texts: How to hide the Price attribute in Magento 2?

texts:
I was able to hide the price on the frontend but I am unable to hide the attribute. Under the Attribute set the price attribute is locked. I can hide it with CSS but is that the proper way ?

Thanks in advance.


texts: Implementing enhanced ecommerce with Google Tag Manager

texts:
I want to implement enhanced ecommerce with Google tag manager on Magento. I'm not a developer but i can play around with files and backend if instructed. I don't know how to send dataLayer for enhanced ecommerce through magento. I want to do it without any extension if possible. Can anyone help me figure this out? Any examples would be appreciated.
Thanks,
Gill


texts: getOptions return an empty array in my Magento 2.1.10

texts:
I cannot manage to show custom attributes in my site anymore.

It occurs after an upgrade from  a previous version  (2.1.2)

Can someone take a look and help me? I do not know what to try anymore

thanks
mf


texts: Moving site to https killed my traffic, suggestions?

texts:
I've got to deal with a Magento 1.x site that has been run on unsecure http for over a decade. Just reading that, you're immediately thinking it's time to move it to https, right?

Well the trouble started when we did switch it to use https. We got the certificates etc, set up apache redirects to https and applied it in both web/unsecure/base_url and web/secure/base_url in admin config.

Google tanked us. Completely. It was a disaster.

We're a small regional store and we never experienced huge traffic but we did get quite a bit of traffic from Google and frequently showed up on the first page of search results. That died overnight on Feb 25th when we did the switch.

I'm forced to switch it back now to http and hope it somehow recovers.

I'm pulling my hair here trying to think of workarounds, but Magento isn't cooperating.

Also, an obvious workaround should/would be to "use secure on frontend" setting and let search engines gradually update their links. But this clearly is not doing what I would expect it to do. (ie. offer https links on link rels, hrefs and img srcs) instead it only does it for the account login link and a couple of others.

What's the point of having the option if it isn't obeyed? Is there a module that fixes that behaviour? If I manually visit the https version of the site the page will be unsecure because all the images inside it are on http.

Why did Google behave so strongly?
What can I do to survive this mess?
Is there a module that makes Magento frontend obey "use secure on frontend"?


texts: Magento 2: Shopping Cart quantity doesnt update after custom Add to cart form is submitted

texts:
I have a custom Add to Cart button for bundled products.
This is on my phtml for the /test-page :

<?php
/** @var Magento\Checkout\Helper\Cart $_checkoutCartHelper */
$_checkoutCartHelper = $this->helper(Magento\Checkout\Helper\Cart::class);
/** @var Magento\Catalog\Model\Product $_product */
$postParams = $block->getAddToCartPostParams($_product); ?>

<form action="<?php /* @escapeNotVerified */ echo $_checkoutCartHelper->getAddUrl($_product); ?>" method="post">
    <input type="hidden" name="product" value="<?php /* @escapeNotVerified */ echo $postParams['data']['product']; ?>"/>
    <input type="hidden" name="item" value="<?php echo $_product->getId(); ?>">
    <?php echo $block->getBlockHtml('formkey');

    /** @var \Magento\Bundle\Model\Selection $selection */
    foreach ($block->getSelectionCollection($_product) as $selection) {
        echo '<input type="hidden" aria-required="true" name="bundle_option['
            . $selection->getOptionId() . ']" class="bundle-option-' . $selection->getOptionId() . ' product bundle option" value="'
            . $selection->getSelectionId() . '" />';
        echo '<input type="hidden" name="bundle_option_qty['
            . $selection->getOptionId() . ']" value="'
            . $selection->getSelectionQty() . '" />';
    }
    ?>
    <input type="hidden" name="qty" id="qty" value="1"/>
    <button type="button" class="button btn-cart" onclick=" this.form.submit()"
            title="<?= $_customProductHelper->getAddToCartText($_product, 'Add to Cart') ?>">

                    <?php echo $_customProductHelper->getAddToCartText($_product, 'Add to Cart') ?>

    </button>
</form>

It works fine; after the user clicks on Add to Cart, the bundle product is added to the shopping cart and then it is redirected back to the /test-page. It then appears the message  "You added TEST Bundle Product to your shopping cart."

The problem is that the little shopping cart on the corner doesn't update the quantity of the products with the recent added-to-cart product.

However, if I go to /checkout/cart, the product is there.

Any ideas why?
Thanks in advance


texts: Is there a definitive reason for product URLs with IDs to exist in Magento?

texts:
Is there a reason why product URLs with IDs and friendly URLs have to co-exist in Magento?
Is there any downside to (301 permanent) redirecting URLs with IDs to friendly URLs?

Example:

URL with id:
site.com/catalog/product/view/id/2609

friendly URL:
site.com/some-real-friendly-product-name

I would love to know your opinions on this.


texts: magento cannot load static files JS & CSS

texts:
I just fresh installed the Magento2. I don't know why my page cannot load the CSS and JS files.
I did check the files, they are all in the pub/static folder.
I did check the version, it is correct. however the page still cannot link the file. I did read research trying to change the folder permission, but still not success. even I change the entire root directory to 777 still cannot load the CSS and JS file. I am pretty sure the files are there and in correct version
Anyone can help what other possible cause to this problem? it is magento itself or the Nginx server?
Thanks


texts: Magento 2: How to hidden tab fieldset in form ui component?

texts: i want hide this field. everyone can help me plz!


texts:
Is it possible to use two different layouts for these two review page URL's?

http://www.domain.com/laptop1-reviews

http://www.domain.com/review/product/list/id/33661/

Both display exactly the same content.

But is it possible to display on one of the two only the reviews and on the other URL only the reviewform?


texts: ZEND FRAMEWORK 1 SECURITY - Email Settings?

texts:
I have a question on the new Zend security vulnerability announced by Magento recently regarding the email settings in System-> Configuration-> Advanced-> System-> Mail Sending Settings-> Set Return-Path

What exactly does having this set to YES do?

Other than negating the security vulnerability, I would like to understand what feature I'm loosing by setting this to No.  I tested this on our staging site by setting it to NO but I see no difference as a user, after I
received a sales email, it still can see how it came from the same email address and I could reply to it.

I checked their User Guide, but unfortunately it did not reveal much more.

UPDATE

Under closer inspection I see that the email headers change slightly when I adjust this setting, especially the ones noted below:

When Set to YES

Return-Path: <info@example.com>
From: Sales <info@example.com>

When Set to SPECIFIED

Return-Path: <holy@example.com>
From: Sales <info@example.com>

When Set to NO

Return-Path: <www-data@ip-71.21.212.34.ec2.internal>
From: Sales <info@example.com>

Now I have a new question how does revealing your IP address & server username by changing the setting to NO help secure your Magento website?

Also, If I swicth from SENDMAIL to POSTFIX, will this solve the problem?


texts: Product Page Doesnt Display if media image attribute is empty

texts:
I have created some media image attributes to show in a couple of places on the product page.

They work fine if an image is selected for each of them but if not the page doesnt load correctly it seems to stop loading at more information.

If I go into the product and select an image for the attributes, save, then unselect and save again the product opens but can't do this for every product.

It works fine with new text attributes its only empty media image attributes.

This is for magento 2.1.12.

The code for pulling each the attributes is

    <img src="<?php
    $productImageAttr = $product->getCustomAttribute( 'productfeature2' );
    $productImage = $this->helper('Magento\Catalog\Helper\Image')
        ->init($product, 'productfeature2')
        ->setImageFile($productImageAttr->getValue());
    echo $productImage->getUrl() ?>" alt="<?php echo $block->escapeHtml($product->getTitle()) ?>" />

Is there a way to code this to skip any empty attributes from displaying?


texts: How to get categories by store or website

texts:
I need to display the categories based on the website.
Somebody help me
How to get categories based on store or website?


texts:
I am new to Magento 2 modules and would like to create a module to run the below class whenever someone accesses the homepage. I believe it would be easier if I converted this to an observer so I just wanted to confirm that that was as simple as reconfiguring the below code block.
<?php
namespace Webkul\Module\Controller\DemoController;

use Magento\Framework\App\Action\Action;
use Magento\Framework\App\Action\Context;
use Magento\Framework\HTTP\PhpEnvironment\RemoteAddress;

class DemoClass extends Action {
    private $remoteAddress;

    public function __construct(
        Context $context,
        RemoteAddress $remoteAddress
    ) {
        $this->remoteAddress = $remoteAddress;
        parent::__construct($context);
    }

    public function execute()
    {
        $ip = $this->remoteAddress->getRemoteAddress();
        echo "Visitor's IP = ".$ip;
    }
}


texts:
I have a multi store website and I need to change the order of countries based on store. Like for my Israel store, Israel must be at the top, and for US store US must be at the top.

Is there any possible way to do so in magento? I'd found an answer on SO but there's no change in the country list. Is there any possibility that reordering of countries can be done in that way?


texts: Is cleaning logs from the database a good practice?

texts: If exported current database as an SQL file size is over 600Mb. Most of which are logs. My question is can cleaning up logs from the database be a good practice to speed up a Magento website?


texts: Problem in loading layout on order success page due custom module

texts:
I have created a custom module for sending order email to customer on order success.

my config.xml file :

...
        <checkout_onepage_controller_success_action>
            <observers>
                <company_customizeorderemail_checkout_onepage_controller_success_action>
                    <class>Company_CustomizeOrderEmail_Model_Observer</class>
                    <method>send_order_email</method>
                </company_customizeorderemail_checkout_onepage_controller_success_action>
            </observers>
        </checkout_onepage_controller_success_action>
...

My observer file has function as following :

public function send_order_email($observer)
    {
        try
        {

            $order_ids = $observer->getData('order_ids');
            $order_id = $order_ids[0];

            $order = Mage::getModel('sales/order')->load($order_id);

            /* send new order email */
            $order->sendNewOrderEmail();
            return;
        }
        catch (Exception $e)
        {
            Mage::log($e->getMessage());
        }
    }

this module send email on order success but order success page showing page content on white page, it means there is problem in loading layout.

What is the problem in my custom module?

Or Is there any another method to send order email?


texts: Multiselect products to add directly to shopping cart

texts:
Would anyone have a recommendation on an extension that would allow the customer to add several products to their cart using one click.

My client sells paints and dyes and would like color swatches with editable quantities and sizes for each product that the customer can easily check off or input and drop into their shopping cart using 1 click. The ultimate goal is to display color and ordering options much like they are seen in the image below:


texts: Making External API Request in Product Model

texts:
In my Magento project I have to receive pricing and inventory information on our products. Right now I have created my own method within the product model to make a SOAP request in the getPrice() function.

Here's what that looks like:

../app/code/core/Mage/Catalog/Model/Product.php

/**
 * Get product price throught type instance
 *
 * @return unknown
 */
public function getPrice()
{
    if ($this->getData('is_api')){
        $this->getAPIData();
    }
    if ($this->_calculatePrice || !$this->getData('price')) {
        return $this->getPriceModel()->getPrice($this);
    } else {
        return $this->getData('price');
    }
}

/**
 * Get time since last update
 *
 * @return  int
 */
public function getTimeSinceLastUpdate() {
    return time() - strtotime($this->getUpdatedAt());
}

/**
 * Get product data from API
 *
 * @return  price
 */
public function getAPIData(){
    if ($this->getTimeSinceLastUpdate() > 5){
        $parts = new SoapClient("XXXX");
        $res = $parts->PartLookup([
            'userName' => 'XXXX',
            'password' => 'XXXX',
            'partnumber' => 'XXXX',
            'make' => ''
        ]);
        $this->updateAPIProduct($res);
        return $res;
    }
}

/**
 * Update API Product
 *
 * @return   unknown
 */
public function updateAPIProduct($data){
    $this->setPrice($data->PartLookupResult->PartInformation_v2[0]->Price);
    Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
    $this->save();
    Mage::app()->setCurrentStore(1);
}

However, this seems like the wrong way to do this. To me, it would make more sense to test whether or not it's an api product during product object creation. At that point I would update pricing AND inventory information.

I've also run into a bug where when I update the pricing while on the frontend the new price is grey and has a strike through it and the old price next to it.

The only problem is that I have no idea where to go to update that information at that point.


texts: Show external sales orders in custom grid in magento 2 admin

texts:
I have an external magneto 2 database in which old sales orders exist and I want to show that orders in custom grid like sales order grid.
I followed the https://github.com/joshspivey/magento2-sales-grid link and create custom grid for sales order but order is showing current m2 system but I want to show external's database orders in this grid.
I'm able to create multiple connection by adding following code in env.php
'db' =>
  array (
    'table_prefix' => '',
    'connection' =>
    array (
      'default' =>
      array (
        'host' => 'localhost',
        'dbname' => 'magento',
        'username' => 'your_username',
        'password' => 'your_password',
        'model' => 'mysql4',
        'engine' => 'innodb',
        'initStatements' => 'SET NAMES utf8;',
        'active' => '1',
      ),
      'newConnection' =>
      array (
        'host' => 'localhost',
        'dbname' => 'magento_new',
        'username' => 'your_username2',
        'password' => 'your_password2',
        'model' => 'mysql4',
        'engine' => 'innodb',
        'initStatements' => 'SET NAMES utf8;',
        'active' => '1',
      )
    ),
  ),

and for the resource
'resource' => array (
    'default_setup' => array (
      'connection' => 'default',
    ),
    'newConnection' => array(
      'connection' => 'newConnection'
    )
  ),

reference - https://blog.imranshakil.com/custom-database-connection-on-magento-2/
I have change $this->resource->getConnection('sales'); to $this->resource->getConnection('newConnection'); in sales module but it is still showing in magento's core module but still showing the current system orders. I got stuck. Please help.
Any help would be appreciated.


texts: Address attribute remains populated for addresses bellow a address to whom it was assigned

texts:
An address attribute is created , let say 'test_price'. This attribute is populated from front end. In case of more than one addresses,let say have two address with entity_id 2000 and 2001 ,  2000 is on top in admin and 2001 is bellow it,if I add some value for 'test_price' for address 2000 from front end.When I go to admin panel, under customer address. For 2000, it is added and displayed correctly, but for address 2001, this is also being displayed in field.But in DB, there is nothing for address 2001. Here if I Save customer,now it will be also added for address 2001 as this was being displayed in its field.Have some faced such a problem?, need some guidance.

UPDATE-1:- added attribute  'test_price' is being added in table

eav_attribute

with backend_type as varchar, So its data is being stored in table

customer_address_entity_varchar


texts:
I want to create grouped and bundle products, where a bundle and group have a special price that is not sum of prices of all individual products.

How to achieve that?


texts: Magento2 - How to stop a product from getting added to cart programmatically?

texts:
What I want to do is if my custom attribute is set in quote then i do not want any product to be added in cart. My custom attribute is being set correctly.

To stop product from getting added to cart, I have written an Observer which observes this event controller_action_predispatch_checkout_cart_add

My observer file code:

public function execute(\Magento\Framework\Event\Observer $observer) {
    $addedItemId = $observer->getRequest()->getParam('product');
    $quote       = $this->_cart->getQuote();

    if(!empty($quote)) {
        $customAttribute = $quote->getData('custom_attribute');

        if(!empty($customAttribute)) {
             $controller = $observer->getControllerAction();
             $storeId     = $this->_objectManager->get('Magento\Store\Model\StoreManagerInterface')->getStore()->getId();
             $product    = $this->_productRepository->getById($addedItemId, false, $storeId);
             $observer->getRequest()->setParam('product', null);

             $this->_messageManager->addError(__('This product cannot be added to your cart.'));
             echo false;

             $this->_actionFlag->set('', \Magento\Framework\App\Action\Action::FLAG_NO_DISPATCH, true);
             $this->redirect->redirect($controller->getResponse(), 'checkout/cart/index');
        }
    }
}

With this code, I am able not able to stop the add to cart process.

So as per this answer of Magento1 - https://stackoverflow.com/questions/14190358/stop-add-to-cart-and-supply-message-to-user-in-magento . I tried replacing

$this->_actionFlag->set('', \Magento\Framework\App\Action\Action::FLAG_NO_DISPATCH, true);
$this->redirect->redirect($controller->getResponse(), 'checkout/cart/index');

with (This is not the best way of doing it. If there is any better way, please suggest)

header("Location: " . $product->getProductUrl());
die();

This ultimately stops the add to cart process but the add to cart button still keeps on showing "Adding". How can i perform this correctly so that add to cart button goes back to its previous state and the product too does not get added to cart ?


texts: Need sql query to get price by sku in magento

texts:
<?php
$resource = Mage::getSingleton('core/resource');
$readConnection = $resource->getConnection('core_read');
$query = 'SELECT * FROM ' . $resource->getTableName('catalog/product');
$results = $readConnection->fetchAll($query);
 var_dump($results);

i need sql query for get product price by sql


texts:
I am writing a query to export a custom report regarding sales. The following tables are in question

sales_flat_order
sales_flat_order_item
sales_flat_shipment_grid

I haven't worked much with phpmyadmin since i started working with Magento. Models and collections do a pretty good job. But this time i needed some stuff real quick so thought that writing a query would be the easiest. The following query repeats some data and duplicates some rows. I am not sure why it's doing that but a person thorough with Magento would definitely know what I am talking about

SELECT s.increment_id, s.status, s.subtotal, s.shipping_amount, s.grand_total, s.customer_firstname, s.customer_lastname, o.name, o.sku, o.row_total, o.tax_amount, o.discount_amount, g.created_at AS Shipped_date
FROM sales_flat_order s
LEFT JOIN sales_flat_shipment_grid g ON g.order_increment_id = s.increment_id
LEFT JOIN sales_flat_order_item o ON g.order_id = o.order_id


texts: 500 error when adding to cart for some customers

texts:
Some of my customers have some strange behavior (Magento 2.2.7) :
when they try to add a product to the cart, the spinner is loading forever.
I detect a 500 error in the console :

mydomain.com/customer/section/load/?sections=cart%2Cmessages&update_section_id=true&_=1547657718709

And I have this in the logs :

PHP Fatal error:  Uncaught TypeError: Return value of Magento\\ConfigurableProduct\\Model\\Product\\Configuration\\Item\\ItemProductResolver::getChildProduct()
 must be an instance of Magento\\Catalog\\Model\\Product, null returned
 in
 /data/www/mystore/prod/vendor/magento/module-configurable-product/Model/Product/Configuration/Item/ItemProductResolver.php:83\nStack
 trace:\n#0
 /data/www/mystore/prod/vendor/magento/module-configurable-product/Model/Product/Configuration/Item/ItemProductResolver.php(51): Magento\\ConfigurableProduct\\Model\\Product\\Configuration\\Item\\ItemProductResolver-getChildProduct(Object(Magento\\Quote\\Model\\Quote\\Item))\n#1
 /data/www/mystore/prod/vendor/magento/module-catalog/Model/Product/Configuration/Item/ItemResolverComposite.php(44):
 Magento\\ConfigurableProduct\\Model\\Product\\Configuration\\Item\\ItemProductResolver-getFinalProduct(Object(Magento\\Quote\\Model\\Quote\\Item))\n#2
 /data/www/mystore/prod/vendor/magento/module-checkout/CustomerData/DefaultItem.php(129):
 Magento\\Catalog\\Model\\P in
 /data/www/mystore/prod/vendor/magento/module-configurable-product/Model/Product/Configuration/Item/ItemProductResolver.php
 on line 83, referer: mydomain/catalogsearch/result/?q=+test

I did not found any info about this error anywhere, maybe you can help me ?


texts:
Magento 2: Url_rewrite not working for migrated product magento 2
Whenever we changes url key for migrated product then its not affect on url_rewrite table and not redirect to new one url.


texts:
I want to remove jquery ui from magento 2.3 custom theme i used the following

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <!-- Remove blank/luma theme styling if you declared a parent-->
        <remove src="css/styles-m.css" />
        <remove src="css/styles-l.css" />
        <remove src="css/print.css" />
        <remove src="lib/web/jquery/jquery.js"/>
        <remove src="js/jquery-ui.js"/>

But it's not working. any help would be appreciated


texts: how to get custom field value to save order table in Checkout page in Magento 2

texts:
I have extended checkout page with comment note for customer feedback. And the textbox also appearing in checkout page.

But I don't know how to get custom field value and save Could you please instruct me how to do it.

For this I have wrote below code.

app/design/frontend/Learning/Test/Magento_Checkout/web/template/billing-address.html

    <textarea id="order_comment" rows="7" cols="15"/>

    <input type="checkbox" name="billing-address-same-as-shipping" data-bind="checked: isAddressSameAsShipping, click: useShippingAddress, attr: {id: 'billing-address-same-as-shipping-' + $parent.getCode()}"/>

<fieldset class="fieldset" data-bind="visible: !isAddressDetailsVisible()">

            <button class="action action-update" type="button" data-bind="click: updateAddress">

            </button>
            <button class="action action-cancel" type="button" data-bind="click: cancelAddressEdit">

            </button>

</fieldset>

My textbox appearing in Checkout Page

Could you please instruct me how to get custom field and save.


texts:
I'm very new to the Magento 2 framework. I would like to know that how to set up free shipping above the amount 50 dollars and below amount should have 6.5 dollar shipping charges.
Please help me to solve this problem.

thanks


texts:
I have a weird bug.

Every time I add a product to my cart it shows as if it were loading.

However, it adds the product to the cart, if I switch to another page or reload the loading disappears and shows the amount in the cart.
Do you know what could it be?

This problem began when I moved the cart to top links.


texts: How to extend field in news letter in magento

texts:
I need to add some check boxes in magento news letter.
in newsletter I need to add 3 check boxes.
Men,women,kids and this will be pre selected.

Without changing the core files....I need to add 1 filed and also...save data in that field.
I need to know that how this can i do by local.
like what should we need and how....


texts: More than one Free shipping issue with Shopping Cart Pricing Rule If General Free Shipping Enabled?

texts:
I have applied free shipping for purchase over 1000,

If i try for free shipping specific products which is below 1000 using Shopping Cart Price Rule  Free shipping not applying,

Note : Created free shipping attribute and inside the products page enabled,

How to enabled free shipping for specific products even general free shipping currently active?

Note : I am using Webshopapps Matrix Rates


texts: Magento 2 - How to create Megamenu for mobile?

texts: I have a desktop megamenu with alias menu-top & I have created megamenu for mobile with alias menu-top-mobile but it's not reflecting. How do I do that?


texts: Magento 2.3: Overwrite minicart content.html

texts:
I wanted to do some minor changes to the minicart in Magento 2.3. So I copied

/vendor/magento/module-checkout/view/frontend/web/template/minicart/content.html

to

/app/design/frontend/MyCompany/MyTheme/Magento_Checkout/web/template/minicart/content.html

and it didn't work. I cleared the file and just added "blah". I then cleared the caches, the indexes, ran setup:upgrade and setup:static-content:deploy -f. Deleted var/page_cache/* and pub/static/. No changes

So I left it because I had enough other things to do, and now, a week later, I see that the minicart only displays "blah".

So I changed the files content to what they needed to be, but now it won't pick up any changes again. I've read all topics on this regard, but no solution yet. What am I missing?!


texts: Magento 2: How to use event trigger on the checkout page?

texts:
How to use event trigger when change "State/Province " drop-down on the checkout page?

I'm trying to page reload when user change Region from "State/Province" dropdown in the checkout page.

First, I've created js file and put code and this js add in frontend using article but it's not worked

also, I have put static JS file in XML file but there give a JQuery not defined error.
 see below js file code

define([
   "jquery",
],
function($) {
   "use strict";
    $('document').on('change', 'select[name="region_id"]', function(){
       alert("hi");
    });
return;
});


texts: While opening coupon code and trying to go next page it gives Jquery Validate error in Magento 2?

texts:
I have created some steps between address and payment form in Magento 2.
When i open the coupon code and want to go on next step ( Payment Page Step ) It gives me an error
Cannot read property 'settings' of undefined in Jquery.validate.js

How to solve this issue actually i want to default open the coupan code but while trying to go on next page it gives me this error.
I will add coupon code ( phtml file ) with  this on step three and add coupon code in checkout_index_index.xml.

Any help is appreciated.


texts: M2 Show custom customer select attribut in frontend registration form

texts: I have a custom customer select attribute and want to include it in my customer registration form on the frontend. Can anybody help with the frontend part? Thanks!


texts: Location of "Choose Store View" add default "All Store Views" selection

texts: I want to add "All Store Views" selection in every case under drop down selection.


texts: add item to cart with addition option console error Unable to unserialize value

texts:
i am trying to add product to cart with addition option but i ended up with message: "Unable to unserialize value." this error on console resoponse on section refresh.

Console

I am using checkout_cart_product_add_after event and observer code like below.

$item = $observer->getQuoteItem();
    $additionalOptions = array();
    if ($additionalOption = $item->getOptionByCode('additional_options')) {
        $additionalOptions = (array) unserialize($additionalOption->getValue());
    }

    $additionalOptions[] = [
        'label' => 'Additional Options Label',
        'value' => 'Additional Options Value',
    ];

    if (count($additionalOptions) > 0) {
        $item->addOption(array(
            'product_id' => $item->getProductId(),
            'code' => 'additional_options',
            'value' => serialize($additionalOptions),
        ));
    }


texts:
I have created an observer that hooks into the controller_action_predispatch_adminhtml_sales_order_view event. In this observer I want to set the order's hasForcedCanCreditmemo to TRUE.

I am unsure how to retrieve the order, though - I can't see anywhere that the order ID is being passed through.

Does anyone have any ideas as to how I would get the order?

Thanks!


texts: I am a newbie and I am just getting started with all this so I apologize for my lack of education about this in advance.  I am trying to change the size of the search bar on Magento 2.  I have made a child theme from the parent magento and I just cant seem to change the width of the search bar.  I did search the similar articles but I had no luck figuring it out.


texts: Magento 2 - Load image of group product for simple product

texts:
I created a group product which has two simple products.

I did not upload an image to the simple product, only to the grouped product.

If I add a simple product into the card, then no images loads:

How can I make it load the image of the group product, if it does not have an image itself?


texts:
Can you please tell me how can Sort products thats are only "IN STOCK" by custom option on products listing page...

as for the lowest and highest price i am using this code...

 <option value="<?php echo $this->getOrderUrl('price', 'asc') ?>" <?php if($this->isOrderCurrent('price') && $this->getCurrentDirection() == 'asc'): ?> selected="selected"<?php endif; ?>>Lowest Price</option>
<option value="<?php echo $this->getOrderUrl('price', 'desc') ?>" <?php if($this->isOrderCurrent('price') && $this->getCurrentDirection() == 'desc'): ?> selected="selected" <?php endif; ?>>Highest Price</option>

What code changes should i do to show only products that are in stock by sort by option...

Should i have to create a custom attribute first or there will be any attribute already in the adminpanel...

If yes, what will be the attribute code.. please help me i need it on urgent basis.

Thanks in advance,,,


texts: Paypal Billing Agreement is not created only for products with Recurring Profile

texts:
I am trying to setup my magento store to receive Recurring Payments with Magento built-in functionality for Recurring Profiles and Billing Agreements.

But here is the issue I am having - Paypal Billing Agreements are not created for products wit Recurring Profiles (not on Paypal side nor in our Magento store). Otherwise when Recurring Profile is disabled for specific product - they are created just fine.

The process is this: client checks the checkbox to signup for billing agreement in checkout section of our magento store. Then he is redirected to Paypal website where he signs billing agreement, but after he is back to our site and the order is placed - billing agreements are not created.

Another weird thing is that even if "Billing Agreements" are not created - the payments are still going through (in paypal sandbox mode). Not sure though if it happens all the time.

Can anyone suggest what could be wrong?

Do I need to enable anything special for Recurring Payments on Paypal side for Billing Agreements to be created? Or is it Magento that is doing something wrong?

Thanks


texts: Adding suffix to head title on all pages for magento 1

texts:
What's the best way to add some text (e.g. [staging], [dev], ...) to the end of the header title on all pages? I'm thinking of some "layout" event to listen to where I can:

$observer->getLayout()->getBlock('head')->setTitle($originalTitle . ' [staging]');

But which one?


texts: How to config file conposer.json for namespace Module magento2?

texts:
I tried use to validate_m2_package.php to confign my module for Magento 2 upto marketplace.
This is structure my folder:

Namespace
---- ModuleBase
------ composer.json
------ registration.php
---- ModuleName
------ composer.json
------ registration.php
composer.json ? i need know content this file.

After zipfile : Namespace.zip. It not success. Pls help me guide file composer.json in folder Namespace.

Many thanks!!!


texts: Call to a member function toOptionArray() on boolean error when custom dropdown source model is used in system.xml

texts:
My application is configurable, so I have a few settings in the system.xml file. One of the setting uses a custom adminhtml dropdown source model.

So, in the XML, I have defined the setting row like this:

<store_id translate="label">
    Select Store View
    <frontend_type>select</frontend_type>
    <source_model>mymodule_adminhtml/system_config_source_dropdown_stores</source_model>
    <comment>Select the store view that is used for the integration.</comment>
    <sort_order>1</sort_order>
    <show_in_default>1</show_in_default>
    <show_in_website>0</show_in_website>
    <show_in_store>0</show_in_store>
</store_id>

So, I have created the dropdown source model Stores.php here:

app/code/local/Mycompany/Mymodule/Adminhtml/Model/System/Config/Source/Dropdown/Stores.php

This file's contents are:

class Mycompany_Mymodule_Adminhtml_Model_System_Config_Source_Dropdown_Stores
{
    public function toOptionArray()
    {
        // Build Option Array
        $optionArray = array();
        foreach (Mage::app()->getStores() as $store) {
            $optionArray[] = array(
                'value' => $store->getId(),
                'label' => Mage::helper('mymodule')->__($store->getName())
            );
        }

        // Finished
        return $optionArray;
    }
}

My config.xml section for defining the models looks like this:

<models>
    <mymodule>
        <class>Mycompany_Mymodule_Model</class>
        <resourceModel>mymodule_mysql4</resourceModel>
    </mymodule>
    <mymodule_mysql4>
        <class>Mycompany_Mymodule_Model_Mysql4</class>
        <entities>
            <setup>

mymodule_setup

            </setup>
        </entities>
    </mymodule_mysql4>
</models>

This was working fine before. I could go into System -> Config and click on my module tab and I could see a dropdown list of stores.

Today, this isn't working & I am not sure why. I get the following error:

  Fatal error: Call to a member function toOptionArray() on boolean in
  /home/www-data/public_html/includes/src/Mage_Adminhtml_Block_System_Config_Form.php
  on line 463

Any ideas what might have gone wrong? If I comment out the config section row in the system.xml the config page works in the backend.


texts: Adding JavaScript before closing body tag ()

texts:
I'm quite new to Magento (ver 1.9.1.0). I'm trying to add a JavaScript just before the closing </body> tag.

I've read other questions about this but none of them seem to work in my situation. Some said that I can edit footer.phtml but I wouldn't want to do that. As much as possible, I want to do it via page.xml located at /app/design/frontend/THEME/PACKAGE/layout


texts: Magento 2: How to add configurable product to cart programmatically with custom price?

texts:
I want to add child product to cart on same action, child product added successfully but I want to set custom price to 0, I can successfully set the price of Simple Product but don't know about the Configurable product.
/* ADD PRODUCT ALSO SET FREE PRODUCT PRICE TO ZERO ELSE REMOVE FREE PRODUCT */
if (in_array($helper->getProductInCart(), $cartSkus)) {
    if (!in_array($helper->getFreeGiftSku(), $freeGiftSku)) {
        $product = $helper->getProductRepository()->getById(5109);
            $params = [
            'form_key' => $helper->getFormKey(),
            'product' => 5109,
            'qty' => $totalQty,
        ];
        $helper->getCart()->addProduct($product, $params);
        $helper->getCart()->save();
    }
} else {
    foreach ($quote->getAllVisibleItems() as $item) {
        if ($item->getProduct()->getId() == $helper->getProductId()) {
            if ($item->getPrice() == '0') {
                $itemId = $item->getData('item_id');
                $helper->getCart()->removeItem($itemId)->save();
            }
        }
    }
}
/* ======================================================================== */


texts: Unable to access Admin URL after migrating settings

texts:
After migrating the setting my admin URL is inaccessible. Front-end is working fine.

I've invoked the settings.xml file to skip but still results in the same issue.

So far...
I've checked the env.php and all appears to be in order
I've also cleared my cache but same result

Thank you


texts:
On our store we have a blog where we show the "created_at" date of the entity.
But we show the same post to 5 different languages. Of course the content is translated but we don't know how we should translate the date.

Currently we display it like this:

$date = date("d F, Y", strtotime($date)); // $date = 2019-04-16 08:45:25
echo "<span> " . $date . "</span>";

This outputs something like this:

Our main problem here is that the month is in english in all our languages.
Is there a way to translate just the month?

PS: According to our PM just using the month number is not an option.


texts: Format price with javascript in Magento 2

texts:
In javascript I have calculated a number. Which I want to display as a price.

My JS file

define([
    'jquery'
], function ($) {
    "use strict";

    function irreleventCalculations() {
        // black magic here
        return 19.949999;
    }
    var price = irrelevenCalculation();

    jQuery('#myCustomPriceDiv').text(formatedPrice);

    return $;
});

How should I do this in Magento 2?


texts: Filter Product Collection By The Total Number Of Product Images

texts:
I am looking to filter a product collection by the number of product images uploaded for each particular product. For example I want to get a collection of all products that have at least 2 product images uploaded.

Is this possible?


texts:
i tried to override the Search for that my Layout is

  catalogsearch_result_index.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="content">
             <block class="Vender\Module\Block\Product\ListProduct" name="category.products.list" as="product_list" template="Vender_Module::product/list.phtml"/>
        </referenceContainer>
    </body>
</page>

just to override the Search Page not all the categories.So now when I Override the Price Function to show just a text for testing. then in search it shows like
As you guys can see in the image it is showing a product twice after that I add a custom Khan tag in the phtml file then it shows like you guys can see in the image that the Khan is showing in the 2nd one not the first one I just want my Own phtml file to work on this page. Thanks in Advance for Help


texts: Setting default payment method and skip the payment step

texts:
I would like to 'skip' the payment method step on the one page checkout step in Magento.

I am currently using SagePay as my payment method and well, as SagePay is my only method it seems pretty pointless having the Payment Method step on the one page checkout.

How can I do this?

I guess I need to somehow set the SagePay option as the default, hide the payment method form the user and skip straight to the order review step?


texts: Magento 1.9 - Sales Rules - subtotal with TAX

texts:
I want to add to sales rules for cart a rule where to add subtotal with TAX because I cannot relay on subtotal without TAX as I have products with different TAX class and different VAT values.

For example I have a product with VAT 19% and a product with VAT 9%, the I cannot trust the subtotal without TAX value, as it will depend on what type of products I add to the cart, in order for the rule to work correctly.

I want to apply a rule for subtotal bigger than 200 but I need to have subtotal with TAX.

How can I do this?


texts:
I am very new to Magento development and need to be pointed to the right direction to solve my issue.

Although I have found a few questions that tackle similar topics (Hide particular payment method if subtotal is zero and http://www.onlinecode.org/magento-disable-payment-method-programmatically/), I have not been able to use any of it, sometimes because I lack the detailed knowledge of Magento develeopment and sometimes references are not explained properly. Maybe the idea is too simple or too uncommon:

We are allowing customers to apply coupon codes on their cart. in some cases the coupon amount is greater than cart's grand total:

Sub Total: USD 100.00

Coupon Code: -USD 110.00

Grand Total: USD 0.00

When checking out (One Page) - obviously - there must not be a step called "Payment Method" because cart value is 0. Currently we have one payment activated for our customers (Credit Card) and "Zero Subtotal Checkout" is disabled, simply because we do not want to confuse our customers (if we show the payment step, they might think "My order is supposed to be free, no?")

I thought, if we could only have a condition inside our code to skip this one step only, when value of cart is 0.

Many many thanks


texts: is it possible to quickly get a products URL from it's id?  We're having an issue where the product URLs of configured (simple child) products are overlapping.  By this I mean when 2+ configurations (simple children) of a configurable product are added to the cart the URLs always divert to the first option


texts: "We can't add this item to your shopping cart right now" on detail page (Magento2 EE 2.1.7) Update

texts:
How to resolve ???

I has changed in vendor\magento\zendframework1\library\Zend\Cache\Backend\File.php:99

Change 'cache_dir' => null
to     'cache_dir' => 'var/cache'.
And not resolve this.

Plsssss help me !!! Thank Alls :D


texts:
How can I display taxes in magento products and catalog seperated from the price. Right now I can either display prices excluding or including tax from admin. I want to have an excluded price and the seperated tax amount being displayed. So not the price including tax.

Thanks for any help


texts: How to create around Plugin for the getSavePercent method of the \Magento\Catalog\Pricing\Price\TierPrice class?

texts:
I have used following code to create around plugin for the getSavePercent  method of \Magento\Catalog\Pricing\Price\TierPrice class.
(My objective is to get two decimals precision.)

<?php

namespace Mymodule\Common\Plugin;

use Magento\Framework\Pricing\Amount\AmountInterface;
use Magento\Framework\Pricing\SaleableInterface;
use Magento\Catalog\Pricing\Price\FinalPrice;

class TierPricePlugin
{
    /**
     * @var \Magento\Framework\App\Config\ScopeConfigInterface
     */
    protected $scopeConfig;

    /**
     * @var PriceInfoInterface
     */
    protected $priceInfo;

    public function __construct(
        \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
        SaleableInterface $saleableItem
   ) {
      $this->scopeConfig = $scopeConfig;
      $this->priceInfo = $saleableItem->getPriceInfo();
   }

    /**
     * @param AmountInterface $amount
     * @return float
     */
    public function aroundGetSavePercent(\Magento\Catalog\Pricing\Price\TierPrice $subject, \Closure $proceed, $amount)
    {
        $precision = $this->scopeConfig->getValue('mymodule_common/tier_prices/precision', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);

        return round(
            100 - ((100 / $this->priceInfo->getPrice(FinalPrice::PRICE_CODE)->getValue())
                * $amount->getBaseAmount()),$precision
        );
    }
}

I get following error.

PHP Fatal error:
 Uncaught Error: Cannot instantiate interface Magento\\Framework\\Pricing\\SaleableInterface in /var/www/html/Mysite/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:73\nStack trace:\n#0
 /var/www/html/Mysite/vendor/magento/framework/ObjectManager/ObjectManager.php(71): Magento\\Framework\\ObjectManager\\Factory\\Dynamic\\Developer->create('Magento\\\\Framewo...')\n#1
 /var/www/html/Mysite/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(126): Magento\\Framework\\ObjectManager\\ObjectManager->get('Magento\\\\Framewo...')\n#2
 /var/www/html/Mysite/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(53): Magento\\Framework\\ObjectManager\\Factory\\AbstractFactory->resolveArgument(Array, 'Magento\\\\Framewo...', NULL, 'saleableItem', 'Mymodule\\\\Common\\\\P...')\n#3
 /var/www/html/Mysite/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(82): Magento\\Framework\\ObjectManager\\Factory\\Dynamic\\Developer->_resolveArguments('Mymodule\\\\Common\\\\P...', Array, Array)\n#4
 /var/www/html/Mysite/vendor/m in /var/www/html/Mysite/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php

Issue seems to be created by following code line

 $this->priceInfo->getPrice(FinalPrice::PRICE_CODE)->getValue()

I want to get the final price of the product in my plugin code, so i am using above mentioned line.  But there seems to be problem with  $this->priceInfo


texts: SSL website not fully secure due to ajax

texts:
I installed SSL on my website, but I keep receiving a message saying: Your connection to this site is not fully secure.

I checked the site on whynopadlock.com and the result was this URL: http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js

Now the problem is that I am not sure how to change this to https instead of http. I will be thankful if someone could assist me with this.

Here's the website: https://www.splitshopbg.com/en/

I tried to search for another thread on this issue but I couldn't really find a resolution.

Thanks in advance,
Pavel.


texts:
I'm trying to apply any layout changes.

I have:

.../view/adminhtml/layout/default.xml

with code:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
    <body>
        <remove name="footer" />
    </body>
</page>

What I'm doing wrong?

Why my footer do not disappear?

When I add same code to any existing core layout - it removes footer properly.

Do I need to add any configuration somewhere to let my layouts work?


texts: new module installation but how to bin/magento setup:upgrade on remote server

texts:
I have installed a new module and added modulevendor_modulename=>1 in the  config.php file, but this gave me an error of:

a:4:{i:0;s:263:"Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory.
The following modules are outdated:...

I don't have ssh access, is there any to register/run this new module in my remote server?


texts:
We're trying to create a module that will play an MP3 in the backend of Magento 1.9 when we receive a completed transaction.

I've started by taking an existing module that checks for a new order and by default this module will email when observing the new transaction, I'd like to modify the action to play an mp3 instead if possible?


texts: Admin Sales Order shows 404 on multisite

texts:
I cannot access order detail page under sales from back-end.

I have three websites, each has one store view.

I can see orders placed on the main store, but not the ones on the other stores (/en/ or /eu/) .
I am also getting

exception 'Mage_Core_Model_Store_Exception' in
/app/code/core/Mage/Core/Model/App.php:1357

How can I fix this issue?

UPDATE

I recognized that once I put the store views /en/ or /eu/ under main website, then I can access the order detail page.
But as long as each store view is under each website, then I cannot access order details.


texts:
I made one more table in database which save sellers data then to load all seller's data I wrote following code and it is working like charm:

function getallSeller() {
        $tableName = Mage::getSingleton("core/resource")->getTableName('Custom_sellerprofile');
        $model = Mage::getModel('customer/customer')->getCollection()->addFieldToFilter('customerstatus', array('eq' => 1));
        $model->getSelect()->join(array('t2' => $tableName),"e.entity_id = t2.seller_id and t2.store_title!=''", array('store_logo' => 't2.store_logo',  'store_title' => 't2.store_title','description' => 't2.description','city' => 't2.city','store_title' => 't2.store_title'));
        return $model;
    }

after that I added one more attribute REGION in my custom seller's table   and then I want to fetch sellers by city(list of all sellers from particular region) for that I wrote this custom query but this is not working.

    function getSellerByRegion($region) {
            $coreResource = Mage::getSingleton('core/resource');
            $connection = $coreResource->getConnection('core_read');

            $select = $connection->select()
                ->from( $coreResource->getTableName('Custom_sellerprofile'))
                ->where('region = ?', $region);

            $customers=$connection->fetchAll($select);
            $model = Mage::getModel('customer/customer')->getCollection()->addFieldToFilter('customerstatus', array('eq' => 1));

            $model->getSelect()->join(array('t2' => $customers),"e.entity_id = t2.seller_id and t2.store_title!=''", array('store_logo' => 't2.store_logo',  'store_title' => 't2.store_title','description' => 't2.description','city' => 't2.city','store_title' => 't2.store_title'));

            return $model  }

getting this Error:

Syntax error or access violation: 1103 Incorrect table name '', query   was: SELECT `e`.*, `at_customerstatus`.`value` AS `customerstatus`, `t2`.`store_logo`, `t2`.`store_title`, `t2`.`description`, `t2`.`region` FROM `customer_entity` AS `e`

I guess that if we add that(custom) attribute in customer model then it can work but instead of that want to do from here only.

This is my first custom query so please don't hit much;)


texts: PRODSECBUG-2403 RCE Vulnerability patch has not been detected! (500) get in magneto 2.4.0 security scan

texts:
i am using magneto 2.4.0 .
While run magento security scan get this message
FAIL | Patch | RCE Vulnerability | PRODSECBUG-2403 RCE Vulnerability patch has not been detected! (500)
when try to fin patch PRODSECBUG-2403 not getting this patch. How to get this patch or to fix it?


texts:
Magento 2.2.1. Recently I have deleted one unused store and my magento has been broken with error:

1 exception(s):
Exception #0 (Magento\Framework\Exception\NoSuchEntityException): No such entity with id = 141

Exception #0 (Magento\Framework\Exception\NoSuchEntityException): No such entity with id = 141
#0 /var/www//vendor/magento/module-catalog/Model/CategoryRepository.php(141): Magento\Framework\Exception\NoSuchEntityException::singleField('id', '141')
#1 /var/www//app/code/TemplateMonster/CatalogImagesGrid/Block/CatalogImage/Grid.php(78): Magento\Catalog\Model\CategoryRepository->get('141')
#2 /var/www//app/design/frontend/TemplateMonster/theme007/TemplateMonster_CatalogImagesGrid/templates/catalog/widget_image_grid.phtml(3): TemplateMonster\CatalogImagesGrid\Block\CatalogImage\Grid->getCategory()
#3 /var/www/www/vendor/magento/framework/View/TemplateEngine/Php.php(59): include('/var/www/www.le...')
#4 /var/www/www/vendor/magento/framework/View/Element/Template.php(270): Magento\Framework\View\TemplateEngine\Php->render(Object(TemplateMonster\CatalogImagesGrid\Block\CatalogImage\Grid), '/var/www/www.le...', Array)

I have restored site and db from working backup - same error! of course, cache cleaned, var, generation etc deleted, content redeployed. constantly getting same error.

admin part works OK.

Please advice what is the nature of this error?

Which ID cannot be found? category? site? this driving me nuts already..


texts: Magento2 : Configurable products are not updating in cart

texts:
I have configurable product in my store and I am using magento2.2.6.

When I edit the product from cart page and Mini Cart, it not update the product, it added the new product in the cart, Some time it updating the product but most of the time it add other product with same variation.

Process to replicate this issue:-

Add any configurable product in cart with size "X".
Now click on edit icon for this product and select "XL" and click on update cart button.
It should update the same product size from "X" to "XL".

but it added the product as duplicate as shown in above image.

Please suggest me the solution to fix this.


texts: How to set custom_field value from product page to quote after a product added to cart in magento 2?

texts:
I have a custom_field on the product details page( Like a hidden field ). Which is not a product attribute.
I can get this field value using checkout_cart_product_add_after event using an observer like this.
<event name="checkout_cart_product_add_after">
    <observer name="CartProductAddAfter" instance="Ayakil\ProductsSubscription\Observer\Checkout\CartProductAddAfter"/>
</event>

Observer file
class CartProductAddAfter implements \Magento\Framework\Event\ObserverInterface
{
public function __construct(
    \Psr\Log\LoggerInterface $logger,
    \Magento\Framework\App\RequestInterface $request
) {
    $this->_logger = $logger;
    $this->_request = $request;
}public function execute(
    \Magento\Framework\Event\Observer $observer
) {

    $postData = $this->_request->getParams();
    $frequencies = $postData['frequencies'];
}

}
My question is I have a custom field( subcribe_frequency ) in quote_item, How can I set this  $frequencies quote items after adding the products to the cart?
Please someone help me in this?


texts: How duplicate your live store on a development store and try installation on it in advance

texts:
to update my theme the tutorial said
We recommend you to duplicate your live store on a development store and try installation on it in advance.

how to do this ?

and can i make something allow me to test codes before add it to alive site ?
thank you


texts: Stock Availability goes To Out-Of Stock on Save

texts:
Whenever I go into the Catalog and change a products Stock Availability to In Stock and save the product still keeps the Out of Stock status and doesn't change that value on the front end nor the database.

Whenever I go into the database and change the stock _status value to 1 and then proceed to go into the admin for that product it reverts back to out of stock (0).

Any clues what could be causing this? The only extensions I'm using are the Unirgy Dropship.

Edit: I've re-indexed several times and whenever I try to change quantity that goes to 0 on save as well.


texts: After moving SUPEE-6788 to production Aheadworks follow up email module does not work

texts:
Today I moved the Aheadworks follow up email module after fixing it for the admin router modifications as suggested in SUPEE-6788 patch documentation.

  <followupemail_admin>
    <use>admin</use>
    <args>
        <module>AW_Followupemail</module>
        <frontName>followupemail_admin</frontName>
    </args>
</followupemail_admin>

to

<adminhtml>
    <args>
        <modules>
            <followupemail_admin before="Mage_Adminhtml">AW_Followupemail_Adminhtml</followupemail_admin>
        </modules>
    </args>
</adminhtml>

But it started redirecting to blank page whenever click on any menu item related to Follow up module.

Though I had tested it in dev and staging server.

NOTE :  Posted this question for others as a reference if they face similar issue.


texts:
im trying to connect to the magento soap server.

I have set up the soap role and user that i want to use, and then i wrote a script called soap.php and placed it in my website public_html for testing, which looks like this:

<?php
// Magento login information
require_once('app/Mage.php');
Mage::app();

$mage_url = 'https://mrandmrsgrey.com/api/v2_soap?wsdl';
$mage_user = 'soaper';
$mage_api_key = '24648625';
// Initialize the SOAP client
$soap = new SoapClient( $mage_url );
// Login to Magento
$session_id = $soap->login( $mage_user, $mage_api_key );

But for some reason when i run the script i get this error:

  Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't find  in 'https://mrandmrsgrey.com/api/v2_soap?wsdl'

Ive crawled the net but any solutions that popped up havent worked i.e. turning off "Add Store Code to URLs"

Im running magento CE 1.7. Any help will be much appreciated


texts: What are the different ways of sending emails in Magento 1?

texts:
I have been looking through the Core classes in Magento and observed that there seem to be many ways of sending emails through Magento. Also, I could not find a definitive guide on what to choose and when. Here I'll list my findings and would like to have someone help me with c

class Mage_Core_Model_Email_Template
class Mage_Core_Model_Email_Template_Mailer: Looks to be an abstraction of the above class Mage_Core_Model_Email_Template since it creates an instance of the above class in the send() method.
class Mage_Core_Model_Email: Looks to be a completely separate implementation without any relation to any of the above classes.

What should help me decide which of these classes to use? and when? What are the benefits / limitations of using each?

My use case: I am looking to send an email from the admin backend. A report to be sent to the admin of the site of all products that have been flagged by users (flagging functionality has been custom built in the frontend and a listing grid in the backend too. But the admin also wants a daily report)

But, besides this I would also like to know when would each of these classes be used and what would be the considerations taken while making this decision?

Thanks!


texts: Magento2: How to add product images to custom ui-component admin grid

texts:
I have a custom grid using ui component method in back-end to show data from a custom table with columns as follows:

id
product_id
user_id
store_ids
status
adminassign
created
modified
position

Here the product_id, user_id, status denotes default Product ID, Customer ID and Product Status respectively.
Now I have displayed these values in the custom grid.
How can I join the default catalog_product and customer tables to show more fields like Product Name, Product Image, Product Status and Customer Name in to the grid.

Please help me out. Thank you in advance.


texts: Setup scripts fail integration tests in Magento2

texts:
I have setup integration tests for app/code that was working fine.

Now I have a module that adds some product attributes in a setup script, it doesn't have any tests but it is part of the project. When running integration tests it will fail with the exception: Wrong entity ID

This happens when the setup does this:
$eavSetup->addAttribute(Product::ENTITY, $attributeCode, $attributeDefinition);

The error happens because table eav_entity_type is empty for some reason. what am I missing something here?


texts: Magento 2.3.3 - How to remove city field from shipping address and billing address from checkout

texts:
I want to remove city field from both shipping address and billing address on checkout page. I did manage to remove them using them checkout_index_index.xml but getting error "City is required field".

Do anyone know how to do this ?


texts: How can I call reloadPrice from price-box.js on product detail page when user change the quantity from quantity box?


texts: How to defer parsing js files used via cdn

texts: I am using the Defer Parsing of JavaScript by Meetanshi module, which is a free module from the marketplace. The module has deferred loading of local files, but it has not deferred the files that the project uses from outside. Advise how to implement deferral for them


texts: How can i create multiple courier service options in shipping method and price calculated by weight for individual product for both services

texts:
How can i create multiple courier service options in shipping method and price calculated by weight for individual product for both service.

eg :

Professional courier [10.2 INR]
Aramax Courier [12.5 INR]


texts: Not seeing admin panel properly after magento 2 installed

texts: After installing magento 2 i am seeing admin panel is not getting loaded properly. Also the website is showing error.


texts: Magento : Product detail page GIF image not call / working

texts:
Here my code use in our local environment it's working but in live site not working When i click image gif image not open it live site.but in localhost it's working properly

$baseDir = Mage::getBaseDir('media');
  $file = ('gif' == strtolower(pathinfo($this->_baseFile, PATHINFO_EXTENSION))) ? $this->_baseFile : $this->_newFile;
  $path = str_replace($baseDir . DS, "", $file);
  return Mage::getBaseUrl('media') . str_replace(DS, '/', $path);