texts: Magento 2 - Import contacts emails .csv to newsletter suscribers

texts:
I have .csv in which have lot of email is exit, it want to assign those email to newsletter suscribers.

I have this

<?php
use Magento\Framework\App\Bootstrap;
require __DIR__ . '/app/bootstrap.php';
$store_id = 1;
$csv_filepath = "subscribers.csv";
$csv_delimiter = ',';
$csv_enclosure = '"';
$magento_path = __DIR__;

$params = $_SERVER;

$bootstrap = Bootstrap::create(BP, $params);

$obj = $bootstrap->getObjectManager();

$state = $obj->get('Magento\Framework\App\State');
$state->setAreaCode('frontend');

$row = 1;
if (($handle = fopen("subscribers.csv", "r")) !== FALSE) {
  while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
    $num = count($data);
    echo "
 $num fields in line $row:

\n";
    $row++;
    for ($c=0; $c < $num; $c++) {
        $status = $obj->get('Magento\Newsletter\Model\Subscriber')->subscribe($data[$c]);
        echo $data[$c] . "
\n";
    }
  }
  fclose($handle);
}
?>

It's work, but the problem is only import the first contact.

Help appreciated.


texts: How to clear the cache by Magento Web Service

texts:
I wonder if you have any way to clear caches Magento Web Service.
If not there how do I clear the cache programmatically ?

I need it just for the reason to be developing an application that integrates with Magento Management System, and has some processes that demands he be clean caches.


texts: Missing categories in Manage Articles, Frontend and Manage Categories fine

texts:
I've been banging my head over this a few hours yesterday and seem not get to an solution to this problem.

I imported over 600 products and about 120 categories and other data using the Magento OScommerce Migration Tool, so far all went fine. When I call "Catalog" -> "Manage Categories" in the backend all categories with its subcategories are complete present. Also in the frontend everything is fine so far.

When I go to "Catalog" -> "Manage Articles" to assign a product to a category (using the category tree), I just see about 60% of all categories, 40% just do not show up.
When I create a new category it does not show up in the "Manage articles" category tree.

