texts:
I need to create the following rule on my Magento 1.8 store.

The customer can buy any 2 products from a specific category with a fixed price.

I mean if product 1 price is 100 and product 2 price is 200 and if he added them to cart with quantity 1 to each of the final prices will be for example 250.

Also to all products in this category if the customer bought any 2 of the items, the final price will be 250.


texts: Magento Translation for coupon code not working

texts:
In /app/code/core/Mage/Checkout/controllers/CartController.php I see:

$this->_getSession()->addError(
    $this->__(
       'Coupon code "%s" is not valid.',
        Mage::helper('core')->escapeHtml($couponCode)
    )
);

In my theme's translate.csv I have added:

"Mage_Checkout::Coupon code ""%s"" was applied.","test"
"Coupon code ""%s"" is not valid.","test"

If I edit the controller code directly, it works. The translate.csv does not work -- it still outputs the original text, 'Coupon code "blah" is not valid.'.

I even tried editing the translation in app/locale/en_US/Mage_Checkout.csv but it didn't work either.

What have I missed? Shouldn't it be outputting "test" ??


texts: Magento 2: Issue with Upload two modules on marketplace

texts:
I have two modules in my extension
eg: Abc
      xyz1
      xyz2

I need to upload it on the marketplace. Do I need to create the meta-package or have to do another thing?

Does anyone have an idea?

Thanks


texts: Event to use after order placed and when order status is changed

texts:
I have a scenario where I need to do some calculation on grand total.

When order is placed successfully, fetch order status and do
something
After order is placed, and when order status is changed, fetch order
status and do something more.

I am using the event sales_order_place_after while for second one sales_order_save_after.

The issue is for first case event sales_order_place_after is working good and calculations are correct. But for second case, I am not able to fetch order status using sales_order_save_after when order is being placed successfully.

Order status can be only retrieved when its changed from backend, while I need to get it after order is placed and/or order is changed.

Event sales_order_save_after is a bit tricky. The first time it's triggered Order is not yet commited to DB, and more to that - it actually doesn't have State and Status set yet.

Am I using incorrect events in this case ?

Thanks


texts: Use different domaine for Admin and Front

texts:
How can we use different domaine for the Front and the admin section. If I'm changing the domaine on the base URL of the store config, I'm getting a 404 because there's no admin on this domaine.

I've build a PWA on a different domaine www.mydomaine.com and the backend is on api.mydomaine.com.


texts: Magento 2 How to override framework feed file?

texts:
I am trying to override Magento Framework Feed.php file,

After googling alot I found how to override framework file but that's not worked for me.

  Please give me the right eay to override framework feed file.

Vendor/Namespace/etc/di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\Framework\App\Feed" type="Serole\Corefiles\App\Feed" />
</config>

Vendor/Namespace/App/Feed.php

<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
declare(strict_types=1);

namespace Vendor\Namespace\App;

use Zend\Feed\Writer\FeedFactory;

/**
 * Default XML feed class
 */
class Feed extends \Magento\Framework\App\Feed
{
    /**
     * @var array
     */
    private $feeds;

    /**
     * Feed constructor.
     * @param array $data
     */
    public function __construct(array $data)
    {
        $this->feeds = $data;
    }

    /**
     * {@inheritdoc}
     */
    public function getFormattedContent() : string
    {
        echo '<pre>'; print_r($this->feeds); die();
        return FeedFactory::factory($this->feeds)->export(FeedFactoryInterface::FORMAT_RSS);
    }
}

Please guide me.


texts: Sorting repository by more than one attribute

texts:
I want to sort a repository by more than one attribute. Any ideas of how to achieve this?

What I have so far is this:

public function getLatestPosts()
{
  return $this->postRepository
   ->getList($this->buildSearchCriteriaForLatestPosts())
   ->getItems();
}

private function buildSearchCriteriaForLatestPosts()
{
  $this->prepareSearchCriteriaBuilder();
  $this->searchCriteriaBuilder->setPageSize(1);
  return $this->searchCriteriaBuilder->create();
}

private function prepareSearchCriteriaBuilder()
{

   /** @var \Magento\Framework\Api\SortOrder $publishDateOrder */
   $publishDateOrder = $this->sortOrderBuilder
      ->setField(PostInterface::PUBLISH_DATE)
      ->setDirection(SortOrder::SORT_DESC)
      ->create();

   /** @var \Magento\Framework\Api\SortOrder $isFeaturedOrder */
   $isFeaturedOrder = $this->sortOrderBuilder
      ->setField('is_featured')
      ->setDirection(SortOrder::SORT_DESC)
      ->create();

   $this->searchCriteriaBuilder->setSortOrders([$publishDateOrder, $isFeaturedOrder]);
}

I dont know why it is not working properly; what I want to achieve is to get the list of Posts sorted by is_featured and created_at in DESC. So even if somehow 2 or more posts are featured, it will display the latest one at the top

Any help will be appreciated!
Thanks


texts: How to display top viewed products and best selling products in magento 2?

texts: I have to display best selling products and top viewed products in my magento 2. Can anyone please help me to achieve this?


texts: A client I'm working for wants to have order saved right after entering payment information (one page checkout). The status should be 'during_payment', but the status is not a problem. The problem is I don't know how to save order after that step, and then make magento just update the existing order with new payment information and status in case the payment succeded. Any ideas would be very welcome! Thanks!


texts: How to use addFieldToFilter & addFieldToSelect in magento2

texts:
I need to known how to use addFieldToFilter & addFieldToSelect in frontend? And can I use like below
$searchQuery = $wholeData["searchQuery"] ?? "";
$searchQuery = trim($searchQuery);
$agentCollection = $this->_agents->create()->addNameToSelect();

if ($agentId > 0) {
    $agentCollection->addFieldToFilter("id", $agentId);
} else {
    $agentCollection->addFieldToSelect("email")
            ->addFieldToFilter(
                    [
                            ["field"=>"email", "like"=>"%".$searchQuery."%"],
                            ["field"=>"contactno", "like"=>"%".$searchQuery."%"]
                    ]
            );
}


texts: Show the added custom tab on customer dashboard to particular customer group only Magento 2

texts:
I have added the custom tab on the customer dashboard using the code:

<?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>
        <referenceBlock name="customer_account_navigation">
            <!-- <update handle="customer_account_navigation"/> -->

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

Now what I want is I want to show this tab to only a particular customer group. As the link was added through the XML file and when I checked the navigation.phtml it is rendering all the links using

<?php echo $block->getChildHtml();?>

So I wasn't able to add some condition there.

can anyone help?

Thanks


texts: Magento 1.9 Catalog Price Rule on Super product attributes configuration

texts:
I currently have a product with Super product attributes configuration associated on it... I am trying to set up a catalog price rule to reduce one of the configurations price by 50%

Any help would be massively appreciated


texts:
When I click "Check for Upgrades" on Magento Connect Manager, following errors appear on system.log.

ERR (3): Recoverable Error: Argument 1 passed to Mage_Connect_Package::importDataV1x() must be of the type array, boolean given, called in
/downloader/lib/Mage/Connect/Command/Registry.php on line 304 and defined  in /downloader/lib/Mage/Connect/Package.php on line 1340

ERR (3): Recoverable Error: Argument 1 passed to Mage_Connect_Package::importDataV1x() must be of the type array, boolean given, called in
/downloader/lib/Mage/Connect/Command/Registry.php on line 304 and defined  in /downloader/lib/Mage/Connect/Package.php on line 1340

ERR (3): Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when an open_basedir is set  in
/downloader/lib/Mage/HTTP/Client/Curl.php on line 529

Anybody knows how to fix them?


texts: Cannot update the cart page details with some custom discounts and reward point sums

texts:
In cart page I'm trying to update the cart total and subtotal values    based on my custom discount and reward points.
 While select the discount and reward points the total has changed and show the values in few seconds, after some api's (Like    /V1/carts/mine/totals-information) call    automatically and the discount amount are disabled and the total amount revert to old values.


texts: How to get only child categories of a product. Magento 1.8.1

texts:
I'm using a code snippet I found here to list all the categories that a product is listed in on the product page.

<?php $categories = $_product->getCategoryIds(); ?>
<?php foreach($categories as $k => $_category_id): ?>
<?php $_category = Mage::getModel('catalog/category')->load($_category_id) ?>
<?php if($_category->getIsActive()): ?>

<a href="<?php echo $_category->getUrl() ?>"><?php echo $_category->getName() ?>

<?php endif; ?>
<?php endforeach; ?>

However, I'm realizing that the list can get a bit unruly and not really necessary.  How can I adapt this code to only show the child categories the product belongs to. I might even need to take it a step further and only show the LAST child categories the product belongs to.  Any help?


texts: getDefaultViewMode in magento2 returns null

texts:
Why am i getting Call to a member function getDefaultViewMode() on null in C:\xampp\htdocs\magento2x\magento2\app\code\Magento\Catalog\Block\Product\ProductList\Toolbar.php on line 409 when I create a custom block and try to extend it from core.

In File: vendor/module/Model/Engine.php

namespace Tagalys\Tglssearch\Model;

class Engine extends \Magento\Framework\Model\AbstractModel  {
private function _makeTagalysRequest()
{

  $current_list_mode = $this->layout->createBlock('Magento\Catalog\Block\Product\ProductList\Toolbar')->getCurrentMode();

}

getCurrentMode() which is from \Magento\Catalog\Block\Product\ProductList\Toolbar.php  says

$mode = $this->_getData('_current_grid_mode');

    if ($mode) {
        return $mode;
    }

    $defaultMode =    this->_productListHelper->getDefaultViewMode($this->getModes());

In Core File: \Magento\Catalog\Helper\Product\ProductList.php

public function getDefaultViewMode($options = [])
{
    echo 'helper';die;
    print_r($options);die;
    if (empty($options)) {
        $options = $this->getAvailableViewMode();
    }
    return current(array_keys($options));
}

Why am i getting  Call to a member function getDefaultViewMode() on null error ?


texts:
Is it possible to use  VUE.js in Magento1 or Magento2?

Is any one used this, please share me example.

Thanks


texts:
I need to get cart rules applied to a quote, with the discount amount related to them. Say I have the following:

**Rule 1**: Buy 2, get 1 free on product 1

**Rule 2**: 10% discount on all products

**Product 1**: $10

**Product 2**: $20

**Quote**

3 x Product 1

2 x Product 2

**Subtotal**: $70

**Discount**: $16

**Total**: $54

I am fetching applied rules through $quote->getAppliedRuleIds(), but cannot get the discount amount for each rule, for e.g.:

3x2 on product 1: **$10**

10% Spring Sale: **$6**

How can I fetch those discounts?
Please reply me.


texts:
Scratching my head with this issue, and I just do not understand why this is happening in the first place. Made a custom REST API call to remove multiple items from the cart with one single API call from calling a similar REST API calls multiple time to prevent too much activity happening. I have the logged user cart working just fine, but somehow the guest cart is throwing me this error:

Class int[] does not exist

vendor\module\etc\webapi.xml

<!-- Works fine -->
<route url="/V1/custom/carts/mine/items/clear" method="PUT">
    <service class="Vendor\Module\Api\CartItemRepositoryInterface" method="clearAsUser" />

