texts:
How would you approach this?
The scenario I am looking at is:

a user creates/makes some changes to a Google Docs Spreadsheet (in a format quite similar to the one needed by Magento)
a script takes this Spreadsheet and performs a validation (columns are valid, attribute values are valid, sku exist and so on)
if the Spreadsheet is valid for import, additional processing takes place to make it compatible with Magento's Import format (not DataFlow); Magento's import format for attributes with multiple values is not that friendly from a user perspective
then this Spreadsheet can be imported in Magento.

Are there some extensions that already do this? Other people that have done this, share your experience. Additional things to consider?


texts: Magento 2 Custom Report grid is not working

texts:
Is anyone has created custom Report grid in Magento 2 Admin panel?

We have started to create a report but we are facing an issue with display data and while we click on "Refresh" button entire page is messed up.

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<update handle="reports_report_grid"/>
<body>
    <referenceBlock name="adminhtml.report.grid">
        <arguments>
            <argument name="id" xsi:type="string">gridMaterialReport</argument>
            <argument name="dataSource" xsi:type="object">Commercepundit\CoreAdminOrder\Model\ResourceModel\Material\Collection\Initial</argument>
        </arguments>
    </referenceBlock>
    <referenceBlock name="adminhtml.report.grid.export">
        <arguments>
            <argument name="exportTypes" xsi:type="array">
                <item name="csv" xsi:type="array">
                    <item name="urlPath" xsi:type="string">*/*/exportOrdersCsv</item>
                </item>
                <item name="excel" xsi:type="array">
                    <item name="urlPath" xsi:type="string">*/*/exportOrdersExcel</item>
                </item>
            </argument>
        </arguments>
    </referenceBlock>
    <referenceBlock name="adminhtml.report.grid.columnSet">
        <arguments>
            <argument name="count_totals" xsi:type="string">1</argument>
        </arguments>
        <block class="Magento\Backend\Block\Widget\Grid\Column" name="adminhtml.report.grid.columnSet.order_id" as="order_id">
            <arguments>
                <argument name="header" xsi:type="string" translate="true">Order Id</argument>
                <argument name="sortable" xsi:type="string">0</argument>
                <argument name="type" xsi:type="string">text</argument>
                <argument name="index" xsi:type="string">order_id</argument>
                <argument name="id" xsi:type="string">order_id</argument>
                <argument name="column_css_class" xsi:type="string">col-name</argument>
                <argument name="header_css_class" xsi:type="string">col-name</argument>
            </arguments>
        </block>
        <block class="Magento\Backend\Block\Widget\Grid\Column" name="adminhtml.report.grid.columnSet.sqft" as="sqft">
            <arguments>
                <argument name="header" xsi:type="string" translate="true">Sqft</argument>
                <argument name="sortable" xsi:type="string">0</argument>
                <argument name="type" xsi:type="string">number</argument>
                <argument name="index" xsi:type="string">sqft</argument>
                <argument name="total" xsi:type="string">sum</argument>
                <argument name="id" xsi:type="string">sqft</argument>
                <argument name="column_css_class" xsi:type="string">col-qty</argument>
                <argument name="header_css_class" xsi:type="string">col-qty</argument>
            </arguments>
        </block>
    </referenceBlock>
</body>

+++++++++++++++++

While we can click on Refresh entire page is look like below.

Can anyone help me on this??

Thanks,


texts: Importing images with special characters in path

texts:
I am trying to import a lot of images. Images for each product are placed in subfolders by product IDs and locale.
The problem is that each locale specific folder name starts with a caret (^).
Example image paths:
9454032/^all/my_image.jpg
9454032/^en/my_english_image.jpg

What I'm getting
1. Wrong URL/path used for attribute image in row(s): 1, 2
2. Wrong URL/path used for attribute small_image in row(s): 1, 2
3. Wrong URL/path used for attribute thumbnail in row(s): 1, 2
4. Wrong URL/path used for attribute additional_images in row(s): 1, 2

What I've tried

Encoding ^ to %5E, like in URLs
Simply removing the caret from

What I'm sure of

CSV file encoding; I'm using Sublime text, besides Mac's Numbers, to verify the data
Image path is correct, because it works without the caret in the path
Multiple images (in additional_images) are separated correctly, with |, and specified in the importer
There are no other special characters in the image names
No extra slash in the beginning of the image path

Possible solutions

A shell script to rename all folders containing ^, although I'd like to avoid altering original data for consistency reasons

References

https://sumankc.com/2016/07/28/wrong-urlpath-used-for-attribute-image-in-rows-magento2-product-import/

Versions

Magento 2.3.5-p1
PHP 7.3.24


texts:
I am trying to change sign in or create an account message which is called by block named product.review.form in  catalog_product_view.xml.

  /vendor/magento/module-review/view/frontend/layout/catalog_product_view.xml

The template used is form.phtml which is set in Magento\Review\Block\Form.php

I want to override this part of code in

  /vendor/magento/module-review/view/frontend/templates/form.phtml

<?php else : ?>

            <?= $block->escapeHtml(__('Only registered users can write reviews. Please Sign in or create an account', $block->getLoginLink(), $block->getRegisterUrl()), ['a']) ?>

<?php endif ?>

Question : How can i override the sentence in that particular
?

Note : I tried to use plug-in but _construct() is protected and using preference is not suitable for my requirement.


texts: How to do a complete start over in Magento 2?

texts:
I have a neighbor who had a Magento 2 site made that is really buggy. The developer lives in another country and won't fix it without further payment. The whole thing seems a bit scammy to me and I would like to help her.
How can I plan a starting over from scratch considering what we have today?
How could we do that?


texts: How to start working with HTML5 in magento

texts:
I am a magento developer and now want to start theme development using HTML5 and CSS3. Please help me for a start on this if any body can.

Thanks


texts: Product image not displayed in magento 2

texts: Uncaught SyntaxError: Unexpected token , in JSON


texts: Compilation from source on static-content deploy in magento 2.3.0 when upgraded from magento 2.2.2

texts:
Hello i had upgraded magento 2.2.2 to 2.3.0 and i am getting following error when i do setup:static-content:deploy

Compilation from source: /home/xxxxxxxx/public_html/xxxx/xxxxxx/vendor/magento/theme-frontend-blank/web/css/styles-m.less
variable @button-primary__font-family is undefined in file /home/xxxxx/public_html/xxxxx/xxxxx/var/view_preprocessed/pub/static/frontend/xxxxx/xxxxx/en_US/css/source/lib/_buttons.less in _buttons.less on line 279, column 27
277|
278| .lib-button-primary(
279|     @_button-font-family: @button-primary__font-family,
280|     @_button-font-size: @button-primary__font-size,
281|     @_button-font-weight: @button-primary__font-weight,
282|     @_button-line-height: @button-primary__line-height, in _extends.less

In File.php line 150:

  The contents from the "/home/xxxxx/public_html/xxxxx/xxxxx/pub/static/frontend/xxxxx/xxxxx/en_US/css/styles-m.css" file can't be read. Warn
  ing!file_get_contents(/home/xxxxx/public_html/alpha/xxxxx/pub/static/frontend/xxxxx/xxxxx/en_US/css/styles-m.css): failed to open stream: N
  o such file or directory

Please help me


texts:
When i try to run sql query, its not working. i get error like,

My Query is below

  SELECT cpev.value as Name,cpe.sku,gp.value category_url, ea.value
  image_path FROM catalog_product_entity cpe inner join (SELECT
  entity_id,value FROM catalog_product_entity_varchar WHERE
  attribute_id="71") cpev on cpev.entity_id = cpe.entity_id inner join
  (SELECT entity_id,value FROM catalog_product_entity_media_gallery) ea
  on ea.entity_id=cpe.entity_id inner join( SELECT category_id,
  product_id FROM catalog_category_product) eavv on cpe.entity_id
  =eavv.product_id inner join( SELECT entity_id,value FROM catalog_category_entity_varchar WHERE attribute_id='57') gp on
  eavv.category_id=gp.entity_id


texts:
When I want to intergrade a new plugin through composer I get an error from a attempt of intergrating a tool through the command line. How do I remove this and try to add the following tool:

composer require dealer4dealer/xcore-magento2

Error is:

[RuntimeException]
  Failed to execute git clone --mirror 'https://***:***@github.com/rusdragos/m2-weltpixel-google-tag-manager.git' '/root/.cache/composer/vcs/git-github.com-rusdragos-m2-weltpixel
  -google-tag-manager.git/'
  Cloning into bare repository '/root/.cache/composer/vcs/git-github.com-rusdragos-m2-weltpixel-google-tag-manager.git'...
  remote: Repository not found.
  fatal: repository 'https://***:***@github.com/rusdragos/m2-weltpixel-google-tag-manager.git/' not found


texts: Magento Configurable Product Image too Large

texts:
I wanted to create configurable products in my shop.
As i did that and was ready, i found out that my image is way too big.

I mean the whole layout is strange and does not look like the one for simple products.

Iam using Magento 1.9.0.1 with a custom default template.

I just don't know how to edit this layout.


texts:
I would like to create own controller with own frontend view.

Here are my files:
registration.php:

<?php

\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Unity_CheckOrder',
    __DIR__
);

controller:

namespace Unity\CheckOrder\Controller\Index;

//use Magento\Framework\App\Action\Context;

class Index extends \Magento\Framework\App\Action\Action
{
//    protected $_resultPageFactory;
//
//    public function __construct(Context $context, \Magento\Framework\View\Result\PageFactory $resultPageFactory)
//    {
//        $this->_resultPageFactory = $resultPageFactory;
//        parent::__construct($context);
//    }

    public function execute()
    {
        echo '
You Did It!
';
        var_dump(__METHOD__);
       // $resultPage = $this->_resultPageFactory->create();
       // $resultPage->addHandle('check_order');
      //  return $resultPage;
    }
}

Of course  I tried also with:

namespace Unity\CheckOrder\Controller\Index;

use Magento\Framework\App\Action\Context;

class Index extends \Magento\Framework\App\Action\Action
{
    protected $_resultPageFactory;

    public function __construct(Context $context, \Magento\Framework\View\Result\PageFactory $resultPageFactory)
    {
        $this->_resultPageFactory = $resultPageFactory;
        parent::__construct($context);
    }

    public function execute()
    {
//        echo '
You Did It!
';
//        var_dump(__METHOD__);
        $resultPage = $this->_resultPageFactory->create();
        $resultPage->addHandle('check_order');
        return $resultPage;
    }
}

