texts: Dynamically display the products which price is greater than some amount in specific category

texts:
I have a category Costly Products. I have some products which price are costly(e.g 50000INR). So, in that category, I need to display/list the products which are greater than 50000INR dynamically.

Note : I don't want to assign the costly products to that category. If I add the products(greater than 50000INR), it will automatically listed in that category.

What's the possibility to get this? Any ideas welcomed with thanks.


texts: Recharge Shipping and handling amount do to glitch

texts:
We currently have been working on customizing the backend of Magento to Work for back orders. We thought we had everything in place and working and it was. The problem we noticed after a couple days is that all the invoices were not charging for Shipping. It would list the shipping charge but was not capturing the charge.

For Example:
- Subtotal: 18.28
 - Shipping and Handling: 20.65
 - Tax: 1.51
 - Grand Total: 19.79

As you can see the issue is that with the customization that we made tho the site. The problem is we have 50 invoices that have charges that do not include the shipping and handling in them.

I have tried setting the order state and status to many different states and statuses but have been unable to charge the remaining amount. I need to be able to charge for the shipping and handling costs of this order.

Things i have considered:

Redoing the orders
Reinvoicing the orders.
Manually charging the client.
Manipulating a partial pay extension to work.

Has anyone ran into the same issue before?

All of these I would like to avoid if someone has a theory on how I could handle it. Any help is greatly appreciated.


texts:
Requirement:

There will be five stores/websites. In the future, it will be more.
Approx. 1M + products across the stores.
Third-party integrations and product data sync.


texts:
I got error (not available in allowed currencies)

Sorry, the default display currency you selected is not available in allowed currencies.


texts: Magento2 - Product Collection with custom condition

texts:
What is the best practice for adding custom condition of following collection?

Category view detail page product collection
Search page product collection

Give me some advice for that. How can I add condition with magento 2 default collection functionality.

Thanks in advance!


texts: Magento 1.9.3.6- Performance Suddenly Decreased

texts:
Code Profiler   Time    Cnt Emalloc RealMem
mage    25.4225 1   0   0
mage::dispatch::routers_match   25.3104 1   0   0
mage::dispatch::controller::action::catalog_category_view   25.2373 1   0   0
frontend/default/sanorita/template/page/2columns-left.phtml 23.6426 1   8,290,952   8,912,896
frontend/default/sanorita/template/page/html/head.phtml 16.3933 1   489,488 524,288
frontend/base/default/template/catalog/category/view.phtml  5.6521  1   5,057,944   5,505,024
mage::dispatch::controller::action::catalog_category_view   15.5733
layout/db_update: MAP_popup 15.5236 1   0   0
layout/db_update: SHORTCUT_popup    15.5220 1   0   0
layout/db_update: SHORTCUT_uk_popup 15.5203 1   0   0
layout/db_update: product_list  15.5186 1   0   0
layout/db_update: catalog_category_default  15.5169 1   0   0
layout/db_update: CATEGORY_55   15.5153 1   0   0
layout/db_update: customer_logged_out   15.5133 1   0   0
layout/db_update: nitrogento_disable_reports_product_display_v14    15.5118 1   0   0
DISPATCH EVENT:controller_action_layout_generate_xml_before 0.0011  1


texts:
The product tittle is display at the bottom of the product image and I want to remove it.

I didn't find any settings in back end and cannot find the code for the display image.

Magento 2.2.4


texts: Add to Cart Success Message Translation issue?

texts:
<?= $block->escapeHtml(__(
    'You added product %1 to the shopping cart.',
    $block->getData('product_name'),
    $block->getData('compare_list_url')),
    ['a']
);

I have a store view of Sweden as default
and I want to translate these words in code
" You added product to  your shopping cart"
For this I have created I18n / sv_SE.csv in my child theme folder

when I run deploy command this sv_SE is not even deployed in pub  folder
also I run this command
php -f bin/magento i18n:collect-phrases -o "app/design/frontend/TemplateMonster/TemplateMonster_child/i18n/sv_SE.csv" app/design/frontend/TemplateMonster/TemplateMonster_child

How can I translate this pop up message??
Pop up
[![enter image description here][2]][2]


texts: How to get total cost and $valueFreeShipping inside file vendor/..../romcity/view/frontend/web/js/model/shipping-rates-validation-rules.js

texts:
I don't want to load shipping method on City changed, if $valuePackage < $valueFreeShipping (because the shippinig cost in this case is zero)

How can I get these two values : $valuePackage(the total cart cost) and $valueFreeShipping (if total cart cost is greater than $valueFreeShipping , the shipping cost is zero) inside the file

vendor/..../romcity/view/frontend/web/js/model/shipping-rates-validation-rules.js ?

i need something like this

 if ($valuePackage < $valueFreeShipping) {
observableFields.push('city_id'); // Load shipping method on City_id changed
}

$valuePackage and $valueFreeShipping are not defined inside the file
vendor/..../romcity/view/frontend/web/js/model/shipping-rates-validation-rules.js

Thank you!


texts: Magento 2 - Create Product attribute programmatically without InstallData

texts:
We need to create a script that creates product attributes. Product attribute comes from third-party API when creating a product its check product attribute available or not If that is not available then it creates that time product attributes.
Thank you!


texts: How to redirect to the home page from a template?

texts:
I am in catalog\product\compare\list.phtml and I want to redirect to the homepage, like this:

if($someThing) {
    // redirect to homepage
    $this->_redirect('home'); // --> doesnt work
    $this->_redirect(Mage::getBaseUrl()); // --> doesnt work
}

I tried several things, none worked so far. How do I do it right?

Thanks!


texts: Recommendations for A/B Testings a block/template

texts:
I have a form on my site for customers to request a quote on a product. The form is stored in a template file. I want to test two versions of this form. One form would ask the user to enter their email. The second form would not. Ideally I'd like to have two separate template files and A/B test the two files. The file is stored in app/design/frontend/default/.../form.phtml. The other file would be in the same directory.

Is there a plugin or the likes that can handle this sort of a/b testing?


texts: How can I set default zip code for the shipping address??


texts: How to create a plugin to track order status change in Magento2?

texts: I have to create a plugin to track if the order status changes and then trigger notification after that


texts: Unable to send and receive emails in magento 2

texts:
I have configured cronjob here is the code in crontab

*/3 * * * * /usr/bin/php-7.1 /var/www/html/bin/magento cron:run 2>&1 | grep -v "Ran jobs by schedule" >> /var/www/html/var/log/magento.cron.log
*/5 * * * * /usr/bin/php-7.1 /var/www/html/update/cron.php >> /var/www/html/var/log/update.cron.log
*/8 * * * * /usr/bin/php-7.1 /var/www/html/bin/magento setup:cron:run >> /var/www/html/var/log/setup.cron.log

Also run command php bin/magento cron:run

But unable to receive emails

after debugging I found some file in var folder
here is some message

"php_settings_verified": {
            "responseType": "success",
            "data": {
                "xdebug_max_nesting_level": {
                    "message": "Your current setting of xdebug.max_nesting_level=201.\n                 Magento 2 requires it to be set to 200 or more.\n                 Edit your config, restart web server, and try again.",
                    "error": false
                },
                "memory_limit": {
                    "message": "",
                    "error": false,
                    "warning": false
                }
            }
        }

which I found may be issue but I already edit php.ini with suggested value .

Please suggest


texts: What is the meaning of  in package module layout xml file?

texts: what is reffering this code <?xml version="1.0" ?> in system.xml and <layout version="1.0.0"> in layout custom_module.xml file ?


texts:
I have an array in this format

$dataArray = "array (
  0 =>
  array (
    'Field Val' =>'val1',
    'Field Val2' =>'val2',
  ),
  1 =>
  array (
    'Field Val' =>'val1',
    'Field Val2' =>'val2'
  )";

I want to iterate this array and return it in the format below

foreach($dataArray as $data) {
  $newArray = ['name'=>val1,'address'=>val2];
}

How can I do this? Please help.


texts: Custom widget doesn't show when added via the widget menu

texts:
I created a custom widget and it works when I add it on a page. But I want to use it more then once and prefer adding it in de content -> widget menu. But when I do that I get the following error:

1 exception(s):Exception #0(Magento\Framework\Config\Dom\ValidationException): Element 'block', attribute 'class': [facet 'pattern'] The value 'duo\Veritas\Block\Widget\carousel' is not accepted by the pattern '[A-Z][_a-zA-Z\d]*(\\[A-Z][_a-zA-Z\d]*)*'.Line: 748
Element 'block', attribute 'class': 'duo\Veritas\Block\Widget\carousel' is not a valid value of the atomic type 'blockClassType'.Line: 748

I have tried with a template file and without here are  my classes.

widget.xml file (used for both methods):

<?xml version="1.0" encoding="UTF-8"?>
<widgets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Widget:etc/widget.xsd">
<widget id="duo_veritas" class="duo\Veritas\Block\Widget\carousel" placeholder_image="Magento_Cms::images/widget_block.png">
    Carousel image
    <description translate="true">Picture and text for the homepage carousel</description>
    <parameters>
        <parameter name="photo" xsi:type="block" visible="true" sort_order="10">
            Photo
            <description translate="true">Contact photo</description>

            <block class="duo\Veritas\Block\Adminhtml\Widget\ImageChooser">
                <data>
                    <item name="button" xsi:type="array">
                        <item name="open" xsi:type="string">Choose Image...</item>
                    </item>
                </data>
            </block>
        </parameter>
    </parameters>
</widget>

First method:

<?php
namespace duo\Veritas\Block\Widget;
use Magento\Framework\App\Filesystem\DirectoryList;
class Carousel extends \Magento\Framework\View\Element\Text implements \Magento\Widget\Block\BlockInterface
{

protected function _beforeToHtml()
{
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();

    $storeManager = $objectManager->create('\Magento\Store\Model\StoreManager');
    $mediaPath = $storeManager-> getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA );

    $url = $mediaPath . $this->getData('photo');

    $this->setText(sprintf('', $url)
    );
    return parent::_beforeToHtml();
}
}

Second method (widget class):

<?php
namespace duo\Veritas\Block\Widget;
use Magento\Framework\View\Element\Template;
use Magento\Widget\Block\BlockInterface;
class Carousel extends Template implements BlockInterface
{
  protected $_template = "widget/picture.phtml";
}

Second method template file:

<?php
if($this->getData('photo')){
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();

    $storeManager = $objectManager->create('\Magento\Store\Model\StoreManager');
    $mediaPath = $storeManager-> getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA );
    $url = $mediaPath . $this->getData('photo');
}
?>
<?php if($url): ?>
  <img src="<?php echo $url ?>"/>
<?php endif;?>