    <resources>
        <resource ref="self" />
    </resources>

    <data>
        <parameter name="cartId" force="true">%cart_id%</parameter>
    </data>
</route>

<!-- Does not work -->
<route url="/V1/custom/guest-carts/:cartId/items/clear" method="PUT">
    <service class="Vendor\Module\Api\CartItemRepositoryInterface" method="clearAsGuest" />

    <resources>
        <resource ref="anonymous" />
    </resources>
</route>

vendor\module\api\CartItemRepositoryInterface.php

/**
 * Removes an array of items from the specified cart.
 *
 * @param int $cartId
 * @param int[] $cartItems
 * @return bool
 */
public function clearAsUser($cartId, $cartItems);

/**
 * Removes an array of items from the specified cart.
 *
 * @param string $cartId
 * @param int[] $cartItems
 * @return bool
 */
public function clearAsGuest($cartId, $cartItems);

Request Data

{
    "cartItems": [
        0: 123456,
        1: 789012
    ]
}

EDIT

vendor\module\model\CartItemRepository.php

/**
 * @param \Magento\Quote\Api\CartItemRepositoryInterface $cartItemRepo
 * @param \Magento\Quote\Api\GuestCartItemRepositoryInterface $guestItemRepo
 */
public function __construct(
    \Magento\Quote\Api\CartItemRepositoryInterface $cartItemRepo,
    \Magento\Quote\Api\GuestCartItemRepositoryInterface $guestItemRepo
){
    $this->cartItemRepo = $cartItemRepo;
    $this->guestItemRepo = $guestItemRepo;

    $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/logging.log');
    $this->logger = new \Zend\Log\Logger();
    $this->logger->addWriter($writer);
}

/**
 * {@inheritdoc}
 */
public function clearAsGuest($cartId, $cartItems)
{
    $this->logger->info('clearAsGuest: ' . $cartId);

    try{
        foreach($cartItems as $itemId){
            if(!$this->guestItemRepo->deleteById($cartId, $itemId)){
                throw new \Exception('Some items were unable to be deleted from your cart.');
            } else {
                $this->logger->info('Removed! ' . $itemId);
            }
        }

        return true;
    } catch (\Exception $e){
        $this->logger->info('Error: ' . $e->getMessage());
        return false;
    }
}

I've tried the guest cart api without the array to see if it does recognize the guest-cart id, and it does recognize it without an issue, but when I try to send the array of integers it will give me the error.


texts: I am trying to dump historical customer order data from a legacy ecommerce site that we restored from an AMI. Ideally this would grab customer ID, email, order date, product SKUs ordered, and order totals. Is this possible to do through a straight sql query or would we be better off fixing the broken PHP framework and exporting from Magento?


texts: Invalid template file error in Magento 2

texts:
In my custom theme, I added custom template for which I am getting invalid template file error in system.log. My xml file loctaion:

app/design/frontend/{vendor}/{theme}/Magento_catalog/layout/catalog_product_view.xml

My template file location

app/design/frontend/{vendor}/{theme}/Magento_catalog/templates/product/view/size_guide.phtml

catalog_product_view.xml

<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="product.info.details">
<block class="Magento\Catalog\Block\Product\View\Description" name="size_guide" template="Magento_Catalog::product/view/size_guide.phtml" group="detailed_info">
<arguments>
    <argument name="title" translate="true" xsi:type="string">Size Guide</argument>
</arguments>
</block>
</referenceBlock>
<!-- this is code to add new tab end -->
</body>
</page>

size_guide.phtml

<?php echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('size_guide')->toHtml(); ?>

Magento looks for the template file in module-catalog and gives the error when not found. Why does Magento not pick up the template file from my theme?


texts: How to get product zoom extensions to work in custom theme?

texts:
I worked with the default theme as base an am slowly implementing my own theme on top of it by overriding it (as is recommended).

Now, I'm currently trying to install extensions that change how product images are display (my customer wants a zoom functionality as is used on many shops).

I tried these extensions:
http://www.magentocommerce.com/magento-connect/moo-cloudzoom.html
http://www.magentocommerce.com/magento-connect/vs-product-image-zoom-featurezoom.html

I installed them via magento connect without problems and configured them under configuration. Neither shows up on the site. I made sure they're active and are active in the right scope.

I did not override any phtml files so far, only some xml and a lot of css.

I'm using Magento v. 1.7.0.2

I'd be grateful for some help!


texts: magento 2 edit customer HTML print order

texts:
In the client dashboard>My Orders>View Order there is a print order option.

The file vendor\magento\module-sales\view\frontend\templates\order\items.phtml generates the output.  But any changes I make to this file changes all pages using the file.  Can I create a file so that only the print order url ( generated by <?php  echo $block->getPrintUrl($_order) ?>) will use its own file?

Or can I create a new link to a new file so I can edit just the print order output?


texts: admin customer Edit form is not getting record id in magento

texts:
I am new to magento, I have created custom module front and backend(admin) module, working fine except edit.

in grid bind the data correctly with id

http://localhost/magento/index.php/test/adminhtml_index/edit/id/1/key/ef47aec44d98d1201d27fcdc732243a3.

but when I click on edit I redirected to edit page and I did debug also, but record id is not getting.

public function editAction()
    {
        $testId = $this->getRequest()->getParam('test_id');
        //id is not getting
        Mage::log($testId);
        $testModel = Mage::getModel('quotes/quotes')->load($testId);
      .....
    }

if I pass/hard coded from here I got a details of record id

$testModel = Mage::getModel('quotes/quotes')->load(1);

can any one tell me where I went wrong?

thanks


texts: Issue in sending mail for customer and to other mails using magento

texts:
Created the form with fields and added the email code for sending the mail.But I need to send the mail with two different bodies

How can I send Please help me.

My Mail code:

  <?php
   function sendMailAction(){
 //Mage::getModel('sales/order')->load(24999);

 $cname=$_POST['cname'];
 $mobile=$_POST['mobile'];

  $html=
  '

City: '.$city.'

Location: '.$location.'

Name: '.$cname.'

Email : '.$email.'

Mobile Number: '.$mobile.'
'

 ;
  $mail = Mage::getModel('core/email');
  $mail->setToName($name);
  $mail->setToEmail('some.example@mail.com');
  $mail->setBody($html);
  $mail->setSubject('Booking');
  $mail->setFromEmail('some.example@mail.com');
  $mail->setFromName("example");

 $mail->setType('html');// YOu can use Html or text as Mail format

 try {
 $mail->send();
  //Mage::getSingleton('core/session')->addSuccess('Your Order is successfully Completed');
 //Mage::app()->getResponse()->setRedirect(Mage::getBaseUrl());
 return '
Your Order has been submitted. Thank you for using labwise.
';
//$this->_redirect('');
}
 catch (Exception $e) {
//Mage::getSingleton('core/session')->addError('Unable to send.');
 //Mage::app()->getResponse()->setRedirect(Mage::getBaseUrl());
return '
Unable to submit.
';
//$this->_redirect('');
}
}
 function sendMailcustomerAction(){
 //Mage::getModel('sales/order')->load(24999);
  $email=$_POST['email'];

  $city=$_POST['city'];
  $location=$_POST['location'];

 $cname=$_POST['cname'];
 $mobile=$_POST['mobile'];

$html=
''

 ;
  $mail = Mage::getModel('core/email');
  $mail->setToName($name);
  $mail->setToEmail($email);
  $mail->setBody($html);
  $mail->setSubject('Booking');
  $mail->setFromEmail('Your mail');
  $mail->setFromName("somename");

  $mail->setType('html');// YOu can use Html or text as Mail format

   try {
   $mail->send();
   //Mage::getSingleton('core/session')->addSuccess('Your Order is    successfully Completed');
 //Mage::app()->getResponse()->setRedirect(Mage::getBaseUrl());
  return 'Your Order is Successfully Completed';
  //$this->_redirect('');
  }
  catch (Exception $e) {
  //Mage::getSingleton('core/session')->addError('Unable to send.');
 //Mage::app()->getResponse()->setRedirect(Mage::getBaseUrl());
 return 'Unable to send.';
 //$this->_redirect('');
 }
 }
   echo sendMailcustomerAction();
   echo sendMailAction();
   ?>


texts: Magento 2.1.9 can't find save button class

texts:
I am trying to get a save button on a dynamic row field to fire but on loading a CMS page I get the following error:
Class Brancom\PageExtensions\Block\Adminhtml\DynamicRows\Edit\SaveButton
             does not exist";i:1;s:9517:"#0 /home/forge/hiflex.brancomdev.nl/public/vendor/magento/framework/Code/Reader/ClassReader.php(19): ReflectionClass->__construct('Brancom\\PageExt...')

But the Class exists on the specified location, you can see the class here:
<?php
namespace Brancom\PageExtensions\Block\Adminhtml\DynamicRows\Edit;

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

class SaveButton extends GenericButton implements ButtonProviderInterface
{