etc/module.xml

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Unity_CheckOrder" setup_version="1.0.0">
    </module>
</config>

etc/frontend/routes.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="standard">
        <route id="checkorder" frontName="checkorder">
            <module name="Unity_CheckOrder" />
        </route>
    </router>
</config>

view/frontend/layout/checkorder_index_index.xml

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

        <title>
            Simple Magento 2 Module
        </title>

        <referenceContainer name="content">
            <block class="Unity\CheckOrder\Block\Test" name="checkorder" template="Unity_CheckOrder::checkorder.phtml" cacheable="false"/>
        </referenceContainer>

</page>

view/frontend/templates/checkorder.phtml

<?php $this->getHelloWorldTxt(); ?>

block test.php

<?php
namespace Unity\CheckOrder\Block;

class Test extends \Magento\Framework\View\Element\Template
{
    public function __construct(\Magento\Backend\Block\Template\Context $context, array $data = [])
    {
        parent::__construct($context, $data);
    }

    public function getHelloWorld()
    {
        return 'Hello World';
    }
}

I also tried with

<?php
namespace Unity\CheckOrder\Block;

class Test extends \Magento\Framework\View\Element\Template
{
    public function getHelloWorld()
    {
        return 'Hello World';
    }
}

After go to url magento2test.localhost/checkorder/  and magento2test.localhost/checkorder/index/index/

I got 404 all the time.
Of course  I tried :

php bin/magento setup:upgrade
rm -rf var/cache/* var/page_cache/* var/generation/*
php bin/magento cache:clean / flush
php bin/magento indexer:reindex
php bin/magento setup:di:compile

Module is enabled and visible in Admin Advanced tab

Here is structure of my module:


texts: Connect web application with magento website

texts:
I have created magento based ecommerece website. Now i am creating a php based web application for website operations. i want to add option to import products, update price inventory everything from php application. But unable to connect. please guide me. I want to add more options in application.

Thanks in advance..


texts: Magento 2.3 invalid form key. please refresh the page

texts: while submit customer registration form i got this error. can anyone help me to fix this issue!


texts: Showing Attributes Bundle Products Magento Community 1.9.1

texts:
Looking at the Bundled product template select.phtml, I cannot figure how to pull in the attribute options in the 'dropdown' select input type that distinguishes between children (Simple products) rather than the Product Name (by default). In Configurable products this is the super_configurable_attribute so what I'm looking to do is something like a super_bundle_attribute which displays the relative attribute option.

app/design/frontend/rwd/default/template/bundle/catalog/product/view/type/bundle/option/select.phtml

How I would need to change this in Magento CE 1.9?


texts:
I created a custom category attribute "category_special" and placed it in the category form via ui_component. There I can select categories like in the Magento default product form. The attribute is visible in the category form. After saving the category the attribute content is still empty. Do I have to choose a specific backend model for the attribute or something like this?

Setup\InstallData.php

$eavSetup->addAttribute(
                \Magento\Catalog\Model\Category::ENTITY,
                'category_special',
                [
                    'type' => 'text',
                    'input' => 'select',
                    'label' => 'Category Special',
                    'visible' => true,
                    'required' => false,
                    'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE,
                    'source' => '',
                    'default' => null,
                ]
            );

view/adminhtml/ui_component/category_form.xml

<field name="category_special">
    <argument name="data" xsi:type="array">
        <item name="options" xsi:type="object">Magento\Catalog\Ui\Component\Product\Form\Categories\Options</item>
        <item name="config" xsi:type="array">
            <item name="label" xsi:type="string" translate="true">Category Special</item>
            <item name="componentType" xsi:type="string">field</item>
            <item name="formElement" xsi:type="string">select</item>
            <item name="component" xsi:type="string">Magento_Catalog/js/components/new-category</item>
            <item name="elementTmpl" xsi:type="string">ui/grid/filters/elements/ui-select</item>
            <item name="dataScope" xsi:type="string">category_special</item>
            <item name="filterOptions" xsi:type="boolean">true</item>
            <item name="showCheckbox" xsi:type="boolean">true</item>
            <item name="disableLabel" xsi:type="boolean">true</item>
            <item name="multiple" xsi:type="boolean">true</item>
            <item name="levelsVisibility" xsi:type="number">1</item>
            <item name="sortOrder" xsi:type="number">20</item>
            <item name="required" xsi:type="boolean">false</item>
            <item name="validation" xsi:type="array">
                <item name="required-entry" xsi:type="boolean">false</item>
            </item>
            <item name="listens" xsi:type="array">
                <item name="${ $.namespace }.${ $.namespace }:responseData" xsi:type="string">setParsed</item>
            </item>
        </item>
    </argument>
</field>


texts: ERROR: “/app/etc/” must exist for proper tool work magento 1.9?

texts:
I am trying to install the newly release security patch for magento 1.9. I am working on Ubuntu system.

and I am getting the following error.

  ERROR: "/app/etc/" must exist for proper tool work.

I am running php code.

<?php
    print("<PRE>");
    passthru("/bin/bash PATCH_SUPEE-7405_CE_1.9.2.2_v1-2016-01-20-04-35-33.sh");
    print("</PRE>");
    echo "Done";
?>

Can anyone tell me what is the exact issue and how it could be fixed.


texts: Retrieve total amount of colors available for product in Magento 2

texts:
I'm using the code below in a module to retrieve the total number of available colors for a configurable product. The code retrieves the data fine however removes the swatches completely. Any help on sorting this so the swatches show as well as the total.

Test/Mod/Block/Product/ListProduct.php

<?php

namespace Test\Mod\Block\Product;

class ListProduct extends \Magento\Catalog\Block\Product\ListProduct {

public function getProductDetailsHtml(\Magento\Catalog\Model\Product $product) {
   if ($product->getTypeId() == \Magento\ConfigurableProduct\Model\Product\Type\Configurable::TYPE_CODE) {

         $_children = $product->getTypeInstance()->getUsedProducts($product);
         foreach ($_children as $child){
          $colorarr[$child->getColor()] = $child->getColor();
         }
         if(count($colorarr) > 0) { ?>
            <div class="color-total">
                <?php echo count($colorarr) . 'Color'; ?>
            </div>
        <?php  }
    }
}

}


texts: How to solve magento migration duplicate entry error?

texts:
I am doing migration as per the magento documentation. I am aware of all steps.

while the execution of

php bin/magento migrate:data --auto vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.3.7/config.xml

I'm getting below error:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '50575-50577' for key 'CATALOG_PRODUCT_SUPER_LINK_PRODUCT_ID_PARENT
  _ID'

This is what I found in catalog_product_super_link table.

I'm using fresh Magento 2.3.2 and migrating it.

I think I want to delete one record but not sure.
50577 is an ID of configurable product and 50575 is id of simple product.


texts:
I am trying to remove the language switcher and trying to add store switcher to the header, however store switcher doesn't show up tried all possible things
Please help...


texts: In magento 2 - What mean of 'is_used_for_customer_segment' in customer_eav_attribute table?

texts: In magento 2 EE, What mean of 'is_used_for_customer_segment' in customer_eav_attribute table (explain when set it's value is true and false) ?


texts: Magento 2 - Custom block under Order Summary block

texts:
In my custom payment module, a checkout_index_index.xml file allows me to display a custom block above the payment options if I add the following xml code:

<referenceContainer name="content">
  <block class="Namespace\MyModule\Block\MyBlockClass" before="-" template="Namespace_MyModule::checkout/cart/my-form.phtml"/>
</referenceContainer>

On that /checkout/#payment page, what I should replace name="content" with in the referencecontainer tag so that my block is displayed in the sidebar on the right, either in the Order Summary block or under ?


texts: JSON API "website_id" in tier price create

texts:
I've already got products and stock updates going back and forth via the JSON API, and I'm now working on orders and prices for each store view - each one has a different currency, therefore different price values.

To push prices, I call rest/V1/products/tier-prices and specify:

{
  "prices": [
    {
      "price": 11,
      "price_type": "fixed",
      "sku": "sku_goes_here",
      "website_id": ???,
      "customer_group": "all groups",
      "quantity": 1
     }
  ]
}

But, I don't know what the website_id is.  I load products etc. using the URL store view like rest/store2view/V1/products.  This is a mandatory field.

I can get the website_ids for each item, but this is just a list of numbers, with no link back to which view they are.

How do I convert the store2view name into a website ID?


texts: Filtering issue when override sales_order_grid to include Product name and discount amt in the Sales Order grid

texts:
I have added Product name and Discount Amt in the Sales order grid. It is displayed properly. But my issue is filtering is not working on these columns.

The code of my Grid.php is like :

class Company_Module_Block_Adminhtml_Sales_Order_Grid extends Mage_Adminhtml_Block_Widget_Grid
{
public function __construct()
{
    parent::__construct();
    $this->setId('sales_order_grid');
    $this->setUseAjax(true);
    $this->setDefaultSort('created_at');
    $this->setDefaultDir('DESC');
    $this->setSaveParametersInSession(true);
}
protected function _getCollectionClass()
{
    return 'sales/order_grid_collection';
}

protected function _prepareCollection()
{
    $collection = Mage::getResourceModel('sales/order_collection')
        ->join(
            'sales/order_item',
            '`sales/order_item`.order_id=`main_table`.entity_id',
            array(
                'names' => new Zend_Db_Expr('group_concat(`sales/order_item`.name SEPARATOR ",")'),
                )
            );
            $collection->getSelect()->group('entity_id');
            $collection->getSelect()->joinLeft(array('sfog' => 'sales_flat_order_grid'),'main_table.entity_id = sfog.entity_id',array('bill_name'=>'sfog.billing_name'));
        $this->setCollection($collection);
    return parent::_prepareCollection();
}

protected function _prepareColumns()
{
    $this->addColumn('bill_name', array(
        'header' => Mage::helper('sales')->__('Bill to Name'),
        'index' => 'bill_name',
        //'filter_index' => 'sfog.billing_name',
    ));

    $this->addColumn('names', array(
        'header' => Mage::helper('sales')->__('Product'),
        'index' => 'names',
    ));

    $this->addColumn('discount_amount', array(
        'header' => Mage::helper('sales')->__('Discount'),
        'index' => 'discount_amount',
    ));

    $this->addRssList('rss/order/new', Mage::helper('sales')->__('New Order RSS'));

    $this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));
    $this->addExportType('*/*/exportExcel', Mage::helper('sales')->__('Excel XML'));

    return parent::_prepareColumns();
}

