texts: Support Multiselect Attribute in Admin Grid Column without UI

texts:
I'm extending a Magento 2 module which doesn't use UI. I've added a new column for a custom attribute to the module's Admin grid. However, I'm trying to change the attribute to a multiselect, and I can't find a way to support multiselect without UI.

Here is what I have now:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="adminhtml.locator.grid.columnSet">
            <block class="Magento\Backend\Block\Widget\Grid\Column" as="brand" before="status">
                <arguments>
                    <argument name="header" xsi:type="string" translate="true">Brand</argument>
                    <argument name="index" xsi:type="string">brand</argument>
                    <argument name="header_css_class" xsi:type="string">col-brand</argument>
                    <argument name="column_css_class" xsi:type="string">col-brand</argument>
                    <argument name="type" xsi:type="string">options</argument>
                    <argument name="options" xsi:type="options" model="Mycompany\StoreLocator\Source\Brand\Options"/>
                </arguments>
            </block>
        </referenceBlock>
    </body>
</page>

This works great so long as I don't use a select attribute, but it breaks with a multiselect attribute. Filtering is also broken for this attribute once it has a comma in the attribute value.

Is there any way to support this without converting the whole form to UI?


texts:
I have used Magento 1.9 initially timezone was America/Los_Angeles in app/etc/config.xml file and set India/Calcutta timezone in

  System -> Configuration -> General -> Locale Options ->Timezone

at that time Magento function Mage::getModel('core/date')->date('Y-m-d H:i:s') return correct date.
But order placed time was -5:30 to real time.

For set Asia/Calcutta timezone, I have changed app/etc/config.xml general->locale->timezone to Asia/Calcutta and in app/Mage.php I have changed UTC to Asia/Calcutta,

And it has changed the timezone in the backend, it means order placed time is correct as real-time but the function Mage::getModel('core/date')->date('Y-m-d H:i:s') return me +5:30 time to real time.

Is there any place where I missed to change?

Or Is there another method to change the timezone of the Magento store?


texts: Load upselling block in custom controller

texts:
I have created a custom controller and added the upselling block using the layout.xml

<block type="catalog/product_list_upsell" name="product.info.upsell" as="upsell_products" template="catalog/product/list/upsell.phtml">
   <action method="setColumnCount"><columns>4</columns></action>
   <action method="setItemLimit"><type>upsell</type><limit>4</limit></action>
</block>

however this results in the error

  Fatal error: Call to a member function getUpSellProductCollection() on
  a non-object in
  \app\code\core\Mage\Catalog\Block\Product\List\Upsell.php on line 49

Can anyone tell me what caused this error?

Thanks for help.


texts: Customers Can't Checkout Magento ver. 1.9.3.8

texts:
I am having a random where some of my customers are unable to checkout.

They claim they login to their account enter billing address, click continue and nothing happens. The onepage checkout won't move on to the next step.

I have been unable to duplicate the issue. Some users have no problems and I don't see anything in the error logs.

Any idea what this may be?

Thanks!


texts: Google Map with Drop down functionality not working

texts:
I Make a file of Google Map in which there are a drop-down functionality but first i created this file in html it's working perfectly but when i tried in CMS page or phtml page the map not shown.

As per my research there are a css problem any one can help in this

This is my mapgeo.html you can copy code and create mapgeo.html on your desktop to see output this file working perfectly but it is not working in magento.

<!DOCTYPE html>

    <title>Geocoding service</title>
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
    <meta charset="utf-8">

    <select id="address">
      <option value="Sydney, NSW">Sydney</option>
      <option value="prachi infosys">Prachi Infosys</option>
    </select>

      <input id="submit" type="button" value="Search">


texts: How to add custom attribute to select options?

texts:
Is it possible to add custom values to select options e.g. in configurable products?

I need to add the sku of the option to the option, so that it will become

<option id="354" price="10" sku="my_sku">Option name</option>

I figured out that the Block Class of the Select is Mage_Catalog_Block_Product_View_Options_Type_Select, so I overrided the class but I don't know which code I have to edit.

I found the definition of addOption in Mage_Catalog_Model_Product_Option but there is no big logic.

Edit: This is not the right definition.
The right definition is in the Block class Mage_Core_Block_Html_Select

/**
 * Add an option to HTML select
 *
 * @param string $value  HTML value
 * @param string $label  HTML label
 * @param array  $params HTML attributes
 * @return Mage_Core_Block_Html_Select
 */
public function addOption($value, $label, $params=array())
{
    $this->_options[] = array('value' => $value, 'label' => $label, 'params' => $params);
    return $this;
}

Cache is deactivated.


texts: How to create product's custom attribute with 'yes/no' dropdown using install Setup scripts in Magento 2?

texts:
I want to Create a product's custom attribute with 'yes/no' drop-down into my custom module.

Please suggest any solution.


texts: Magento2 product images not showing but are still in the media folder

texts:
We have a recurring problem on a Magento2 store, where all of the product images do not show. We see the Magento default placeholder.

Previously, we have manually uploaded every image through Magento admin, and they show fine for x months until they disappear again.

Any advice on getting to the route of what is causing the issue?

Also advice on how to quickly remedy the issue and upload all images again without doing manually 1 by 1?

The images are still in the file locations, but below database table is empty:

  catalog_product_entity_media_gallery_value

Our plan at the moment is to restore this table from latest backup or go back to a backup before issue occurred.


texts:
How to disable tax for specific products from admin dashboard ?
I set up the tax, and then set the tax class to none the product page, but for this product also considers taxes


texts: Get quote data(Shipping zip code) from observer magento 2

texts:
I created a observer and i need to fetch the zip code of current quote, Below code is for my event.xml

<event name="sales_quote_collect_totals_before">
<observer name="sipl_oda_observer_observer" instance="Sys\Oda\Observer\Observer" />
</event>

Code for Observer.php

$order= $observer->getData('order');
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();


texts: Switch between mobile and desktop version

texts: As mentioned in the title i want to know if it is possible to switch from mobile version of a theme to desktop version but without having a separate theme for mobile devices. And to be more specific i mean like there is a button to change from mobile to desktop version.


texts: What are min_price, max_price, final_price and how are they different from price in magento

texts:
I have been trying to understand these prices changing tax rates, classes, group and tier prices. But all these doesn't change min and max prices in table catalog_product_index_price.

I am actually analyzing catalog/product/price.html to understand in detail how magento handles the prices. I am fully confused on these prices.

Please help me in understanding the mystery behind magento pricing in detail. Also provide me any great tutorials on this.

Thanks in Advance!


texts: Magento 2: How to add "async" attribute to  links in document head

texts:
I want to add the async attribute to a script tag in the <head> block. I've successfully added the script tag to the default_head_blocks.xml file in Magento_Theme as per the example in the Devdocs, but can't work out how to add an additional attribute to the tag with Magento 2.

I've tried:

<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js" src_type="url" async="async"/>

but this doesn't work.


texts: Magento 2.0 vs 2.1: what are the major/breaking changes?

texts:
As you may be aware, 2.1 RC1 was released last week as well as 2.0.7 yesterday.

I know 2.1 implies a lot of changes.

My question is, as a developer, which are the changes I should be aware of and take into consideration ?

I'm not looking for the release notes, I would like a list of stuff that changed in the code that are considered as major changes / breaking changes.

To rephrase it: which changes should I be aware of when coming from 2.0 to 2.1 developer wise ?


texts: Magento 2 use custom data in ui component

texts:
I'm adding a custom UiComponent to checkout using Layout Processor:

LayoutProcessor.php

