texts: Issue with multiwebsite with multistore ___store appending twice in magento2.2

texts:
I have multiwebsite with multistore

website1 English, website1 French

website2 English, website2 French

I use two theme One for website1 luma and another for website2

Website1 issue Luma theme

It switching quite fine with website1 to English and French. but has a append issue when is switch from french and then again to English I have the url as

  website1.com?___store=main_website_view_french?___store=main_website_view_english

Website2 issue

The switching  is not working and on inspecting the action it shows the website1 url but with website2 store code.

when On change the action url to website2 it not switching too that is b2c to b2b.

I have the index file as

switch($_SERVER['HTTP_HOST']) {
     case 'Website1.com':
        $mageRunCode = 'wholesale_website';
        $mageRunType = 'website';
        break;
     case 'Website2.com':
        $mageRunCode = 'base';
        $mageRunType = 'website';
        break;
    }

Do I need to make any other changes.


texts: Magento 2.1 product page change wishlist button to font icon

texts:
Magento 2.1
product page
I need to change the wishlist button to font icon "heart" which is the default in the luma theme, but when I apply my theme it shows a button...
Does anyone knows how to change this?

Thank you!


texts: How to get Special price of product list in magento2?

texts: I have created one countdown timer for special price, now i want to hide timer if product does not have any special price so how can i do?Please help me.


texts: Magento 2 :Custom payment - Stop sending order mail

texts:
I have a custom payment module. I want to stop sending the default Magento order confirmation email for this payment method only.

Please give some solutions...

What I have done so far:

I have created one plugin

app/code/Company/OrderEmail/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\Sales\Model\Order\Email\Container\OrderIdentity">
        <plugin name="change_is_enable_method" type="Company\OrderEmail\Plugin\Sales\Order\Email\Container\OrderIdentityPlugin"/>
    </type>
</config>

app/code/Company/OrderEmail/Plugin/Sales/Order/Email/Container/OrderIdentityPlugin.php

<?php

namespace Company\OrderEmail\Plugin\Sales\Order\Email\Container;

class OrderIdentityPlugin
{
    /**
     * @var \Magento\Checkout\Model\Session $checkoutSession
     */
    protected $checkoutSession;

    /**
     * @param \Magento\Checkout\Model\Session $checkoutSession
     *
     * @codeCoverageIgnore
     */
    public function __construct(
        \Magento\Checkout\Model\Session $checkoutSession
    )
    {
        $this->checkoutSession = $checkoutSession;
    }

    /**
     * @param \Magento\Sales\Model\Order\Email\Container\OrderIdentity $subject
     * @param callable $proceed
     * @return bool
     */
    public function aroundIsEnabled(\Magento\Sales\Model\Order\Email\Container\OrderIdentity $subject, callable $proceed)
    {
        $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/v1.log');
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);
        $logger->info('Your text message');

        $returnValue = $proceed();

        $paymentMethodCode = $this->checkoutSession->getQuote()->getPayment()->getMethod();

        $logger->info($paymentMethodCode);

        if($paymentMethodCode = "custom_paymentcode"){
            $forceOrderMailSentOnSuccess = $this->checkoutSession->getForceOrderMailSentOnSuccess();
            if(isset($forceOrderMailSentOnSuccess) && $forceOrderMailSentOnSuccess)
            {
                if($returnValue){
                    $returnValue = false;
                }
                else{
                    $returnValue = true;
                }
                $this->checkoutSession->unsForceOrderMailSentOnSuccess();
            }

            return $returnValue;
        }
    }
}

But I am not getting the payment method from the checkout session which I have logged into the log file. So I Am not not able to check the condition.


texts: Magento 2: Include Product url in custom js file

texts:
How to include product url in Custom js file,

In Magento2.

I am using below code in template file:

$_product = $block->getProduct();
$_product_url= $_product->getProductUrl();
echo $_product_url;

How to use it in js file


texts: How hide in the view shipping in Magento 2?

texts: I want hide the text SHIPPING, in Magento v2


texts: Is there any reason why template hints are not available in the global scope?


texts: Unassigned category from product in magento 2

texts:
I have tried following code but does't work

$all_categoty=$_product->getCategoryIds();
   $CategoryLinkRepository = $objectManager->get('\Magento\Catalog\Model\CategoryLinkRepository');
               foreach($all_categoty as $cat){
                           if($cat=="15"){
                                                continue;
                           }
$CategoryLinkRepository->deleteByIds($cat ,$_product->getSku());
}

Then try with reindexing but doesn't remove the category

$productCategoryIndexer = $objectManager ->get('Magento\Framework\Indexer\IndexerRegistry')
  ->get(Magento\Catalog\Model\Indexer\Product\Category::INDEXER_ID);
$productCategoryIndexer->reindexRow($_product->getId());


texts: How to include "out of stock" products in GraphQL results

texts:
I tried to query products in Magento 2 GraphQL using the bellow query, but the results only shows "IN_STOCK" products:
{
  products(
    filter:
    {
      sku:
      {
        in: [
          "SKU_001",
          "SKU_002",
          "SKU_003"
        ]
      }
    }
  ) {
    items {
      name
      sku
      stock_status
      price_range {
        minimum_price {
          regular_price {
            value
            currency
          }
        }
      }
    }
    total_count
    page_info {
      page_size
    }
  }
}

I tried to set to "true" the "Display out of stock products" config in Stores > Configuration > Catalog > Inventory > Stock Options and run a reindex but the results are the same.
Is there a way to query IN_STOCK and OUT_OF_STOCK products together?


texts:
I found a way to add a static block in a dropdown. I edited the renderer.phtml in page/html/topmenu and added:

$html .= '
';
$html .= $this->_getHtml($child, $childrenWrapClass);
$staticBlock = trim($this->getLayout()->createBlock('cms/block')-
>setBlockId($child->getId())->toHtml());
if(!empty($staticBlock)){
$html .= '';
$html .= $staticBlock;
$html .= '';
}
$html .= '
';

Now I want t show a different static block in every menu items dropdown. So based on the top category, a different static block should be called.

What would be the best way to do that?

The code I used is this:

staticBlock = trim($this->getLayout()->createBlock('cms/block')->setBlockId('top-5')->toHtml());
    $html .= '';
    $html .= $staticBlock;
    $html .= '';
    $html .= '
';


texts: Coding standard clarification in Magento2

texts:
I have installed PHP_Codesniffer extension to find out the Magento 2 coding standard issues.
I have run the below command.
phpcs --standard=Ecg --extensions=php,xml,phtml --report-full=/path/testing.log /path/

This extension lists out many errors in the log file from default Magento 2 itself.

So, kindly let me know how to say that the default Magento 2 coding standard has so many issues.

Thanks.!


texts: how to avoid site downtime on module install?

texts:
i have to run setup:upgrade command when ever installing new module in magento2.

otherwise its giving error in front end.but if any user browsing on this time it will give error.how to handle this situation?
In magento1 there will be no problem.

  There has been an error processing your request

  Exception printing is disabled by default for security reasons.

  Error log record number: 1145810894775


texts: How to upload file attribute for document in customer registration page and displayed document link in admin customer Edit page

texts: I want to add upload document in customer registration page and display same document in admin customer account page.I have created input type file field and saved document in customer respective table but i do now know how to display this document(file field) in admin customer account page in magento 1.9.


texts: How to show configurable product as related product with their options in Magento

texts: The problem is that when I add a configurable product as a related product, it shows the product but there is no checkbox. I have read that in Magento2 when the related product is a configurable one it won't show the options and the checkbox. Is there a way to fix that??


texts: Need some advice on Set stored credit card as default payment method magento 2

texts: Need to add functionality to Set Stored credit card as default payment method in payment options checkout page magento 2 https://prnt.sc/rvdou9


texts: some listing pages are not displaying images properly

texts:
some of our listing pages are not displaying properly here

means,

Images are not displaying properly
Device Design Category Sort By options are not displaying.
On right side , "Now accepting paypal" is displaying.

But all other pages are working fine like here

we have same configuration for both pages. Page Layout : No layout updates


texts: What is a alternative for deprecated method \Magento\Framework\EntityManager\EntityMetadataInterface::getEntityConnection

texts:
I am currently implementing a SaveHandler class for my custom model like described here. My goal is to save the relations between my custom model and the Store model.

There  \Magento\Framework\EntityManager\EntityMetadataInterface::getEntityConnection is used in order to get a connection. This method is deprecated since 100.1.0 but there's no alternative provided.

Is there any alternative known?

I've been looking around in core classes and in the SaveHandler for pages and blocks it is still used.


texts:
When I load custom option that exists, is drop_down type and has values, the $_values property is empty. Any idea why?

$option = Mage::getModel('catalog/product_option')->load(1);
var_dump($option->getValues());
//array (size=0)
//empty


texts: Magento Inventory Reservation Compensation command not working

texts:
I have tried to run the following command to compensate the inventory reservation.

bin/magento inventory:reservation:create-compensations -r

But it got stuck as in the below image.

It would be very helpful if anyone has a solution to this issue.


texts: how to show only some columns for specific role name in order view?

texts:
we have customers that order and ship the products and they can see their orders but in this page prices and tax are shown and we don't want to show them
the code is in sales/order/view/items.phtml

I will get my role name and then I can write if the role then not show:

$admin_user_session = Mage::getSingleton('admin/session');
    $adminuserId = $admin_user_session->getUser()->getUserId();
    $role_data = Mage::getModel('admin/user')->load($adminuserId)->getRole()->getData();
    $role_name = $role_data['role_name'];

Items.phtml:

<?php $_items = $this->getItemsCollection() ?>
    <?php $i=0;foreach ($_items as $_item):?>
        <?php if ($_item->getParentItem()) continue; else $i++;?>
        <tbody class="<?php echo $i%2?'even':'odd' ?>">
            <?php
            //if($role_name!="Europe")
            echo $this->getItemHtml($_item) ?>
            <?php
            //if($role_name!="Europe")
            echo $this->getItemExtraInfoHtml($_item) ?>

for example I want to show Item Status but not others like Original Price
Price,Qty   Subtotal and etc
I don't know how to write my condition here to make it possible

I know that getItemHtml is comming from abstract.php and is

public function getItemHtml(Varien_Object $item)
{
    if ($item->getOrderItem()) {
        $type = $item->getOrderItem()->getProductType();
    } else {
        $type = $item->getProductType();
    }

    return $this->getItemRenderer($type)
        ->setItem($item)
        ->setCanEditQty($this->canEditQty())
        ->toHtml();
}


texts: admin area: Restrict access to a particular page