protected function _prepareMassaction()
{
    $this->setMassactionIdField('bundle_id');
    $this->getMassactionBlock()->setFormFieldName('bundlediscount');
    $this->getMassactionBlock()->addItem('delete',array(
        'label'=>$this->_helper->__('Delete'),
        'url'=>$this->getUrl('*/*/massDelete'),
        'confirm'=>'Are you sure?'
    ));
    $this->getMassactionBlock()->addItem('status',array(
        'label'=>$this->_helper->__('Change Status'),
        'url'=>$this->getUrl('*/*/massStatus'),
        'additional'=>array(
            'visibility'=>array(
                'name'=>'status',
                'type'=>'select',
                'class'=>'required-entry',
                'label'=>$this->_helper->__('Status'),
                'values'=>array(
                    1=>$this->_helper->__('Enabled'),
                    0=>$this->_helper->__('Disabled'),
                )
            )
        )
    ));
     return parent::_prepareMassaction();
}
public function getRowUrl($row)
{
    if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/view')) {
        return $this->getUrl('*/sales_order/view', array('order_id' => $row->getId()));
    }
    return false;
}

public function getGridUrl()
{
    return $this->getUrl('*/*/grid', array('_current'=>true));
}
}
?>

P.S.
I also tried using filter_condition_callback but it doesn't work. Please help me out. Thanks in advance.


texts: Free Shipping for just one type of product

texts:
This might be an easy question, but it has me stumped. I have a rule set up that automatically gives the customer free shipping if they're ordering a certain type of product.

Fixed Amount Discount
Discount Amount is 0
Free Shipping "For matching items only"

Applied if the cart meets the following condition:

Category is 6

This works really well, but right now if the customer adds another product of a different category to the cart they're still getting the free shipping. How can I prevent this?

Edit: Is priority a factor here?


texts: characters like æ ø å ö ä ü for display in magento

texts:
When I display Danish/Norwegian characters like "æ ø å", the current character and the rest of the text in that field are gone in magento (Magento ver. 1.9.3.2).

Example for::

Input filed:

"FJORD [F-YOR], barskog, bryter fosser og rikelig frukt foredle drama av de norske fjordene. Våre diffusorer bringe subtile og stabil duft til ditt hjem i ukesvis."

Output

"FJORD [F-YOR], barskog, bryter fosser og rikelig frukt foredle drama av de norske fjordene. V"

For solution, I've added meta tag in header file:

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

but it's not working.

Any help or suggestion will be appreciated.


texts: Difference Between Offline Shipping Carrier vs Online Shipping Carrier

texts:
I am creating a module for a 3rd party rating for Magento. I only need the rates to show in the cart checkout and there is no label creation, tracking, pickup, etc for this carrier. It will send out an XML request as a post through the HTTP/ClientFactory then parse the response to show the rates returned.

My question is, is there a requirement for this to extend AbstractCarrierOnline, like UPS, USPS, and FedEx do, or can I leave it as extending AbstractCarrier? I currently have it is working as an AbstractCarrier but when I've tried to convert it to AbstractCarrierOnline, it constructs it just fine but never hits the collectRates() method and I don't see any errors anywhere and just says that it is not available. The one main downside I can see is that the Online includes the set and get for CachedQuotes.


texts: How can i add product to wishlist from catalog page using ajax can anyone provide me the code


texts: Migrating a SOAP App from Magento 1.9 to Magento 2.0.2

texts:
For Magento 1.9, I wrote an app that synchronizes selected columns from an MSSQL product database with the Magento MySQL database. The common key across the databases is a product sku.

This technique has worked great for years on Magento 1.9 and allows me to keep inventory in a brick & mortar warehouse sync'ed with the website.

The app uses a SOAP session to connect and exchange the product info ...

$soap = new SoapClient( 'http://www.mystore.com/api/?wsdl' );
$sessionId = $soap->login( $mage_user, $mage_api_key );

synchronize logic, etc.

I really don't need to re-invent this app, but I do need to connect it via magento2 SOAP.  I am struggling to understand how to do this, and googling just keeps taking me deeper into a black hole of confusion.

Has anyone experience of doing this?  Any templates?

Many thanks for any help / pointers.


texts: Magento wrong logged in Customer Data issue

texts:
First of all, thank you very much for all the help in advance. This is my first time posting a question and I'm sorry if there's any mistake at all. Now, Let me first try to explain what I'm trying to achieve.

I've tried to create a simple plugin that will add various logged in customer data into JS objects. I've managed to create a simple phtml file containing something like below.

<?php
$configValue = Mage::getStoreConfig( 'data_options/section_one/custom_field_one',Mage::app()->getStore());
$currency_code = Mage::app()->getStore()->getCurrentCurrencyCode();

if($configValue > 0):

if (Mage::getSingleton('customer/session')->isLoggedIn()) :
// Get the customer object from customer session
    $customer = Mage::getSingleton('customer/session')->getCustomer();
    $custID = $customer->getID();//get customer id
    $custName = $customer->getName();//get customer full name
    $custEmail = $customer->getEmail();//get customer email
?>

<script>
    var somethingData = {};
    somethingData.customer = {};
    somethingData.customer.id = '<?php echo $custID; ?>';
    somethingData.customer.name = '<?php echo $custName;?>';
    somethingData.customer.email = '<?php echo $custEmail;?>';
    somethingData.cart = {};
    somethingData.cart.currency = '<?php echo $currency_code; ?>';
</script>

<?php else: ?>
<script>
    var somethingData = {};
    somethingData.cart = {};
    somethingData.cart.currency = '<?php echo $currency_code; ?>';
</script>
<?php endif;?>
<?php endif;?>

And also a local.xml file containing something like below.

<layout>
    <default>
        <reference name="head">
            <block type="core/template" name="homepage" template="something/something.phtml"></block>
        </reference>
    </default>
</layout>

So far, with these 2 main files, I managed to get the plugin working and on the page source, it will show something like below.

Now, for the issue, I've tried to install this exact same plugin into a Magento Enterprise website and the problem is the logged in customer data showing up is not always correct. Sometimes or perhaps most of the time, some other people's data will appear instead of my data when I login and it's happening for all the other people visiting the website too.

I've done some research about this and it seems that it has something to do with FPC (Full Page Cache) mechanism that exists in Magento Enterprise. I've tried some things like adding a cache cleaning function call on the phtml file and still the issue happens.

I've tried to look around again and it seems that it's an issue that some people have experienced also in the past but so far, I can't seem to find a working solution yet and so I decided to post a question regarding this here in hope that someone can help me. If anyone has an idea, please let me know what needs to be done or added into the plugin so that the logged in customer data will always show the correct information.


texts: Magento 2: Tax is calculate before applying discount

texts:
We need to apply all the taxes after applying discount. But currently taxes are calculated before applying discount.

Screenshot: As you can see how the tax are being calculate on 200 rather than on (200-14) = 186.

Here are tax settings in store - Configuration - Sales - Tax. (We have set it to calculate taxes after discount)

Discounts are being applied here programmatically following this link
because we have discounts based on the type of user logged in.

Any suggestion is much appreciated. Thanks.


texts: How to remove autofill email id in email fields Magento 2

texts:
In my newsletter and login page, whenever I open the page it prefills the email. I don't know how Magento is doing this, I want to remove the autofill of email in Magento.

And I want to remove the prefilled email id from the newsletter part.
I don't know how Magento 2 is doing this from b backend.


texts:
I have to override Sender.php which path is Magento\Sales\Model\Order\Email

I try but its not work my code is :

di.xml

<type name="Magento\Sales\Model\Order\Email\Sender">
        <plugin name="module_name::aroundPrepareTemplate" type="module\name\Model\Order\Email\Sender" sortOrder="99999"/>
    </type>

module\name\Model\Order\Email
Sender.php

<?php

    namespace module\name\Model\Order\Email;

    use Magento\Sales\Model\Order;
    use Magento\Sales\Model\Order\Email\Container\IdentityInterface;
    use Magento\Sales\Model\Order\Email\Container\Template;
    use Magento\Sales\Model\Order\Address\Renderer;

    abstract class Sender
    {

        protected $senderBuilderFactory;

        protected $templateContainer;

        protected $identityContainer;

        protected $logger;

        protected $addressRenderer;

        public function __construct(
        Template $templateContainer,
        IdentityInterface $identityContainer,
        \Magento\Sales\Model\Order\Email\SenderBuilderFactory $senderBuilderFactory,
        \Psr\Log\LoggerInterface $logger,
        Renderer $addressRenderer
        ) {
            $this->templateContainer = $templateContainer;
            $this->identityContainer = $identityContainer;
            $this->senderBuilderFactory = $senderBuilderFactory;
            $this->logger = $logger;
            $this->addressRenderer = $addressRenderer;
        }

        public function aroundPrepareTemplate($subject,Order $order)
        {
            $this->templateContainer->setTemplateOptions($this->getTemplateOptions());
            $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
            $orderItems = $order->getAllItems();

            foreach ($orderItems as $item) {

                $product = $objectManager->get('Magento\Catalog\Model\Product')->load($item->getProductId());
                $categoryIds = $product->getCategoryIds();

            }
            foreach($categoryIds as $catid){
                $_objectManager = \Magento\Framework\App\ObjectManager::getInstance();
                $category = $_objectManager->create('Magento\Catalog\Model\Category')
                ->load($catid);
            }

            if ($order->getCustomerIsGuest()) {
                $templateId = $this->identityContainer->getGuestTemplateId();
                $customerName = $order->getBillingAddress()->getName();
                } else {
                $templateId = $this->identityContainer->getTemplateId();
                $customerName = $order->getCustomerName();
            }

            if($catid == 461){
                $templateId = 11 ;
            }

            $this->identityContainer->setCustomerName($customerName);
            $this->identityContainer->setCustomerEmail($order->getCustomerEmail());
            $this->templateContainer->setTemplateId($templateId);
        }

    }


texts: Customer not created when creating new order as admin (Magento 2.3.4)

texts:
When creating a new order in the backend as an admin, you can either select from existing customers or click the "Create New Customer" button. However, we area finding that new customers added in this process are not actually created and are not in the customer grid afterwards.
I've tested with a vanilla installation of Magento 2.3.4 and have not been able to replicate this failure to create a new customer. How might I troubleshoot / fix this?