Both methods show when I add it on a page but not when I add it to the via the content->widget menu I get the same errors.


texts:
I have built a custom Module for my client's site where I have been putting my overrides and observers, built a helper class, etc. It has been working fine to now.

I am trying to add a Controller, however, and it doesn't seem to be working.

I have followed a few different Tuts that all point to a simple implementation:

in my config, I added:

<?xml version="1.0"?>
<config>
...
<frontend>
    <routers>
        <flamanhelper>
            <use>standard</use>
            <args>
                <module>Flaman_FlamanHelper</module>
                <frontName>flamanhelper</frontName>
            </args>
        </flamanhelper>
    </routers>
</frontend>
</config>

my Index Controller /(located at: /app/code/local/Flaman/FlamanHelper/Controllers/IndexController.php

class Flaman_FlamanHelper_IndexController extends Mage_Core_Controller_Front_Action {
    public function indexAction(){
        echo "flaman helper controller";
    }
    public function geolocationAction(){
        echo "you are here: ";
    }
}

so should my URLs not be

http://<domain>/flamanhelper
http://<domain>/flamanhelper/index/geolocation

because I just get 404s :(

any insight will be appreciated

Edited: to add Controller path


texts: How to Join My Custom table to catalog search in Magento 2

texts:
I have my own custom table with FK of product id and my own custom sku

when customer search the product it should also be searched from my custom sku of custom table along with default search

how to do it in M2


texts: How to display price as priceA + priceB in magento?

texts:
I have three different types of catalog.

  1 - Price in terms of reward points required to buy the product.

For example a mobile phone costs 30000 INR (this is how the price is given in the admin panel). The price is shown as 30,000 Points in frontend.

  2 - Price in terms of currency (INR).

For example a mobile phone costs 30000 INR (this is how the price is given in the admin panel). The price is shown as ₹ 30,000 in frontend.

  3 - Price in terms of both reward points and currency.

For example a mobile phone costs 30000 INR, the price is given as 20000 in price attribute and 10000 in reward points attribute. The frontend should show the price as ₹ 20,000 + 10,000 Points.

  note:
      These catalogs are placed in three different stores (under a single website). So customer can only buy from a single type of catalog (no
  mixup will occur).

As you can see I've done the first two parts with the help of ET Currency Manager extension.

But how can I do the third type?

I want it to be displayed like that (₹ 20,000 + 10,000 Points) everywhere (category page, product view page, cart page, checkout page, backend: sales/order page, invoices etc.).

  Payment gateway will consider only the currency i.e. value in Rupees.
  The reward points need no validation, it'll be processed manually.

Can somebody show me the right direction?


texts:
Is there anyway that we can add between . say i need to retrieve the record to see if today falls in between the start date and end date

SELECT main_table.* FROM sample_table AS main_table WHERE (status = '1') AND '2016-09-27 20:25:14' BETWEEN start_date AND end_date


texts: Magento 2 Configerable and Bundle Image Swap / swatch

texts:
I believe this function is built into Magento now, but I cant get it to work or find any further instruction on settings,

If I have a bundle product for bulb types (A),  which has a selection of different bulbs available, all with there own image (1,2,3) I would like the images to appear in the basket and if possible on the main screen.

Desired function
When user goes in it displays the main image for the bundle,  when the user selects option 1 I would like it to swap the image for product 1(ideally from it simple child product or an uploaded image in the bundle product)  in the main screen or atleast in the basket.

I know this can be done for colours from a pre-set swatch file , but i cant see a way of doing it for other attributes from its own images.

I would also like to do the same with configurable products, based on the products selected.

actual function
no images change and no matter what is select in the basket it just shows the main bundle image thumbnail

I have checked configuration -> sales > shopping cart- and set grouped product and configurable image to "product thumbnail itself" but I don't know if I'm missing a setting in the image box, is there a label I should add to the image

I am using Magento 2.2 on a custom theme (unero)

Thanks

David


texts: Magento 2 -- 2.3.1 "Each method must have a doc block. See Magento\Eav\Api\AttributeSetRepositoryInterface::getList()"

texts:
We are installing several modules and receiving the message Each method must have a doc block. See Magento\Eav\Api\AttributeSetRepositoryInterface::getList() after the command php bin/magento setup:upgrade

I can see an explanation is given here about docblocks https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html

The problem we are facing is "where and how" are we not following standards ... a warning (actually error: because Magento crashes afterwards) is give

Question: how can we debug this and find the culprit? or can Magento be more specific where it is going wrong?

Update 24-4-19: we have disabled ALL non-core modules and removed all caches then run setup:upgrade again: and still the docblock issue remains how! on earth can the error still exist .. and we have no idea where to look

Update 25-4-19: we deleted rm -rf generated/* pub/static/* vendor/*, restored code to git from fresh install, reset file permissions, then imported DB to that point in time too. Same error.


texts:
I'm new to magento and it's already freaking me out! Not just is it slow but nothing actually seems to work like it does on tutorials/YT videos.

So, i installed magento 2.1.6 but somehow the sample data would be installed. After some research and tries, after i checked my customer view it looks like this:

 i did wrong, neither why the sample data nor any other theme won't work properly, if anyone knows or faced the same issue, please help me!
I'm working locally, so i have xampp installed.

*EDIT: YES I WANT TO REMOVE THE RED LINES?! but dont know how...


texts: Magento downloader upgrade conflict 1.9.2.0 > 1.9.2.2

texts:
I'm trying to update Magento from version 1.9.2.0 to 1.9.2.2.
Unfortunately, there is a conflict error during installation/updating.

For example when I try to upgrade a package I get the following error:

Checking dependencies of packages
Already installed: community/Lib_Js_Calendar 1.51.1.3, skipping
Already installed: community/Lib_Magento 1.9.2.2, skipping
Already installed: community/Lib_Credis 1.9.2.2, skipping
Already installed: community/Lib_Pelago 1.9.2.2, skipping
Already installed: community/Lib_Unserialize 1.9.2.2, skipping
Already installed: community/Lib_IDNA2 1.9.2.2, skipping

CONNECT ERROR: Package community/Phoenix_Moneybookers 1.9.2.2 conflicts     with: community/Mage_All_Latest 1.9.2.0
Package community/Mage_Core_Modules 1.9.2.2 conflicts with:     community/Interface_Frontend_Base_Default 1.9.2.0,     community/Interface_Frontend_Default 1.9.2.0, community/Interface_Install_Default 1.9.2.0, community/Mage_All_Latest 1.9.2.0, community/Mage_Centinel 1.9.2.0, community/Mage_Compiler 1.9.2.0, community/Mage_Core_Adminhtml 1.9.2.0, community/Magento_Mobile 1.9.2.0, community/Phoenix_Moneybookers 1.9.2.0
Package community/Lib_Varien 1.9.2.2 conflicts with:     community/Mage_Core_Modules 1.9.2.0
Package community/Lib_Google_Checkout 1.9.2.2 conflicts with: community/Mage_Core_Modules 1.9.2.0
Package community/Lib_Js_Mage 1.9.2.2 conflicts with: community/Mage_Core_Modules 1.9.2.0
Package community/Lib_Phpseclib 1.9.2.2 conflicts with: community/Mage_Core_Modules 1.9.2.0
Package community/Mage_Locale_en_US 1.9.2.2 conflicts with: community/Mage_Core_Modules 1.9.2.0
Package community/Lib_Mage 1.9.2.2 conflicts with: community/Mage_Core_Modules 1.9.2.0
Package community/Lib_ZF 1.12.10.2 conflicts with: community/Lib_Varien 1.9.2.0
Package community/Lib_Js_Prototype 1.9.2.2 conflicts with: community/Mage_Core_Modules 1.9.2.0, community/Lib_Js_Mage 1.9.2.0
Package community/Lib_ZF_Locale 1.12.10.2 conflicts with: community/Lib_ZF 1.12.10.0

Checking dependencies of packages
Already installed: community/Lib_Credis 1.9.2.2, skipping

CONNECT ERROR: Package community/Cm_RedisSession 1.9.2.2 conflicts with: community/Mage_All_Latest 1.9.2.0

Checking dependencies of packages

CONNECT ERROR: Package community/Lib_Js_Mage 1.9.2.2 conflicts with: community/Mage_Core_Modules 1.9.2.0
Package community/Lib_Js_Prototype 1.9.2.2 conflicts with: community/Mage_Core_Modules 1.9.2.0, community/Lib_Js_Mage 1.9.2.0

Some comments (for testing purpose)

Removed the .htaccess file(s)
Removed magento_all_latest.txt
Removed pkginfo
Deleted all caches
Disabled all caches
Changed the permissions


texts: How to extend magento 2 product rest api

texts:
I am trying to get the value of product searchCriteria in the custom module.
By using that value I need to add some data in response API
@return \Magento\Catalog\Api\Data\ProductInterface
Now custom module totally overrides v1/products/ API.
How can I include custom module value in this return type @return \Magento\Catalog\Api\Data\ProductInterface


texts:
I am trying to create a structural block on login page using below code.

<layout version="0.1.0">
    <customer_account_login translate="label">
    <reference name="root">
        <block type="core/text_list" name="custom_test" as="custom_test"/>
    </reference>

        <reference name="custom_test">
        <block type="cms/block" name="test">
            <action method="setBlockId"><block_id>test</block_id></action>
        </block>
        </reference>

    </customer_account_login>
</layout>

I have tried below code as well.

<layout version="0.1.0">
    <customer_account_login translate="label">
        <block type="core/text_list" name="custom_test" as="custom_test"/>

        <reference name="custom_test">
        <block type="cms/block" name="test">
            <action method="setBlockId"><block_id>test</block_id></action>
        </block>
        </reference>

    </customer_account_login>
</layout>

Both the codes are not working.
Block with Id "test" is there and is enabled.
Template login.phtml is loading fine.
No related issues in logs.
Please let me know what I am doing wrong here.


texts:
I have a LAMP server running in a VM, which is currently running fine. Now I would like to have a button on the /magento page that toggles a div container for me. I tried different approaches and I just can't get a result on the homepage.

I change the file "

  /app/design/frontend/myvendor/Magento_Theme/layout/default_head_blocks.xml

,

default_head_blocks.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
<body>
    <reference name="head">
        <action method="addJs"><script>js/extend.js</script></action>
    </reference>
</body>
</page>

extend.js

define([
    "jquery"
], function($){
    "use strict";
    return function() {
        alert("Hello");
    }
}

)
It would be best if the .js file would only be used in the block (which was created via the Admin Portal)

I used this tutorial for example: https://devdocs.magento.com/guides/v2.3/javascript-dev-guide/javascript/js-resources.html

Tried Solution

My Hierachy

app/frontend/myvendor/Magento_Theme/
.../templates/custom.phtml
.../web/
    .../css/source/_extend.less
    .../js/myfile.js
.../requirejs-conf.js

And the content as specified by @PЯINCƏ


texts: From which Magento 1 version "catalogProductAttributeSetCreate" method is available

texts:
From which Magento 1 version catalogProductAttributeSetCreate and storeInfo method is available for soap API.

Ex URL for soap wsdl:

https://demo.example.com/api/v2_soap/?wsdl=1

https://demo.cart2quote.com/api/v2_soap/?wsdl=1 -- 1.9

I'm using 1.11 EE and I've search "catalogProductAttributeSetCreate" in app\code\core folder it is not available.

Methods that I'm looking for is:

catalogProductAttributeSetCreate - https://devdocs.magento.com/guides/m1x/api/soap/catalog/catalogProductAttributeSet/product_attribute_set.create.html

storeInfo - https://devdocs.magento.com/guides/m1x/api/soap/miscellaneous/store.info.html

August 8th 2011 Magento CE 1.6, PE 1.11, and EE 1.11 released

Reference for Magento release: https://sherocommerce.com/magento-history/


texts:
I have to create a cart price rule according to this conditions,

*20% off is applicable to first-time customers

*20% off is capped at $100.

i don't have idea how to discount capped at $100. Please Help


texts: Magento 2: Composer error when trying to update from 2.2.9 to 2.4.1

texts:
I am trying to update magento to the latest version.
"composer update" quits with this message:
  Problem 1
    - Conclusion: don't install magento/framework 103.0.1
    - Installation request for magento/composer-root-update-plugin ^1.0 -> satisfiable by magento/composer-root-update-plugin[1.0.0].
    - Installation request for sebastian/phpcpd 2.0.4 -> satisfiable by sebastian/phpcpd[2.0.4].
    - magento/product-community-edition 2.4.1 requires magento/framework 103.0.1 -> satisfiable by magento/framework[103.0.1].
    - magento/product-community-edition 2.4.1 requires magento/framework 103.0.1 -> satisfiable by magento/framework[103.0.1].
    - Conclusion: don't install magento/framework 103.0.1
    - Installation request for magento/product-community-edition 2.4.1 -> satisfiable by magento/product-community-edition[2.4.1].

I have no idea what composer is trying to tell me.
Can anybody help me to decypher what is supposed to be wrong here or how to read these kind of messages in general?
Thank you


texts: Add Cross Sells to cart sidebar located in header

texts:
I have moved my cart sidebar to the header using the code below in my local xml. I am now struggling to display crosssells inside this mini cart and am seeking guidance (they display fine on the actual cart page, and I have re-indexed several times).

<default>
    <reference name="left"><action method="unsetChild"><name>cart_sidebar</name></action></reference>
    <reference name="right"><action method="unsetChild"><name>cart_sidebar</name></action></reference>
    <reference name="header">
        <block type="checkout/cart_sidebar" name="cart_sidebar" as="topcart" template="checkout/cart/topcart.phtml"/>
        <block type="checkout/cart_crosssell" name="checkout.cart.crosssell" as="crosssell" template="checkout/cart/crosssell.phtml"/>
    </reference>
</default>

Products are added to this top cart using ajax (however crosssells don't display in mini cart at any time). I have tried to include the cross sells within my topcart.phtml file using

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

I have also tried the following in my local.xml to no avail

<checkout_cart_index>
        <reference name="header">
                <block type="checkout/cart_crosssell" name="checkout.cart.crosssell" as="crosssell" template="checkout/cart/crosssell.phtml"/>
     </reference>
    </checkout_cart_index>

And have also experimented using a crosssellhead.phtml file in my themes checkout cart template folder.

Thanks


texts: How to use Instant Purchase in Magento2.2.2

texts:
I have read the release note of Magento 2.2.2 regarding an Instant purchase. But I would like to know more about it.

I know following details about this feature :

Instant Purchase feature allows the Customer to place the order in seconds without going through full checkout. Once clicked, the system places the order using default shipping and billing addresses and stored payment method. The order is placed and a customer gets a confirmation message in the notification area.

Prerequisites to display the Instant Purchase button:
Instant purchase enabled for a store at Store / Configurations / Sales / Sales / Instant Purchase
Customer is logged in
Customer has default shipping and billing address defined
Customer has valid stored payment method with instant purchase support

The question is how instant purchase support may be implemented for any payment method with vault support?

What are the steps we need to make Custom Payment Method compatible with instant purchase?


texts: Magento get unique values from custom database table

texts:
I created a custom module with a database table with the help of this article.

I have a program which syncs stock from my physical store to online store. Every time I sync the stock, I add the sku,name, sync data and time, also the qty to the custom database table. There can be multiple entries for the same sku in the table as the same product can be synced multiple times.

Initially I was taking a report of the unique entries from the database table using this, where I was only getting the skus.

$collections = Mage::getResourceModel('module/namespace_collection')->distinct(true)->addFieldToSelect('sku')->load();
foreach( $collections as $collection){
    //add to csv
}

Now I want to get the sku and qty of the unique entries with the latest sync data and time for that particular sku. To get this I tried to use

$collections = Mage::getResourceModel('module/namespace_collection')->distinct(true)->addFieldToSelect('sku')->addFieldToSelect('qty')->addFieldToSelect('date')->load();

but I am getting all the entries in the custom table. Can some one help me out with this?

EDIT

I found an SQL select to do this

SELECT t.sku,t.date,t.store_name
FROM my_database_table t
INNER JOIN(
    SELECT sku, max(date) as MaxDate
    FROM my_database_table
    GROUP BY sku
) tm on t.sku = tm.sku and t.date = tm.MaxDate;

How do I convert this into a getCollection statement?


texts: Magento 2 : How to get Module images and css files

texts:
I have created one module but module images and css not accessible from web folder. its access only one time. second time not accessible.

http://localhost/mage2ex/pub/static/frontend/_view/en_US/NS_Module/images/defaultbg.jpg

We have try $block->getViewFileUrl() and $this->getViewFileUrl() but no luck with this.

I don't know why added _view in /mage2ex/pub/static/frontend/_view/


texts: Can't disable configurable product variations in Magento 2

texts:
When I edit a configurable product in the Configuration section, it shows the list of all the configurations.

I want to disable one of the products listed there so when I  choose Disable Product the status does change to "Disabled".

But after saving the product, status changes back to Enabled.

I have the error logs enabled but no error message appears there even when I have cleared the cache and reindexed.


texts:
I'm trying to merge like items in the cart by taking the total quantity of an item by SKU (the ID field is unreliable as multiple items may return as empty/null), setting the first instance to the total quantity, then either deleting or changing the rest to 0. This doesn't seem to work, however. This runs in an observer for the events checkout_cart_product_add_after and checkout_cart_product_update_after.

Edit: Brought in the code from removeItem() directly since it only works by ID, which may sometimes be blank. Now I'm unable to add items to the cart at all.

$version = floatval(Mage::getVersion());
$quantities = array();

foreach($quote->getAllVisibleItems() as $item) {
    if(!array_key_exists($item->getSku(),$quantities))
        { $quantities[$item->getSku()] = $item->getQty(); }
    else {
        $quantities[$item->getSku()] += $item->getQty();

        if($version >= 1.13)
            { $quote->deleteItem($item); }
        else {
            $item->isDeleted(true);
            if($item->getHasChildren()) {
                foreach($item->getChildren() as $child)
                    { $child->isDeleted(true); }
            }
            $parent = $item->getParentItem();
            if($parent)
                { $parent->isDeleted(true); }
            Mage::dispatchEvent('sales_quote_remove_item',array('quote_item'=>$item));
        }
    }
}

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

What am I doing wrong?


texts: Having issue importing tablerates.csv on Magento 2 with custom Region/State

texts:
I have added New Region/States for the Country Malaysia in the table directory_country_region and also directory_country_region_name..
see screenshot:

as you can see from the screenshot.. country code is MY and the region/state code is MY-01 and etc..

now look at my tablerates.csv.. see screenshot below:

i have matched the region/state id to be the same as the one in the mysql database table.. where MY-01 and etc..

but i still get this error after importing (refer to screenshot):

what am i doing wrong? any magento expert please provide your insight.. thanks!~ and appreciate any help i can get..


texts: Need to show Store name under Order grid

texts:
I am New to Magento. I have a live Magento site (1.9.3.8). The previous developer created Store name and store views.

Currently having 2 store's  1. default 2. mobile.

If the customer places the order via PC then Store information will be stored as default and if the customer place the order through mobile then store name will be mobile in the order grid column "Purchased From (Store)".

But this functionality is not working. only default store is saving all the time.

I have created folder mobile under root folder and copied all the required files and in Index.php i put

Store or website code */
$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : 'mobile';

/* Run store or run website */
$mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'website';

If I am wrong. Please guide me how to achieve this. I need to show order came through mobile or Website.

Thanks.


texts: how to add custom container above main tag and below header tag in default.xml magento 2

texts:
I want to display homepage banner but this section need to be displayed after header tag and before main tag. The banner I have added via Magento2 Admin -> Content -> Block. Someone help me to solve this issue.

 <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
  <body>
    <referenceContainer name="header.container">
        <container name="header.containerabc" as="header_containerabc"
                   label="Page Header Container Abc"  htmlTag="header"
                   htmlClass="abc" after="header.container"/>
    <block class="Magento\Framework\View\Element\Html\Links" name="header.links">
            <arguments>
                <argument name="css_class" xsi:type="string">header links</argument>
            </arguments>
    </block>
    </referenceContainer>
 <referenceContainer name="header.containerabc" before='main' after="header.container">
        <block class="Magento\Cms\Block\Block" name="home_banner">
          <arguments>
            <argument name="block_id" xsi:type="string">home_banner</argument>
          </arguments>
        </block>
 </referenceContainer>
    <referenceContainer name="footer">
        <block class="Magento\Store\Block\Switcher" name="store_switcher" as="store_switcher" after="footer_links" template="Magento_Store::switch/stores.phtml"/>
    </referenceContainer>
    <referenceContainer name="header.panel" remove="true"/>
    <referenceBlock name="header-wrapper" remove="true"/>
    <referenceBlock name="logo" remove="true"/>
    <referenceBlock name="register-link" remove="true"/>
    <referenceBlock name="navigation.sections" remove="true"/>
    <referenceBlock name="skip_to_content" remove="true"/>
    <referenceBlock name="report.bugs" remove="true"/>
    <move element="copyright" destination="before.body.end"/>
    <move element="authorization-link" destination="before.body.end"/>
  </body>
</page>

But the above code doesn't work.


texts: How to remove the thumbnail images below the main product image on the product page?


texts: Magento 2 certain products hide out of stock products at storefront

texts:
I wanted to show all out of products at front store, so I went Store> Configuration > Catalog > Inventory and set yes Display Out of Stock Products option
But I have to hide certain out of stock products manually. So Default Magento 2 provides functionality where hide some products at item level configuration ? If yes, how ? If any extension please let me know. I am tired but I could not find the solution for this.
I am using community magento 2.4.0


texts: Magento 2 checkout_cart_product_add_after not working

texts:
here am trying to add custom price during adding product to cart but checkout_cart_product_add_after event is not getting fired.
my API to add to cart is

http://localhost/magento/rest/V1/carts/636/items/ [POST]

this is my events.xml

vendor/Cart/etc/events.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="checkout_cart_product_add_after">
        <observer name="customprice" instance="Vendor\Cart\Observer\CustomPrice" />
    </event>
</config>

this is My Observer

Vendor\Cart\Observer

<?php

    namespace Vendor\Cart\Observer;

    use Magento\Framework\Event\ObserverInterface;
    use Magento\Framework\App\RequestInterface;

    class CustomPrice implements ObserverInterface
    {
        protected $_request;
        protected $_helper;
        protected $cart;
        public function __construct(\Magento\Framework\App\RequestInterface $request,\TW\Product\Helper\Data $helper,\Magento\Checkout\Model\Cart $cart)
        {
            $this->_request = $request;
            $this->_helper = $helper;
            $this->cart=  $cart;
        }

        public function execute(\Magento\Framework\Event\Observer $observer) {
    $this->_eventManager->dispatch('sales_quote_add_item', ['quote_item' => $item]);
            $writer = new \Zend\Log\Writer\Stream(BP.'/var/log/test.log');
            $logger = new \Zend\Log\Logger();
            $logger->addWriter($writer);
            $logger->info("success !!!!");

        }

    }

Am not understanding where am wrong, can i get help? , Thank you in advance


texts: Magento 2 moved images to S3 now getting FileSystemException

texts:
I bought https://magecomp.com/magento-2-amazon-s3.html and it moved my images over to AWS S3 without much issue, the problem now is that when new images are being uploaded to the bucket, they are not displaying in the front end or backend, the images are actually uploaded to S3 but they throw a exception on the backend.
using magento-2.3.2.
Getting exceptions like this:
2020-10-23 05:01:46] main.WARNING: Cannot gather stats! Warning!stat(): stat failed for /home/customer/www/site.com/public_html/m29/pub/media/catalog/product/c/h/chrome-wac-lighting-vanity-lighting-ws-6624-ch-64_1000.jpg {"exception":"[object] (Magento\\Framework\\Exception\\FileSystemException(code: 0): Cannot gather stats! Warning!stat(): stat failed for /home/customer/www/site.com/public_html/m29/pub/media/catalog/product/c/h/chrome-wac-lighting-vanity-lighting-ws-6624-ch-64_1000.jpg at /home/customer/www/site.com/public_html/m29/vendor/magento/framework/Filesystem/Driver/File.php:73)"} []
[2020-10-23 05:01:46] main.WARNING: Cannot gather stats! Warning!stat(): stat failed for /home/customer/www/site.com/public_html/m29/pub/media/catalog/product/w/s/ws-6624-bn_imro_1_2.jpg {"exception":"[object] (Magento\\Framework\\Exception\\FileSystemException(code: 0): Cannot gather stats! Warning!stat(): stat failed for
/public_html/m29/pub/media/catalog/product/w/s/ws-6624-bn_imro_1_2.jpg at /m29/vendor/magento/framework/Filesystem/Driver/File.php:73)"} []
[2020-10-23 05:01:46] main.WARNING: Cannot gather stats! Warning!stat(): stat failed for /home/customer/www/site.com/public_html/m29/pub/media/catalog/product/c/h/chrome-wac-lighting-vanity-lighting-ws-6636-ch-64_1000.jpg {"exception":"[object] (Magento\\Framework\\Exception\\FileSystemException(code: 0): Cannot gather stats! Warning!stat(): stat failed for /home/customer/www/site.com/public_html/m29/pub/media/catalog/product/c/h/chrome-wac-lighting-vanity-lighting-ws-6636-ch-64_1000.jpg at /public_html/m29/vendor/magento/framework/Filesystem/Driver/File.php:73)"} []

Any ideas on what I could do about this?


texts: Admin login problems. What are the correct settings of Session Cookie Management and Session Validation Management?

texts:
What are the correct settings for Session Cookie Management and Session Validation Management?

In a single store setup
In a multi store setup

Session Management

Cookie Path
Cookie Domain
Use HTTP Only
Cookie Restriction Mode

Session Validation Settings

Validate REMOTE_ADDR
Validate HTTP_VIA
Validate HTTP_X_FORWARDED_FOR
Validate HTTP_USER_AGENT
Use SID on Frontend

I always have admin login problems. And can only get rid of it by editing the core file (comment out):
/files/html/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php

    // session cookie params
    $cookieParams = array(
        'lifetime' => $cookie->getLifetime(),
        'path'     => $cookie->getPath(),
        // 'domain'   => $cookie->getConfigDomain(),
        // 'secure'   => $cookie->isSecure(),
        // 'httponly' => $cookie->getHttponly()
    );

I guess there is no "correct" setting, otherwise there won't be any options. But what is the most common setting? Do I have to have different cookie paths for different stores? What could cause my problem (can't login in Magento admin).