    public function getButtonData()
    {
        $url = $this->getUrl('brancom/row/save');

        return [
            'label' => __('Save Rows'),
            'class' => 'save primary',
            'on_click' => "setLocation('". $url ."'')",
            'sort_order' => 90,
        ];
    }
}

The call to the class below:
    <fieldset name="related_product">
    <argument name="data" xsi:type="array">
        <item name="js_config" xsi:type="array">
            <item name="provider" xsi:type="string">dynamic_rows.dynamic_rows_data_source</item>
            <item name="deps" xsi:type="string">dynamic_rows.dynamic_rows_data_source</item>
        </item>
        <item name="label" xsi:type="string" translate="true">Dynamic Rows</item>
        <item name="config" xsi:type="array">
            <item name="dataScope" xsi:type="string">data</item>
            <item name="namespace" xsi:type="string">dynamic_rows</item>
        </item>
        <item name="template" xsi:type="string">templates/form/collapsible</item>
        <item name="buttons" xsi:type="array">
            <item name="save" xsi:type="string">Brancom\PageExtensions\Block\Adminhtml\DynamicRows\Edit\SaveButton</item>
        </item>
    </argument>

The file rests in the correct location but I still seem to do something wrong, does anybody know why my class does not exist according to magento?


texts:
I am creating my first custom module for magento and I already have some issues.
What I am trying to do is to create new section under catalog tab in admin panel (this I already made) but when I clicked my custom section it does not finds route (or in other words  it not finds index action) and I get redirected to 404 error page.

Here is what I already have:
app/etc/modules/Company_myModule.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Company_myModule>
            <active>true</active>
            <codePool>local</codePool>
        </Company_myModule>
    </modules>
</config>

app/code/local/Company/myModule/controllers/Adminhtml/ReportController.php

<?php

class Company_myModule_Adminhtml_ReportController extends Mage_Adminhtml_Controller_Action
{
    public function indexAction()
    {
    echo "test";
    }
}

app/code/local/Company/myModule/etc/config.xml

<?xml version="1.0" ?>
<config>
    <modules>
        <Company_myModule>
            <version>1.0.0</version>
        </Company_myModule>
    </modules>
    <global>
        <helpers>
            <Company_myModule>
                <class>Company_myModule_Helper</class>
            </Company_myModule>
        </helpers>
    </global>
</config>

app/code/local/Company/myModule/etc/adminhtml.xml

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <menu>
        <catalog>
             <children>
                <myModule translate="title" module="company_myModule">
                    <title>myModule title</title>
                    <sort_order>2</sort_order>
        <action>adminhtml/report</action>
                </myModule>
             </children>
    </catalog>
</menu>
<acl>
    <resources>
        <admin>
            <children>
                <catalog>
                    <title>myModule title</title>
                    <sort_order>2</sort_order>
                </catalog>
            </children>
        </admin>
    </resources>
</acl>
</config>

Any ideas why it not able to find route to my index action in ReportController ?


texts: How to use Mailchimp template in Magento 2 emails

texts:
I am trying to use Mailchimp templates in magento 2 emails instead of magento 2 default email templates.

How can I achieve this?


texts: Event "controller_action_predispatch" not working. Magento 1

texts:
Config.xml
<?xml version="1.0"?>
<config>
    <modules>
        <Vendor_Module>
            <version>0.1.0</version>
        </Vendor_Module>
    </modules>
    <global>
        <models>
            <vendor_vodule>
                <class>vendor_vodule_Model</class>
            </vendor_vodule>
        </models>
        <helpers>
            <vendor_vodule>
                <class>vendor_vodule_Helper</class>
            </vendor_vodule>
        </helpers>
    </global>
    <frontend>
        <events>
            <controller_action_predispatch>
                <observers>
                    <vendor_vodule>
                        <class>Vendor_Module_Model_Observer</class>
                        <method>Module</method>
                    </vendor_vodule>
                </observers>
            </controller_action_predispatch>
        </events>
    </frontend>
    <adminhtml>
        <acl>
            <resources>
                <admin>
                    <children>
                        <system>
                            <children>
                                <config>
                                    <children>
                                        <vendor_vodule translate="title" module="vendor_vodule">
                                            <title>Module Validation</title>
                                            <sort_order>999</sort_order>
                                        </vendor_vodule>
                                    </children>
                                </config>
                            </children>
                        </system>
                    </children>
                </admin>
            </resources>
        </acl>
    </adminhtml>
</config>

Vendor/Module/Model/Observer.php
<?php

class Vendor_Module_Model_Observer
{
    /**
     * Validate
     *
     * @param Varien_Object $eventObject
     */
    public function Module($eventObject)
    {
        echo 'check'; exit;
    }
}

Any thoughts what's the issue with event ?


texts: Magento 2: Price format is wrong in Indian Rupees?

texts:
I am using Magento 2.2.3  with my default currency is INR but its show in wrong format.

But it should be ₹77,65,000.00, how we correct price format currently its working like USD.

I have tried many ways but I am not able to resolve this please help to resolve this issue.


texts:
i have added another rating to product page named Admin Rating which is editable by admin.
i created an attribute admin_rating and assign it to the attribute set, and entered a digit for this attribute from 0 to 100, one star is equal to 20 and five stars to 100.

i edited this file:

\app\design\frontend\your package \your theme\template\catalog\product\view.phtml

and added this code into it:

 <div class="rating" style="width:<?php echo $_product->getAdminRating();?>%;">

every thing is fine but i want change admin stars view (they are stars and i want them to be other things like circles or ...), but class="rating-box" contains one kind of shapes and when i change it, both of the ratings will change.

how can i do that?
i will thankful if you describe it by details.


texts: Changing language twice gives error: Requested store is not found

texts:
In Magento 2.2 Multiple store views on one store

  If you change the language twice in a store this system won't redirect
  you back to the right store. Instead, it gives a server error with the
  message: Requested

  store is not found

  Steps to reproduce

  Setup 1 store with two store views

  Go to the website

  Change the language

  Change the language again.

  The error will display now

Expected Result

  Just change back to the previous store view Actual result Server
  error: Requested store is not found

  Gif showing the problem: https://cl.ly/3c2h2C0E3v1Q


texts: One page checkout continue button not working both guest and registered

texts:
I'm getting the following javaScript error on the checkout page:

js.js:667 Uncaught TypeError: element.dispatchEvent is not a function

At first I thought conflict but I'm pretty sure the order of script loading is correct - i.e. jQuery, noconflict, then prototype. Is this right?

I then realised my host had upgraded PHP to 5.6.17, so will try older versions tomorrow when I have time to re-configure the PHP Handler etc. But I think this is unlikely due to timing.

The Magento CE is 1.9.0.1 and PHP 5.6.17.

The issue is compounded by the fact that the setup is Joomla connected to Magento with Yireo's Magebridge.


texts: Helper methods and properties not present, class seems instantiated

texts:
NOTE: This appears to be compiler related.  Disabling and clearing compiler code appears to have worked to get this doing what it was supposed to.

So this one is a bit odd.  I'm sure it's old hat to some now, and I've just done a bad job searching it out.  If that's the case I certainly apologize and ask for your indulgence and a link to the already provided answer.

So I have followed the core guides for creating a magento module, but for some reason it does work right.  When I var_dump the helper class it has the correct name, but when I try to use one of the methods I've put in the class definition it throws an exception.

Furthermore, when I run get_class_methods() on the class given to me by Mage::helper('mymodule/myhelper') none of my methods are there.

So in summary:

The class is in the right place, app/code/local/MyModule/Helper/Myhelper.php
The class shows as initialized after I call Mage::helper('mymodule/myhelper')
The class methods are not listed, and as a result, break things when called.

Here's my config for reference.  The rest of the module seems to be fine.

<?xml version="1.0"?>

<config>
  <modules>
    <APCShared_Shipping>
      <version>0.1.0</version>
    </APCShared_Shipping>
  </modules>
  <frontend>
    <routers>
      <apcshipping>
        <use>standard</use>
        <args>
          <module>APCShared_Shipping</module>
          <frontName>apcshipping</frontName>
        </args>
      </apcshipping>
    </routers>
  </frontend>
  <global>
    <blocks>
      <apcshipping>
        <class>APCShared_Shipping_Block</class>
      </apcshipping>
    </blocks>
    <helpers>
      <apcshipping>
        <class>APCShared_Shipping_Helper</class>
      </apcshipping>
    </helpers>
    <models>
      <apcshipping>
        <class>APCShared_Shipping_Model</class>
        <resourceModel>shipping_resource</resourceModel>
      </apcshipping>
      <apcshipping_resource>
        <class>APCShared_Shipping_Model_Resource</class>
        <entities>
          <zipcode>

apc_shipping_zipcode