texts: Sales Order Grid is empty after data migration process

texts:
I've made data migration from Magento 1 to Magento 2 using data-migration-tool according to this article http://devdocs.magento.com/guides/v2.0/migration/migration-migrate-data.html

Orders migrated successfully, but Sales Order grid is empty - this happened because sales_flat_order_grid (from Magento 1) and sales_order_grid (from Magento 2) tables are ignored in the mapping file by default, like this.

<destination>
    <document_rules>
        <ignore>
           <document>sales_order_grid</document>
        </ignore>
    </document_rules>
</destination>

These tables have different columns (Magento2's table has 10 additional columns), and they can't be moved just like that.

Is there any way to re-build sales_order_grid table, based on another tables data?

I've cleaned cache and made all reindexes, with no luck.


texts: My website is very slow. I need to improve the performance

texts:
Website have Following datas :

Product : 40000

Category : 200

Attribute Set : 583

Attribute : 2534

Server Configuration :

4 vCPU

16GB RAM

150GB SSD

1TB/mo bandwidth

Media, JS, CSS is comming from CDN

Installed  MIRASVIT FPC extension

Database Catch : Redis

My website take more than 15sec to load. Please suggest me to increse the performance


texts: How to get values passed from phtml in js magento 2?

texts:
I have passed two variables in my phtml to js file as below

<script type="text/x-magento-init">
        {
            ".slider-gallery": {
                "slickSlider": {
                    "autoplay": <?php /* @escapeNotVerified */ echo $block->getConfigData('autoplay'); ?>,
                    "autoplay_speed":  <?php /* @escapeNotVerified */ echo $block->getConfigData('autoplay_speed'); ?>
                }
            }
        }

        </script>

My js file is

require([
    'jquery',
    'slick'
], function ($) {

    $(document).ready(function () {
 var slickConfig = {
            autoplay: true,
            infinite: true,
            arrows: true,
            dots: true,
            draggable: false,
            slidesToShow: 1,
            slidesToScroll: 1,
            autoplaySpeed: 1000,
        };
        $('.slider-gallery').slick(slickConfig);

    });
});

How to get values of these variables in my js file?


texts: Magento checkout page terms and agreements required

texts: How can I make my terma and agremeents checkbox appear as required? All of shipping address form fields have a red color text underneath each of them. How I can I make same thing to appear beneath my terms and agreements checkbox in Checkout Page?


texts: How to edit the Recurring profiles page?

texts:
I like to add a button for each recurring profile to the table.
Now I don't know how to edit that page.
I can't find an Phtml file that reference to recurring profile.
The directory is: `

  app/design/frontend/rwd/my-theme/template

anyone knows how to edit the recurring profiles page in the customer panel?


texts: Magento 2 issue diffence CSS content on same file domain/pub/static/.../file.css and domain/static/.../files.css?

texts:
I have problem with magento 2.2.7 but cannot find way fix so hope someonce can help.
File name: domain/pub/static/.../file.css and domain/static/.../file.css.

After I changed content of file.css and push to server just only domain/pub/static/.../file.css apply changed. I tried push cache and deploy but content of domain/static/.../file.css not change. My current website load style file via url domain/static/.../file.css.

I got this after STORE > CONFIGURATION > ADVANCED > DEVELOPER > Storage Configuration for Media > CLICK button Synchronize.

I need appy my change on domain/static/.../file.css. Anybody know how to do that?

Note: I tried Sign Static Files change to Yes and No but not luck. I flushed cache after change any config option.

Updated: this content of file after load pub/static and /static/ cache be flushed and browser cache be cleaned

Thanks advance!


texts:
I have created custom customer attribute, and it is working (the attribute is registered in DB). When I try to enter data for that attribute nothing happens.

Code for creating attribute:

config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Sasha_Customer>
            <version>0.0.1</version>
        </Sasha_Customer>
    </modules>
    <global>
        <fieldsets>
            <customer_account>
                <abn><create>1</create><update>1</update></abn>
            </customer_account>
        </fieldsets>
        <models>
            <sasha_customer>
                <class>Sasha_Customer_Model</class>
            </sasha_customer>
        </models>
        <resources>
            <sasha_customer_setup>
                <setup>
                    <module>Sasha_Customer</module>
                    <class>Sasha_Customer_Model_Entity_Setup</class>
                </setup>
            </sasha_customer_setup>
        </resources>
    </global>
</config>

Model/Entity/Setup.php

<?php

class Sasha_Customer_Model_Entity_Setup extends Mage_Customer_Model_Entity_Setup {}

sql/sasha_customer_setup/mysql4-install-0.0.1.php

<?php

$installer = $this;
$installer->startSetup();

$installer->addAttribute('customer', 'abn', array(
    'label'    => 'ABN',
    'type'     => 'varchar',
    'input'    => 'text',
    'visible'  => true,
    'required' => true,
    'position' => 9999,
    "unique"   => true
));

$installer->endSetup();

And in the account information (edit.phtml) I have this:

*<?php echo $this->__('ABN') ?>

<input type="text" name="abn" id="abn" value="<?php echo $this->escapeHtml($this->getCustomer()->getAbn()) ?>" title="<?php echo $this->__('ABN') ?>" class="input-text required-entry" />

What am I doing wrong?


texts:
Here is my accordion and it's working beautifully.

var accordion = new Accordion('checkoutSteps', '.step-title', true);
    <?php if($this->getActiveStep()): ?>
    accordion.openSection('opc-<?php echo $this->getActiveStep() ?>');
    <?php endif ?>
    var checkout = new Checkout(accordion, {
            progress: '<?php echo $this->getUrl('checkout/onepage/progress') ?>',
            review: '<?php echo $this->getUrl('checkout/onepage/review') ?>',
            saveMethod: '<?php echo $this->getUrl('checkout/onepage/saveMethod') ?>',
            failure: '<?php echo $this->getUrl('checkout/cart') ?>'
        }
    );

I have to call this custom function backTab(). How can I call this function when my accordion successfully moves to the next step?


texts:
How can I list content in cms edit page from other table?

Which function should be overwritten?

I want to change the table where the content in wysiwyg editor is getting from another table.

How can i change this?


texts:
I'm trying to send mail from my custom module. For this I have created system.xml file, but it's returning error.

Error:

  Email template 'custom_mail_template' is not defined.

my code is:

 <?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
        <tab id="custom" translate="label" sortOrder="1">
            custom mail
        </tab>

            custom mail
            <tab>custom</tab>
            <resource>Learning_Custom::config_custom</resource>
            <group id="mail" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
                Custom
                <field id="active" translate="label" type="select" sortOrder="0" showInDefault="1" showInWebsite="1" showInStore="1">
                    Enabled
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="template" translate="label comment" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1">
                    Email Template
                    <comment>Email template chosen based on theme fallback when "Default" option is selected.</comment>
                    <source_model>Magento\Config\Model\Config\Source\Email\Template</source_model>
                </field>
            </group>

    </system>
</config>

Any suggestions will appreciate.


texts: How to create custom log file in magento 2

texts:
Can anyone help me in creating custom logger file in mmagento 2.
I want to display collection object in log file.
So far, i have tried this code but did not work.
getting $collection object from public function massAction(AbstractCollection $collection)

$writer = new \Zend\Log\Writer\Stream(BP . '/var/log/pdf.log');
    $logger = new \Zend\Log\Logger();
    $logger->addWriter($writer);
    $logger->info("Hello");
    $logger->info(print_r($collection->debug()));

This is what i have tried yet.


texts: Backend Admin 404 not found for jscolor.js

texts:
I recently did an upgrade, compile, reindex, flush, clean on my magento 2.0.7 instance. Everything is working fine except on the backend interface I am getting 404 not found on anything in the pub/media/js/directory. Specifically the jscolor.js file used in the color picker on the admin backend. I checked the permissions and confirmed the files are in fact there. So I am looking for any tips on how to resolve.

chrome debug window shows its trying to access: https://myurl.com/index.php/pub/media/js/jscolor.js

Thanks!


texts: Invalid backend model specified: catalog/product_attribute_backend_startdate_specialprice error when editing products

texts:
i'm new to magento and to building a website in general. when i try to add/edit/delete a product i get this error message:
Invalid backend model specified: catalog/product_attribute_backend_startdate_specialprice

i was succesfull before but i changed a few things, like adding a new attribute set and installing a language pack and i don't know where i went wrong.
how do i fix this error?


texts: URL rewrite redirects to page 404 - sorry page not found

texts:
I created a copy of a project and of the database.
Everything seems to work fine by far, but some pages are not working and I get to see the "sorry, page not found" site. No product site is working actually.

Let's take a look at the database table core_url_rewrite:

it looks fine. But if I go to https://www.mysite.de/produkte/klebstoffe.html then I get the Sorry page not found site.

If I enter the whole url "https://www.mysite.de/catalog/category/view/id/74" then I get redirected to a page, but to another page then I get on the original project which I have cloned.

Steps for reproduction

Create a copy of the original project
e.g. `cp -R original_shop/ copy_shop/
Create dump of original_shop database
Create a new database for copy_shop
Import database dump from original_shop to copy_shop
Change web/unsecure/base_url and web/secure/base_url to point at the domain of copy_shop.
Change app/etc/local.xml to point to the new database.
Clear cache and /var folder.
Reindex everything
Try to view a product. You will most likely get to see the page "sorry page not found"

What I have tried

Truncating the table core_url_rewrite and reindexing the whole site.

Result: No change.

Reindex all

I reindexed everything by using n98-magerun

./n98-magerun.phar index:reindex:all
Started reindex of: catalog_product_attribute
Successfully reindexed catalog_product_attribute (Runtime: 1s)
Started reindex of: catalog_product_price
Estimated end: 2018-06-14 12:27:29 UTC
Successfully reindexed catalog_product_price (Runtime: 4s)
Started reindex of: catalog_url
Estimated end: 2018-06-14 12:27:32 UTC
Successfully reindexed catalog_url (Runtime: 4s)
Started reindex of: catalog_product_flat
Estimated end: 2018-06-14 12:27:36 UTC
Successfully reindexed catalog_product_flat (Runtime: 3s)
Started reindex of: catalog_category_flat
Successfully reindexed catalog_category_flat (Runtime: 0)
Started reindex of: catalog_category_product
Successfully reindexed catalog_category_product (Runtime: 1s)
Started reindex of: catalogsearch_fulltext
Estimated end: 2018-06-14 12:27:38 UTC
Successfully reindexed catalogsearch_fulltext (Runtime: 1s)
Started reindex of: cataloginventory_stock
Successfully reindexed cataloginventory_stock (Runtime: 0)
Started reindex of: tag_summary
Successfully reindexed tag_summary (Runtime: 0)

Result: No change.

What is going on?


texts:
I am stuck in using tabs widget in Magento2. I have not found any resource that teaches about this. The only resource is this: DevDocs But this is useless. It is only a reference of options and methods, but not how to use it.

I have this in attributes.phtml of my custom theme:

        <?php $count = 0 ?>
        <?php foreach ($_additional as $_data): ?>

<a href="#tabs-<?php echo ++$count ?>"><?php echo $block->escapeHtml(__($_data['label'])) ?>

        <?php endforeach; ?>

    <?php $count = 0 ?>
    <?php foreach ($_additional as $_data): ?>
        <div id="tabs-<?php echo ++$count ?>" data-role="content">

<?php /* @escapeNotVerified */ echo $_helper->productAttribute($_product, $_data['value'], $_data['code']) ?>

    <?php endforeach; ?>

But that does not work. Can you show me where is the error, please?

Thanks
Jaime


texts: After trying to install an extension I cannot open website

texts:
I tried to install the Inchoo Social Connect extension. I enabled compiler and merged all the files from zip with my current files in httpdocs.

This is how the website looks like now :

I have deleted all the files I have copied without any success.


texts: how to add page 1 of n in Magento PDF invoice footer - Magento 1.8

texts:
I'm facing problem for adding a number of pages in single invoice.
For example one invoice has 3 pages and I wanted to display first page 1 of 3 in  pdf invoice and second page, page 2 of 3 and last page 3 of 3 on PDF invoice.

How to implement this page of n in PDF invoice in magento?


texts:
I tried to migrate data from Magento 1.9.2.2 to Magento 2.2.2 for testing. I am getting below error

  [2018-02-14 11:45:37][INFO][mode: data][stage: volume check][step: EAV Step]: started
  100% [============================] Remaining Time: < 1 sec

  [2018-02-14 11:45:37][ERROR]: Class Magento\Catalog\Block\Adminhtml\Product\Helper\Form\BaseImage does not exist but mentioned in: catalog_eav_attribute.frontend_input_renderer for attribute_id=74

I already tried after adding below in class-map.xml.dist but it didn't work.

<rename>
    <from>Magento\Catalog\Block\Adminhtml\Product\Helper\Form\BaseImage</from>
    <to />
</rename>


texts: showing 2 custom attributes in 1 column in customers grid

texts:
I am working on Magento system. In admin, customer has more than one address and I have street column in the grid which displays default billing street. But I want to search street name through all customer's addresses.

So user can enter street name to search users in the grid, And system should search through all addresses customer has.


texts: Purpose of include, advanced and extend in system configuration

texts:
How to use include node in system.xml?
How to use attributes extend and advanced in system.xml?


texts:
I successfully uploaded the file using this code:

public function execute()
{
    /** @var \Magento\Framework\Controller\Result\Redirect $resultRedirect */
    $resultRedirect = $this->resultRedirectFactory->create();
    try{
        $target = $this->_mediaDirectory->getAbsolutePath('mycustomfolder/');
        /** @var $uploader \Magento\MediaStorage\Model\File\Uploader */
        $uploader = $this->_fileUploaderFactory->create(['fileId' => 'file']);
        /** Allowed extension types */
        $uploader->setAllowedExtensions(['jpg', 'jpeg', 'gif', 'png', 'zip', 'doc']);
        /** rename file name if already exists */
        $uploader->setAllowRenameFiles(true);
        /** upload file in folder "mycustomfolder" */
        $result = $uploader->save($target);
        if ($result['file']) {
            $this->messageManager->addSuccess(__('File has been successfully uploaded'));
        }
    } catch (\Exception $e) {
        $this->messageManager->addError($e->getMessage());
    }
    return $this->resultRedirectFactory->create()->setPath(
        '*/*/upload', ['_secure'=>$this->getRequest()->isSecure()]
    );
}

the problem is I need to rename the file name if I found a specific string in that file name, is there a  way to do this?


texts:
I'm adding products to the cart using an ajax call. Inside the ajax responder I have the initial code.

Mage::app();
Mage::getSingleton('core/session', ['name' => 'frontend']);

If a user is not logged in it adds the products to the cart with no problems, but if a user is logged in, the second line causes the user to log out. Leaving the store in a logged out state with the last product added to the cart. Do I need to do anything to preserve the users session?


texts:
I am following the 'Fundamentals of Magento 2' course and, I have to say, I am getting really frustrated with the example code being wrong on every exercise!

I am trying to set a template for a custom block within a controller. My folder structure is:

- /app/code/Training/Rendering/
    -- Block/Template.php
    -- Controller/Block/Template.php
    -- view/frontend/template.phtml

The routes are working fine as I can print output on the page from the controller. The files mentioned above (in order) contain the following:

/app/code/Training/Rendering/Block/Template.php:

<?php

namespace Training\Rendering\Block;

/**
 * Custom template block
 *
 * @package Training\Rendering\Block
 */
class Template extends \Magento\Framework\View\Element\Template
{

}

app/code/Training/Rendering/Controller/Block/Template.php:

<?php

namespace Training\Rendering\Controller\Block;

use Magento\Framework\App\Action\Action;

/**
 * Template Action Class
 * URL: testblock/Block/Template
 *
 * @package Training\Rendering\Controller\Block
 */
class Template extends Action
{

    /**
     * Execute Dispatch
     */
    public function execute()
    {
        $block = $this->_view->getLayout()->createBlock('Training\Rendering\Block\Template');
        $block->setTemplate('template.phtml');
        $this->getResponse()->appendBody($block->toHtml());
    }
}

app/code/Training/Rendering/view/frontend/template.phtml:

Hello from custom block template!

I have tried changing the controller code to

..->createBlock('Magento\Framework\View\Element\Template'); to test but no joy!

The problem is that the template (phtml) is not being loaded.

The code is exactly the same as the exercise (I tried copying and pasting from the PDF!).

I do understand that this will be handled with XML in the future, but in the interest of getting passed this exercise, I just need it to work like this.

Thanks in advance for any help.


texts: CMS homepage doesn't display if Page url key is changed

texts:
I am unable to change the Page URL key for the homepage. If, I change it anything else, the homepage doesn't display. I don't really like the theme name to show as the Homepage URL key.
Here is a screenshot


texts: Additional column in customer address grid in Admin in magento 2

texts:
I have added one customer address custom attribute. it is showing in customer address form i want to show that as coulum in customer address grid in admin with value.
i have added this code:
 <column name="addressval"  sortOrder="95">
        <settings>
            <filter>select</filter>
            <dataType>select</dataType>
            <label translate="true">addressval</label>
        </settings>
    </column>

Column is added but the value is not showing in this. how to get the value which was set in form?


texts: Concatenate static Image path with KnockoutJS data-bind

texts:
This is my JS File code

define([
    'uiComponent'
], function (Component) {
    'use strict';
    var some_products = window.checkoutConfig.my_specificProducts;
    return Component.extend({
        defaults: {
            template: 'Vendor_Module/checkout/shipping/additional-block'
        },
        someProducts: some_products
    });

});

This is my template file code

Name	Sku	ImagePath	Image

The output on the checkout page is

Image is not displaying as you can see in screenshot

data-bind="attr: { src: 'pub/media/catalog/product/'+image(), alt: not found }"  and also try **../pub/** or **~/pub**  But not work .

Can anyone guide me how to concatenate static path with product dynamic path which will show image on checkout page?

Thanks in advance!


texts: Why Magento doesn't change the product prices if a customer choosen another Payment Method?

texts:
public function paymentEvent(Varien_Event_Observer $observer) {
    $this->log("Entramos al observer");
    $quote = $observer->getQuote();
    $store = Mage::app()->getStore($quote->getStoreId());
    $cartItems = $quote->getAllVisibleItems();

foreach($cartItems as $item) {
  $newPrice = $this->getNewPrice($item->getPrice()); // Function that calculate the newPrice (%)
  $item->setCustomPrice($newPrice);
  $item->setOriginalCustomPrice($newPrice);
  $item->getProduct()->setIsSuperMode(true);
  $item->save();

}
$this->log("Observer END");
return $this;

}

This function change the product prices depending the payment Method selected.

Observer Method Event:  sales_quote_payment_import_data_before

But if for some reason the customer changes his payment method, the prices keeps at the same amount.

Example: first i choose Payment Method Y and works ok, but if for some reason i need to changa the payment method and i go back to step 4 and now i choose payment method Z, all the calculates are made with the payment method Y, i need again to go back to step 4 and choose again Payment Method Z and now it shows the prices ok.

Theres any form to flush the payment method choosen if the customer go back to step 4 or another one?


texts:
I have set cookie value using onclick event.

At page load i want to check cookie value so have create module as explained in this How to add Cookie Magento 2? url.

everything is working properly but when i enable FPC , i can't get updated value from cookie.

can anyone help me to solve this issue.


texts:
I try to set the country from my custom cart controller with the following function:

public function setCountryAction()
{
    $country = (string) $this->getRequest()->getParam('country');
    $quote = Mage::getSingleton('checkout/session')->getQuote();

    $quote->getBillingAddress()->setCountryId($country);
    $quote->getShippingAddress()->setCountryId($country);
    $quote->save();

    // print $quote->getBillingAddress()->getCountryId();
}

The print at the end of the function contains the expected result but unfortunately the country is not actually saved to the quote.

When I change the country from the checkout, go back to the cart and do the action again, strangely enough it works perfectly.

So the problem only exists with a new, empty session.


texts: New root category not displayed in seperate website

texts:
To display different category in different website,

Created new root category.
Created new website, store, store view at backend and used that newly created root category in it.
Then created a subdirectory in domain 127.0.0.1/magento/magento2 where magento2 is the created subdirectory.
copied index.php and htaccess from domain into created subdirectory (magento2).
Then changed $mageFilename = MAGENTO_ROOT . '/app/Mage.php'; to $mageFilename = MAGENTO_ROOT . '/../app/Mage.php'; in index.php
Then inserted

SetEnvIf Host .*base.* MAGE_RUN_CODE="base";

SetEnvIf Host .*magento_site_2.* MAGE_RUN_TYPE="leap_in_en"

where leap_in_en is the unique code code of my store view.
At backend after switching to new website in configuration scope, changed the unsecure and secure url to 127.0.0.1/magento/magento2.
Now when I enter the url 127.0.0.1/magento/magento2 in the browser. It is displaying the old store with same category not the new root category.

Someone please tell me where have I went wrong or is there any additional thing that I should do?


texts: error Base table or view not found: 1146 Table 'magago.wishlist' doesn't exist magento 1.9.3

texts:
i get this error after try login customer and process checkout like this

and i see report in var/report/718525705 like this

please help me. thanks


texts: REST Api interface di not working. Class ItemInterface does not exist

texts:
ItemInterface:

namespace MyVendor\SampleModule1\Api\Data;

interface ItemInterface
{
    /**
     * @return string
     */
    public function getName();

    /**
     * @return string|null
     */
    public function getDescription();
}