texts:
I want to hide or restrict access to a particular page from admin users.
That means if an admin user tried to reach a page (e.g.  System > Tools > Compilation ) he/she would see a 404 not found notice (like when you install an extension, before you log out and log back in).

I read some information about ACL in Magento, but I'm not sure if this is the place to start.

How can I do this? I'm developing an extension for this task.

UPDATE:

Sorry. I should have said that I'm writing an extension for this task and the extension should restrict access to both current users and future users.


texts:
How can I add a new column to the sales_flat_order_grid table and ensure that values are properly inserted there?

The "source" for the new column is a custom column we've added to sales_flat_order, let's call it foo.  AFAICT, there are three ways to get foo to appear in the main order grid:

JOIN the sales_flat_order_grid collection onto sales_flat_order.

Problem: Filters no longer work due to ambiguous columns (since both tables have similar column names)

Have the grid use sales_flat_order for data instead of sales_flat_order_grid.

Problem: Columns aren't indexed, so filtering is dreadfully slow. It seems silly to add index the same data indexed in the unused sales_flat_order_grid table.

Add a new column to sales_flat_order_grid and ensure the value updates there

I cannot figure out how sales_flat_order_grid is being updated, therefore I don't know how to add this new column.  Any thoughts?


texts: css not getting loaded while upgrading to 2.4.2

texts:
i have upgraded magento 2.2.6 to magento 2.4.2 successfully
But css is not getting reflected

I am able to login successfully. But not able to find the solution.
I have made dev/static/sign = 0
reindexing done
setup-content:deploy -f done


texts: HTTP 500 error after switching from developer mode to production mode

texts: After switching to production mode, website is giving http 500 error. Admin side is opening but no pictures. What should i do?


texts:
In Product Page is there a way to get all the products who have the current product as related ?

Example:
Product A Page

I want to know all the products that have the Product A as related.


texts: On product page,set some attribute's value pre selected

texts:
I have two attributes of product.When product page is loaded that time I want to preselect value on page.

Please check below image:

All products are of "Simple Product Type"

So is it possible ? How ?
Thanks in advance.


texts: Loging on frontend failed with no errors