          </zipcode>
        </entities>
      </apcshipping_resource>
    </models>
  </global>
</config>


texts: Magento 2 need to add extension attribute

texts:
I am using magento 2.1.5 . I want to add extension attribute to Magento\Tax\Api\Data\QuoteDetailsItemInterface I want to add product id attribute to QuoteDetailsItemInterface

Can anyone suggest me how can I add attribute to QuoteDetailsItemInterface.

I have created custom module add below code to it.

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Api/etc/extension_attributes.xsd">
    <extension_attributes for="Magento\Tax\Api\Data\QuoteDetailsItemInterface">
        <attribute code="product_id" type="string" />
    </extension_attributes>
</config>

Still I am trying to get product id

$item->getExtensionAttributes()->getProductId()

but It gives null value. Please suggest how can i get product id and how can i set product id to extension attribute.


texts:
Yoast canonical url and meta robots & Mage 1.7

Something I have been wondering about (and I think some others).

Are the two YOAST plugins above still necessary in Mage 1.7?


texts: Magento 2 Add Image to product media gallery

texts:
I am using bacon-qr-code library to generate a png file containing the QR code of the product info, it is generated and i am using $product->addImageToMediaGallery() function, which creates a folder called  tmp under pub/media folder and the rest of the folder structure inside it is same as catalog/1/2/3/file.png, but when i try to save the product model, the browser just displays this message The connection was reset,

I am doing this on catalog_product_load_after event.

Also i will need to check if the qr code for the product already exists or not, there is a column called label in the table row, i am going to use it to check the condition, but i could not find any method to add the image along with other attributes.

Any Help will be appreciated


texts: How do I get two attribute values in same json file?

texts:
function productDescription()
{
  $attribute = Mage::getSingleton('eav/config')
      ->getAttribute(Mage_Catalog_Model_Product::ENTITY, 'size');
  if ($attribute->usesSource()) {
      $options = $attribute->getSource()->getAllOptions(false);
  }
  print_r($options);
  $array = json_encode($options);
  file_put_contents("product_node.json", $array);
  $attribute1 = Mage::getModel('eav/config')->getAttribute('catalog_product', 'color'); //"color" is the attribute_code
  $allOptions = $attribute1->getSource()->getAllOptions(false);
  foreach ($allOptions as $instance) {
    $id = $instance['value']; //id of the option
    $value = $instance['label']; //Label of the option
  }
  print_r($allOptions);
  $array1 = json_encode($allOptions);
  file_put_contents("product_color.json", $array1);
}


texts: Do I Have to Copy the Full Class to the "local" code pool when Making Modifications

texts:
Can someone please answer this for me.

If I create my own version of a Mage/core file in the local code pool, does it completely overwrite the Mage/core file? Or will the methods that have not been re-defined in my code still be inherited from the core file?

Example. The following file (Exception.php) contains several methods (functions).

~ app
->  code
  ->  core
    ->  Mage
      ->  Customer
        ->  Exception.php

I want to put my own version here:

~ app
->  code
  ->  local
    ->  Mage
      ->  Customer
        ->  Exception.php

My version only contains 1 method (_beforeSave()). The core file contains many. Will all the other methods still be available to Mage from the original file?

Hope that's clear! Thanks.


texts: How to remove Authorize.net from Magento admin panel payment method.its not removing by deleting the file from folder.


texts: How can I apply PayTm Applicable for only Indian Customer?

texts: How can I apply the condition that an Indian customer is only allowed to use PayTm in Payment Gateway? How can I set this condition?


texts: Loop through order collection and send email invoice

texts:
I try to loop through my order collection to make invoice order and send invoice email programmatically,all the invoice were created successfully, but only the invoice email from last order in loop that i receive.

foreach ($orders as $order){
    if ($order->canInvoice()) {
        $invoice = $this->_objectManager->create('Magento\Sales\Model\Service\InvoiceService')->prepareInvoice($order);
        $invoice->register();
        $invoice->save();
        $invoice->pay();
        $transactionSave = $this->_objectManager->create('Magento\Framework\DB\Transaction')
            ->addObject($invoice)
            ->addObject($invoice->getOrder());
        $transactionSave->save();
        $this->invoiceSender->send($invoice,true);
    }
}


texts:
I want to add custom link in the 'top link' section(white list, Login, Account).

Basically i want to add "Blog" link at the top of the links. When user click on the link then its redirect to the external website.

My website URL is www.imageplus.pk.

Please help me how can i do this?


texts: Magento 2: Fatal Error: 'Uncaught Error: Call to undefined method setWebsiteId()

texts:
I had created a custom API for customer registration in Magento 2.3. I am checking that the weather the customer is already registered or not with below code.

$email = $this->request->getParam('email');
$firstName = $this->request->getParam('firstname');
$lastName = $this->request->getParam('lastname');
$websiteId = $this->request->getParam('websiteId');

$customerFactory = $this->_customerFactory->getCollection();

/**
 * check whether the email address is already registered or not
 */
$customer = $customerFactory->setWebsiteId($websiteId)->loadByEmail($email);

/**
 * if email address already registered, return the error message
 * else, create new customer account
 */
if ($customer->getId()) {
    echo 'Customer with email '.$email.' is already registered.';
} else {
    // code...
}

But I am getting the api error when i run in postman. When I checked the api log report it shows below error.

"Fatal Error: 'Uncaught Error: Call to undefined method Magento\\Customer\\Model\\ResourceModel\\Customer\\Collection\\Interceptor::setWebsiteId() in \/var\/www\/html\/app\/code\/MyModule\/Customapi\/Model\/AppcustomerregistrationManagement.php:187\nStack trace:\n#0 [internal function]: MyModule\\Customapi\\Model\\AppcustomerregistrationManagement->signup()\n#1 \/var\/www\/html\/vendor\/magento\/module-webapi\/Controller\/Rest\/SynchronousRequestProcessor.php(95): call_user_func_array(Array, Array)\n#2 \/var\/www\/html\/vendor\/magento\/module-webapi\/Controller\/Rest.php(188): Magento\\Webapi\\Controller\\Rest\\SynchronousRequestProcessor->process(Object(Magento\\Framework\\Webapi\\Rest\\Request\\Proxy))\n#3 \/var\/www\/html\/vendor\/magento\/framework\/Interception\/Interceptor.php(58): Magento\\Webapi\\Controller\\Rest->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#4 \/var\/www\/html\/vendor\/magento\/framework\/Interception\/Interceptor.php(138): Magento\\Webapi\\Controller\\Rest\\Interceptor->___callParent('dispatch', Array)\n#5 \/var\/www\/html\/vendor\/magento\/framework\/Intercept' in '\/var\/www\/html\/app\/code\/MyModule\/Customapi\/Model\/AppcustomerregistrationManagement.php' on line 187"


texts: Fatal error: Call to a member function setLayer() on boolean when click on any of top nav categories

texts:
When I click on any of the categories listed in the top nav I go to a blank page with the message:

Fatal error: Call to a member function setLayer() on boolean in magentopath/app/code/core/Mage/Catalog/Block/Layer/View.php on line 134

It's a multistore, until now both stores were running the theme eTheme - BuyShop ver. 2.1 and were working ok.

But now we had to install the theme mgstheme claue_v1.5.1 on one of the stores.

So now the configuration of each store is:

Now the store with the new theme mgstheme claue_v1.5.1 installed do not list any category. I followed the files to an empty collection of categories.

in app/code/design/frontend/mgstheme/claue/template/megamenu/navigation.phtml
there is $megaMenu = $this->getMegamenuItems() and $megaMenu is empty.

in app/code/local/MGS/Megamenu/Block/Megamenu.php is the getMegamenuItems() method.

public function getMegamenuItems(){
    $store = Mage::app()->getStore();
    $menuCollection = Mage::getModel('megamenu/megamenu')
        ->getCollection()
        ->addStoreFilter($store)
        ->addFieldToFilter('parent_id', 1)
        ->addFieldToFilter('status', 1)
        ->setOrder('position', 'ASC')
    ;
    return $menuCollection;
}

And it returns nothing. The categories are created and worked fine in the nav menu before changing the theme.

And the store with the previous theme seems to work ok, but when click on a category, then a blank page with the error Call to a member function setLayer() on boolean is displayed.

I'm not sure where I should to begin looking for the error...


texts: How to create an add to cart button for simples within a grouped product AND still get parent image in cart in no image is specified for the simple

texts:
How can I create an 'add to cart' button for simple products within a grouped product AND still get the grouped product image to show in the cart when there is not an image specified for the simple?

I've added the button, code as below, for each simple within a grouped product but when I click to add the associated simple to the cart it doesn't display an image in the 'my cart' preview or on the cart page - it's just showing the placeholder image. I've tried getAddToCartUrl instead but it has the same issue.

<button type="button" class="button btn-cart buy-btns" id="<?php echo $_item->getId(); ?>" onclick="setLocation('<?php echo Mage::helper('checkout/cart')->getAddUrl($_item); ?>' + 'qty/' + $(this).previous().value; ?>')">Add to cart</button>

I assume it's treating it as an independant simple, however I do not have images on all my simples and want it to display the grouped product image if the simple does not have an image. Some of my simple products are in more than one grouped so I can't just pull any grouped image that it's associated with.

I've looked at the function getAddUrl in the Core code (Cart.php) and notice it has $additional parameters. Could this help me or can anyone help me resolve this issues? Many thanks.


texts: I need to change the size of the ZoomWindow and make a couple style tweaks (border, cursor, etc..) I see this info is all coming from the /js/lib/elevatezoom js files so do I just edit the non-minified version, then re-minify it? Or is there a more 'proper' way to work with these js files?


texts: How to get list of available coupon code of Current Product Only

texts: How to get available coupon code of current product


texts: My magento on readiness check detecting a wrong version 7.2.4   while on cli when I check its  7.1.2 . how I can solve this ?


texts: Magento 2: How to filter section show when page load?

texts:
I have set one grid in frontend using Uicomponent. I want to filter section expand when page load, after customer filter any value that it will close.
I try using below code.
$(document).ajaxComplete(function(){
trigger code for expand
});

but its every time expand.


texts: Magento 2 : Add Extra Fee and Extra Fee Tax Into Tax Amount

texts:
I am working on Magento 2 module where I need extra fee as well as tax of extra fees which need to add into tax amount of quote total.

If anyone knows how to do, comment please.

Thank in advance


texts:
i have written a small functionality, where i need to get data from XML or CSV and populate the data in the cart.

I am able to read the data from the file and create an array of the items

foreach ($products as $productId => $singleQty)
    {

        $product = $this->productModel->load($productId);
        if ($product)
        {
            echo $product->getId() .'<br/>';
            $this->cart->addProduct($_product, array('qty' => $singleQty));
            $this->cart->save();
        }
    }

the echo result is completely fine, it displays the product Ids correctly

But only one item gets added into the cart, with the total number of items.

Suppose i have product IDs 2 and 4 with quantities 200 and 400 respectively,

the above snippet only adds product with ID 2, but the quantity added is 600

Any idea what i am doing wrong?


texts: Is it possible to update the imported tablerate shipping rates programatically?

texts:
The website is working with two currencies - GBP (base currency) and EUR. For countries in the UK the shipping should be 5 GBP, for the rest it should be exactly 6 EUR (for example 4.71 GBP in base currency).

I've created an observer which detects the country and changes the shipping rate but there are problems with it for the orders placed from the backend.

My idea is to dispatch a custom event when the currency rates are changed (after_save). This is easy. To recalculate the value for the other countries to be 6 EUR is easy too - it would be 6/currentlySavedGbpToEurCrrencyRate. For example 4.71 GBP.

But how can I edit the currently saved shipping rates which were imported with the CSV file? I have to update them. Can I somehow create a new csv file programatically and call Mage_Shipping_Model_Resource_Carrier_Tablerate::uploadAndImport?
Another option is to edit the values in the DB directly - table shipping_tablerate. Is it safe?

Note: I know that the best solution would be creating a second website with base currency EUR but this is not possible at the moment, so I'm searching a workaround.


texts: How do I get the raw customer password when customer is already registered?

texts: How can I get the customer's password in plain text/raw format if the customer as already registered and logged in in Magento 2?


texts: Magento2 Push notification for IOS and Android

texts:
I am creating a native app for my magento2 store, Want to create facility of Mobile notification for different module (default and custom), I have certificate for IOS that will be use regarding this.

How can I integrate this certificate and send push notification via rest api, And want the same for Android as well.


texts:
We have a problem with "sort order" of IPN requests from PayPal. PayPal sends two IPN requests to some of our orders (that were created at external POS). First is "pending" and second is "complete", but our server sometimes receives these requests in reverse order. So we are receiving something like:

[04/Sep/2018:07:13:55 +0000] <= time when server receives first IPN

...
payment_date=23:52:21 Sep 03, 2018 PDT <= payment time
payment_status=Completed
...

[04/Sep/2018:07:14:04 +0000] <= time when server receives second IPN

...
payment_date=23:52:13 Sep 03, 2018 PDT <= payment time
payment_status=Pending
...

Problem is that first IPN setup the order state to "Processing" and second IPN changes the order state back to "Pending Payment" - so admin does not know that order is paid. We are using standard Mage_PayPal (but maybe some 3rd party module rewrites them, I am not sure now).

I would like to ask you, Is there anyone who has meets this problem? Is the changing the order state to "Pedning Payment" a standard behaviour? Any idea how to solve it?

Very thank you.


texts: Assign a customer cart to another customer programmatically Magento 2

texts:
I want to assign a customer product on the cart to another customer cart in Magento 2.

Somewhere is saw that we can achieve the same on Magento 1.x from

Mage::getModel('checkout/quote')->load($quoteId)->setCustomerId($customerId)->save();

I first tried the same on Magento 1.x it assigned the cart to another customer but the problem was, after assigning when the customer removed the product from the cart the product will be removed from other customer cart too.

Can anyone help me out here? How can I achieve this on Magento 2?

Thanks


texts: magento 2 how to redirect disabled product to category page?

texts:
I want to redirect disabled products to the related category page. I have tried discontinued option which is available in admin but it is not working.

How can I fix the issue?


texts: Magento 2 Disable FPC for single CMS page in Magento 2

texts:
I have seen that there is a option available to disable FPC for single CMS page in Magento 1.
Is there anything available to do it in Magento 2?


texts: @media-common - Why do we need to use this?

texts:
In the Magento 2 lib documentation it contains the following:

@media-common: true|false - sets whether to output common styles. For common styles every time you want to add some styles you should use

& when (@media-common = true) {
    your styles
}

Question

What is the difference between using this and just writing Less without it? Such as:

& when (@media-common = true) {
    body {
        background: blue;
    }
}

How does that compile differently to:

body {
    background: blue;
}

Won't it be outputted in styles-l.css and styles-m.css regardless?


texts: Upgrade from Magento version from 2.4 to 2.4.1

texts:
I'm trying to update my magento 2.4 community edition to magento 2.4.1 executing the following commands:
composer require magento/product-community-edition=2.4.1 --no-update
composer update

I get the following error, can anyone help?

My composer.json looks as follows:
{
    "name": "magento/project-community-edition",
    "description": "eCommerce Platform for Growth (Community Edition)",
    "type": "project",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "config": {
        "preferred-install": "dist",
        "sort-packages": true
    },
    "require": {
        "avada/module-proofo": "^1.0",
        "magento/composer-root-update-plugin": "~1.0",
        "magento/product-community-edition": "2.4.0",
        "mageplaza/magento-2-portuguese-language-pack": "dev-master",
        "mageplaza/module-banner-slider": "^2.0",
        "mageplaza/module-customer-approval": "^1.0",
        "mageplaza/module-smtp": "^1.2",
        "olegkoval/magento2-regenerate-url-rewrites": "^1.4"
    },
    "require-dev": {
        "lusitanian/oauth": "~0.8.10",
        "pdepend/pdepend": "~2.7.1",
        "phpmd/phpmd": "^2.8.0",
        "phpunit/phpunit": "^9",
        "sebastian/phpcpd": "~5.0.0",
        "squizlabs/php_codesniffer": "3.3.1",
        "allure-framework/allure-phpunit": "~1.2.0"
    },
    "conflict": {
        "gene/bluefoot": "*"
    },
    "autoload": {
        "psr-4": {
            "Magento\\Framework\\": "lib/internal/Magento/Framework/",
            "Magento\\Setup\\": "setup/src/Magento/Setup/",
            "Magento\\": "app/code/Magento/",
            "Zend\\Mvc\\Controller\\": "setup/src/Zend/Mvc/Controller/"
        },
        "psr-0": {
            "": [
                "app/code/",
                "generated/code/"
            ]
        },
        "files": [
            "app/etc/NonComposerComponentRegistration.php"
        ],
        "exclude-from-classmap": [
            "**/dev/**",
            "**/update/**",
            "**/Test/**"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/",
            "Magento\\Tools\\": "dev/tools/Magento/Tools/",
            "Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/",
            "Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/",
            "Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/"
        }
    },
    "version": "2.3.1",
    "minimum-stability": "stable",
    "repositories": [
        {
            "type": "composer",
            "url": "https://repo.magento.com/"
        }
    ],
    "extra": {
        "magento-force": "override"
    }
}


texts: Strange behaviour One page checkout Ajax issue in IE9?

texts:
At one page checkout page, I could not move to step 3 that is from billing information to shipping information.ajax is loaded then again redirect itself with post parameters in URL like

http://test.com/checkout/onepage/?billing%5Baddress_id%5D=&billing%5Bfirs......

IT happens only in IE9. I have checked opcheckout.js

...
save: function(){
        if (checkout.loadWaiting!=false) return;

        var validator = new Validation(this.form);
        if (validator.validate()) {
            checkout.setLoadWaiting('billing');
            var request = new Ajax.Request(
                this.saveUrl,
                {
                    method: 'post',
                    onComplete: this.onComplete,
                    onSuccess: this.onSave,
                    onFailure: checkout.ajaxFailure.bind(checkout),
                    parameters: Form.serialize(this.form)
                }
            );
        }
    },

....

also i have checked inline.phtml file to check whether this ajax function calls on success event to trigger onSave function.

....
billing.onSave = function(evt){  alert('success'); //for checking purpose
            new Ajax.Updater('onepage-checkout-shipping-method-additional-load', '<?php echo $this->getAdditionalUrl(); ?>', {onSuccess: function() {
                 this.nextStep(evt);
            }.bind(this), evalScripts:true});
        }.bindAsEventListener(billing);
...

After filling billing information, this save function could not call and again redirect itself.But this works in all other browsers.

How can i find/fix the issue. Kindly advice on this ?


texts: What are all the allowed `xsi:type` values in the xml's from Magento2

texts:
In Magento 2 (almost) all arguments listed in xml files have an attribute xsi:type that determine how the value of the argument is iterpreted.
For example, in di.xml file of the backend module there is this:

<argument name="scopeType" xsi:type="const">Magento\Framework\App\Config\ScopeConfigInterface::SCOPE_TYPE_DEFAULT</argument>

this means that the value of the argument scopeType is the value of the constant Magento\Framework\App\Config\ScopeConfigInterface::SCOPE_TYPE_DEFAULT

or this one

<argument name="template" xsi:type="string">Magento_Theme::root.phtml</argument>

this means that the value of the argument template is the string Magento_Theme::root.phtml.

What are all the possible values of this xsi:type attribute?


texts: Display out of stock | but qty had value

texts: I was bulk import qty through csv, import successfully but in my site display out of stock, the thing is, my qty had value.


texts: How to add/restore currencies to the Allowed Currencies selection box?

texts:
It seems that, for whatever reason, the Allowed Currencies box is limited to only USD... no other currencies are available.
I didn't "delete" or remove them intentionally (and I'm not sure how that would work...If I did, I suppose I could just work through the process in reverse to solve this problem...) but I suspect this might be an unfortunate side effect from the Magento1->Magento2 Data Migration Tool.
It seems that in other places in the Magento admin, such as currency settings and exchange rates, etc. the currency types are included and functional...just not in the Allowed Currencies settings.
I checked '../vendor/magento/module-directory/etc/config.xml' and it seems to show the currencies and so forth as expected...
<default>
    <system>
        <currency>
            <installed>AZN,AZM,AFN,ALL,DZD,AOA,....and so on....</installed>
        </currency>
    </system>
    <currency>
        <options>
            <allow>AZN,AZM,AFN,ALL,DZD,AOA,....and so on....</allow>
            <base>USD</base>
            <default>USD</default>
        </options>