ItemRepositoryInterface:

<?php

namespace MyVendor\SampleModule1\Api;

use MyVendor\SampleModule1\Api\Data\ItemInterface;

interface ItemRepositoryInterface
{
    /**
     * @return ItemInterface[]
     */
    public function getList();
}

ItemRepository:

<?php

namespace MyVendor\SampleModule1\Model;

use MyVendor\SampleModule1\Api\ItemRepositoryInterface;
use MyVendor\SampleModule1\Model\ResourceModel\Item\CollectionFactory;

class ItemRepository implements ItemRepositoryInterface
{
    private $collectionFactory;

    public function __construct(CollectionFactory $collectionFactоry)
    {
        $this->collectionFactory = $collectionFactоry;
    }

    public function getList()
    {
        return $this->collectionFactory->create()->getItems();
    }
}

etc/di.xml:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Framework\Console\CommandList">
        <arguments>
            <argument name="commands" xsi:type="array">
                <item name="myvendorAddItem" xsi:type="object">MyVendor\SampleModule1\Console\Command\AddItem</item>
            </argument>
        </arguments>
    </type>
    <preference for="MyVendor\SampleModule1\Api\Data\ItemInterface" type="MyVendor\SampleModule1\Model\Item"/>
    <preference for="MyVendor\SampleModule1\Api\ItemRepositoryInterface" type="MyVendor\SampleModule1\Model\ItemRepository"/>