texts:
For a few hours I could not login on frontend. (on local domain https://www.magento2.loc, magento 2.2.5, developer mode).
If I enter wrong username or password, yes, I receive error message.
With correct credentials it just reloaded the login page, that's all.
Googling around did  not help.
I tried all possible settings with cookies and sessions, cleared generated, cache and sessions directories, disabled all modules in app/code and switched to blank theme. The backend, by the way, worked normally. I could log in and out to the dashboard.

The problem was solved by itself when I restarted the computer (MAC, El Capitan) and crossed my fingers.

The question is what could it be? And how to prevent it in production environment?


texts:
I have installed the Algolia search extension on the Magento2 website.

Upon reindexing, I am getting below error.

  "upgrade your plan or delete existing records".

My question is an upgraded plan we don't like to go because, we have around max 2k products, so the basic plan is enough for it.

For the second option "Delete existing record"

How to delete the existing records? Does that mean to delete the products?

Can anyone help me to resolve this issue?

I checked with extension support, they suggested me to post a query here.

Thanks


texts:
i have an array string with id numbers
example: $taxIds=array(9,13)

how to fetch all record with this query??

$connection = Mage::getSingleton('core/resource')->getConnection('core_read');
$sql        = "Select * from `ath_webservice_sale` where `id`='$taxIds'";
$rows       = $connection->fetchAll($sql);


texts: Configurable Options within a modal for non-selected options

texts:
I want to write a frontend functionality for configurable products.

If there is no configurable attribute given, I want a modal to popup which asks the user to select options. The options should be within the modal of course.

As of now, I got nothing, I wanted to ask for the right way of solving this. Maybe somebody can layout the todo's here schematically? That would be very helpful.


texts: Magento 2: How to properly set app state "Area code"? (setAreaCode, getAreaCode)

texts: I see there isn't a lot of information about using app states and if there is it doesn't work properly. So bellow is my answer based on my own investigation.


texts: Change order of "Subtotal" and "Grand Total" amounts in the checkout

texts:
I've got issue because I can't figure out to swap order total brutto with netto.

Look up and check the image. Magento2 maybe by default set Price brutto on the top but I need move price brutto to down. I looked for in module-checkout and magento2 admin panel but I can't find any file to swap this field in the table.


texts: How to prevent from always static content deploy content on changing JS and CSS work in Magento 2?

texts:
How to prevent from static content deploy after changing in JS or CSS file in Magento 2.
After doing some little change changes are not loads in front end if doesn't deploy.
How to do that Any help is appriciated.


texts:
I'm using the following code to add custom fields to my CMS pages:
cms_page_form.xml
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <fieldset name="content">
        <field name="content_a">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="label" xsi:type="string" translate="true">Content A</item>
                    <item name="formElement" xsi:type="string">wysiwyg</item>
                    <item name="source" xsi:type="string">page</item>
                    <item name="wysiwyg" xsi:type="boolean">true</item>
                    <item name="dataScope" xsi:type="string">shop_small_text</item>
                    <item name="additionalClasses" xsi:type="string">admin__field-wide</item>
                </item>
            </argument>
        </field>
        <field name="content_b">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="label" xsi:type="string" translate="true">Content B</item>
                    <item name="formElement" xsi:type="string">wysiwyg</item>
                    <item name="source" xsi:type="string">page</item>
                    <item name="wysiwyg" xsi:type="boolean">true</item>
                    <item name="dataScope" xsi:type="string">shop_button</item>
                    <item name="additionalClasses" xsi:type="string">admin__field-wide</item>
                </item>
            </argument>
        </field>
    </fieldset>
</form>

No labels are showing on admin CMS page.


texts: Hello i'm trying to do a reindex via CLI but I got this error: http://prntscr.com/kon1op


texts: Simple Product with checkbox user defined quantity

texts: So we sell a product in multiple strengths and sizes on our wholesale site. Product A comes in strength 1, 2, and 3. Currently the user has to select the bottle size via drop down then select strength via drop down and input quantity. This works but it takes the user a long time to place their order as they have to keep clicking the drop down and selecting the strength and input the quantity. We'd like to be able to utilize check boxes with user defined quantities for the strengths so the user can use the drop down for bottle size, then tick each strength, input the quantity they desire for each and add to cart. Each strength and bottle size would then be their own line item in the cart. Any feedback or someone looking to code this would be appreciate. Thanks!


texts:
From System => Setup I choose "Component Manager", then when typing public and private access keys the following error shows up:

Couldn't resolve host 'repo.magento.com'

Same happens if I try to type keys from "System config"
What is wrong?
Thank you


texts:
When i try to access my admin page, after logging in the page is redirected to a blank page:

Don't know why it appears so, Can anyone help to resolve this issue!

UPDATE
I have made the changes said in the first answer but now i have got the following page:


texts: Magento 2: Cannot override translation csv for admin area

texts:
I am override and added local en_US.csv file with below path

  app/code/Magento/Customer/i18n with en_US.csv

Changed text "Force Sign-In" to "Force Login" and clear cache. The translation is not working.

Any help is highly appreciated.


texts: Certification and training - Magento 1 vs Magento 2

texts:
Looking to get certified as a Magento developer however finding the certification page a bit confusing. It looks as though all of the certs are for Magento 1 and but you can do Magento U Courses for Magento 2.

Questions:

Are there certifications yet for Magento 2
Would it be best to only get certifications in Magento 2 if they exist
If Magento 2 certifications dont exist is it still worth getting Magento 1 certified


texts:
I started a backup from the back-end, but it is taking a very long time, and I want to stop it now, because it seems to block a php bin/magento setup:upgrade.
I can log in on the CLI, and have knowledge of Linux, so killing a process should be no problem. Thing is, I have no idea which process it could be. I see quite some bin/magento queue:consumers:start processes.


texts: Copy Product from website to website programmatically

texts:
In the admin you can do this:

which is pretty easy to copy a product from one website to another, with the values of another website.

Is there a way to do this programmatically?

EDIT:

I've tried this:

$product = Mage::getModel('catalog/product')->load($productId);
$websiteIds = $product->getWebsiteIds(); //fetch product current websiteIds
array_push($websiteIds, 5);
$product->setWebsiteIds($websiteIds); //assigning website IDs
$product->save();

And yes, add the product to the other website but with the Default Values. And I don't want that.


texts:
We have managed to modify the " Talla" Field in order to remove the "(-)" part.

What happens is once we go to next, once selected the address we want to send to, it reloads the page and the "(-)" appears again.

This is the plugin we have created:

 <type name="Magento\Checkout\Model\DefaultConfigProvider">
        <plugin name="mod_config_provider" type="Mod\PareraCustom\Plugin\ConfigProviderPlugin"/>
 </type>

Class:

class ConfigProviderPlugin extends \Magento\Framework\Model\AbstractModel
{
    public function afterGetConfig(\Magento\Checkout\Model\DefaultConfigProvider $subject, array $result)
    {
        $items = $result['totalsData']['items'];

        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        for($i=0; $i < count($items); $i++){
            $quoteId = $items[$i]['item_id'];
            $quote = $objectManager->create('\Magento\Quote\Model\Quote\Item')->load($quoteId);
            $productId = $quote->getProductId();
            $product = $objectManager->create('\Magento\Catalog\Model\Product')->load($productId);
            $reference = $product->getData('sgi_reference');
            $items[$i]['sgi_reference'] = $reference;
            $options = json_decode($items[$i]['options']);
            if (count($options) > 0) {
                foreach ($options as $option) {
                    $option->value = str_replace('(-)', '', $option->value);
                }

                $items[$i]['options'] = json_encode($options);
            }
        }

        $result['totalsData']['items'] = $items;
        return $result;
    }
}

This is the picture once the page loads and we select the checkout address:

This is the image where we have proceeded to select the address and went to the next step and the page reloaded.


texts: Magento PayPal checkout sales not showing in revenue

texts: I have sales that have been completed in PayPal. However, when i look at the reports and the dashboard, all the PayPal sales don't account for the revenue and lifetime sales. Is there a way to fix this?


texts: In Magento 2.2.5, Is possible to make default "Add Product" to be a virtual product

texts: In Magento 2.2.5, By Default, when we click the Add Product it is adding the Simple Product. Is possible to make it the "Add Product" to be a virtual product.


texts: How can we add custom grid at customer group edit form inside a fieldset?

texts: How Can we add custome grid with custome collection on customer group edit form in fieldset.


texts: Getting collection issue in observer Magento

texts:
I want to sort the customer attribute address after sort_order. For some reason by default it doesn't work so I started to digging into the core. This function :

protected function _getFormAttributeCollection()
{
   return parent::_getFormAttributeCollection()
   ->addFieldToFilter('attribute_code', array('neq' => 'created_at'));
}

from Mage_Customer_Model_Form is responsible . If I add here this code ->setOrder('sort_order', 'ASC'); to my collection its working fine. Due to the fact that  you don't touch the core, I want to fix this from an observer.
I used this event: core_block_abstract_to_html_before and this is my function from my observer:

 $grid = $observer->getBlock();
 if ($grid instanceof  Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element) {
   $collection = $observer->getEvent()->getCollection();
   $collection = $collection->getSelect()->order('sort_order', 'ASC');
// $collection->setOrder('sort_order', 'ASC');
   $observer->getEvent()->setCollection($collection);
 }

The fact is that $collection is always null. I don't know why ?  Can someone give me an idea how to fix this ?

Thank you


texts: Remove Default header and create new one with menu and search bar

texts:
I created a new block with HTML and CSS from Admin Panel in Magento 2.2.5.

I want to display this block as a header of my store, so I want the method to remove or hide the default header and also how to add Menu and Search bar to my new header block.

Magento 2.2.5 Luma Theme.

Thanks!


texts: Required changes to be made to the config.rb file paths for a custom theme

texts:
This is my first experience with sass and my novice steps into learning magento 1.9 theme development.

I have followed the following guide to create the base for my custom theme-
http://www.magentocommerce.com/knowledge-base/entry/ee114-ce19-rwd-dev-guide

After creating the config.rb file inside the following folder: xampp\htdocs\magento\skin\frontend\custom_package\custom_theme\scss\

What paths do I need to change to the following sample snippet for my new sass compilation to work-

http_path = "/skin/frontend/rwd/default/"
css_dir = "../css"
sass_dir = "../scss"
images_dir = "../images"
javascripts_dir = "../js"
relative_assets = true

Also where do I need to tinker the sass codes for the proper css code to be generated for my theme.

-Thanks in Advance.


texts: Show previous and next link in link tags under head in category page

texts:
In category page, I need to show link tags that holds pagination's previous and next links like below:

<link rel="prev" href="http://www.test.com/prod1.html?p=1" />
<link rel="next" href="http://www.test.com/prod1.html?p=3" />

Did some research but no success yet.

I have used head as reference in layout but the problem is, page head content gets loaded before category product collection is loaded because if which  total number of products cannot be found.

Please suggest!

Thank you in advance!


texts: How to preview uploaded image in form when edit

texts:
When I try to upload the image, it was successfully uploading the image as well as save the image name into the database but when I click on edit, it will show me the below error message in my console:

Uncaught TypeError: value.map is not a function - file-uploader.js:69

  Below is  my code ui_component XML file

<field name="brand_image">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="dataType" xsi:type="string">string</item>
                <item name="source" xsi:type="string">Branddetails</item>
                <item name="label" xsi:type="string" translate="true">Brand Image</item>
                <item name="visible" xsi:type="boolean">true</item>
                <item name="formElement" xsi:type="string">fileUploader</item>
                <item name="previewTmpl" xsi:type="string">[Namespace_Module]/image-preview</item>
                <item name="elementTmpl" xsi:type="string">ui/form/element/uploader/uploader</item>
                <item name="required" xsi:type="boolean">false</item>
                <item name="uploaderConfig" xsi:type="array">
                    <item name="url" xsi:type="url" path="[Module]/[controller-folder]/upload"/>
                </item>
            </item>
        </argument>
    </field>

  Upload.php in my controller folder

<?php
namespace [Namespace]\[Module]\Controller\Adminhtml\[controller-folder];
use Magento\Framework\Controller\ResultFactory;
class Upload extends \Magento\Backend\App\Action
{
protected $imageUploader;

public function __construct(
    \Magento\Backend\App\Action\Context $context,
    \Magento\Catalog\Model\ImageUploader $imageUploader
) {
    parent::__construct($context);
    $this->imageUploader = $imageUploader;
}

protected function _isAllowed()
{
    return $this->_authorization->isAllowed('[Namespace_Module]::[entity]');
}

public function execute()
{
    try {
        $result = $this->imageUploader->saveFileToTmpDir('brand_image');
        //echo '<pre>';print_r($result);die;
        $result['cookie'] = [
            'name' => $this->_getSession()->getName(),
            'value' => $this->_getSession()->getSessionId(),
            'lifetime' => $this->_getSession()->getCookieLifetime(),
            'path' => $this->_getSession()->getCookiePath(),
            'domain' => $this->_getSession()->getCookieDomain(),
        ];
    } catch (\Exception $e) {
        $result = ['error' => $e->getMessage(), 'errorcode' => $e->getCode()];
    }
    return $this->resultFactory->create(ResultFactory::TYPE_JSON)->setData($result);
}
}

  DataProvider.php in Model

<?php
namespace [Namespace]\[Module]\Model\Branddetails;
use Magento\Ui\DataProvider\AbstractDataProvider;
use Magento\Ui\DataProvider\Modifier\ModifierInterface;
use Magento\Ui\DataProvider\Modifier\PoolInterface;
use [Namespace]\[Module]\Model\ResourceModel\[entity]\CollectionFactory;
class DataProvider extends AbstractDataProvider {
protected $_loadedData;

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

public function getData()
{
    if (isset($this->_loadedData)) {
        return $this->_loadedData;
    }
    $items = $this->collection->getItems();

    foreach ($items as $brand) {
        $this->_loadedData[$brand->getEntityId()] = $brand->getData();
    }
    //echo '<pre>';print_r($this->_loadedData);die;
    return $this->_loadedData;
}
}

Please help me to solve this error.
Thanks in advance.


texts: Facing error while fetching images from the editor of textarea attribute

texts:
I create a text area attribute with WYSIWYG allowed and visible on the product page.

I add this attribute to default attribute set.

I create a product and add some text and images to this attribute in this product with the WYSIWYG editor.

I enter also some text and images by the same way for the description field of the same product.

At the frontend side I can see text and images for the description field. The text area attribute appears under the description field in the additional informations part.

But I can see only the html text of the attribute, images don’t appear.

If I analyze the generated html code, I can see that the code included by the WYSIWYG editor like src="{{media url="folder/image.jpg"}} has not been parsed. The same code has been parsed for the description field.

How can I do to make this working ? Thanks for your help.

How I am fetching the data from the editor:

echo $_product->getResource()->getAttribute('attribute_code')->getFrontend()->getValue($_product);


texts: Is there any way to delete/remove admin user programmatically?

texts: I wanted to delete an admin user programmatically, I have only FTP access.


texts: Does Magento 2 Open Source (CE) supports B2B?

texts:
Does Magento Open Source 2.2.2 supports Integrated B2B functionality? If not how could we integrate B2B with Open Source where it supports different features like below

Customers can add products by SKU
Allow business customers with the ability create company accounts,
set up multiple buyers, and define their specific roles and
responsibilities with easy self-service tools
Create custom catalogs and price lists


texts: Magento 2: How to override cacheable="false" in layout in your own theme

texts:
We use a third party extension wich lets us add bundles with specific discounts to product pages. The problem is that they added a default.xml with the following code:

<block class="Magedelight\Bundlediscount\Block\Toplink" name="add.bundlediscount.top" ifconfig="bundlediscount/general/enable_link" after="-" cacheable="false"/>

Magento seems to ignore the ifconfig part of the code and just always caches the entire page, after some research i found someone stating that Magento 2 just scans the layouts for a cacheable="false" tag and if found busts the cache for the entire page.

i tried the following:

<referenceBlock name="add.bundlediscount.top" cacheable="true" />

with no result the true value doesn't seem to update the availability of the tag

i also tried the following:

<referenceBlock name="add.bundlediscount.top" remove="true" />

In the hope of removing the entire block and the snippet that blocks the entire store from being cached, but to no avail.

The question is, is there a way to update the code from my theme or is the only way to comment the code in the extension directly?


texts: I desperately try to generate a discount code that can be applied to all products but one, as this one has a special price already. Looked a several suggestions, but I cannot find the condition/action that let´s me select a certain SKU. What am I missing?


texts: How to implement Ajax File Upload in Magento 2?

texts:
I have a custom form and there I'm using the default file attachment input type but I want the form uploading as a ajax.
I have followed many tutorials but can't find the appropriate solution.
Can anyone please help?


texts: Magento 2 Add custom discount to payment page

texts:
I want to add custom discount to only payment page, i am able to add discount on checkout/cart page using checkout_cart_index.xml but i need to show it only on checkout_index_index:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
       <referenceBlock name="checkout.cart.totals">
           <arguments>
               <argument name="jsLayout" xsi:type="array">
                   <item name="components" xsi:type="array">
                       <item name="block-totals" xsi:type="array">
                           <item name="children" xsi:type="array">
                               <item name="custom_discount" xsi:type="array">
                                   <item name="component"  xsi:type="string">Company_Test/js/view/checkout/summary/partialpayment</item>
                                   <item name="sortOrder" xsi:type="string">20</item>
                                   <item name="config" xsi:type="array">
                                       <item name="custom_discount" xsi:type="string" translate="true">test</item>
                                   </item>
                               </item>
                           </item>
                       </item>
                   </item>
               </argument>
           </arguments>
       </referenceBlock>
   </body>
</page>


texts: Magmi cannot create directory for product images

texts:
I am trying to import products using magmi. But it cannot create directories to copy images. I am getting this error.

  Image attributes processor v1.0.25 - error creating
  media/catalog/product/f/a: 2,mkdir() [function.mkdir]: Permission
  denied

The directory   media/catalog/product/ has 777 permissions but it does not solve the problem.


texts:
I'm just starting Magento 2 and I see a lot of things that are gone !

Can somone can explain me this with the best practices of course:

I inquired and I found that: the layout xml are loaded according to the layout handles

ex: if we want add some block to the home page, we should create cms_index_index.xml and we add the needed block inside right ? so where is exactly the path to create it.

ex2: supposing that i have my module app/code/Am/Prince/view/frontend/layout/prince_index_index.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd" layout="1column">
    <body>
        <referenceContainer name="content">
            <block class="Am\Prince\Block\Block" name="home-block1" template="home-block1.phtml" />
        </referenceContainer>
    </body>
</page>

If I need to display this block home-block1 also in home page can I declare it in this xml ?

.So where is local.xml like M1 ?, wonderfully we have to declare it once and we put all the changes on it with prefexing the layout handle and the block inside something like:

<cms_index_index>
    <reference name="content">
    ...
</cms_index_index>


texts: Magento 2 How to send an email with attachment?

texts:
How to send an email with attachment ?
i know there is already available on stackexchange but it is for below magento 2.3 version not for magento 2.3 or magento 2.3.1 version.

i already check this - Magento 2: send email with Attachment

but not working because addAttachment() & createAttachment() function is not present in magento2.3.1(zend framework 1 have no function now )

Please guide me -
how to send an email with attachment ?


texts: Error after Migration: Unable to load theme by specified key (Magento 2)

texts:
the migration with data-migration-tool from older Magento to Magento 2.0.4 is completed.

But after migration I get the error in frontend:

Unable to load theme by specified key: 'themename'

This is a very strange error because the theme 'themename' doesn't exist.

The database table theme doesn't show this mysterious theme. The same in adminarea Content -> Themes. And I choose another theme in Configuration -> General -> Design. And the theme doesn't exist in app/design folder.

So from where is this theme coming? Perhaps a theme from older Magento I migrated? If so...how can I delete this old theme and solve this error?

I deleted the caches and var folder, generated the static files, compiled di.xml, set permissions. Nothing helps.

Additional adminarea doesn't load any css.


texts:
I'm testing to add a multiselect input in my BO form. But, the multiselect output is broken (however, the value selected is really selected in BO, and values are assigned). When I select a value, the multiselect selects all the values (all the values are highlighted ; just graphically).

My XML :

<field name="my_field">
        <argument name="data" xsi:type="array">
            <item name="options" xsi:type="object">MyCompany\MyModule\Model\Config\Source\Content\TagSelect</item>
            <item name="config" xsi:type="array">
                <item name="dataType" xsi:type="string">text</item>
                <item name="label" translate="true" xsi:type="string">Tags</item>
                <item name="formElement" xsi:type="string">multiselect</item>
            </item>
        </argument>
    </field>

TagSelect File :

public function toOptionArray()
{

    return [
        ['value' => MyInterface::TAG_TAG1TEST, 'label' => MyInterface::TAG_TAG1TEST],
        ['value' => MyInterface::TAG_TAG1TEST, 'label' => 'test'],
        ['value' => MyInterface::TAG_TAG1TEST, 'label' => 'test']
    ];
}

Thanks!


texts: magento 1.9.0.1 shows Invalid Form Key. Please refresh the page. after cancel the order

texts:
In magento 1.9.0.1 when I try to cancel the order is redirect to dashboard and show this error :
Invalid Form Key. Please refresh the page.


texts: does not extend \Magento\Framework\DataObject custom Model

texts:
Here's my code
when I try to make the collection with my custom model I have this error
In Collection.php line 612:
Easysoft\Logistic\Model\Tracking does not extend \Magento\Framework\DataObject
app/code/Easysoft/Logistic/Helper/Shipup/Track.php
<?php

namespace Easysoft\Logistic\Helper\Shipup;

use Magento\Sales\Model\ResourceModel\Order\CollectionFactory as OrderFactory;
use Magento\Framework\Stdlib\DateTime\DateTimeFactory;
use Easysoft\Logistic\Model\ResourceModel\Transcan\Tracking\CollectionFactory;

class Track extends \Magento\Framework\App\Helper\AbstractHelper
{
    const FORMAT_DATE = 'd-m-Y H:i:s';//set format as per your requirement
    /** @var \Magento\Sales\Model\ResourceModel\Order\CollectionFactory $order **/
    protected $orderFactory;
    /** @var \Magento\Framework\Stdlib\DateTime\DateTimeFactory $dateTimeFactory **/
    private $dateTimeFactory;
    /** @var CollectionFactory $trackingCollection **/
    protected $tracking;

    public function __construct(
      OrderFactory $order,
      DateTimeFactory $dateTimeFactory,
      CollectionFactory $trackingCollection)
    {
        $this->dateTimeFactory = $dateTimeFactory;
        $this->orderFactory = $order;
        $this->tracking = $trackingCollection;
    }

    public function fillDeliveredAtFromShipup()
    {
        $dateModel = $this->dateTimeFactory->create();

        $collection = $this->tracking->create();
        foreach($collection as $item)
        {
        }
}

app/code/Easysoft/Logistic/Model/Transcan/Tracking.php
<?php
namespace Easysoft\Logistic\Model\Transcan;

use Easysoft\Logistic\Model\ResourceModel\Transcan\Tracking as TrackingResourceModel;
use Magento\Framework\Model\AbstractModel;

class Tracking extends AbstractModel
{
    public function _construct()
    {
        $this->_init(TrackingResourceModel::class);
    }

}

app/code/Easysoft/Logistic/Model/ResourceModel/Transcan/Tracking.php
<?php
namespace Easysoft\Logistic\Model\ResourceModel\Transcan;

use Magento\Framework\Model\ResourceModel\Db\AbstractDb;

class Tracking extends AbstractDb
{
    protected function _construct()
    {
        $this->_init('easysoft_logistic_transcan_tracking', 'tracking_id');
    }

}

app/code/Easysoft/Logistic/Model/ResourceModel/Transcan/Tracking/Collection.php
<?php
namespace Easysoft\Logistic\Model\ResourceModel\Transcan\Tracking;

use Easysoft\Logistic\Model\Tracking as TrackingModel;
use Easysoft\Logistic\Model\ResourceModel\Transcan\Tracking as TrackingResourceModel;
use Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection;

class Collection extends AbstractCollection
{
    /**
     * Define resource model
     *
     * @return void
     */
    public function _construct()
    {
        $this->_init(TrackingModel::class, TrackingResourceModel::class);
    }
}


texts:
I have 4 errors in my shop now.

After change a plugin and did everything clearing the cache, deploy the static files, we have the error with the totals js, I should say, we bought a template and we using it, the support of them says we missed a file:

  vendor/magento/module-tax/view/frontend/web/js/view/checkout/minicart/subtotal/totals.js

The file it is there, but we cleared the cache and deploy again.

The errors is this ones:

/pub/static/version1521186503/frontend/Codazon/fastest_outdoor/es_ES/Magento_Checkout/js/model/url-builder.js
/pub/static/version1521186503/frontend/Codazon/fastest_outdoor/es_ES/Magento_Checkout/js/model/error-processor.js
/pub/static/version1521186503/frontend/Codazon/fastest_outdoor/es_ES/Magento_Msrp/js/view/checkout/minicart/subtotal/totals.js
/pub/static/version1521186503/frontend/Codazon/fastest_outdoor/es_ES/Magento_Checkout/js/model/resource-url-manager.js
pub/static/version1521186503/frontend/Codazon/fastest_outdoor/es_ES/Magento_Msrp/js/view/checkout/minicart/subtotal/totals.js

Someone knows what is that?

Thanks in advance


texts: How to solve the message "Character content other than whitespace"?

texts:
I've received that message below when I try to reset my admin password using the Admin panel, I've my custom module installed.

I see this same message on a white screen when I try to access using the tab created in System > Configuration.

Message:

Invalid XML in file /var/www/html/rmiorder/app/code/Vendor/Hosebuilder/etc/email_templates.xml: Element 'config': Character content other than whitespace is not allowed because the content type is 'element-only'. Line: 2

File XML:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Email:etc/email_templates.xsd">
    <template id="vendor_hosebuilder_section_general_show_email_template" label="Hose email template for requesting quote" file="hose_request_email_template.html" type="html" module="Vendor_Hosebuilder" area="frontend"/>
</config>

How can I solve that issue?


texts:
Hi My site name is xpressbuyer.com.

I have tried almost all solution, but nothing seems to be working. Below things i have done.

Add code in .htaccess
Set Use Web Server Rewrites to YES in Search Engine Optimisation tab
Added

<directory "="" var="" www="" html"="">
AllowOverride All
</directory>

in .htaccess file.

Could you please direct me to find a solution for this?


texts:
May I have Help please
Warning: simplexml_load_string(): Entity: line 29: parser error : StartTag: invalid element name in /var/www/magento2/vendor/magento/framework/View/Model/Layout/Merge.php on line 552


texts: ReferenceError: Uploader is not defined in magento 1.9.3

texts:
after update to new version 1.9.3. the Uploader  is not working anymore. given below error.i  upldate my code but still the same.

var uploader = new
Uploader({"uploaderConfig":{"chunkSize":1073741824,"withCrede...

below is my code
class Spacename_Modulename_Block_Adminhtml_Modulename_Edit_Tab_Images extends Mage_Adminhtml_Block_Widget {

    protected $_uploaderType = 'uploader/multiple';

    protected function _prepareForm() {
        $data = $this->getRequest()->getPost();
        $form = new Varien_Data_Form();
        $form->setValues($data);
        $this->setForm($form);

        return parent::_prepareForm();
    }

    protected function _prepareLayout() {
        $this->setChild('uploader', $this->getLayout()->createBlock($this->_uploaderType)
        );

        $this->getUploader()->getUploaderConfig()
                ->setFileParameterName('image')
                ->setTarget(Mage::getModel('adminhtml/url')->addSessionParam()->getUrl('*/*/image'));

        $browseConfig = $this->getUploader()->getButtonConfig();
        $browseConfig
                ->setAttributes(array(
                    'accept' => $browseConfig->getMimeTypesByExtensions('gif, png, jpeg, jpg')
        ));

        return parent::_prepareLayout();
    }

}

js code
<script type="text/javascript">
//<![CDATA[
var <?php echo $_block->getJsObjectName(); ?> = new Product.Gallery('<?php echo $_block->getHtmlId() ?>', <?php echo $_block->getImageTypesJson() ?>);
//]]>
</script>


texts: magento migration from one domain to another

texts:
I am transferring my magento site from an old domain to a new domain.

I have exported the database file from the old server and I have done all the necessary changes.

Now I'm trying to run the exported file into the new database but sql is stuck at loading for almost an hour.

Please somebody help.

See loading screen attached. Image here

Thank you.


texts: magento 2 - configure s3 bucket - The "--remote-storage-bucket" option requires a value

texts:
i tried below command to configure s3 bucket
bin/magento setup:config:set --remote-storage-driver="aws-s3" --remote-storage-bucket="orientbell-web-img" --remote-storage-region="ap-south-1
" --remote-storage-prefix="" --access-key="xyz" --secret-key=xyz -n

it gives me below error
The "--remote-storage-bucket" option requires a value.
Please help me where i am wrong


texts:
I’m having trouble in moving the mini cart from sidebar to header. I’ve tried all the tutorials available in the internet but it doesn’t work.

I also tried adding this in the header block of layout\page.xml

<block type="checkout/cart_sidebar" name="cart_sidebar" as="topcart" template="checkout/cart/sidebar.phtml"

And then in my page\html\header.phtml, I use the code below to call the cart but nothing happened.

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

The solution above works in magento 1.6, but not in version 1.7

Thanks in advance guys


texts: How to get the value of input of custom attribute before the saving product in Magento 2

texts:
I want to recuperate the value of the input of two attributes of the product to do a request o database to recuperate some value from the custom table according to the value of the two attributes before saving the product. So how to proceed and where to find the form of the new product or the phtml

Thanks in advance
i tried the solution gived  and this is my code in observer

<?php

namespace Modif\NameProduct\Observer;

use Magento\Framework\Event\ObserverInterface;

class Productedit implements ObserverInterface
{
    /**
     * @var \BO\Famille\Model\Family
     */
    protected $_family;
    /**
     * @var \BO\NomCommercial\Model\Businessname
     */
    protected $_nc;
    /**
     * @var \BO\Epaisseur\Model\Epaisseur
     */
    protected $_ep;
    /**
     * @var \BO\Couleur\Model\Couleur
     */
    protected $_color;

    /**
     * @param \Magento\Framework\View\Element\Template\Context $context
     * @param \BO\Famille\Model\Family $family
     * @param \BO\NomCommercial\Model\Businessname $nc
     * @param \BO\Epaisseur\Model\Epaisseur $ep
     * @param \BO\Couleur\Model\Couleur $color
     * @param \Magento\Framework\App\ResourceConnection $resource
     * @param array $data
     */
    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \BO\Famille\Model\Family $family,
        \BO\NomCommercial\Model\Businessname $nc,
        \BO\Epaisseur\Model\Epaisseur $ep,
        \BO\Couleur\Model\Couleur $color,
        \Magento\Framework\App\ResourceConnection $resource,
        array $data = []
    )
    {
        $this->_family = $family;
        $this->_nc = $nc;
        $this->_ep = $ep;
        $this->_color = $color;
        $this->_resource = $resource;

        parent::__construct(
            $context,
            $data
        );
    }

    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $product = $observer->getProduct();  // you will get product object
        //NOW CHANGE THE PRODUCT ATTRIBUTE OR WHAT YOU WANT

        $_sku = $product->getSku(); // for sku

        $var1 = substr($_sku, 0, 1);

        $var2 = substr($_sku, 1, 2);

        $var3 = substr($_sku, 3, 2);
        $var4 = substr($_sku, 5, 3);

        $int1 = (int)$var1;

        $des_f = $this->_family->getCollection()->addFieldToSelect('designation_f')->addFieldToFilter('code_famille', array('eq' => $int1));
        $des_nc= $this->_nc->getCollection()->addFieldToSelect('nom_commercial')->addFieldToFilter('code_nom_commercial', array('eq' => $var2));
        $des_ep= $this->_ep->getCollection()->addFieldToSelect('designation_ep')->addFieldToFilter('code_epaisseur', array('eq' => $var3));
        $des_col= $this->_ep->getCollection()->addFieldToSelect('designation_col')->addFieldToFilter('code_couleur', array('eq' => $var4));
        $designation_name= $des_f." ".$des_nc." ". $des_ep." ".$des_col ;
        $product->setName($designation_name);

    }
}

but i get 500 error and i realised that i should put a name or i don't want to put a thing in name i just want to get the name according to the sku value automatically so what should i change


texts: Magento Extension - Admin attribute not saving

texts:
I've built an extension, which is all working correctly on my local / development Magento website, unfortunately after packaging it up and installing on another Magento store, the new attributes I've added to the Admin User don't seem to be saving to the Database.

Here is the code, not sure if I've missed something out of the extension package or what but everything seems to be there so it's confusing me now!

From my extensions config.XML

<blocks>
    <adminhtml>
        <rewrite>
            <permissions_user_edit_tab_main>Liquid11_Veridial_Block_Adminhtml_Permissions_User_Edit_Tab_Main</permissions_user_edit_tab_main>
            <permissions_user_grid>Liquid11_Veridial_Block_Adminhtml_Permissions_User_Grid</permissions_user_grid>
        </rewrite>
    </adminhtml>
</blocks>

Here is what is in Liquid11_Veridial_Block_Adminhtml_Permissions_User_Edit_Tab_Main

/**
 * Add additional Mobile number to Admin user record for Veridial's use
 */
$fieldset->addField('veridial_mobile', 'text', array(
    'name'  => 'veridial_mobile',
    'label' => Mage::helper('adminhtml')->__('Mobile Number'),
    'id'    => 'veridial_mobile',
    'title' => Mage::helper('adminhtml')->__('Mobile Number'),
    'class' => 'required-entry input-text',
    'required' => true,
));

/**
 * Add additional Landline number to Admin user record for Veridial's use
 */
$fieldset->addField('veridial_landline', 'text', array(
    'name'  => 'veridial_landline',
    'label' => Mage::helper('adminhtml')->__('Telephone Number'),
    'id'    => 'veridial_landline',
    'title' => Mage::helper('adminhtml')->__('Telephone Number'),
    'class' => 'input-text',
));

And finally my MySQL code to add the columns to the database (2 separate files)

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

$installer->getConnection()->addColumn($installer->getTable('admin/user'), 'veridial_landline', array(
    'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
    'length' => 256,
    'nullable' => true,
    'default' => null,
    'comment' => 'Telephone Number'
));

$installer->endSetup();

and

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

$installer->getConnection()->addColumn($installer->getTable('admin/user'), 'veridial_mobile', array(
    'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
    'length' => 256,
    'nullable' => true,
    'default' => null,
    'comment' => 'Mobile Number'
));

$installer->endSetup();

So, the issue is - The above all seems to work. Admin/user/edit tab is correct (It's got my additional fields) and the Database columns have been added. If I add the data into the Database table itself then it's picked up in the Admin area. For some reason saving the admin/user/edit form just doesn't save the data in veridial_mobile and veridial_landline.

Cache etc has all been refreshed after installing the extension.


texts: Magento 2: Cannot override translation csv

texts:
I need to change the default text of the review submitted into another one.
Right now, I have the default text which is "You submitted your review for moderdation" and I want it to change it in "Thanks, you submitted your review".

I tried to do it in the "standard" way, so I created the en_US.csv in the folder:

app/design/frontend/{Vendorname}/{themename}/i18n/en_US.csv

I did a deploy, cleaned cache, flushed cache, but nothing. The string is not translated.

Any suggestions?

Thanks


texts: How to achieve reverse dropship requirement in magento?

texts:
I have dropship requirement like this.

For Example "ABC" is my website.
ABC says that to all clients or customers :

1.) You get an order from your website.
2.)  Go to ABC.com and sign in. Wholesale pricing will appear when you enter your:
Username = XXXXXXXXXXXXXXXXX
Password = XXXXXX
Use our csv file to upload your orders. This can be found in the wholesale tab.

csv format:
PO #    Addressee   Street Address 1    Street Address 2    City    State   Zip Code    Country Shipping Method SKU Quantity

3.) We(ABC) ship them directly to your customer.

Example:1.xyz got orders from xyz's website.

2.so now xyz will login into abc website and place the orders.

3.now abc will directly  ship to customer.

How to achieve above requirement?

I searched lot of extensions but all are reverse.here the difference is ABC  offering dropship app.

I need to code ? otherwise already any similar extension is there? .Thanks in advance.please comment any clarification needed.


texts: PATCH 9767 v2 issues, where to download already patched Magento?

texts: I am trying to revert Patch 9767 but I am receiving a hunk error. Where can I find an original patched version of Magento 1.9.2.3 and 1.9.2.4 to download so I can upload the file in question?


texts: Pull admin text value to display on Catalog/ Product/ List

texts:
I'm trying to pull the text value from the product page in admin to display under grid mode on catalog/ product/ list.phtml.  Its not pulling the value.

<?php if ($_product->getAttributeText('scratch_and_dent') == "Yes"): ?>

<?php echo $this->__('Our Price: $'); ?>
<?php echo $_product->getAttributeText('scratch_and_dent_price'); ?>

<?php endif; ?>


texts:
i want import this in my magento, this csv have two columns of image, now how import this on my store:

this is a csv example:

http://www.filedropper.com/importproduct

i read some guide but this guide require a image file in the same column,
example this:

image_label1, _image2, image_3, image4, imgage5

in my csv the image have two colums.


texts:
I would like to know how to make a custom url rewrite for my module.

ex. http://magento.localhost/retailer/stores/id/2
    to magento.localhost/retailer/stores/storename.html

http://magento.localhost/retailer/stores/id/3
    to magento.localhost/retailer/stores/storename2.html

  <events>
    <controller_front_init_routers>
        <observers>
            <towersystems_retailer>
                <class>Towersystems_Retailer_Controller_Router</class>
                <method>initControllerRouters</method>
            </towersystems_retailer>
        </observers>
    </controller_front_init_routers>
</events>

Controller Router

class Towersystems_Retailer_Controller_Router extends Mage_Core_Controller_Varien_Router_Abstract {

public function initControllerRouters($observer){
    $front = $observer->getEvent()->getFront();
    $front->addRouter('towersystems_retailer', $this);
    return $this;
}

public function match(Zend_Controller_Request_Http $request){
    Mage::log("match", null, "rewrite.txt");
    if (!Mage::isInstalled()) {
        Mage::app()->getFrontController()->getResponse()
            ->setRedirect(Mage::getUrl('install'))
            ->sendResponse();
        exit;
    }

   $urlKey = trim($request->getPathInfo(), '/');
    //split the urlKey by slash
    $parts = explode('/', $urlKey);
    //check if there are at least 3 parts ('client', 'stores' and the actual store name)
    //if there are less than 3 it means it's not the url you are looking for
    if (count($parts) != 3) {
        return false;
    }
    //check if every part matches what it should
    if ($parts[0] == 'retailer' && $parts[1] == 'stores') {
        //get the store name - remove `.html` from the last part of the url
        $storeKey = str_replace('.html', '', $parts[2]);
        //TODO: add here additional check to see if $storeKey is valid (if an entity with your store name exists)
        //tell the request to map to your controller
        $request->setModuleName('retailer')
                ->setControllerName('stores')
                ->setActionName('index')
                ->setParam('id', '2');
        $request->setAlias(
            Mage_Core_Model_Url_Rewrite::REWRITE_REQUEST_PATH_ALIAS,
            $urlKey
        );
        return true;
    }
    return false;
}

}


texts: How can I view customer account actions?

texts:
I am trying to find a way that lets me see what customers have logged in from a set period time is that possible? I checked my advanced reporting but I always get a message that says "Some pieces of your data appear to be missing
".


texts: Can't install tamil package in magento 2.3.3

texts:
php bin/magento setup:static-content:deploy ta_IN package not listed in language so showing that error while we install new language included (lib/internal/Magento/Framework)

But there is no such folder

  /Magento/Framework

inside lib/internal

And there no custom packages available for tamil.

Is theres any custom packages to download ta_IN ? Thanks in advance.


texts: Getting error while creating table in magento1.9 via setup script

texts:
I am trying to create an entity model along with creating table in setup script

but i am getting following error while running my setup script:
setup script giving error:Can't retrieve entity config account/account

Below is my model part of config.xml

                Bank_Account_Model
                bank_account_resource

        <bank_account_resource>
            <class>Bank_Account_Model_Mysql4</class>
            <entities>
                <account>

customer_account

                </account>
            </entities>
        </bank_account_resource>
    </models>


texts: Cannot install Magento Magento-CE-2.0.5 on Cpanel due to always_populate_raw_post_data

texts:
I got this error during installation:

I tried to change that value to -1 in php.ini/.htaccess .. without any result .. I didnt restart apache even whole OS.

here is my phpinfo:

@ /home/cconcept/public_html/php.ini:

always_populate_raw_post_data = -1

Any hint how to fix it? it looks like a bug for me.


texts: Magento2.3.1 In multistore email template logo not showing diffrent store wise?

texts:
In Magneto 2.3.1 when I change in

Content -> Configuration -> Transactional Email -> Logo Image

After check, it only order email (like confirmation, invoice and shipment)there showing default luma theme logo, not update with uploaded logo but other email like.. contact and customer email there showing logo inside email  perfect. If any one idea related this issue please reply me

Thanks and appreciated for your reply.


texts:
magento get taxes in checkout page

/app/design/frontend/base/default/template/tax/checkout/tax.phtml

by using this code i got tax_amount(total tax 10%+21%) but i need all taxes individually  by tax percent 10%, 21%...
I have to display these taxes in checkout page

Mage::helper('checkout')->getQuote()->getShippingAddress()->getData('tax_amount');

So Any help will be much appreciated...


texts: How do I control the Store View context when programatically creating an Order?

texts:
I'm working on a module which imports orders from an external system; the code is working and orders are being created, but are appearing under the wrong Store View.

Our installation uses only a single Website, Group, and Store View: "Main Website > Main Website Store > Default Store View", and so I was surprised to see orders being imported under "Admin > Default > Admin", with an Order Number / Increment Id which doesn't align with our other orders.

How do I assign the Store View to an Order which is programatically created?

After reviewing and comparing several code samples, would it be as simple as initializing the sales/quote with:

Mage::getModel('sales/quote')
  ->setStoreId(Mage::app('default')->getStore('default')->getId());

The current code is simply:

Mage::getModel('sales/quote')

...would the effect of omitting setStoreId() be that the quote, order, and invoice are assigned to the "Admin" store view rather than the "Default Store View"?


texts: Why PayPal Pro OR PayFlow Gateway is Slow?

texts:
Part of the issue is that it does a two stage process... so, the first stage takes a couple of seconds when click place an order button... with the nice processing indicator spinner on the page, then indicator goes away, with nothing to indicate - the second stage takes another 5 seconds or more, with with another indicator processing, then finally the order will go through.

Issue is that I'm sure users are going to be impatient and assume that the page is no longer processing and they will refresh or nav away or even click the Place Order again.
is this by design? according to PayPal they claim Magento developers develop this extension. it seems like a critical part of the transaction why confuse users with two steps process.

Thoughts?


texts: Auto update cart quantity when change quantity

texts:
In the default cart of Magento, when the customer edit the quantity, he/she needs to press the button to update the quantity.

Is there a way that the cart update the quantity automatically when the user enter a other number in the quantity field?


texts: Get Parent SKU from ordered simple products

texts:
I want to show the review form to customer who bought the product. I get it solved with below mention code but it is not working for configurable product. How can I get parent associated product with this.
$cid = 0; if(Mage::getSingleton('customer/session')->isLoggedIn()) {
$customerData = Mage::getSingleton('customer/session')->getCustomer();
$cid = $customerData->getId();
}
$orderItems = Mage::getResourceModel('sales/order_item_collection')
->addFieldToFilter('sku', $this->getProductInfo()->getSku())
->toArray(array('order_id'));
$orderIds = array_unique(array_map(
function($orderItem) {
   return $orderItem['order_id'];
},
$orderItems['items']));
$orderCollection = Mage::getResourceModel('sales/order_collection')
->addFieldToFilter('entity_id',   array('in'  => $orderIds))
->addFieldToFilter('customer_id', array('eq' => $cid));
$orderCollection->getSelect()->group('customer_id');
$customerCollection = Mage::getModel('customer/customer')->getCollection()
->addFieldToFilter('entity_id', array('in' => $orderCollection->getColumnValues('customer_id')));
foreach ($customerCollection as $customer) {
}


texts: how to add discount on custom option by qty in magento 2

texts:
how to add discount on custom option by qty in Magento 2?
on add to cart
magento version 2.3.4


texts: Is it possible to have a link which leads to a quote / cart? I want to be able to give a link to somebody who will in return complete the checkout process for that quote / cart.


texts: Getting PHP Fatal error: Class 'IntlDateFormatter' not found

texts:
When I execute the phpunit cases for one of the model, I'm getting the error below,

PHP Fatal error:  Class 'IntlDateFormatter' not found in /Users/userone/Sites/Magento-CE/vendor/phpunit/phpunit-mock-objects/src/Generator.php on line 1113

This is throwing an error even intl module is installed and extension=php_intl.dll is enabled in php.ini file.

When using \Magento\Framework\Stdlib\DateTime\TimezoneInterface as constructor argument I'm getting this issue.

How can I fix this error? Thanks in advance...


texts: Magento 2 Ubuntu Xampp/Lampp php bin/magento setup:upgrade Show Warning

texts:
Magento 2 Ubuntu Xampp/Lampp setup:upgrade Show Warning

php bin/magento setup:upgrade

Warning  As:

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib
/php/20160303/php_intl.dll' - /usr/lib/php/20160303/php_intl.dll: cannot
open shared object file: No such file or directory in Unknown on line 0


texts: Custom_module data not getting in $fieldset->addType('mycustomfield'). Magento2

texts:
Hi I need to get my custom module form data in getElementHtml().
Here is my form code:

$fieldset->addType(
        'mycustomfield',
        'MY\CustomModule\Block\Adminhtml\CustomModule\Renderer\Image'
    );

    $fieldset->addField(
        'customdiv',
        'mycustomfield',
        [
            'name'  => 'customdiv',
            'label' => __('Custom Div'),
            'title' => __('Custom Div'),

        ]
    );

And below are my Image.php

<?php
namespace MY\CustomModule\Block\Adminhtml\CustomModule\Renderer;

use Magento\Backend\App\Action;

class Image extends \Magento\Framework\Data\Form\Element\AbstractElement
{

public function getElementHtml()
{

    $id = $this->getRequest()->getParam('custommodule_id');
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();

    $model = $objectManager->create('MY\CustomModule\Model\CustomModule');
    $model->load($id);

    return $model;
}
}

Did not get ID here. Even not able to create Objectmanage.
If I return just normal string it's only working like.

return 'Test';

It's working but not getting any data.
Can anyone see to get custom_module ID.

If I return $id OR $model then I get below error:

Item Information Changes have been made to this section that have not been saved. This tab contains invalid data. Please resolve this before saving.


texts: Bundle product to look as Single product

texts:
We were looking for a solution for ages and we are really desperate now.

We want to sell few products as a one. For example, we are selling the camera at a fixed price and we want to add for free the SD Card, Tripod and batteries. All these additional items are single products and need to be included on the packing slips and invoices with SKUs for inventory and warranty purposes.

We have tried BUNDLE product but there is no option to remove completely customization options from the product page and it is impossible to add this product to the cart from products list page directly by clicking on ADD TO CART button.

The perfect solution for us would be to have the option to list and configure like a bundle product but to look and behave from the frontend exactly as a SIMPLE product but when added to the cart will add few instead of just one product same time.

We also selling those kits on eBay and Amazon (as a simple product) and we need M2E PRO to be able to create orders in the same way (all products listed separately)

Will appreciate any suggestions on how we can achieve this or at least something similar. Are there any extensions or modules can do this? We are also interested in a paid solutions.

How are others selling items with free add-ons?

Thank you


texts: How to send email to customer in custom form in existing module?

texts: I want send email to customer. i create form on product view page. when clicking on image the form is open in dialogue box. i want send the mail to customer after form submission. please help


texts: Magento - hide Not Visible Individually Configurable Products in Admin Manage Products List

texts:
When you are in admin in Magento and you go to Catalog > Manage Products there is the list of products on the store. A product that has say 6 options using attribute will display 7 of the same product in the Manage Products listing (1 will have visibility of Catalog, Search) and the other 6 will have visibility of "Not Visible Individually" and these are each the options for the main product).

