texts:
I want to call the Layered Navigation in my /catalog/product/list.phtml, so I used

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

Here is how my catalog.xml looks like:

<catalog_category_layered translate="label">
    <label>Catalog Category (Anchor)</label>
    <reference name="root">
        <block type="catalog/layer_view" name="catalog.leftnav" as="customFilterNav"  template="catalog/layer/view.phtml"/>
    </reference>
    <reference name="content">
        <block type="catalog/category_view" name="category.products" template="catalog/category/view.phtml">
            <block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">
                <!-- <action method="addReviewSummaryTemplate"><type>default</type><template>review/helper/su.phtml</template></action> -->
                <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
                    <block type="page/html_pager" name="product_list_toolbar_pager"/>

                </block>
                <action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
                <action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></action>
                <action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>4</count></action>
                <action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action>
                <action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action>
                <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
            </block>
        </block>
    </reference>
</catalog_category_layered>

Layered Navigation is set active for this category in the Magento Backend. Why doesn't it show anything? Do I have to set up another thing?


texts: M2 decrease inventory account on processing only

texts:
Right now our inventory is decreased even for pending orders (which never get's paid for), and you get the low stock emails when it goes below 1.
Is there any way to only decrease item stock qty when the customer for paid (processing) orders?


texts: Magento 2 remove class required in edit.phtml

texts:
I have problem with postcode field in magento 2. Somewhere magento remove class required from

        <?php /* @escapeNotVerified */ echo __('Zip/Postal Code') ?>

            <input type="text" name="postcode" value="<?php echo $block->escapeHtml($block->getAddress()->getPostcode()) ?>" title="<?php /* @escapeNotVerified */ echo __('Zip/Postal Code') ?>" id="zip" class="input-text validate-zip-international <?php /* @escapeNotVerified */ echo $this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('postcode') ?>">

When i added class 'test' i see this, but required is removed somewhere. Do you have any hint? In database I update eav_attribute postcode (I set is_required= 1)

edit: I find solution. Problem was in getCountriesWithOptionalZip(). Now zip code is required, but not validate postcode by country. Any hints?


texts: Magento "Reset Filter" in admin grid not working in "Bundle Items" and "Associated Products" tabs

texts:
I am working on Magento ver. ce-1.9.1.0 and I have made some major customizations in Product's custom options Block file and also created couple of custom product types based on Simple product type.

The issue I encounter now is whenever I create a "Bundle Product" & "Grouped Product" in admin and then if I go to "Bundle Items" tab or "Associated Products" tab respectively and press "Reset Filter" button then it shows "No records found", eventhough, I have created one simple product and it is working in frontend.

Could this be due to custom product types I have created, though I have disabled the module and checked but still same erroroneous situation.
The "Reset Filter" function for "Related", "Upsell" & "Cross-sell" product tabs is working fine.

Need some guidance as to how "Reset Filter" fetches simple products list for "Bundle" & "Grouped" products & what could be triggering the issue.


texts: Magento 1 - How to exclude column data from export csv file?

texts:
I want to exclude Email and Billing Telephone columns data from orders export csv file for specific user. I am using Rave Infosys Order Import / Export extension.
These columns data should be empty for specific user.

Thanks


texts:
I want to upgrade Magento. Therefor I first want to transfer the live production system to a development workspace. I am trying to import the production database into a clean database. But I can't get it imported correctly. I have tried several options: exporting via Magento admin, exporting via phpMyAdmin with different settings including (and excluding) the statements as shown at http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/restoring_a_backup_of_a_magento_database

I am using Magento 1.5.1.0, phpMyAdmin 4.0.8 and the latest version of BigDump to import.

This is the error I receive after a while:

  Error at the line 8699: ADD CONSTRAINT FK_CATALOG_CATEGORY_ENTITY_DATETIME_STORE FOREIGN KEY (store_id) REFERENCES mage_core_store (store_id) ON DELETE CASCADE ON UPDATE CASCADE;
  Query: ALTER TABLE mage_catalog_category_entity_datetime
  ADD CONSTRAINT FK_CATALOG_CATEGORY_ENTITY_DATETIME_ATTRIBUTE FOREIGN KEY (attribute_id) REFERENCES mage_eav_attribute (attribute_id) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT FK_CATALOG_CATEGORY_ENTITY_DATETIME_ENTITY FOREIGN KEY (entity_id) REFERENCES mage_catalog_category_entity (entity_id) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT FK_CATALOG_CATEGORY_ENTITY_DATETIME_STORE FOREIGN KEY (store_id) REFERENCES mage_core_store (store_id) ON DELETE CASCADE ON UPDATE CASCADE
  MySQL: Cannot add or update a child row: a foreign key constraint fails (goldenm101_mage4.#sql-182e_c1d79, CONSTRAINT FK_CATALOG_CATEGORY_ENTITY_DATETIME_STORE FOREIGN KEY (store_id) REFERENCES mage_core_store (store_id) ON DELETE CASCADE ON UPDATE CASC)'

Additional information: I don't have SSH access.

Error after the possible solution of mageUz:

  Error at the line 1487637: ADD CONSTRAINT FK_catalogrule_product_website FOREIGN KEY (website_id) REFERENCES mage_core_website (website_id) ON DELETE CASCADE ON UPDATE CASCADE;
  Query: -- --
  ALTER TABLE mage_catalogrule_product
  ADD CONSTRAINT FK_catalogrule_product_customergroup FOREIGN KEY (customer_group_id) REFERENCES mage_customer_group (customer_group_id) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT FK_CATALOGRULE_PRODUCT_PRODUCT FOREIGN KEY (product_id) REFERENCES mage_catalog_product_entity (entity_id) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT FK_catalogrule_product_rule FOREIGN KEY (rule_id) REFERENCES mage_catalogrule (rule_id) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT FK_catalogrule_product_website FOREIGN KEY (website_id) REFERENCES mage_core_website (website_id) ON DELETE CASCADE ON UPDATE CASCADE
  MySQL: Cannot add or update a child row: a foreign key constraint fails (goldenm101_mage4.#sql-182e_308afa, CONSTRAINT FK_catalogrule_product_customergroup FOREIGN KEY (customer_group_id) REFERENCES mage_customer_group (customer_group_id) ON DELETE CASC)


texts: Observer for 'catalog_product_prepare_save' can't work

texts:
code below.
config.xml:

<?xml version="1.0"?>
<config>
    <modules>
        <Bkt_Printimages>
            <version>0.1.0</version>
        </Bkt_Printimages>
    </modules>

    <adminhtml>
        <events>
            <catalog_product_prepare_save>
                <observers>
                    <bkt_printimages_model_observer>
                        <type>singleton</type>
                        <class>Bkt_Printimages_Model_Observer</class>
                        <method>AddCoustomOptionToProduct</method>
                    </bkt_printimages_model_observer>
                </observers>
            </catalog_product_prepare_save>
        </events>
    </adminhtml>
</config>

Observer.php

<?php

class Bkt_Printimages_Model_Observer{

    public function AddCoustomOptionToProduct($observer){

        Mage::log('[bktlog] product save log');
    }
}
?>

but no log in "var/log/system.log", why? How to do that?
Some body help me, Thank you!


texts:
What folders/files are now considered core for Magento 2? As in "Don't edit these files since they can be overwritten in an update"
I need to scan a site for core overrides and I'm looking for the folders to compare against fresh install.


texts: What to do exactly? my code throw an error -> 'Call to undefined function getNodeChildrenData()'

texts:
class Ab_CategoryObserver_Model_Observer{
  public function updateTopMenuJson(Varien_Event_Observer $observer){
      $_helper = Mage::helper('catalog/category');
      $_categories = $_helper->getStoreCategories();
      $recursionLevel = '';
      $storeId = '';
      $node = '';

      $categoryTreeData = $this->getCategoryTree($recursionLevel, $storeId);
      $categoryData = $this->getNodeChildrenData($node);

      $arr = json_encode(getCategoryTree(3));
      echo "<pre>";print_r($arr);
      echo("<script>console.log('PHP: ".$arr."');</script>");
      file_put_contents("cat_node.json", $arr);
    }

    protected function getCategoryTree($recursionLevel, $storeId = 1)
    {
        $parent = Mage::app()->getStore()->getRootCategoryId();
        $tree = Mage::getResourceModel('catalog/category_tree');
        /* @var $tree Mage_Catalog_Model_Resource_Category_Tree */

        $nodes = $tree->loadNode($parent)
            ->loadChildren($recursionLevel)
            ->getChildren();
        $tree->addCollectionData(null, false, $parent);

        $categoryTreeData = array();
        foreach ($nodes as $node) {
            $categoryTreeData[$node->getData('entity_id')] = getNodeChildrenData($node);
        }

        return $categoryTreeData;
    }

    protected function getNodeChildrenData(Varien_Data_Tree_Node $node)
    {
        $categoryData = array(
          'title' => $node->getData('name'),
          'url'   => $node->getData('url_key'),
          'id'    => $node->getId(),
          'img_url'=> $node->getImageUrl(),
          // 'mega_menu1'=> $node->getData('mega_menu')
          'mega_menu'=> 'false'
        );

        foreach ($node->getChildren() as $childNode) {
          if (!array_key_exists('children', $categoryData)) {
              $categoryData['mega_menu'] = 'true';
              $categoryData['children'] = array();
          }

            $categoryData['children'][$childNode->getData('entity_id')] = getNodeChildrenData($childNode);
        }
        return $categoryData;
    }
} // End of Class
?>


texts: How to write a controller to show all brand?

texts: I am new in learning Magento 2 and I installed a module Ves Brand , now I want to create a page that show all brands I need to create a controller


texts: How to display "customer based" best sellers list?

texts:
I would like to build a custom module, for Magento 2, that will displays a list of products, from the logged in customer's, order history, and sort it by the best selling products.
(e.g. most occurrences in the orders history of that customer)


texts: Fatal error: Allowed memory size on php 5.6.3

texts:
initially good, but some time suddenly appear a message

  Fatal error: Allowed memory size of 268435456 bytes exhausted (tried
  to allocate 36 bytes) in
  D:\xampp\htdocs\celebescomputer\app\code\core\Mage\Core\Model\Store.php
  on line 234

at time save config on system-configuration


texts: How to add Google Voice Search in Magento?

texts:
How to add google voice search in magento.

Is there any api for this.


texts: How to dynamically inject block into layout using observers

texts:
I have a block class My\Extension\Block\MyClass which I want to insert into the layout. But I would not be knowing which page to insert in (will be specified by the admin), so I'm observing the layout_render_before event and in my observer class' execute method I'm doing the following

      $allowedBlock = $this->_configModel->getAllowedBlock(); // get the block name where to insert
      $allowedAction = $this->_configModel->getAllowedAction(); // get the full action name of the controller where to insert
      $layout = $this->_layout;
      $action = $this->_request->getFullActionName();
      if($allowedAction !== $action) return false; // if current page is not where to insert block, stop further processing
      $parentBlock = $layout->getBlock($allowedBlock); // get the block from the layout where to insert
      if ($parentBlock) { // if parent block exists
        $blockName = 'My\Extension\Block\MyClass';
        $blockToInsert = $layout->createBlock($blockName,'my_extensions_unique_block_name'); // create block to insert
        $parentBlock->append($blockToInsert); // insert block to parent
      }

And in my block I am setting the template like so,

public function _prepareLayout(){
    $this->setTemplate('My_Extension::subdirectory/my_template.phtml');
    parent::_prepareLayout();
}

And in my template file, I have a very simple string displayed

Hello World From Template

This exact code was working in Magento 1.9.x. The only difference was that I used the controller_action_layout_render_before event instead of layout_render_before. But the controller_action_layout_render_before was not working in Magento 2.1.x, so I used the layout_render_before event instead.

But now, my block is not visible on the frontend, even though if I write some code in my block's constructor (like echo "Hello World From Block's constructor";) it comes up on the page, meaning the block is being called, but the template is not visible on the frontend.

Considering the fact that the exact same code which was working on Magento 1.9.x, is not working in Magento 2.1.x, what am I doing wrong?


texts: How can I extend the AccountController using events rather than inheritance?

texts:
I've successfully extended the core Mage_Customer_AccountController via inheritance (using an approach very close to this one), however I'd rather use events to add my extra functionality.

In my case I need to hook in to the request before it's sent to the loginAction(), as well as before _loginPostRedirect().

So far I've found mention of an event, controller_action_postdispatch_customer_account_loginPost, which should be close to what I need for the _loginPostRedirect() hook.  I've tried finding the exact point that this event is raised to confirm, but it appears to be a dynamic event which I haven't approached before.

So, to sum up my question, which events would I need to hook into?  And if the controller_action_postdispatch_customer_account_loginPost is involved, could someone point me to intro resources on dynamic events and their dispatch?


texts: Mention all the REST APIs used to complete the order flow(i.e. From adding products to cart to successful payment by Razorpay) in magento 2.3.0

texts:
So far I have the following APIs to manage Guest Cart in Magento 2.3.0:

Create a cart.
Add items to the cart.
Delete items from the cart.
Display all items in a cart.

I have a rough idea of order flow but I don't know the exact flow of order.
Kindly mention all the APIs from beginning to end. Please mention them in sequence.


texts: Export Product Catalog to CSV (Magento 2.1.6)

texts:
I'm pretty new to Magento 2 and I'm looking for getting a product catalogue export in CSV with some attributes that are not included in the built-in export functionality of Magento (such as product ID).

I have a code I wrote for Magento 1.9 which worked perfectly and I know that catalogue and product classes in Magento 2 are totally different.

In the code I have for M1, I used the following pieces in order to retrieve the store's catalogue and products;

<?php
require_once 'app/Mage.php';
Mage::app(Mage_Core_Model_App::ADMIN_STORE_ID);
.
.
.
.
$products = Mage::getModel('catalog/product')->getCollection(); //Retreive the catalogue
foreach ($products as $product) { //loop through the products in the catalogue
$_product = Mage::getModel('catalog/product')->load($product->getId()); //get product details according to the product ID
.
.
.
.
?>

I've searched on Google for several hours in order to look for the changes that I should make in order to access the catalogue and products in M2 but haven't found any proper answer.

May anyone please explain to me how can I access this information in M2?

Thanks in advance!


texts: Magento 2: How can get value input with knockout Js?

texts:
<input type="hidden" name="test" value="test"/>

i want using ko get value of input.
my component

define([
    'Magento_Ui/js/form/form',
    'jquery',
    'jquery/ui'
], function(Component) {
    'use strict';
    return Component.extend({
        initialize: function () {
            this._super();
            // component initialization logic
            return this;
        }
    });
});


texts: Customer Registration Custom attribute value not saving in database

texts:
I was trying to add new custom attribute in customer registration. Field's value do not save in database.

Please can anyone help me?


texts: Magento 2: Schema Changes for EE Catalog Staging

texts:
Does Magento 2's "EE Catalog Staging" feature rename the entity_id column of the catalog_product_entity_datetime table to row_id?

An old client recently reached out to me to say, after upgrading to Magento 2.1.1 with the EE Catalog Staging feature, that they're seeing the following errors related to some custom code.

  Column not found: 1054 Unknown column 'main_table.entity_id' in 'field list'

and tell me their catalog_product_entity_datetime table's entity_id column is gone, replaced by a row_id column.

+--------------+----------------------+------+-----+---------+----------------+
| Field        | Type                 | Null | Key | Default | Extra          |
+--------------+----------------------+------+-----+---------+----------------+
| value_id     | int(11)              | NO   | PRI | NULL    | auto_increment |
| attribute_id | smallint(5) unsigned | NO   | MUL | 0       |                |
| store_id     | smallint(5) unsigned | NO   | MUL | 0       |                |
| row_id       | int(10) unsigned     | NO   | MUL | NULL    |                |
| value        | datetime             | YES  |     | NULL    |                |
+--------------+----------------------+------+-----+---------+----------------+

I"m (obviously) following up with my client on this one for more information -- but is this true?  Did Magento EE initiate a schema change here?


texts: magento2 decrease batch size of catalog_category_product

texts:
My site contains 10k+ products and 31 stores. I want to decrease the batch size of catalog_category_product

How can I do that?

When I try to do that, it gives me below error:

  main.WARNING: Memory size allocated for the temporary table is more
  than 20% of innodb_buffer_pool_size. Please update
  innodb_buffer_pool_size or decrease batch size value (which decreases
  memory usages for the temporary table). Current batch size: 100000;
  Allocated memory size: 9240000000 bytes; InnoDB buffer pool size:
  2147483648 bytes. [] []


texts: Show new attribute in product view.phtml

texts:
I have a new attribute 'delivered_in' and I'd like to add it to the product page in Magento. I have edited the view.phtml and added the following code:

<?php $_product->getResource()->getAttribute('delivered_in')->getFrontend()->getValue($_product);?>

When I go to the product page I can see the div and p tags are there but the attribute in between doesn't seem to be called (even though it exists within the product).

Can anyone help?

Thank you.


texts: Change order of widget catalog products list

texts:
I have a product in my product list, which must be at the top. After I have extended the product list, the product is unfortunately no longer at the top.
I add the product list via the widget catalog products list.
I thought that you could use the category sorting way for this. The product which should be at the top I have given the position 1 and the other products higher numbers. Therefore I set "Catalog -> Category" to "All Store Views" and used the following display settings:

Then I did a reindex, cleaned the cache (with rm -rf /var/cache/* and bin/magento cache:flush) and deployed it again. The order does not change, even if I change the Display Settings to e.g. "Product Name". Do you have an idea?


texts: I'm running Magento Enterprise edition with 3 stores on single domain, I would like to have an option to the user to select his desired store. i.e I'm having 3 stores based on location, i would like to ask the user to select his desired location, because my products vary from location to location. Any solution pls!!


texts:
I am have question on setting up tax in Magento ver. 1.7.0.2, My requirement is I want to add the product price including tax and it should display same price in all the pages like product view, shopping cart and checkout page. but in invoice it should show the what is the price excluding tax and tax amount and total amount including tax. but with below settings it is not working.

Example in admin I have added 890 which is including 14.5% VAT however in product listing page it shows excluding price of Rs 777.29.


texts: Magento2: plugin around method not working

texts:
I'm trying to use the plugin around method to override the execute method of \Magento\Checkout\Controller\Onepage\Success.php. I'm trying to create a module that allows you to view the checkout onepage success template by giving in an order id through the backend so the template can be viewed without having to place a new order to view additional customizations to this template. What I have so far is:

app/code/Vendor/Module/etc/di.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="\Magento\Checkout\Controller\Onepage\Success">
    <plugin name="Vendor_Plugin_Pluginname" type="\Vendor\Module\Plugin\Pluginname" sortOrder="1" />
</type>

app/code/Vendor/Module/Plugin/Pluginname.php

<?php

namespace Vendor\Module\Plugin;

use Vendor\Module\Helper\Data;

class Pluginname
{

    /**
     * Variable.
     *
     * @var Data
     */
    public $helper;

    /**
     * Construct.
     *
     * @param Data $helper helper.
     */
    public function __construct(
        Data $helper
    ) {
        $this->helper = $helper;
    }

    /**
     * Order success action.
     *
     * @return \Magento\Framework\Controller\ResultInterface
     */
    public function aroundExecute(\Magento\Checkout\Controller\Onepage $subject, $result)
    {
       $session = $subject->getOnepage()->getCheckout();
       if (!$subject->_objectManager->get('Magento\Checkout\Model\Session\SuccessValidator')->isValid() && !$this->cspHelper->viewerAccess()) {
           return $subject->resultRedirectFactory->create()->setPath('checkout/cart');
       }
       $session->clearQuote();
       //@todo: Refactor it to match CQRS
       $resultPage = $subject->resultPageFactory->create();
       $subject->_eventManager->dispatch(
           'checkout_onepage_controller_success_action',
           ['order_ids' => [$session->getLastOrderId()]]
       );
       return $resultPage;
   }
}

The first issue I ran into is that I wanted to extend \Magento\Checkout\Controller\Onepage as this contains all the methods to get the actual checkout data. But when extending this in the plugin for \Magento\Checkout\Controller\Onepage\Success it comes with the following error.

Fatal error: Class Vendor\Module\Plugin\Pluginname contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Magento\Framework\App\ActionInterface::execute) in \app\code\Vendor\Module\Plugin\Pluginname.php on line 59

After adding an empty execute method (feels weird as I override it with aroundExecute in the same file) the following error is given:

Fatal error: Call to a member function get() on null in \vendor\magento\module-checkout\Controller\Onepage.php on line 261

It seems it's missing some data as it reports null. It's the first time I'm working with the plugin functionality of Magento2 as I'm more a frontend developer. I hope someone can shed some light on this.

[EDIT]
I mixed up Preference and Plugin. I edit the code of app/code/Vendor/Module/Plugin/Pluginname.php above to be compatible with plugin but now run into the fact that one of the calls is trying to access a protected property. As discussed below this results in not being able to use the Plugin way at all as it wont allow to override protected properties. The solution is to use the Preferences way to override a class.


texts: Magento 2 customer address not showing properly

texts:
I have done migration from M1 to M2 but the customer addresses not showing properly. There are some magento variables appearing instead.

Please check below screenshot:

I got stuck with this issue from past few days. Please suggest the best possible solution.

Thanks in advance.


texts: some customers struck in checkout process

texts:
we are facing a strangest problem ever in live site.

for some registered customers [email id ], when they enter Billing address and click on "continue" button,

its not moving to the next step. Instead of this ,its coming back to the previous step.

we are using https for checkout. This is ajax response :


texts: Identifying what Magento Security Scan is flagging

texts:
I've had a warning pop up on one of my Magento sites flaging a js file and the warning "Your site contains scripts with similar behavior to typical malware code (17)". No changes have been made and it seems the scanner has recently been updated to detect something new as potentially harmful that was there before.
I have scanned my site with plenty of other security scaners (Securi, Foregenix, google and plenty more), and I have compared the files of my site for changes and manually have been through the code and I'm positive it's a false positive!
My Question
Is there a way to find out exactly what code Magento's security scan is flagging? In the case of a huge js file it is particularly time consuming only to come up against a false positive, Is the number 17 a line number or is there another scan method which will provide a more detailed report, or documentation even to drill down to what the issue is that is causing Magento' security scan tool to flag the file?


texts: Failed to read auto-increment value from storage engine catalog_product_entity_varchar

texts:
Can't add a new product and get an error.
SQLSTATE[HY000]: General error: 1467 Failed to read auto-increment value from storage engine, query was: INSERT IGNORE INTO catalog_product_entity_varchar (entity_id,attribute_id,store_id,value) VALUES (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?)
Similar issue: https://github.com/magento/magento2/issues/21890

Please help us to solve this.
Thanks


texts: When duplicating a a product by calling $_product->duplicate() the group price does not get duplicated, how can I resolve this issue?


texts:
$this->checkoutSession->getLastSuccessQuoteId()
$this->checkoutSession->getLastQuoteId()
$this->checkoutSession->getLastOrderId()
These things always returns false after payment success, so i always redirect to cart page. I search over the google and every where but not found helpful. My model file is:
vendor/magento/module-checkout/Model/Session/SuccessValidator.php
public function isValid()
    {
        if (!$this->checkoutSession->getLastSuccessQuoteId()) {
            return false;
        }

        if (!$this->checkoutSession->getLastQuoteId() || !$this->checkoutSession->getLastOrderId()) {
            return false;
        }
        return true;
    }


texts: How to Override WishList Customer Data in magento 2

texts:
i Want to Override

  Magento\Wishlist\CustomerData\Wishlist

public function getSectionData()
    {
        $counter = $this->getCounter();
        return [
            'counter' => $counter,
            'items' => $counter ? $this->getItems() : [],
        ];
    }

so in My etc\frontend\di.xml

<type name="Magento\Wishlist\CustomerData\Wishlist">
     <plugin name="wishlist" type="Vendor\ModuleName\Plugin\Wishlist" disabled="false" sortOrder="0"/>
</type>

in My

  Vendor\ModuleName\Plugin\Wishlist

class Wishlist
{

    public function afterGetSectionData(\Magento\Wishlist\CustomerData\Wishlist $subject, $result)
    {
        return [
            'counter' => 2,
            'items' => NULL,
        ];

    }
}

when i apply plugin i am not getting any wishlist Array  in mage-cache-storage


texts: Display Reviews under tabs in product view page

texts:
We are displaying tabs in product view page as below

Under Add Review tab we need to provide an option to write review for customer.

we are following this link , what i did is i added below code in catalog.xml file

<block type="catalog/product_view_tabs" name="product.info.tabs" as="info_tabs" template="catalog/product/view/tabs.phtml" >
    <action method="addTab" translate="title" module="catalog"><alias>tab_review_list</alias><title>Product Reviews</title><block>review/product_view_list</block><template>catalog/product/view/tabs/reviews.phtml</template></action>
</block>

<reference name="tab_review_list">
  <block type="review/form" name="tab_review_form" as="review_form" template="catalog/product/view/tabs/review_form.phtml" />
</reference>

and using  <?php echo $this->getChildHtml('review_form'); ? > in view.phtml file


texts: How to backup/delete all orders and customers?

texts: I need help from an extern however I don't want him to have access to the customers data. Thats why I want to delete it and after he is done, I want to load the backup. How should I do it?


texts: Move add to cart to below price (and above description) Magento 2.2.5

texts:
How can I move the add to cart button immediately below the price in Magento 2? I presume it's an XML update but I am unsure of the code required.

I want to move it from under the description to above the description.


texts: How to disable all price and transaction round off in magento

texts: I am working on magento 1.7. all price and calculation in round off. i want to disable this feature but don't get it how to disable it please help me. please see following screenshot


texts: What are the differences between a Model and a Resource model? Also what is a model and a resource model?


texts:
Magento 2 creating an auto invoice at the time of shipment getting an error on the order view page.
After successfully creating an invoice when the page redirected to order view getting an error mentioned on the image.
Email one is fine but adminhtml/session I am not getting anyone?
thanks in advance.
I am creating an invoice programmatically from the observer using
event --> "sales_order_shipment_save_after"


texts:
I have installed a module. it gives me below error.

I Have tried to increase the version to 2.0.3  then error is not showing up but the module is not working.

php bin/magento setup:upgrade

php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
php bin/magento cache:flush

Even after doing all this, this module is not working as expected.

How I can I remove the module completely from Magento and make a fresh Installation of the module.

I have tried removing the module and setup:upgrade & pasting again Code
 and setup:upgrade.

Cause this module is upgrading schema also. when I install it is not updating the Tables with new Column.


texts: What would cause a module's admin menu item not to show? How to debug?

texts:
I'm having an issue getting a custom module's menu item to show. Normally it is set to appear to the right of the System menu item in the dashboard however it is acting abnormally.

Scenario A:

I do a clean install of CE 1.9.0.1, then install the custom module and it works perfectly. Shows as intended.

Scenario B:

I attempt to install this custom module onto the client's production 1.9.0.1 website and it refuses to show. I've verified that it is registered and enabled under System > Configuration > Advanced > Advanced. I've tried clearing every type of cache both manually and through the admin panel, I've reindexed, logged out and back in dozens of times, checked error and system logs along the way and still nothing.

My assumption is that something else on the client's site has a duplicate naming convention or similar that is overwriting my custom's modules menu item presence as it works perfectly on other sites of same version.

How would I proceed with debugging? Should I be putting logging commands somewhere in my modules controllers? Is there a better way?

Thanks in advance.


texts: Validation on checkout Page in Address Field

texts:
i want to Create validation that customer cannot checkout if they Input PO BOX/Parcel Lockers on address
field how can i achieve this??


texts:
i have create controller for save data but i have not save pdf file
 so please help me how can fix this issue
Thanks!!

<?php
public function execute()
{
    $resultRedirect = $this->resultRedirectFactory->create();
    try{
        $target = $this->_mediaDirectory->getAbsolutePath('media/');

        $uploader = $this->_fileUploaderFactory->create(['fileId' => 'file']);
        $uploader->setAllowRenameFiles(true);
        $result = $uploader->save($target);
        if ($result['file']) {
            $this->messageManager->addSuccess(__('File has been successfully uploaded'));
        }
    } catch (\Exception $e) {
        $this->messageManager->addError($e->getMessage());
    }
    return $this->resultRedirectFactory->create()->setPath(
        '*/*/upload', ['_secure'=>$this->getRequest()->isSecure()]
    );
}


texts: [Solved]Cannot override Pdf/Total/Default.php model

texts:
Good morning everybody!

I have a problem trying to override the model app/code/core/Mage/Sales/Model/Order/Pdf/Total/Default.php with app/code/local/Mycompany/Sales/Model/Order/Pdf/Total/Default.php.

The thing is that when I rewrite the module but Magento is using the old module without override.

Here I upload the relevant codes:

etc/modules/Mycompany_Sales.xml

&lt?xml version="1.0"?&gt
&ltconfig&gt
    &ltmodules&gt
        &ltMycompany_Sales&gt
            &ltactive&gttrue&lt/active&gt
            &ltcodePool&gtlocal&lt/codePool&gt
            &ltdepends&gt
                &ltMage_Sales /&gt
            &lt/depends&gt
        &lt/Mycompany_Sales&gt
    &lt/modules&gt
&lt/config&gt

app/code/local/Mycompany/Sales/etc/config.xml

&lt?xml version="1.0"?&gt
&ltconfig&gt
    &ltmodules&gt
        &ltMycompany_Sales&gt
            &ltversion&gt0.1.0&lt/version&gt
        &lt/Mycompany_Sales&gt
    &lt/modules&gt
    &ltglobal&gt
        &ltmodels&gt
            &ltsales&gt
                &ltrewrite&gt
                    &ltorder_pdf_total_default&gtMycompany_Sales_Model_Order_Pdf_Total_Default&lt/order_pdf_total_default&gt
                &lt/rewrite&gt
            &lt/sales&gt
        &lt/models&gt
    &lt/global&gt
&lt/config&gt

code/local/Mycompany/Sales/Model/Order/Pdf/Total/Default.php

&lt?php
class Mycompany_Sales_Model_Order_Pdf_Total_Default extends Mage_Sales_Model_Order_Pdf_Total_Default
{
    public function getFullTaxInfo()
    {
     ...
    }
}

I have compared it with some internet examples of models overriding and everything seems to be alright.

Anyone knows what can be the problem?

Thank you very much!!

[EDIT]

Finally I have solved the problem.
The thing is that there is a core file app/code/core/Mage/Tax/Model/Sales/Pdf/Grandtotal.php that overrides app/code/core/Mage/Sales/Order/Pdf/Total/Default.php so my extended class was in conflict with the tax class.

For solving it I rewrite my extension in order to extends app/code/core/Mage/Tax/Model/Sales/Pdf/Grandtotal.php.

The result is:
 - etc/modules/Mycompany_Sales.xml

&lt?xml version="1.0"?&gt
&ltconfig&gt
    &ltmodules&gt
        &ltMycompany_Sales&gt
            &ltactive&gttrue&lt/active&gt
            &ltcodePool&gtlocal&lt/codePool&gt
            &ltdepends&gt
                &ltMage_Sales /&gt
                &ltMage_Tax /&gt
            &lt/depends&gt
        &lt/Mycompany_Sales&gt
    &lt/modules&gt
&lt/config&gt

app/code/local/Mycompany/Sales/etc/config.xml

&lt?xml version="1.0"?&gt
&ltconfig&gt
    &ltmodules&gt
        &ltMycompany_Sales&gt
            &ltversion&gt0.1.0&lt/version&gt
        &lt/Mycompany_Sales&gt
    &lt/modules&gt
    &ltglobal&gt
        &ltmodels&gt
            &lttax&gt
                &ltrewrite&gt
                    &ltsales_pdf_grandtotal&gtMycompany_Sales_Model_Order_Pdf_Total_Default&lt/sales_pdf_grandtotal&gt
                &lt/rewrite&gt
            &lt/tax&gt
        &lt/models&gt
    &lt/global&gt
&lt/config&gt

code/local/Mycompany/Sales/Model/Order/Pdf/Total/Default.php

&lt?php
class Mycompany_Sales_Model_Order_Pdf_Total_Default extends Mage_Tax_Model_Sales_Pdf_Grandtotal
{
    public function getFullTaxInfo()
    {
     ...
    }
}


texts: Magento 2: How to add PHP code into CMS Block using .phtml file

texts:
I have followed the below links to try and get PHP code into CMS Block which links to a .phtml file, with no avail.

Show content of phtml file on static block Magento 2

PHP code in Block

Currently on our M1 website we have the below setup:

Page Content:

{{block type="catalog/product" template="catalog/pages/towbars.phtml"}}

Referencing the links above, I have tried modifying this, however I am unsure exactly what my "block class" should be and the "template".

{{block class="Path\To\Block\Class" template="Namespace_Module::filename.phtml"}}

Can someone please give me a working example of the above code for Magento 2 and the location of the file, etc.

Many Thanks,
Barry


texts: Module is not properly working on live server in magento 2

texts: I have created one module and it is working properly in my local server(windows),but when i put it on live server(linux) it is not working properly.Can any one help me to solve this?


texts:
I am integrating Zaincash module in magento. I am using this git. Module is installed and coming in admin->system->configuration->advanced but when accessing payment methods in admin its throwing HTTP ERROR 500.
When I looked into system.log file it has following errors:

2017-07-10T05:09:45+00:00 ERR (3): Warning: include(Mage/Zcash/Helper/Data.php): failed to open stream: No such file or directory  in /var/www/mysite/lib/Varien/Autoload.php on line 94
2017-07-10T05:09:45+00:00 ERR (3): Warning: include(Mage/Zcash/Helper/Data.php): failed to open stream: No such file or directory  in /var/www/mysite/lib/Varien/Autoload.php on line 94
2017-07-10T05:09:45+00:00 ERR (3): Warning: include(): Failed opening 'Mage/Zcash/Helper/Data.php' for inclusion (include_path='/var/www/mysite/app/code/local:/var/www/mysite/app/code/community:/var/www/mysite/app/code/core:/var/wwwmysite/lib:.:/usr/share/php:/usr/share/pear')  in /var/www/mysite/lib/Varien/Autoload.php on line 94

Module was installed in app/code/local/WTC/Zcash.


texts: SOAP request to create sales order shipment partially

texts:
I'm trying to create the sales order shipment partially in magento with the following request [1]. I get "SOAP-ERROR: Encoding: Violation of encoding rules". Can anyone help me to resolve this issue?

[1]

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:Magento" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:salesOrderShipmentCreate>
         <sessionId>xxxxxxxxxxxxxxxxxxxxxx</sessionId>
         <orderIncrementId>200006672</orderIncrementId>
         <itemsQty><orderItemIdQty><order_item_id>AG0102019</order_item_id><qty>1.0</qty></orderItemIdQty></itemsQty>
         <comment>Testing</comment>
         <email>1</email>
      </urn:salesOrderShipmentCreate>
   </soapenv:Body>
</soapenv:Envelope>

Thanks in advance


texts: Magento 2.4 How to add custom column to admin Magento_Review grid (Marketing → All Review page)?

texts:
I want to add custom column to admin grid on Marketing → All Review page (Magento_Review module). I create module
app/code/Vendor/Module/etc/module.xml
<?xml version="1.0" encoding="utf-8" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Vendor_Module" setup_version="1.0.0">
        <sequence>
            <module name="Magento_Review"/>
        </sequence>
    </module>
</config>

app/code/Vendor/Module/view/adminhtml/ui_component/review_listing.xml
<?xml version="1.0" encoding="utf-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <columns name="review_columns" class="Magento\Ui\Component\Listing\Columns">
        <column name="review_child" class="Vendor\Module\Ui\Component\Listing\Column\MyColumn">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="sortable" xsi:type="boolean">false</item>
                    <item name="label" xsi:type="string" translate="true">My Column</item>
                    <item name="sortOrder" xsi:type="number">95</item>
                </item>
            </argument>
        </column>
    </columns>
</listing>

app/code/Vendor/Module/registration.php
<?php

declare(strict_types=1);

use \Magento\Framework\Component\ComponentRegistrar;

ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Vendor_Module', __DIR__);

app/code/Vendor/Module/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="Vendor\Module\Block\Adminhtml\ReviewGrid" type="Magento\Review\Block\Adminhtml\Grid" />

</config>

app/code/Vendor/Module/Block/Adminhtml/ReviewGrid.php
<?php

namespace Vendor\Module\Block\Adminhtml;

class ReviewGrid extends \Magento\Review\Block\Adminhtml\Grid
{
    protected function _prepareColumns()
    {
        parent::_prepareColumns();
        $this->addColumn(
            'review_child',
            [
                'header' => __('review child'),
                'type' => 'text',
                'index' => 'review_child',
                'escape' => true
            ]
        );
        return $this;
    }
}

app/code/Vendor/Module/Ui/Component/Listing/Column/MyColumn.php
<?php

namespace Vendor\Module\Ui\Component\Listing\Column;

use Magento\Framework\View\Element\UiComponent\ContextInterface;
use Magento\Framework\View\Element\UiComponentFactory;
use Magento\Ui\Component\Listing\Columns\Column;

class MyColumn extends Column
{
    public function __construct(
        ContextInterface $context,
        UiComponentFactory $uiComponentFactory,
        array $components = [],
        array $data = []
    ) {
        parent::__construct($context, $uiComponentFactory, $components, $data);
    }

    public function prepareDataSource(array $dataSource)
    {
        if (isset($dataSource['data']['items'])) {
            foreach ($dataSource['data']['items'] as & $item) {
                $item[$this->getData('name')] = "MY DATA";
            }
        }
        return $dataSource;
    }
}

Execute the command bin/magento setup:upgrade but I don`t see the column. How can I add my custom column to Magento_Review module?


texts: Magento programmatically force all products to save

texts:
I have a magento installation that has a layered navigation to which attributes show and allow you to filter by.

I have an issue with the attributes showing on the filter, they wont show unless I go into each product and re-save them after I have imported the attribute data via CSV.

I have re-indexed the data and flushed all cache but still cant get them to show.

I need to find a way to force all products to re-save programatically.

Does anyone know of a script I can run via SSH to do this at all?  I have tried a few I have found online, but they dont seem to execute correctly.

Any help would be greatly appreciated.

Thanks in advance,


texts: Magento custom email Not sending when tried programatically in localhost from shell folder (not in local directory) using SMTP

texts:
i need to create a custom mailing script in magento in Shell folder. I got the sample script from internet. this script was described as a stand alone script and no template id's are required and this type of script is what I needed and program didn't work for me.Below is the script.

require '../app/Mage.php';
ini_set('display_errors', true);
ini_set('max_execution_time', 3600); // just put a lot of time
ini_set('default_socket_timeout', 3600); // same
set_time_limit(0);

    class Mage_Shell_Report
    {
            public function myfunc()
            {
                $body = "Hi there, here is some plaintext body content";
                $mail = Mage::getModel('core/email');
                $mail->setToName('reig');
                $mail->setToEmail('rieg.philippe@neuf.fr');
                $mail->setBody($body);
                $mail->setSubject('The Subject');
                $mail->setFromEmail('boutique@infosys.com');
                $mail->setFromName("divine");
                $mail->setType('text');// You can use 'html' or 'text'

                try {
                    if($mail->send())
                    {
                        $msg = true;
                        echo "
mail sent
";
                    }
                    else
                    {
                        echo "
mail not send
";
                    }

                    Mage::getSingleton('core/session')->addSuccess('Your request has been sent');
                }
                catch (Exception $e) {
                    Mage::getSingleton('core/session')->addError('Unable to send.');
                    $this->_redirect('');
                }
                echo "
end program
";
            }
    }
    echo "out-1";
    $shell1 = new Mage_Shell_Report();
    $shell1->myfunc();
    ?>

This program shows no error . Though mail function returns success , i am not receiving any mail. i am testing in local using SMTP. Other email's, like order email, customer emails are sent successfully and can be viewed in SMTP mailbox. I browsed through pages and came to know that this issue has something to do with queuing but am not clear about that.  Kindly help me out


texts: How to check if a product is already on the wishlist in Magento 2?

texts:
In Magento 1.x I did it like this:

$_product = ...; // some product object you already have
$_productCollection = Mage::helper('wishlist')->getProductCollection()
    ->addFieldToFilter('sku', $_product->getSku());
if($_productCollection->count() > 0) {
    // User already has item in wishlist.
}

How can I achieve the same in Magento 2?


texts: magento 1.9 hide shipping information step in checkout

texts:
I have some configurable products that needs no shipping so I want the checkout to hide the shipping information (second step) and shipping method (third step): when the customer lands on checkout page, he can set his billing information and when he clicks on the continue button he needs to go straight to the payment step.

I've managed to hide the shipping method step by using the observer as explained in this thread and this part works as expected: the customer lands on the checkout page, fills in billing information, clicks on continue and (because "ship to this address" is flagged) he goes straight to the payment section, leaving out the shipping method.

Since I don't need the shipping method step, I've hidden it by rewriting the onepage_shipping_method:

I've added the rewrite in my config.xml

        <blocks>
            <checkout>
                <rewrite>
                     <onepage_shipping_method>Vendor_Module_Block_Onepage_Shipping_Method</onepage_shipping_method>
                </rewrite>
            </checkout>
        </blocks>

I've set the step to show = false in the block:

class Vendor_Module_Block_Onepage_Shipping_Method extends Mage_Checkout_Block_Onepage_Shipping_Method {
    public function isShow() {return false;}
}

This works: now the customer not only skips the shipping method step, but this step is also hidden so the customer doesn't see. That's perferct.

Now I need to hide the second step (shipping information).
In order to do this I need to first hide the the radio buttons (ship to this/different address) in the billing step, then I need to hide the second step (the shipping information step).

To hide the radio buttons I simply rewrote the billing block, setting the canShip method to false:

config.xml

<blocks>
            <checkout>
                <rewrite>
                    <onepage_billing>Vendor_Module_Block_Onepage_Billing</onepage_billing>              <onepage_shipping_method>Vendor_Module_Block_Onepage_Shipping_Method</onepage_shipping_method>
                </rewrite>
            </checkout>
        </blocks>

my block

class Vendor_Module_Block_Onepage_Billing extends Mage_Checkout_Block_Onepage_Billing {
    public function canShip() {return false;}
}

This works: when I land on the checkout page, I see the billing step but no radio button are shown and when I click on continue I go straight to the payment step.

However, the shipping information step is still visible. If I try and hide it the same way I did for the shipping method step, the continue button stops working. What I mean is:

I add the block rewrite in my config.xml

<blocks>
            <checkout>
                <rewrite>
                   <onepage_billing>Vendor_Module_Block_Onepage_Billing</onepage_billing>
                    <onepage_shipping>Vendor_Module_Block_Onepage_Shipping</onepage_shipping>
                  <onepage_shipping_method>Vendor_Module_Block_Onepage_Shipping_Method</onepage_shipping_method>
                </rewrite>
            </checkout>
        </blocks>

I create the block with the isShow method set to false:

class Vendor_Module_Block_Onepage_Shipping extends Mage_Checkout_Block_Onepage_Shipping {
    public function isShow() {return false;}
}

This doesn't work: when I land to the checkout page, fill in the billing information and click on continue, the continue button does nothing: for a single moment the loading icon appears but then nothing happens, the checkout doesn't go to the payment section

So my question is: how can I hide the shipping information step from checkout?


texts: How to send forgot password link programmatically

texts:
I have added all customers with the same password now I want to send the forgot password link programmatically to all customers.

I have tried below by creating the file in root.
Using below code i can send forgot password mail to the customer but when customer click on the password it display a blank screen with "http://127.0.0.1/magento1939/test.php/customer/account/resetpassword/?id=3&token=b3101c19f96551dea2e6f0a902b8c68f" URL

It redirect to same link
For Eg.
I have created test.php file and put below code. when i execute test.php file at that customer get reset password mail but when customer click on reset password mail they get link like "http://127.0.0.1/magento1939/**test.php**/customer/account/changeforgotten/" instead of "http://127.0.0.1/magento1939/customer/account/changeforgotten/" "

<?php
require_once('app/Mage.php'); //Path to Magento
umask(0);
Mage::app('default');
$yourCustomerEmail="bliss.jaimin@gmail.com";
$customer = Mage::getModel('customer/customer')
    ->setWebsiteId(Mage::app()->getStore()->getWebsiteId())
    ->loadByEmail($yourCustomerEmail);
if ($customer->getId()) {
    try {
        $newResetPasswordLinkToken =  Mage::helper('customer')->generateResetPasswordLinkToken();
        $customer->changeResetPasswordLinkToken($newResetPasswordLinkToken);
        $customer->sendPasswordResetConfirmationEmail();
    } catch (Exception $exception) {
        Mage::log($exception);
    }
}

In This email functionality is working perfect


texts:
I need to create a dynamic shopping cart rule depending on the count of items in the cart.

So I need to listen to an event which changes the item count in the cart (add product, remove product, change quantity).

Does such an event exist or do I have to listen for multiple events?


texts: Issue with Url key change for product in magento 2.3

texts:
I changed the url key for the Product

  https://prnt.sc/p9o8li

but on clicking on product it is redirecting to old url.
On clicking product it is going to

  https://ihouzit.com/Timeless-Gin-and-Cocktail-550ml.html url.

What is happening here? Why it is not taking the updated url?


texts: Magento 2: Authorize.Net Not Creating The Order After Order Placed

texts:
I am working on a Magento 2.2.9 project and using Authorize.net accept.js payment gateway (default Magento Module).

However, the website is working fine but the issue is, when a customer place an order (sometimes on random cases), after the payment process it is not creating the order in Magento admin. I have checked the payment logs before order place and the data inside log is correct.

Kindly help me how do I get to resolve this issue?

Thank you.


texts: Installed Magento in my server but I forgot admin user name & password & email

texts:
Please help me on this project.

I am trying change my website User name & Password & Admin Email Id.

I can not find it. In my php my admin, Please find the attachment. Showing like this. How to can i change it?

Swamy Simon


texts: Remove the uppercase from product names in RWD theme

texts:
I'm having a bit of difficulty locating where to change the case setting in the RWD theme css files.

I'm looking to remove the uppercase settings from the product names - any ideas?

Using 1.9

Thanks


texts: I have a simple product with a date custom option. When I click on the date a calendar opens and I select the date. After adding the product to cart, I can see the product along with the date as a custom option. Now I have to update this date on the cart page and save the value. I have found some solution in magento1. But I have to do it in magento2.


texts: How to get wishlist collection using customer id in magento 1.9

texts:
I am trying to get the wish list products in Magento 1.9, I am facing some problem. Based on customer id am fetching customer details, Unable to fetch the wishlist product collections.

$customer_id= 4;
            $customer = Mage::getSingleton('customer/customer')->load($customer_id);
            if($customer){
                $wishList = Mage::getSingleton('wishlist/wishlist')->loadByCustomer($customer);
                print_r($wishList);
                $wishListItemCollection = $wishList->getItemCollection();
                if (count($wishListItemCollection)) {
                    $arrProductIds = array();
                    foreach ($wishListItemCollection as $item) {
                        $product = $item->getProduct();
                        $arrProductIds[] = $product->getId();
                    }
                }
            }


texts: Error "We don't have as many..." not showing up

texts:
I have a strange problem in my Magento installation.
The classic message "We don't have as many "xxxx" as you requested." is not showing. The page reload and no message showing.
Ideas?


texts: Region is not Updating while Setting Country Name Programmatically. Magento 2

texts:
I've created Simple Form where I've set default country Name n Region like

                    Country

                                <?php echo $block->getCountryHtmlSelect() ?>

                    State

                                <select id="region_id" name="region_id" title="<?php echo __('State/Province') ?>" class="validate-select" style="display:none;">

                                    <option value=""><?php echo __('Select Your State') ?></option>

                                </select>

                                <input type="text" id="region" name="region" value="<?php echo $block->getRegion() ?>" class="input-text <?php echo $block->escapeHtmlAttr($this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('region')) ?>" style="display:none;">

ignore the table tag I've just copied specific part of the code. it works fine but in my form I'm setting GeoLocation n in that I'm also setting the country name as well but when I set the country name from API then the Region Dropdown do not change like if I've select India then it will not show the regions of India it will show the US regions (default one). How can I change the Region name as well when the country name is been changed programmatically.
Updated: in my Autofill.js file I'm setting my Country name like
if (componentForm[addressType] == 'country') {
                      var val = place.address_components[i];
                      // alert(val.long_name);
                      document.getElementById('country').value = val.short_name;
                    }


texts: We are using Magento Enterprise 1.12.0.2, and I am trying to enable both Ground and Home Delivery at the same time so that customers can choose the option that suits their needs to the best. Right now I can only get one to work...I can't get both to appear at the same time. Any way to fix this?


texts:
i have this line of code

<?php if($_product->isSaleable()): ?>

    <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart-mini" onMouseOver="mb_change_input_value_<?php echo $_price['price_qty'] ?>()" onclick="productAddToCartForm.submit(this)"><?php echo $this->__('Kaufen') ?></button>
<?php endif; ?>

for a Add To Cart Button in tierprices.phtml an it works fine in product view but not in category list view

Hope Someone can help me, that this work also in list view

Thanks for any help


texts: URL Redirects not showing, do I need to refresh the indices?

texts:
We are running Magento Enterprise edition and have multiple sites for various countries, however some of the categories we have created aren't working (the clean URL we expect them to work on isn't).

So I've checked the URL redirects and these haven't automatically been created. I believe this may be due to us never having re-indexed the Category URL Rewrites or the URL Redirects indices, would refreshing these automatically create the clean URL redirects and solve our problem?


texts: Magento 2.4 add Read More in the Product Description

texts:
I want to add "Read More" button in the product description. I use this code:
<div class="value more" <?php /* @escapeNotVerified */
echo $_attributeAddAttribute; ?> >
    <?php if ($_product->getData('description'))
{
    $string = strip_tags($_product->getData('description'));

    if (strlen($string) > 1200)
    {
        // truncate string
        $stringCut = substr($string, 0, 1200);
        $string = substr($stringCut, 0, strrpos($stringCut, ' ')) . '... ' . __('Read More') . '';
    }
    echo $string;
?>
    <?php
}
else
{ ?>
        <?php /* @escapeNotVerified */
    echo $_attributeValue;
}
?>

        <?php echo $_attributeValue; ?>
         <?=__('Read Less') ?>

But this code is limit my Description to 1200 characters, how I can made this code to have lines instead characters. I mean I want to add the Read More button after 10 text lines.
Thank you


texts: Mail subject and content must change as per Order status : Magento 2

texts:
Anyone has done or know.

How we can update/change email subject and email template according to order status.

each and every status has different email subject line and different comment according to status.


texts: How the payment methods are rendered and displayed in checkout page in magento 2

texts: I wish to know how the payment methods are rendered in checkout page in magento 2


texts: Order creation not working through rest api in Magento 2.1

texts:
I am using Magento 2.1.6 CE and also am using default rest api's for create mobile app. In that I follow below steps to create an order, But order is not created.

Step 1:- Create an empty cart for customer using POST /rest/V1/carts/mine/

Step 2:- Add product to cart using POST /rest/V1/carts/mine/items

Step 3:- Get cart totals using GET /rest/V1/carts/mine/totals/

Step 4:- Get Shipping methods by customer address id using POST /rest/V1/carts/mine/estimate-shipping-methods-by-address-id

Step 5:- Add billing and shipping address using POST /rest/V1/carts/mine/billing-address

Step 6:- Set shipping information using POST /rest/V1/carts/mine/shipping-information

Step 7:- Set payment information and create order using POST /rest/V1/carts/mine/set-payment-information

Note:

Am tried PUT /rest/V1/carts/mine/order method also but it returns following error.

How can I get this done?

Please suggest me is there any default options available to done this.

Thanks in advance!


texts: Magento 2 can't update customer custom attribute value at customer observer(customer_save_after)

texts:
I am trying to save customer custom attribute value at customer_save_after observer. but observer script is not working at observer but that script working at contoller.

events.xml

<event name="customer_save_after">
<observer name="VestricsM2_Connector_Customer_Save_After" instance="VestricsM2\Connector\Observer\CustomerSaveAfter" /> </event>

Observer/CustomerSaveAfter.php

protected $customerRepository;

protected $_logger;

/**
 * @param \Magento\Framework\ObjectManagerInterface $objectManager
 */
public function __construct(
    \Magento\Framework\ObjectManagerInterface $objectManager,
    \Psr\Log\LoggerInterface $logger,
    \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository
) {
    $this->_objectManager = $objectManager;
    $this->_logger = $logger;
    $this->customerRepository = $customerRepository;
}

/**
 * customer register event handler
 *
 * @param \Magento\Framework\Event\Observer $observer
 * @return void
 */
public function execute(\Magento\Framework\Event\Observer $observer)
{
    $customer = $observer->getEvent()->getCustomer();

    if($customer->getId()){
        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $customerRepository = $objectManager->create('Magento\Customer\Model\Customer')->load('1');
         $customerRepository->setUpdatedinsap('1');
         $customerRepository->save();

       /* $writer = new \Zend\Log\Writer\Stream(BP .'/var/log/observer-log-file.log');
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);
        $logger->info($customerRepository->getData());*/

    }


texts: i have problem in attachments when send email with TransportBuilder


texts: Can I use Magento to implement Telco services

texts:
I would like to know if I can use Magento to sell Telco services. I would also like to know if any companies have done this, and if there are any partners who could assist with how to go about this.

Thanks,  Amanda


texts:
I am trying to get output of a page in admin from a helper file which I need for a cron to convert it into pdf and email:

$html = file_get_contents('http://dltr.org/index.php/admin/dltrpdf_sales_shipment/index/shipment_id/65')

But, I get login page html, as it's a secure admin page. I also tried this PHPCurl but it didn't work. I still got login page html.

Is there any internal function available in Magento that can emulate admin page load and return correct html output (source code)?

FYI, I am using Magento ver. 1.14.2.4.


texts: how to to receive list of objects in magento2 api method?

texts:
need to pass following object:

{
   "category_code":"43",
   "attribute_filters":[
      {
         "price":{
            "lte":20
         }
      },
      {
         "vintage":{
            "eq":"blue"
         }
      },
      {
         "size":{
            "in":[
               "medium",
               "large"
            ]
         }
      }
   ],
   "attribute_include":[
      "type",
      "color",
      "size",
      "sku"
   ]
}'

to custom API method:

 * @api
 *
 * @param int $category_code
 * @param string[] $attribute_filters
 * @param string[] $attribute_include
 *
 *
 * @return string JSON encoded objects data
 */

public function myMethod($category_code, $attribute_filters, $attribute_include);

But in result r receive following exception:

{"message":"Notice: Array to string conversion in ... TypeProcessor.php ...}

It is required to keep object in this format, as this is presented by specifications, how should i properly set the doctypes vars for this API to receive data ?

UPD

tried to  make

@param \Magento\Framework\DataObject[] $attribute_filters

but it throws :

{"message":"Property \"Price\" does not have corresponding setter in class \"Magento\\Framework\\DataObject\"...}

Seems like it doesnt recognize magic setters and getter via ReflectionClass


texts: Is it possible to get System > Config values through ajax.  Or jQuery?


texts: Remove price update for Magento Quantities

texts:
A client wants to prevent the price from updating when you add more than one in the QTY box, so it always shows the base price until you add it to cart.

Is this something that is possible? I've searched and can't seem to find what I'm looking for.


texts: Magento 2 configurable product, show stock message

texts:
In Magento 2.3.1 for configurable products, i would like to show a stock message for quantity near the label. If Less than or equal to then, stock message

Where is located the file which call this? I don't know which file to modify.

In \vendor\magento\module-configurable-product\view\frontend\templates\product\view\type\options i found configurable.phtml

    <?php
/** @var $block \Magento\ConfigurableProduct\Block\Product\View\Type\Configurable*/
$_product    = $block->getProduct();
$_attributes = $block->decorateArray($block->getAllowAttributes());
?>
<?php if ($_product->isSaleable() && count($_attributes)):?>
    <?php foreach ($_attributes as $_attribute): ?>

            <label class="label" for="attribute<?= /* @escapeNotVerified */ $_attribute->getAttributeId() ?>">
                <?= $block->escapeHtml($_attribute->getProductAttribute()->getStoreLabel()) ?>

                <select name="super_attribute[<?= /* @escapeNotVerified */ $_attribute->getAttributeId() ?>]"
                        data-selector="super_attribute[<?= /* @escapeNotVerified */ $_attribute->getAttributeId() ?>]"
                        data-validate="{required:true}"
                        id="attribute<?= /* @escapeNotVerified */ $_attribute->getAttributeId() ?>"
                        class="super-attribute-select">
                    <option value=""><?= /* @escapeNotVerified */ __('Choose an Option...') ?></option>
                </select>

    <?php endforeach; ?>

<?php endif;?>

but here is the whole block. not the generated labels


texts: Amazon AWS or Google GCP for Magento 2.1

texts:
Good Morning Everyone.
I have a site with approx 30,000 sku's that is on a shared server.   The shared server has 150 other sites on it, approx 120 of which are static one page sites.

My problem is that my site (a Magento 2.1 site with PHP 7) has been a resource hog and seems to like to bog down everything.   The server is 64 G with 8 cores.  The site gets approx. 12000 page views a month with approx. 2000 user month.

I have been exploring going to either AWS or GCP.      What are peoples experiences / preferences with either.


texts: Captcha not showing on frontend login page. It works fine on register and forgot password section. I am using default template captcha module in rwd template. Following all the necessary changes. Guide me from this problem. I am using magento 1.9.2.2.


texts: How to Use Custom Variable in Email Template?

texts:
I'm following below post & able to send email.

how to send custom email no template in magento2?

I have created 1 custom variable named Custome Footer.

app\code\Custom\Module\view\frontend\email\sucess.html

<!--@subject Test Subject @-->
Hi {{trans "%lastName" lastName=$data.lastName}} {{trans "%firstName" firstName=$data.firstName}},

Message

{{customVar code=custom_email_footer}}

When i receive email Custom Variable custom_email_footer is not replaced & i'm getting that portion Blank

Below is code i'm testing Email Outside Magento by extending

require __DIR__ . '/app/bootstrap.php';

use Magento\Framework\App\Bootstrap;

$bootstrap = Bootstrap::create(BP, $_SERVER);
$objectManager = $bootstrap->getObjectManager();

$state = $objectManager->get('Magento\Framework\App\State');
$state->setAreaCode('frontend');

$storeManager = $objectManager->get('Magento\Store\Model\StoreManagerInterface');

// Customer Factory to Create Customer
$transportBuilder = $objectManager->get('\Magento\Framework\Mail\Template\TransportBuilder');
$websiteId = $storeManager->getWebsite()->getWebsiteId();

/// Get Store ID
$store = $storeManager->getStore();
$storeId = $store->getStoreId();

$senderName = 'Sender';
$senderEmail = 'abc@gmail.com';

$emailTemplateVariables = array();
$emailTempVariables['firstName'] = 'First';
$emailTempVariables['lastName'] = 'Last';

$postObject = new \Magento\Framework\DataObject();
$postObject->setData($emailTempVariables);

$sender = [
    'name' => $senderName,
    'email' => $senderEmail,
];

$templateId = 'my_email_template';
$storeId =1;
$templateParams = array();

try {
     $transport = $transportBuilder->setTemplateIdentifier($templateId)
            ->setTemplateOptions(['area' => Magento\Framework\App\Area::AREA_FRONTEND, 'store' => $storeId])
            //->setTemplateVars($templateParams)
            ->setTemplateVars(['data' => $postObject])
            ->setFrom($sender)
            ->addTo($senderEmail)
            ->setReplyTo($senderEmail)
            ->getTransport();
        $transport->sendMessage();
        echo "Success";
        exit;
  } catch (Exception $e) {
    echo "<pre>";
    print_r($e->getMessage());
    exit;
}


texts: Filter product collection by sku or name

texts:
I have a variable which containing value to filter both name or sku, i tried to filter the product collection using this variable like this:

$queryName = 'bat';
$category = $this->_categoryFactory->create()->load('2');
$collection = $this->_productCollectionFactory->create();
$collection->addAttributeToSelect('*');
$collection->addCategoryFilter($category);
$collection->addAttributeToFilter(['name', 'sku'],
          [
           ['like' => '%'.$queryName.'%'],
           ['like' => '%'.$queryName.'%']
          ]);
$collection->setPage(1,15)->load();
return $collection;

but i got an error like this:

  Warning: Illegal string offset 'attribute' in
  /../vendor/magento/module-eav/Model/Entity/Collection/AbstractCollection.php
  on line 362


texts: How to acces one .phtml file in another .phtml file magento?

texts:
In magento development how to access one ".phtml" file in one or more other ".phtml" files?
i accessed my extension " .phtml" file in one page checkout page extension file is working fine but checkout page checkbox click is not working.


texts: Magento 2 - Show subcategories (and products) on category page

texts:
It's a common question how to show subcategories above the products on any given category view. In Magento 1 it was fairly straight forward; create a static block, add the necessary code to the template and show that block along with the products on said category.

But Magento 2 is quite different, and I figured out I could use two approaches:

Create a module which does it for me
Create a static block and show it with the category

For the first approach I found this code/module and this code which I applied to the category pages via XML, but it shows all the categories, in stead of only the current categories sub's. I tried to edit this but couldn't get it to work.

For the second approach, I figured I create a static block and assign it to the category in the adminpanel. All I did so far was create the static block, and what happens? It shows on every page in every sidebar and content block (so double on each page). This might be considered a separate question, but does anyone know why this happens?


texts: How to test API service without registered domain

texts:
I am trying to test the Magento API of a site hosted by a non-registered domain(I have change my etc/hosts file. ).
However back to me a fatal error.

Why? The domain must have to be registered?


texts: homepage url changed to /STORECODE/cms/index/index after 1.9.2.4 upgrade

texts:
After I did an upgrade to latest magento CE version 1.9.2.4, I noticed 2 weird changes:

frontend: home page url was changed to /STORECODE/cms/index/index

backend: once an admin user logged in, he will face 404 error, the url is admin/index/noRoute

I've no conflicts. All modules have been updated to the new routing. Other admin functions are working and frontend pages are working as expected too.


texts: Everything in one module or split up in multiple?

texts:
Module
We're creating a webshop and are mostly creating every file we need in app/code/vendor/module right now. This means we have lots of different features like widgets and logic for multiple different things in one module. This ends up becoming quite a mess of code specifically developed for the current webshop.
We've been wanting to take a more modular approach to developing in Magento and we were wondering whether it's better to split all different features up in different modules under our own vendor folder?
If someone has any examples of how such a project should look it would be greatly appreciated!


texts: Magento2 Test credit card credentials for Braintree

texts: Magento2 I have enabled the Braintree Payment method for Magento. Which testing credentials I should use for the following input.


texts: No Unsubscribe message after unsubscribe newsletter Magento 2

texts:
I have set up newsletters in my magento website.

There is Unsubscribe link in newsletter email which works perfectly i.e. customer is unsubscribed from newsletter.

But when customer click on unsubscribe link in newsletter email, he is redirected to home page of website with no message. So customer don't get idea about his unsubscription done or not!

How can i show message to customer that he has unsubscribed successfully?


texts: Magento 2 CleverSoft theme Modules conflicting with other theme instaled on another website on the same magento Installtion

texts:
Good Evening everyone,
I configured two websites on Magento 2. and set two different themes to the Websites. First theme was running Fine but when I Installed the another theme which is CleverSoft Moza on another website then Theme confliction come in notice.

I found that CleverSoft_Base Module which is defined under the Theme directory is conflicting with another theme, as their is no option to set that module for particular website. It is conflicting with the JS of first website on product page and i seen in the first theme that all cleversoft static modules are presented that cause the main confliction. On removing these modules from static directory under first theme some of confliction is solved while another remains. but when i deploy static content again it backs to the directory.

Now I want to make that module available only to that website but there is no default option provided by the vendor. Please let me know How i can deploy a particular module to particular website so that it doesn't conflict with another website on same magento installtion.


texts:
I'm building an iOS application for my store, and I'm looking for a way to get the correct price of an actual product.

Looking at the API I only find requests to get raw product information.
http://devdocs.magento.com/swagger/index.html

However, if used this, I'll have to recreate the rules used for tier/group pricing in my app.
It would be nice to just send the customer group, quantity and product SKU and get the correct price.
Have I missed anything similar to this in the API?


texts: Currency Rate not importing from Webservicex in magento 2

texts:
I checked it at my localhost as well as on liver server.

Is this bug or anything is missing by me ?

  I seems that same things is not working into magento1.x too. Is this
  problem into Webservicex api or into stable version ?


texts: How to get attributes before adding product to the cart past api / rest?

texts:
I've been researching and testing plugins and events for more than 20 days
add the customized item passed by POST /V1/carts/{quoteId}/items.
{
  "cartItem": {
    "sku": "1809",
    "qty": 1,
    "price":10,
    "quote_id": "20897",
    **"extension_attributes": {
      "ordem_servico": "33333333"**
    }
  }
}

extension_attributes only exists in the API/Rest call and must be saved in the quote_item table. Is there a way to get the POST data?
Magento 2.3.5
Any help would be appreciated.
Thanks.


texts: Magento 2 moving the sku on product page

texts:
I'm trying to move the sku on the product page but no matter what i do it sits at the top when I would like it at the bottom:

XML:

<page layout="2columns-left" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>

    <move element="product.info.description" destination="sidebar.additional"/>
    <move element="product.attributes" destination="sidebar.additional" after="product.info.description"/>
    <move element="product.info.sku" destination="sidebar.additional" after="product.attributes" />
    <referenceBlock name="catalog.compare.sidebar" remove="true"/>
    <referenceBlock name="wishlist_sidebar" remove="true"/>
</body>

</page>

Any ideas what I am doing wrong?


texts:
why the magento is generating this custom redirects in URL Rewrite Management.

Please find the below image:

Thanks


texts: Error "Your session has expired" when click on add to cart in magento 2.3

texts:
I am new in magento, I am creating website in magento 2.3 and I have installed FreeGo theme in my magento website. But

  when i click on product's add to cart then it's giving me
  error--> Your session has expired.

I have google it a lot but didn't find any solution.

Here is the screenshot:

How can i get rid of this and product can add to cart? Please help me

Update:


texts: Problem with additional attribute in SOAP API C#

texts:
I'm using SOAP API v2 for Magento. I have a problem with product creation.

All fields are correctly set, but custom attributes that I've defined. These fields remains empty when I show it in panel. This is my code:

var mservice = new Mage_Api_Model_Server_Wsi_HandlerPortTypeClient();
        string mlogin = mservice.login("me", "*************");

        catalogProductCreateEntity newProduct = new catalogProductCreateEntity();

        newProduct.name = "Title here";
        newProduct.description = "Blabla bla bla";
        newProduct.short_description = "blalblalbla";
        newProduct.weight = "0";
        newProduct.status = "1";
        newProduct.price = "13.50";
        newProduct.tax_class_id = "2";

        associativeEntity[] AdditionalAttributes = new associativeEntity[1];
        associativeEntity AdditionalAttribute = new associativeEntity();
        AdditionalAttribute.key = "ean13";
        AdditionalAttribute.value = "978883226238";

        AdditionalAttributes[0] = AdditionalAttribute;

        newProduct.additional_attributes = AdditionalAttributes;

        try
        {
            mservice.catalogProductCreate(mlogin, "simple", "4", "93bffellag44fh1ll24-x", newProduct, null);
        }
        catch (Exception merror)
        {
            Console.WriteLine("Errore soap magento: " + merror.Message);
            Console.Read();
        }


texts: Custom image attribute is not displayed on search list

texts:
I have a custom media image attribute called hover_image as you may understand when a customer hovers on the product image hover_image  shows up.

This works with catalog list but when I search for a product the list that comes up does not show the image that I uploaded to hover_image. It shows placeholder that I uploaded for hover_image from system>configuration>catalog

This is the code that I use for displaying hover image in the list.phtml view

 <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image">
    <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(400,600); ?>" width="300" height="400" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" onmouseover="this.src='<?php echo $this->helper('catalog/image')->init($_product, 'hover_image')->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(400,600) ?>';" onmouseout="this.src='<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(400,600) ?>';" />


texts:
I am trying to remove calendar.js via local.xml but have trouble doing so, can anyone post a correct code for 1.9.2?

My local.xml

<?xml version="1.0"?>
<layout version="0.1.0">
    <default>
        <reference name="footer_links">
            <remove name="return_link"/>
            <action method="removeLinkByUrl">
                <url helper="catalogsearch/getSearchTermUrl"/>
            </action>
            <action method="removeLinkByUrl">
                <url helper="catalogsearch/getAdvancedSearchUrl"/>
            </action>
        </reference>
    </default>
<action method="removeItem">
    <type>js</type>
    <name>calendar/calendar.js</name>
</action>
    <checkout_cart_index>
        <remove name="checkout.cart.shipping"/>
        <remove name="checkout.cart.coupon"/>
    </checkout_cart_index>
    <catalog_product_view>
        <reference name="product.info.additional">
            <action method="unsetChild">
                <name>product_tag_list</name>
            </action>
        </reference>
    </catalog_product_view>
</layout>

https://www.airyhair.com/clip-in-hair-extensions.html


texts: Get block in phtml file not working - Please help me?

texts:
Get block in phtml file not working - Please help me !

When clicking on the button, it shows popup fancybox but does not show content in it.

My phtml

<?php
echo $block->getLayout()->createBlock('Magento\Contact\Block\ContactForm')
    ->setTemplate("Magento_Contact::form.phtml")->toHtml();
?>


texts: Magento 2.2.8 ignores my theme's dictionary

texts:
I'm hitting my head against a wall on this one. I've gone through not only the Magento documentation regarding custom translations in themes, but also many answered questions found via Google, and nothing seems to work. I'm trying to change the default "transaction has been declined" message during checkout.

I have a theme located at app/design/frontend/Vendor/ThemeName. Inside that theme, I have the i18n directory, and inside of it, I have en_US.csv.

In app/design/frontend/Vendor/ThemeName/i18n/en_US.csv, I have the following text:

"Transaction has been declined. Please try again later.","Payment was declined. Please check your details and try again.",module,Magento_Payment

I've also tried just this:

"Transaction has been declined. Please try again later.","Payment was declined. Please check your details and try again."

In addition, I've even tried moving i18n to app/code/Vendor/ThemeName/Magento_Payment.

And, of course, I'm flushing the cache and making sure all static content gets rebuilt.

Nothing works. This is maddening, and I'm really hoping I've just missed something stupid and obvious that someone can point out to me very quickly :)

EDIT: I erroneously stated that my theme was installed in app/code when it was in fact installed in app/design/frontend.


texts: How can I programmatically save selected products? - url key is empty after csv import

texts:
I imported some non-visible simple products (from csv) with an empty url key field.

If I save one of these manually in the back end the url key is generated OK.

If I bulk update an attribute the url key is not generated so I suspect it's not doing a full save.

I have over 1600 of these products so I need to be able to programmatically save products where sku starts with a certain string such that the url key is generated. Any pointers would be greatly appreciated.


texts: Observer event on frontend home page load

texts:
Is there any observer event on frontend home page load?

On my custom module, I want to display a notice message on home page if certain conditions are met. Can I do this using event-observer?


texts:
Hi i have a product attribute that will not save when changed in the product itself!

Its a multi select, global scope, not required and set for all product types.

In fact another multi select doesn't save either so it seems to be a multi select problem.

Doesn't matter if I select one option or ten it doesn't remember it just says saved sucessfully and then doesn't actually save it!

Does anyone have any ideas or can you suggest where to begin on debugging this?

Cheers!

BUMPING: Any ideas?


texts: Is there  way to do a dry run within your root folder to make sure the line of code works


texts: Magento 2: Send email to admin after wholesaler customer register

texts: I have created custom form in which the only wholesaler can do registration, I want to do when wholesaler customer can registered admin can get the email that wholesaler register, please let me know how can I do that?


texts: M2 Free shipping if subtotal is higher than X amount

texts:
I am developing M2 store for a company that just serves only for domestic users. I recently bought the Amasty Inventory module and made the domestic cities.(No shipping available to the countries different) )
I have two logical pattern where I have no idea to start off with..

Ar01
If total cart price is greater than X amount, free delivery available within city 1 to city 15,
even if the cart price is lower than X amount(in city 1 to city 15) that he will have to pay L amount(A fixed rate).

Ar02
even if the cart price greater or lower than X amount if he's not entitled the upon city list(city 1 to city 15) that he'll have to pay for shipping L amount(The fixed rate]

I am using Magento 2.2.2

if someone has an idea how to start off this module please let me know in real quick


texts:
I lost a part of code in my category page. I dont have the switch at the bottom for the second page or the 3rd page. When i set the product total towards 9 there doesn't come a button to switch to page 2 on the bottom. This is my code for the category page 2columns-left.phtml

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

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

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

                        <?php echo $this->getChildHtml('global_messages') ?>
                        <?php echo $this->getChildHtml('breadcrumbs') ?>
                        <?php echo $this->getChildHtml('content') ?>

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

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

    <?php echo $this->getChildHtml('global_cookie_notice') ?>
    <?php echo $this->getChildHtml('before_body_end') ?>

<?php echo $this->getAbsoluteFooter() ?>

What can be the problem? What code am i missing?


texts: Upgrading a manually installed community extension via Magento Connect

texts:
Is this possible? I have Listrak_Remarketing already installed in an instance, but it does not show up under "Magento Existing Extensions" under System -> Magento Connect Manager. So, I'm assuming this was manually installed.

I tried upgrading this extension via Magento Connect, but it does not allow it because it's checking for existing files, and there are existing files.

Update 1: For reference, this is the error

Checking dependencies of packages

CONNECT ERROR: Package 'Listrak_Remarketing' is invalid
'./app/code/community/Listrak/Remarketing/Block/Adminhtml/Abandonedcartreport/Grid.php' already exists

Update 2: I found a site that lets you download the extension given the link obtained from Magento. Answer is below.

Update 3: Also, it looks like you may have a compressed extension file downloaded after all here even if it fails to install via Connect --> downloader/.cache/.


texts: Programmatically create a simple product in magento 2

texts: I'd like to create simple product programmatically in magento 2. Is there any way to create ?


texts: CatalogSearch results looking for partial SKU

texts:
I need to be able to search by partial string of a SKU, for example, if a SKU of a product is "CUS123.5NYS" the customer may also be able to search by "123.5N", but currently, it only works if I search by initial or end part of the string.

Is it possible to allow search by partial string using some interceptor or preference to override a class?

In the Store configuration I'm using Elasticsearch 5.0+ as Search Engine


texts: Magento 2 send data from html template to Controller without Ajax

texts:
So I have created a component which has 2 templates, but the property data is the same for both.
I wanted to know if there is a way to send data without using ajax.
Why? Because I don't need to use ajax for post, I need more of a form submission post to the next page.
Here is my code:
<div id="custom-component" data-bind="scope:'customcomponent'">
    <!-- ko template: getTemplate() --><!-- /ko -->
    <!-- ko template: template2 --><!-- /ko -->
    <script type="text/x-magento-init">
    {
        "#custom-component": {
            "Magento_Ui/js/core/app": {
               "components": {
                    "customcomponent": {
                        "component": "Vendor_GetQuote/js/add-beneficiaries",
                        "coverage_amount": "<?= /* @escapeNotVerified */ $ee_basic_amount_original ?>"
                    }
                }
            }
        }
    }
    </script>
    </div>

here is my js code:
define(['jquery', 'uiComponent', 'ko'], function ($, Component, ko) {
    'use strict';
    return Component.extend({
        defaults: {
            template: 'Vendor_GetQuote/beneficiaries-table',
            template2: 'Vendor_GetQuote/test-template',
            bData:  ko.observableArray([])
        },

I push some elements to bData in this js component.
Thanks!


texts: How can I remove not existing images in magento 2

texts: How can I remove not existing images from magento. In the database have images but file is not exist. I want deleted this images from database.


texts: Magento 2 How to create a popup in checkout if customer is not logged in

texts:
When a guest customer who is not logged in hits checkout, I want a popup to remind customers to login at the checkout page.

How do I implement it? What files should i override?

Thanks.


texts:
Is There any possibility to fetch all shipping methods using rest api in magento2

Thanks


texts: How to validate Tiny MCE Editor in frontend custom form and how to do for uploading image from my PC in TinyMCE Editor in Magento1.9

texts: I am able to show Tiny MCE Editor in my Magento Frontent custom form by the help of here How to add wysiwyg editor to custom frontend form of custom module in Magento1.9.But with magento default class "required-entry required-entry textarea", TinyMCE Editor is not validating. How to validate this TinyMCE Editor in Magento frontend custom form. And I also want to upload image file from My PC that will be available in TinyMCE Editor.Currently there is a text box of Image URL insertion in TinyMCE Editor. I need a browse besides "Image URL insertion textbox" by which it can be uploaded a image file from PC.


texts: Magento 2 : Widget template moves closing  tag

texts:
I have a strange issue involving a template in a PageBuilder widget.

If I use the following code:

The output is:

This occurs before even calling mageTemplate() on it.

I can nest multiple div's, but where the first closing tag occurs, it puts the  tag in between. This results in the HTML after this  tag being visible.

I triple checked the validity of the HTML above this piece of code. The source as well as the generated source in the console. The strange thing is that it also goes wrong in the non-generated source.

Any thoughts on this?

It happens in Chrome, as well as Firefox (which shouldn't be relevant, because it is about the non-generated source).


texts: Shopping cart price rule does not seems to work with Magento 1.9.2

texts:
I have created multiple shopping cart rules & set "Stop Further Rules Processing" to Yes but that does not seems to work with Magento 1.9.2 only.

Multiple rules are applying currently by ignoring the "Stop Further Rules Processing", If anyone faced the related issue please help me to get it resolved. It will be much appreciated.

Thanks in advance!


texts: Password reset block in cms page going to 404 after submit

texts:
I'm trying to create a custom password reset page.  I placed the following page in a cms page:

{{block type="customer/form_login" template="customer/form/reset_password.phtml"}}

When submitting form, it goes to a 404 page.  Assuming it has to do something with the action in form on reset_password.phtml:

action="<?php echo $this->getUrl('*/*/forgotpasswordpost') ?>"

How do I correctly process this form?


texts: Magento2- getLastRealOrderId() returns null

texts: I am creating a payment gateway. When ever the last order has the state/status as complete, getLastRealOrderId() returns null. Is there any work around or a way to solve it ? I am new to magento


texts: Duplicated images when adding image to gallery programmatically in Magento 1.9

texts:
I'm trying add image to product gallery by downloading image file from internet to my magento server and add this as main image in gallery by addImageToMediaGallery method:

                $imageToAdd = 'http://example.com/some_image.jpg';
                $uploadedImgsDir = Mage::getBaseDir('media') . '/uploaded-imgs';
                $imageFilePathForUpload = $uploadedImgsDir . '/' . (new SplFileInfo($imageToAdd))->getFilename();
                file_put_contents($imageFilePathForUpload, fopen($imageToAdd, 'r'));
                // Add Image to Gallery
                $imgCfg = ['image', 'small_image', 'thumbnail'];
                $product->addImageToMediaGallery($imageFilePathForUpload, $imgCfg, false, false);

However, In product gallery in I see my image (with url = http://example-magento.com/image1.jpg) with 'image', 'small_image', 'thumbnail' = false and other image (with 404 url - with _1 adition in url - = http://example-magento.com/image1_1.jpg):

Please help (any idea would be appreciated). Or Please request more information I'll add them in my question.


texts: Delete Table record having foreign key constraint Magento 2

texts:
in my custom module, I have two tables with 1 to many relationships. Now in my admin UI Grid whenever I delete the record it does not delete it.

My question is how i can delete record from both tables at once. Any help would be appreciated.


texts:
Bit of a strange one here I think. Using Magento 2 all I want to do is give a 10% discount on three products when a certain three products are in the cart.

I have gone to "cart price rules -> actions". If ALL of these conditions are TRUE. SKU is PRODSKU1, PRODSKU2, PRODSKU3. Then added 10% discount.

For some reason this just doesn't work. If I change "SKU IS" to "SKU IS ONE OF" it does work, but obviously that's not quite the rule I want. I want them ALL to be in the cart. Any help?

If it sheds any light, all three SKUs I am adding are from the same configurable product.


texts: Magento2 - How do I generate a list or orders a vaulted payment method has been used for?

texts:
I am trying to generate a list of orders that a vaulted card (Braintree) has been used for.

I have a payment instance from an order, and I'm trying to establish if the vaulted card has been used for previous successful orders.

How do I go about generating a list of orders using the same stored payment method, as a given order?


texts:
In addition to the extension settings, extension installation loads a lot of unnecessary content.
if you now look at the configuration menu in the admin panel, under the tab of the main settings of the plugin,
there will be at least 2 or 3 additional tabs.
debugging information, advertising, promotional offers, 3rd party content, and so on.

All of the contents of these tabs are in direct contact with the developer servers.
loaded in frames, scripts, trackers, sniffers. Updated in real time.
Some of these scripts are loaded from their partners servers, 3rd party.

Once you open that additional tab, all the information from your current admin session will be available to anyone.
Clicking on any link can be even worse.

Magento constantly releases patches, fixing remote code execution, privileges escalation, injections, etc

Many shops have 50+ of different extensions loaded with additional garbage.

so the questions are:

1.

  Why the extension developers load all this nonsense into the admin
  backend,  not letting me know about it and without my consent? No way
  to disable or remove this crap. Do they understand the consequences
  and take responsibility for the security of information?

2.

  Why doesn't Magento prohibit loading all these which does not apply to
  extension settings? As a general rule, Magento partners must follow
  basic security rules?


texts: A strange behavior in a collection filter

texts:
For the pro collections I have a question for you !

I want to filter the cart collection items in checkout/cart.phtml like this:

$items = Mage::getSingleton('checkout/cart')->getQuote()->getItemsCollection();
$items->addFieldToFilter('sku', 123);

var_dump($items->getSize()) renders me int(1) it's my filtered product that i want, while basically I have three items in a cart. Good.

Now if I do :

foreach ($items as $item) {
    var_dump($item->getSku());
}

This renders me the three items ???