</config>

etc/webapi.xml

<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
    <route url="/V1/myvendor" method="GET">
        <service class="MyVendor\SampleModule1\Api\ItemRepositoryInterface" method="getList" />
        <resources>
            <resource ref="anonymous" />
        </resources>
    </route>
</routes>

I ran the commands:

magento cache:flush
magento cache:clean
magento setup:di:compile
magento setup:upgrade

When i access the url http://mymage.com/rest/V1/myvendor i get the fallowing error:

<message>Class ItemInterface does not exist</message>
<code>-1</code>
<trace>
#0 /var/www/html/lib/internal/Magento/Framework/Reflection/MethodsMap.php(149): ReflectionClass->__construct('ItemInterface') #1....

EDIT:

Item.php model:

<?php

namespace MyVendor\SampleModule1\Model;

use Magento\Framework\Model\AbstractModel;

class Item extends AbstractModel
{
    protected function _construct()
    {
        $this->_init(\MyVendor\SampleModule1\Model\ResourceModel\Item::class);
    }
}

I just don't understand where is the problem ? ? ?


texts: Magento 2 : Unable to load theme by specified key

texts:
I am facing the error some page of frontend.
I have tried all solution but issue is still there.

tried Magento 2 theme giving error Unable to load theme by specified key: 'Yogesh/mytheme'.

please help !!


texts: Can not display product by specific category in magento 1.7

texts:
I am trying to display products by specific category and for that I create a CMS page and called catalog block for this specific category, like this:

{{block type="catalog/product_list" name="product_list" category_id="49" template="catalog/product/list.phtml"}}

I have lots of products in this category but when i am trying to browse the URL its not showing me any products http://coralconcept.in/pant-skirt/, You can see over here coralconcept.in/clothing?cat=49 . Can you please let me know what i am doing wrong? Or I need to update any settings from admin or in catalog.xml file?


texts: white question marks within black diamond

texts: As mentioned in the title i am dealing with the following problem, i see a special character in my magento store. The special character appears as white question mark within a black diamond. Is there a way to make that special character disappear??


texts:
How to get the email ID in every email template.

I'm implementing a extension for customer autologin from email.
By clicking on the link in the email - that customer should logged in by emailid.

I got the code for autologin by customer's email id

But I need to use the customer's email with a link in every email template.

how to get the receiver's email id in the email template?

Thanks in advance.


texts: File ___ optimized1.serialized in a media directories

texts: What process/module created the file ___ optimized1.serialized on the web server (magento installation) in directories like media (containing pdf, png, jpeg)?


texts:
I want to display in the related products items from the same brand in order from the latest added. I was looking for an extension that can do it and didn't find it. So I figured out that the solution for me would be to edit an already existing extension. I found this 'iWeb Auto Related Products' and installed it. It automatically creates 5 random products from the same category. I'm not good with php so here's the main question do I just need to change all 'category' to 'brand' in the code below or what changes should I do?

public function getRelatedProducts($limit = false) {
    $products = $this->getData('related_products');
    if (!$products) {
        $product = Mage::registry('current_product');

        if ($category = Mage::registry('current_category')) {

        } elseif ($product) {
            $ids = $product->getCategoryIds();

            if (!empty($ids)) {
                $category = Mage::getModel('catalog/category')->load($ids[0]);
            }
        }

        if ($category) {
            if ($limit === false) {
                $limit = Mage::getStoreConfig('autorelated/general/limit');
            }

            $products = Mage::getResourceModel('reports/product_collection')
                ->addAttributeToFilter('visibility', array(
                    Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH,
                    Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG
                ))
                ->addAttributeToFilter('status', 1)
                ->addCategoryFilter($category)
                ->addAttributeToSelect('*')
                ->setPageSize($limit);

            if ($product) {
                $products->addAttributeToFilter('entity_id', array(
                    'neq' => Mage::registry('current_product')->getId())
                );
            }

            $products->getSelect()->order(new Zend_Db_Expr('RAND()'));
            Mage::getModel('cataloginventory/stock')->addInStockFilterToCollection($products);

            $this->setData('related_products', $products);
        } else {
            return false;
        }
    }

    return $products;
}

If you have a different idea how to make it happen please let me know

thank you


texts: Product URL Key gets deleted when importing custom options - Magento 2

texts:
I have been able to successfully import product custom options on my Magento 2 website.

But after the import when I check I can see the URL key that was there in the backend is deleted. Every time I import a product the URL Key is deleted.

I don't see any error log in the var/log directory.


texts:
I'm writing a new layout file for a custom module. As part of this I need to include the toplinks eg. log in, cart + (quantity), my account, wishlist and also recently viewed and nothing else. My layout file looks like so,

  <?xml version="1.0"?>
  <layout version="0.1.0">
<dynamicblocks_index_index>
    <block type="core/template" name="root" output="toHtml" template="dynamicblocks/index.phtml" >
        <block type="page/template_links" name="top.links" as="topLinks"/>
        <block type="reports/product_viewed" before="right.permanent.callout" name="right.reports.product.viewed" template="reports/product_viewed.phtml" />
    </block>
</dynamicblocks_index_index>

I got the link for loading the toplinks from page.xml

  <block type="page/template_links" name="top.links" as="topLinks"/>

I am sure this is what loads the correct information on the main pages as when I comment it out all of the top links disappear. But in my custom layout it is only able to load one link (login). I also can't see how my layout file is wrong or reference incorrectly as it loads the recently viewed products as I expected.

The issue I'm having is that the top links is only returning the log in link. Any ideas on this?


texts: how can we get category by name and parant category id?

texts:
How can I check category have any child category with specific name ?

$category = Mage::getModel('catalog/category')->load($name, 'name');

but I want sub category from specific parent category.


texts: How to add a field for numeric values in magento?

texts:
I want to add a custom price filed just like the price field which can be seen when we add new products.

I can add a field like this

$fieldset->addField('price', 'text', array(
          'label'     => Mage::helper('menu')->__('Price'),
          'class'     => 'required-entry',
          'required'  => true,
          'name'      => 'price',
      ));

But I don't know how to validate it to take only numeric values. Can anyone help me please?

Or is their any other field type in magento that takes only numeric value?


texts: UI component hidden input on checkout address

texts:
I am adding custom field on Magento 2 checkout shipping address.
It's a hidden input.
The value should be automatically updated based on another custom field which is a select (populated from ajax response data), using its option text/label.
How can I "link" between input value and selected option text?

In my current custom component for the select, it already export the value to input

            exports: {
            value: '${ $.provider }:shippingAddress.custom_attributes.subdstrict:value'
        }

But it sends the selected value instead of the text. how to send the selected option text instead?


texts: Change amount of lines and dots in native captcha in magento 2.x

texts:
I know how to change density and number of lines and dots in native captcha in magento 1.x, but I am not able to find how to change it in magento 2.x.

Can anyone suggest a way to change number of lines and dots for native captcha in magento 2.x?


texts: Remove Quick Links and Account from Magento CE 1.9

texts:
I commented out the the block in the page.xml (app/design/frontend/rwd/default/layout/page.xml)
See screen shot.
I then cleared my browser cache but still they still show on the footer.

Is there anything else I need to do??? Please Help


texts: Magento 2.3.1 : Add addition column in sales_order table using db_schema

texts: How to add addition column in sales_order table using db_schema or in Magento2.3.1 best way?


texts: How to call obsever function via url in magento

texts:
I am new to magneto.I have local module and it has a observer(it has function).
I need to call that observer function via url to check whether its working or not.

Config.xml

<config>
   <modules>
       <Magestore_Lesson17>
           <version>0.1.0</version>
       </Magestore_Lesson17>
   </modules>
   <global>
       <models>
           <lesson17>
               <class>Magestore_Lesson17_Model</class>
           </lesson17>
       </models>
       <helpers>
           <lesson17>
               <class>Magestore_Lesson17_Helper</class>
           </lesson17>
       </helpers>
       <events>
           <checkout_onepage_controller_success_action>
               <observers>
                   <magestore_lesson17_obsever>