My question is how can we like hide the products with the 6 options from the Manage Products list so the list doesnt look so crowded. Is there a module somewhere which hides them all in the main product and when you click the main product, then you can see the other 6 products? Just to tidy up the list?


texts: Magento2 rest api get customer details and cart details as a admin authorization

texts: Magento2 rest api. If i am login as a admin user how can i get details of customer and it's cart items (items kept in cart for order later).


texts:
I can see magento 1 uses "POST" request for Logout,
It's not right, for CSRF and other reasons.
How to find why logout action uses POST Request in Magento 1 ?


texts: How to Report Downloadable products? (Music store)

texts:
I'm not sure whats the best way to achieve this, I'm developing a music store which will have a catalog of number of independent record labels releases. Typically an album(downloadable product) will belong to an artist, an artist will release under a record label. My first question is what do I use to represent that hierarchy, Categories or Attributes or other? Which is also report friendly .

The report will be per record label and should contain sales figures per artist and album.

Question two: Is it possible/recommended to use external tools like Jasper Reports and how?


texts: Exclude specific Category from Layered Navigation - Magento 2

texts:
we are using custom theme and Magento ver. 2.3.3 version
Exclude specific Category from Layered Navigation:
please help me to find solution....
thanks in advance.


texts: Filter common products from two or more categories