</default>

I have other Magento2 sites, but I can't figure out how I might "harvest" the currencies from existing databases and "install" them in this particular instance. Looking at the XML above, it seems that the currencies are listed as installed already....
Where are these currencies stored? Can I just "poke" records into the database to include the missing currencies? How do I add/restore currencies to the Allowed Currencies selection box?


texts: Search is not working in magento 1.9.2.2

texts:
When i am trying to search any product name in mobile rwd theme then i am getting the below error.

  Fatal error: Call to a member function getId() on a non-object in /home3/wowdeals/public_html/app/design/frontend/rwd/rwd-ariel/template/catalog/product/list.phtml on line 51

Here is a piece of code:

<?php
$_category = Mage::registry('current_category');
$currentCategoryId= $_category->getId();
// echo $currentCategoryId;

$_productCollection = Mage::getModel('catalog/product')
->getCollection()
->addAttributeToSelect('*')
->addCategoryFilter($_category)
->setOrder('price', 'ASC')
->load();
?>

Kindly help me.


texts:
There is an array of category ids i.e. array(18,19,25);

I want to get those products which has all these categories from above array. Product should present in 18,19 and 25.

Array values can be anything i.e. category ids.


texts: minicart customization from default html

texts:
i wrote this code in default.html
app\design\frontend\Smartwave\grocery\Magento_Checkout\web\template\minicart\item\default.html

<div data-bind="text: wahaj">gg  </div>

but i am confuse where i write this js

function AppViewModel() {
            this.wahaj = ko.observable("ko run ");
                 }

  ko.applyBindings(new AppViewModel());
</script>


texts: Lot of my tagged pages in magento have good search engine rankings, but I am getting a low click-through rate for them. Is it possible through any extension or code snippet that few of my tagged pages has meta-description in them that shows in search engines.


texts: magento change add to cart from category custom design

texts:
how can i modify add to cart page from admin > custom design update.

Basically i want to add custome block next to add to cart button based on current category products ,

as of now it loads

frontend\themename\template\catalog\product\view\addtocart.phtml

but i want to override it with other based on current category how can it be done .

Please guide me with same

i tried using below code in category > custom design (with apply to products)

<catalog_product_view>
    <reference name="product.info.addtocart">
        <action method="setTemplate">
            <template>catalog/product/view/a.phtml</template>
        </action>
    </reference>
</catalog_product_view>


texts: Not able to get file when i m try to use export

texts:
Using magneto(2.3.3)
When try to Export csv file then getting message
"Message is added to queue, wait to get your file soon"
how long i have to wait?


texts:
From few days I will trying to figure out strange issue. My cart shows empty ONLY on home page, for each other page shows count good.

What is wrong?


texts:
I have noticed the default behavior of Magento is to mark the order as complete once the invoice is generated & shipment is made. In my case, I don't want the order to be marked as complete, I want the order to be marked as "Shipping Processing"  I was able to do it by creating a new status ( Processing shipping ) & assigning it to "Complete" order state. Now when an order is invoiced & shipped it assigns the new status as desired ie "Processing shipping", but now I am NOT able to mark the order as complete, I need to at the end move the order to complete.
                 My guess, I have assigned my custom order status to the wrong state, ie ( Processing shipping to complete ) hence the system is treating the order as "Complete".
                 This is how we fulfill orders:

Pending ( New Orders )
Processing ( Generate Invoice & Send
out shipping )
Processing Shipping ( Track the shipping )
Complete ( Mark the order as complete )

We are stuck between 3 & 4.