$this->jsLayout['components']['checkout']['children']['sidebar']
['children']['summary']['children'] = [
'my-item' => [
    'displayArea' => 'my-item',
    'component' => 'Vendor_Module/js/view/my-item',
    'config' => [
        'template' => 'Vendor_Module/my-item'
    ],
    'custom-data' => 'some custom data'
];

Vendor_Module/js/view/my-item.js

define(
    [
        'jquery',
        'ko',
        'uiComponent',
        'Magento_Checkout/js/model/totals'
    ],
    function ($, ko, Component, totals) {
        'use strict';
        return Component.extend({
            items: ko.observable([]),
            initialize: function () {
                this._super();
                totals.getItems().subscribe(function (items) {
                    this.setItems(items);
                }.bind(this));
            },
            getItemsToRender: function () {
                `I want my custom data here`
            }
        });
    }
);

Is it possible to "send" custom data from LayoutProcessor to js component?


texts: Hiding the quantity box in the Cart and checkout Magento 2

texts:
Is there anyway I can hide the quantity box in the cart from the user? Also in checkout user should not be able to edit cart.

I have upon request from a friendly user posted images of what I would like to get rid of. 2 images, first one is from the dropdown cart and the other one from the checkout/edit cart.


texts: Magento 2 - Custom 404 page for disabled products

texts:
In Magento 2 I am looking to create a module that adds a custom 404 page specifically for disabled products from Magento Admin.

Can anyone help me how I can proceed to get the desired output?


texts: magento2 adding tab with content to offcanvas

texts:
I have been trying to create an additional tab in navigation.sections and insert inside languages, and my own account (complete with a menu), login, logout that I have created outside header.links, they work good on desktop but cannot manage to make them appear in navigation.sections ( the xml managing content of the offcanvas menu),

I have tried different approach, I have started with inserting just the customer.phtml, the latest is (in MyName/myTheme/Magento_Theme/layout/default.xml):

<block class="Magento\Framework\View\Element\Template" name="store.information" group="navigation-sections" template="Magento_Theme::html/container.phtml">
            <arguments>
                <argument name="title" translate="true" xsi:type="string">Information</argument>
            </arguments>
                <block class="Magento\Customer\Block\Account\Customer" name="store.settings.customer" template="Magento_Customer::account/customer.phtml">
                    <arguments>
                        <argument name="id_modifier" xsi:type="string">nav</argument>
                    </arguments>
                </block>
                <block class="Magento\Customer\Block\Form\Login" name="store.settings.custom_customer_form_login" template="Magento_Customer::form/login_pop.phtml" >
                <arguments>
                        <argument name="id_modifier" xsi:type="string">nav</argument>
                    </arguments>
                        <block class="Magento\Customer\Block\Form\Login\Info" name="newpopup" template="Magento_Customer::newpopup.phtml"/>
                  </block>
                  <block class="Magento\Store\Block\Switcher" name="store.settings.language" template="Magento_Store::switch/languages.phtml">
                    <arguments>
                        <argument name="id_modifier" xsi:type="string">nav</argument>
                    </arguments>
                </block>
                <block class="Magento\Directory\Block\Currency" name="store.settings.currency" template="Magento_Directory::currency.phtml">
                    <arguments>
                        <argument name="id_modifier" xsi:type="string">nav</argument>
                    </arguments>
                </block>

        </block>

The result is all title to dropdownDialog are there, but the dropdwon itself is not present, even if the phtml called is already in the page and working under another layout name.


texts: Not able to save product on store level : - M 2.3.4-p2

texts:
After selecting store from upper left side, I'm not able to save product.
I'm able to save product with all store view.
Gives this error when i try to save product with specific store view:

Fatal error: Uncaught TypeError: array_key_exists() expects parameter
2 to be array, null given in
D:\xampp\htdocs\magento\vendor\magento\module-catalog\Model\Attribute\Source\AbstractLayoutUpdate.php:44
Stack trace: #0
D:\xampp\htdocs\magento\vendor\magento\module-catalog\Model\Attribute\Source\AbstractLayoutUpdate.php(44):
array_key_exists(false, NULL)

I found that there is some issue with this "custom_layout_update_file" attribute.


texts: CAPTCHA is not showing on Contact us page

texts:
After enabling captcha for the contact form the captcha is not shown on the form. If submitted an "Incorrect CAPTCHA" error is displayed.
Select stores->Configuration->Customers->Customer Configuration->Captch->Forms->Contact us and save
Form.phtml file
escapeUrl($block->getFormAction()) ?>"
      id="contact-form"
      method="post"
      data-hasrequired="escapeHtmlAttr(__('* Required Fields')) ?>"
      data-mage-init='{"validation":{}}'>

        escapeHtml(__('Write Us')) ?>
        escapeHtml(__('Jot us a note and we’ll get back to you as quickly as possible.')) ?>

            escapeHtml(__('Name')) ?>

                escapeHtmlAttr(__('Name')) ?>" value="escapeHtmlAttr($this->helper('Magento\Contact\Helper\Data')->getPostValue('name') ?: $this->helper('Magento\Contact\Helper\Data')->getUserName()) ?>" class="input-text" type="text" data-validate="{required:true}"/>

            escapeHtml(__('Email')) ?>

                escapeHtmlAttr(__('Email')) ?>" value="escapeHtmlAttr($this->helper('Magento\Contact\Helper\Data')->getPostValue('email') ?: $this->helper('Magento\Contact\Helper\Data')->getUserEmail()) ?>" class="input-text" type="email" data-validate="{required:true, 'validate-email':true}"/>

            escapeHtml(__('Phone Number')) ?>

                escapeHtmlAttr(__('Phone Number')) ?>" value="escapeHtmlAttr($this->helper('Magento\Contact\Helper\Data')->getPostValue('telephone')) ?>" class="input-text" type="text" />

            escapeHtml(__('What’s on your mind?')) ?>

                escapeHtmlAttr(__('What’s on your mind?')) ?>" class="input-text" cols="5" rows="3" data-validate="{required:true}">escapeHtml($this->helper('Magento\Contact\Helper\Data')->getPostValue('comment')) ?>

        getChildHtml('form.additional.info') ?>

            escapeHtmlAttr(__('Submit')) ?>" class="action submit primary">
                escapeHtml(__('Submit')) ?>


texts:
I have a Magento 2 install that is generating invalid JS files when I run php bin/magento setup:static-content:deploy. I get JS errors now on both the admin and frontend.

  E.g.
  pub/static/adminhtml/Magento/backend/en_US/Magento_Ui/js/lib/knockout/bindings/i18n.js
  - SyntaxError: missing ) after argument list

   /**
     * execute i18n binding
     * @param {Object} element
     * @param {Function} valueAccessor
     * @param {bool} isUpdate
     */
    execute = function (element, valueAccessor, isUpdate) {
        var original = ko.unwrap(valueAccessor() || ''),
            el = getRealElement(element, isUpdate),
            inlineTranslation = (module.config() || {}).inlineTranslation;

        if (inlineTranslation) {
            setTranslateProp(el, original);
        } else {
            setText(el, "'"
    .addAttribute('translate', {
        binding: 'i18n'
    });


texts: How to increase the quality of product images JPG Magento 2.3.4?

texts: I'm using Magento 2.3.4. my uploaded product images quantity is very low because of compression. My product images size in 30 to 40 kbs, can someone help me increase images quantity?


texts: how to debug why layer navigation getItemsCount() return zero?

texts:
In layer navigation multiselect attribute not displayed.
$filter->getItemsCount() in vendor/magento/module-layered-navigation/view/frontend/templates/layer/view.phtml always return zero.

<?php foreach ($block->getFilters() as $filter): ?>
    <?php if (!$wrapOptions): ?>
        <?php /* @escapeNotVerified */ echo __('Shopping Options') ?>

    <?php $wrapOptions = true; endif; ?>
        <?php if ($filter->getItemsCount()): ?>

<?php echo $block->escapeHtml(__($filter->getName())) ?>

<?php /* @escapeNotVerified */ echo $block->getChildBlock('renderer')->render($filter); ?>

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

My try

$filter have all the multiselect attribute but $filter->getItemsCount() return zero.

e.g)

$filter have brand attribute, category page have many products which have brand value however $filter->getItemsCount() return zero

please suggest nicer way to debug?

Note: I did reindex. All cahce are disabled. In admin, we enabled needed properties to display in Navigation.


texts:
The site is made live with the help of siteworx panel. The Links & Buttons in the details page alone are not working. I uploaded the code to server via Bitbucket using git. The same code in my local machine is working very fine. But the links & buttons are not working only in the live site.

Kindly suggest me solutions regarding what can be the issue?
Which is stopping my links & buttons in the live site from working fine?

  I have added Zopim chat only in the live site. But even when I
  disabled that extension the links and buttons are not working.


texts: how to check if a product is a simple product and not a child of a configurable product

texts: I know how to check if a product is configurable or not. But anyone tell me how to check if a product is pure simple product that means I want to check those products which I created as Attribute set= 'Default' and Product type= 'Simple Product' not attribute set= 'Default' and Product type= 'configurable Product'.


texts:
i need cart data just after Add to cart action in magento

i need bundle product price after Add to cart action and before it's show in cart

i need bundle product total Price when checkout_cart_product_add_after event call


texts: how to get customer postcode and which event to use in Magento 2?

texts: I have to take postcode and customer order details to store in my custom order table which event to use after place order button in the checkout page?


texts: Magento configurable product from multiple products

texts:
Magento typical configurable product with multiple attributes goes like this:

For example there are T-shirts with different size and color. Each simple product has a size and color and then you create configurable product. That's simple.

But we need to create a product that is made of 2 different simple products that have different attribute sets. One has color and one size. It's a tent that is made of frame that has 2 different sizes and from cover material that has 2 different colors.

If you buy a tent then you must pick one frame and one cover material + you can pick some extras like sidewalls and carrybag.


texts: Magento 2 : Remove Top Links When Customer Not Logged In

texts:
I would like to remove My Account link from top links, when customer is not logged in.

How do I achieve it via XML layout files?


texts: Add a block on the top of the page content in checkout page

texts:
I'm running Magento 2.0.1. I want to show a block in the checkout page. So, I created a module to override the checkout page. I have added the block code in the checkout_index_index.xml file, but the block shows at the bottom of the page.

I want to render the block on the top of the page without using Knockout.js.

Here's my code:

<!-- block code -->
<referenceContainer name="content">
    <block class="VendorName\ModuleName\Block\ClassName" name="content.options" after="-" cacheable="false"/>
</referenceContainer>

<!-- Checkout page components -->
<referenceBlock name="checkout.root">
    <arguments>
        <argument name="jsLayout" xsi:type="array">
            <item name="components" xsi:type="array">
                <item name="checkout" xsi:type="array">
                    <item name="children" xsi:type="array">
                        ...
                    </item>
                </item>
            </item>
        </argument>
    </arguments>
</referenceBlock>


texts: Get total in observer sales_order_place_before

texts:
I try to get the total value (price of his order) of the customer in the sales_order_place_before event.

How can I read the total value?

This is a part of my observer, it is getting called, I only need to find out how I can read the total value:

public function changeCustomerGroup(Varien_Event_Observer $observer)
{
    Mage::Log('observer called', 7, 'autochange_customer_group.log', true);

    Mage::Log(var_dump($observer->getEvent()->getOrder()->getTotalDue()), 7, 'autochange_customer_group.log', true);

But my attempt with var_dump($observer->getEvent()->getOrder()->getTotalDue() returns nothing.


texts:
I have the Website Payments Pro Hosted Solution (Includes Express Checkout) plugin option set up, and I'm wondering if it's possible to style the iFrame that is rendered:

I've searched high and low for an answer but the PayPal documentation seems to send me round in circles.

Is there a way to upload custom CSS to PayPal? I know other card processors have this function.


texts: How to remove reference container block from layout?

texts:
I want to remove the block from referenceContainer. I have gone through the below link:

Remove block from layout in Magento 2

And tried to remove as per the above answer:

<referenceBlock name="footer-container" remove="true"/>

But it's removing whole container. I want to remove the particular block.

Below is my layout.xml code:

<referenceContainer name="footer-container">
            <block class="Vendor\Module_Name\Block\Template" name="footer_block" template="html/footer.phtml">
                <block class="Magento\Store\Block\Switcher" name="footer.store_switcher" template="switch/stores.phtml"/>
                <block class="Magento\Newsletter\Block\Subscribe" name="footer.newsletter" template="subscribe_footer.phtml"/>
            </block>
        </referenceContainer>

I want to remove only footer.store_switcher and footer.newsletter. I am using the below code to remove both blocks.

<referenceBlock name="footer.store_switcher" remove="true"/>
<referenceBlock name="footer.newsletter" remove="true"/>

default.xml file path:

E:\xampp\htdocs\magento\app\design\frontend\Vender\Theme\Magento_Theme\layout

Please help me.


texts: In Magento2 graphql i want to add a field to the root query of the Magento GraphQL API called `isLoggedIn`. This should return `Boolean`

texts: In Magento2 graphql i want to add a field to the root query of the Magento GraphQL API called isLoggedIn. This should return Boolean whether the customer is logged in or not.


texts: Uncaught Error: Mismatched anonymous when calling JQuery in Magento 2 frontend

texts:
i use jquery in front-end for ajax in phtml page, but i'm getting this error:

Uncaught Error: Mismatched anonymous define() module: function ($, _, template)

here's my code:


texts: How could I get the attribute(brand) Url Like example.com/category/brand/name in magento2

texts:
Please give me some Idea,I need some help.

I fetch the brands from those attribute..and get the ids from those attribute.

Ans can send those data on the URL like example.com/category?brand=7 but I don't want this..


texts:
I have made a new attribute called RRP. It has exactly the same settings as the Price attribute. But when I var_dump the value inside the attribute it is displaying as a string when I need it to be a float so I can calculate a percentage.

This is what I currently have:

$RRP = Mage::helper('core')->formatPrice($product->getrrp_price());

Which formats the price.

Then I use

$rrp_String =  $value = preg_replace('/^\D+/u', '', $RRP);

To make it into a string without the £ so I can have an if-statement to check if it is over 0. How could I change this line to convert $RRP into a float instead of a string?

So I want to replace the $rrp_String line with something that will convert $RRP into a float as then I can use it in the same if-statement as well as when I'm trying to calculate percentages using the RRP

Edit

I ended up using:

<?php
$RRP = $product->getrrp_price();
$rrp_float = floatval($RRP);
?>

Without $rrp_String =  $value = preg_replace('/^\D+/u', '', $RRP);

This seemed to have solved the problem


texts: Magento 2: Deploy Production mode with fresh install

texts:
I am working with MAGE2.2.6. It is a fresh install.

Before I opened magento for the first time. I changed from default to Production mode, in the etc.php file. I also cleared my var/cash and var/page_cash folders.

But I just get the spinning wheels of loading for any content: Product, Catalog, Pages, Widgets...

How can I deploy Production without using the CLI?

Is that the only way to do it?

I prefer to do it from the back-end if I can.


texts: What is the best way to annoymise an email address in a Magento Order

texts: We have been been asked to remove all customer data from our systems - easy on Linnworks - seems impossible in Magento


texts: Can you tell if customer placed theri order on a mobile device?

texts:
This might be a simple question, but I am trying to figure out if a customers order was placed through a mobile phone or on a desktop? If I click on the invoice I see "Purchased From" and it only says:

Main Website
Store Default
Store View Main Website

Then placed from IP: and it shows the customers IP adress, but It never says if it is a mobile device or a computer.


texts:
We are looking for a way to offer our customers the ability to register with our site and create their own store on our site.

An example would be at the following page.
https://www.shapeways.com/shops/raphaelvertices

If you notice they have a URL with their name in it and the ability to show a custom banner image with a list of all of the products that they sell on that site as well as contact info etc.

We need similar functionality to allow our product providers to list their products in their own store to be sold and marketed by us.

Any suggestions on how to create this functionality are welcomed even if we have to program an extension ourselves we just need to know its possible to do with Magento and if there are any preexisting extensions that provide this.


texts: Magento2 Checkout cart automatically updates when qty changes with ajax

texts:
Magento2 checkout cart page
Please ensure when quantities are changed that the cart automatically updates. Some customers might change the quantity and if they dont click update cart they might move on to checkout how their cart updates automatically when quantity is changed.
Thank you,
Your Faithfully,
Mehul Kanjariya


texts:
I would like to make tax rules in my store:

All foreign customers: 0% Tax
All Dutch customers:

a) up to 10000 Euro: 21% Tax

b) from 10000 Euro: 0% Tax

How should i do this and is it even possible in Magento 2.1?


texts: Migrate 1.9 to 2.2 when StoreView is not assigned to Store/Website

texts:
So maybe someone have already experienced something like that and will be able to help me out here:

I have to migrate a 1.9 Magento to 2.2 which I do quite often in the last months and which is mostly not a big deal.

Unfortunately I have been confronted with a problem I never faced before:

In the 1.9 Shop (the shop has only 1 StoreView) the StoreView is not assigned to any Website or Store:

I realised that when I finished the migration to Magento 2, because in Magento 2 my products (although they all were in the backend) did not show up in the frontend. I therefore did some research and found out that for the products to be shown they have to be assigned to a storeview, a store and a website.

In 1.9 however, everything works perfectly, although no Store/Website exists.

Now in 2.2 I tried to create a new Website, and a new Store (since after the migration those also were missing in 2.2) and then assign my storeview to the Store. This ended up in an error 500 in both front- and backend.

Has anyone ever faced a problem like that? How can I make my products show in the frontend after the migration? How can I "recreate" a missing website/store?


texts: Magento 2.2 Catalog Price Rule Wont Apply

texts:
I am using Magento 2.2. I have set Catalog Price Rule. I have saved and applied for all.  I have cleared the cache. I have also Reindex all Magento 2 indexers using below commands:

php bin/magento indexer:reindex

and

php bin/magento indexer:status

shows Ready for all Indexes. and yet the discounts don't apply.


texts:
I am trying to POST to

192.168.2.153/rest/V1/products/{MYSKU}/media

I used several online picture to BASE64 converter to convert to BASE64.

The first line looks like

data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAA

And here is my body (without the BASE64 code to save space here):

{
"entry": {
"media_type": "image",
"label": "new_picture",
"types": [
  "image"
],
"file": "pic1.jpg",
"content": {
  "base64_encoded_data": "",
  "type": "image",
  "name": "pic1.jpg"
}
  }
}

I am only getting

The image content must be valid base64 encoded data.

Whatever I try no luck.


texts: uploaded a module then got an error "Call to a member function rewrite()"

texts:
i just upload a module then got an error

Fatal error: Call to a member function rewrite() on a non-object in /var/www/directory/app/code/core/Mage/Core/Controller/Varien/Front.php on line 165

i completely removed the module but the error still exists, how can i retrieve my website.


texts: Magento website user account pages unavailable. How to find what is the problem?

texts: In our newly created website account pages such as "my account", "my wishlist", "my cart" etc have all become unavailable, when requested browser loads for awhile and then returns "connection has timed out" page. I have debugging mode turned on and error logs turned on however there is nothing there that could tell me where to start fixing this problem. Has anyone had a similar problem? Can anyone advise what to do in this particular situation. I tried million things already to no success. Thanks in advance!


texts:
I want to set my custom phtml to header in magento 2?
i want to display my phtml in all pages so i want to add my phtml in header.

i am trying to search in core files but i can't get it.

In layout how to set template to add phtml in header.I want to add my phtml without changes of admin blocks.

Is that possible to do this? How can i do this?


texts: Magento 2. Remove column from customer grid (admin)

texts:
How does one remove a given column from customer grid (admin) ?

Edit:

I wish to remove the column not hide it.

Edit 2

Setting the following is not working.

'is_searchable_in_grid' => false,
'is_used_in_grid' => false,
'is_visible_in_grid' => false,
'is_filterable_in_grid' => false


texts:
i've a problem with Magento Cron.
I activate magento cron by terminal command as wrote in Magento 2 User Guide.
But when i open log file i found this error

[2020-04-22 12:53:05] main.ERROR: Cron Job indexer_reindex_all_invalid has an error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '80728-152-1-5778-80728' for key$
[2020-04-22 12:53:05] main.CRITICAL: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '80728-152-1-5778-80728' for key 'PRIMARY', query was: INSERT  INTO `avm_catalog_product_indez_eav_temp

how can i fix it?

Thanks

Antonello


texts: Magento 2 - Fix "Please enter a value greater than or equal to NaN." for input type date

texts:
I need to add a date input field to my contact site, so that users can select a date when we can call them back. I filled the attribute min with the date of today, to prohibit the user from selecting a date from the past.
But if I try to submit I get "Please enter a value greater than or equal to NaN."

I figured out that this is a bug in the old jquery version which magento 2 is using. They are still using jQuery 1 even when there is already jQuery 3.
What is the best way to replace the jQuery version for the contact site?


texts: How to get value from `core_config_data` table in Magento 2

texts:
Magento 1.x use Mage::getStoreConfig('sections/groups/fields') get data on core_config_data table.

How to Magento2 get value from core_config_data table ?


texts: overriding Authentication popup is notworking

texts:
I am very new to magento 2

I have already extended module_customer where authentication-popup.html is located in that module only, as I want to extend only html file so I used app\design\frontend\Sm\market\Magento_Checkout this path but I am not able override it can you help me in this.


texts: How do I execute Magento 2 CLI commands using a custom script?

texts:
I had created a custom script which update my database. After completion of database update, I want to execute the Magento CLI commands by adding custom functions in my custom script.

The script should run commands as below:

1) setup:upgrade
2) content:deploy
3) reindex
4) flush
5) 777 permissions for var/ pub/ generated/ Directories

How could I do it using a custom script in Magento 2.3.x?


texts: Installing Data-Migration-Tool with Composer: git not found error

texts:
when I try to install the Data-Migration-Tool with Composer:

composer config repositories.data-migration-tool git https://github.com/magento/data-migration-tool

composer require magento/data-migration-tool:2.0.2

I get the RuntimeException:

Failed to clone https://github.com/magento/data-migration-tool, git was not found, check that it is installed and in your PATH env.

I have git installed. Git commands like git --help is working.
The exec-path is correct.
The composer.json file has the correct path:

"repositories": {
        "0": {
            "type": "composer",
            "url": "https://repo.magento.com/"
        },
        "data-migration-tool": {
            "type": "git",
            "url": "https://github.com/magento/data-migration-tool"
        }
    },

In addition I created a auth.json file:

{
   "http-basic": {
       "repo.magento.com": {
           "username": "c7d...",
           "password": "0d3..."
       }
   },
    "github-oauth": {
      "github.com": "778..."
   }
}

But I get still this error.


texts: getting inventory error when edit the prodcut from admin

texts:
I am working on Magento Enterprise (1.14.1) staging server. When I am update any product from admin I am getting below error which is seems related with Live site database even i am working on staging server (I have searched all possible occurrence which may be related with live database like any custom code, searched in the staging database etc...):

SQLSTATE[HY000]: General error: 1449 The user specified as a definer ('[LiveSiteDatabaseName]'@'%') does not exist, query was: UPDATE cataloginventory_stock_item SET product_id = ?, stock_id = ?, qty = ?, min_qty = ?, use_config_min_qty = ?, is_qty_decimal = ?, backorders = ?, use_config_backorders = ?, min_sale_qty = ?, use_config_min_sale_qty = ?, max_sale_qty = ?, use_config_max_sale_qty = ?, is_in_stock = ?, low_stock_date = ?, notify_stock_qty = ?, use_config_notify_stock_qty = ?, manage_stock = ?, use_config_manage_stock = ?, stock_status_changed_auto = ?, use_config_qty_increments = ?, qty_increments = ?, use_config_enable_qty_inc = ?, enable_qty_increments = ?, is_decimal_divided = ? WHERE (item_id='79182')

Can anyone help me to fix this issue? Any help would be appreciated.

Looking forward for response from expert.


texts: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'CONCAT(DATE_FORMAT(MIN(`main_table`.`period`)

texts:
HELP: I have no idea what is wrong. When i am trying to login to the admin panel of the website, front end is fine. but that shows this error message
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'CONCAT(DATE_FORMAT(MIN(main_table.period)


texts: Ideal place for checking quote and change it

texts:
After the user adds a product to the cart, I need to run a check on the quote because I have to manipulate the total price if necessary and then save the changed quote.
Where is the ideal place to make my quote check?
Maybe in the controller Magento_Checkout/Controller/Index/Index ?


texts: Sorry, no quotes are available for this order at this time in magento admin

texts:
if I place order from frontend of my magento store then it is working perfectly but if I create new order from magento backend I can't select any shipping methods because it's show me "Sorry, no quotes are available for this order at this time" and because of this error I can not create order from magento backend.

I am using Magento ver. 1.9.1.0.I have added "Webshopapps Matrix Rates" module.

So I hope someone have solution for this issue.


texts: Show message if package weight exceeds a given value

texts:
I am using the table rate for shipping.  (weight vs destination)

If the weight is more than X I want a message or some indicator that will notify the client that shipping cost will be quoted and manually added to the invoice.

Possible?


texts: Where is "status" located in the database from Magento 2 order grid

texts:
I want to change all the orders that are in the status of "Processing" to "Complete" state.

I managed to find this in the sales_order table and set the state and status to complete. This worked fine and when I access the order, the state and status are now "Complete":

However, in the admin grid, it is still showing "Processing". How can I change this directly in the database?:


texts: How can I get vat_id via SOAP without additional modifications?

texts:
I understand that, by default, Magento doesn't expose the vat_id field via SOAP. The accepted answer there is to edit the core/add a module. Unfortunately, I don't have such luxury because I don't have the filesystem access to Magento: I have just the basic SOAP access and I cannot do any modification.

So: how do I retrive the vat_id via SOAP from a Magento ver. 1.9.4.2?

This is what I've tried so far:

$result = $proxy->salesOrderInfo($sessionId, '200000006');
$customer = $proxy->customerCustomerInfo($sessionId, '765');
$addresses =  = $proxy->customerAddressList($sessionId, '765');

foreach $addresses:
  $proxy->customerAddressList($sessionId, '211');

Unfortunately, the vat_id is nowhere to be seen.

What can I do?


texts: Error on set method of extensionAttributes

texts:
I realize this question is kind of vague, but I'm hoping that someone with more knowledge of Magento than me can give me an idea of where to look.

I'm trying to add an extension attribute called exportedFlag onto Magento's Invoice class.

I'm getting an error in the following function that setExportedFlag() doesn't exist.  However the line above it for getExportedFlag does work, so I'd like to know how Magento creates the setExportedFlag method on $extensionAttributes, and where I should be looking to find a misconfigured setup that is preventing that method from being generated.

private function addExportedFlagToInvoice(\Magento\Sales\Api\Data\InvoiceInterface $invoice)
{
    $extensionAttributes = $invoice->getExtensionAttributes();

    if (empty($extensionAttributes)) {
        $extensionAttributes = $this->invoiceExtensionFactory->create();
    }

    $exportedFlag = $this->exportedFlagProvider->getExportedFlag($invoice->getEntityId());

    // This is the line that errors
    $extensionAttributes->setExportedFlag($exportedFlag);

    $invoice->setExtensionAttributes($extensionAttributes);

    return $this;
}

Here is my extension_attributes.xml

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

Here's my ExportedFlagInterface.php

<?php

namespace MyCompany\InvoiceExportedFlag\Api\Data;

use Magento\Framework\Api\ExtensibleDataInterface;

interface ExportedFlagInterface extends ExtensibleDataInterface
{
    const INVOICE_ID = "entity_id";

    /**
     * Gets the flag that indicates whether this invoice has been exported.
     *
     * @return string
     */
    public function getExportedFlag();

    /**
     * Sets the flag that indicates whether this invoice has been exported.
     *
     * @param string $exportedFlag
     * @return self
     */
    public function setExportedFlag($exportedFlag);

    /**
     * Gets this invoice's ID.
     *
     * @return int
     */
    public function getInvoiceId();

    /**
     * Sets this invoice's ID.
     *
     * @param int invoiceId
     * @return self
     */
    public function setInvoiceId($invoiceId);

    /**
     * @return \MyCompany\InvoiceExportedFlag\Api\Data\ExportedFlagExtensionInterface|null
     */
    public function getExtensionAttributes();

    /**
     * @param \MyCompany\InvoiceExportedFlag\Api\Data\ExportedFlagExtensionInterface $extensionAttributes
     *
     * @return self
     */
    public function setExtensionAttributes(\MyCompany\InvoiceExportedFlag\Api\Data\ExportedFlagExtensionInterface $extensionAttributes);
}

Edit: Another thing I noticed is that generated/code/Magento/Sales/Api/Data/InvoiceExtension.php has no methods within the class.  If I look at ProductExtension.php in the generated folder, that class does have several methods within it.  What might cause InvoiceExtension to not have any methods?


texts: Magento 2.3 get current local time in phtml

texts:
I want to load the current local time in a custom phtml file, that I want to load in my CMS Page.

I currently have the following code but that loads the GMC time, not my local time.

How can I change this?

CODE:

<?php $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$objDate = $objectManager->create('Magento\Framework\Stdlib\DateTime\DateTime');
$date = $objDate->gmtDate();
$ndate = date('H:i', strtotime($date));
?>
<?php echo $ndate;?>


texts: Custom total (surcharge) added before subtotal but tax is to low in Magento 1.9

texts:
I have added a new custom subtotal to my totals in Magento CE 1.9.3.9. Each item in my shopping cart may have a different surcharge to avoid losses due to fluctuations in value. This is common in the industry that these surcharges are calculated and presented separately. A helper class calculates this value for each item and only show it under the final price without taxes in the template. Later, the surcharges will be added together and shown as a subtotal below. It looks good so far and everything works as it should, except the calculation of taxes.
The tax calculation uses the subtotal as a basis and not the subtotal plus the surcharges, as you can see in the snapshot of the shopping cart below. The yellow arrow shows what i want, the red one is the wrong calculation basis. I expect the VAT amount to be 3.86€ (19% of 19,86€ + 0,47€) and not 3.77€ (19% of 19,86€). So the taxes are too low.

I've done all this as described in this blog with a few modifcations: https://astrio.net/blog/magento-development-add-total-row-checkout/

My config.xml:

     <sales>
           <quote>
               <totals>
                   <***_***surcharge>
                       <class>***_***surcharge_Model_Total_***surcharge_Quote</class>
                       <after>nominal</after>
                       <before>subtotal</before>
                   </***_***surcharge>
               </totals>
           </quote>
   [...]
   </sales>

As you can see, I want to add this custom total (surcharge) before the subtotal, right after the start.

 <default>
    <sales>
        <totals_sort>
            <***_***surcharge>5</***_***surcharge>
        </totals_sort>
    </sales>
</default>

And I want to show it as the first total in the list (subtotal has the value 10, so 5 is lower). In the admin backend the tax calculation method based on pos. subtotal.

How can I force the "VAT total" to take the surcharge into account?

If you need more information, let me know and thank you in advance.


texts: Magento 2.2.5 Show product name in product id coumn

texts:
In Magento 2.2.5, I have created the admin grid using layout blocks not using UI Component.

In that, I have a product_id column. I want to show the product_name in that column.

Here is my code:

<block class="Magento\Backend\Block\Widget\Grid\Column" as="product_id">
 <arguments>
   <argument name="header" xsi:type="string" translate="true">Product Id</argument>
   <argument name="index" xsi:type="string">product_id</argument>
   <argument name="type" xsi:type="string">text</argument>
   <argument name="column_css_class" xsi:type="string">col-id</argument>
   <argument name="header_css_class" xsi:type="string">col-id</argument>
  </arguments>
</block>


texts: Can i use single Enterprise licences with Magento 1 and Magento 2

texts:
In my existing Magento 1 enterprise installation consists of 3 stores. Out of 3 only 1 store i want to migrate to Magento 2 other will be in Magento 1 enterprise.

Is it possible to use single licence for Magento 1 & Magento 2


texts: display news products in a page accessible from the menu

texts:
i would like to show my news products in a page accessible from the menu..
the version of my magento is 1.7.0.2

so i created a page named "news".
in tab design, i added this xml in the textarea (xml update layout):

'<reference name="content"><block type="catalog/product_new" name="product_new" template="catalog/product/list.phtml">
  <action method="setCategoryId"><category_id>10</category_id></action>
  <action method="setColumnCount"><column_count>6</column_count></action>
  <action method="setProductsCount"><count>0</count></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" />
     <action method="setDefaultGridPerPage"><limit>12</limit></action>
     <action method="addPagerLimit"><mode>grid</mode><limit>12</limit></action>
     <action method="addPagerLimit"><mode>grid</mode><limit>24</limit></action>
     <action method="addPagerLimit"><mode>grid</mode><limit>36</limit></action>
     <action method="addPagerLimit"><mode>grid</mode><limit>48</limit></action>
     <action method="addPagerLimit" translate="label"><mode>grid</mode><limit>all</limit><label>All</label></action>
  </block>
  <action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>6</count></action>
  <action method="setToolbarBlockName"><name>product_list_toolbar</name></action></block></reference>'

indeed i follow this tutorial : http://www.dnawebagency.com/displaying-new-products-in-magento-with-pagination/.

the problem is that this solution does not work.

On internet there are many solution to display them on the home page but not in a category page.

Thank you for all your help


texts: API searchCriteria not filter properly in status orders

texts:
I am calling orders using REST API, when I call this url:

  rest/V1/orders?searchCriteria

It works fine, and return all orders to me... but I need to filter by status, I am using:

rest/V1/orders?searchCriteria?searchCriteria[filterGroups][0][filters][0][field]=status&
                              searchCriteria[filterGroups][0][filters][0][value]=complete&
                              searchCriteria[filterGroups][0][filters][0][conditionType]=eq

This just return false, but I have orders complete on Magento. I tried with other status value and conditions types, but with no success.


texts: If change the url key of Migrated products it doesn't work,still old url is calling,on category page url key is working but strange

texts:
I have migrated from Magento 1 to Magento 2 and when updating/changing the URL key of a migrated products "Test" from "test" to "test2" still getting old URL of this product on the frontend "mydomainname/test.html" while it should be "mydomainname/test2.html".

but When I deleted old URL key and added new URL key from "URL Rewrite" module then I'm able to access product directly by new URL(mydomainname/test2.html).

Suppose this product "Test" is assigned in the category "XYZ". when I visited on XYZ category page to visit on "Test" product then instead of getting "Domainname/XYZ/test2.html" URL getting a strange URL
 for the "Test" product only.
while other migrated products URL in this category is very user-friendly ("Domainname/XYZ/urlkey.html").

Note:- I've already gone through the R&D and didn't get any useful solution.
Already performed reindexing, cache clean etc.


texts: Magento 2 Catalog Page - changing number of items per row

texts: On Catalog/Listing page, by default, the products are showing as 4 items per row whereas I want to show 3 items per row, how can I change this?


texts: Add a title="" to every-single-link in Magento?

texts:
Is there an easy or at least time saving way to add a title="" to every link we have an auto populate or is this really just a manual update?

Like pagination, buttons, main nav, categories, image links...

I know our custom html (sidebars, footer...) will have to be updated manually. I'm just wondering if there is something I can enable.


texts:
I removed the folder pub/static while in developer mode, expecting that things will generate back to the way they were. After that though, only the folder

_requirejs

got generated, so now I am missing everything - all css and js files are gone. How can I fix that problem ? Please, help.


texts: Add a loader div in between body tag and pagewrapper div

texts: I want to add a div after the body tag. How I update the layout code.


texts: How to change order status for COD order after creating invoice with not capture

texts: I have created order with status pending and state new when i am creating invoice with not capture than status is processing and same for creating ship. i want to change order status after shipping to shipped.


texts: how to get Tax/VAT number Using customer id

texts: I want Tax/VAT number in my custom form field. how to get this number in my custom module and if i m change this number than how to save Tax/VAT number please give me suggestion


texts: Cannot gather stats! Warning!stat(): stat failed for /opt/bitnami/apps/magento/htdocs/pub/media/catalog/product/I/V/IVOC01_BLUE01_01_IMG1_12.jpg

texts: I want to edit my product attribute but while click on edit button for products,the above error am getting .


texts:
New to Magento2,
I am trying to use the Indexer to reindexAll.

I tried with the objectManager, without success.

Sample :

$indexer  = $this->objectManager->create('Magento\Indexer\Model\Indexer');

$ret = $indexer->reindexAll();

  [InvalidArgumentException]  view does not exist.

How can I get  this ?
Any tips, or docs will be great.


texts: Lots of problems when migrated from 1.8.1.0 to 1.9.2.2 - one is compare sidebar

texts:
<default>
    <!-- Mage_Catalog -->
    <reference name="top.menu">
        <block type="catalog/navigation" name="catalog.topnav" template="catalog/navigation/top.phtml"/>
    </reference>
    <reference name="left">
        <block type="catalog/product_compare_sidebar" before="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
    </reference>
    <reference name="footer_links">
        <action method="addLink" translate="label title" module="catalog" ifconfig="catalog/seo/site_map">
            <label>Site Map</label>
            <url helper="catalog/map/getCategoryUrl" />
            <title>Site Map</title>
        </action>
    </reference>
    <block type="catalog/product_price_template" name="catalog_product_price_template" />
</default>

This is a custom theme code which was working with magento 1.8.1.0
but when I upgraded the magento version to 1.9.2.2 it stopped working. Checked everything if removal of this block is called or anything else that would hamper the rendering but was unable to find any such issue.
Earlier: http://awesomescreenshot.com/0e35kbq2b1
Now: http://awesomescreenshot.com/0795kbq5c3
Apart from these a lot hell of other things also stopped working.
But I tried to fix few of them but I think still there may be many prevailing, if you know the drastic effects of this upgrade from 1.8.1.0 to 1.9.2.2 please do let me know about other probs that may arise.


texts: How to remove product from collection By custom product attribute

texts:
Friends,
Facing the problem while filtering the product collection.
I have get my product collection.

$collection = Mage::getModel('catalog/product')->getCollection()
                ->addAttributeToSelect('*');

and for every product i have custom attribute called product_creator_id [code].

So I need to filter the product based on the product_creator_id.

I am Using following code to get, but Its not affecting the list

$collection->addAttributeToFilter('product_creator_id', array('in' => $productCreatorIds));

Any suggestion for this


texts:
I get the following repeated a lot in magento 1.9.1.1 system.log. any ideas?

2015-05-17T09:17:55+00:00 ERR (3): Warning: simplexml_load_string() [function.simplexml-load-string]: &lt;/layout&gt;  in /home/x/public_html/includes/src/__default.php on line 28961

2015-05-17T09:17:55+00:00 ERR (3): Warning: simplexml_load_string() [function.simplexml-load-string]:  ^  in /home/x/public_html/includes/src/__default.php on line 28961

_default code

        // custom local layout updates file - load always last
        $updateFiles[] = 'local.xml';
        $layoutStr = '';
        foreach ($updateFiles as $file) {
            $filename = $design->getLayoutFilename($file, array(
                '_area'    => $area,
                '_package' => $package,
                '_theme'   => $theme
            ));
            if (!is_readable($filename)) {
                continue;
            }
            $fileStr = file_get_contents($filename);
            $fileStr = str_replace($this->_subst['from'], $this->_subst['to'], $fileStr);
            $fileXml = simplexml_load_string($fileStr, $elementClass);
            if (!$fileXml instanceof SimpleXMLElement) {
                continue;
            }
            $layoutStr .= $fileXml->innerXml();
        }
        $layoutXml = simplexml_load_string('<layouts>'.$layoutStr.'</layouts>', $elementClass);
        return $layoutXml;
    }
}

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>
<checkout_cart_index>
        <reference name="content">
            <block name="checkout.cart">
                <remove name="checkout.cart.shipping"/>
            </block>
        </reference>
    </checkout_cart_index>
  <checkout_cart_index>
        <reference name="content">
            <block name="checkout.cart">
                <remove name="checkout.cart.coupon"/>
            </block>
        </reference>
    </checkout_cart_index>
<catalog_product_view>
    <reference name="product.info.additional">
        <action method="unsetChild"><name>product_tag_list</name></action>
    </reference>
</catalog_product_view>
 </default>
</layout>


texts: How To Display Tooltip When Customer On Mouse Hover Add to Cart Button

texts: I need to display some information before going to buy products, How can i add tooltip when customer on mouse hover the add to cart button.


texts:
I have this weird situation with displaying products in Magento. I have a file called cataloq.xml loclated in my theme folder called layout and I have the code bellow inside catalog_product_view tag:

        <reference name="root">
        <action method="setTemplate"><template>page/lp_view_page.phtml</template></action>
    </reference>

When I visit my home/index page and click on the product it is displayed in lp_view_page.phtml template file, which is ok. But when I try to open this same product from category list/grid view, Magento doesn't use lp_view_page.phtml template, it use template page for listening category products in list/grid view (lp_laptopi_list.phtml).

Any suggestions?


texts: Message queue topic "inventory.reservations.updateSalabilityStatus" is not configured after place order. Magento 2.3

texts: recently reinstalled magento v2.3.0 and after place order get Message queue topic "inventory.reservations.updateSalabilityStatus" is not configured. No success page/no refresh card/ But get order) How to fix it?


texts: Magento 2 : Get product price by sales_order_item table

texts: How can I get product price by sales_order_item table?


texts: Get Current URL from a PHTML - Magento 2

texts:
I'm struggling trying to show the current URL from a PHTML in Magento 2.

Any suggestion?


texts: Magento 2 : How do I create my own action in controller to call url from Ajax in Magento 2.x

texts:
How Do I create my own Action in Controller to  call url from Ajax in Magento 2.0.

Like in Magento 1.9 we can create any Action an any Controller and call that from URL.


texts: Magento SOAP API get disabled categories

texts:
I am working on a script (Python) which will need to get information of a category.
Simple as it seems, I thought. Well, I am bumping on the problem that I can't recieve the ID's of disabled categories.
My script gets the root catalog first. Getting "all_children", I will iterate over every child. Getting "all" the information I need.
Well, it seems that all_children does not have the ID's of disabled categories.
This is an issue for me.
So my question is; How do I get the ID's of disabled categories?
I am using the catalog_category.info call. catalog_category.tree was kind of too confusing for me so I thought it would be better to just use catalog_category.info just for the sake of simplicity. Expecting to get all the information I needed from the catalog_category.info.
So is there a way to get it without using the tree call?
Any information, alternatives, guides or anything else will be appreciated.

P.S. Why would Magento API not return literally ALL children? Why does it skip the disabled ones?


texts: Magento 1.9 RWD responsive breakpoint/media query iPad (4 and 1,2) landscape and separately iPad portrait

texts:
I need to add specific styles for my Responsive site for iPad landscape, but also iPad portrait. What are breakpoints (like @include bp(max-width, $bp-medium) {} ?), which effect separately:

only iPad 4 landscape
only iPad 1 or 2 landscape
only iPad 4 portrait
only iPad 1 or 2 portrait

Or maybe some new mixins which i can add?

I really need this because i have to style the menu and icons on iPad Landscape and Portrait.


texts:
I have implemented Redis cluster in my local machine with three masters and three slaves. I did all the required configuration in my app/etc/env.php file and when I am accessing the project url, it shows fatal error as follows.

Fatal error: Uncaught exception 'CredisException' with message 'MOVED 12307 127.0.0.1:7002' in /opt/lampp/htdocs/magento2/lib/internal/Credis/Client.php:1022 Stack trace: #0 /opt/lampp/htdocs/magento2/lib/internal/Credis/Client.php(788):

Any idea how to fix this ?I have checked the similar questions posted here, but unfortunately couldn't find any solution.


texts: Product custom attribute display in backend

texts:
I have created one order from backend in Magento 2.0.7 and selected item for order at that time.

I want to display product custom attribute Best Price with item details.

How can I do this?


texts:
How to add active state to CMS Page in Top Menu?
I get active class if i'm on category page.
I'm add items to Top Navigation used categories rewrites urls in magento.

I need help.


texts:
I have an array:

$type = array(
    0 => "Car",
    1 => "SUV",
    2 => "Truck",
    3 => "Bike"
);

When a user selects the options from a form, the associated value is stored in a database.

I want this info to be displayed on another page in a table. Currently it only displays the database saved value (0,1,2,3), but i want it to show as ((Car, SUV, Truck, Bike). How do i do this?

I need a way to make it know that 0=Car, 1=SUV, 2=Truck, 3=Bike.

heres what the table looks like now:

The make column represents the vehicle manufacturer (Toyota, Honda, etc)and type represents (Car, SUV, Truck, Bike).


texts: I want to add orginal price, price, discount amount on order email template

texts:
I want to add 3 more columns on order email template (Table section). I found the good solution to add column into table:

http://www.magebuzz.com/blog/add-unit-price-to-order-email-template/

however, I don't know how can I get these values from order

Original item price
Item price
Discount amount

I'd be grateful for any guidance.

Thanks,

Ryo


texts: Magento Google analytics after body tag - Using Only Dashboard

texts: I need to add my Google Tag manager code after body tag, but I can't access my files, I need to do with this in my Magento dashboard. is it possible?


texts:
I have some problems with form_key when default FULL PAGE CACHE enabled. And i found out that page-cache.js doesn't load in head section. And there is no "X-Cache:" headers. I've tried everything..

Why can it be? And how it should loading?

Solved! Solution is here - https://magento.stackexchange.com/a/291924/83140


texts: Add product translations throught API (SOAP or REST)

texts: is it possible to add product translations using the SOAP or REST API?


texts: Magento 2 how to get customer data in Observer in customer_account_edited event?

texts:
I'm trying to get customer Id, first name, last name , email and Address info after customer_account_edited event is triggered, but I'm getting error 500 and the error is Uncaught Error: Call to a member function getId() on null in

Here is my code

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();

        $customer = $observer->getEvent()->getCustomer();

        $customer_id_temp = $customer->getId();
        $customer_id = $customer_id_temp;

        $customer_email=$customer->getEmail();
        $first_name= $customer->getFirstname();
        $last_name= $customer->getLastname();
        $customer_name = $first_name." ".$last_name;

        $session = $this->customerSession->getMyValue();
        $referrer_user_id = $customer_id."Test";
        //$customer_agent = $_SERVER ['HTTP_USER_AGENT'];

        //Billing Address variables

        $billingID = $customer->getDefaultBilling();
        $billingAddress = $objectManager->create('Magento\Customer\Model\Address')->load($billingID);
        $billingCompany = $billingAddress->getCompany();
        $billingTelephone = $billingAddress->getTelephone();
        $billingZipcode = $billingAddress->getPostcode();
        $billingCity = $billingAddress->getCity();
        $billingRegion = $billingAddress->getRegion();
        $billingStreet = $billingAddress->getStreet();
        $billingAddress1 = $billingStreet[0];
        $billingAddress2 = "";
        if(isset($billingStreet[1])){
            $billingAddress2 = $billingStreet[1];
        }

        //Shipping Address variables
        $shippingId = $customer->getDefaultShipping();
        $shippingAddress = $objectManager->create('Magento\Customer\Model\Address')->load($shippingId);
        $shippingCompany = $shippingAddress->getCompany();
        $shippingTelephone = $shippingAddress->getTelephone();
        $shippingZipcode = $shippingAddress->getPostcode();
        $shippingCity = $shippingAddress->getCity();
        $shippingRegion = $shippingAddress->getRegion();
        $shippingStreet = $shippingAddress->getStreet();
        $shippingAddress1 = $shippingStreet[0];
        $shippingAddress2 = "";
        if(isset($shippingStreet[1])){
            $shippingAddress2 = $shippingStreet[1];
        }

        // If customer data is empty then doesn't need to process
        if (!$customer) {
            return $this;
        }

I want to get this data after the user edit his account.
Also, is there another way to get Billing and Shipping address without using Object Manager? like with Dependency Injection.


texts: 1.9 - Add custom column to Sales Order Create Grid

texts:
I've copied

app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid.php

To

app/code/local/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid.php

And added ->addAttributeToSelect('brand') within _prepareCollection()

Within _prepareColumns() I have added:

$this->addColumn('brand', array(
  'header'    => Mage::helper('sales')->__('Brand'),
  'width'     => '80',
  'index'     => 'brand'
));

I now have the Brand ID in the Sales Order Create Grid.

However I want to see the brand name rather than ID (The brand is a dropdown within admin).

How do I display the option value rather than ID?
ie. "Brand Name" rather than "47"


texts: Insufficient information to create shipping label(s) Magento Enterprise

texts:
I am using Magento Enterprise 1.14.0.1
I have Fedex Shiiping method activated and have entered in the information for production that was provided and confirmed by Fedex to be correct for the account ID, Meter, Password, and the key. I have sandbox set to no since the credentials are for production. I have a Max package weight set packaging set to "Your Packaging" and the "drop off" set to regular pickup as we have a driver that comes everyday.

My issue is when I click the button to create a shipment and then enter the total weight and then add the product and click the check box and add the product to the shipment. I then click OK and get an error message that says

Insufficient information to create shipping label(s). Please verify your Store Information and Shipping Settings.

I do not know what to check to fix this.


texts: Check Some Condition Before Product added to cart

texts:
I want to add product to cart. So when i click on the add to cart button i will be checking some condition like some variable is set or not. If it is set, product will be added to cart. If not set, the product should not be added to cart.

for this i was using observer called controller_action_predispatch_checkout_cart_add

I can wrote a condition to check variable is set or not.if it is not set i want to come out of the observer. I mean product should not added to cart.

Please Help Me.

Thanks In Advance


texts: How to override the sales > order > Create new orders button in magento 2

texts:
I am new to Magento 2.

I tried overriding sales > order > Create new orders button from Admin panel.
I am not getting the proper XML file to override.

I found

  vendor/magento/module-ui/view/base/templates/control/button/default.phtml

and block file
Magento\Ui\Component\Control\Button.

Can anyone help me in overriding this?


texts:
I created a custom module for applying custom coupon code programmatically in magento 2.
For shopping cart rule.

I have only coupon code with block and model collection check below image.

How can do it ? Any suggestion for that ?


texts:
I am trying to find where in the template files I can add microdata to my products gallery images, but struggling to find the template/file that actually outputs the HTML img tags.

I am actually adding this to all relevant elements of a product detail page (description, sku, price, etc, etc, etc), however the image was the first on my list to do, and already can't locate the file!!

Can someone help point me directly to the right place?

Magento 2.1.6 using Ultimo theme.


texts: Magento2.3.2: Unable to go to payment method, Stucked at shipping method

texts:
My website is : https://www.depoto.com
When i tried to checkot the product, Its not going to next step. After entered the address, its not going to payment method step. Its just loading only.
Please see the attachment:


texts: Magento 2 - Pass/Inject data into DataProvider

texts:
I've created a DataProvider to feed data to an ui_component product listing which is displayed in a modal overlay. The modal should display products from a specific subcategory (each subcategory has a Select Products button).

<?php

namespace My\Module\Ui\Product;

use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory;
use Magento\Framework\DataObject;
use Magento\Framework\Exception\LocalizedException;
use Magento\Ui\DataProvider\AbstractDataProvider;

/**
 * Class DataProvider
 */
class DataProvider extends AbstractDataProvider
{
    /**
     * @var array
     */
    private $loadedData;

    /**
     * DataProvider constructor.
     * @param string $name
     * @param string $primaryFieldName
     * @param string $requestFieldName
     * @param CollectionFactory $collectionFactory
     * @param array $meta
     * @param array $data
     * @throws LocalizedException
     */
    public function __construct(
        $name,
        $primaryFieldName,
        $requestFieldName,
        CollectionFactory $collectionFactory,
        array $meta = [],
        array $data = []
    ) {
        parent::__construct($name, $primaryFieldName, $requestFieldName, $meta, $data);

        $this->collection = $collectionFactory->create()->addAttributeToSelect(
            'sku'
        )->addAttributeToSelect(
            'name'
        )->addAttributeToSelect(
            'attribute_set_id'
        )->addAttributeToSelect(
            'type_id'
        )->addAttributeToSelect(
            'price'
        );

        $this->collection->joinField(
            'qty',
            'cataloginventory_stock_item',
            'qty',
            'product_id=entity_id',
            '{{table}}.stock_id=1',
            'left'
        );
    }

    /**
     * @return array|DataObject[]
     */
    public function getData(): array
    {
        $this->loadedData = $this->getCollection()->getItems();

        foreach ($this->getCollection()->getItems() as $item) {
            $this->loadedData['items'][] =  $item->toArray();
        }

        return $this->loadedData;
    }
}

<dataSource name="product_listing_data_source" component="Magento_Ui/js/grid/provider">
    <settings>
        <filterUrlParams>
            <param name="cache_key">*</param>
        </filterUrlParams>
        <updateUrl path="mui/index/render"/>
    </settings>
    <aclResource>Magento_Catalog::products</aclResource>
    <dataProvider class="My\Module\Ui\Product\DataProvider" name="product_listing_data_source">
        <settings>
            <requestFieldName>id</requestFieldName>
            <primaryFieldName>entity_id</primaryFieldName>
        </settings>
    </dataProvider>
</dataSource>

When the Select Products button is clicked an AJAX call is made. This will eventually call the data provider and return the product list. At the moment I'm getting all the products in the site. What I need is a list of products filtered by the subcategory_id (corresponding to each Select Products button).

        <button data-bind="click: function(data, event) { $parent.openModal($parent, data, event) }" class="secondary action right">

        </button>

So in order to achieve my goal I need to pass the subcategory_id to the DataProvider and use it to filter the collection. Is there a way / what would be the best way to pass/inject the subcategory_id into the DataProvider?

I've turned the Internet and M2 docs upside-down and couldn't find a way.


texts: Remove Scroll from webpage on mobile view

texts:
Url : http://projects.wbcomdesigns.com/vtc/all-courses/

This page is working fine in desktop view and also after doing inspect element in chrome and mozila no scroll in site but in mobile device it has a big scroll in page and i am stuck here from 3 days.please provide me solution as soon as possible.


texts:
I am using magento 2.3 version. I want to add anchor tag after product attribute Name. I tried with adminhtml_catalog_product_edit_prepare_form observer but not working.
I also tried with JS but not able to add <a class= "product-fuc allow_personalization" href="#" onclick= "sendapproval(this)"> Need Apprvoal after product name.
Please help me


texts: how do I change the template used in wordpress magento integration by fishpig

texts:
I have recently installed the magento wordpress instegration by fishpig.
extension located here
I have installed it correctly and it works fine however the default template is set to 2columns-left.phtml and I wanted to change this to the 3columns.phtml template...how could I do this


texts: Magento 2 : Run command line without prompt confirmation

texts:
When I run:

bin/magento setup:config:set --http-cache-hosts=172.xx.xx.xx

I get a command prompt:

Overwrite the existing configuration for http-cache-hosts?[Y/n]

I want to use this into a bash script so I do not want user interaction.

I can do it by using a hackish way, but I do not like it:

yes Y | script.sh

Is there a way to force this to use the default value Y?


texts: What is the function of static attribute "category_ids" in "eav_attribute" table in 1.7?

texts:
Try this query on Magento versions 1.5 and 1.7:

SELECT *
FROM  eav_attribute
WHERE  backend_type LIKE  'static'
AND  entity_type_id =4

In 1.5, every row represents a field in the catalog_product_entity table:

created_at
has_options
required_options
sku
updated_at

But in 1.7, an additional attribute category_ids does not appear in catalog_product_entity.

What is it for? Why was it added?


texts: Can I use same URL key for both the Product and Category?

texts:
I'm facing an issue with redirecting the Category page. We are using the same URL key for both the Category and Product. When I click the link which should be redirected to Category but it's not doing that, instead, it's redirecting to the Product page.

So, I want to know whether we can use the same URL key for both the Category and Product page.

Please comment.

Looking forwarding to your reply.


texts: I want to change the shipping method to be set according to the user country.I mean if a user select country A then he should be having shipping method say fed-ex for country A.And if he chose country B then method should be upsc of country B.Any suggestions?


texts:
I would like to have a section on my product page where customers can view my products using Turn.js (if there are any other similar plugins let me know!). I currently have an empty block setup.

Is there a way to implement turn.js into that block? The end goal is to upload a couple of images for each one of my products and have it displayed there.

If you need more information feel free to ask!


texts:
Events do not work when I go to the product page.

  events.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="adding_to_cart_before">
        <observer name="attributesProduct" instance="Ronis\SameDayDelivery\Observer\DayDelivery" />
    </event>
</config>

  DayDelivery.php

<?php

namespace Ronis\SameDayDelivery\Observer;

use Magento\Framework\Event\ObserverInterface;

class DayDelivery implements ObserverInterface
{
    protected $resultPageFactory;

    /**
     * @var \Magento\Checkout\Model\Cart
     */
    protected $_cart;

    /**
     * [__construct description]
     * @param \Magento\Framework\App\Action\Context $context [description]
     * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory [description]
     * @param \Magento\Checkout\Model\Cart $cart [description]
     */
    public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Magento\Framework\View\Result\PageFactory $resultPageFactory,
        \Magento\Checkout\Model\Cart $cart
    ) {
        $this->resultPageFactory = $resultPageFactory;
        $this->_cart = $cart;
        parent::__construct($context);
    }

    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/daydelivery.log');
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);

        $productInfo = $this->_cart->getQuote()->getItemsCollection();
        $logger->info('-------------------------');
        foreach ($productInfo as $item){
            $item->getProductId();
            $logger->info($item->getProductId());
            if($item->getProductId() == '1')
            {
                echo "Item available in cart";
            }
            else
            {
                echo "Item not available in cart";
            }
        }
    }
}


texts:
I am getting this error when trying to import my products from backend through csv.

  file format: csv. error getting: Product with specified super products
  SKU not found in rows: 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
  32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
  49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
  66, 67, 68, 69, 70

Can any one help me to solve it?
thank you


texts:
Synopsis

All I want to do is implement a 'form' to the right column of my magento store.  Problem is I have a custom theme which removes right and implements their own view.

Right now, I couldn't care less where this form is displayed, I just want it to display something, somewhere.

If I hack the view similarly to the following, my form works:

<?= $this->getLayout()->createBlock('quickadd/checkout_form_quickadd')->setTemplate('vendor/quickadd.phtml') ?>

The contents of my template is output.

When I use the stupid layout.xml <update handle=""> junk that Magento implements I get this error:

  PHP Fatal error:  Call to undefined method Mage_Core_Model_Layout_Element::getIsAnonymous() in /home/elusr/public_html/app/code/core/Mage/Core/Block/Abstract.php on line 694

I don't understand what's going on...

example code:

File: config.xml

...
<global>
    <helpers>
        <quickadd>
            <class>Vendor_QuickAdd_Helper</class>
        </quickadd>
    </helpers>
    <blocks>
        <quickadd>
            <class>Vendor_QuickAdd_Block</class>
        </quickadd>
    </blocks>
</global>

...

<frontend>
    <layout>
        <updates>
            <quickadd>
                <file>vendor/quickadd.xml</file>
            </quickadd>
        </updates>
    </layout>
</frontend>

File: vendor/quickadd.xml
<layout>
    <vendor_quickadd>
        <reference name="product.info">
            <action method="insert">
                <block type="quickadd/checkout_form_quickadd" name="quickadd" template="vendor/quickadd.phtml" />
            </action>
        </reference>
    </vendor_quickadd>
    <catalog_product_view>
        <update handle="vendor_quickadd" />
    </catalog_product_view>
</layout>


texts: how to install varnish cache in magento2 using localhost

texts: How to install the varnish cache in magento2. I need setup the varnish cache in my system localhost. can anyone please guide me.


texts: How to add a date column in Search Terms Grid Magento 2.3

texts: I need to add the updated_at date column in the Magento search term grid. the field is presented in the search_query table. I'm trying to override layout  vendor/magento/module-search/view/adminhtml/layout/search_term_grid_block.xml to add a new column. but failed my attempts please suggest any way for the same. thanks for your help.


texts: Recalculate discount after change in order

texts:
Is it possible to recalculate discount applied to order after some changes done in it?

For example: customer has ordered to 2 products and discount 10% was applied to order, we remove one of order items and discount rules are not met for this case.


texts: Magneto2 : What are the Tables effected when an order created

texts: I am creating custom attributes and magento 2.2.6 and I just want the list of the tables effected after an order creates successfully.


texts:
I am trying to pass variable to js but it is not working.

My phtml code is like this-

<script type="text/x-magento-init">
    {
        ".open-modal-form": {
            "Vendor_Mod/js/modal-form": {
                "formUrl": "<?php echo $block->getFormAction() ?>"
            }
        }
    }
</script>

My js code is like this -

define(
        [
            'jquery',
            'Magento_Ui/js/modal/modal'
        ],
        function(
            $,
            modal
        ) {

            var options = {
                type: 'popup',
                responsive: true,
                innerScroll: true,
                title: 'Ask A Question',
                buttons: [{
                    text: $.mage.__('Submit Question'),
                    class: '',
                    click: function () {
                        var form_data = $("#popup-modal").serialize();

                        $.ajax({
                            url: options.formUrl,
                            type: 'POST',
                            data : form_data,
                            success: function(data){
                                console.log(data);
                            },
                            error: function(result){
                                console.log('no response !');
                            }
                        });

                        this.closeModal();
                    }
                }],
                /**
                 * Escape key press handler,
                 * close modal window
                 */
                escapeKey: function () {
                    if (this.options.isOpen && this.modal.find(document.activeElement).length ||
                        this.options.isOpen && this.modal[0] === document.activeElement) {
                        this.closeModal();
                    }
                }
            };
            var popup = modal(options, $('#popup-modal'));
            $(".open-modal-form").on('click',function(){
                $("#popup-modal").modal("openModal");
            });

        }
    );

I have tried - options.formUrl, and this.options.formUrl. If I use require nothing works, but if I use define the code works but only within the function as shared here - How to pass variable to external js in magento 2

Can someone help. I am basically trying to submit the form using Ajax, but in different JS file. I don't want to code the js within the phtml file.


texts: Add customer to cart with SOAP - View on FE

texts:
When I call "shoppingCartProductAdd" it adds the specific customer to the cart and displays it when I call "shoppingCartInfo". However it does not show up in the cart from the customer on the frontend.
Is it possible to add a customer to an existing cart (also created with SOAP API) and display it on the frontend? Or is this not the scope from the API?

My SOAP calls:

Creating the shopping cart:

<x:Envelope xmlns:x="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:Magento">
    <x:Header/>
    <x:Body>
        <urn:shoppingCartCreate>
            <urn:sessionId>{sessionId}</urn:sessionId>
            <urn:storeId>1</urn:storeId>
        </urn:shoppingCartCreate>
    </x:Body>
</x:Envelope>

Adding a product to the cart

<x:Envelope xmlns:x="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:Magento">
<x:Header/>
<x:Body>
    <urn:shoppingCartProductAdd>
        <urn:sessionId>{sessionId}</urn:sessionId>
        <urn:quoteId>682</urn:quoteId>
        <products>
            <product>
                <sku>testproduct</sku>
                <qty>1</qty>
            </product>
       </products>
       <urn:storeId>1</urn:storeId>
   </urn:shoppingCartProductAdd>
</x:Body>

Set the customer from the cart

<x:Envelope xmlns:x="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:Magento">
    <x:Header/>
    <x:Body>
    <urn:shoppingCartCustomerSet>
        <urn:sessionId>{sessionId}</urn:sessionId>
        <urn:quoteId>682</urn:quoteId>
        <customer>
            <mode>guest</mode>
            <firstname>firstname</firstname>
            <lastname>lastname</lastname>
            <email>firstname.lastname@example.com</email>
            <customer_id>137</customer_id>
        </customer>
    </urn:shoppingCartCustomerSet>
</x:Body>


texts:
I'm currently working on magento 1.9 and wanted to add some additional text to invoice when we print in from admin panel like this :

As you can see above red numbers are the additional text for the invoice.

How do I do that in magento 1.9 ?
Please help me on this and I really appreciate if you show me step by step to achieve this.


texts:
In .htaccess file in magento if SetEnv variable is set how this is processed in magento.
For example:

SetEnv MAGE_RUN_CODE store

How does this works in magento index.php and displays the corresponding store.


texts: Positioning a block in product detail, magento 2

texts:
I've been looking for positioning a block (it's a banner image). In the product details section, my layout is set in '3columns', I want to insert it in top of the three columns, inside of the container div (its class is "columns")

I've created a static block, then a widget to positioning; and the positions available aren't the one i'm looking for.

If you want to know, I would like to change the structure of the 3 columns + my block

Thanks!


texts: Magento 1.9.3 : How to display custom options price (separately) on cart and checkout page?

texts:
I want to display custom option price on cart and checkout page.

I follow this URL but its display error "Fatal error: Call to a member function getValue() on a non-object " on

app/design/frontend/default/theme/template/checkout/cart/item/default.phtml

    $optionId = $_option['option_id'];
    $product = $_item->getProduct();
    $option = $product->getOptionById($optionId);
    $itemOption = $_item->getOptionByCode('option_' . $option->getId());
    $price = false;
    foreach ($option->getValues() as $values) {
        if ($values->getId() == $itemOption['value']) {
            $price = $values->price;
        }
    }
    if ($price !== false) {
        echo Mage::helper('core')->currency($price);
    }

Reference URL : https://stackoverflow.com/questions/11966256/magento-custom-options-showing-price-in-cart-checkout-page

I have another requirement with custom option price on cart and checkout page.

Please open below link and check "Interested in Embroidery" checkbox. Some options will show which are product custom options.
Here, two options have price "Logo Creation Fee" and "Embroidery Logo Charge". When I select all options and add to cart. On cart page, If I increase product quantity, all option's price increase with quantity. But I want that when product quantity increase, only "Embroidery Logo Charge ($35)" custom option varies with quantity not "Logo Creation Fee($300)".

Example: If the product price is $50 and product have two custom options like- "  Logo Creation Fee ($300)" and "Embroidery Logo Charge($35)". When we add the product(quantity 1) in a cart with both custom options (subtotal is $385).

Subtotal is: (product price ($50) + Logo Creation Fee ($300) + Embroidery Logo Charge($35)) * 1 = $385

Now, we increase product quantity (2) then subtotal is :

Subtotal is: (product price ($50) + Logo Creation Fee ($300) + Embroidery Logo Charge($35)) * 2 = $770

But I want to change in subtotal. I want subtotal like this :

Subtotal is: ((product price ($50) + Embroidery Logo Charge($35)) * 2) + Logo Creation Fee ($300)  =  $470 ($170 + $300)

"Logo Creation Fee ($300)" not vary with quantity, add only one quantity for one product.

Means Product's "Unit Price" display without custom option's price.

Demo URL : http://superbuniforms.com/magento/medical-lab-coat-unisex-sky-blue.html

Please suggest.

Thanks!


texts:
Just found a kinda working code

<?php
$qtd = Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty();

if ( $qtd == 999 ) {  ?>

    <button type="button" title="SOB ORÇAMENTO" id="product-addtocart-button" class="button_green btn_cart" onclick="setLocation('<?php echo $this->getUrl(contacts) ?>')">SOB ORÇAMENTO</button>
<?php  }
elseif ( $qtd == 0 ) {  ?>

<?php echo $this->__('Out of stock') ?>

<?php }
else {  ?>

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

 <?php } ?>

this is basically what I want, I think it's easy to understand, but I still have some kind of error, the title "sob orçamento" goes even when the quantity it's 0

the elseif it's not working somehow


texts: Move theme layout elements on a product view from within a Module Magento 2

texts:
I am having trouble moving the short description on the product page. I tried with the move command within the layout file without any luck. I can move any new created block where I want but I can't modify theme declared layout blocks.

Location of my layout xml file

  Vendor/Module/view/frontend/layout/catalog_product_view.xml

Layout file code

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>

        <referenceContainer name="content">
            <block class="Test\Catalog\Block\Rewrite\Product\View" name="product.seller.list" template="test.phtml" />
        </referenceContainer>

        <!--This works as created above-->
        <move element="product.seller.list" destination="product.info.main" after="product.info.review"/>

        <!--This does not work-->
        <move element="product.info.overview" destination="product.info.main" after="-"/>

    </body>
</page>

If I modify the theme layout file the move works. Any help will be great


texts: Add sign-in and Create Account link in custom header

texts:
I have created a custom header.phtml file to make my custom header.
See https://prnt.sc/r7dtnu
Now I want to add Sign in and Create an Account link in this.
How can I add here?


texts: New input field in store information section

texts:
I need new data field in store information section, like I show in image below.

I tried this tutorial, but it does not work.


texts: How to delete specific product images from Magento 2 database and physical images from folder?

texts:
Deleting selected product / SKU images from Magento 2 database and the physical images files from the media product catalog folders which are dynamically created by Magento during image upload.

Locate the image and image physical path. In the database, the images and the physical path reference of the images are stores in the below 3 tables

catalog_product_entity_media_gallery
//This is where the physical
image path is stored
catalog_product_entity_media_gallery_value
//This table has the storeid, valueid, product entity id and the
position of the images
catalog_product_entity_media_gallery_value_to_entity //This table is
where the mapping between the product entity id and valueid mapping
done.
And the images are stored physically under magento2rootpath/pub/media/catalog/product/x/x/x

First step is to identify the physical path of the server and delete from the media --> catalog --> product path, I used the below query to create a file with remove command and the image physical path on the server.

This example was executed on Ubuntu 16.04, the below commands and sql querie. Will run on any Linux distro and Mysql.
Basically create a file with the below command to delete the images,

run the below query on the command prompt.

 - mysql -u username -p databasename -e "select concat('rm -f
   /home/magento2rootpath/pub/media/catalog/product',value) from
   catalog_product_entity_media_gallery  where value_id in (select
   value_id from catalog_product_entity_media_gallery_value_to_entity
   where entity_id in (select entity_id from catalog_product_entity
   where sku in ('SKU1','SKU2','SKU3'))) and attribute_id=90;" >
   imagefilestodelete.sh

In my case, Magento is installed in folder /home/magento2rootpath - replace with your actual magento root path and replace SKU1, SKU2, SKU3 with your actual product SKU
Output of the generated file imagefilestodelete.sh
rm -f /home/magento2rootpath/pub/media/catalog/product/4/m/4m6a6330.jpg
rm -f /home/magento2rootpath/pub/media/catalog/product/4/m/4m6a6332.jpg
rm -f /home/magento2rootpath/pub/media/catalog/product/4/m/4m6a6333.jpg
rm -f /home/magento2rootpath/pub/media/catalog/product/4/m/4m6a6335.jpg

From the CLI run the below command

sh imagefilestodelete.sh

Now that we have deleted the physical image files from the media catalog respective image path folder, we will now need to remove the same from database, I used the below sql queries in the same order to remove the file references from database.

Remove the image references from the respective tables in Magento

Login to your mysql with user having privilege to execute delete
queries

 - delete from catalog_product_entity_media_gallery where value_id in
   (select value_id from catalog_product_entity_media_gallery_value_to_entity where entity_id
   in (select entity_id from catalog_product_entity where sku in
   ('SKU1','SKU2','SKU3'))) and attribute_id=90;

 - delete from catalog_product_entity_media_gallery_value_to_entity
   where entity_id in (select entity_id from catalog_product_entity
   where sku in ('SKU1','SKU2','SKU3'));

 - delete from catalog_product_entity_media_gallery_value where
   entity_id in (select entity_id from catalog_product_entity where sku
   in ('SKU1','SKU2','SKU3'));

NOTE: Before you execute the above delete queries, run SELECT to check the entries. To do that replace delete from above queries to SELECT *
This way it was easier for me to delete images for specific products on production and not truncate the entire tables.


texts: In Stock/Out of stock not updating correctly when manage_stock is set to no

texts:
I have a simple product with a qty of 0. I'm setting the manage_product to 0 like this:

$

product = Mage::getModel("catalog/product")->load($nextId);

        $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product->getId());

        $stockItem->setData('use_config_manage_stock', 0);
        $stockItem->setData('manage_stock', 0);
        $stockItem->save();

However, even though the quantity is 0, when I call $product->getStockStatus(); in another script, it's returning the product as in stock!

I tried reindexing, checked that the quantity to put out of stock is 0 in the configuration tab, but nothing seems to work. I even tried changing manage_stock from the CMS, but it still doesn't fix it.

Why is that happening?
How can I solve this issue?


texts: magento 2 affects of attributes and attribute sets on speed

texts:
I am working on new magento 2.2.6 site from stracth and need to design attribute sets and its attribute.

I am quite confused about how can we design attributes that won't affect speed of size or minimum affects to speed.

We have 13 attributes set and many attributes are common to attributes sets. for example size attribute falls under 3 to 4 attribute sets.

Can we create more attributes and have minimum number of attributes under particular attribute sets which might takes less load of speed.

Are there any one who knows best setup of attributes.

Thanks


texts:
Currently trying to upgrade to the newest magento 2.3 using a script.
https://devdocs.magento.com/guides/v2.3/comp-mgr/cli/cli-upgrade.html
Whenever I type:

php -f pre_composer_update_2.3.php -- --root='<path/to/magento/install/dir>' --repo=https://repo.magento.com/ <options>

I get:
bash: syntax error near unexpected token `newline'

After root I would type '/home/something/public_html/' --repo blabla.

Could anyone point me in the right direction?


texts: getTierPrices() only working for the product page, not the previous one

texts:
On the page where I show some previewed products I can't get the getTierPrices() value. When I export that information on a span tag:

<span class="price">
<?php
   echo 'From '.$this->getTierPrices()[2]['formated_price'];
?>
</span>

And on the catalog page I do get that information by using the getPriceHtml.
So the code out there is:

<?php echo $this->getPriceHtml($_product) ?>

Do anyone know why I can see the tier priced value on the catalog product but nothing on the previous page?

Edited:

I finally found a way to do it.
On the product list page I changed the code for:

$_coreHelper->formatPrice($_minimalPriceValue, false)

which refers to:

$_store->roundPrice($_store->convertPrice($_product->getMinimalPrice()));

So it seemed there was a variable with the information I wanted there which I could use. Doing this I got 0,00€ on the product page so I decided to change the $this->getPriceHtml($_product) for:

$_tierPrices = $this->getTierPrices();

$countprice = count($_tierPrices);

echo "From: ".($_tierPrices[--$countprice]['formated_price']);

With this "function" I get the lesser price from the tierprices as I move to the last array data.


texts: Magento 2 Admin- Invalid data provided for linked products

texts:
Getting an error

  " Invalid data provided for linked products "

when adding related products to a product from the admin panel and saving

Indexer crons, already setup

Magento CLI version is : 2.1.1

How can I fix it or use database to add the related products ?

I have imported products from Magento 1.9 using the magento data-migration-tool

Also getting error in the admin panel if I move a category from one parent to another, I have to go to database to make the change for that