texts: I need to merge two or more categories products and filter the common products from the collection.


texts: I want to getAddtional infomation from quote payment by order id.


texts: Trackingpixel Magento 2 Succedd page, GrandTotal is 0.00

texts:
Just implemented tracking pixel for our affiliate program, but Grand_total is reportes as 0.00 every time.

Anyone can give mee a helping hand on this?

My success.phtml contains:

icon

<?php echo __('Thank you!') ?>

<?php if ($block->getOrderId()):?>
    <?php if ($block->getCanViewOrder()) :?>

<?php echo __('Your order number is: %1.', sprintf('%s', $block->escapeHtml($block->getViewOrderUrl()), $block->escapeHtml($block->getOrderId()))) ?>

    <?php  else :?>

<?php echo __('Your order # is: %1.', $block->escapeHtml($block->getOrderId())) ?>

    <?php endif;?>

<?php /* @escapeNotVerified */ echo __('We\'ll email you an order confirmation with details and tracking info.') ?>

<?php endif;?>

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

    <a class="action primary continue" href="<?php /* @escapeNotVerified */ echo $block->getUrl() ?>"><?php /* @escapeNotVerified */ echo __('Continue Shopping') ?>


texts: What is best practice for a sceduled product import from csv files?

texts:
It would run every night and read a local csv file (an export from the ERP). It should have the following features:

Two languages/storeviews
Update attributes, product names, images, categories, tire prices, stock
Delete products that are not in the csv any more
Manage categories (create, update, delete)
Manage attribute options (create, update, delete)
Capable to update >5000 products in a reasonable time (at least before sunrise, better in less than an hour)

Three years ago I ended up writing a handcrafted script that keeps track of all current values, does some direct db-updates, loads/saves the complete product where necessary and has its own logic for category and attribute option management.

Is there a better way today? Maybe using Magmi, the (since then enhanced) Magento Dataflow, or just by using different models in a still handcrafted script (like Mage::getSingleton('catalog/product_action')->updateAttributes(...); which would help with the attributes but not with names, images, tire prices etc.)


texts:
On the main page of the site, there is a module of the goods slider. The module uses the query:

$list = $this->_getProducts();

Because of what the page is loaded 5 - 6 seconds. Is there any way to optimize this query?


texts: Magento 2. Indexers sometimes switch(on their own) to Update On Save when configured on Update On Schedule

texts:
My issue is simple enough. It reproduced on 2 separated projects.
I have all indexers set on Update on Schedule. Without anyone changing them, I just wake up with them configured with Update On Save.
Any thoughts on the matter/possible issues are highly appreciated.


texts: magento 1.9 cash on delivery add Rs.50 fee without any extension