texts: configurable Parent Product set "Stock Availability" set auto magento-1.9

texts:
I would like to do if any Child product has status "in-stock" parent status auto update "in-stock". else parent configurable product status update "out-stock". anyone can help me how can I do it with programming ?
Thanks in advance.


texts:
I've this same behaviour Grand Total not updated when discount code is applied but not always...
sometime, when I apply discount coupon, the grand total cart, not update and when I go to pay (redsys), redsys says me that I've to pay the total without discount...
Magento 2.3.5


texts: Get order collection past one hour completed orders magento 2

texts:
How to add filter last past one-hour completed orders collection in Magento 2?
  $searchCriteria = $this->searchCriteriaBuilder
        ->addFilter('is_process', $isprocess)
        ->addSortOrder($this->sortBuilder->setField('entity_id')
            ->setAscendingDirection()->create())
        ->setPageSize(3)->setCurrentPage(1)->create();

    $fromDate = date('Y-m-d H:i:s', strtotime('-1 hour'));
    $toDate = date('Y-m-d H:i:s');

    $ordersList = $this->orderRepository->getList($searchCriteria);
    $ordersList->addFieldToFilter('created_at', array('from' => $fromDate, 'to' => $toDate));

    return $ordersList;


texts: How to set a specific category page as homepage in Magento 2

texts:
I tried to set as a homepage a specific category page but only for a storeview, but I am not sure how to do this.

I have 2 store views and for one of these, I want to set particular category page as homepage.

Does anyone know how to do this?


texts: Extend template (phtml) and add item in magento 2

texts:
a question:

How to add an item using a template (phtml) in magento 2


texts: Magento 1.9 checkout missing contact number from Paypal Orders

texts: When our customers pay via paypal express checkout their contact number is not flowing through to the checkout and thus not on the Order emails, I have to go to Paypal itself to get the customers contact number?


texts: Magento 2 to avoid special price for b2b customer

texts:
I have used magento 2.3.1 enterprise edition.

I need to restrict the special price for b2b customers ( either to all the b2b customers or specific customer groups).

But for B2C customers, I need to allow the special price.

Thanks in advance.


texts: Edit text "No Payment Information Required"

texts:
In the Checkout Onepage section of the billing I have a payment switch method
a (button) Pay Pal or b) No Payment Information Required
I need to translate (Dutch) the text of No Payment Information Required.
I tried a nl_NL page and several Mag files, no result.
Can someone shine a light please


texts: how i can create pricing tab add to cart url?

texts:
How I can create pricing tab add to cart url ?

I have create 1 product for add to cart url and my product id is 86
and my Purchase Button url is /checkout/cart/add/product/id/86
but when I click to button my cart show no product in cart
please tell me how I can create add to cart button url ?


texts:
I need to change the qty being inserted as I am using a third party for some products which annoying inserts 1 into the db everytime.

Where can I find all the relevant files for inserting into the sales_quote_item table


texts: Magento 2.2.5: Add, Update and Delete existing products Custom Options

texts:
I am working on updating custom options of an existing product programatically when admin click product save button -

I have done below code to full fil my desire -

app/code/Namespace/Module/etc/adminhtml/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">

    <!-- Admin Product Before save -->
    <event name="catalog_product_save_before">
        <observer name="catalogProductSaveBefore" instance="Namespace\Module\Observer\Admin\catalogProductSaveBefore" />
    </event>
</config>

app/code/Namespace/Module/Observer/Admin/catalogProductSaveBefore.php

<?php
namespace Namespace\Module\Observer\Admin;
use Magento\Framework\Event\ObserverInterface;

class CatalogProductSaveBefore implements ObserverInterface
{
    protected $productRepository;

    protected $productCustomOptionInterface;

    public function __construct(
        \Magento\Catalog\Model\ProductRepository $productRepository,
        \Magento\Catalog\Api\Data\ProductCustomOptionInterface $productCustomOptionInterface
    ){
        $this->productRepository = $productRepository;
        $this->productCustomOptionInterface = $productCustomOptionInterface;
    }

    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $product = $observer->getEvent()->getProduct();
        if($product->getSubscriptionDisplayCalendar()){
            $found=0; //0 if Custom Option not Found
            if($product->getOptions()){
                foreach ($product->getOptions() as $opt){
                    if($opt->getTitle()=='Delivery'){
                        $found=1; // if Custom Option Found
                        break;
                    }
                }
            }

            if(!$found){ //if Not Found then create a new one
                $customOptions = array();
                //Add New Custom Option not already exists
                $this->productCustomOptionInterface->setTitle('Delivery')
                                                ->setType('date')
                                                ->setIsRequire(true)
                                                ->setSortOrder(1)
                                                ->setPrice(0.00)
                                                ->setPriceType('fixed')
                                                ->setMaxCharacters(50)
                                                ->setProductSku('');

                $customOptions[] = $this->productCustomOptionInterface;
                $product->setOptions($customOptions);
            }

        } else {
            if($product->getOptions()){
                foreach ($product->getOptions() as $opt){
                    if($opt->getTitle()=='First Delivery'){
                        $opt->unsetOptions();
                        break;
                    }
                }
            }
        }
    }
}

The above code should work , but its showing error, I also try to save product here but it hangs system.

Anyone has gone through like above condition?
Still looking for update.


texts: static attribute not handled by csv importer

texts:
I created a static product attribute with corresponding source model:

/* @var $installer Mage_Catalog_Model_Resource_Setup */
$installer = $this;
$installer->startSetup();
$installer->getConnection()->addColumn(
    $installer->getTable('catalog/product'), 'my_attribute', array(
        'type'    => Varien_Db_Ddl_Table::TYPE_INTEGER,
        'comment' => 'Delivery Point ID'
    )
);
$installer->getConnection()->addIndex(
    $installer->getTable('catalog/product'),
    $installer->getConnection()->getIndexName(
        $installer->getTable('catalog/product'), array('my_attribute',)
    ),
    array('my_attribute')
);

$installer->endSetup();

$installer->addAttribute(
    Mage_Catalog_Model_Product::ENTITY,
    'my_attribute',
    array(
        'group'                   => 'General',
        'sort_order'              => 20,
        'type'                    => 'static',
        'label'                   => 'My Attribute',
        'input'                   => 'select',
        'source'                  => 'my_module/entity_attribute_source_mysource',
        'global'                  => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
        'visible'                 => true,
        'required'                => true,
        'user_defined'            => false,
        'visible_on_front'        => true,
        'unique'                  => false,
        'is_configurable'         => false,
        'used_in_product_listing' => true,
    )
);

From the admin panel everything works fine, but when I use the csv import, no data is written to the column my_attribute in catalog_product_entity table.

Here is the csv:

sku,_store,_type,_attribute_set,name,description,short_description,my_attribute,status,visibility,weight,price,tax_class_id,_product_websites
test,,simple,Default,Test,Test,Test,"My Value",1,4,0,0,0,base

The source model gives the correct values, otherwise the validation of the csv file would fail.

Is this case supported by the Mage_ImportExport module at all?


texts:
I want to magento default menu in my other phtml file. how to call it?

I didn't found any code for menu please help me.

Thanks


texts: Upgraded Magento 1.7x to 1.9.1 - categories/products give "Internal Server Error"

texts:
I have checked compilation is disabled, cache is clear, re-indexed, turned on development mode (I get no errors). Disabled MageWorx SEO, set the theme/package to default.

The site will load for example, the account login/register page/ the home page, and a few other pages. However, the site will not load categories/products.

Guessing this is a rewrite issue? Any ideas why this would happen after an upgrade?


texts: Magento 1.9 attribute value doesn't show up in order confirmation

texts:
I'm trying to display a custom attribute value in the order confirmation email. Tried it with multiple codes and settings, but the only thing I can manage to show is NULL.
It's about a configurable product. The 'parent' product doesn't have the attribute 'leveranciersnummer' filled in. The child products do. Here's the configuration of my custom attribute:
https://ibb.co/GTwzG6p
In the order confirmation email template (default.phtml) (/template/email/order/items/order), I added:
$leverancier = Mage::getModel('catalog/product')->load($_item->getProduct()->getId())->getLeveranciersnummer();
But when I echo that, it just displays NULL. It's clearly filled in when I look into the edit product page of the product SKU from the order confirmation email. If I display a var_dump of the $_item->getProjectId, I get a bunch of information, but my custom attribute 'leveranciersnummer' isn't there.
I also tried using:
$productcolor = $_item->getProduct()->getAttributeText('leveranciersnummer');, but that didn't work either. That doesn't even display NULL, that just leaves me with nothing.
In the backoffice, I tried setting 'Zichtbaar op productpagina's op frontend' to Yes too, and reindexed. But that neither did work.
Can somebody please point me into the right direction?
Am I forgetting something very simple?
Thanks in advance.


texts: Import only the products from magento 1.9 to Magento 2.1.8

texts: I am creating a new site with Magento 2.1.8. I need to import only the products from an old site that is running on Magento 1.9. I want my old site to still be fuctional even after copying the product data. Please help!


texts: Error during compilation in magento2 .3 Incompatible argument type: Required type:

texts:
Webkul\Marketplace\Model\Order\Pdf\Creditmemo
Incompatible argument type: Required type: \Magento\Store\Model\App\Emulation. Actual type: \Magento\Framework\Locale\ResolverInterface; File:
/var/www/html/app/code/Webkul/Marketplace/Model/Order/Pdf/Creditmemo.php
Webkul\Marketplace\Model\Order\Pdf\Shipment
Incompatible argument type: Required type: \Magento\Store\Model\App\Emulation. Actual type: \Magento\Framework\Locale\ResolverInterface; File:
/var/www/html/app/code/Webkul/Marketplace/Model/Order/Pdf/Shipment.php
    Webkul\Marketplace\Model\Order\Pdf\Invoice
            Incompatible argument type: Required type: \Magento\Store\Model\App\Emulation. Actual type: \Magento\Framework\Locale\ResolverInterface; File:

/var/www/html/app/code/Webkul/Marketplace/Model/Order/Pdf/Invoice.php


texts: Edit Payment Method after Invoice is created (Magento CE 1.9)

texts:
is there an extension or way to change the payment method after an order is completed or invoiced?

We want to process our invoices to our tax consultants and they do some automated stuff with it (compare paypal account exports to orders with paypal as payment method...), but some of our invoices have errors, e.g. because the customer ordered with bank pre-payment but pays at our local store (and some other constellations) so I have to correct the payment method.

Is there any way to correct these things, even if the order is completed?