<type>singleton</type>
                       <class>lesson17/observer</class>
                       <method>getAlert</method>
                   </magestore_lesson17_obsever>
               </observers>
            </checkout_onepage_controller_success_action>
       </events>
</config>

Observer.php

<?php
class Magestore_Lesson17_Model_Observer
{

        public function getAlert($observer)
        {
           echo "Hello world";
        }
}
?>


texts: Admin Category Custom Attribute not saved

texts:
There are quite a few questions similar to this one, but I can't get any answers to work.
I run Magento 2.4.2 and tried to add a custom attribute with the instruction here:
https://devdocs.magento.com/guides/v2.4/ui_comp_guide/howto/add_category_attribute.html
I have created the two required files in my module (InstallData.php and category_form.xml) with the following differences:
InstallData.php:
     public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
     {
         $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
-        $eavSetup->addAttribute(\Magento\Catalog\Model\Category::ENTITY, 'attribute_id', [
+        $eavSetup->addAttribute(\Magento\Catalog\Model\Category::ENTITY, 'myattribute', [
             'type'     => 'int',
-            'label'    => 'Your Category Attribute Name',
+            'label'    => 'My Category Attribute Name',
             'input'    => 'boolean',
             'source'   => 'Magento\Eav\Model\Entity\Attribute\Source\Boolean',
             'visible'  => true,

 <form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
     <fieldset name="display_settings">
-        <field name="attribute_id">
+        <field name="myattribute">
             <argument name="data" xsi:type="array">
                 <item name="config" xsi:type="array">
                     <item name="dataType" xsi:type="string">boolean</item>
                     <item name="formElement" xsi:type="string">checkbox</item>
-                    <item name="label" xsi:type="string" translate="true">Your Category Attribute Name</item>
+                    <item name="label" xsi:type="string" translate="true">My Category Attribute Name</item>
                     <item name="prefer" xsi:type="string">toggle</item>
                     <item name="valueMap" xsi:type="array">
                         <item name="true" xsi:type="string">1</item>

After running bin/magento setup:upgrade and bin/magento c:c the user interface shows the checkbox:

So the overall procedure went fine. But now I try to change the value of the checkbox and save the default category by clicking on the red "Save" button on the top right, the checkbox state is not saved and restored back to off.
Where can I start looking for the error?


texts: Magento2, add custom module files to pub/media directory

texts:
If we include files in our Magento2 custom module, that should be added to the pub/media directory...how do we go about ensuring they are added?

Ive created the required media dir sub-directory via the upgradeSchema setup script, and i'm currently playing with the modules composer.json file to try get these files copied across. But this isn't quote working.
Any advice on how this should be achieved please?

Composer file has the following. First line is the path in my module where the files are located. Second line is the path i want the files to be copied to:

"extra": {
    "map": [
        [
            "pub/media/dd_library/default/*",
            "pub/media/dd_library/default/"
        ]
    ]
},

== UPDATE ==
Seems to install media directory assets from a custom module, you need to create a seperate basic module set as a magento2-component in the composer.json. Then install both modules via composer.
Worked this out from the Magento2 sample data packages.


texts:
I called contact form in my .phmtl page using this code:

<?php include ($block->getTemplateFile('Magento_Contact::form.phtml')) ?>

The problem is when I click on submit, there's no success message and we don't receive the mail by consequence.

PS:when I try mywebsite.com/contact it works correctly


texts: Magento2 not showing success page cache_invalidate

texts:
I am developing website in magento 2
My current version is magento 2.0.2 currently I am unable to see order success page. Magento keep showing ajax loader, and website goes down for certain interval of time. debug.log show following error.

  [2017-03-22 06:48:42] main.DEBUG: cache_invalidate:  {"method":"POST","url":"http://magento-dir/rest/default/V1/guest-carts/44a12dc3f7801837cb3b853378e23bb3/payment-information","invalidateInfo":{"tags":["catalog_category_26","catalog_category"],"mode":"matchingAnyTag"},"is_exception":false} []

also attaching screenshot.


texts: Magento 2 : Sitemap Generation Warnings - Invalid header line detected

texts:
I am using magento 2.2.4. The site is working fine. But everyday I got a sitemap error email. The below lines are in the email.

Sitemap Generation Warnings

Invalid header line detected

Also an exception is logged in to the exception.log.

main.CRITICAL: Invalid header line detected {"exception":"[object] (Zend_Http_Exception(code: 0): Invalid header line detected at /home/magento/vendor/magento/zendframework1/library/Zend/Http/Response.php

Please help me to resolve this issue.


texts: Send email attachment with zend [SOLVED]

texts:
I wrote a custom module which is using zend to send the information of a form to a email address.

Now i have a file upload in the form and this file (a image) needs to be send as an attachment of the mail
this is the code of the file upload in the form

<label class="label_fi" for="file">Afbeelding:
<input class="input_fi" type="file" name="foto"    value=""    size="30"/></label>

I have found a little piece of code which i entered in the index controller but this is not working

$mail = new Zend_Mail();

    $mail->setBodyText($bericht);

    $mail->setFrom($email, $name);

    $mail->addTo("Johndoe@example.com", "John Doe");

    $mail->setSubject("Snel offerte");
    $tmpFilePath = $_FILES['file']['tmp_name'];

    if ($tmpFilePath != ""){
        $newFilePath = "./media/complaintsuploads/" . $_FILES['file']['name'][$i];

        if(move_uploaded_file($tmpFilePath, $newFilePath)) {
            $fname = $_FILES['file']['name'];
            $ftempname = $_FILES['file']['tmp_name'];
            $at = new Zend_Mime_Part(file_get_contents($newFilePath));
            $at->disposition = Zend_Mime::DISPOSITION_INLINE;
            $at->encoding = Zend_Mime::ENCODING_BASE64;
            $at->filename = $fname;

            $mail->addAttachment($at);
        }
    }
    try {
        $mail->send();
    }

all the other text that is entered is in the mail
and is all gathered in this way

$name = $this->getRequest()->getParam('name');

so my question is what did i do wrong and how can i make it so that the file uploaded is send as an attachment


texts: Magento 2.3 usage of object manager in abstract code - good / bad / indifferent

texts:
I know what object manager is. I know why it is used. I know that as a general rule it shouldn't be used. I know why from reading this. https://devdocs.magento.com/guides/v2.3/extension-dev-guide/object-manager.html#exceptions.

Then I see code like this

https://github.com/magento/magento2/blob/2.3/app/code/Magento/Catalog/Model/Indexer/Product/Eav/Action/Full.php#L83-L85

public function __construct(
    [...]
    $this->scopeConfig = $scopeConfig ?: ObjectManager::getInstance()->get(
        ScopeConfigInterface::class
    );
    [...]
}

Which seams like an elegant way of doing it. Especially in something so abstract. So my questions are this:

a) Is the above still considered bad practice?
b) In this purely to maintain backward compatibility? Or is there another reason?


texts: how can i get order status label of a specific store using store id in magento 2.?

texts:
In the below code i am getting order status label of a the default store.But i want the store specific label.please help me .

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$orders = $objectManager->create('Magento\Sales\Model\Order')->getCollection()->addFieldToFilter('customer_id',$customerId)->setOrder(
              'created_at',
              'desc'
          )
                      'created_at',
                      'desc'
                  );


texts: how to get configurable product price in recently viewed product in Magento 2?

texts:
final_price.js to may be not loading this template how to solve it?
anyne help me to find this solution

<if args="isSalable($row())">
<if args="getRegularPrice($row())">

            <if args="!hasSpecialPrice($row())">
                <each args="data: getAdjustments(), as: '$adj'">
                    <render args="$adj.getBody()"/>
                </each>
            </if>

</if>
</if>

this template not loaded for configurable porduct


texts: How do you display a group price for a specific customer group on product page?

texts:
I'd like to display a products group price for a specific customer group (group id 5) for non logged in users to show the savings for a membership on a product page.

Example:

Not Logged in Customer Price: 100$

Member Subscription Price: 65$

Cant find anything like this other than an old SE question that I cant get the code to work: https://stackoverflow.com/questions/12326814/magento-get-product-price-given-a-customer-group


texts: Magento 2 : Only dependency assignment operations are allowed in constructor. No other operations are allowed

texts:
Magento 2 Coding standard provide me Warning

My Code is here

namespace Namespace\Modulename\Model;

use Magento\Framework\App\Request\DataPersistorInterface;
use Magento\Ui\DataProvider\AbstractDataProvider;
use Namespace\Modulename\Model\ResourceModel\Customoption\CollectionFactory;

class CustomoptionProvider extends AbstractDataProvider
{
    public $collection;
    public $dataPersistor;
    public $loadedData;

    public function __construct(
        $name,
        $primaryFieldName,
        $requestFieldName,
        CollectionFactory $pageCollectionFactory,
        DataPersistorInterface $dataPersistor,
        array $meta = [],
        array $data = []
    ) {
        $this->collection    = $pageCollectionFactory->create();
        $this->dataPersistor = $dataPersistor;
        parent::__construct($name, $primaryFieldName, $requestFieldName, $meta, $data);
    }

    public function getData()
    {
        if (isset($this->loadedData)) {
            return $this->loadedData;
        }
        $items = $this->collection->getItems();
        foreach ($items as $page) {
            ...
        }
        $data = $this->dataPersistor->get('module_messages');
        if (!empty($data)) {
            $page = $this->collection->getNewEmptyItem();
            $page->setData($data);
            $this->loadedData[$page->getId()] = $page->getData();
            $this->dataPersistor->clear('module_messages');
        }
        return $this->loadedData;
    }
}

I had use this

  $this->collection    = $pageCollectionFactory;

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

but it provide me error

  Fatal error: Method
  Magento\Ui\TemplateEngine\Xhtml\Result::__toString() must not throw an
  exception, caught Error: Call to undefined method
  Namespace\Modulename\Model\ResourceModel\Customoption\CollectionFactory::addFieldToFilter()
  in
  D:\xampp72\htdocs\mage231\vendor\magento\module-ui\Component\Wrapper\UiComponent.php
  on line 0

if have any solution then provide for this issue.


texts: Where does Magento Connect track installed packages and versions?

texts:
We have an extension which was initially installed via Magento Connect.  Since then the extension was modified locally, and there have been several patch releases from the vendor.  Upgrading the extension via Magento Connect would no longer work, so I did the upgrades locally (unzipping the package and re-applying our changes, etc).

After upgrading the extension I've found that the update is live and running, and the core_resource table in the database has registered that it's upgraded.  However, I noticed that Magento Connect still thinks I'm running the previous version.

Where does Magento Connect track which versions have been installed?  Since I'm no longer using Magento Connect to upgrade this extension what steps should I take?


texts: Multistore- more stores with 1 language file?

texts:
We have a multistore with seperate shops for the US, UK, Australia and Switzerland because of the Google restrictions.

Now we have to translate all the shops sepperate. Is it possible to have for example that US, UK, Australian shop to use one content language file but keeps it's own currency ?

So we only have to translate 1 time to English and all the shops using English are done too ?


texts: Magento 2: Knockout js dynamic content binding issue

texts:
I have created a custom form in checkout page. Everything works fine except one ajax response binding

Here is my code

template.html

 <form id="cust-checkout-form" class="form" data-bind="attr: {'data-hasrequired': $t('* Required Fields')}">
        <fieldset class="fieldset">

Post Selection

&nbsp;

Find Post within&nbsp;&nbsp;
                <select name="distance" id="distance" style="width: 8%;" data-bind="event: { change: getDealers }">
                    <option value="5">5</option>
                    <option value="10">10</option>
                    <option value="25">25</option>
                </select>&nbsp;&nbsp;miles. Choose below

            <input type="hidden" name="licence" id="licence" value="" />

        </fieldset>
    </form>

knockout js

    define([
    'Magento_Ui/js/form/form',
    'ko'
], function(Component,ko) {
    'use strict';

    return Component.extend({

        initialize: function () {
            this._super();
            this.dealers = ko.observableArray([]);
            this.dealers = window.checkoutConfig.dealers;
            return this;
        },
        setValue: function(data,event) {console.log('hi');
            var licenceVal = data.licence;
            jQuery("#post-licence").val(licenceVal);
            var content = data.name+", "+data.address;
            jQuery("#selected_post").html(""+content+"");

        },
        getDealers: function () {
            var dist = jQuery("#distance").val();
            jQuery.ajax({
                showLoader: true,
                url: window.checkoutConfig.ajaxUrl,
                data: {'dist':dist},
                type: "POST",
            }).done(function (data) {
                this.dealers = data;
                return this;
            });
        },

    });
});

The content is not changing while selecting the dropdown.

If I pass the response as html, then the setValue function is not working.
Please help me.


texts: Create a new admin theme and make an override of sales module template

texts:
I tried to create an admin theme and make an override to sales module template file but this don't work, i followed those tutorials : create admin theme and Apply custom admin theme
in app/design/adminhtml/Vendor/customtheme, i created registration.php
<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
use \Magento\Framework\Component\ComponentRegistrar;
ComponentRegistrar::register(ComponentRegistrar::THEME, 'adminhtml/Vendor/customtheme', __DIR__);

in app/design/adminhtml/Vendor/customtheme/theme.xml
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
     <title>Custom Theme</title>
     <parent>Magento/backend</parent>
</theme>

In app/design/adminhtml/Vendor/customtheme/Module_Sales/templates/order/view/info.phtml i tried to add 'ddddd' in table header for customer acount data
  <?php foreach ($block->getCustomerAccountData() as $data):?>

                        <?= $block->escapeHtml($data['label']) ?> ddddd
                        <?= $block->escapeHtml($data['value'], ['br']) ?>

                <?php endforeach;?>
                <?= $block->getChildHtml('extra_customer_info') ?>

After that i tried to create a module to apply the new theme admin
in app/code/Vendor/ThemeAdmin/registration.php
<?php

\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Wetag_ThemeAdmin',
    __DIR__
);

in Vendor/ThemeAdmin/composer.json
{
"name": "vendor/themeadmin",
"description": "new theme admin",
"require": {
    "php": "~5.5.0|~5.6.0|~7.0.0|~7.1.0|~7.2.0"
},
"type": "magento2-module",
"license": [
    "OSL-3.0",
    "AFL-3.0"
],
"autoload": {
    "files": [ "registration.php" ],
    "psr-4": {
        "Vendor\\ThemeAdmin\\": ""
    }
}
}

In Vendor/ThemeAdmin/etc/module.xml
<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Vendor_ThemeAdmin" setup_version="1.0.0">
        <sequence>>
            <module name="Magento_Theme"/>
        </sequence>
    </module>
</config>

In Wetag/ThemeAdmin/etc/adminhtml/di.xml
<?xml version="1.0"?>

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

<type name="Magento\Theme\Model\View\Design">
    <arguments>
        <argument name="themes" xsi:type="array">
            <item name="adminhtml" xsi:type="string">Vendor/customtheme</item>
        </argument>
    </arguments>
</type>

</config>


texts: Magento 2 Get cart detail API doesn't show subtotal and total

texts:
Cart API url

http://magento.host/rest/V1/carts/mine/

Authorization <Customer Token>

This API provided Lists items that are assigned to a specified cart.
But Not Subtotal and Total price of items that are assigned to a
specified cart.

How to get sub-total and total price of items that are assigned to specified cart In REST API using Customer Token ?


texts: How to get sold product quantity in orderplaced observer , Magento 2?

texts: How to get sold product quantity in Orderplaced observer , Magento 2 ?


texts: Select and upload image admin form magento 2

texts:
I have admin form in which I have image upload option.Button "Select" will select a image ,then user click button Upload to upload image.
Finally image name and path will be save when form submit

It will be great help if someone can help me with this. thanks


texts: How to get magento 2 default route name list ? (Without third party route)

texts:
I am creating custom module which redirect to login if third party module route id find.(frontend)

but i have issue how to identify the current route is default or third party route ?

how to check current route is default or third party ?


texts: Magento2; how to call attributes for upsell products product/list/items.phtml

texts:
I need to call some product attributes in the Upsell Products view for Magento 2. This would be in the Magento_Catalog/templates/product/list/items.phtml

This is said case;

case 'upsell':
    /** @var \Magento\Catalog\Block\Product\ProductList\Upsell $block */
    if ($exist = count($block->getItemCollection()->getItems())) {
        $type = 'upsell';
        $class = $type;

        $image = 'upsell_products_list';
        $title = __('Best alternatives');
        $items = $block->getItemCollection()->getItems();
        $limit = $block->getItemLimit('upsell');
        $shuffle = 0;

        $showAddTo = false;
        $showCart = true;
        $templateType = null;
        $description = true;
        $canItemsAddToCart = true;
    }
break;

And in the template I can call the product name, image, sku like this;

<?= $block->escapeHtml($_item->getName()) ?>
<?= $block->escapeHtml($_item->getSku()) ?>

That works fine, but this doesn't;

<?= $block->escapeHtml($_item->getAttribute('mycustomattribute')); ?>

This attribute is visible on frontend and all that, but it doesn't echo anything in this block. How can I fix that?


texts: Is there a way in Magento2 to have the user get redirected to shopping cart page after clicking "add to cart" - instead of the mini cart option at top of page?


texts: Block cache and flat tables (Mage_Catalog_Block_Product_List)

texts:
We are using Magento Enterprise and use flat tables and automatic re-index.

I have a block that extends Mage_Catalog_Block_Product_List. Block cache is enabled and block cache is tagged with all the products it contains. When I save any of the products that are in the block in the admin, the block cache is deleted. This all works correctly.

The problem appears when I enable flat tables. When the product is changed in backend the block cache is deleted, but product flat tables are not yet updated. The new block cache is created with old data. I must be missing something, because this would not work for anyone using flat tables. And this is all Magento "core".

How should I approach solving this? I there an event being fired, that I should be observing?

Any suggestion would be greatly appreciated.

**************** EDIT ***************

Let me try to clarify:

Product has name "My cool product"
EAV, flat tables and block HTML cache contain "My cool product"
Change name to "My cool product with new name"
Block HTML cache gets deleted
EAV contains "My cool product with new name" but flat table still contains "My cool product" (reindex has not happened)
Customer visits the website and a new block HTML cache is generated from flat tables data which still contains "My cool product"
EAV contains "My cool product with new name", flat tables and block HTML cache still contain "My cool product"
Reindex runs
EAV and flat tables contain "My cool product with new name" but block HTML cache still contains "My cool product"

Time between points 1 and 7 is less than a second.

**************** EDIT ***************


texts: Can i change/add logo in magento login page and backend page ? How?

texts:
I have to change logo for existing magento login page and backend page with new one. Is there any function to change ?

Here is login page image and backend page image :


texts: Please specify product option(s) when selected this bundled product from admin panel

texts: Why this error occurs in Magento 2 " Please specify product option(s). " I selected this bundled product  from admin panel already anybody can help me out thank you


texts: Magento 2 send multiple attachment in single mail

texts:
I sent a single file attachment. Now i need to send multiple attachment in single mail.Attachment will be in different format like .pdf,.jpeg,.png.

etc\di.xml

<preference for="\Magento\Framework\Mail\Template\TransportBuilder" type="\Vendor\Module\Magento\Mail\Template\TransportBuilder" />

and in my TransportBuilder.php file

 <?php
namespace Vendor\Module\Magento\Mail\Template;

class TransportBuilder extends \Magento\Framework\Mail\Template\TransportBuilder
{
    public function addAttachment($file, $name)
    {
        if (!empty($file) && file_exists($file)) {
            $this->message
                ->createAttachment(
                    file_get_contents($file),
                    \Zend_Mime::TYPE_OCTETSTREAM,
                    \Zend_Mime::DISPOSITION_ATTACHMENT,
                    \Zend_Mime::ENCODING_BASE64,
                    basename($name)
                );
        }
        return $this;
    }
}

and in my post.php

$from = ['email' => $fromEmail, 'name' => $fromName];
        $this->inlineTranslation->suspend();
        $templateOptions = [
            'area' => Area::AREA_FRONTEND,
            'store' => $this->storeManager->getStore()->getId()
        ];
        try {
            $transport = $this->transportBuilder->setTemplateIdentifier($template)
                ->setTemplateOptions($templateOptions)
                ->setTemplateVars(['data' => $postObject])
                ->setFrom($from)
                ->addTo($to)
                ->addAttachment($file, $name)
                ->getTransport();
            $transport->sendMessage();
            $this->inlineTranslation->resume();
        } catch (\Exception $e) {
            $this->helper->printLog($e->getMessage());
        }