Thank you so much!


texts: How to create a customer attribute only for one store?

texts:
I can create a customer attribute using below script:

<?php

namespace Vendor\CustomerMobileNumber\Setup;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Customer\Setup\CustomerSetupFactory;

class InstallData implements InstallDataInterface
{

    private $customerSetupFactory;

    /**
     * Constructor
     *
     * @param \Magento\Customer\Setup\CustomerSetupFactory $customerSetupFactory
     */
    public function __construct(
        CustomerSetupFactory $customerSetupFactory
    ) {
        $this->customerSetupFactory = $customerSetupFactory;
    }

    /**
     * {@inheritdoc}
     */
    public function install(
        ModuleDataSetupInterface $setup,
        ModuleContextInterface $context
    ) {
        $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);

        $customerSetup->addAttribute(\Magento\Customer\Model\Customer::ENTITY, 'mobile_no', [
            'type' => 'varchar',
            'label' => 'Mobile Number',
            'input' => 'text',
            'source' => '',
            'required' => true,
            'visible' => true,
            'unique' => true,
            'position' => 333,
            'system' => false,
            'backend' => ''
        ]);

        $attribute = $customerSetup->getEavConfig()->getAttribute('customer', 'mobile_no')
            ->addData(['used_in_forms' => [
                'adminhtml_customer',
                'adminhtml_checkout',
                'customer_account_create',
                'customer_account_edit'
            ]]);
        $attribute->save();
    }
}