I've had a look at https://www.iwdagency.com/extensions/magento-edit-order-manager.html but it creates a new invoice number for every change (and I didn't get behind, if it cancels the old invoice) so its not perfectly what I need.


texts:
Background:

My e-commerce is available for logged customers only
Each customer has different product prices because different discounts are applied.
Products prices have to been calculated on fly based on current customer's discounts.
Full Page Cache will be enabled

How to implement the pricing so that they are not being cached?

My idea is using Knockout: send product id and customer id to API service which will calculate price and send back to JS Component. Make sense?

Thanks


texts: Magento 2: Change on widget template not applied to frontend

texts:
I'm currently working with Magento2 (I'm an absolut beginner with this) and I need to adjust the template of a widget to my requirements. So I found the appropiate .phtml file used by that widget and added a simple div to see where this will get rendered (note that there is only one template file in the whole widget).

Unfortunately, this little change is not applied on the frontend. Things I did so far:

Flushing Magento Cache (both from backend, as well as from commandline, although there should be no difference)
Clearing Magento Cache (see above)
Manually removing the var/cache directory
Deploying the static content from commandline
Related to other SO-questions I disabled my browser-cache

Neither of that worked, the added div is not displayed on the frontend. What am I missing here?


texts: How to join three tables for filteration?

texts:
I am applying filter on order collection. I am stuck in a situation, I have added a custom attribute to "customer address". that is in table "customer_address_entity_varchar", now I have to join following three tables, (1)sales_flat_order (2)sales_flat_order_address (3) customer_address_entity_varchar. In a such way as shown bellow, I know that is not right thing.

$orderCollection = Mage::getModel('sales/order')->getCollection();
            //Filter for excluding Stores
        if (!empty($excludeStoresIds)) {
            $excludeStoresIds = explode(',', $excludeStoresIds);
            $excludeStoresIds = array_map('trim', $excludeStoresIds); //Remove white spaces
            $orderCollection->getSelect()->joinLeft(array('sfoa' => 'sales_flat_order_address'), 'main_table.entity_id = sfoa.parent_id', "");
            $orderCollection->addFieldToFilter('sfoa.address_type', array('eq' => 'shipping'));
            $orderCollection->getSelect()->joinLeft(array('sfoa' => 'sales_flat_order_address','caev' => 'customer_address_entity_varchar'), 'sfoa.customer_address_id = caev.entity_id', "");
            $orderCollection->addFieldToFilter('caev.value', array('nin' => $excludeStoresIds));
        }

Here $excludeStoresIds is an array


texts: Magento Multisite links go to wrong domain

texts:
I have created a new website within my Magento (1.9.3.10)
I've created a home page and got the menu visible.
When you click on a Menu item, it links to my other website domain, showing a 404.

I have checked (and rechecked!) the Base URLs and they are all correct.

Any ideas?


texts: Magento2.2.5 How to access Magento Log file for Web API?

texts:
we use the Magento API to update our warehouse system when we receive orders and then update Magento again with inventory updates from our warehouse system. However, we recently had an order that gave the below error and we are not sure how or where to access the API error log?

"Internal Error. Details are available in Magento log file. Report
ID: webapi-5c644d10f0e26"

I have looked in var/log as well as in the var/report and I don't see any API folder or log file with API referenced in the name??
I have magento 2.2.5


texts:
Ok so i have a very strange issue with creating an order programatically in which it works perfectly fine when using freeshipping_freeshipping or a non weight based shipping method. This order saves and invoices correctly.

The issue i am having is using matrix rates as the shipping method, so i set the quote shipping address collect totals and set premium_(matrix rate name) as the shipping method, and the order throws an exception "Please specifify shipping method" this comes back to quite deep in magento core on virtual, method and rate shipping address check.

Any help in working out why the rate is always null causing this exception to be thrown would be much appreciated.

  // Start New Sales Order Quote
                $quote = Mage::getModel('sales/quote');
                //set the currency for the order to gbp even though the prices are euros
                $quote->setCurrency('GBP');
                $quote->assignCustomer($customer);
                //the below 2 are used in orer to stop quantity errors
                $quote->setIsSuperMode(true);
                $quote->setInventoryProcessed(true);
                //we dont want to bother the customer again.
                $quote->setSendCconfirmation(0);

                $billingAddress = $quote->getBillingAddress()->importCustomerAddress($address);
                $shippingAddress = $quote->getShippingAddress()->importCustomerAddress($address);

                $quote->getShippingAddress()->collectTotals();

                $shippingAddress->setCollectShippingRates(true)->collectShippingRates();

                $shippingAddress->setShippingMethod($shipping_method)->setCollectShippingRates(true);

                $quote->getPayment()->importData(array('method' => $payment_method));

                $quote->collectTotals()->save();


texts: How to move filing structure from our magento web server to windows

texts: I had a problem earlier where my images on local installation werent showing up. I found out that the problem was filing structure of our magento site. Its filing structure is case sensitive. When I copied all media over to localhost on wamp in www folder it got rid of A folder but kept a. It happened with other letters as well. Does anyone know how to get around this problem at all?


texts: Problem with product collection and configurable products

texts:
Hi i have this code:

                //shop the look product code
                $products = Mage::getResourceModel('catalog/product_collection');
                // Select which fields to load into the product
                // * will load all fields but it is possible to pass an array of
                // select fields to load
                $products->addCategoryFilter(Mage::getModel('catalog/category')->load($this->getCatId()));
                $products->addAttributeToSelect('*');
                $products->addAttributeToFilter('type_id', array('eq' => 'configurable'));
                // Ensure the product is visible
                $products->addAttributeToFilter('visibility', array('neq' => 1));
                // Ensure the product is enabled
                $products->addAttributeToFilter('status', 1);
                $products->addAttributeToFilter('featured_products', 'si');
                $products->getSelect()->limit(1);
                // Load the collection
                $products->load();

it will take all products from the passed catedory id with a filter on featured_products.
it works fine but only with simple products, it don’t load configurable products from the category!!

it’s a magento bug i think, there is a solution to retrive configurable products too?


texts: Using Quote Repository creates a new row after save

texts:
So I am trying to get to grips with Magento 2's new way of handling data using service contracts.

I have the following code:

$formData = [
    'quoteId' => '',
    'purchaseOrderNumber' => '',
    'dispatchDate' => '',
    'campaignId' => '',
    'specialInstructions' => ''
];

$formData = $this->getRequest()->getPostValue();

$quoteId = $formData['quoteId'];

$quote = $this->quoteRespository->get($quoteId);

// This shows the correct ID
$this->logger->addDebug(print_r($quote->getId(), 1));

// This shows nothing
$this->logger->addDebug(print_r($quote->getData(), 1));

$dispatchDate = date('Y-m-d', strtotime($formData['dispatchDate']));

$quote->setData([
    'purchase_order_number' => $formData['purchaseOrderNumber'],
    'campaign_id' => $formData['campaignId'],
    'dispatch_date' => $dispatchDate,
    'special_instructions' => $formData['specialInstructions']
]);

// This only contains the info in the setData() call above
$this->logger->addDebug(print_r($quote->getId(), 1));

$this->quoteRespository->save($quote);

$quoteId is definitely correct. However, if I don't add entity_id => $quoteId to the array in setData(), it creates a brand new row in the quote table! This seems like really strange behaviour.

Can anyone help me out with what is going on and/or what I might be doing wrong?

Using Magento 2.1.5.


texts: Magento 2 : sales_order_place_before Observer Event does not stop payment from proceeding

texts:
I am trying to stop a payment from proceeding if a certain test is not met; the user should then be redirected back to the checkout page with an error message.

I am able to key into the event using

  sales_order_place_before

However, although I am able to revert the person back to checkout page , i am not able to stop the purchase going through.

  here is my code:

the DI

  app/code/Test/Module/etc/webapi_rest/events.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">

    <event name="sales_order_place_before">
       <observer name="order_place_before" instance="Test\Module\Observer\BeforePurchaseValidateAvailability" shared="false" />
    </event>
</config>

The Class

  /code/Test/Module/Observer/BeforePurchaseValidateAvailability

public function __construct(
        \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
        \Magento\Framework\Message\ManagerInterface $messageManager,
        \Magento\Framework\App\ResponseFactory $responseFactory,

        \Magento\Checkout\Model\Cart $cart,
        \Psr\Log\LoggerInterface $logger,
        \Magento\Directory\Model\Currency $currency,
        EventDome  $eventDomeHelper,
        \Magento\Framework\App\RequestInterface $request,
        \Magento\Framework\UrlInterface $url
    ) {
        $this->_cart = $cart;
        $this->_url = $url;
        $this->_logger = $logger;
        $this->_currency = $currency;
        $this->_request = $request;
        $this->_scopeConfig = $scopeConfig;
        $this->_messageManager = $messageManager;
        $this->_eventDomeHelper = $eventDomeHelper;
        $this->_responseFactory = $responseFactory;
    }

    /**
     * @param \Magento\Framework\Event\Observer $observer
     * @return void
     */
    public function execute(Observer $observer)
    {

       try {

            $writer = new \Zend\Log\Writer\Stream(BP.'/var/log/stackexchange.log');
            $logger = new \Zend\Log\Logger();
            $logger->addWriter($writer);
            $logger->info("success !!!!  Before Purchase Validate  !!!");

            $message = 'it does not work';
            $this->_messageManager->addError($message);

            $checkOutUrl = $this->_url->getUrl('checkout/cart/index');
            $this->_responseFactory->create()->setRedirect($checkOutUrl)->sendResponse();
            return $this;
            die();

        } catch (\Exception $exception) {
            \Magento\Framework\App\ObjectManager::getInstance()->get('Psr\Log\LoggerInterface')->critical($exception);
        }
    }

The issue:

How do you use an observer to stop a payment from going through ?