All categories are set to "active" and are "anchored", set to be included in the navigation menu, Root category is assigned properly to the store (I guess otherwise I wouldn't see any category at all).

Basically I checked everything that is described on this page:
http://www.alittleofboth.com/2013/08/categories-in-magento-store-will-not-display/

I an other post on the Magentocommerce-Board I found an thread where one says, the problem could possibly be missing "url keys" of category entries. But most (not all) of my categories have an url key and even a few of those not showing in the "Manage Articles" have an url key. I tried moving an category to another position and moving it back to the old position just to get that url key set up. But it does not help at all. Stil not showing up in the articles category assignment tree.

I have no idea how to get this issue fixed, in the database or even programmatically. It is confusing to me that in the frontend as well as in the "Manage categories" all entries and levels are complete but not within the "Manage Articles" category tree.

I am using Magento 1.7.0.2.

Any help or hints is greatly appreciated. Thanks for your time in advance!


texts: Magento 2: what are the benefits of using UI grid components over the standard Grid.php?

texts:
So Magento 2 introduced the UI Components.

One of them is the UI Component Grid (you can find more information about it here: Explanation of UI Component Grid in Magento 2)

When creating a custom module, I sticked to the old Magento 1 method, I've created a Grid.php file that handles my adminhtml grid.

I'm wondering what are the benefits of using the UI components grid instead of the Grid.php method ?


texts: Multiple themes in Magento 2.2 that extend off of each other?

texts:
I've created a theme at:

app/design/frontend/<vendor>/default

That I call my "default" theme with some base styles, that inherit from Magento Blank as it's parent. Default just has universal styles that all of my other themes will use.

In the default theme, I'm using:

app/design/frontend/<vendor>/default/web/css/source/_extend.less

An _extend.less file to extend from the parent Magento Blank theme.

Now, I also have different stores in Magento, so building off of the default theme, I have:

app/design/frontend/<vendor>/shop1

app/design/frontend/<vendor>/shop2

And I'm seeing that if I put in an _extend.less into

app/design/frontend/<vendor>/shop1/web/css/source/_extend.less

That doesn't appear to be working. The shop1 theme is using default as it's parent, and is correctly inheriting the styles of default. However, shop1 is not being extended by any customizations that I'm placing into it's _extend.less file. Am I doing something wrong here?

Thank you.


texts: Issue How to track each size of product inventory

texts:
I have a question.

Please let me know how I can do this? We cannot count inventory for variations, like XL, XM, M, L etc.. etc..

For example, take a look at this product, it has different size "select size" A0 A4, and A5. These are all different sizes. How do we keep track of the inventory of this "A0, A4, A5" etc..-->

Please have a look on the link of site, Where you can see product having different sizes so I want to track each size of inventory .. http://162.144.88.25/~sjjif/breakpointfc/index.php/break-point-ultra-light-standard-blue-pants.html I want to know this only?

Tracking: I want tracking like if I have 10 - A0 size of product define somewhere in admin like we define inventory for simple product and customer purchased 2 product of A0 size and inventory will auto decrease after successfully make payment ..

yes .. Right now the size drop down that you are seen on the product page is created from custom options of each product.

So you mean I need to create the configurable products like define on the following link http://www.magentocommerce.com/knowledge-base/entry/tutorial-creating-a-configurable-product

After creating all configurable products I can track each size of product. Right?


texts:
I have 2 modules using the OrderController.php

One of them overrides deleteorderAction and the other one overrides addCommentAction

Only the deleteorderAction is rewrited but the addCommentAction doesnt work anymore

In the config.xml from ModuleB I have:

<?xml version="1.0"?>
<config>
<modules>
    <ModuleB_AdminhtmlControllers>
        <version>1.0.0</version>
    </ModuleB_AdminhtmlControllers>
</modules>

<admin>
    <routers>
        <adminhtml>
            <use>admin</use>
            <args>
                <modules>
                    <ModuleB_AdminhtmlControllers before="EM_DeleteOrder">ModuleB_AdminhtmlControllers</ModuleB_AdminhtmlControllers>
                </modules>
            </args>
        </adminhtml>
    </routers>
</admin>
</config>

The config.xml from EM_DeleteOrder:

<?xml version="1.0"?>
<config>
<modules>
    <EM_DeleteOrder>
        <version>1.0.0</version>
    </EM_DeleteOrder>
</modules>
<global>
    <rewrite>
    <em_emadmin_adminhtml_sales_order>
        <from><![CDATA[#/admin/sales_order/#]]></from>
        <to>/emadmin/adminhtml_sales_order/</to>
    </em_emadmin_adminhtml_sales_order>
    </rewrite>

    <blocks>
        <adminhtml>
            <rewrite>
                <sales_order_grid>EM_DeleteOrder_Block_Adminhtml_Sales_Order_Grid</sales_order_grid>
            </rewrite>
        </adminhtml>
    </blocks>
</global>
<admin>
    <routers>
        <em_deleteorder>
            <use>admin</use>
            <args>
                <module>EM_DeleteOrder</module>
                <frontName>emadmin</frontName>
            </args>
        </em_deleteorder>
        <adminhtml>
            <args>
              <modules>
                <EM_DeleteOrder_Adminhtml before="Mage_Adminhtml">EM_DeleteOrder_Adminhtml</EM_DeleteOrder_Adminhtml>
              </modules>
            </args>
        </adminhtml>
    </routers>
</admin>
</config>


texts: Magento 2 - can't register custom module

texts:
I created a module.xml under the app/code/my/module/etc folder.

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

Than I tried to enable the module with following command

php -f bin/magento module:enable --clear-static-content my_module

And get this error:

  Unknown module(s): 'my_module'

Why don't Magento find the module?

Here is the error after executing the flush command:

  [InvalidArgumentException]
  There are no commands defined in the "cache" namespace.

Now here is the error:

Additionally to the xml syntax in the module.xml I added comments. These comments caused the error.


texts: Specifying order for "Special" products widget in the homepage

texts:
I have an installation of Magento 1.9, where I have set a widget as "Catalog Sale Prduct List". This can be just done on:

CMS->Widgets->Add New Widget Instance

And then, assigning the type Catalog Sale Prduct List o the new widget.

Now, I need then to come in an specific order, and can not see what  Magento is using to sot them. I can tell that if I modify them the products in the admin, the order of the display of this list changes, in a kind of "random" order.

Does someone know how they are actually ordered? I can not see any option in the admin to affect that.

Or, does someone know where is the query that fetch this, so I could just sort it there?

Any other suggestion?

Thanks a lot!


texts: Magento 2 searchCriteria using REST APIs

texts:
I have the following query:

  $url =
  http://kostakfashion.com/rest/V1/products/?searchCriteria[filter_groups][0][filters][0][field]=category_gear&searchCriteria[filter_groups][0][filters][0][value]=10&searchCriteria[filter_groups][0][filters][0][condition_type]=finset;

Without searchCriteria it works well. But if i add searchCriteria , I have an error

  string(31) "{"message":"Invalid signature"}"

I use OAuth authentication . How could i fix it any idea ?


texts: Magento 2 - Increase customer session timeout for inactivity

texts: Customer gets logged out after 30 mins of inactivity. I want to increase it to 1 hour. Any idea how to that?


texts: Update Inventory and prices in Magento using a CSV

texts:
We would like to update inventory quantities and prices in our Magento store from our ERP system.

We can generate CSV file in our ERP to be imported into Magento.

We need CSV file format layout.

Has anyone tried this before?


texts: Override Page.php to change loader-2.gif

texts:
In Page.php, the loaderIcon is assigned to loader-2.gif. I'd like to reassign this image to my own image, however that involves changing this file.

Is there an easy way to either override this attribute specifically, or maybe override the function in question, or even override the entire file?

The function from Page.php:

// 'magento/vendor/magento/framework/View/Result/Page.php'

/**
 * @param ResponseInterface $response
 * @return $this
 */
protected function render(ResponseInterface $response)
{
    $this->pageConfig->publicBuild();
    if ($this->getPageLayout()) {
        $config = $this->getConfig();
        $this->addDefaultBodyClasses();
        $addBlock = $this->getLayout()->getBlock('head.additional'); // todo
        $requireJs = $this->getLayout()->getBlock('require.js');
        $this->assign([
            'requireJs' => $requireJs ? $requireJs->toHtml() : null,
            'headContent' => $this->pageConfigRenderer->renderHeadContent(),
            'headAdditional' => $addBlock ? $addBlock->toHtml() : null,
            'htmlAttributes' => $this->pageConfigRenderer->renderElementAttributes($config::ELEMENT_TYPE_HTML),
            'headAttributes' => $this->pageConfigRenderer->renderElementAttributes($config::ELEMENT_TYPE_HEAD),
            'bodyAttributes' => $this->pageConfigRenderer->renderElementAttributes($config::ELEMENT_TYPE_BODY),
            'loaderIcon' => $this->getViewFileUrl('images/loader-2.gif'),
        ]);

        $output = $this->getLayout()->getOutput();
        $this->assign('layoutContent', $output);
        $output = $this->renderPage();
        $this->translateInline->processResponseBody($output);
        $response->appendBody($output);
    } else {
        parent::render($response);
    }
    return $this;
}

I'd like to make the following change:

'loaderIcon' => $this->getViewFileUrl('images/icons/loading.svg'),

We're also considering a url rewrite or generating an animated gif out of our svg, in the worst case.

Thanks in advance!

Best
Michael


texts: Magento 1.9 - Dashboard Last 5 Orders missing Guest Name

texts:
Since the upgrade from Magento 1.7 to 1.9, we are not seeing Guest Name under the Last 5 Orders in the Admin Dashboard.   I've read that this is because the name is now stored as a whitespace instead of NULL.

I need a way to fix this as I do not know where this record is written at.   I'd prefer a way that will not break if we upgrade again.


texts: Magento 2 Check If Customer is Subscribed to Newsletter

texts:
I am developing this custom xml export/import. In magento 2 how can I check if a customer is subscribed to newsletter? Right now I am loading the customer factory.

\Magento\Framework\App\ObjectManager::getInstance()->create('Magento\Customer\Model\Customer');

But this does not give information about newsletter is there another model I have to load?


texts: how to write php script for saving admin configurations in magento 2

texts:
I want to write a script that saves the admin configuration every time when I deploy/upgrade.

For example, I need to have a PHP script for saving this admin configuration.

 Admin panel-> Stores-> Configuration-> Catalog-> Inventory-> Display out of stock products -> YES

Can anyone tell me how to do this?
Thanks in advance.


texts: Magento 2.2.2 : Move Category Navigation Section

texts:
How to move category navigation section after home page banner in magento 2.2
 class="sections nav-sections"

and my current site link in magento 2.2 and link and screen short please check

solivr.mobilegiz.com

please check magento 1.9 site link and screen short

www.solivr.fr

please advance help for thanks.


texts: create an invocie number manually from admin

texts:
After we got an order, in admin panel, we can get an invoice PDF and the invoice PDF consists of invoice number that will come automatically.
but we want to give a manual invoice number in invoice PDF.
means admin has to enter the invoice number and that number should display in invoice PDF.

Please help me to find a solution


texts: How can I disable a field in admin customer edit but enable when create new?

texts:
I'm having a enabled field in admin/customer/index/new but when forward to admin/customer/index/edit/id/{id}, I'd like to have it disabled.
It'd be great if done in PHP.

I notice that both using base/ui_component/customer_form.xml


texts: Magento 2 GraphQL: Filter Products by custom attribute

texts:
I am using Magento 2.3.3 and GraphQL to get a list of products.

I want to query products by a custom attribute that I created in the admin.
Couldn't find in the documentation how to.

It is possible..?

Thanks!


texts: Magento2.1.5 Doesn't create the versionxxxxxxxx folder while static content deploy

texts:
I have installed latest magento version 2.1.5 and configured it.

It works fine but once we run the

php bin/magento setup:static-content:deploy

Command, it doesn't create the version folder as expected.

I can see by viewing source that the content is being called via particular version like below:

http://127.0.0.1/magento215/pub/static/**version1489125606**/frontend/Magento/luma/en_US/css/styles-l.css

But in pub static the folder "version1489125606" is missing.

All the files are reside directly in pub/static folder. Is there any setting to get it update?


texts: How to Upgrade Magento 1.5.1.0 to latest version (1.X)?


texts:
My website www.giftsonclick.com is not working on IE. The megamenu is not clickable. Whereas other magento websites are working. We have followed a custom theme but not able to debug the issue.

Regards,
Richa.


texts: Adding custom product attribute properties in Magento 2

texts:
How to add custom product attribute properties in admin for admin?

  Magento2 has removed attribute filter to product type.
  So,in frontend layer-navigation I'm getting attribute filter of it's child    product also for bundle and configurable product in
  category page.
  I want to add 'Apply To' property when i create new attribute.
  When I'm creating attribute I want to set scope for product type as    we were did in magento1.

Anyone know how can I do this?I found something which may help.


texts:
I am new to Magento 2, been using 1.9 before.

I installed Magento 2 with Venustheme cricket theme. Now when I go to app/design/frontend there is only Venustheme directory.

Does that mean that the default theme files are not there there anymore? Also, when editing the content of the Venustheme/cricket, I am editing the theme files and there are not magento default files?


texts: Magento 2.3 and FancyBox doesn't work :-(

texts:
I need to add this to Magento 2

<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.6/dist/jquery.fancybox.min.css" />

To be able to use fancybox on CMS pages

But either it:

breaks the Ultimo Theme and works

or

not breaks the Ultimo Theme and doesn't work

I have tried several ways to do this in the theme default.xml and or theme default_head_blocks.xml

Can someone please shed some light on this?
Thanks,

---UPDATE---

I have tested the solution in the link provided below, and it does not work.

After adding requirejs-config.js to the theme root, the following lines are loaded:

I have also set data-fancybox to all links.
Still doesn't work.

Where should I put the following code?

require(['jquery', 'fancybox', 'domReady!'], function($, fancybox, doc) {
var fancyboxExample = {
    openModal: function() {
        $.fancybox.open(this.$modal);
    },

    closeModal: function() {
        $.fancybox.close(true);
    }
};

// Initialise
fancyboxExample.init();
});


texts:
I would like to add a "Contact us" form on each product; I've copied the contact form and added to the cms static block:

{{block type="core/template" form_action="/contacts/index/post/" template="catalog/product/view/form-personalizzazione.phtml"}}

The problem is, how can we change it so it doesn't redirect on contact page but it remains inside the product instead?

Inside phtml it starts with

<form action="<?php echo $this->getFormAction(); ?>" id="contactForm" method="post">


texts: how to make the price range for the configurable product in magento2 list page

texts: I want to  show the price as variation for example from 09 to 100 as this in magento2 in the list page


texts: SUPEE 8788 not being applied properly on Magento CE 1.9.0.1

texts:
I've just tried to apply the new SUPEE 8788 patch to my magento 1.9.0.1 but it came up with several errors:
I ran the following command in SSH in the magento root directory:

bash PATCH_SUPEE-8788_CE_1.9.0.1_v1-2016-10-11-06-57-03.sh
The errors started with this, all the way at the top.
Checking if patch can be applied/reverted successfully...
ERROR: Patch can't be applied/reverted successfully.

Throughout the patching process it came up the following 79 times:

Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:

In total, 3 hunks failed:

Patching file skin/adminhtml/default/default/media/uploader.swf using Plan A...
No such line 2 in input file, ignoring
Empty context always matches.
Hunk #1 failed at 0.
1 out of 1 hunks failed while patching skin/adminhtml/default/default/media/uploader.swf
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
Patching file skin/adminhtml/default/default/media/uploaderSingle.swf using Plan A...
No such line 2 in input file, ignoring
Empty context always matches.
Hunk #1 failed at 0.
1 out of 1 hunks failed while patching skin/adminhtml/default/default/media/uploaderSingle.swf
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
Patching file skin/adminhtml/default/default/xmlconnect/boxes.css using Plan A...
Hunk #1 succeeded at 88.
done

According to the MageReport, the patch failed.
I have no idea how to fix these errors and I need some help with fixing what went wrong.

Thank you in advance!


texts:
I'm using DigitalOcean one-click-install Magento 2.0.7 installation on ubuntu and I have installed nodejs and grunt following the official tutorials. I added my theme to /dev/tools/grunt/configs/themes.js like that:

    raultheme: {
    area: 'frontend',
    name: 'Raul/raultheme',
    locale: 'et_EE',
    files: [
        'css/styles-m',
        'css/styles-l',
        'css/email',
        'css/email-inline'
    ],
    dsl: 'less'
},

All Grunt tasks work except grunt less, which gives the following error:

I added _extends.less file to css/source/ and editing this while grunt watch is working is doing nothing.
I don't know what to do anymore, since I followed the tutorial word by word and still get errors. I also did not get any useful information from the github page to what the grunt error sent me.
I have magento running in developer mode, full cache disabled, server side compilation.
Anyone have a clue why I'm getting this error?
Would be really happy if I get this working..

It gives the same error no matter what theme I try to compile (grunt less:blank etc) so it cant by my theme configuration


texts: Magento 2 - Missing enable / disable cache options

texts:
In my Magento 2, I can't enable/disable cache In System -> Cache Management, the two options are missing from the dropdown menu. what went wrong?

It's in Production mode.

I can only enable / disable cache via CLI.


texts:
I need to add a custom attribute (contact_number) for customer in Magento2 via an existing module, so I am using UpgradeData.php. Can anyone please tell what I have missed out.

use Magento\Framework\Setup\UpgradeDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Eav\Model\Entity\Attribute\Set as AttributeSet;
use Magento\Eav\Model\Entity\Attribute\SetFactory as AttributeSetFactory;
use Magento\Customer\Model\Customer;

class UpgradeData implements UpgradeDataInterface {

private $customerSetupFactory;
private $attributeSetFactory;

public function __construct(
\Magento\Customer\Setup\CustomerSetupFactory $customerSetupFactory, AttributeSetFactory $attributeSetFactory
) {
    $this->customerSetupFactory = $customerSetupFactory;
    $this->attributeSetFactory = $attributeSetFactory;
}

public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context) {
    //if (version_compare($context->getVersion(), "1.0.1", "<"))
    {
        $setup->startSetup();
        $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);
        $customerSetup->addAttribute(\Magento\Customer\Model\Customer::ENTITY, 'contact_number', array(
            [
                'type' => 'varchar',
                'label' => 'Contact Number',
                'input' => 'text',
                'required' => true,
                'visible' => true,
                'user_defined' => true,
                'position' => 999,
                'system' => 0,
            ]
        ));

        $Attribute = $customerSetup->getEavConfig()->getAttribute( \Magento\Customer\Model\Customer::ENTITY, 'contact_number');
        $Attribute->setData(
        'used_in_forms',
            [
             'adminhtml_checkout','adminhtml_customer','adminhtml_customer_address','customer_account_edit','customer_address_edit','customer_register_address'
            ]
    );
        $Attribute->save();
        $setup->endSetup();
}
}

}

Not getting what I am doing wrong. Any help, please.

[edit]
: Not getting the label in the backend as well:
Please find the screen-shot attached.


texts: how to move of rewards points above store credit on checkout page

texts: I want to move the 'Apply Rewards' section to be on the 'left side' positioned right above 'Apply Store Credit' drop down. Please help me.


texts:
I'm trying a .csv import with the normal import function of Magento (not the dataflow). I first exported all the products from my store and used that sheet as a template for mine.

When I try to import the sheet I get the following error: Can not find required columns: sku

I'm using Excel as my editor and I tried saving it as a MSDOS CSV but that didn't work either.

Note I opened the .csv in a text editor and the seperator was a ; I know the default seperator is a , but how would that work with defining the categories?

Also the SKU is present in the file


texts: Magento shows (two) wrong taxes in full tax summary but only in the BE and on emails and the totals are correct

texts:
When a order is placed our Magento shows two taxes in the full tax summary on the order confirmation email as well as in the backend. One of this tax is the correct German tax the other is some US tax which seems random to me and I don't know where it comes from. For example "US-All States-MemberOnlyTaxableGoodsRate (7.25%)", "US-All States-NotloggedinTaxableGoodsRate (8%)", "US-All States-GeneralTaxableGoodsRate (7.5%)" to name but a few - and I cannot even find these rates in [Sales] -> [Tax] -> [Manage Tax Rates]. I only have 0%, 7% and 19% rates set up there. Sometimes these US taxes also seem way off. For a 71.06 € product it just showed "US-All States-MemberOnlyTaxableGoodsRate (7.25%): 39,88 €". No idea how a 7.25% rate can be 39,88 € for this product.

The good thing is it just shows these rates in the full tax summary, if I fade it out the total tax is only the correct German tax (which also always is in the full tax summary next to the US tax). With that the grand total is also always correct. Still this is very confusing for customers.
Also worth to mention is that this only happens after the order is placed. So if you fade in the tax summary in the cart or the onepage checkout only the correct German tax is shown.

Of course all of our products have the same tax class and all our customers have German addresses.

Any clues where I could start looking?


texts: Magento 2 : Can We Convert Price Into Ceil Price

texts:
I have setup multi store view with multiple currency. Everything is working as expected.

Now, I  got requirement to convert all prices into ceil. (e.g, SR20.02 = SR21). For this task, I have developed my own module on which I have override Magento\Framework\Pricing\Render\Amount and Magento\Tax\Block\Item\Price\Renderer and converted into ceil.
I also have overrided price-utils.js for knockout js file rendering in summary.
Everything is working correctly except grandtotal. I am not getting expected grandtotal.

In \Magento\Framework\Pricing\Render\Amount

Method overrided:

 /**
 * Format price value
 *
 * @param float $amount
 * @param bool $includeContainer
 * @param int $precision
 * @return float
 */
public function formatCurrency(
    $amount,
    $includeContainer = true,
    $precision = 0
) {
    return $this->priceCurrency->format($amount, $includeContainer, $precision);
}

in \Magento\Tax\Block\Item\Price\Renderer

Method overrided:

 public function formatPrice($price)
{
    $item = $this->getItem();
    if ($item instanceof QuoteItem) {
        return $this->priceCurrency->format(
            $price,
            true,
            0,
            $item->getStore()
        );
    } elseif ($item instanceof OrderItem) {
        return $item->getOrder()->formatPrice($price);
    } else {
        return $item->getOrderItem()->getOrder()->formatPrice($price);
    }
}

I need help. Thanks


texts: order.getEmailCustomerNote() blank in emails

texts:
In my order confirmation email template I'm trying to output the following:

{{var order.getEmailCustomerNote()}}

However it does not show up. The comment taken during the order is however visible on the order notes page. It is stored in the sales_order table as customer_note.

I am using One Page Checkout.

Can anyone think of a reason this wouldn't appear, or the first place to look?

Thanks


texts: Include Cache in Magento2 module with using block

texts:
I have a block where I use as a slider in my home page, but it is not curling and I need it to do.

The module I use is the Slider.

Would there be a way for me to force caching the module?


texts: multiple coupon code apply on magento cart

texts: I have been working for 2 days for applying multiple coupon on cart I know there are modules which are available for that. But i don't want to use it. I want some custom code so that i can apply more than 1 coupon code in the single order.


texts: Warning: Invalid argument supplied for foreach() CacheController.php on line 82

texts:
I am not able to enable cache from admin panel and system.log file generate below error :

  Warning: Invalid argument supplied for foreach()  in app/code/core/Mage/Adminhtml/controllers/CacheController.php on line 82

can any one help me please?


texts: in check out page check zip code is valid or not?

texts:
i m using magento 1.9
i need to create zip code availability  check in check out page for particular order.particular product wise check zip code and if zip code is not valid then highlight zip code text box.
so please help me.


texts: Get Next and Previous item from a collection

texts: Whats the best way to get the Next and Previous Item from a collection?


texts: The Invoice and order email not received

texts:
I tried for an hour, but I can't find the correct solution for my problem. My Magento version is 1.9.2.2 and updated security patch. Now after placing the order the order and invoice mail can't be received (admin, customer). After checking the the error log below this message is shown:

    2016-02-12T14:36:06+00:00 ERR (3):
exception 'Exception' with message 'This letter cannot be sent.' in /var/www/html/pondevolution/app/code/core/Mage/Core/Model/Email/Template.php:379
Stack trace:
#0 /var/www/html/pondevolution/app/code/core/Mage/Core/Model/Email/Template.php(513): Mage_Core_Model_Email_Template->send(Array, Array, Array)
#1 /var/www/html/pondevolution/app/code/core/Mage/Core/Model/Email/Template/Mailer.php(84): Mage_Core_Model_Email_Template->sendTransactional('2', 'sales', Array, Array, Array, '1')
#2 /var/www/html/pondevolution/app/code/core/Mage/Sales/Model/Order.php(1356): Mage_Core_Model_Email_Template_Mailer->send()
#3 /var/www/html/pondevolution/app/code/core/Mage/Sales/Model/Order.php(1371): Mage_Sales_Model_Order->queueNewOrderEmail(true)
#4 /var/www/html/pondevolution/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php(139): Mage_Sales_Model_Order->sendNewOrderEmail()
#5 /var/www/html/pondevolution/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_Sales_OrderController->emailAction()
#6 /var/www/html/pondevolution/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('email')
#7 /var/www/html/pondevolution/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#8 /var/www/html/pondevolution/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#9 /var/www/html/pondevolution/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#10 /var/www/html/pondevolution/index.php(87): Mage::run('', 'store')
#11 {main}

Checking the email Queue after a couple of hours: wait in cron, added $emailQueue->send()
after $message = $emailQueue->addMessageToQueue();  called in

/var/www/html/pondevolution/app/code/core/Mage/Core/Model/Email/Template.php

The queue mails are sent immediately.

How can I check the cron job is running or not and how can I send the email via cron?


texts: remove Qty option from product add to cart page


texts: Magento 2 : How to clear cache using REST?

texts: How can I clear the Magento 2 page cache using REST API after updating the product quantity from 0 to 10?


texts: Multiple use of `getConnection()` in a single block and impact performance issues

texts:
I found a module someone created and looked into the code. I found that this person was making a lot connection as such in a single block:

public function checkStoreExists($storeID){
    $connection = $this->_resource->getConnection(\Magento\Framework\App\ResourceConnection::DEFAULT_CONNECTION);
    // some code
}
public function checkCategoryExists($categoryID){
    $connection = $this->_resource->getConnection(\Magento\Framework\App\ResourceConnection::DEFAULT_CONNECTION);
    // some code
}
public function checkBrandExists($brandID){
    $connection = $this->_resource->getConnection(\Magento\Framework\App\ResourceConnection::DEFAULT_CONNECTION);
    // some code
}
public function checkRangeExists($rangeID){
    $connection = $this->_resource->getConnection(\Magento\Framework\App\ResourceConnection::DEFAULT_CONNECTION);
    // some code
}

public function checkProductExists($productID, $rangeID){
    $connection = $this->_resource->getConnection(\Magento\Framework\App\ResourceConnection::DEFAULT_CONNECTION);
    // some code
}

public function checkProductOptionExists($productID, $rangeID, $productSku){
    $connection = $this->_resource->getConnection(\Magento\Framework\App\ResourceConnection::DEFAULT_CONNECTION);
    // some code
}

public function GetNextProductIndex(){
    $connection = $this->_resource->getConnection(\Magento\Framework\App\ResourceConnection::DEFAULT_CONNECTION);
    // some code
}

public function GetNextProductOptionIndex(){
    $connection = $this->_resource->getConnection(\Magento\Framework\App\ResourceConnection::DEFAULT_CONNECTION);
    // some code
}

Will that have any impact on performance? Is this okey to leave or should I adjust this somehow?


texts: PHP version check error occur while installing Magento2 locally

texts: I am trying to install Magento 2 in my machine locally but I am getting PHP version check error. How to fix this error. I am using PHP 7.4 version as a default installed by xampp. I have googled & found that by setting "disable-tls: false" will fix this, but I didn't find this in composer.json file & also I have to keep my site SSL secure. Is there any alternate way to fix this error. I am installing on Windows PC. Attached is screenshot. Please take a look.


texts:
I am working on Magento 2 Reward Points section and want to show price in points on storefront.

I have product price $25 on storefront And I have set Reward Exchange Rates

$1 = 10 points

10 points = 1$

Now the product price should be ( 250 points )

also currency symbols should show points instead of $

I am trying to achieve this from following method but stucks

class Magento\Directory\Model\PriceCurrency

/**
 * {@inheritdoc}
 */
public function convert($amount, $scope = null, $currency = null)
{
    $currentCurrency = $this->getCurrency($scope, $currency);

    return $this->getStore($scope)
        ->getBaseCurrency()
        ->convert($amount, $currentCurrency);
}

Note: Price should be converted in points everywhere on store front.

If you guys have any Idea please share

Any help will be appreciated


texts: Magento2 Catalog Search index process unknown error: | elasticsuite

texts:
I've install elasticsuite but during reindex  Catalog Search I get issue. Any solution?
Product Price index has been rebuilt successfully in 00:00:01
Catalog Search index process unknown error:
{"error":{"root_cause":
[{"type":"resource_already_exists_exception","reason":"in
                            dex [magento2_pl_catalog_product_20210118_123614/sSFlWyPJS2mhmE4WCG7T_Q] already                               exists","index_uuid":"sSFlWyPJS2mhmE4WCG7T_Q","index":"magento2_pl_catalog_prod                              uct_20210118_123614"}],"type":"resource_already_exists_exception","reason":"inde                              x [magento2_pl_catalog_product_20210118_123614/sSFlWyPJS2mhmE4WCG7T_Q] already e                              xists","index_uuid":"sSFlWyPJS2mhmE4WCG7T_Q","index":"magento2_pl_catalog_produc                              t_20210118_123614"},"status":400}
    ElasticSuite Category Indexing index has been rebuilt successfully in 00:00:00


texts: Magento 2 - Product options drop-down empty on front-end

texts:
We are doing a mass product integration. For configurable products we are getting an issue where options are not appearing within the drop-down like so:

I've narrowed it down to the following method: $product->getData("options"); which is returning:

array (size=0)
  empty

From the admin, everything looks fine:

Configurations are set-up correctly, 1 has available stock, all are enabled. Am I missing something?


texts: magento2 check exit email customer registed

texts:
I want to check the email customer registed. I have file save.php and i have

  $email = ab@gmail.com;

public function checkExistEmail($email){
    $customerCheckEmail->setWebsiteId(1);
    $customerCheckEmail = $this->_customerFactory->loadByEmail($email);

    if($customerCheckEmail->getId()){
        $this->messageManager->addErrorMessage('Email Registed!');
        return false;
    }
    return true;
}

Help me please!


texts:
I've been working through the issues one by one.  I now have this message when after the admin login:
Magento
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 349068 bytes) in /home/rxxxxx3/public_html/shop/vendor/composer/composer/src/Composer/Json/JsonFile.php on line 92
Any idea where to go next?


texts: Magento2: How to create upload multiple images attribute to category programmatically in admin

texts:
I need to create upload multiple images attribute to category programmatically in admin.

Does anyone have any ideas?

Thanks


texts: Magento URL Redirect from One product to Another product

texts:
After reading about Magento URLs redirect, I thought it would be simple and straight forward. When its time for an action, I faced nothing but disappointment.

What do I need : I want to create a URL redirect from PRODUCT A to PRODUCT B, while PRODUCT A is disable.

The problem I am facing: When I click URL REWRITE and choose FOR PRODUCT, I get a list of products in my store. I choose PRODUCT A. Afterwards, it gives me an option of choosing a category; I CHOOSE TO SKIP IT. On next page, it give me the option to rewrite. The only thing I can enter on the page is REQUESTED PATH, when I enter the NEW URL in to the REQUESTED PATH field, I get an error saying Request Path for Specified Store already exists the error is keep popping up over and over again. Do you know what other way I can edit PRODUCT A so it REDIRECTS to PRODUCT B.

I have attach images for your reference.
Thanks for your help!


texts: How to upload image files on my page using

texts:
[Magento Admin Panel] CMS>Page>Contents

I tried to upload image using insert/edit image button, but I couldn't it.
Whenever I tried it, I got message

  The folder is prohibited to write

How to fix this problem?


texts: What are the limitations of Magento 2 CE?

texts:
I've recently got a Magento 2 website project and I'm not sure which edition of Magento that I should go with.

I Know Magento 2 EE has many advantages over the CE edition, but I need details only in terms of performance.

I don't want to tell the client why EE is better than CE, but want to tell him the limitations of CE like

how many concurrent users can be there.
how many no. of products, SKU, categories, images, etc.
best hosting for Magento 2 so site speed will be much faster.

I know concurrent users are dependent upon the server but don't know what is the limitation for Magento 2 CE.

Hence please can somebody explain to me what are the limitations of Magento 2 CE.

Thank you very much.


texts: Magento 2 :- How to get newly added options id of product attribute & Deleted option id of attribute

texts:
I want to get lastly added product attribute options id and also need to deleted option id in the following event: catalog_entity_attribute_save_after

Anyone can help me with this?


texts: Is it possible to make cash on delivery depends on shipping address

texts:
I've made my admin configuration for cash on delivery payment as applicable only to specific country i.e, USA

Below my cases in checkout page,

Billing Country => USA, Shipping Country => USA | COD Available
Billing Country => USA, Shipping Country => OTHER | COD Available
Billing Country => OTHER, Shipping Country => USA | COD Not Available
Billing Country => OTHER, Shipping Country => OTHER | COD Not Available

So this clearly shows that COD configuration of applicable country is pointing only to billing address.

Any way to make this condition to check shipping country instead of billing country ?


texts: Webshopapps matrix rate - How to check if UK postcode

texts: I am using the free matrixrate extension by Webshopapps and after many years we found out an issue. Goods are only shipped to UK. My csv is setup with the country as GBR. Recently a customer entered an only numerical postcode and still managed to get an estimate for the shipping. How do I setup the file so that it can only accept UK postcodes? I tried to enter for each line all UK postcodes separated by comma, but does not accept it. Any pointer?


texts: How do I get customer attribute using an observer

texts:
I am using this event in the customer create account page: controller_action_predispatch_customer_account_create

I am trying to load a customer attribute here and I want to change its value.
I tried smth like this:

$observer->getEvent()->getAttributeText('customer_attribute_code');

But it is null. Is there a way to load a customer attribute and change its value using an observer ? thx


texts: How do I make Magento theme templates update friendly?

texts:
Imagine this scenario:

User creates app\design\frontend\default\mytheme\template\checkout\cart.phtml
User updates from 1.7.0 to 1.8.1
Cart page item qty updating does not work
User compares both base template file and his theme template file, finds out it's missing the new line <?php echo $this->getBlockHtml('formkey'); ?>

The process above has to be repeated for every template file that the theme overrides.

Is there a better workflow for theming magento?


texts: magento 1.9.2.4 row total price in negative(minus) after shopping cart discount

texts:
Magento 1.9.2.4 in admin row total price is in minus after shopping cart discount -

1 - Product tier price -

2 - Product price with quantity -

3 - Checkout -

4 - Admin row total -

5 - Discount amount(percent of product price discount) is 10%

in admin row total is in "Minus", we are getting row total price in "Minus"

Please tell me how can i fix this issue ?


texts:
I currently have "free shipping" (which it's ok).

I want to add below the variables:

Frequency (once per week, per month, etc).
Day and hour of delivery (Mon to Sat, etc).

So after the shipping method page is completed I also have a delivery frequency.

I've tried observers but it seems nothing observes shipping methods. Adding a custom shipping method is not an option since these variables should be apart from "free shipping" method. Also, the variables should be in the shipping method page.

So far i've inserted the html code in /design/frontend/.../giftmessage/inline.phtml, since that page is called in shipping method and (although this is not part of a gift message) couldn't find a better place to place it.

Thanks in advance!


texts: Can Anyone Describe a Basic CRUD Operation of Magento From Admin Side in Magento

texts: I want to understand the actual crud operation from admin side with coding.


texts: Magento 2 - Admin form Multi Select field issue

texts:
I added this code for Multi Select in my form.

File Path Should be like: app\code\Vendor\Module\Block\Adminhtml\Mpages\Edit\Tab\Main.php

$fieldset->addField(
            'categories',
            'multiselect',
            [
                'label' => __('Categories'),
                'title' => __('Categories'),
                'name' => 'categories',
                'required' => true,
                'options' => \Vendor\Module\Block\Adminhtml\Mpages\Grid::getValueArray7(),
                'disabled' => $isElementDisabled
            ]
        );

This is my getValueArray7() function in grid file.

static public function getValueArray7()
        {
            $data_array=array();
            foreach(\Vendor\Module\Block\Adminhtml\Mpages\Grid::getOptionArray7() as $k=>$v){
               $data_array[]=array('value'=>$k,'label'=>$v);
            }
            return($data_array);

        }

It shows me empty multi select field.


texts: Shopping carts appearing empty or showing unexpected items

texts:
I've had a few customers saying that when they try adding items to the cart, the cart then goes empty or shows other items in the cart that they haven't added and I wondered if anyone else has had such issues (using Magento ver. 1.9.0.1)?

I believe that it may be their previous abandoned cart items that are being re-added to the cart - i'm certainly hoping it's that and not another customer's cart items being added. I also noticed that some customer's appear to have 3 or 4 abandoned carts within the same hour or two, according to the abandoned carts report.

This is the problem as described by the customer:

Login
Add an item to the cart and then I'm logged out again
Login again but the shopping cart is either empty or contains items that I haven't ordered
Logout
Login again but the shopping cart is either empty or contains items that I haven't ordered

I suspect that this is somehow a session issue. We're saving sessions to the DB and these are the settings that I have;

Cookie Lifetime: 86400
Use HTTP Only: Yes
Cookie Restriction Mode: No
Validate REMOTE_ADDR: No
Validate HTTP_VIA: No
Validate HTTP_X_FORWARDED_FOR: No
Validate HTTP_USER_AGENT: No
Use SID on Frontend: No

The site is also just using http with the usual switch to https for the cart and checkout.


texts:
The current customer isn't authorized error appears
Appears on executing mutation in chrome graphQl tool
https://chrome.google.com/webstore/detail/graphql-playground-for-ch/kjhjcgclphafojaeeickcokfbhlegecd
mutation {
  revokeCustomerToken {
    result
  }
}

any thoughts why this error appearing ?


texts: Magento2 - Run Magento multistore from pub directory

texts:
I scanned my site from the New Magento Security Tool available from magento partner portal.

The report showed me a vulnerability issue

  Your Web server is configured to run Magento from %MAGENTO_ROOT% directory.
  It is recommended to set %MAGENTO_ROOT%/pub as a Web server root directory.

The Magento installation is a multi-website with let's say 4 websites.  When I set for example the document root of website 3 to /foo/bar/domain.website3/public/pub and after that navigate to the domain of website 3. Website 1 is shown, because the index.php which gets loaded is in the pub directory of the magento root installation. That means every domain will show the same website, because the index.php in the pub directory is static.

How can I setup my multi-website installation to use the pub directory as DocumentRoot?


texts:
I need to add a new class to a referenceBlock, specifically the nav items in the Account Page.

<referenceBlock name="customer-account-navigation-account-link">
       <arguments>
         <argument name="label" xsi:type="string" translate="true">Account</argument>
       </arguments>
</referenceBlock>

I have tried the following, but this hasn't worked:

<referenceBlock name="customer-account-navigation-account-link">
     <arguments>
           <argument name="label" xsi:type="string" translate="true">Account</argument>
           <argument name="attributes" xsi:type="array">
                <item name="class" xsi:type="string">accountclass</item>
           </argument>
     </arguments>
</referenceBlock>

Any other suggestions to add a new class to this element?

Note: I am using referenceBlock in a child theme to what may work on the normal block element may not work on referenceBlock.


texts: $_FILES array is empty while uploading product image in Magento 1.7 admin

texts:
I am getting error $_FILES array is empty while trying to upload an product image in magento 1.7 backend. 2 days ago I installed patches from 5344 to 8788.

How can I rid off this problem. please help.


texts: Paypal Express - no terms and conditions

texts:
When using paypal express to pay, there is no checkbox to agree to terms and conditions on the review page. Instead, the user is met with a 'Please agree to all the terms and conditions before placing the order'-error.

I have check both /template/paypal/express/review.phtml and paypal.xml-file, and the agreements box seems to be registered in both places.

Any ideas?


texts: How can I put the comment box like "Order_Comment" at checkout step for the customer.


texts: Magento 2 : All Category Pages Are Only 404

texts:
On first try of category pages I am only getting 404 errors.

I have Magento 2.1.5.

I imported about 20000 products in my single store, and the products are available in search.

But now I tried category tree from Codazon Megamenu. All links go to 404. This an example:

http://domain.com/catalog/category/view/s/test123/id/972/
http://domain.com/kinderfahrzeuge/laufrader.html

I tried several things:

magento indexer:reindex
magento setup:di:compile
cleared var/cache, var/generation, var/pagecache, var/di

Maybe its a problem that I have more than one root category?

Now I don't know what I can do to make it work. Google was my friend but I only found the methods described above.

What can I do?


texts: How to add dynamic Select Custom Options in Observer

texts:
I want to set some options on certain products through an observer. I cannot use regular Custom Options saved to the product because they do not meet our requirement.

I am able to add field type options without problems using:

    $options = array(
        array(
            'title'     => $type->getDescription(),
            'type'      => 'field',
            'is_require'=> 0,
            'id'        => $type->getId(),
            'price'     => '20',
            'price_type'=> 'fixed',
            'sku'       => $type->getSku(),
            'sort_order'=> 0
        )
    );
    /*

        */
    // Unset options and declare new options
    $optionInstance = $product->getOptionInstance()->unsetOptions();
    $product->setHasOptions(true);

    if (count($options)) {
        foreach ($options as $option) {
            $optionModel = Mage::getModel('catalog/product_option')
                ->setProductId($product->getId())
                ->setStoreId($product->getStoreId())
                ->setId($option['id'])
                ->addData($option);
            $product->addOption($optionModel);
        }
    }

I have read every tutorial I can find on creating Custom Options programmatically. There seems to be several ways to do this, but this method was the only one that seems to work. If you answer and simply provide a link to some Wordpress tutorial copied from some other site with unreadable code formatting and incorrect encoding, you will just be downvoted.

I want to add radio type options to this product. Everything I have found suggests this should be as simple as adding a values key to the option array:

    $options = array(
        array(
            'title'     => $type->getDescription(),
            'type'      => 'radio',
            'is_require'=> 0,
            'id'        => $type->getId(),
            'price'     => '20',
            'price_type'=> 'fixed',
            'sku'       => $type->getSku(),
            'sort_order'=> 0,
            'values'    => array(
                array(
                    'price' => '10',
                    'price_type' => 'fixed',
                    'sku' => 'some sku',
                    'title' => 'some title',
                    'id' => 3
                ),
                array(
                    'price' => '10',
                    'price_type' => 'fixed',
                    'sku' => 'some sku 2',
                    'title' => 'some title also',
                    'id' => 6
                )
            )
        )
    );

This flat out does not work. All I see in the frontend is a single radio input with 'None' as the title. Trying some different methods for adding the option to the product, sometimes I will see two radio inputs, the first says 'None' and the second input is the second value array.

I want to set radio/select options to a product while observing catalog_controller_product_view, how can this be done?


texts: Magento adminpanel custom Module editor field config

texts:
I have created a custom module in the adminpanel where i need to show an HTML editor. The field is showing properly with the HTML editor but the issue is that its showing all the buttons and options in the editor (Please see the image below).

But i only want to show options like Bold,Italic,Underscore. How can i do this. Here is the code im using to show the editor.

app/code/local/MyModule/Producteditrequest/Block/Adminhtml/Producteditrequest/Edit/Tab/Form.php

    protected function _prepareForm(){

    $form = new Varien_Data_Form(array('id' => 'edit_form',
                                          'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
                                          'method' => 'post',
                        ));
    $fieldset = $form->addFieldset('producteditrequest_form', array('legend'=>Mage::helper('producteditrequest')->__('Edit Request  ')));
    .
    .
    .
    .
    .
    .
    .
    $fieldset->addField('shortdesc', 'editor', array(
                'name'      => 'shortdesc',
                'label'     => Mage::helper('producteditrequest')->__('Short Description'),
                'title'     => Mage::helper('producteditrequest')->__('Short Description'),
                'style'     => 'width:98%; height:200px;',
                'wysiwyg'   => true,
                'config'    => Mage::getSingleton('cms/wysiwyg_config')->getConfig(),
                'required'  => true,
                'value' => $pdtEditDetails['short_desc']
            ));
$this->setForm($form);
.
.
.
}

[Please note that i have only included the relevant parts of my code since its a very big function]

I have tried following methods to configure the editor which found from
/app/code/core/Mage/Adminhtml/Block/Catalog/Helper/Form/Wysiwyg/Content.php

$config = array()
$config['add_variables']         = false;
$config['add_widgets']           = false;
$config['add_directives']        = true;
$config['use_container']         = true;
$config['container_class']       = 'hor-scroll';

$fieldset->addField('shortdesc', 'editor', array(
            'name'      => 'shortdesc',
            'label'     => Mage::helper('producteditrequest')->__('Short Description'),
            'title'     => Mage::helper('producteditrequest')->__('Short Description'),
            'style'     => 'width:98%; height:200px;',
            'wysiwyg'   => true,
            'config'    => Mage::getSingleton('cms/wysiwyg_config')->getConfig($config),
            'required'  => true,
            'value' => $pdtEditDetails['short_desc']
        ));

But still its showing all the options as in the above image.

I have also tried putting following javascript code in the phtml file.

    <script type="text/javascript">
window.onload=function()
{
   tinyMCE.init({
    mode : "exact",
    elements: "shortdesc",
    theme : "advanced",
    theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|",
    doctype : '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'

  });
};
</script>

But there is no change.

How can i make the editor configurable in the adminpanel.


texts: E.E. Rule-based product relations. I must save the product before the rule will apply

texts:
I'm integrating rule-based product relations. In the process, from the admin product grid, I applied an action whose job is to remove all related products. It did it's job, but it did it too well. I thought it would remove only the related products that were manually assigned. It did that as well as trick Magento into believing that none of the target rules applied to it. If I open the product and click save, the rule re-applies and is functional. Now I have to go through every product and save them one by one in order for the rule to work, or, untested, remove the rule and create a new rule.

Is there anyway to avoid this?


texts: Update/change the sort order for existing product attribute using upgrade scripts?

texts:
How do i update/change the sort order for existing product attribute using upgrade scripts?

I want to change the order in which the product attributes are listed in the admin. Is there any other way to do that through upgrade scripts


texts: is it possible to set different price levels per currency?

texts:
Magento 1.9.0.1

Store based in europe with euro prices

i know it is possible to use the currency converter and that works nicely

But...

For the US we need a different price level. Is it possible to have a certain pricelevel for euro and another price level for usd for a product in the same store?

Thanks


texts: I have recenlty create one module but view file not call. return 404

texts:
I have recently learn magento 2.1.2. so I have create one basic module. but view file not call. Its return 404 on frontend side.

Above is my module directory structures.

routes.xml

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

Block.php

namespace DDTestimonial\Testimonial\Block;
use Magento\Framework\View\Element\Template;

    class Testimonial extends Template{

        public function __construct(Template\Context $context, array $data = array()) {
            parent::__construct($context, $data);
        }

        public function getTestimonial(){
            return "Testimonial work fine";
        }

    }

Controller

namespace DDTestimonial\Testimonial\Controller\Index;

use Magento\Framework\App\Action\Context;
use Magento\Framework\View\Result\PageFactory;
use Magento\Framework\Controller\Result\ForwardFactory;
use Magento\Framework\Exception\NotFoundException;
use Magento\Framework\App\RequestInterface;

class Index extends \Magento\Framework\App\Action\Context{
    protected  $resultPageFactory;
    protected  $resultForwardFactory;
    protected $helper;

    public function __construct(Context $context, PageFactory $resultPageFActory,  ForwardFactory $resutlForwardFactory, \DDTestimonial\Testimonial\Helper\Data $helper) {

            $this->resultPageFactory = $resultPageFActory;
            $this->resultForwardFactory = $resutlForwardFactory;
            $this->helper = $helper;
            parent::__($context);

    }

    public function dispatch(RequestInterface $request){
        if(!$this->helper->isEnabled()){
            throw new NotFoundException(__("Page not found"));
        }
        return parent::dispatch($request);
    }

    public function execute(){
        $resultPage = $this->resultPageFactory->create();
        $resultPage->getConfig()->getTitle->set(__("Testimonial Page"));
        if(!$resultPage){
            $resultForward = $this->resultForwardFactory->create();
            return $resultForward->forward("not route");
        }
        return $resultPage;
    }

}

Layout

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <title>Testimonial Page</title>
    </head>
    <body>
        <referenceContainer name="content">
            <block class="DDTestimonial\Testimonial\Block\Testimonial" name="testimonialPage" template="DDTestimonial_Testimonial::testimonial.phtml" />
        </referenceContainer>
    </body>
</page>


texts:
I have been using MAGE for about 2 months now and I am a Neophyte to front and back end. I am looking for a little guidance in changing form "developer" to "production" mode. I don't use the CL, I use a combo of my FTP access and CMS.

What is the order of changing modes?
What cashe folders do I delete?

I changed modes by going to:

app/etc/ and opening env.php
then I changed MAGE_MODE' => 'developer' to MAGE_MODE' => 'production'

I have read that I have to delete the files in the cash folders.

What should I do first? Delete cashe or change modes?
Which folders and which files should I clear from what file paths?(In the examples I have seen the file structure is different from mine).

I have read a few articles and posts on when to use which mode but I am still a little unclear. Could you give me examples of what mode to use for what?

Developer mode: What tasks should I do in this mode?
Production mode: What tasks should I do in this mode?

I hope this is not too tall an order to ask. So please forgive my newness to Magento.


texts: Directory "/var/www/magento2/pub/static/frontend/" cannot be created Warning!mkdir(): Protocol error

texts: I use a vagrant env and catch this error when I change magento theme


texts: Magento 2: Get Product Stock status details in Rest API

texts:
Need to get Product Stock Status in products details using Rest API.

  Method: GET

  Using API URL: http://testwebsite/rest/en/V1/products/sku

Above api returns products details but need also products stock status.

Any help would be appreciated. Thanks!

UPDATE

Magento ver. 2.3.0

API Response :

{
    "id": 1075,
    "sku": "ACREATSGRACJ5050",
    "name": "Brow Set",
    "attribute_set_id": 14,
    "price": 10.5,
    "status": 1,
    "visibility": 4,
    "type_id": "simple",
    "created_at": "2019-04-06 08:39:24",
    "updated_at": "2019-08-28 06:10:01",
    "extension_attributes": {
        "website_ids": [
            1
        ],
        "category_links": [
            {
                "position": 0,
                "category_id": "7"
            },
            {
                "position": 0,
                "category_id": "77"
            },
            {
                "position": 0,
                "category_id": "78"
            },
            {
                "position": 0,
                "category_id": "83"
            }
        ]
    },
    "product_links": [],
    "options": [],
    "media_gallery_entries": [],
    "tier_prices": [],
    "custom_attributes": [
        {
            "attribute_code": "url_key",
            "value": "brow-set"
        },
        {
            "attribute_code": "gift_message_available",
            "value": "0"
        },
        {
            "attribute_code": "rma_allowed",
            "value": "1"
        },
        {
            "attribute_code": "acce_brand",
            "value": "208"
        },
        {
            "attribute_code": "options_container",
            "value": "container2"
        },
        {
            "attribute_code": "acce_type",
            "value": "223"
        },
        {
            "attribute_code": "acce_item",
            "value": "209"
        },
        {
            "attribute_code": "supplier_sku",
            "value": "RT-1468"
        },
        {
            "attribute_code": "in_html_sitemap",
            "value": "1"
        },
        {
            "attribute_code": "msrp_display_actual_price_type",
            "value": "0"
        },
        {
            "attribute_code": "retail_price",
            "value": "10.5000"
        },
        {
            "attribute_code": "tax_class_id",
            "value": "2"
        },
        {
            "attribute_code": "use_in_crosslinking",
            "value": "1"
        },
        {
            "attribute_code": "in_xml_sitemap",
            "value": "1"
        },
        {
            "attribute_code": "required_options",
            "value": "0"
        },
        {
            "attribute_code": "has_options",
            "value": "0"
        },
        {
            "attribute_code": "category_ids",
            "value": [
                "7",
                "77",
                "78",
                "83"
            ]
        },
        {
            "attribute_code": "country_of_manufacture",
            "value": "US"
        },
        {
            "attribute_code": "color",
            "value": "4"
        },
        {
            "attribute_code": "upc_ean",
            "value": "79625014686"
        },
        {
            "attribute_code": "as_featured",
            "value": "0"
        }
    ]
}


texts: Magento 2.3.3 stopped working. CMS Blocks the with same identifiers doesn't work

texts:
We have been using CMS blocks with the same identifiers (see image), to be able to use child themes and include the these CMS blocks to several store views.

After a upgrade to Magento 2.3.3 that's not working anymore.

Anyone have a solution for this or can shed some light?

Thanks,

EDIT

Found This at GitHub:

https://github.com/magento/magento2/issues/4831


texts:
i am using firecheckout for magento 1 checkout page gives error "checkout is not defined" in console prototype.js::5598.
because of that error sometimes customers can not place order.
can anyone help me. it gives error like below screenshot.
i am looking for a solution but can't find anywhere


texts: Block not showing in custom frontend controller

texts:
Here is my custom frontend controller

namespace Namespace\Testing\Controller\Payment;

class Failure extends \Magento\Framework\App\Action\Action
{
    /**
     * @var \Magento\Checkout\Model\Session
     */
    protected $_checkoutSession;

    /**
     * @var \Magento\Store\Model\StoreManagerInterface
     */
    protected $_storeManager;

    /**
     * @var \Magento\Sales\Api\Data\OrderInterfacc
     */
    protected $_order;

    protected $_pageFactory;

    protected $_messageManager;

    /**
     * @param \Magento\Framework\App\Action\Context $context
     * @param \Magento\Checkout\Model\Session $checkoutSession
     * @param \Magento\Store\Model\StoreManagerInterface $storeManager
     */
    public function __construct(
      \Magento\Framework\App\Action\Context $context,
      \Magento\Checkout\Model\Session $checkoutSession,
      \Magento\Store\Model\StoreManagerInterface $storeManager,
      \Magento\Sales\Api\Data\OrderInterface $order,
      \Magento\Framework\View\Result\PageFactory $pageFactory
    ) {
        $this->_checkoutSession = $checkoutSession;
        $this->_storeManager = $storeManager;
        $this->_order = $order;
        $this->_messageManager = $context->getMessageManager();
        $this->_pageFactory = $pageFactory;
        parent::__construct($context);
    }

    /**
    * Unset the quote and redirect to checkout success.
    */
    public function execute()
    {
        echo 'test1';
        $message = '2132132132123132123';
        $this->_messageManager->addError(__('This is a erroor message.'));
        $resultPage = $this->_pageFactory->create();
        $block = $resultPage->getLayout()->getBlock('Namespace\Tesing\Block\Failure');

        return $resultPage;

    }
}

block class

<?php
namespace Namespace\Testing\Block;

class Failure extends \Magento\Framework\View\Element\AbstractBlock
{
    protected function _toHtml() {
        return "<b>Hello world from block!</b>";
    }
}

The block is not added (i didn't find something like appendbody for resultpage) in the controller page. anyone know what is the problem?


texts:
I'm trying to build a custom Payment module, but it's very hard to get things to work because there's no real documentation yet. There are a few example extensions, but these are all outdated.

What I got working:

The user selects the Payment method
The user can select his bank from a list of dutch banks
After the user presses 'Place order' the user is redirected to the success page

What I cannot figure out to do:

Redirect the user to payment provider after 'Place order' is pressed
I should provide a redirect url to the payment provider where the user is redirected to after payment.

The ability to fetch the response of the Payment provider and show the success page to the user.

I'm working on this for days now, but I cannot figure out how to do it. Can someone point me in the right direction?

Thanks.


texts: Changing type on WSI file will not allow for an override

texts:
In app/code/core/Mage/Catalog/etc/wsi.xml

From the tag for this:

<xsd:complexType name="catalogProductCreateEntity">

I want to delete or change type with a custom module

<xsd:element name="additional_attributes" type="typens:associativeArray" minOccurs="0" />

The problem is that Magento will merge ALL the xml so if we try to remove an element it will merge the original into the XML

Explaination:

<complexType name="catalogProductEntity">
               <all>
                   <element name="product_id" type="xsd:string"/>
                   <element name="sku" type="xsd:string"/>
                   <element name="name" type="xsd:string"/>
                   <element name="set" type="xsd:string"/>
                   <element name="type" type="xsd:string"/>
                   <element name="category_ids" type="typens:ArrayOfString"/>
                   <element name="website_ids" type="typens:ArrayOfString"/>
               </all>
   </complexType>

From above code now I want to remove or change type of

<element name="website_ids" type="typens:ArrayOfString"/>

If I put same element with different type then both will merge


texts: Magento 2: Overriding addtocart.phtml for Configurable Products

texts:
I've create a module and overriden addtocart.phtml to replace the 'Add to Cart' button with 'Preorder' when the Preorder attribute is set to 'Yes'.

This works well on simple products, but I cannot override the button on configurable products (products with options).

Template hints show the following on the add to cart button for simple products:

/var/www/html/magento/var/view_preprocessed/pub/static/app/code/Max/Preorder/view/frontend/templates/catalog/product/view/addtocart.phtml

Configurable shows:
/var/www/html/magento/var/view_preprocessed/pub/static/vendor/magento/module-catalog/view/frontend/templates/product/view/addtocart.phtml

I'm not really sure what is going on here, I can see the path is slightly different but I have no luck when trying to override that file.

Any help would be appreciated.

Cheers,
Max


texts: Where to start when creating a magento new theme

texts: am a beginner in magento, I need to know where to start when creating a new theme and applying in magento.


texts:
I am working on a Magento 2.1.7 shop. To achieve this, I have created a child-theme of Magento Blank.

Whenever I go, within the Magento admin, to Content > Blocks, there is this error in the console: Uncaught TypeError: utils.convertToMomentFormat is not a function.

The file path is

  myshop.com//pub/static/version1523976842/adminhtml/Magento/backend/en_US/Magento_Ui/js/form/element/date.js

The code:

prepareDateTimeFormats: function () {
  this.pickerDateTimeFormat = this.options.dateFormat;
  if (this.options.showsTime) {
   this.pickerDateTimeFormat += ' ' + this.options.timeFormat;
  }

  // This is the "problem" line
  this.pickerDateTimeFormat = utils.convertToMomentFormat(this.pickerDateTimeFormat);

  if (this.options.dateFormat) {
    this.outputDateFormat = this.options.dateFormat;
  }

  this.inputDateFormat = utils.convertToMomentFormat(this.inputDateFormat);
  this.outputDateFormat = utils.convertToMomentFormat(this.outputDateFormat);

  this.validationParams.dateFormat = this.outputDateFormat;
}

What is the cause of this error? How can I fix it?


texts: How should i get image url in my category tree?

texts:
as

<?php
class Ahybemeir_CategoryObserver_Model_Observer{
  public function updateTopMenuJson(Varien_Event_Observer $observer){
      $_helper = Mage::helper('catalog/category');
      $_categories = $_helper->getStoreCategories();
      $recursionLevel = 3; // Add recursion level
      $storeId = 1; // Add your Store ID for which you want to get category tree
      $node = '';
      $categoryTreeData = $this->getCategoryTree($recursionLevel, $storeId);
      $arr = json_encode($this->getCategoryTree(3));
      echo "<pre>";print_r($arr);
  echo("<script>console.log('PHP: ".$arr."');</script>");
  file_put_contents("cat_node.json", $arr);
}

protected function getCategoryTree($recursionLevel, $storeId = 1)
{
    $parent = Mage::app()->getStore($storeId)->getRootCategoryId();
    $tree = Mage::getResourceModel('catalog/category_tree');
    /* @var $tree Mage_Catalog_Model_Resource_Category_Tree */

    $nodes = $tree->loadNode($parent)
        ->loadChildren($recursionLevel)
        ->getChildren();
    $collection = $tree->getCollection()
        ->addAttributeToSelect('description');
    $tree->addCollectionData($collection, false, $parent);

    $categoryTreeData = array();
    foreach ($nodes as $node) {
        if ($node->getIsActive()) {
            $categoryTreeData[$node->getData('entity_id')] = $this->getNodeChildrenData($node);
        }
    }

    return $categoryTreeData;
}

protected function getNodeChildrenData(Varien_Data_Tree_Node $node)
{
    $categoryData = array(
      'title' => $node->getData('name'),
      'url'   => $node->getData('url_key'),
      'id'    => $node->getId(),
      'description' => $node->getData('description'),
      'img' => $node->getImageUrl(),
      // 'mega_menu1'=> $node->getData('mega_menu')
      'mega_menu'=> 'false'
    );

    foreach ($node->getChildren() as $childNode) {
      if (!array_key_exists('children', $categoryData)) {
          $categoryData['mega_menu'] = 'true';
          $categoryData['children'] = array();
      }

        $categoryData['children'][$childNode->getData('entity_id')] = $this->getNodeChildrenData($childNode);
    }
    return $categoryData;
}
} // End of Class
?>


texts: Simple Products not showing as associated in configurable product after reset filter

texts:
I already configure all the attributes like,

visibilty = not show inidividually
stock = in stock
attribute set = the same as configurable product
price = also set
status = enable

After click on "Reset Filter" my simple products have the same attribute set are not shown...


texts: Magento transactional email logo too big

texts:
I am trying to include a logo in my transactional emails. This is working but the only problem is that the logo is 633x270 and i want it to resize to 211x90 that's the only way to keep high quality images. But the problem is that just displays the logo as 633x270 way too big ofcourse...

Can anyone help me with this problem i tried a lot of things like clearing cache etc.


texts:
i have a file that i use to update my stock automatically that i modified from here, Magento2: Import custom attribute for specific product id using csv which is below:
<?php
use Magento\Framework\App\Bootstrap;
require __DIR__ . '/app/bootstrap.php';

$params = $_SERVER;
$bootstrap = Bootstrap::create(BP, $params);

$obj = $bootstrap->getObjectManager();

$state = $obj->get('Magento\Framework\App\State');
$state->setAreaCode('frontend');

$productRepository = $obj->get('Magento\Catalog\Model\ProductRepository');
$stockRegistry = $obj->get('Magento\CatalogInventory\Api\StockRegistryInterface');

$csv = "path/to/file";
if (!empty($argv) && sizeof($argv) > 1) {
    $csv = $argv[1];
}
if (($handle = fopen($csv, "r")) !== FALSE) {
    while (($data = fgetcsv($handle, 100, ",")) !== FALSE) {
        $num = count($data);
        if ($num < 1) {
            continue;
        }
        $sku = trim($data[0]);
        if ($num < 2) {
            echo "Skipping: " . $sku . " not enough fields\n";
            continue;
        }
        $qty = trim($data[1]);

        try {
            $product = $productRepository->get($sku);
        } catch (\Exception $e) {
            echo "Error:  Invalid SKU, ".$sku."\n";
            continue;
        }

        try {
            $stockItem = $stockRegistry->getStockItemBySku($sku);
        } catch (\Exception $e) {
            echo "Error:  Invalid stock SKU, ".$sku."\n";
            continue;
        }

        if ($stockItem->getQty() != $qty) {
            $stockItem->setQty($qty);
            if ($qty > 0) {
                $stockItem->setIsInStock(1);
               }
            $stockRegistry->updateStockItemBySku($sku, $stockItem);
        }
    }
    fclose($handle);
}

which is working fine. however, it looks like i am having the same issue as mentioned here, https://github.com/magento/magento2/issues/26172 where the is in stock is not displayed on the front end for layered navigation, so i created a custom drop down attribute 'csv_stock' to use for filtering until it is fixed. i want to set this attribute when the stock gets updated, but i don't know enough about magento code to do it. i've tried using variations of setData or setCustomAttribute, but it does not work, probably because i am not formatting it right.
can anyone provide an example i can use for this?


texts:
When updating from 2.2.2 to 2.2.3 with

composer require magento/product-community-edition 2.2.3 --no-update

I get this error:

[InvalidArgumentException]
  Could not find package magento/product-community-edition in a version match
  ing 2.2.3


texts: How to change a field or add new field in contact us form

texts: I have to change a field of my contact form. For example, there is a field "telephone" which I have to replace with "subject" field in the contact us page form. Will anyone please tell me how can I make these changes?


texts:
In my magento application, when I am trying to refund an order online, then it is failing to create credit memo and thus transaction is failing.

Can anyone suggest me possible ways to debug and come out of this issue.

Note: I checked the parameters passed to the gateway and is seems to alright but I don't know why it is sending a response 'Declined'!

Please help!


texts: Magento 2.3.4 custom layout update - insert different facebook OG on each page

texts:
I need to have a different Facebook OG:IMAGE for each CMS PAGE.

I found on official documentation how to add a custom layout update on Magento 2.3.4 --> I've already created this file cms_page_view_selectable_faq_test1.xml (where "faq" is the cms page URL key, and "test1" is the name of the override) inside mythemeoverride/Magento_Theme/layout/

The file contains this code:

<?xml version="1.0"?>

<page>
    <head>
        <meta property="og:image" content="https://dev.push96.com/media/wysiwyg/push/push96-300x300.png" />
    </head>
</page>

I have chosen the override "test1" inside the custom layout update XML of "faq" page, but the result is:

*Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'meta', attribute 'property': The attribute 'property' is not allowed.
Line: 1315*

Any idea what's wrong?


texts: Anyone using Captcha for the guest checkout?

texts: Anyone using Captcha for the Guest checkout in Magento 2? If yes, which Captcha menthod you use?


texts: How can we import db in magento2 cloud project

texts:
I want to import SQL file in cloud project magento2.
by ssh i login and import db then i am getting mysql server gone away after little time later.


texts: Magento 2: Adding custom attribute for product

texts:
I want to add a product attribute like

https://nwdthemes.com/2018/06/21/magento-2-working-with-arrayserialized-backend-model/

How I can create a product attribute with multiple value in one record?


texts: Render Category View based on Products search

texts:
I'm trying to build a Live search. I have a Block Class that returns the necessary the products that i want to show.

Now the Result page or the Category Page has a Controller that outputs the grid as far as i understand it.

My question is if i can use those and how to output my own grid with those products.

A big thanks for who is willing to help me out here!

Edit

With the help of Ajax and giving it the input value and getting it in my template with the $_GET function and giving it to my block class i'm able to get the products that match the filter.

Still need a way how to output the products in a grid layout.

Edit 2

I outputted it as a raw controller html which is good for loading time. Still searching how to get XML logics within my raw controller.


texts:
I am developing a Store in Magento 2. I created an Admin Account at the time of installation of Magento 2. Later I tried to create another User (Who can only Use the help desk) from Admin Panel. The users are not able to login. I am getting a message
(More permission are needed to access this).


texts: How to move category in header panel before Sign In Magento 2

texts: Please see the below screenshot. I am trying to move the category menu and want to display HALF TITLE category before sign in header.


texts:
I have created custom category attribute by below setup.

namespace Hello\Catattribute\Setup;

use Magento\Eav\Setup\EavSetup;
use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;

class InstallData implements InstallDataInterface
{

    private $eavSetupFactory;

    public function __construct(EavSetupFactory $eavSetupFactory)
    {
        $this->eavSetupFactory = $eavSetupFactory;
    }

    public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
    {

        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
        if (version_compare($context->getVersion(), '1.0.0') < 0){
            $eavSetup -> removeAttribute(\Magento\Catalog\Model\Category::ENTITY, 'right_top');
            $eavSetup -> addAttribute(\Magento\Catalog\Model\Category :: ENTITY, 'right_top', [
                        'type' => 'text',
                        'label' => 'Top Right Html',
                        'input' => 'textarea',
                        'required' => false,
                        'sort_order' => 110,
                        'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE,
                        'wysiwyg_enabled' => true,
                        'is_html_allowed_on_front' => true,
                        'group' => 'General Information'
                    ]
            );
        }

    }
}

Now I want to add some more custom attributes for category but without creating a new module, to do so I have created an UpgradeSchema and changed the setup version in module.xml.

namespace Hello\Catattribute\Setup;

use Magento\Eav\Setup\EavSetup;
use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\UpgradeSchemaInterface;
use Magento\Framework\Setup\SchemaSetupInterface;
use Magento\Framework\Setup\ModuleContextInterface;

class UpgradeSchema implements UpgradeSchemaInterface {

    public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $context) {
        $eavSetup = $setup->create(['setup' => $setup]);
        if(version_compare($context->getVersion(), '1.0.1') < 0) {
            $eavSetup -> removeAttribute(\Magento\Catalog\Model\Category::ENTITY, 'background_img');
            $eavSetup -> addAttribute(\Magento\Catalog\Model\Category :: ENTITY, 'background_img', [
                        'type' => 'varchar',
                        'label' => 'Background Image',
                        'input' => 'image',
                        'backend' => \Magento\Catalog\Model\Category\Attribute\Backend\Image::class,
                        'required' => false,
                        'sort_order' => 115,
                        'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE,
                        'group' => 'General Information',
                    ]
            );

        }
        $eavSetup->endSetup();
    }
}

But it's not working. Please help me or suggest me that how can I upgrade EAV setup schema.


texts:
I have applied VAT to products, However, I would need to be able to overwrite the VAT amount when certain conditions are met From this question I was able to remove the tax that is automatically calculated, by using addTotalAmount to add the same amount as the VAT but multiplies by -1.

I am unsure how to get the individual product ids to be able to get their cost price.

EDIT:
I was able to get the product ids with:

    $quote = $observer->getData('quote');
    $itemsList = $quote->getItemsCollection();

    foreach ($itemsList as $item){
        $item->getProductId();
    }

However, some of the products will also have a custom price set in the backend if an order is added manually. I am unable to get that price at the moment.


texts: Export customers error "barkeloo payment"

texts:
I'm trying to export the customers, and shows me this error:

How can I fix it? any idea?


texts:
I would like to show just the date and not the time in my columns with this component :

Magento\Ui\Component\Listing\Columns\Date

Thanks


texts: Deployment does no create /js folder with main.js

texts:
During the process of updating my Magento2 website, the console commands fail to create my main.js file, and shows me this error  static/frontend/website/default/pt_PT/js/main.js net::ERR_ABORTED 404 (Not Found)
I've tried to flush the cachem, re-index, and update
>Clean cache
 php bin/magento cache:clean

>Upgrade
 php bin/magento setup:upgrade

>Deploy
 php bin/magento setup:static-content:deploy
 php bin/magento setup:static-content:deploy pt_PT -f

>Reindex
 php bin/magento indexer:reindex

>Compile
 php bin/magento setup:di:compile

But it did nothing basically, because i always end up getting the 404 cannot find main.js file.
This might be causing some other problems in my magento website.
I've already checked this question and this question


texts: Magento 2 Filter Orders Based On shipping Country

texts: I want to Filter Orders based on Shipping country I have filtered using other attributes like grand_base_total and store_id but struck at shipping country as there is no any attribute for that in sales_order table


texts: Why I'm having errors after install an update from 2.1.0 to 2.1.2 with composer?

texts:
Errors after installing update from 2.1.0 to 2.1.2

 PHP Warning:
 require(/var/www/vendor/composer/../../app/etc/NonComposerComponentRegistration.php):
 failed to open stream: No such file or directory in
 /var/www/vendor/composer/autoload_real.php on line 71 PHP Fatal error:
 require(): Failed opening required
 '/var/www/vendor/composer/../../app/etc/NonComposerComponentRegistration.php'
 (include_path='/var/www/vendor/magento/zendframework1/library:/var/www/vendor/phpunit/php-file-iterator:/var/www/vendor/phpunit/phpunit:/var/www/vendor/symfony/yaml:.:/usr/share/php')
 in /var/www/vendor/composer/autoload_real.php on line 71

I have removed the cache, completely removed vendor dir and reinstalled via composer install.  Doesn't matter what I do, I cannot get past this error.


texts: set dynamic email to received order email when the order is placed in magento 2 programically

texts:
i need your help to set a dynamic email along with store id email which received the order  details when the new order places .Meanwhile which file i need to setup my custom email .

i have check the "Send Order Email Copy To" option in admin panel i need that file which that code is explored so i can put my email code over there can anyone help me.Thanks


texts: Magento2 : Apple Pay Integration With Payfort Payment

texts:
I have to integrate the apple pay payment method to my website so anyone have any reference URL or Extension. so I can use that link.

I follow below link

https://applepaydemo.apple.com/
https://developer.apple.com/apple-pay/payment-platforms/
https://github.com/norfolkmustard/ApplePayJS


texts:
There is one link on my product page. If the customer is not login than its ask for customer login in the popup and after login, I want to redirect that product page.

So, I am using customer_login event and in popup login form I am passing product id and save some detail to the database. Now I want to redirect that product page.

in Magento 1 redirect from observer like this

$observer->getRequest()->setParam('return_url','http://www.google.com/');

so how can I do this from an observer in Magento 2?


texts: I am getting sales email from wired email address in magento 2?

texts:
I have setup sales email address in the admin for sales_representative but still I am getting the sales email from another email address.

I have checked everywhere in admin and code but didn't get solution. Other emails like newsletter & customer registration are receiving from correct email.

So what is the problem and where I need to check this email issue for sales?


texts: How can I override change_email.html and change_email_and_password.phtml

texts:
I am trying to override the following e-mail templates:

vendor/magento/module-customer/view/frontend/email/change_email.html
vendor/magento/module-customer/view/frontend/email/change_email_and_password.html

I'm trying to do this by copying the templates to my local theme to these paths:

app/design/frontend/<PACKAGE>/default/Magento_Customer/templates/email/change_email.html
app/design/frontend/<PACKAGE>/default/Magento_Customer/templates/email/change_email_and_password.html

However, it does not seem to work. Can anyone point me in the right direction? This is the right way to override e-mail templates right? Or am I overseeing something here?


texts: Query to get all simple products which are not part of a complex product

texts:
Exactly as the title suggests, how can i find all simple products in the system that are not part of complex products such as configurable?

I dont mind if this is done directly in the db or through some collection load but i need only the list of product ids that fit this criteria.


texts: Reordering blocks without moving them from their original block

texts:
I'm attempting to reorder some blocks store.menu and store.links which are within the block navigation.sections like this:

vendor/magento/module-theme/view/frontend/layout/default.xml

<block class="Magento\Framework\View\Element\Template" name="navigation.sections" before="-" template="Magento_Theme::html/sections.phtml">
            <arguments>
                <argument name="group_name" xsi:type="string">navigation-sections</argument>
                <argument name="group_css" xsi:type="string">nav-sections</argument>
            </arguments>
            <block class="Magento\Framework\View\Element\Template" name="store.menu" group="navigation-sections" template="Magento_Theme::html/container.phtml">
                <arguments>
                    <argument name="title" translate="true" xsi:type="string">Menu</argument>
                </arguments>
                <block class="Magento\Theme\Block\Html\Topmenu" name="catalog.topnav" template="html/topmenu.phtml" ttl="3600" before="-"/>
            </block>
            <block class="Magento\Framework\View\Element\Text" name="store.links" group="navigation-sections">
                <arguments>
                    <argument name="title" translate="true" xsi:type="string">Account</argument>
                    <argument name="use_force" xsi:type="boolean">true</argument>
                    <argument name="text" xsi:type="string"><![CDATA[]]></argument>
                </arguments>
            </block>

I want to put store.links before store.menu. To do this I've created my own default.xml  at app/design/frontend/Matt/New/Magento_Theme/layout/default.xml which contains:

<move element="store.links" destination="navigation.sections" before="-"/>
<move element="store.menu" destination="navigation.sections" after="-"/>

I know that the layout file is working as I'm able to remove these blocks but for some reason the block aren't moving the html output is still:

I can't understand why the blocks won't reorder?


texts:
We want to add Text on Product Image through frontend.

Is we need to use any  frontend libraries or is it possible only by imagemagick or gdlibrary.?

once we add text on image , we need to save that image in backend [order view page ]

is dislaying WYSIWYG Editor on product view page will work ?

There is no help i didt got when i googled it.


texts: Increase php memory_limit using Magento 2 index.php

texts:
I added the line ini_set('memory_limit', '2048M'); into the pub/index.php and reloaded the Nginx config, however, the memory_limit didn't change.

I created a phpinfo.php and the memory_limit1 is still showing 768M...

Cleared /var and pub/static but still not luck.


texts:
I have a local installation of Magento 2 where everything is configured and all the API works fine

I'm doing an app for a client also with Magento 2
Done the same confugurations
And the site always returns
Consumer is not authorized to access %resources
There is anyconfiguration in Magento that we need to configure?

If we give the Guest Access, everything works

We'checked the access keys and every are correct

We use
ConsumerKey
ConsumerSecret
AccessToken
AccessTokenSecret


texts:
I use the below code to get admin url of given frontName/controllerName/Action

protected $storeManagerInterface;

public function __construct(\Magento\Store\Model\StoreManagerInterface $storeManagerInterface)
{
    $this->storeManagerInterface = $storeManagerInterface;
}
public function getAdminUrl()
{
    $store = $this->storeManagerInterface->getStore();
    return $store->getUrl('emailquotepro/emailquote/create');
}

but it return wrong value

  http://host/emailquotepro/emailquote/create/

I expect the url something like

  https://host/admin/emailquotepro/emailquote/create/key/786fd58929a16a83d67cdf0aae51c55cdfb7afdb8f8a124b51deeda3cbc4c9a5/

I check the areacode, it's already set as adminhtml.

If you have any prediction, please let me know.

Thanks.


texts: Magento2 - Communication link failure: 1053 Server

texts:
I am getting this error in logs
Communication link failure: 1053 Server
shutdown in progress, query was:

SELECT catalog_category_entity.* FROM catalog_category_entity
WHERE ((entity_id ='10977')) AND (catalog_category_entity.created_in <= '1574504144') AND
(catalog_category_entity.updated_in > '1574504144') [] []


texts: Magento 2 - why are translations from my CSV file not loading

texts:
I am using Magento 2.2.7 and theme Techno from Themevast.
My app/code/design structure looks like this:

frontend/tv_themevast_package/default
frontend/tv_themevast_package/techno1

Template is using both folders.

I have created i18n in both folders for my translations

frontend/tv_themevast_package/default/i18n/hr_hr.csv
frontend/tv_themevast_package/techno1/i18n/hr_hr.csv

and translations from techno1 seem to be loading but translations from default are not.

I have tried putting translations from default into file that is in techno1 but that didn't help.

When I was translating I have imported CSV file into excel, where I have created translations, and after that had to copy it to Google Sheets in order to get CSV file with double quotes as was in original.
Later I noticed that there are elements in translations like:

"Only registered users can write reviews. Please Sign in or create an account","Only registered users can write reviews. Please Sign in or create an account"

So as suggested I have tried replacing double-double quotes with &quot; but that didn't help.

"Only registered users can write reviews. Please Sign in or create an account","Only registered users can write reviews. Please Sign in or create an account"

So question is:

How can I use translations for default template?


texts:
I have try run command:

php bin/magento setup:upgrade

but get error:

I have set premmision for var and pub folder:

chmod 777 var/cache -R
chmod 777 var -R
chmod 777 pub -R
chmod 777 pub/media -R

Still no work.


texts:
I have created cron for my custom module using this link http://devdocs.magento.com/guides/v2.0/config-guide/cron/custom-cron-ref.html

crontab.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
    <group id="test">
        <job name="test" instance="test\Ship\Cron\Observer" method="cronOderSync">
            <schedule>*/5 * * * *</schedule>
        </job>
    </group>
</config>

And cron_groups.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/cron_groups.xsd">
    <group id="test">
        <schedule_generate_every>5</schedule_generate_every>
        <schedule_ahead_for>4</schedule_ahead_for>
        <schedule_lifetime>4</schedule_lifetime>
        <history_cleanup_every>10</history_cleanup_every>
        <history_success_lifetime>60</history_success_lifetime>
        <history_failure_lifetime>600</history_failure_lifetime>
        <use_separate_process>1</use_separate_process>
    </group>
</config>

So I have two issues:

1) when I run bin/magento cron:run [--group="<cron group name>"], it run all crons file.

2) I have setup schedule in cron_group.xml file, but it did not run cron every 5 minutes automatically.


texts: How to get the quote from the admin session

texts: I have an ajax script where I use Mage::getSingleton('adminhtml/session_quote')->getQuote()->getId() however the result is always null.


texts: Magento2 - How to send mail of form data using AJAX in custom form?

texts:
I have created one inquiry form in magento 2. now I want send data to given EmailID using ajax.
here is my code

<form>

    Full Name:
    <input type="text" class="form-control" id="name">

    Company Name:
    <input type="text" class="form-control" id="companyname">

    Email Id:
    <input type="text" class="form-control" id="emailid">

    Contact Number:
    <input type="text" class="form-control" id="contactnumber">

    Product Name:
    <input type="text" class="form-control" id="productname">

  Comment:
  <textarea class="form-control" rows="5" id="comment"></textarea>

  <button type="submit" class="btn btn-default">Submit</button>
</form>
</form>

now what is the code to add ajax so I can send email of form data