Please note this attribute is marked as required. I want to show this attribute only on store2 registration page.

Is it possible to create this attribute only for store2 ?


texts: Different domains with the same Website Name

texts:
Is it possible to set different domains on one website name in Magento 1.9?

I want to have it like this:

Is it even possible to set this in store level?

EDIT:
I also did the costumisation in index.php file

if(stripos($http_host, 'mywebsite.de') !== false){
    $mageRunCode = "mywebsite";
    $mageRunType = "website";
}elseif(stripos($http_host, 'mywebsite.com') !== false){
    $mageRunCode = "mywebsite";
    $mageRunType = "website";
}

and set the Base URL on different Current Configuration Scopes.


texts: When to put XML declarations (elements containing information) for one module in system.xml and when in config.xml?

texts: In Magento 1.9.2.4, I am seeing two XML documents in one of my modules, one is config.xml, other one is system.xml. What is the difference between the two, ie. what is system.xml for and what is config.xml for (except for declaring the module version, routes, and layouts)?


texts: How To Forward Port an Existing Language Pack

texts:
For some languages (en_UK, fi_FI and others) there are outdated language packs available on Magento connect (in these cases based on Magento 1.6).

We are using a recent Enterprise Edition (1.13).

Basically we want to generate a new CSV files which contains all the texts of our current Magento version (i.e. from the en_US folder of Magento Core) and pre-fill / merge the already existing translations (from the outdated non-US-English language pack), so that a translator can fill the missing fields.

Are there tools for that / did anybody do this before?

Remark: I did some edits for clarification in the text, so old comments might not apply anymore.


texts: Is there a repo out there with a solid custom theme for Magento 2? I'm looking for educational purposes. I learn better by looking at the code vs reading a mile long blog.


texts: Is there a better way to guarantee a sale then to provide your user with every detail. how Apply Extra Product Tabs to give users an additional information about the product or service offering.


texts: Creating first custom content page in admin section

texts:
Total beginner with Magento... I've installed magento, and followed this article to the T. I have no issue with the article, it basically creates a custom admin menu item, and when you click on it you get a blank page.

I've gotten that far, but now I'd like to show something instead of the blank page. My end goal is to call some custom php code to show in the admin section when the custom admin menu item is clicked.

I'm a little lost on what the next steps are to achieve this goal. Do I need to setup templates / layouts for this, or is there a way to just route directly to my own custom php page? Are there any good tutorials for this? I've tried searching around but I'm not sure if I am using the right terminology etc.

I'm using the latest version of Magento. Thanks!


texts: How to get Available Product Listing Sort By category data on front end?

texts:
I want to show Product listing sort data on left side on catalog page on front-end.

Mage::getModel('catalog/category')->load('CATEGORY ID')->getAvailableSortBy() returns empty array and if i manually select each sort option from category then it prints array with options .


texts: Custom shipping method check weigh of product