texts: I want to add all Cash On Delivery fee Rs.50 without use any extension.


texts:
I am trying to get CMS page identifier with Mage::getSingleton('cms/page')->getIdentifier(); in a footer.phtml but for some reason I am getting no-route on all the pages.

It used to work before but not anymore. My Magento version is 1.9.3.8. Am I missing something here?

I want to get the home page Identifier so I can use if/else statements to show a different message in homepage footer.

Update: I have tried both the solutions provided by @pawan below, apparently they did not work.


texts: Magento 2 Admin Ui Component Edit Form Validation based on Dropdown selection

texts:
I am trying to give required field validation on textbox which is depend on dropdown selected value.

Dropdown have 2 values 1. Yes 2.No.

If dropdown selected value is Yes than textbox is mandatory else not.

This thing i want in Admin grid edit form in magento 2.

Any help will appreciated.

Thanks in advance


texts:
I've created magento2 custom theme and I can see it in Content->Themes.

But as I'm going to stores->configuration->general->design, I am not finding my theme.

Could any one suggest what should I do ?


texts: Magento 1.9 Support stop will affect the current site. Did authorize.net also stop support?

texts: I planning to upgrade the Magento 1.9 to Magento 2.3 in mid of June. meanwhile, what is an issue that occurred on Magento 1.9? Also, authorize.net will stop accept the payment in Magento 1.9. What happens if I could not find the theme after upgrade the Magento.


texts: Is it absolutely REQUIRED that you install grunt globally for it to work out of the box with Magento 2?

texts:
Documentation at https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/tools/using_grunt.html states to install grunt using the -g (global) command, which requires elevated privileges. Unfortunately many shared hosting systems out there exist which cannot allow installing binaries globally.

It appears that this may be required if you want to use grunt - and thus be able to output source map files, giving one the ability to develop a Magento 2 frontend with some semblance of efficiency.

OK, so what if you can't install it globally? I installed npm directly to the magento root folder along with grunt-cli and lessc. I run grunt by referencing its full path name: "~/public_html/node_modules/grunt-cli/bin/grunt". With a properly configured themes.js (or custom-themes.js and a modified grunt-config.json that points to it), attempting to run the exec task against the blank theme results in an error:

[public_html]$ ./node_modules/grunt-cli/bin/grunt exec:blank
Running "exec:blank" (exec) task
>> /bin/sh: grunt: command not found
>> Exited with code: 127.
>> Error executing child process: Error: Process exited with code 127.
Warning: Task "exec:blank" failed. Use --force to continue.

Aborted due to warnings.

Execution Time (2020-05-12 22:13:15 UTC-0)
loading tasks       87ms
▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 78%
loading grunt-exec   2ms  ▇▇ 2%
exec:blank          23ms  ▇▇▇▇▇▇▇▇▇▇▇▇▇ 21%
Total 112ms

I presume that some additional modification within the myriad of .js files in the /dev/tools/grunt folder is required. Anyone have any knowledge about this? Trying to search through .less files for css classes is extremely cumbersome.


texts: customer registartion success mail change via admin panel

texts:
1:i want to change images and text in registration successful mail where can i find it . i see admin > system > transactional mail but there are no such mails.

i could not find where to change it also


texts: After Upgrade to Magento 2.1.18 Captcha does not work on registrations page

texts:
I've just upgraded our site to Magento 2.1.18 and Captcha no longer works on the customer registration page.

Is anyone else aware of this issue?

There are no errors in the logs or browser console, it just doesn't appear anymore.

I have noticed since upgrading that the admin panel options have changed, I've tried saving them again, but without success.

Admin Options BEFORE Upgrade

Admin Options AFTER Upgrade

I have also noticed that now captcha assets are being loadedd twice in the head of the document.

<script type="text/javascript" async="" src="https://www.gstatic.com/recaptcha/api2/v1560753160450/recaptcha__en_gb.js"></script>
<script type="text/javascript" async="" src="https://www.gstatic.com/recaptcha/api2/v1560753160450/recaptcha__en_gb.js"></script>
<script async="" src="https://www.google.com/recaptcha/api.js?onload=globalOnRecaptchaOnLoadCallback&amp;render=explicit"></script>
<script async="" src="https://www.google.com/recaptcha/api.js?onload=globalOnRecaptchaOnLoadCallback&amp;render=explicit"></script><script>

Whereas before it was only loading once

<script type="text/javascript" async="" src="https://www.gstatic.com/recaptcha/api2/v1560753160450/recaptcha__en_gb.js"></script>
<script async="" src="//www.google-analytics.com/analytics.js"></script><script>


texts: Magento 2.3 - Customer Firstname in Email

texts:
How can we load the customer first name in transactional emails in Magento 2.3?

We tried this, but that does not work;

{{trans "%name," name=$order.getBillingAddress().getFirstName()}}


texts:
I need to update quantity of cart items without reloading whole page(using ajax) but with simple code not a lengthy method.
anybody please help me out.


texts: Update cart quote items quantity in magento 2

texts:
I used below controller but cart's product quantity is not updated, didn't understand why this is happening.

<?php

namespace Ves\Productlist\Controller\Cart;
use Magento\Quote\Model\QuoteRepository;
class CartUpdate extends \Magento\Framework\App\Action\Action
{
    protected $quoteRepository;

    public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Magento\Quote\Api\CartRepositoryInterface $quoteRepository
    ) {
        $this->quoteRepository = $quoteRepository;
        parent::__construct($context);
    }

    public function execute()
    {
        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $cart = $objectManager->get('\Magento\Checkout\Model\Cart');
        echo $cartId=$cart->getQuote()->getId();

        $itemId = 499;
        $itemQty = 1;

        $quote = $this->quoteRepository->getActive($cartId);
        $cartitems = $quote->getItemById($itemId);
        if (!$cartitems) {
        echo 'cart items not found';die;
        }
        $cartitems->setquoteId($cartId);
        $cartitems->setitemId($itemId);
        $cartitems->setQty($itemQty);

        $quoteItems[] = $cartitems;
        $quote->setItems($quoteItems);
        $this->quoteRepository->save($quote);
        $quote->collectTotals();
        die;
    }
}
?>


texts: Magento 2.3 - Access customer section from admin panel getting 500 (Internal Server Error)

texts:
Error while access customer information backend and return 500 error,
Exception #0 (Magento\Framework\Exception\LocalizedException): The "formElement" configuration parameter is required for the "saved_tokens_json" field.
Log error :
[2020-08-08 14:36:40] main.ERROR: The "formElement" configuration parameter is required for the "saved_tokens_json" field. [] []
[2020-08-08 14:36:41] main.INFO: Broken reference: the 'catalog.compare.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2020-08-08 14:36:41] main.INFO: Broken reference: the 'sale.reorder.sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2020-08-08 14:36:41] main.INFO: Broken reference: the 'wishlist_sidebar' element cannot be added as child to 'sidebar.additional', because the latter doesn't exist [] []
[2020-08-08 14:36:41] main.INFO: Broken reference: the 'authorization-link-login' tries to reorder itself towards 'register-link', but their parents are different: 'header.links' and 'top.links' respectively. [] []
[2020-08-08 14:36:41] main.INFO: Broken reference: the 'footer.custom.block' tries to reorder itself towards 'copyright', but their parents are different: 'footer.content.bottom' and 'footer' respectively. [] []
[2020-08-08 14:36:41] main.INFO: Broken reference: the 'store_language' tries to reorder itself towards 'store_switcher', but their parents are different: 'header.panel.right' and 'header.panel.store' respectively. [] []
[2020-08-08 14:37:04] main.INFO: Consumer "async.operations.all" skipped as required connection "amqp" is not configured. Unknown connection name amqp [] []


texts: Filtering grid by using filter_url_params is not working

texts:
I added a grid to a ui_component form and I want to use an Url-parameter to filter the content of the grid. Herefore I added the 'filter_url_params' in my listing:

    <dataSource name="mcas_covertemplate_graphicelement_listing_data_source">
    <argument name="dataProvider" xsi:type="configurableObject">
        <argument name="class" xsi:type="string">Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider</argument>
        <argument name="name" xsi:type="string">mcas_covertemplate_graphicelement_listing_data_source</argument>
        <argument name="primaryFieldName" xsi:type="string">graphicelement_id</argument>
        <argument name="requestFieldName" xsi:type="string">id</argument>
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
                <item name="update_url" xsi:type="url" path="mui/index/render"/>
                <item name="filter_url_params" xsi:type="array">
                    <item name="cover_id" xsi:type="string">*</item>
                </item>
                <item name="storageConfig" xsi:type="array">
                    <item name="indexField" xsi:type="string">graphicelement_id</item>
                </item>
            </item>
        </argument>
    </argument>