texts:
I am using magento 1.7.2 version i am working on payment gateway a strange problem. please help me to out this problem here is following my config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Infeenty_InfeentyInvoice>
            <version>1.0.0</version>
        </Infeenty_InfeentyInvoice>
    </modules>
    <global>
        <models>
            <infeentyinvoice>
                <class>Infeenty_InfeentyInvoice_Model</class>
            </infeentyinvoice>
        </models>
        <resources>
            <infeentyinvoice_setup>
                <setup>
                    <module>Infeenty_InfeentyInvoice</module>
                    <class>Mage_Eav_Model_Entity_Setup</class>
                </setup>
                <connection>
                    <use>core_setup</use>
                </connection>
            </infeentyinvoice_setup>
            <infeentyinvoice_read>
                <connection>
                    <use>core_read</use>
                </connection>
            </infeentyinvoice_read>
            <infeentyinvoice_write>
                <connection>
                    <use>core_write</use>
                </connection>
            </infeentyinvoice_write>
        </resources>
        <blocks>
            <infeentyinvoice>
                <class>Infeenty_InfeentyInvoice_Block</class>
            </infeentyinvoice>
        </blocks>
        <helpers>
            <infeentyinvoice>
                <class>Infeenty_InfeentyInvoice_Helper</class>
            </infeentyinvoice>
        </helpers>
   </global>
   <default>
        <payment>
            <infeentyinvoice>
                <model>infeentyinvoice/infeentyinvoice</model>
                <countries>SE,DE,NL</countries>
                <order_status>pending</order_status>
                <title>Infeenty Invoice</title>
                <active>1</active>
                <payment_action>authorize</payment_action>
            </infeentyinvoice>
        </payment>
        <payment_action>authorize</payment_action>
    </default>
    <adminhtml>
        <translate>
            <modules>
                <Infeenty_InfeentyInvoice>
                    <files>
                        <default>Infeenty_InfeentyInvoice.csv</default>
                    </files>
                </Infeenty_InfeentyInvoice>
            </modules>
        </translate>
    </adminhtml>
    <frontend>
        <routers>
            <infeentyinvoice>
                <use>standard</use>
                <args>
                    <module>Infeenty_InfeentyInvoice</module>
                    <frontname>infeentyinvoice</frontname>
                </args>
            </infeentyinvoice>
        </routers>
        <translate>
            <modules>
                <Infeenty_InfeentyInvoice>
                    <files>
                        <default>Infeenty_InfeentyInvoice.csv</default>
                    </files>
                </Infeenty_InfeentyInvoice>
            </modules>
        </translate>
    </frontend>
</config>

strange issue might be did something wrong in this xml when i use
$this->getLayout()->createBlock('infeentyinvoice/form') then its always return false

i have create block file Form.php under Infeenty/InfeentyInvoice/Block and class is Infeenty_InfeentyInvoice_Block_Form but still i am not getting this block work


texts:
I have used it as a fix for a few things but I feel as though I will never truly comprehend the issues until I understand what setup:upgrade is doing w/ the files behind the scenes.
I've gone through A LOT of the docs on the magento website but none of them really answer what this command does, only specific situations to use it in combination with other commands.

Here is what I am curious about:
What does setup:upgrade do?
What are some scenarios where a person would use it?
Are there any circumstances in which someone should not use it?

Please explain this as thoroughly as possible.

Thank you.


texts: Fetch order id those order item consist blank values for (product_is,sku,price) in Magento 1

texts:
How to create a script that returns the order id's
of order having products with blank details such as (sku,price,id) ?
Any thoughts ?


texts: Magento 2: When should we use a ProductRepository, ProductFactory, Product model?

texts:
When should we use a ProductRepository, ProductFactory, Product model?

vendor/magento/module-catalog/Model/Product.php

vendor/magento/module-catalog/Model/ProductRepository.php

generated/code/Magento/Catalog/Model/ProductFactory.php

Example would be more descriptive.


texts: bundle product with fixed price and special price percent does not work with catalogue price rules

texts:
I have a bundle product with the following set:

fixed price of $300
special price 90%

When I create a catalogue price rule of 10% off all products I would expect the product price to be less than $270 (but it is not) - the special price of the bundle and the catalogue price rule discount.

Is this a bug in magento? and if so is there anyway to fix this or setup my price rule differently?

EDIT

In fact this seems to be a wider issue where catalogue price rules do not apply to any special prices. I guess this is something to do with catalogue price rules applying to "percentage of the original price".

Can I setup magento's config to calculate both special price and catalogue price rule across all product types?


texts:
I have recently installed magento in my system.

Default url for magento when I installed was localhost/magento.
It was working fine and I have designed my website then I wanted to change my url name
I have logged into localhost/magento/admin
in settings/store/configure I changed web url to https://buyme/
after I changed the url I saved the config from then the site is not opening

I am new to Magento and am not able to rectify this issue
Please someone help me.

Thank You.


texts: Magento 2 - Theme Type 0:physical, 1:virtual, 2:staging. When to use?

texts:
In the theme table there is a type field with 3 possible values: physical, virtual and staging.

When to use physical virtual and staging theme?

When I extended luma theme my new theme appear in theme table as virtual type. But looks like this type doesn't allow overriding some files, and only changing theme type from virtual to physical let me extend for example Magento_Theme package.


texts:
I have two shopping cart rules :-
Spend $100 Save $30 (priority = 0, Stop Further Rules Processing = "YES")
Get 15% off using coupon "get15" (priority =1 , Stop Further Rules Processing = "NO")
Currently using "get15" as coupen in cart,
overides "Spend $100 Save $30" rule.
How can i prevent "get15" rule to be applied when "Spend $100 Save $30" is applied.
Note :- "Spend $100 Save $30" is applied automatically based on total.
Any thoughts on this ?
Thanks


texts: Add a product to cart in checkout cart page?

texts:
Would it be possible to add a button in checkout cart page to add a product to cart?

That product would always have the same SKU and would be dynamically created. By dynamically I mean that the price would depend on the product it is being added to (I guess I could just pass the SKU of the product it is being addded to in a URL of a button or form).

Any ideas or suggestions on how to make this work?


texts: Getting Configurable Options to Show for Related Products

texts:
A the title suggests, I am trying to get configurable product options to show for products in the upsell and related products lists on the product view page.

So far, Google has come up empty handed so am turning to you, the Magento pro community, for assistance.

I don't have much of a list of things I have tried as I have no idea where to start. However, I have copied over the vendor/magento/module-catalog/view/frontend/templates/product/list/items.phtml file into my own theme, turned on the 'add to cart' buttons and played around a little.

Any help would be great! Please come through for me, people!


texts: How to install sm_market theme in magento 2.3.6

texts: How to insatll sm_market theme in magento2.3.6. I want to install it manually.


texts: Magento2 Configurable product options not showing after data migration

texts:
After migration from Magento 1.9.3.6 to 2.3.5-p1 (also tested on 2.3.3, 2.3.4) the associated products for configured items are not available.
First off, color is not added to attribute set "Default" or any others. It was correctly added in Magento 1.
After adding the attribute to the attribute sets, I face the following problems.
When editing the configurable product:

color and size are required to be selected as if they are not being used for configurable options.
all associated simple products are missing from the list

I checked the database to verify the tables catalog_product_super_attribute and catalog_product_super_link, all the links seem to be there and look correct.
It seems as though the configurable product does not know which attributes are being used for configurations, but all the data is correctly there in catalog_product_super_attribute and catalog_product_super_link.
Has anyone else experienced this problem? Does anyone know a fix for this?


texts: Widget Display Options in Magento2 - select all subcategories of category in one click

texts: Is it possible to select all subcategories of category with one click only ? I want to display my widget on category and all subcategories of this category. At this moment I must select every subcategory manually.


texts: When transferring data through $customerSession, I receive data locally, but not on the production

texts:
I have a custom functionality for creating an order, I want to transfer the custom LastOrderId to the success page to which the user gets after submitting the form.

The controller responsible for submitting the form returns a redirect
app/code/Qq/Www/Controller/Order/Create.php

return $resultRedirect->setPath('dv_sample/success');

The controller responsible for rendering the success page
app/code/Qq/Www/Controller/Success/Index.php

class Index extends \Magento\Framework\App\Action\Action
{
    private $pageFactory;

    protected $customerSession;

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

    public function execute()
    {
        if (!$this->customerSession->getLastSampleRealOrderId()) {
            /** @var \Magento\Framework\Controller\Result\Redirect $resultRedirect */
            $resultRedirect = $this->resultRedirectFactory->create();
            return $resultRedirect->setPath('building-bed-page');
        }
        return $this->pageFactory->create();
    }
}

Block app/code/Qq/Www/Block/Success.php

    protected $customerSession;

    public $_storeManager;

    public function __construct(
        Template\Context $context,
        \Magento\Customer\Model\Session $customerSession,
        array $data = []
    ) {
        $this->customerSession = $customerSession;
        parent::__construct($context, $data);
    }

    public function lastSampleRealOrderId()
    {
        $incrementOrderId = $this->customerSession->getLastSampleRealOrderId();

        if ($incrementOrderId) {
            $this->customerSession->setLastSamleRealOrderId(null);
        }

        return $incrementOrderId;
    }

Template app/code/Qq/Www/view/frontend/templates/success/index/success_page.phtml

After submitting the form locally, I get a saxest page in which I see all the data including the ID order. <?= $block->lastSampleRealOrderId() ?>

But after uploading to the server, the order is not visible, data does not come


texts: tag free shipping image on the image of my simple products

texts: I need to tag a free shipping label or ribbon on the image of all my products in Magento Community 1.9; all my products have free shipping and its really important to show free shipping image or tag on all the products on the front end of my website.


texts: how to solve configurable product image adapter error in magento 2.2.6

texts:
I'm getting error in magento2.2.6 on frontend  for configuration type product

Exception #0 (InvalidArgumentException): Image adapter for 'SLGD2NEW' is not setup.
also command not working bin/magento catalog:images:resize same error throwing

I'm surprised that error not got for simple product type on frontend


texts: When and how are phtml templates generated in view_preprocessed?

texts:
I see lots of phtml files generated in var/view_preprocessed/html, from core modules as well as from custom modules. It looks like these are all used templates with stripped whitespace.

Alan Kent wrote in How do I update Magento 2 phtml files in Grunt?:

  You don't "deploy" PHTML files. They are referenced by blocks in layout files and processed on the server side. So "grunt" is not relevant here, and the static content deployment is similarly not relevant.

And when analyzing the static content deployment and grunt workflow I did not find anything related to templates, so I guess this still holds true.

But when are these files generated? And what is actually happening there and why?


texts: Magento 2 Cron runs for an hour on Kubernetes

texts:
When running Magento crons on Kubernetes (or even Docker), the cron never ends.
Running magento cron:run every minute, but it takes an hour. And there is no error.
What could be the error?


texts: How to set default configuration values for each store view

texts:
I have a configuration field which I am using to store email template value. I am assigning default email template id using config.xml file. This works perfectly fine for defaut store view.
Now, I have an arabic store view which has rtl email templates. I have created separate email template for rtl layout with specific id. I want to assign rtl email template to my rtl store view using config.xml file. Is there any way to achieve it? How can I set default email template for a specific store view?


texts: In Magento 2, Set base image as small image

texts: I have nearly 40k products and all images have been set to small only. If I go into the backend and then set each image one by one to the base, it will take me forever. Is there any way to do it via the database?