texts:
I followed this tutorial (https://magenticians.com/create-magento-2-shipping-module-method/) that showed me how to create a custom shipping method, but I still have one problem, i need to take into account the weight of the product to see if I can enable such shipping method, so i came here to see if anyone as any ideas how i can do that.

Thanks in advance


texts: How to send email to customer after admin cancels order in Magento 2.3.5?

texts: I want to send a notification email to the customer if the admin cancels the customer's order. I am using Magento 2.3.5 -p1 version.


texts: Emails are not sending from Magento 2 on Ubuntu/Apache

texts:
I installed Magento 2 on Ubuntu/Apache/Sendmail and setup email configuration on Store -> Configuration -> Advanced System -> Mail Sending Settings & Sales -> Sales Email Settings.
I configured cron via cli too.

Now, whenever an action takes place (example: Newaccount creation, new order or etc), the system is not sending email.

Please help me.


texts: How to redirect to particular stores when the site opens

texts:
My website has 2 stores

there are two different store codes for that

the first is us and the second is ms

when I enter mysite.com then it redirects to mysite.com/us

but I want to change it to mysite.com/ms

How to achieve this? Any help would be appreciated.


texts: Disable Flat Rate for Downloadable Products

texts:
Our store has a fixed handling rate of 5ZAR for any product. Obviously, this is not needed for downloadable products. Where can I disable the flat rate, as set up under System->Configuration->Sales->Shipping Modules, for downloadable products?

I have now searched EVERYWHERE and can not find an answer.


texts:
I am trying to filter product, I having a list of product ids in an array and i want to filter product base on this ids.

I want to fetch all the product which does not have this ids (Not In)
How can i write it. Here is my code.

 $ruleCreateArr = [10,15,21];

 $collection = $this->productCollectionFactory->create();

 $collection->addAttributeToSelect(array('name','id'))
           ->addAttributeToFilter('entity_id', array('nin', $ruleCreateArr));

It seems the "nin" filter not working.


texts: Magento 2 Not saving product changes at the backend

texts: Magento 2 I am trying to change product data - first time it is working fine, when i tried to change same attribute second time it not updating which i selected data


texts: Apply shopping cart rule on original price & not with Special Price

texts:
I want to make a  shopping cart rule that applies to the original prices of each product not over special prices.

I was thinking to override Mage_SalesRule_Model_Rule model.

Any ideas?


texts: Pricing "Customizable Options" Stuck on Fixed Pricing - Percent

texts:
I have installed a bitnami build of Magento 2 on AWS and have noticed that on their core build 2.1.2.0 we can't add a percentage based "Customizable Option" to any products. We can add the customizable option as a percentage in the backend but it shows as fixed in the frontend. Has anyone experienced this issue and has a fix please?

Steps to reproduce

Create or edit a new product with mandatory product description and price, stock etc
Select 'Customizable Options' tab
Add Option title > Anything
Select Option type > Field
Add Price > enter 50
Select Price type = Percent
Add Sku = xyz
Save Product

Expected result

Open newly created product in frontend
Select Customizable Option from above
Test percentage increase

Actual result

fixed priced option only available - no percentage increase available. It's basically taken the % increase value and kept it as a fixed price increase. I did notice in the backend that when I change the option from fixed to percent that the $ value in the input box doesn't change to %.


texts: Add CMS block as custom tab in product view page Magento 2

texts:
I'd like to add a static block as an additional custom tab in Magento 2.

CMS Static Block (hello-world)

Hello world!

catalog_product_view.xml

<block class="Magento\Catalog\Block\Product\View" name="product.helloworld" template="product/view/hello-world.phtml" group="detailed_info" >
 <arguments>
  <argument translate="true" name="title" xsi:type="string">Hello World</argument>
  <argument name="priority" xsi:type="string">4</argument>
 </arguments>
</block>

hello-world.phtml

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

At the moment nothing is being displayed. Can anyone suggest an edit to get the code above working?


texts: Magento 2 - Attribute (custom) filter not showing products

texts:
We have a shop with migrated products from M1. Now when filtering a custom attribute to make the options smaller, it gives me the error that it can not find products (see image).

The strange thing is that the default attribute from M2 (Category of Price) are working well.

Any one have a idea?


texts: How to change save path of PDF files in magento 2

texts:
Currently PDF files are saving in var directory.

Here is controller's execute function

 public function execute()
    {
        $orderId = $this->getRequest()->getParam('id');
        if ($orderId) {
            $order = $this->orderRepository->get($orderId);
            if ($order) {
                $pdf = $this->orderPdfFactory->create()->getPdf([$order]);
                $date = $this->date->date('Y-m-d_H-i-s');
                return $this->fileFactory->create(
                    'order' . $date . '.pdf',
                    $pdf->render(),
                    DirectoryList::VAR_DIR,
                    'application/pdf'
                );
            }
        }
        return $this->resultRedirectFactory->create()->setPath('sales/*/view');
    }

DirectoryList::VAR_DIR,

Above code responsible for that. Now my question is that I want to save pdf files under var/pdf directory. How can I do this ?


texts: How to solve the Service Temporarily Unavailable?

texts:
My website is showing:

  Service Temporarily Unavailable - The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

I cannot access the site or the admin back end.
I can see some similar questions regarding this issue and I have tried all the various answers. Whilst they work for a couple of hours, the issue returns.

So I have deleted the maintenance file. I have deleted the session files. I have deleted the cache folders both on the admin panel in Magento and through Filezilla and as I delete some, they return in front of my eyes! The site comes back and I get access to admin, but 2 or so hours later and the problem is back.

Can anyone please help to finally get rid of this issue once and for all?


texts: Custom Catalog URL Rewrites deleted after reindex

texts:
This is not a new question, but. nowhere I'm able to find the answer to this question.

When I reindex Catalog URL Rewrites, my custom rewrites get deleted/overwritten(???). Below is an image of the settings, what is wrong with these settings?

Magento = 1.8.0.0 but it was also occurring with the previous version.


texts: I’m looking for a way to find all orders that the "bill to" and "ship to" are different states and the dollar amounts associated with those orders

texts:
I know that I could check in the sales flat tables. I would probably have to look into sales_flat_order and sales_flat_order_address and do a SQL join.

Additionally, the entity_id would be the related column.

Does anybody have a definitive way of accomplishing this task?


texts: Magento 2: How to display Customer Name instead of Customer Id in UI Component Form Field?

texts:
In Magento 2.3.2, I have created a grid and form to add and edit.

In the grid column, I am able to display Customer Name instead of Customer Id with following code.

    <column name="customer_id" class="Meetanshi\HelloWorld\Ui\Component\Listing\Columns\Customername">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="filter" xsi:type="string">text</item>
                <item name="editor" xsi:type="array">
                    <item name="editorType" xsi:type="string">text</item>
                    <item name="validation" xsi:type="array">
                        <item name="required-entry" xsi:type="boolean">true</item>
                    </item>
                </item>
                <item name="label" xsi:type="string" translate="true">Posted By Customer</item>
                <item name="sortOrder" xsi:type="number">20</item>
            </item>
        </argument>
    </column>

But I don’t know the way to display Customer Name instead of Customer Id in UI Component Form Field.

I have done following code to display Customer Id field in UI Component Form.

    <field name="customer_id">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="label" xsi:type="string">Customer ID</item>
                <item name="visible" xsi:type="boolean">true</item>
                <item name="dataType" xsi:type="string">text</item>
                <item name="formElement" xsi:type="string">input</item>
                <item name="source" xsi:type="string">post</item>
                <item name="disabled" xsi:type="boolean">true</item>
                <item name="sortOrder" xsi:type="number">33</item>
            </item>
        </argument>
    </field>

Also I am facing problem while filtering data with Customer Name in grid. I am able to filter data with Customer Id but not with Customer Name.


texts: How to update Ajax Add To cart Top Cart Link RWD Theme

texts: I am facing some issues while updating cart count with ajax request on the detail page for the RWD theme.


texts: Magento 1.9.1 when i update Patch SUPEE 6788 then cannot see products in static block but text appear in static block please tell me what should i do


texts:
I'm having some issues with translating the validation csv file. I did go to public_html/lib/web/i18n - downloaded the existing en_US.csv file and translated it. I cleared all the empty lines, as it is said in the Magento 2 documentation and uploaded it to the same folder with name bg_BG.csv for my native language.
Then I did - php bin/magento i18n:pack lib/web/i18n/bg_BG.csv -d bg_BG as shown in here Magento 2 Translations not working
I also did navigate to public_html folder first with cd command so I can run the command.(otherwise it gives me - "magento no such a command or directory"
The result is this -
> ` In AbstractFile.php line 112:
>
>   Missed context in row #1.   Each row has to consist of 4 columns
> original phrase, translation, context type, context value `

and nothing yet in the frontend


texts:
I need to change the value of the shipping cost when the user select the shipping address on my magento 2 checkout. Using some params of the products they are buying and the params of the shipping address.

So I decide to create a Plugin to execute some code before and after shipping is selected. Reading on magento 2 documentation (Plugins (Interceptors) | Magento 2 Developer Documentation) I created an aroundMethod(). Well I created and I added only the sample code I got from the documentation and a simple var_dump() but when I execute the code on my checkout I get this javascript error:

Cannot read property 'items' of undefined at ko.subscription.callback (totals.js:18)

This seems like my plugin doesn't return something of necessary.

This is my Plugin:

The declaration on <vendor>\<module>\etc\di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/con
fig.xsd">
     <type name="Magento\Checkout\Model\ShippingInformationManagement">
         <plugin name="get_shipping_info" type="<vendor>\<module>\Plugin\ShippingCalculate" sortOrder="1" disabled="false"/>
     </type>
</config>

Then my plugin code <vendor>\<module>\Plugin\ShippingCalculate

<?php

namespace <vendor>\<module>\Plugin;

class ShippingCalculate
{

    /**
     * @var \Magento\Checkout\Model\Session
     */
    protected $_checkoutSession;

    /**
     * @var \Magento\Framework\App\Request\Http
     */
    protected $_request;

    /**
     * @var \Magento\Quote\Api\CartRepositoryInterface
     */
    protected $_quoteRepository;

    /**
     * @var \Magento\Catalog\Model\ProductFactory
     */
    protected $_productFactory;

    /**
     * ShippingCalculate constructor.
     * @param \Magento\Checkout\Model\Session $checkoutSession
     * @param \Magento\Framework\App\Request\Http $request
     * @param \Magento\Quote\Api\CartRepositoryInterface $quoteRepository
     * @param \Magento\Catalog\Model\ProductFactory $productFactory
     */
    public function __construct(
        \Magento\Checkout\Model\Session $checkoutSession,
        \Magento\Framework\App\Request\Http $request,
        \Magento\Quote\Api\CartRepositoryInterface $quoteRepository,
        \Magento\Catalog\Model\ProductFactory $productFactory
    )
    {
        $this->_checkoutSession = $checkoutSession;
        $this->_request = $request;
        $this->_quoteRepository = $quoteRepository;
        $this->_productFactory = $productFactory;
    }

    /**
     * @param \Magento\Checkout\Model\ShippingInformationManagement $shipping
     * @param callable $proceed
     */
    public function aroundSaveAddressInformation(
        \Magento\Checkout\Model\ShippingInformationManagement $shipping,
        callable $proceed,
        $cartId,
        \Magento\Checkout\Api\Data\ShippingInformationInterface $addressInformation
    )
    {
        $quote = $this->_quoteRepository->getActive($cartId);
        var_dump($quote->debug());
        echo $cartId;

        $returnValue = $proceed($cartId, $addressInformation);
        if ($returnValue) {
            // No Code here
        }
        return $returnValue;
    }
}


texts: fedex configuration in magento confusion in account id/key?

texts:
I'm setting up in sandbox mode. The fields i have to fill in magento backend(Shipping method > FedEx)

  Account ID, Meter Number, Key & Password

Where as on signing up on FedEx developers account. I received mail

and i have other account ID to login(Developers account) ccgxxxxxxxxx

My question here is which one here is Account ID and Key ?


texts: how to export the configuration for a specific module

texts:
good morning everyone , i have a configuration was set in the Magento 2 backend for a specific module , i have search on the web on it , and i have find that there is a command to do it :

bin/magento app:config:dump {config-types}

or

bin/magento app:config:dump scopes themes ==> for themes

ref ==> https://devdocs.magento.com/guides/v2.3/config-guide/cli/config-cli-subcommands-config-mgmt-export.html

  but my question is how to export just the configuration for just a specific module ?


texts: Magento 1.9 - wysiwyg insert image not working as expected

texts:
I have created a Admin module and added a content wysiwyg editor field. When i tried to insert image by clicking 'Insert File' and it is not adding img to the content field.
I here by adding my form field configuration please check
$wysiwygConfig = Mage::getSingleton('cms/wysiwyg_config')->getConfig(
        array(
        'add_variables' => false,
        'add_widgets' => false,
        'add_images' => true,
        'add_directives' => true,
        'use_container' => true,
        'container_class' => 'hor-scroll',

    ));

    $wysiwygConfig->addData(array(
        'plugins'                   => array(),
        'widget_window_url'         => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/widget/index'),
        'directives_url'            => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg/directive'),
        'directives_url_quoted'     => preg_quote(Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg/directive')),
        'files_browser_window_url'  => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index'),
    ));
    $fieldset->addField('content', 'editor', array(
        'label' => Mage::helper('bannersettings')->__('Content'),
        'title' => Mage::helper('bannersettings')->__('Content'),
        'name' => 'content',
        'style' => 'width:700px; height:300px;',
        'config' => $wysiwygConfig,
        'required' => true,
        'wysiwyg' => true
    ));

Is there any issue with my code? Please help me.


texts: how to redirect to checkout click proceed to checkout from mini cart while customer is logout in magneto 2

texts: My guest checkout is disable so while clicking to proceed to checkout from mini cart it shows a login popup.after login from this popup i want to redirect to checkout but it redirect to the same page first after login . Can any one help to redirect the site to checkout page after ajax login.


texts:
I found many times this preDispatch function in Magento. I found this function mostly in controller file as a first function.
Also sometimes in config.xml file.

Anyone, please help me what the purpose of this function in Magento and how to use it properly.


texts: How can I add custom fields to checkout in Magento Go?

texts: I want to add a textarea element to the checkout page for comments, etc. I have found articles and extensions for doing this in Magento CE but nothing for Magento Go. Is this possible and if so, how? Thanks.


texts: Possible bug in and handling of getOrigData when updating tier prices, goes away when cleaning the cache

texts:
We are on Magento 2.2.8 and I was debugging the following issue for hours:

When sending a product-update via the REST API, we were getting

Unique constraint violation found

for a request as simple as

PUT https://www.example.de/rest/german/V1/products/B1234

Request body:

{"product": {"sku": "B1234","customAttributes": [{"attributeCode": "meta_keyword","value": "Bälle"}]}}}

The big problem is, that I cannot reproduce it using the Production Database Dump locally.

It seems to be strongly related to products which have a tier price in the database (which I am not updating in the REST call).

Luckily I was able to reproduce it somehow on a staging instance on the same machine as production and trace there error down to

vendor/magento/module- catalog/Model/Product/Attribute/Backend/TierPrice/UpdateHandler.php

There is the following code

        // prepare original data to compare
        $origPrices = $entity->getOrigData($attribute->getName());
        $old = $this->prepareOldTierPriceToCompare($origPrices);
        // prepare data for save
        $new = $this->prepareNewDataForSave($priceRows, $isGlobal);

        $delete = array_diff_key($old, $new);
        $insert = array_diff_key($new, $old);
        $update = array_intersect_key($new, $old);

Using var_dump-driven development techniques I was able to see, that
$old is empty even there IS a database row for the tier price.

Actually the whole getOrigData() is empty.

That causes having $insert a value which IS already in the database

So MySQL (MariadB) throws an error at the following insertValues call, which tries to insert the already existing value.

        $isAttributeChanged = $this->deleteValues($productId, $delete);
        $isAttributeChanged |= $this->insertValues($productId, $insert);
        $isAttributeChanged |= $this->updateValues($update, $old);

This is the error:

 "SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '19211-1-0-10.0000-0' for key 'UNQ_E8AB433B9ACB00343ABB312AD2FAB087', query was: INSERT INTO `catalog_product_entity_tier_price` (`entity_id`, `all_groups`, `customer_group_id`, `qty`, `value`, `percentage_value`, `website_id`) VALUES (?, ?, ?, ?, ?, ?, ?)"

Now the interesting part: If I clean the Magento cache, the problem disappears. For a while. But after another while seems to / might happen again.

Did anybody see such behavior before? Should we just refactor the core to not be so dependent on getOrigData?

EDIT The bug can be reproduced after some time again. Clearing the cache then fixes it. For now I stored the redis cache in a backup and will try to reproduce the issue locally by loading that cache.


texts: import multiple images Magento ver. 1.7.0.2

texts:
How can I import multiple images for one product in magento 1.7.0.2 :

I am adding images under /media/import this work fine for one image but i am not able to import multiple images, I tried using comma and semi colon(;) :
/image1.jpg,/image2.jpg and /image1.jpg;/image2.jpg
This gives error image path does not exists.


texts: htmlContent not working in Magento 2.3.1 from Magento 2.3.0

texts:
My custom module stopped loading ui_component based admin form of Magento 2.3.1, because of <htmlContent name="gallery"> , however it was working fine in Magento 2.3.0. No logs or reports found to follow the problem, only blank page.

Here is the code, which i remove and form load,

     <htmlContent name="gallery" sortOrder="22">
    <argument name="data" xsi:type="array">
        <item name="wrapper" xsi:type="array">
            <item name="label" xsi:type="string" translate="true">Images</item>
            <item name="collapsible" xsi:type="boolean">true</item>
            <item name="opened" xsi:type="boolean">false</item>
        </item>
    </argument>
    <settings>
        <wrapper>
            <canShow>true</canShow>
            <componentType>fieldset</componentType>
        </wrapper>
    </settings>
    <block name="gallery" class="Magento\Catalog\Block\Adminhtml\Product\Helper\Form\Gallery">
        <block class="ABC\Categorybanner\Block\Adminhtml\Categorybanner\Edit\Tab\Images" as="content">
            <arguments>
                <argument name="config" xsi:type="array">
                    <item name="parentComponent" xsi:type="string">categorybanner_index_form.categorybanner_index_form.block_gallery.block_gallery</item>
                </argument>
            </arguments>

        </block>
    </block>
</htmlContent>


texts: Magento 2 Load Static Block In Controller

texts:
I tried the following solution:-

Magento 2 Load - Block (CMS Static Block in Magento 1 terms)

But getting some issue, you can visit here to see:-

http://nimb.ws/oURqfV

Here is my controller code:-

<?php

    namespace Test\Clientform\Controller\Show;

    class Index extends \Magento\Framework\App\Action\Action
    {
        protected $_filterProvider;
        protected $_storeManager;
        protected $_blockFactory;

        public function __construct(
            \Magento\Framework\View\Element\Context $context,
            \Magento\Cms\Model\Template\FilterProvider $filterProvider,
            \Magento\Store\Model\StoreManagerInterface $storeManager,
            \Magento\Cms\Model\BlockFactory $blockFactory,
            array $data = []
        )
        {
            parent::__construct($context, $data);
            $this->_filterProvider = $filterProvider;
            $this->_storeManager = $storeManager;
            $this->_blockFactory = $blockFactory;
        }

        public function execute()
        {

            $resultPage = $this->_resultPageFactory->create();
            return $resultPage;
        }

        protected function content()
        {
            $blockId = 'YOurBlock_Id';
            $html = '';
            if ($blockId) {
                $storeId = $this->_storeManager->getStore()->getId();
                /** @var \Magento\Cms\Model\Block $block */
                $block = $this->_blockFactory->create();
                $block->setStoreId($storeId)->load($blockId);

                    $html = $this->_filterProvider->getBlockFilter()->setStoreId($storeId)->filter($block->getContent());
            }
            return   $html;
        }

    }

    ?>


texts:
When adding store views to Magento it creates rather large tables because it adds an entry for each storeview * each product in the following tables:

core_url_rewrite
catalog_product_index_eav_idx
catalog_product_index_eav
catalog_category_product_index
catalogsearch_fulltext

But what if in the setup that i'm using this data will be identical across all store views, is there a way to stop Magento from creating all these tables?
The only thing we want is to have a different {base_url} for each storeview, the catalog will be the EXACT same across all storeviews.

What I'm asking in other words is: can we create a module to create new store views that only have the functionality of assigning a base_url to a store view without all the index and catalog tables that get added


texts: Magento 2 : How to make/call section ajax to show popup after cart update?

texts: I want to make a new section popup like minicart. And need to update that on any cart action like addtocart, delete item from cart. For this I am thinking to make a section ajax call. How can I do this ?


texts: Magento 2 Customizable Options for orders not appearing using API

texts:
Is there a way to get customizable options from an order to the API?

For example, this product allows a customer to enter a name on a t-shirt -

This also appears on the admin side of the order -

But this doesn't seem to appear anywhere on the API (/rest/V1/orders/xxxxxx)

Was hoping these options would be available out the box for third parties checking the API.


texts: Magento 2 Product Short Description Truncate?

texts:
I've migrated Magento 1 to Magento 2, In the Magento 1 site on product listing page I've truncated the length of the short description.

e.g- echo Mage::helper('core/string')->truncate($short_description, '120');

I require the same thing in Magento 2 way, how can I achieve it?

Note:- I don't want to use simple core PHP to restrict length.


texts: Change "subtotal" label in Sales Order Email

texts:
I have been struggling immensely to change the label of "Subtotal" in the email sent to users after they make a purchase.

I was able to remove everything BUT the sub total column, and I want to replace sub total with "Grand Total".  I tried modifying the Mage_Sales.csv in app/locale/en_US, to no avail.

Does anyone have an idea on how or where I can change this?

I have a hunch it is in an .xml file, but I honestly don't know.

This image shows what I want changed as well.  Thanks!

http://img836.imageshack.us/img836/3865/fe1v.png


texts:
In wrapper.phtml there is this line of code:

echo $this->getChildHtml('', true, true);

What happens in this case when getChildHtml() is called with an empty string? What block/code is it calling?


texts:
I am new in Magento 2 and today i installed it in my system window 7,
and i am using xampp server.
my problem is that when i go through this link http://localhost/magento/ then during this an error generating such as:

Autoload error

Vendor autoload is not found. Please run 'composer install' under application root directory.

and then after i run this command link composer install in command prompt then lots of error i am getting in command prompt like this showing you an image see that please and guide me:

can anybody help me please i am new here,
step by step guide me.


texts: How do I get a collection of attribute values and products that use them?

texts:
I would like to run a report of attribute values used by a drop-down select attribute, e.g. colour, and the quantity of products that actually use them.

I can get the list of actually used attributes and their respective counts by using:

    $productCollection = Mage::getModel('catalog/product')->getCollection()
        ->addAttributeToSelect($attributeId)
        ->groupByAttribute($attributeId)
        ->addExpressionAttributeToSelect('instances', "COUNT({{entity_id}})", 'entity_id')
        ->setOrder($attributeId);

I can also get a complete list of values for a given attribute:

    $attribute = Mage::getModel('eav/entity_attribute')->loadByCode(Mage_Catalog_Model_Product::ENTITY, $attributeId);

    $valuesCollection = Mage::getResourceModel('eav/entity_attribute_option_collection')
        ->setAttributeFilter($attribute->getId())
        ->setStoreFilter(0, false);

However, I have so far not been able to join these collections or find a better way of achieving what I want. In my list I would like the complete set of attribute values including the ones that are not used by any products. Furthermore, in my collection, I would also like the sort order numbers assigned to each attribute value. Plus the product count.

Any ideas?


texts: How to check if child products of configurable product have special price?

texts:
The following function works only for simple products (when they have an special price, a sale label is attached to the product image):

public function getLabels($product) {
    $labels = [];

    if ($product->getSpecialPrice()) {
        $labels['sale'] = 'Sale';
    }

    return $labels;
}

Now I am wondering how to combine a check that works for simple products and for configurable products (thus also in the case that all child products of a configurable product have an special price).


texts: What events trigger low_stock_date to be updated?

texts: What events trigger cataloginventory_stock_item.low_stock_date?  In our db most of the products have the same exact timestamp, and it's only 4 days ago, despite a lot of these products being out of stock for a long time.


texts:
I use custom attribute from Mageplaza:
https://www.mageplaza.com/magento-2-module-development/magento-2-add-customer-attribute-programmatically.html

Now I can from admin panel add here text, but  customer also can change this text. How to set only admin change this field? And for customer in frontend display only this text without possible edit?


texts: Database connection error. magento installation

texts: I have tried to install magento, but when I am trying to install magento from browser, it shows "Database connection error" during Magento installation.


texts:
I have a Magento CE 2.1.6 website, with 2 store views for different languages:

English store view (default)
French store view

My problem is that when I am seeing the website on one store view if I enter an URL of the other store view I will get a 404 and vice versa.

For instance, if I give any URL from the French store view to a first time viewer of the website, he'll get a 404.

The expected result would be that any URL would open its respective store view.

Here's my website.

How to solve that?

Thanks in advance for your help!


texts: Magento2 - Add to Cart not working on Catalog page

texts:
I cannot add products to shopping cart after clicking on Add to Cart button.

Go to

  http://marsh.wsisites.net/products/lcd-character-displays.html

Click on View detail and check.


texts:
I Need to restrict the tax amount. so i went Mage/Tax/Model/Calculation.php
Then Finds calcTaxAmount() Tax Applying Function.  I need to restrict tax who all are enter the tax vatid in checkout onepage tax should be zero
so

public function calcTaxAmount($price, $taxRate, $priceIncludeTax = false, $round = true)
    {
        $billing = Mage::getModel('checkout/session')->getQuote()->getCustomerTaxvat();

        if($billing != "" )
        {
            return 0;
        }
        $taxRate = $taxRate / 100;

        if ($priceIncludeTax) {
            $amount = $price * (1 - 1 / (1 + $taxRate));
        } else {
            $amount = $price * $taxRate;
        }

        if ($round) {
            return $this->round($amount);
        }

        return $amount;
    }

I added the new condition. its working some stores of multistores. Only one store cannot working properly. it causes user cannot register , and addtocart not working for that particular store. i found getQuote the issue. i remove the new condtion like below working fine.

Old Function:-

public function calcTaxAmount($price, $taxRate, $priceIncludeTax = false, $round = true)
    {
        $taxRate = $taxRate / 100;

        if ($priceIncludeTax) {
            $amount = $price * (1 - 1 / (1 + $taxRate));
        } else {
            $amount = $price * $taxRate;
        }

        if ($round) {
            return $this->round($amount);
        }

        return $amount;
    }


texts: Paypal recurring profile related orders issue

texts:
I have setup the Payments Pro (Includes Express Checkout) payment method for the Magento version 1.7.0.2.

I have enabled the paypal billing agreement settings. When I try to place order with simple recurring product, it is creating new recurring profile for the customer which I can able to see in admin and customer my account section.

Issue I am facing is system is not generating any related order in Magento back-end. So I am not able to find any related orders for profile in admin as well in front-end.

I am using paypal sandbox account and I have also setup the IPN enabled for the paypal account.

Also, When I try to create order with new customer system creating new recurring profile but billing agreement is not generated in my account section. I am able to create it manually from my account billing agreement section.

Any suggestion what should be an issue?


texts: Memory exhausted error coming while creating catalogrule with category

texts:
I have around 50 categories. When I save the catalogrule without selecting the categories it gets saved correctly. But when I save along with selecting the category it display memory exhausted error. The exhausted error coming after 65 queries at the point when implode function is executed in Profiler.

If I set the category in already created catalogrule, it works fine.

What is the behaviour of Magento2

60  7.8370  799786680   Magento\CatalogRule\Model\Rule\Condition\Product\Interceptor->getAttributeObject( ) ...\Interceptor.php:50
61  7.8370  799786680   Magento\Eav\Model\Config->getAttribute( )   ...\AbstractProduct.php:152
62  7.8370  799971432   Magento\Eav\Model\Config->getEntityType( )  ...\Config.php:499
63  7.8370  799971888   Magento\Framework\Profiler::start( )    ...\Config.php:389
64  7.8370  799971888   Magento\Framework\Profiler::_getTimerId( )  ...\Profiler.php:268
65  7.8370  799971888   implode ( ) ...\Profiler.php:153


texts: Image url adding some of the pagespeed codes

texts:
I have  not loaded for any scripts but automatically added the pagespeed in image url adding some of the webp image  format. so how to rectify the error and images are not show.
xxx.com/pub/media/logo/stores/1/101x43xsarikart.png.pagespeed.ic.xwaQijPBK8.webp


texts: Magento2: How to display always special price on configurable product

texts:
When I open simple product then I always see price and special price.

Issues is when I open configurable product then I see only special price:

When I choose "size" only then display price and special price:

I would like it to always display  price and special price regardless of whether I choose size or not.


texts: Find reason for 'main.ERROR: Cannot decode binary [] []'

texts:
We have a very general error in the system.log file.It is
main.ERROR: Cannot decode binary [] []
It happens very frequent. However we do not know the cause or how to debug.
If anybody could tell us what is a good way to find the reason so we can solve that would be great.


texts: How can I add html template to the checkout onepage?

texts: Checkout generate from onepage.phtml file that generate another html page inside like details.html for billing-address and another html file. How can I add new html file to generate inside the onepage.phtml?


texts: Magento 2: how to redirect from an admin controller

texts:
In Magento 1, we were able to do the following directly in a controller action method :

$this->_redirect('*/*/index');

Or in a more generic way:

$this->_redirect('adminhtml/controller/action');

What's the equivalent in Magento 2 ?


texts: add validation for first and last name in checkout billing address

texts:
I would like to add alphabet validation for first and last name field in onepage checkout billing section.

But unable to find the template being loaded for this section. Other fields are being loaded from

base/default/template/persistent/checkout/onepage/billing.phtml

How to find the template for first and last name fields?


texts:
Is there a magic function for checking if a category is included in the top navigation and if not what is the correct way to check programmatically?
I've come across a few possible ones online such as

   getIncludeInMenu()

but none seem to work on the site I'm working on at the moment so I would appreciate a concrete answer.

P.s. I would have checked the file that the top menu is being rendered from but for some reason I'm having a nightmare trying to find it.


texts: Dynamic change of custom attribute in configurable product. M2.3

texts:
I need to change custom attribute and sku every time when customer change color and size
(http://prntscr.com/nwzt1h).
With sku i found article how to do it and it's working, but i can't find some info how to do the same with custom attribute. I found place where i need to enter info to dynamicly change it (location of this files Vendor\Extension\Plugin\ConfigurableProduct\Block\Product\View\Type\Configurable\Configurable.php and Vendor\Extension\Plugin\ConfigurableProduct\Block\Product\View\Type\Configurable.php here and here . But "getData" "getCustomAttribute" "getAttributeText" "getAttribute" doesn't work. I found out if i will write $simpleProduct->getData('size') i will see dynamic changes example1 example2 . But with my custom attribute it doesn't work this way. Can anyone give me some advise, or link on article where this problem solving ? Thank you.


texts: Show current day orders on Magento Dashboard

texts:
Currently, when we login to magento admin, it shows the order amount from last 24 hours by default. Is there a way to show Current Date (today) order amount as default?

A detailed solution will be much appreciated.


texts: Indexing Issue after Update Magento 1 to Magento 2

texts:
After I had migrated my website from magento 1.9 to magento 2.1,
Everything is working fine except for a few bugs

i get this while running php bin/magento indexer:reindex

    SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails
    (`thebeautyfloor1`.`catalogrule_group_website`, CONSTRAINT `CATALOGRULE_GROUP_WEBSITE_RULE_ID_CATALOGRULE_RULE_ID` FOREIGN KEY (`rule_id`) REFERENCES `catalogrule` (`rule_id`) ON DELETE CASCADE),
query was:
INSERT INTO `catalogrule_group_website` (`rule_id`, `customer_group_id`, `website_id`)
SELECT DISTINCT  `catalogrule_product`.`rule_id`, `catalogrule_product`.`customer_group_id`, `catalogrule_product`.`website_id` FROM `catalogrule_product`
WHERE (1527155869 >= from_time
 AND ((1527155869 <= to_time AND to_time > 0) OR to_time = 0)) ON DUPLICATE KEY UPDATE `rule_id` = VALUES(`rule_id`), `customer_group_id` = VALUES(`customer_group_id`),
`website_id` = VALUES(`website_id`)

And when i try to change the Theme i get the ERROR

Requested store is not found

Any guidance will be really appreciated.


texts: Magento 1.9 configurable swatches ordered by position

texts:
When I use the new configurable swatches with Magento 1.9.1, the configurable items are not sorted like in the drop-down.

For example sizes, I want sizes sorted like S, M, L, XL. That is also how I sorted them by position in the attribute settings.

Now with the configurable swatches they seem sorted at random, like M, XL, S, L. It's not alphabetical or in position, I can't figure out what is going wrong.

After setting up the use of these swatches I re-indexed and cleared cache.


texts: Remove payment details and shipping Method Name in the invoice template?

texts:
I need to remove some of the details under Payment Method in my Invoice emails:

Country of IP
xxx

Debit type
xxx

Card numbers
xxx

Validity date
xxx

and I also need to remove the shipping Method Name from my invoice as well, from

Shipping Method:
Standard Delivery (free if 12+ bottles) - bestway

to

Shipping Method:
Standard Delivery (free if 12+ bottles)

in my invoice template, I can see these codes,

payment methods,

                                {{var payment_html}}

shipping,

                                {{var order.shipping_description}}
                                &nbsp;

But where are {{var payment_html}} and {{var order.shipping_description}} located?


texts: Magento 2 Order Email Template subTotal tfoot colspan Edit

texts: Where Can I edit the Order Email Template subTotal tfoot ??? I need to edit colspan 2 to 3. please check the image


texts: Magento 1.9 - How to debug - Configurable product price changed to 0 if chooses colors attribute

texts:
I have configurable product if choose different color in products page price return 0,

configuration :

In my configurable productpage,

Note :  I am using this extension, https://pluginarchive.com/magento/rp_display_price_free  if i disabled configurable product working fine. How to debug without delete the extension.

How to solve the issue. Any help.


texts: magento 2: record catalog_category_product_index

texts:
I have question. When I delete all record from table: catalog_category_product_index

and then run command:

php bin/magento indexer:reindex catalog_category_product catalog_product_category

will all product IDs be changed after this operation, or will IDs remain the same?


texts:
So here's the problem.

Backend Magento users who login at http://example.com/admin who are given a roll whose "resource access" is "All" are able to change any given customer's country.

However, if a backend user has a user roll whose "resource access" is set to "Custom" cannot change a customers country. When the Ajax request fails with a 403 error the user is redirected back to his dashboard. I have tried giving this user resource access = custom, and then checking off all possible options with no luck.

I'm at a loss for how to debug this thing, does any one know what's wrong? Or have ideas on where to start?
Thanks!


texts: stream_socket_enable_crypt error when trying to send emails in Magento2

texts:
I am getting the following error on the frontend of my Magento 2 (v 2.2.3) website when trying to share Wishlists or send a Contact Form. This hasn't always been the case just since I switched from PHP 5.6 to 7.0.14;

  Warning: stream_socket_enable_crypto(): Peer certificate CN='xxx.com.au' did not match expected CN=`localhost' in public_html/vendor/magento/zendframework1/library/Zend/Mail/Protocol/Smtp.php on line 206

I have a valid (and tested) SSL certificate installed. So, it is not an issue as per other posts of the SSL certificate not being valid.

I have also disabled SMTP Restrictions in my WHM settings (as per another post) and this doesn't work either.


texts: How to insert HTML break into magento product name

texts:
Looking to find a way to make a line break e.g <br /> on a product name.

I want the Manufacture name to site above the model.


texts: I want attribute set name in sales order grid In that column I want an Ordered First Item Attribute Set Name. In Magento 2

texts:
<?php

namespace Emipro\AdminSalesOrderGrid\Ui\Component\Listing\Column;

use Magento\Catalog\Model\ProductFactory;
use Magento\Eav\Model\AttributeSetRepository;
use Magento\Framework\View\Element\UiComponentFactory;
use Magento\Framework\View\Element\UiComponent\ContextInterface;
use Magento\Sales\Api\Data\OrderInterface;
use Magento\Sales\Model\Order\Item;
use Magento\Sales\Model\ResourceModel\Order\Grid\CollectionFactory;
use Magento\Ui\Component\Listing\Columns\Column;

class Attribute extends Column {

public function __construct(
    ContextInterface $context,
    OrderInterface $order,
    Item $item,
    CollectionFactory $collection,
    ProductFactory $product,
    AttributeSetRepository $attributeSet,
    UiComponentFactory $uiComponentFactory,
    array $components = [],
    array $data = []
) {
    $this->attributeSet = $attributeSet;
    $this->item = $item;
    $this->order = $order;
    $this->product = $product;
    $this->collection = $collection->create();
    parent::__construct($context, $uiComponentFactory, $components, $data);
}

public function getAttributeSetIdByProductId($product_id) {
    $product = $this->product->create()->load($product_id);
    foreach ($product as $item) {
        $attribute_set_id = $product->getAttributeSetId();
        $attributeCollection = $this->attributeSet->get($attribute_set_id);
        foreach ($attributeCollection as $name) {
            $attribute_set_name = $name['attribute_set_name'];
        }
    }
    return $attribute_set_name;
}

public function getOrderDetails($entityId) {

    $orderCollection = $this->order->load($entityId);
    $ordered_items = $orderCollection->getAllItems();
    $item_sku = "";
    $attribute_set_name = "";
    foreach ($ordered_items as $item) {
        $item_id = $item->getItemId();
        $product_id = $item->getProductId();

        $attribute_set_name = $this->getAttributeSetIdByProductId($product_id);

        if ($item_id == 1) {
            $item_sku = $item->getSku();
        }

        return $attribute_set_name;
    }
}

public function prepareDataSource(array $dataSource) {

    if (isset($dataSource['data']['items'])) {

        foreach ($dataSource['data']['items'] as &$item) {

            $item[$this->getData('name')] = $this->getOrderDetails($item['entity_id']);

            // echo "<pre>";
            // print_r($item);
            // exit;
        }
    }
    return $dataSource;
}
}


texts: How do I add a customer's email to the sales invoice?

texts:
Essentially looking to add customer email to our customer's receipts (invoices) and sales order emails that are generated to dispatch/couriers as well etc.

With a bit of searching I've established the best way to do this is simply to add this variable through the magento admin system area. So below:

System > Configuration > Customers > Customer Configuration > Address Templates

This brings up all of the address templates fields for text, html, pdf etc.

So I've added what I believe to be the variable name need into each box here.

So for example html is now:

  {{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend
  middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend
  suffix}} {{var suffix}}{{/depend}} {{depend company}}{{var
  company}}{{/depend}} {{if street1}}{{var street1}}{{/if}}
  {{depend street2}}{{var street2}}{{/depend}} {{depend
  street3}}{{var street3}}{{/depend}} {{depend street4}}{{var
  street4}}{{/depend}} {{if city}}{{var city}},  {{/if}}{{if
  region}}{{var region}}, {{/if}}{{if postcode}}{{var
  postcode}}{{/if}} {{var country}} {{depend
  telephone}}Mobile: {{var telephone}}{{/depend}} {{depend
  fax}}Landline: {{var fax}}{{/depend}} {{depend vat_id}}VAT:
  {{var vat_id}}{{/depend}} {{depend email}}Email: {{var
  email}}{{/depend}}

So the key line for me being the below:

  {{depend email}}Email: {{var email}}{{/depend}}

Other than this 1 change, is there anything else I'm failing to do to make this variable be added to the shipping address templates?


texts:
Is it possible to create a module in Magento 2, using standard routing, that responds to a URL in the form of

http://magento.example.com/namespace_module/return/index

That is -- a URL where the second parameter is a PHP reserved keyword.  The problem with the above is is create a PHP controller class name that's

Namespace\Module\Controller\Return\Index

and having Return in the namespace is illegal PHP.  I know if the URL's final parameter (traditionally called the action) was a reserved keyword

http://magento.example.com/namespace_module/foo/return

that Magento would let me create a controller class named

Namespace\Module\Controller\Foo\ReturnAction

However, this does not work for the second parameter.

Is there a way to do this using standard Magento 2 routing techniques?

If not, is there a generally considered best practice for injecting a custom router object to get this behavior, or some other technique that would let me work around this? (an after plugin on Magento\Framework\App\Router\ActionList?)


texts: How to define Custom js in Custom module Magento 2

texts:
app/code/{vendor}/{module}/view/frontend/requirejs-config.js

var config = {
    map: {
        '*': {
            'Magento_Swatches/js/swatch-renderer' : 'Wac_SwatchName/js/swatch-renderer',
            'magento-swatch.renderer' : 'Magento_Swatches/js/swatch-renderer',
            'CustomName' : 'Vendor_Module/view/frontend/web/js/custom',
        }
    }
};

  app/code/Vendor/Module/view/frontend/web/js/custom.js

$(document).on('swatch.initialized', function() {
 alert('test');
}

Only My Custom Js file Works When my Custom module load, But now Custom js not loading Properly ,Please  Check my custom js file and requirejs-config file


texts: How Can I Resolve a RequireJS Alias in Magento 2?

texts:
From a Disqus comment on my website

When I look at this file: vendor/magento/module-catalog/view/base/templates/product/price/tier_prices.phtml
I see something like this

<script type="text/x-magento-init">
{
".product-info-main": {
"addToCart": {
"origin": "tier",
"addToCartButton": "#product_addtocart_form [type=submit]",
"inputQty": "#qty",
"attr": "[data-tier-price]",
"productForm": "#product_addtocart_form",
"productId": "",
"productIdInput": "input[type=hidden][name=product]",
"isSaleable": ""
}
}
}
</script>

The "addToCart" should be some javascript file according to this article, but it is not. Maybe this is another feature ?


texts:
I am looking for some information and details around Magento Integration with Sitecore, what am i trying to find at the moment is:

1) Licensing requirements with Magento (this is what i see- https://www.grayboxpdx.com/blog/post/how-much-does-magento-2-cost)

2) Setup process with Sitecore.

3) Catalog management and Synchronization between two systems(Sitecore and Magento)

4) Feasibility of Magento with Sitecore

5) Any issues and risks to be considered.

6) How the Setup of Magento with Sitecore will actually work- like via APIs (REST/SOAP)?

Let me know your feedback and thoughts.

Thanks,

-Ankit


texts: How to add custom css in magento footer pages

texts:
How do I add custom CSS or JS to for a particular page?

Suppose,i want add a custom css file for Checkout cart which  will only show n at Cart.

Example: like a FAQ or any single page


texts:
we will have to enable the upload of an .svg image within the products.
We have tried all possible solutions but none of them seem to be working because Magento disabled them for security.
Can anybody help me?