</dataSource>

The cover_id is visible in my Url, but it is not used to set the filter.
If I set a value for the cover_id manually it works.

What I am doing wrong?


texts: How to create a custom tab in My account section and display recently added products when clicked?

texts:
I added a new tab in my account section, when I clicked on that tab I want to display recently added products. How will I be able to do it?

I added a new tab by adding some code in customer.xml

<customer_account>
        <reference name="customer_account_navigation">
            <action method="addLink">
                <name>offer_product</name>
                <path>user/index/index</path>
                <label>My Offer Product</label>
            </action>
        </reference>
    </customer_account>

When I click on my offer product, I want to display recently added products along with all the tabs(i.e My Account must also get displayed) as given below:

The given below code is my indexcontroller:

<?php
class Test_User_IndexController extends Mage_Core_Controller_Front_Action
{
 public function indexAction()
    {
        $this->loadLayout();
        $this->_initLayoutMessages('customer/session');
        $this->_initLayoutMessages('catalog/session');
        $this->getLayout()->getBlock('content')->append(
            $this->getLayout()->createBlock('customer/account_dashboard')
        );
        $this->getLayout()->getBlock('head')->setTitle($this->__('My Account'));
        $this->renderLayout();
    }
}
?>


texts: Magento default paypal module does not send invoice email - will this behaviour stay?

texts:
The default paypal module does not send the invoice email:

    // notify customer
    $invoice = $payment->getCreatedInvoice();
    if ($invoice && !$this->_order->getEmailSent()) {
        $this->_order->sendNewOrderEmail()->addStatusHistoryComment(
            Mage::helper('paypal')->__('Notified customer about invoice #%s.', $invoice->getIncrementId())
        )
        ->setIsCustomerNotified(true)
        ->save();
    }

it just calls sendNewOrderEmail() which does not send anything because the NewOrder email has already been send. Is this a wanted behaviour or will it be changed?

My shop needs this behaviour because i have a eventlistener which sends the invoice mail after creating shipping.


texts:
currently i have a bug(?) in Magento CE1.9.4.0 - where i just upgraded from 1.9.3.4.

My problem is that the indexer is not able to lock files.

I created a simple php file to reproduce the error:

require_once 'app/Mage.php';
umask(0);
Mage::app('');

$indexProcess = Mage::getModel('index/process');
$indexProcess->setId('something');
$indexProcess->lockAndBlock();

if ($indexProcess->isLocked()) {
  var_dump('locked');
} else {
  var_dump('something went wrong');
}

The output is everytime: something went wrong

To verify that this is not a problem with the upgraded version i tried to run the same code on a freshly installed magento 1.9.4.0 -> same error, it even did not work out to move the code to a different server. Also i tried to run the Code in different Versions of PHP(5.6 & 7.2).

Did someone else had the same error and maybe a solution?

Ah and of course i checked the file permission in the var/locks path

Thanks in advance!


texts: SOAP API: Not able to pull cod_fee column {Magento 1.9}

texts:
I am trying to pull cod_fee column value from sales_flat_invoice or sales_flat_order table from SOAP API.

$proxy = new SoapClient('https://www.mysoresareeudyog.com/api/v2_soap/?wsdl'); // TODO : change url
$sessionId = $proxy->login('api-user', 'api-key'); // TODO : change login and pwd if necessary

$result = $proxy->salesOrderInfo($sessionId, 'ORDL000000012124');
echo "<pre>";
var_dump($result);

However, the above code is not fetching the table column cod_fee. I have gone through many articles. Still I am not able to resolve this. This is the 1st time I am working on API.

  Edited

wsdl.xml file (included in -> salesOrderEntity)

<element name="base_cod_fee" type="xsd:string" minOccurs="0" />

wsi.xml file (included in -> salesOrderEntity)

<xsd:element name="base_cod_fee" type="xsd:string" minOccurs="0" />

Api.php file

public function info($orderIncrementId)
{
    $order = $this->_initOrder($orderIncrementId);

    if ($order->getGiftMessageId() > 0) {
        $order->setGiftMessage(
            Mage::getSingleton('giftmessage/message')->load($order->getGiftMessageId())->getMessage()
        );
    }

    $result = $this->_getAttributes($order, 'order');

    $result['shipping_address'] = $this->_getAttributes($order->getShippingAddress(), 'order_address');
    $result['billing_address']  = $this->_getAttributes($order->getBillingAddress(), 'order_address');
    $result['base_cod_fee']  = $this->_getAttributes($order->getBaseCodFee(), 'base_cod_fee');
    $result['items'] = array();

    foreach ($order->getAllItems() as $item) {
        if ($item->getGiftMessageId() > 0) {
            $item->setGiftMessage(
                Mage::getSingleton('giftmessage/message')->load($item->getGiftMessageId())->getMessage()
            );
        }

        $result['items'][] = $this->_getAttributes($item, 'order_item');
    }

    $result['payment'] = $this->_getAttributes($order->getPayment(), 'order_payment');

    $result['status_history'] = array();

    foreach ($order->getAllStatusHistory() as $history) {
        $result['status_history'][] = $this->_getAttributes($history, 'order_status_history');
    }

    return $result;
}


texts: How get collection of entities from eav_entity by custom type?

texts:
I created custom eav type:

/* @var $installer Mage_Eav_Model_Entity_Setup */
$installer = $this;

$installer->startSetup();

$installer->addEntityType('av_photo_type', array(
    'entity_model' => 'av_photo/eav_photo'
));

$installer->addAttribute('av_photo_type', 'name', array(
    'label'        => 'Type Name'
));

$installer->addAttribute('av_photo_type', 'code', array(
    'label'         => 'Unique Code',
    'unique'        => 1,
    'note'          => 'For internal using'
));

$installer->addAttribute('av_photo_type', 'order', array(
    'label'         => 'Order'
));

$installer->addAttribute('av_photo_type', 'active', array(
    'label'         => 'Active',
    'type'          => 'int',
    'input'          => 'boolean',
));

I've created file /model/eav/Photo.php:

class Company_Photo_Model_Eav_Photo extends Mage_Eav_Model_Entity
{
    public function __construct()
    {
        $resource = Mage::getSingleton('core/resource');
        $this->setType('av_photo_type')->setConnection(
            $resource->getConnection('sales_read'),
            $resource->getConnection('sales_write')
        );
    }
}

I would like to get collection by type "av_photo_type" now. I should create resource file to get collection but I haven't custom tables. Magento eav module hasn't resource model for eav_entity table. How to get eav_entity collection then?


texts: Magento 2 required attribute in custom payment option not working

texts:
I have a custom payment module with select options.

I try to add 'required' to the option but it failed.

I add 'data-mage-init' in  tag and data-validate attribute in  tag.

Should I add anything on js file?

Thanks!

<fieldset data-bind="attr: {class: 'fieldset payment items ' + getCode(), id: 'payment_form_' + getCode()}" data-mage-init='{"validation": []}'>

            <select  name="payment[bankid]"
                     class="select select-bank"
                     data-bind="attr: {id: getCode() + '_bankid', 'data-container': getCode() + '-bankId'},
                                enable: true,
                                options: getBankNames(),
                                optionsValue: 'value',
                                optionsText: 'text',
                                optionsCaption: $t('InstallmentBank'),
                                value: bankId"
                     data-validate="{required:true}">
            </select>

            <select name="payment[period]"
                    class="select select-period"
                    data-bind="attr: {id: getCode() + '_period', 'data-container': getCode() + '-period'},
                               enable: true,
                               options: getBankPeriods(),
                               optionsValue: 'value',
                               optionsText: 'text',
                               optionsCaption: $t('InstallmentPeriod'),
                               value: period"
                    data-validate="{required:true}">
            </select>

</fieldset>

I included the following file in my js file.

define(
    [
        'underscore',
        'jquery',
        'Magento_Checkout/js/view/payment/default',
        'mage/url',
        'Magento_Customer/js/customer-data',
        'Magento_Checkout/js/model/error-processor',
        'Magento_Checkout/js/model/full-screen-loader',
        '{custom}/js/{custom}/form-builder'
    ],
    function (_, $, Component, url, customerData, errorProcessor, fullScreenLoader, formBuilder) {
        'use strict';
....


texts: How to add depended form field in magento admin

texts:
I am not so familiar with magento so i am facing some trouble
I am creating a form in magento admin & trying to add depended form field
eg- parent field is dropdown type & name is amount_type options are flat_option & percentage_option

child field are text type having name flat_value & percentage_value

So my requirment flat_value & percentage_value are hidden at first after that if i select flat_option in amount_type then show flat_value & in select percentage_option then show percentage_option.

my tried code is

$fieldset->addField('amount_type', 'select', array(
            'name' => 'amount_type',
            'label' => Mage::helper('adminhtml')->__('Amount Type'),
            'title' => Mage::helper('adminhtml')->__('Amount Type'),
            'class' => '',
            'required' => true,
            'value'     => '1',
    'values'    => array('-1'=>'Please Select','1' => 'flat_option', '2' => 'percentage_option'),
                )
        );

$fieldset->addField('flat_value', 'text', array(
            'name' => 'flat_value',
            'label' => Mage::helper('adminhtml')->__('flat amount'),
            'title' => Mage::helper('adminhtml')->__('flat amount'),
            'class' => 'validate-number',
            'required' => true,
                )
        );

$fieldset->addField('percentage_value', 'text', array(
            'name' => 'percentage_value',
            'label' => Mage::helper('adminhtml')->__('Percentage amount'),
            'title' => Mage::helper('adminhtml')->__('Percentage amount'),
            'class' => 'validate-number validate-digits-range digits-range-0-100',
            'required' => true,
                )
        );

$this->setChild('form_after', $this->getLayout()
    ->createBlock('adminhtml/widget_form_element_dependence')
        ->addFieldMap('amount_type', 'amount_type')
        ->addFieldMap('flat_value', 'flat_value)
        ->addFieldDependence('flat_value', 'amount_type', 1)
);

$this->setChild('form_after', $this->getLayout()
    ->createBlock('adminhtml/widget_form_element_dependence')
        ->addFieldMap('amount_type', 'amount_type')
        ->addFieldMap('percentage_value', 'percentage_value')
        ->addFieldDependence('percentage_value', 'amount_type', 2)
);

Tanks in advance for help


texts: What is the different between magento 2.2 and 2.3?

texts: Can anyone tell me about what is the difference between the magento 2.2 and magento 2.3 . I want to learn magento 2.3. Is it ok for starting with 2.3 as a beginner.