texts: Remove main product image from gallery (and placeholder)

texts:
Steps:

I have a configurable product with main image for thumbnail and everything else.
I create a variation with it's own image.
I select hidden in product page in the main product's image.
Placerholder is shown.
I select a color and now the image is shown.
Problem: the gallery shows two items, one being the placeholder.

Why is this the expected behabior? Makes no sense to show the place holder in the gallery.

How can I remove the placeholder an only leave the simple products images?

I have my own custom theme with some very little edits of luma.


texts: If I write an entire system based on Magento2, can I sell it to another individual?

texts:
Based on Magento2 license agreement, if I write an entire system based on Magento2 platform, will it be considered as my legal property and can I sell my entire system to another individual ?

Currently, we are working on an enterprise level ecommerce solution based on Magento2 platform. We are making hundreds of extensions that overriding Magento's core functionalities without editing the core files, and just by overriding using well-written Magento2 extensions. We are not touching Magento2, and we don't sell/change/add/modify/rename it.

One of our concerns is its license and our business exit strategy: If we build our entire software based on Magento2 as its base platform and core of our software, will it be considered as our own property and not Magento's property ? Our business owner concern is that if we build it based on Magento2, it will be considered as Magento's property and it won't be ours and it will be too dangerous for his business.

But I think if we build extensions for Magento, there is no place in the agreement that confirms its extensions is not Magento's property. I think we shouldn't write the entire software from the beginning to consider it as our own property, right ? Am I missing something?


texts: Magento ver. 2.2.6 - Custom Checkout Step by customer group

texts: I have to add a new custom checkout step which only should appear by a specific customer group.


texts:
I'm just starting the experience of Magento 2.1.2 but I'm having trouble :
I can't acces to Magento directory due of an error 500.
I've put the directory in chmod 775 but my NGINX log say :

  2016/10/16 12:56:18 [error] 31168#31168: *512 FastCGI sent in stderr:
  "PHP message: PHP Fatal error:  Uncaught
  Magento\Framework\Exception\FileSystemException: The file
  "/var/www/magento/var/.regenerate" cannot be deleted
  Warning!unlink(/var/www/magento/var/.regenerate): Permission denied in
  /var/www/magento/vendor/magento/framework/Filesystem/Driver/File.php:382

So it's seems to be a permission issue.
Anyone get an idea?


texts: Magento 2 Component Manager: Could not resolve host:repo.magento.com

texts:
In Magento Component Manager, I am trying to Sign in to sync your Magento Marketplace purchases.
While doing so, I am getting the following error,

  Could not resolve host:repo.magento.com

Please help me to solve this issue.


texts: Magento 2: best practice building classes

texts:
I need some advice how to structure my code in magento 2.
I am working on an ERP interface to import and export products, customers and orders.

So I need some helper classes to take care of some common tasks. Some of these tasks are so generic that need them in any case (import, export, products, customers... you name it).

Example: a logger function will be needed in any of those use cases.

Other functions are more product specific or more customer specific.

My thinking might be antiquated but in M1 I used to create a base helper that get extended by a generic import helper which gets extended by a customer import helper or a product import helper. So no matter what helper I use, I always have the base functions available at all times.

I can do that in M2 but it is cumbersome. Whenever I extend the base helper with new functions I usually have to add new classes to the constructor (DI). But since all other helpers extend the base helper those constructors need to have the same classes as parameters. This is borderline idiotic in my opinion.

So what would be a proper way to do it in magento 2 without a constructor massacre?

Of course I could put everything into ONE class but that is not my idea of clean code.


texts: I have created magento2 hosted payment module, and I used sales_place_order_after event, and the order is created and I redirected to hosted payment page after the payment success I redirect to success page, and I changed the order status from pending to processing. But I can't be able to load the success page because quote is cleared. If this way is correct or any other way is available, please tell me.


texts:
Afer content deploy

php bin/magento setup:static-content:deploy de_CH

php bin/magento cache:clean

in direcrory pub/static..../js created ...min.js files
but magento on frontend try to load not min js
example:
magento try to load pub/static/frontend/dv/themeao/de_CH/js/custom-script.js
but in directory file has name custom-script.min.js

How can i fix it?


texts:
I had "magento 2" installed with composer.
the installation is running correctly.
Now, when I look at the backend or the frontend no Theme appears.

What could be wrong?
I have also tried it with the WebWizzard. Since the same error occurs.

Maybe someone can help


texts: Magento 2 : How to get invoice pdf file through API

texts: In magento2 frontend, Login customer can download particular invoice of order from My Account -> My Order -> Invoice Tab Same Functionality we are developing in android app so my questions is how to get download link of invoice using API ?


texts: Magento 2: Change design and HTML of menu

texts: I want to create a different menu for a new theme with different html structure.


texts:
I added file upload input in AdminHtml Block like this below.
 $fieldset->addField(
            'document',
            'file',
            [
                'name' => 'document',
                'label' => __('Document'),
                'title' => __('Document'),
                'required'  => false,
                 'renderer'  => 'Mymodule\Mak\Block\Adminhtml\Renderer\Document',
            ]
        );

I called the preview like this below
<?php
namespace Mymodule\Mak\Block\Adminhtml\Renderer;

use Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer;
use Magento\Framework\Object as Instance;
use Magento\Store\Model\StoreManagerInterface;
class Document extends AbstractRenderer
{

    private $_storeManager;
   /**
    * @param \Magento\Backend\Block\Context $context
    * @param array $data
    */
   public function __construct(\Magento\Backend\Block\Context $context,
StoreManagerInterface $storemanager, array $data = [])
   {
       $this->_storeManager = $storemanager;
       parent::__construct($context, $data);
       $this->_authorization = $context->getAuthorization();
   }
   /**
    * Renders grid column
    *
    * @param Instance $row
    * @return  string
    */
   public function render($row)
   {
       $row = Instance;
       $imageUrl = $mediaDirectory.'cart2quote/images/'.$this->_getValue($row);
       return '<h1>'.$this->_getValue($row).'</h1>';
   }
 }

But the render is not working


texts: Delete operation is forbidden for current area magento 2

texts:
I added some custom attributes and i
set
- show_address_fields  -> true in the layout for the reference block customer_form_register but i get this error when trying to create a customer. The address is not added but the customer is added so what's the problem. Any help ,please ?


texts: Magento 2.1.3 to 2.2.5 Upgrade Checksum verification of the file failed

texts: I stumbled into this problem while upgrading Magento 2.1.3 to 2.2.5 via composer update. Any ideas?


texts: When does magento pull transactional emails from template files vs. CMS?

texts:
We have configured our emails in the Magento CMS under

system > transactional emails

However, I've noticed now that after placing an order, the email is using the template file located in

/app/locale/en_US/template/email/sales/order_new_guest.html

Why is Magento pulling the email from this file instead of the CMS?


texts: Authorize.net AKAMAI NETWORK update With Magento

texts:
Is anyone else aware of the AKAMAI NETWORK change with authorize.net, and receiving their annoying emails claiming we need to adjust our websites to be on this update?

I run magento sites. Is there anything that needs to be done? Has anyone experienced this yet?


texts:
Iam facing an issue while installing extension through magento web setup wizard

I have created phpinfo file and tried/checked memory limit is 1024M and i have added php.ini or tried .htaccess for this issue but still i am facing the same thing same issue . I have cleared cache , upgrade , static-content . i dont know how to fix this issue .
that is phpinfo link
http://box5738.temp.domains/~thebarkc/info.php


texts:
I have this piece of code:

$shippingMethod = $quote->getShippingAddress()->getShippingMethod();
//result is: mycarrier_mymethodcode

My problem is that it is a string, not an object. So I can not use the

$shippingMethod->getCarrierCode()

How can I get a real shipping method object like this:

 $order = $observer->getEvent()->getData('order');
 $shippingMethod = $order->getShippingMethod(true);
 //the true flag means returns with object not string

by my mycarrier_mymethodcode string?


texts: Magento 2 : Transaction mail Logo And Footer Default Links

texts:
I have question about transaction mail why mail logo can not set ?
I have already set Content > Configuration > transnational
mail
and links like About Us and Customer Service in footer in transnational mail , How can i Change This Links href ? and where it is came From ?


texts: Magento 1.7 Buy Now Button with Custom options and Configurable item checker

texts:
I used this approach for the buy now button on product page

app/design/frontend/your_template/default/template/catalog/product/view.phtml

app/design/frontend/your_template/default/template/catalog/product/view/addtocart.phtml

    <button type=”button” title=”Buy Now” class=”button btn-cart”
onclick=”setcheckoutLocation(‘<?php echo $this->getAddToCartUrl($_product) ?>’)”>Buy Now</button>
    <?php echo $this->getChildHtml(”, true, true) ?>

Refrence : link

But when an item has custom option or a configurable product, it doesn't prompt "required" entry like what the ADD TO CART does. Instead it will say "Shopping cart is Empty". Any solution for this? Thanks!


texts: Magento : How to remove billing address to select custom shipping method?

texts: How to remove the billing address to select the custom shipping methods in Magento?


texts: Magento 2 - How to request file with field name suffix

texts:
I am trying to upload slide image in Magento 2. In some form I have suffix in name attribute for image field like this:

<input id="slide_image" name="slide[image]" class="input-file">

My question is how can request this file in following way as I am trying to request file like this:

$this->getRequest()->getFiles('image');

I have also tried these ways with no luck

$this->getRequest()->getFiles('slide[image]');
$this->getRequest()->getFiles('slide.image');


texts:
I created a store formatted already how I want everything to look.

Then I went to AdminPanel-->System-->ManageStores and I created a
Website, Store, and Store View

When I visit the secondary website all the CSS/formatting returns to default Magento settings.  Is there a way I can carry over all the css from our main website?

If you have any questions or need clarification please let me know.

What I've tried so far is:

Admin Panel --> System --> Configuration

Change the Current Configuration Scope: to my secondary store

For GENERAL-->Web under Secure and Unsecure

I unchecked "Use Default" for the following,

Base Skin URL: http://firstwebsite.com/skin/
Base Media URL: http://firstwebsite.com/media/
Base JavaScript URL: http://firstwebsite.com/js/


texts:
everybody!

In header on my store I need to display a symbol of current currency. In my custom block I inherited from \Magento\Directory\Block\Currency and added following code:

class Currency extends \Magento\Directory\Block\Currency
{
    /**
     * @return string
     */
    public function getCurrentCurrencySymbol()
    {
        return $this
            ->_currencyFactory->create()
            ->load($this->getCurrentCurrencyCode())
            ->getCurrencySymbol();
    }
}

This is work good for me, but when I added additional currency (Russian Ruble) in en_US locale function returned NULL.

I found temporary solution, but I not sure that this good idea.

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$currencies = $objectManager
    ->create('\Magento\CurrencySymbol\Model\System\CurrencysymbolFactory')
    ->create()
    ->getCurrencySymbolsData();

return $currencies[$this->getCurrentCurrencyCode()]['displaySymbol'];

Tell me, please, how I can solve the issue.

Magento 2.1.7


texts: how do save new obj within has set primay in magento2?

texts:
in magento2 when i save new obj $data = [name=>2, label=>new]; when save i call

$mode->setData($data);
$model->save();

how do save new same with $data = [id => "1" name=>2, label=>new];


texts: How to create custom page in magento2 which include one textbox and list off payment methods

texts:
I have created custom template where i just want to list out payment methods in magento2. I do not want to rewrite payment method block but fetch the same block in my custom template.Is there any example in magetno2 so i can do the same
Thanks in advance!


texts: How to remove or hide Browse By Country of Manufacture in products page left bar?

texts: I am using Gocamping Magebuzz theme (Magento 1.9.1) with Manufacture addon . I am trying to hide the browse by --> Country of Manufacture . It is still showing. Suggest how to remove or hide. I have disabled Magebuzz_Manufacturer and tried. No improvement.


texts: How to check IF getOrigData() has changed using Observer?

texts:
I am using customer_address_save_after event to check do stuff when a customer address has been changed/edited.

I need to somehow prevent the execution of my code if the address hasn't changed. This is because the customer_address_save_after event fires on save customer which might mean the address hasn't been changed but a different customer config setting.

Here is what I have tried so far:

I set the $address variable with getData() and $orig_address with getOrigData()

I then want to check if the data has changed since the last save

if($address != $orig_address && $orig_address['updated_at'] < $address['updated_at']){

      Do stuff...

 }

I have done some searching and seen that there is a _hasDataChanges() method but I've never used it and cannot find any examples of it's use...

Any suggestions are welcomed

UPDATE

I've accessed the _hasDataChanges() method which is always going to be true if the save event fires due to the updated_at customer attribute.
I need to find a way to exclude that part of the data from the check...


texts: after login it is not showing customer name in header


texts: Disappearing top.links while refreshing the page second time if enabling the FPC

texts:
I had installed Lesti_FPC module in my website. Recently we had made lot of design changes with the website. Then those changes are migrated to live. After migrating, the top links are disappearing when I refresh the home page in the second time.
I tried flush the magento cache, clear the cache and deleting the cache folder via FTP. Even after those efforts, top links are disappearing.

I checked the Lesti_FPC module. top.links is added to the lazy blocks. I dont know how to get the top.links fixedly seen in the pages.

Can anyone help on this?


texts:
I see that in Magento 2 something changed in the way the page behaves when sorting a product list page or when the number of products visible per page is changed.
In Magento 1 there were parameters added to the url for sorting:

http://demo.magentocommerce.com/men/shirts.html?dir=asc&order=price
http://demo.magentocommerce.com/men/shirts.html?dir=asc&limit=24&order=price

but In magento 2 the sorting and page limit is changed via a POST request.
When I was a 'web development' student I learned that all filtering and sorting should be done via GET, for a better user experience.
This way the user can bookmark a list of 'things' already sorted, or share a link with the list filtered and sorted.

Any good reason why this is not used anymore in Magento 2? And is it worth sacrificing a bit of the customer experience for what ever reason that might be?


texts: Magento 2, Group the options of an attribute in layered navigation frontend

texts:
Magento 2, How can I group the attributes in layered navigation frontend?

For Example:

GROUP NAME 1

-> Filter one

-> Filter two

-> Filter three

GROUPNAME 2

-> Filter one

-> Filter two

-> Filter three


texts:
I have a client who is in need of a store with multiple, independent currency rates. They cannot use the default rate functionality of Magento due to them needing bespoke prices for each currency and product.

To battle this we decided to create a website per currency. However, we also need two store groups and store views for each site. Is there a way to set-up Magento whereby it would be something like the following:

domain.com/website1/store1
domain.com/website1/store2

domain.com/website2/store1
domain.com/website2/store2

I have read of many ways to do each separately (i.e. domain per website and subfolder per store) but not of having both in the URL.

The way I was looking to do this was with a symlink, but I just can't wrap my head around where to start!

Any help would be appreciated, thank you.


texts:
For a specific page, i have a plugin css to be added, i have some css added in my default.xml.

From a specific handle i.e cms_index_index.xml, i want to insert my plugin css at between already included css.

Is there a before, after, order in

<css src="css/ie-8.css" />


texts: Magento 2 How to add foreign key in update schema

texts:
I try to add foreign key constrains for Magento 2 existing tables. I have UpdateSchema script but it's not working.

<?php

namespace Retailers\Customer\Setup;

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

class UpgradeSchema implements UpgradeSchemaInterface
{
    public function upgrade(
        SchemaSetupInterface $setup,
        ModuleContextInterface $context
    ) {
        if (version_compare($context->getVersion(), '2.0.1') < 0) {
            $setup->startSetup();
            $setup->getConnection();
            $setup->getTable('customer_grid_flat')
                ->addColumn(
                    'status',
                    [
                        'type' => \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
                        'length' => '11',
                        'nullable' => false,
                        'default' => '3',
                        'comment' => 'Retailers Is Allow Status',
                    ]
                )
                ->addForeignKey(
                    $setup->getFkName('customer_grid_flat', 'entity_id', 'customer_entity_varchar', 'entity_id'),
                    'entity_id',
                    $setup->getTable('customer_entity_varchar'),
                    'entity_id',
                    \Magento\Framework\DB\Ddl\Table::ACTION_CASCADE
                );
            $setup->endSetup();
        }
    }
}


texts: Magento 2.4.1 installation composer or Archive

texts:
I have to install Magento 2.4.1 for the Live website. There are many options are available for Magento 2.4.1 installation.

Composer
Git
Archive

Can someone tell me which method should I prefer and best? Please give me your suggestions.


texts:
am using magento 1.8.1 http://drugbazar.in/index.php/… this is my website url. I want to give image upload option in front end while upload an image it shows "Please specify the product's required option(s)." help me to fix this error

Note: Here am using custom file upload option for simple products.


texts:
I am trying to locate the correct observer to capture the data when the admin creates a new order. I do not want this observer to be triggered when frontend orders are placed. (Only admin backend created orders)

I have tried the following but these still get triggered if a customer places an order on the frontend.

sales_order_place_before
adminhtml_sales_order_create_process_data
sales_order_save_after

Again, what is the proper observer that will be triggered if the admin creates an order and not the frontend created orders?


texts:
My Code is generated by magerun, normally it works. I'm confused.

I have build an open GIT Repo for checking up my code:

https://github.com/webzellentOpenSource/ti-theme

Downside you will find the error in the system.log:

  2016-11-13T11:14:32+00:00 ERR (3): Warning:
  include(Mage/Webzellentwidgetvideo/Helper/Data.php): failed to open
  stream: No such file or directory  in
  /html/mage-de-1942/lib/Varien/Autoload.php on line 94
      2016-11-13T11:14:32+00:00 ERR (3): Warning: include(): Failed opening 'Mage/Webzellentwidgetvideo/Helper/Data.php' for inclusion
  (include_path='/html/mage-de-1942/app/code/local:/html/mage-de-1942/app/code/community:/html/mage-de-1942/app/code/core:/html/mage-de-1942/lib:.:/usr/local/php/lib/php:/usr/local/php/lib/php/PEAR')
  in /html/mage-de-1942/lib/Varien/Autoload.php on line 94


texts: Multiselect attribute not working on frontend

texts: I have created a custom multi-select attribute for the product in Magento admin. but in the frontend, it is working the same as a dropdown. It is not working multi-select.


texts:
I want to see what database a Magento installation was using. If i observe the file /public_html/app/etc/local.xml

Surprisingly, it shows a database that doesn't exist, even my hosting server is justhost.com it is showing  ?

How is this possible?


texts: Add new index for search vendor in magento2

texts: How to achieve the new functionality of searching vendors in catalog search?


texts: Are these theme folder paths equivalent? Place theme in /vendor/?

texts:
/app/design/frontend/Magento/blank/

&&
/vendor/magento/theme-frontend-blank/

Am I correct to assume /vendor/ is always the fallback from app?
If that is true, could I install my theme to:
/vendor/joshua34/theme-frontend-mytheme/

Does theme registration or another issue prevent theme installation here?
DevDocs states Magento themes can be installed under /vendor/, "when a Magento instance is deployed from the Composer repository."
What about custom themes not installed via composer?


texts: layout section in adminhtml.xml not working

texts:
I have read the Magento Wiki about the <adminhtml> tag is deprecated and new modules should always use adminhtml.xml instead.

But I found that some sections, <layout> in particular, is not read from adminhtml.xml and only works from the <adminhtml> tag in config.xml.

Am I doing it wrong, or Magento is still in the middle of transition?


texts: exception 'Zend_Http_Client_Adapter_Exception' error in exception.log file

texts:
I am trying to send Abandoned cart emails, but emails are not delivering at the scheduled time. even not sending after scheduled time.

cron job is working fine & other emails like welcome , order emails are working fine.

exception.log

exception 'Zend_Http_Client_Adapter_Exception' with message 'Unable to Connect to
 ssl://email.us-east-1.amazonaws.com:443. Error #110: Connection timed out'
 in /lib/Zend/Http/Client/Adapter/Socket.php:235
Stack trace:
#0 /lib/Zend/Http/Client.php(1065): Zend_Http_Client_Adapter_Socket->connect('email.us-east-1...', 443, true)
#1 /app/code/local/Aschroder/SMTPPro/lib/AmazonSES.php(105): Zend_Http_Client->request('POST')
#2 /lib/Zend/Mail/Transport/Abstract.php(348): App_Mail_Transport_AmazonSES->_sendMail()
#3 /lib/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#4 /app/code/local/Aschroder/SMTPPro/Model/Email/Template.php(132): Zend_Mail->send(Object(App_Mail_Transport_AmazonSES))
#5 /app/code/local/Mirasvit/Email/Model/Queue.php(186): Aschroder_SMTPPro_Model_Email_Template->send('kidsdial1@gmail...', 'dyhxnnx nnx', Array)
#6 /app/code/local/Mirasvit/Email/Model/Trigger.php(231): Mirasvit_Email_Model_Queue->send()
#7 /app/code/local/Mirasvit/Email/Model/Trigger.php(302): Mirasvit_Email_Model_Trigger->triggerEvent(Object(Mirasvit_Email_Model_Event), true)
#8 /app/code/local/Mirasvit/Email/controllers/Adminhtml/TriggerController.php(83): Mirasvit_Email_Model_Trigger->sendTest('kidsdial1@gmail...')
#9 /app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mirasvit_Email_Adminhtml_TriggerController->saveAction()
#10 /app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('save')
#11 /app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#12 /app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#13 /app/Mage.php(684): Mage_Core_Model_App->run(Array)
#14 /index.php(83): Mage::run('', 'store')
#15 {main}

i followed link & added line : extension=php_openssl.dll in php.ini file


texts: Magento 2 How to redirect customer to specific store view according to browser language?


texts: Best practice for unit tests in Magento 1.9

texts:
I maintain a Magento 1.9 site with several custom modules. Some of the functionality is business critical and in dire need of some unit tests. E.g. a unit price calculator.

I usually develop in Symfony and would really prefer to somehow use PHPUnit (w/Composer) if that's at all possible.

Some functionality is based on data imported to a several custom database tables so I would prefer to somehow load fixtures.

So I'm looking for the best practice approach to writing some unit tests. I will glady accept tutorials or something similar. Any help is appreciated.


texts: Can we overwrite list.phtml and catalog_category_view in multiple modules?

texts:
Well I am vcery new to Magento,
I have a module where I have already overwritten catalog_category_view.xml and list.phtml can I use the same file with other changes in other modules if Yes how?


texts: in Magento 2.3.1 MySQL search will not work at all? We are on a hosted solution (siteground) and do not have the rights to install something like elasticsearch. Does this mean we will NOT have ANY search capabilities? What options would I have aside from getting a dedicated host?


texts: Using paid modules for multiple websites

texts: I have a paid module which is integrated in website. Can I integrate the same module in another website. In case if I use it would cause any legal issues. How could they track the module usages?


texts: category url is still going to 404 error page

texts: I have tried almost everything , i have even used an extension to over-write the url rewrite but i am not getting the point why i am getting 404 error . I am adding menu using mega menu extension is this an issue ? see the screenshot of the url maybe it will clear some ascpects i am trying to solve this issue from 3 days but no progress .


texts:
I would like to know if Magento EE 1.13.1 works with MYSQL 5.6.41.
Thank you!


texts: UI Component: position custom split button?

texts:
Magento 2.3.0

I've added an split button to admin product edit page with this code ...

<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <settings>
        <buttons>
            <button name="translate" class="Vendor\Module\Block\Adminhtml\Catalog\Product\Edit\Button\Action"/>
        </buttons>
    </settings>
</form>

... the block class with this method ...

public function getButtonData()
{
    return [
        'label' => __('Label'),
        'options' => $this->getOptions(),
        'class_name' => \Magento\Ui\Component\Control\Container::SPLIT_BUTTON,
        'class' => 'secondary',
        'button_class' => 'secondary'
    ];
}

This correctly adds a split button, but as first right button. If I've understood DevDocs right, button should be ordered by "priority" (primary, secondary, ...), but is doesn't work here.

Any ideas how to change this?


texts:
I am facing below error while placing an order on Magento 2 store with payment method Cash On Delivery.

POST http://yoursite.com/rest/ae_en/V1/carts/mine/payment-information 400 (Bad Request)

Is there anyone who faced same issue?


texts:
How can I execute my cron class in command line especially for testing.

normally one could php -f myfile.php

OR

Calling a method's class:
php -r 'include "/path/to/file.php"; ClassName::MethodName();'

I have a Cron class and would like to test in command line to display E.G: 'Hello World!?


texts: Grid/Model Fail When Binary Data Stored In Column

texts:
Preface: I know it's not best-practice to store binary data in the database.  It's a simple and cheap solution to provide the same file across our distributed servers without relying upon a single NFS.

I've got a custom model, and model repository, that when saving it will allow you to upload a binary file (specifically a PKCS12 certificate and key bundle).  The binary data is then extracted and placed into the database correctly.  I can query the DB directly and see that the data is in fact there.

When I go to look at the grid (or edit the record) I have to remove the binary column from the select to get the data to show up.  If I leave the binary data in, then there comes a javascript error relating to invalid JSON because the Magento_Ui/js/core/app key doesn't have a value.

I know I can base64 encode the data, which is what I will most likely do, but is there a way the model could load the binary data but not include it in the KnockoutJS configuration object?


texts: Which files and directories we should commit to VCS

texts:
The fresh Magento installation brings a lot of files and folders to the table. When I measure, it takes like ~150MB. However, I don't think we need them all in VCS (i.e. git), because I can always gather them by composer.

I believe that we should only commit app/code, composer.json and composer.lock. But, I am not 100% sure.

Do you think that I would ever need to change other files for some reason? What is the best practice that the community follows on this topic? Which files do you submit to the VCS, and why?

Cheers,


texts:
I'm trying to override the

  magento/module_customer/view/frontend/templates/account/dashboard/info.phtml

This page:

My code for layout in

  view/frontend/layout

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance dc" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <referenceBlock name="dashboard.info">
        <action method="setTemplate">
            <argument name="template" xsi:type="string">vendor_notifications::account/dashboard/info.phtml"</argument>
        </action>
    </referenceBlock>
</page>

In /templates/account/dashboard/ I have created the info.phtml

I have executed setup:di:compile and cache clean, but it did not work, what I'm doing wrong ?

I have followed this tutorial:


texts:
I'm using a module called Intellimage_Attachs, what I want to do is get the files that I have attached to a product, how would I do this?

Have tried things like:

$product->getAttachs();
$product->getDownloadable();

But no luck any ideas?


texts:
I have been following a few tutorials to try and get started creating a theme and workflow for Magento 2, and am trying to setup so that I can compile all my LESS files locally, as outlined here.

The problem I am having is running grunt exec:mytheme from the root of my Magento installation. I just receive the following error:

A valid Gruntfile could not be found. Please see the getting started guide for more information on how to configure grunt: http://gruntjs.com/getting-started Fatal error: Unable to find Gruntfile.

I have added the neccessary code to the existing dev/tools/grunt/config/themes.js:

mytheme: {
    area: 'frontend',
    name: 'mytheme/default',
    locale: 'en_US',
    files: [
        'css/styles'
    ],
    dsl: 'less'
}

However I am still receiving the missing gruntfile error. Can anyone shed some light on this?


texts: Reflection alternative for dynamic loading classes

texts:
I'm currently writing a module that allows wordpress style shortcodes to be used inside the Magento 2 categories, blogs and pages.
I'm at the point where the shortcode class and key => value pairs are taken from the page and are detecting whether the relevant class is available in the plugins' folder.
$class = new ReflectionClass( __NAMESPACE__ . "\\Shortcode\\" . $attributes['class'] );

As an example I'm loading the class "product" who's code is below
class product extends \Magento\Framework\App\Helper\AbstractHelper {
protected $product;
public function __construct(
    \Magento\Catalog\Api\ProductRepositoryInterface $product
  ){
    $this->product = $product;
  }
  public function execute(){
    $content = "";
    return $content;
  }
}

If I pass the arguments into it with
$instance = $class->newInstanceArgs( array( $attributes['arguments'] ) );

I then get an error that there isn't an instance of \Magento\Catalog\Api\ProductRepositoryInterface being passed as the first argument.
If I don't pass arguments and use a setter method for the parameters, I can't use any of the product methods inside my product class
public function execute(){
    $this->product->getById(12874);
    $content = "";
    return $content;
}

"Uncaught Error: Call to a member function getById() on null"


texts: How does magento handles different template in FRONTEND folder

texts:
I am very dummy to Magento.
In My app\design\frontend folder I have the following folders:

base
default
rwd
MyCustomTemplate

My initial thought was that, since I have configured magento to user the MyCustomerTemplate, all the other folders will be ignored ALWAYS.

However, it seems like sometimes magento look into the base folder and displays results according to the base folder files.

For example, I was trying to edit the popup.phtml for Order tracking, and the file wasn't exist in MyCustomTemplate folder, but I was able to find it in the base folder. and after editing the file I could see the changes are taking place in the magento front end.

My question are:

How can I know when magento uses the file in CustomTemplate and when uses the base folder?

Can other folders like "default" or "rwd" be possibly used?


texts: I have products that have multiple attributes the user can choose from. The problem is the second attribute is visible on the product page but the user can't select it, even if they have chosen a value for the first attribute. How would I fix this?


texts: Export functionality of Custom UI grid in Magento 2 not working

texts:
When I tried to export data to Csv or xml from ui grid in magento2 it says:

  1 exception(s):
  Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid UI Component element name: ''

I had added export button. My code is given below:

<listingToolbar name="listing_top">
   <exportButton name="export_button">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="selectProvider" xsi:type="string">custom_order_grid.custom_order_grid.custom_order_columns.ids</item>
            </item>
        </argument>
   </exportButton>
<listingToolbar>


texts: Is it possible to show different prices in different currency to different users based on their geolocation/IP resolution

texts:
Example:

I want to show the price of same product in same store in $ if a customer from USA is accessing the site and show the price in GBP if a customer is accessing the site from UK.

The price shown can be based on exchange rate or even static.I am using version 1.9
Thanks


texts: Magento 2 rest api - get orders with products' custom attributes

texts:
I would like to have the proper cURL command for getting all pending orders with the products' custom attributes in Magento 2 REST API.
I use this, but there are no custom attributes on the products in the result.

  curl -X GET -H "Authorization: Bearer xxxxxxxxxxxxxxxxxxxx" -H "Cache-Control: no-cache" 'http://xxxxxx.xxx/index.php/rest/V1/orders?searchCriteria[filter_groups][0][filters][0][field]=status&searchCriteria[filter_groups][0][filters][0][value]=pending'

What am I doing wrong? I get everything but not the product attributes and the custom product attributes.


texts: Admin Manage Customers - not showing Customer Information

texts:
When I go to Customers/Manage Customers - the list of customers is Displayed.
When I click on a customer or click on "Edit" the page breaks:

Customer Information

  Customer View
  Account Information
  Addresses
  Orders
  Billing Agreements

See this image: http://postimg.org/image/9nl21664t/full/

How can I fix this?


texts: Fatal Error Layout.php on Frontend after staging environment setup

texts:
I have recently created a staging environment. Back-end works fine. But when I load my staging site I get the following error:

  Fatal error: Class 'Mage_Wishlist_Block_Customer_Sidebar' not found in
  /html/app/code/core/Mage/Core/Model/Layout.php on line 491

I have tried to fix it by clearing all kinds of Caches, and updating layout.php file (app/code/core/Mage/Core/Model/Layout.php):

$out .= $this->getBlock($callback[0])->$callback[1]();

replaced with this one.

$out .= $this->getBlock($callback[0])->{$callback[1]}();

It didn't work.

Can you please help me resolve this, please?


texts: Magento 2: How to remove input option from grid filter

texts:
I want to remove some of filters from my grid in Magento 2 backend admin grid. Currently I have grid like displayed on image. But if I want to remove customer name how to do so.

please explain
thanks


texts: Magento 2 : Catalog Layer has been already created

texts:
On category page I am getting this exception
Catalog Layer has been already created

I tried to debug it in vendor/magento/module-catalog/Model/Layer/Resolver.php, for the moment i commented the code that triggers exception
public function create($layerType)
{
    /*if (isset($this->layer)) {
        throw new \RuntimeException('Catalog Layer has been already created');
    }*/
    if (!isset($this->layersPool[$layerType])) {
        throw new \InvalidArgumentException($layerType . ' does not belong to any registered layer');
    }
    $this->layer = $this->objectManager->create($this->layersPool[$layerType]);
}


texts:
I refer https://www.mageplaza.com/sticky-header-component-magento-2.html
for the sticky header.

I have used the line of code:

<container name="sticky">
<argument name="data" xsi:type="array">
   <item name="config" xsi:type="array">
   <item name="component" xsi:type="string">Magento_Ui/js/grid/sticky/sticky</item>
   <item name="toolbarProvider" xsi:type="string">cms_page_listing.cms_page_listing.listing_top</item>
   <item name="listingProvider" xsi:type="string">cms_page_listing.cms_page_listing.cms_page_columns</item>
   </item>
</argument>
</container>

I am trying, but still header is not fix at top. what is my mistake.


texts: Settings defined in website scopes are ignored

texts:
Since one month, I set up a multistore platform under Magento 2. Everything worked perfectly under version 2.1.2 but since I updated it in 2.1.3 two weeks ago I got a big problem :
All settings defined in website scopes are ignored.
For example, if I set a minimal order amount for one of my websites, I can order normally without any restrictions (not normal). But if I defined this setting in the default scope the restriction work.


texts: how to remove header & footer from login page in magento2?

texts:
I want to remove header & footer from login page.

I tried following code.but its not working.
Can you anyone help me on this?

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="root">
        <referenceContainer name="head" remove="true"/>
        <referenceContainer name="header" remove="true"/>
        <referenceContainer name="menu" remove="true"/>
        <referenceContainer name="notifications" remove="true"/>
        <referenceContainer name="footer" remove="true"/>
        </referenceContainer>
    </body>


texts:
I would like to find a file which "php.ini" on magento because I want to take a extension which "Japanese Core Localize Extension".They say that I should rewrite mbstring on php-extension for using it.

It would be great if someone tell me how to find or create.

Thank you.


texts:
On Magento 1.9.2.2 I need to make it so on category view, if the minimal price of a configurable product is 0, but there are other childs with higher price to show the next minimal price instead of 0.00.

Anyone able to give any suggestions will be greatly appreciated.


texts: AWS elasticache (Redis) for the Magento page and default cache

texts:
I have a Magento 2 based website on an AWS EC2 and an AWS RDS.

I would like to setup AWS ElastiCache Redis for the Magento page and default cache.

I am following the documentation provided here:
http://devdocs.magento.com/guides/v2.1/config-guide/redis/redis-pg-cache.html

As soon as I add cache tag to env.php file, Magento stops working and I get the error:

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


texts: Enabling Use Flat Catalog Category giving error No data received

texts:
I am struggling with an strange issue that when i enable the Use Flat Catalog Category from admin the front is starting giving the following error in chrome

No data received
Unable to load the webpage because the server sent no data.
Here are some suggestions:
Reload this webpage later.
Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.

and in mozzila - > nothing is displaying :'(

Not getting this at all what is going on. Any body any idea about this please help.


texts: move the content in the description product tab

texts:
set of data which want to move on the Description product tab

move the stock information in the description tab in


texts: Item (Mage_Sales_Model_Order) with the same id already exist after Plesk Upgrade

texts:
I've just upgraded MySQL as recommended by Plesk and we're now being hit with the following error when trying to access Sales -> Orders;

  Item (Mage_Sales_Model_Order) with the same id "56321" already exist

Could this have been caused by the update? it wasn't a big update just an incremental one (we're on 5.5.54)

Any help is greatly appreciated

EDIT:
I did actually place a test order on the site and deleted it shortly after using Magehit's extension Delete Order.

I assumed this wouldn't cause an issue as we've done it loads of times in the past.


texts: Odd behaviour with category anchor and layered navagation in M2

texts:
I have a catalog tree with 6 1st level categories, and up to 6 category layers below in sub-categories, for an approx total of 250 categories.

The problem we are having is that we need sub-categories to appear in the Layered Navigation menu, but no categories of any kind actually show up when Anchor = True is set for that category.

Is there a way to show the sub-categories in the Layered Nav while anchor = True ?


texts: Magento 2 - Replace existing Prototype JS with jQuery

texts:
default.xml

<?xml version="1.0"?>
<page
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
    <head>
        <script src="Ei_Productpoint::js/productpoint-slider.js"/>
    </head>
    <body/>
</page>

requirejs-config.js

var config = {
    map: {
        '*': {
            MySlider: 'Namespace_Modulename/js/productpoint-slider'
        }
    }
};

productpoint-slider.js (Prototype JS)

 define(['prototype'],function($){
 // where $ == "prototype"
var MySlider = Class.create();
MySlider.$ = {
initialize: function(amountR, trackR, handleR, decrHandleR, incrHandleR, minPointR, maxPointR, stepR, labelAmountR, checkMaxAmountR) {

        this.minPointsCheck = minPointR;
        this.minPoints = 0;
        this.maxPoints = maxPointR;
        this.pointStep = stepR;

        this.mwSlider = new Control.Slider(this.handleR, this.trackR, {
        range: $R(this.minPoints, this.maxPoints),
        values: this.mwAvailableValue(),
        onSlide: this.changeProductPoint.bind(this),
        onChange: this.changeProductPoint.bind(this)
    });
    },
    mwAvailableValue: function() {
        var values = [];
        for (var i = this.minPoints; i <= this.maxPoints; i += this.pointStep) {
            values.push(i);
        }
        return values;
    }
}

return MySlider;
});

Call to JS function

<script type="text/javascript">

    var productPointVal = '<?php echo $maxPoints; ?>';
    var pointsRedeem = '<?php echo $pointsRedeem; ?>';
    var time = 1000;
    var time_new = 1500;
    var timer;
    var ei_sider = new MySlider(
            'product_point',
            'ei_productpoint_slider_container',
            'ei_slider',
            'ei_productpoint_decr_handle',
            'ei_productpoint_incr_handle',
            0,
            productPointVal,
            1,
            'ei_label_amount'
            );
</script>

Below exception is seen in console.

ReferenceError: MySlider is not defined
var ei_sider = new MySlider(

Followed this link, to use something with similar syntax to the way PrototypeJS handles it, but after including the JS, its not working in Magento 2.0 and throws below exception

TypeError: this.mwSlider is undefined
points = this.mwSlider.getNearestValue(parseInt(points));

How do I convert existing prototype js into jquery so
that it works in 2.0 ?

OR
How do I make prototype js work ?


texts:
I am new in PHP as well as in Magento. I have some questions regarding factory methods and fundamental of PHP of OOPS.   As if we want to call a method in php we instating the class and we call a function and property.

For Example

class A {

  public $a = "some text";

  public function fn(){

   $b = "this is another text";
   }
 }

$B = new A;

Then we can call the function and member like $B->a; and $B->fn();

But in static mathod we call it with class name and then method name using :: scope resolution method.

When I check some functions in Magento in which functiona are calling one by one like..

$categories = Mage::getModel('catalog/category')
                    ->getCollection()
                    ->addAttributeToSelect('*')
                    ->addIsActiveFilter();

I checked in Mage.php file in which getModel() is static method but how this is calling getCollection() method? Can any static method can call another static method of the same class or members? If yes then other static function are not available in Mage.php file?

Till now I have seen only single method calls not seen multiple method call. Please any one can clear my doubts here.

I am sorry if it is silly a question but I dont want to ignore the concept if I am missing somewhere.

Thank you all in advance :)


texts: If I build a module with a indexer, is Magento going to run the reindex automatically each night or do I need to create a cronjob for it?


texts: Magento 2 - How to override knockoutjs template?

texts:
I try to override the following template from my own module
vendor\magento\module-checkout\view\frontend\web\template\minicart\item\default.html

but I don't find the file where I can override it, I searched the whole module-checkout folder for the place where the default.hmtl is added, but can't find it.
Is it possible to override the file?


texts: After enabling PayPal Express site went bonkers

texts:
I am a 1st time user tying to set up a magento store. After enabling PayPal Express and saving changes the page went blank. Now I cant log into the admin page and the web site just shows text and links no html. www.TaberPens.com/mymagento.

Can anyone help?


texts: Display category title on category page, Magento 2.1

texts: Wondering how to display the name of the category on actual category pages in Magento 2?  I can get the image and everything else to show up, just no spot to have the category name in an H1 or something?


texts: How to check if a configurable product has customizable options on Magento 2

texts:
I tried to check if a configurable product has custom options and i can't find anything related to this.

I succeed to solve this problem only for the simple products using this:

$_product->getHasOptions()

but this is not working for the confgiurable products.

Does anyone know how to do that?


texts: Home page list display a bullets before picture and in multiple column

texts:
I have just started using the new Magento release CE 1.9. I write a code in Home page to display my category product but I observed that the image printed on the page has a bullet mark before each product image and also for 3 column prints it display only two picture and other picture in next new line.

I want to display all the three picture in one line then other 3 in second line and so on.

My website: http://shepcart.com


texts:
I have added a custom grid column using the field URL in a custom database:

$this->addColumn('url', array(
    'header'   => Mage::helper('companymodule')->__('Has Website'),
    'align'    => 'left',
    'index'    => 'url',
    'renderer' => new Company_Module_Block_Adminhtml_Module_Grid_Renderer_HasUrl(),
    'type'      => 'options',
    'options'   => Mage::getSingleton('companymodule/hasurl')->getOptionArray(),
));

And created this custom rendered:

class Company_Module_Block_Adminhtml_Module_Grid_Renderer_HasUrl extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
{
    public function render(Varien_Object $row)
    {
        $value = trim((string)$row->getData($this->getColumn()->getIndex()));
        if (empty($value)) {
            return 'No';
        } else {
            return 'Yes';
        }
    }
}

As well as a custom model for the filter dropdwon:

class Company_Module_Model_Hasurl extends Varien_Object
{
    static public function getOptionArray()
    {
        return array(
            'Yes'   => Mage::helper('companymodule')->__('Yes'),
            'No'    => Mage::helper('companymodule')->__('No')
        );
    }
}

This works fine unless you try to filter. I think it's trying to match the value 'Yes' to the value of $row->getData($this->getColumn()->getIndex()) (the URL field in the database table.) But instead of matching the URL field value itself, I am basically trying to filter by ((bool)empty($url)) so that the user can filter by whether or not this database entry has a URL or not.

How can I create custom logic for a filter like this?


texts: Products and categories not displaying in admin

texts:
I have successfully installed magento 2.1.7 but icons are not showing at admin side and i have installed magento with sample data.
Clicking on product tab it is showing me nothing.

I am new in magento so please help.


texts:
i`m trying to make a new theme and i setup the new theme structure like this :

TestVender/
└── TestTheme
    ├── etc
    ├── media
    │   └── TestPreview.jpg
    ├── registration.php
    ├── theme.xml
    └── web
        ├── css
        ├── images
        └── js

after all this i found my theme in the configuration > design .
But i can not see any the sample data that i found in luma theme can any one tell me why ?


texts: Should Elasticsearch 6 be deployed in the same server or virtual server as Magento 2

texts: Elasticsearch 6 is the new default and recommended catalog search for Magento 2 and I learned that it should not be deployed in the same server (vm) as Magento 2. Is it acceptable to have elasticsearch in the same server as a Magento 2 store? and If it is acceptable what would be an acceptable memory allowance in a cloud instance with 8gb ram available for everything?


texts: How can I keep products in CART when guest user Leaves the Site. Magento 2

texts: I want to keep the products in Add to cart for guest user when He leave the site how is it will be possible?? for example I'm a guest user n I add few products in Add to cart n then I close the browser or the site but when I reopen the site then the products which I add before already exists in Cart how is it will be possible??


texts: How to add multiple product to cart and get cart id in magento 1.9 for guest checkout?

texts: I am trying to store multiple products to cart and getting cart id of the products list for generating order in Magento 1.9. I don't know how to create cart and order for guest checkout.


texts:
I am building a magento site to double as our order management system for our sales reps to take orders over the phone. On larger orders, our sales rep need to lower prices for bulk discounting and other reasons. These reasons are a case by case basis and not uniform enough to build rules on through product pricing.

Simply put, which permission do I give my sales-rep role in order to give them the ability to change the price of the item?


texts: Magento 1.9.1.1 puts url in search field

texts:
I'm faced strange thing in Magento

Every time when loading any page (e.g. catalog, product, cms page) it puts the URL of this loaded page in search field.

Template is Madison Island standard rwd package. Nothing was changed in core.

What can be the cause for this bug?
Does anybody else faced such thing?

thanks!

Screenshot


texts: Multiple types of table rate shipping in Magento 2

texts:
Anyone know a solution to do multiple types table rate shipping in Magento 2?

In Magento 1 there was a plugin https://www.magentocommerce.com/magento-connect/webshopapps-matrixrate-1-multiple-table-rates-extension-1.html
but for Magento 2 this plugin look like very advanced and its not one time charge, I have only two types table rate like this

Please suggest me a good plugin or any other solutions to work on Magento 2.1.x


texts: Magento 2 controller not getting url params

texts:
I have a custom controller that will not get the parameters from the URL. Here is the URL: https://mysite/admin/patpdf/pdf/index/order_id/27490.

It should get the order_id in the $this->getRequest()->getParams() or $this->_request->getParams(), but nothing shows up. I don't know if I am doing something wrong as everything I have found online says this is how you get URL params, but it's not working for me.


texts: What is the easy way to edit the maintenance / error 503 page?

texts:
I'd like to modify the generic blank page with a custom template

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


texts: How to add an action on a new button added on a backend form container

texts:
I've successfully added a new button on a form container (near New, Save, Save and Continue) in backend. I tried to use ajax... first adding JS code in adminhtml/layout/default. But the  js code I write does not recognize require or define statements, so I don't have access to requirejs/jquery. How can I properly include javascript in admin or how can I map a controller action to my custom button?

Any ideas?


texts: Magento send new order mail when order is created but not paid

texts:
My Magento eshop will send a new order email to my customer service email account if the customer after pressed the Order button (then will pass to payment gateway), how can i avoid Magento send a order email to the email account before the payment is made?

How can i send it ?


texts: Magento2 - product collection filter out of stock products

texts:
I could not find any relevant reference how to filter out products that are "Out of Stock" when dealing with product collection.
Here is the code sample:

<?php

$collection = $this->productCollectionFactory->create();
$collection->setVisibility($this->catalogProductVisibility->getVisibleInCatalogIds());
$collection = $this->_addProductAttributesAndPrices($collection);

return $collection;

I have set "Display Out of Stock Products" to "No" but that has no affect on given code sample. Is there a common way (e.g. helper method) that can be used to filter out of stock products based on config value set?


texts: How to get transaction id of an order in magento 2?

texts: How to get transaction id of order in Magento 2?


texts: Need help with ui component and change sorting order of columns in magento 2

texts:
Have listing but need to change view of one column:

    <column name="status">
        <settings>
            <filter>text</filter>
            <label translate="true">Status</label>
        </settings>
    </column>

i need to display text as value instead of integer value since in database it has 0 or 1 so in overview i have numerical values.

also another question how to change sorting order of columns since it seem i have actions column in front of some other fields although in xml it's placed as last item


texts: Search result page not displaying items defined in different default.xml files for theme

texts:
I am working on developing a theme. I overrode the default.xml layout file for theme in my, VENDOR/THEME/Magento_Theme/layout/override/base/default.xml. In this file, I have defined some overrides which works fine with other modules, except the CatalogSearch module. When I try to search anything on my theme, it gives me page with blank / null layout. To get the theme specific changes on the search result page, I need to create CatalogSearch module and copy the changes from the override/base/default.xml file and place them to VENDOR/THEME/Magento_CatalogSearch/layout/catalogsearch_result_index.xml file. I do not know why the layout does not work with search but works well with all other modules.

NOTE:  I found that , for some reason, the common items which are defined to be displayed on every page for the theme and defined in default.xml file in other modules; are not displayed on search result page. Do I need to tweak anything on catalogseach_result_index.xml file to pick stuff specified in default.xml files?

Thanks in advance.


texts: How to call phtml file in static block - Magento 2

texts:
I created a file in phtml and would like to call it in a static block.

I created the cms folder inside the theme.

My route is different and is not a duplicate

/public_html/app/design/frontend/Magento/luma/cms/file.phtml

How can I recall this file in a static block?

Thanks


texts: M2E Pro doesn't include Magento Tax rules in eBay item prices

texts:
I'm having trouble with M2E Pro and the way that it lists items on eBay without applying the Magento Tax rules setup for those products.

Here's a link to the M2E Pro documentation for general reference: http://docs.m2epro.com/display/eBayAmazonMagentoV42/M2E+Pro

There doesn't seem to be a solution to listing products and applying the Magento tax rules bar using the 'Price Change' option (within M2E Pro Selling Format Template) on the products to add a tax value. Doing that could cause issues when orders are created in Magento from eBay though because the tax is added to the order.

Price change docs here: http://docs.m2epro.com/display/eBayAmazonMagentoV42/M2E+Pro

The store I'm dealing with doesn't have the tax applied to product prices when they're entered, and Magento handles VAT on product prices through a tax class.

Anyone with any ideas?

Cheers,

Mark.


texts: How to create extension of custom page layout in Magento

texts:
How can i create extension for page layout.
I have no extension for this.


texts:
Magento am total beginner. I started three weeks ago because I should create a shop. Now arises a question? How can I clear the field for order amount at item if it is not needed. As to this page http://www.diedruckerei.de/Visitenkarten,-8,5-x-5,5-cm,-4-4-farbig.htm?websale8=diedruckerei&pi=PVKV844&ci=005896

Button for cart should remain


texts:
I have made two simple shopping cart rules from backend.

The first has action which is based 'SKU is one of'.

The second has action based on 'Brand contains'.

I have made a custom function to display discount code and amount on details page.

But on listing page for Rule 1, I am seeing the Promo Code and Discount Amount of Rule 2.

Alternatively, pls suggest me how to get rule id of a shopping cart rule for Brand and SKU.


texts: Magento 2.3 : Create plugin of __call method

texts:
I need to create plugin for this below file :

  vendor/elasticsearch/elasticsearch/src/Elasticsearch/Client.php

There are __call function in this file :

public function __call($name, $arguments) {
        if (isset($this->registeredNamespaces[$name])) {
            return $this->registeredNamespaces[$name];
        }
        throw new BadMethodCallException("Namespace [$name] not found");
    }

I need to create plugin of this function.

  What I tried :

In frontend/di.xml I added this below line :

<type name="Elasticsearch\Client">
      <plugin name="Vendor_Module::elasticsearcherrorsolver"
                type="Vendor\Module\Plugins\Elasticsearch\Client"/>
</type>

  Vendor\Module\Plugins\Elasticsearch\Client.php

<?php

namespace Vendor\Module\Plugins\Elasticsearch;

class Client {

    public function around__call(\Elasticsearch\Client $subject, callable $proceed, $name, $arguments) {
        $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/Rohan.log');
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);
        $logger->info('Your text message');
        $result = $proceed($name, $arguments);
        // if (!isset($this->registeredNamespaces[$name])) {
        //  return true;
        // }
        return $result;
    }
}

But, It's not working. What should I need to change to call this plugin?

Any help would be appreciated !!


texts: How can I find all config entries for enabled payment or shipping methods and copy them to another store?

texts:
I want to be able to export the enabled payment or shipping methods for a store, then import that into a new store, without overwriting any other configuration values. It's safe to assume that both stores use the same encryption key.

A typical use-case for this might be when trying to maintain an identical payment config across multiple Magento instances, or "merge" one store's payment methods into a second store, but I'm sure there are plenty of other uses.


texts: Error - Requested store is not found in Magento 2 website, How to fix it?

texts:
I have created another website, Stor & Store view in my backend.
When I am trying to load the website with a new store URL, I am getting an error saying Requested store is not found.
But if I type the same URL again I am getting the website working.
I am trying to add the store view code like this when I am typing -https://staging.emerald.lk/aust
This I happening only the first time of URL visiting.
Below is my error log.

{"0":"Requested store is not found","1":"
#0 /chroot/home/aee9c6e2/debe441824.nxcli.net/vendor/magento/module-store/Model/StoreManager.php(168): Magento\Store\Model\StoreRepository->get('')\n
#1 /chroot/home/aee9c6e2/debe441824.nxcli.net/generated/code/Magento/Store/Model/StoreManagerInterface/Proxy.php(119): Magento\Store\Model\StoreManager->getStore('')\n
#2 /chroot/home/aee9c6e2/debe441824.nxcli.net/vendor/magento/module-store/Model/Resolver/Store.php(29): Magento\Store\Model\StoreManagerInterface\Proxy->getStore(NULL)\n
#3 /chroot/home/aee9c6e2/debe441824.nxcli.net/vendor/magento/framework/App/Config/ScopeCodeResolver.php(49): Magento\Store\Model\Resolver\Store->getScope(NULL)\n
#4 /chroot/home/aee9c6e2/debe441824.nxcli.net/vendor/magento/framework/App/Config.php(69): Magento\Framework\App\Config\ScopeCodeResolver->resolve('stores', NULL)\n
#5 /chroot/home/aee9c6e2/debe441824.nxcli.net/vendor/magento/module-store/Model/BaseUrlChecker.php(65): Magento\Framework\App\Config->getValue('web/unsecure/ba...', 'stores')\

Below is the screenshot.

If someone experienced the same and fixed it before please help with this.


texts: Magento 2.2.1 cannot import custom options in different store view / language from another product does not work

texts:
In product ID 192, the product has a color option, and I have translated it for 3 different store view / languages

In FR

In product ID 191 i will the same custom options like in product 192. I click on import options in Customizable Options in default store view, and import it all, then save.

Now change store view to French store, the value should be in French, but all covered by default value.

I tried to import it in French store view, but the value also be covered by default value.

So, how to import it for different store view?


texts: Using SOAP with C#, is it possible to return all currently active shipping methods?

texts:
I'm attempting integrating Magento with our backend software and I'm attempting to link up the backend shipping methods with that provided by Magento.

I've had a look at the SOAP api and cannot see a method for returning all currently active shipping methods, is it possible?


texts: Custom layout based on the attribute set not working

texts:
I've followed this tutorial to add attribute set specific product page layout updates, but  it doesn't work.

Here's my code:

file: app\code\local\Magebase\AttributeSetHandle\etc\config.xml

Code:

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Magebase_AttributeSetHandle>
            <version>0.1.0</version>
        </Magebase_AttributeSetHandle>
    </modules>
    <global>
        <events>
            <controller_action_layout_load_before>
                <observers>
                    <attributesethandle>
                        <class>Magebase_AttributeSetHandle_Model_Observer</class>
                        <method>addAttributeSetHandle</method>
                    </attributesethandle>
                </observers>
            </controller_action_layout_load_before>
        </events>
    </global>
</config>

File: app\code\local\Magebase\AttributeSetHandle\Model\Observer.php

CODE:

<?php
class Magebase_AttributeSetHandle_Model_Observer
{
    /**
     * Converts attribute set name of current product to nice name ([a-z0-9_]+).
     * Adds layout handle PRODUCT_ATTRIBUTE_SET_<attribute_set_nicename> after
     * PRODUCT_TYPE_<product_type_id> handle
     *
     * Event: controller_action_layout_load_before
     *
     * @param Varien_Event_Observer $observer
     */
    public function addAttributeSetHandle(Varien_Event_Observer $observer)
    {
        $product = Mage::registry('current_product');

        /**
         * Return if it is not product page
         */
        if (!($product instanceof Mage_Catalog_Model_Product)) {
            return;
        }

        $attributeSet = Mage::getModel('eav/entity_attribute_set')->load($product->getAttributeSetId());
        /**
         * Convert attribute set name to alphanumeric + underscore string
         */
        $niceName = str_replace('-', '_', $product->formatUrlKey($attributeSet->getAttributeSetName()));

        /* @var $update Mage_Core_Model_Layout_Update */
        $update = $observer->getEvent()->getLayout()->getUpdate();
        $handles = $update->getHandles(); // Store all handles in a variable
        $update->resetHandles(); // Remove all handles

        /**
         * Rearrange layout handles to ensure PRODUCT_<product_id>
         * handle is added last
         */
        foreach ($handles as $handle) {
            $update->addHandle($handle);
            if ($handle == 'PRODUCT_TYPE_' . $product->getTypeId()) {
                $update->addHandle('PRODUCT_ATTRIBUTE_SET_' . $niceName);
            }
        }
    }
}

In the local.xml inside the <layout></layout> i've added:

<PRODUCT_ATTRIBUTE_SET_Informatica>
    <reference name="product.info">
      <action method="setTemplate"><template>catalog/product/view-informatica.phtml</template></action>
    </reference>
</PRODUCT_ATTRIBUTE_SET_Informatica>

My attribute set is named Informatica and the customized view.phtml is located in design/frontend/[my-custom-tample]/default/template/catalog/product

What am I missing here?

Please help :)

Thanks guys,


texts:
If there's a problem on the checkout, the error is displayed near the top, for 5 seconds and then it goes away. Most customers don't even see the message.

Often, on smaller devices, the message isn't seen by the customer and they will continue to repeat the action, regardless of the message.

I have managed to get the error to display longer than 5 seconds, but a better method would be displaying the error in a pop-up modal that would display even on mobile devices.

However, I can not seem to find a way to be able to display customer frontend errors inside a modal that would require an action to close.

Is there a module than allows the front end error message to be displayed in a popup modal?

If anyone has an idea on how to make this happen, please let me know. I think it would go long way into helping the customer complete the order, rather than abandoning the cart, because they didn't see the error.

Maybe I'm using the wrong search terms for this, but I had a hard time imagining I'm the only one having this issue.

Thank you.


texts: Getting ko_unique_1=flatrate_flatrate#shipping in URL as param when clicking Next button on Shipping step. The page gets redirected to shipping step and customers are unable to proceed.


texts: How to have a reference to an extra factory

texts:
I'm trying to have a reference to a model factory to load an object on desire.
I just added a parameter to the constructor, but it generates an error:
(The parent constructor doesn't have the parameter: "\Magento\Catalog\Model\CategoryFactory $categoryFactory")

  1 exception(s): Exception #0 (Exception): Recoverable Error: Argument
  5 passed to Amaj\MegaMenu\Block\Html\Topmenu::__construct() must be an
  instance of Magento\Catalog\Model\CategoryFactory, none given, called
  in
  D:\ProgramFiles\wamp64\www\parastoo\var\generation\Amaj\MegaMenu\Block\Html\Topmenu\Interceptor.php
  on line 14 and defined in
  D:\ProgramFiles\wamp64\www\parastoo\app\code\Amaj\MegaMenu\Block\Html\Topmenu.php
  on line 33

What am I doing wrong? please help

Source code:

<?php

namespace Amaj\MegaMenu\Block\Html;

use Magento\Framework\DataObject\IdentityInterface;
use Magento\Framework\View\Element\Template;
use Magento\Framework\Data\TreeFactory;
use Magento\Framework\Data\Tree\Node;
use Magento\Framework\Data\Tree\NodeFactory;

/**
 * Html page top menu block
 */
class Topmenu extends \Magento\Theme\Block\Html\Topmenu
{

    protected $categoryFactory;

    /**
     * @param Template\Context $context
     * @param NodeFactory $nodeFactory
     * @param TreeFactory $treeFactory
     * @param array $data
     * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory
     */
    public function __construct(
        Template\Context $context,
        NodeFactory $nodeFactory,
        TreeFactory $treeFactory,
        array $data = [],
        \Magento\Catalog\Model\CategoryFactory $categoryFactory
    ) {
        $this->categoryFactory = $categoryFactory;
        parent::__construct($context, $nodeFactory, $treeFactory, $data);
    }
}


texts: Magento logging with AWS Cloudwatch - UTC Offset format

texts:
I'm trying to integrate Magento logs with AWS Cloudwatch.

My datetime_format configuration in the awslog.conf file:

datetime_format = %Y-%m-%dT%H:%M:%S%z

Unfortunately, error messages occur:

Fall back to current time: {'timestamp': 1506379619020, 'start_position': 1645634L, 'end_position': 1645928L}, reason: timestamp could not be parsed from message.

Assuming that these result from the timestamp formatting, I have checked the AWS cloudwatch log documentation http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AgentReference.html. It is written a bit ambiguously:

  The timezone offset (%z) is also supported even though it's not
  supported until python 3.2, [+-]HHMM without colon(:).

While the written text could mean both (with or without colon is correct), it seems to me as if the correct format is without colon. Is there a way to take over the timestamps properly, or could they be modified in Magento beforehand?


texts:
I am trying to set a cronjob for export order to another website in Magento 1.9.3
please, anyone, have an idea then plz share it with me.


texts: Magento2 - How to know in model billing-step or shipping-step

texts:
Magento2 - I want to know, its billing address or shipping address in checkout page.

How to check, checkout form is billing form or shipping form...

Thanks.


texts: Mage-messages are not working in magento 2 due to cookie SameSite:None

texts:
I have faced some problems with mage messages. Actually, they are working fine before when i have not done anything on the server. But after adding below line =>
Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure;SameSite=None

All mage-messages are not working. I know this is not a Magento relevant question but somehow I am very curious about & want to know why these messages stop. If I removed set-cookie same-site=none from the server then it will work fine.
If someone faces the same problem please let me know.
Add i don't want to remove Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure;SameSite=None
because the latest browser update like Chrome treats cookies with no Same site value as SameSite = Lax. And it disables 3rd party modules using the cookies. So it is important to add any cross-site cookies to SameSite=None and label them as secure.


texts:
class BS_Flooring_Block_Catalog_Product_View extends Mage_Catalog_Block_Product_View
{

public function getBoSuaFlooringJsonConfig()
{
    $config = array();

    foreach ($this->getProduct()->getOptions() as $option) {
        /* @var $option Mage_Catalog_Model_Product_Option */
        $priceValue = 0;
       //Mage::log($option);
       if($option->getType()==Mage_Catalog_Model_Product_Option::OPTION_TYPE_FIELD){
        $config['label'] = $option->getTitle();
        $config['sqinput'] = $option->getId();
       }

        if($option->getType()==Mage_Catalog_Model_Product_Option::OPTION_TYPE_RADIO){
            $config['options'] = array();
            $count = 1;
            foreach ($option->getValues() as $_value) {
                $count++;
                $config['options'][] = array('id'=>"options_".$option->getId()."_".$count,'price'=>$_value->getPrice());

            }
       }
    }
    $config['coverage'] = $this->getProduct()->getFlooringCoverage();
    $config['id'] = $this->getProduct()->getId();
    $config['isflooring'] = $this->getProduct()->getIsFlooringProduct();
    $config['price'] = $this->getProduct()->getFinalPrice();
    $config['prices'] = $this->getTierPrices($this->getProduct());
  return Mage::helper('core')->jsonEncode($config);
    }

}

Above code returns a array.

After uploading new theme file it stopped working what should i do???


texts: Sell different products on a single page

texts:
I have to create a single page that needs to show various type of products (simple, grouped and bundle) and they have to be added to the cart.

In addition to this I cannot set a "add to cart" button for every product, but I have to use only one "add to cart" button that works for all the products in the page.

Is it possible? Anyone could guide me in the right direction?


texts: When i add product more than 50 in  my cart in magento and place order the cart page place order process tooo slow how i make it fast ??


texts: Magento 2 Meta Description on Admin Product Edit page not working

texts:
My data is not showing on product edit page admin.
Its shows error like below

Console showing me ReferenceError: showSpinner is not defined in https://demo.com/pub/static/adminhtml/Magento/backend/en_US/knockoutjs/knockout.js line 2624 > Function

Thanks for your answer in advance.


texts: What browsers are supported by Magento's PWA Studio?


texts:
One of my clients asked me to upgrade his website which was built on Magento 1.3, now I am trying to upgrade it to Magento 1.4 so that I can upgrade it to Magento 1.7.

Magento Connect is not working here. So I am using SSH but when I try to initialize pear through this command:

./pear mage-setup

it throws the error:

Could not open the file /path/pearmage.php

Without initializing pear i can not proceed.

Please help,
Thanks in advance


texts: Magento 2 Execute jQuery when minicart is done loading

texts:
I'm having the problem currently where I need to run some jQuery on my Minicart. However, I can't select anything from the Minicart because the jQuery is executing before the Minicart is actually loaded on to the page.

My jQuery is contained within:

  Magento_Checkout/templates/cart/minicart.phtml

and the jQuery is as follows:

<script>
    require(["jquery"], function ($) {
        //jQuery(document).ready(function(){
        jQuery(window).on('load', function(){
            let counter = 0;
            $("#minicart-content-wrapper").children().each(function(){
                counter++;
            });
            console.log("Num items in minicart: " + counter);
        });
    });
</script>

You can see from this I have tried both document ready and window on load but both return 0 in the counter. I have managed to select the parent of the Minicart and that outputs 1 so the jQuery is working as intended.

So my question is, is there an alternative place I can run some jQuery so that it will execute once the Minicart has finished loading on the page?

Update:

I have figured out a short-term solution where I can execute some jQuery once the Minicart logo is clicked however, this is not ideal as I want to edit the styling of the Minicart. This styling should be done straight away rather than when a user clicks the logo because on slower devices this could affect the look and feel as elements change on the page.


texts:
i created a button in the order/view page in magento2 backend, and would like to call a controller when button in clicked.

In my module, I added :
etc/adminhtml/routes.xml

<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="adminhtml">
        <route frontName="xstateupdate" id="xstateupdate">
            <module name="My_Module"/>
        </route>
    </router>
</config>

Conroller/Xstateupdate/Index.php

<?php

namespace My\Module\Controller\Xstateupdate;

class Index extends \Magento\Framework\App\Action\Action {

    public function execute()
    {
Breakpoint on something;

    }
}

In order to check if my controller was working, I manually entered the url :
www.xxx.com/admin_toto/admin/xstateupdate/xstateupdate/index.php But it reloads magento backend page and does not trigger my breakpoint...

Thank you for your help


texts: Keep billing info saved in Magento Onepage Checkout Billing step

texts:
Does anyone know the name of the file/plugin that is used to keep billing information saved in the billing form in Magento Onepage checkout? It keeps billing info saved in the form even if the page is refreshed.

I have a custom theme that I need to add this to. I have already copied the billing.phmtl file from the base theme into my theme but it does work as it does in the base theme so I assume it must be done using Javascript.

I would like to know how this is done if someone knows and is happy to share I would be very grateful.


texts: Is it possible to delete an image from google search results without approval of site owner?

texts:
We have a Magento site with lots of images. Since we have competitors, there is a possibility to delete the images from the search engines like google image search.

In this case, I want to know that, is it possible to delete an image from google image search without the approval of website owner?

I have read many posts about it but not have a satisfied answer. Could anyone please help me with this?


texts: How to use customer token to access my account Query or Mutation in GraphQl

texts:
I am using magetno 2.3.x and I want to access my account queries provided by  Magento_CustomerGraphQl module.

I have installed ChromeiQl to execute GraphQl.
I set Site Endpoint as per syntax provided by magento devdocs.

I have generated the customer token using provided type Mutation

type Mutation {
    generateCustomerToken(email: String!, password: String!)
    {
      token
    }
}

But I did not get any way to use this token in ChromiQL as authorization Header.


texts: Building a highly customizable marketplace

texts:
I have to building a very customized marketplace and would like some advises. Basically weather or not Magento could be a good choice.

I have to building a very customized marketplace and would like some advice.

Some constraints we have:

The sellers of the marketplace must have a highly customized and beautiful back-office.
We treat sellers like we treat customers, with proper workflow and UX well integrated with the front-end site

It is not just CSS and HTML lay outing. We want to have home-made workflows to handle product creation, seller profile... actually, a seller can also purchase products from other sellers. Our sellers are not industry manufacturers but rather individuals with low stock. We are somehow on the same kind of market than the "Do It Yourself".

We need some features like:

fast e-commerce website
custom outfit sizing model
promotion periods
"virtual stores" (aggregates of multiple sellers)
customers can like products of sellers
customers can follow sellers
flash sales and promotions for followers of a seller
products must be validated after any modification before being published
sellers can create collections with their own products
some authorized users (socially in fluent users/partners) can create product collections from multiple sellers
we don't handle product stocks. Sellers are shipping directly to the customer. I think we call this "drop shipping". We must be able to sell products from anywhere to anywhere in the world and compute delivery and VAT costs accordingly.
mobile website

To give some background, I am an experienced Java/Scala/Js developer. I an not so much experienced with e-commerce solutions nor with PHP. Actually I don't like so much PHP (but would still choose it if it's the right tool for the job, and it seems to for most e-commerce websites...).

We have to migrate an existing custom PHP marketplace. It has most of these features, but a lot of bugs, a bad data model design, no unit tests, no documentation, a lot of SQL slow queries with many joins and not properly optimized.

We are considering Magento, but it seems that according to our current data model and features, the migration would be quite heavy, or we would have to temporarily remove features if we want something in production in less than months...

I've also seen Magento has its own database model, flexible using key-value pairs but quite complex.

With all the customization I need, is Magento a good fit?

I'm frightened to "fight against the framework" most of the time and finally to get poor performances because of the complexity.


texts:
I am trying to transfer my live site to a local host on my PC, I did the following:

All the website's files are in C:\xampp\htdocs\html. I also imported the database and changed env.php and web/secure/url and web/unsecure/url (to 127.0.0.1/html). The problem is that there are errors in the code where $_SERVER['DOCUMENT_ROOT'] is being used.

I tried changing inside httpd.conf the document root from

DocumentRoot "C:/xampp/htdocs"
<Directory "C:/xampp/htdocs">

to

DocumentRoot "C:/xampp/htdocs/html"
<Directory "C:/xampp/htdocs/html">

And the result was that my site was showing, but all pages are 404.

Am I missing something? maybe some DB configuration or Magento's file for local environment?

thanks.


texts:
I have looked all over the internet but I could find only Next and Previous for products, but I want to have it at the bottom of category page where all the products (list.phtml) are listed.

I have attached a sample below. The example is from 25,000 - 50,000 Gallons category so before it is 700 - 25,000 Gallons category and 50,000 - 100,000 Gallons after it.

Any help will be highly appreciated.


texts:
What is a best practice to remove some block without commenting

<my_layout_handle>
       <reference name="content">
                <block type="core/template" name="name.button" template="custom/new-button.phtml" /> //remove this block
       </reference>
</my_layout_handle>

EDIT:

This is what I was looking for:

<my_layout_handle>
    <reference name="content">
        <action method="unsetChild">
           <block type="core/template" name="name.button" template="custom/new-button.phtml" /> //unset this block
        </action>
    </reference>
</my_layout_handle>


texts:
Can somebody tell me how can i remove category-id and view-id path to my products url?
I drag and drop categories to new and this proplem started.


texts: Add additional class to breadcrumbs  on every page

texts:
I am trying to add an additional class to the breadcrumbs block via a layout XML update. For example, I want the following line of code that appears below the header block by default in the blank theme:

To become as shown below on every page in the site:

So far I have added the following line of code to the app/design/frontend/[Vendor_Name]/[theme_dir]/Magento_Theme/layout/default.xml file:

<referenceBlock name="breadcrumbs" htmlClass="breadcrumbs container-fluid" />

After clearing all caches the change seems to have no effect on the frontend. Has anybody had any experience trying to change the class of the breadcrumbs container div?


texts: How to validate extra field added to the customer information in admin?

texts: In my custom module i added two extra field to the customer information displayed in admin->Customers->CustomerInformation->AccountInformation using install file. Now i want to add the validation to newly added field how can it be achieved?


texts: Magento 2 : How can I use LESS variables in Modules' LESS files? (not theme)

texts:
I try to include specific LESS variables in my Modules' LESS stylesheet. Note: my module, not my theme.

For example have a file called app/code/Vendor/Module/view/frontend/web/css/stylesheet.less. How can I use the parameters from lib/web/css/source/lib/variables/_layout.less in this stylesheet (like @layout-indent__width for example)?

Edit #1

I figured out I could do this like so:

@import '../../../../../../../../lib/web/css/source/lib/_variables.less';
@import '../../../../../../../../lib/web/css/source/lib/_responsive.less';

But somehow this doesn't look like the correct way to do this. Any suggestions on this?

Edit #2

I figured that including the LESS files like this would omit my variable overrides in my themes' _theme.less. Since the stylesheet in question is located in var/view_preprocessed/css/frontend/ThemeVendor/ThemeName/en_US/Vendor_Module/css I had to change the @import-directives to:

@import '../../css/source/lib/_variables.less';
@import '../../css/source/_theme.less';
@import '../../css/source/lib/_responsive.less';

Still seems a bit quirky, but at least it works :-/

I'm still open for suggestions though. This solution doesn't look right to me.

Edit #3:

I stand corrected, none of the above works anymore. I knew it was unstable to start with. :-/ Any suggestions anyone?


texts: Create custom field(checkboxes) for product form on admin

texts:
I want to add custom checkboxes to the product form on admin. I tried using the following code:
<htmlContent name="typeofstore" sortOrder="2">
    <argument name="data" xsi:type="array">
        <item name="wrapper" xsi:type="array">
            <item name="label" xsi:type="string" translate="true">Type Of store</item>
            <item name="collapsible" xsi:type="boolean">true</item>
            <item name="opened" xsi:type="boolean">false</item>
        </item>
    </argument>
    <settings>
        <wrapper>
            <canShow>true</canShow>
            <componentType>fieldset</componentType>
        </wrapper>
    </settings>
    <block name="typeofstore" class="Forms\Registration\Block\Adminhtml\Product\Store" template="Forms_Registration::product/typeofstore.phtml"/>
</htmlContent>

but the issue is that I want to add the custom data to the product tables of magento so that I can export the custom fields to the CSV file.
I also tried using the checkbox set but that does not work, the page kept loading for ages,
Updated here
thanks Jigs. your answer helped me to get closer to what i want.
one question, how to separate the labels and values, for example,
I want to add multiselect and lables would be label 1, label 2 with values 1,2 respectively,
Is there any way to do this.


texts: Does Magento 2 follow the PSR2 or Zend standard?

texts:
I am testing my extension code against the PSR2 and Zend standards. However, the two standards conflict. I found a problem which I fixed for Zend, which then showed as an error in PSR2. If I fix it for PSR2 it will show as error for Zend. Which is the preferred standard for Magento 2?

  Zend Error:: Opening brace should be on a new line

  PSR2 Error:: Whitespace found at end of line

The same goes for _:

  PSR2 ::Property name "$_productLoader" should not be prefixed with an
  underscore to indicate visibility

  Zend ::underscore to indicate visibility Protected member variable "productLoader" must contain a leading underscore


texts: Magento 2 override cacheable="false" with own theme

texts:
I'm trying to override a Magento default xml layout file vendor/magento/module-review/view/frontend/layout/customer_account_index.xml

<referenceContainer name="content">
    <block class="Magento\Review\Block\Customer\Recent" name="customer_account_dashboard_info1" template="Magento_Review::customer/recent.phtml" after="customer_account_dashboard_address" cacheable="false"/>
</referenceContainer>

I need to change cacheable="false" to cacheable="true"

So I try to override the layout xml as I normally do, by creating a new folder like this in my own template,

app/design/frontend/my_vendor/my_theme/Magento_Review/layout/customer_account_index.xml

and I changed cacheable="true" as following,

<referenceContainer name="content">
    <block class="Magento\Review\Block\Customer\Recent" name="customer_account_dashboard_info1" template="Magento_Review::customer/recent1.phtml" after="customer_account_dashboard_address" cacheable="true"/>
</referenceContainer>

But this didn't work. The page loads both my own xml and xml from vendor folder, so now I have both cacheable="false" and cacheable="true" on the same layout.

But I need to remove cacheable="false", so full page cache can be used.

I have cleared cache.

Did I miss anything?


texts:
When on checkout if language switcher is applied it gives 404 error.
If same url is opend in new tab it displays the page.


texts: How to Hide Header(Primary) Menu before login (for Visitors)?

texts:
Magento 2 Version - Magento 2.1.4 CE

I am trying to create Custom Module for Compulsory login.

When user hits the website url it must needs to redirect on login screen and after logged in user can surf or visit our website.

So Compulsory login functionality i have already done by creating custom module.

Here the issue is how to hide menu ? before login(visitors) ?

i want to hide header menu for visitors. once user is logged in then and then menu will show otherwise it needs to be hide.

Hope it clears.

Update :

I know by overriding the topmenu.phtml i can achieve this. but issue here is if i override topmenu.phtml then myaccount,logout links in dropdown are disappear.

Check below screenshot :


texts:
I'm using a Magento 2.3 instance, how could I export my orders in a CSV file by date range via SQL?

I want to have the shippingId, orderId and paymentId included in it.


texts: Chekout issue POST/rest/default/V1/carts/mine/set-payment-information-and-get-totals 400

texts:
I have an issue in checkout. It will make me crazy... The last days i try to understand why is happened.
When a customer is registered and go to checkout the issue is
POST https://mysite/rest/default/V1/carts/mine/set-payment-information-and-get-totals 400 main.js?attr=9IDcL1d…Qz3N6ZuKrKVk6g:2666
xhrSendProcessor    @   main.js?attr=9IDcL1d…Qz3N6ZuKrKVk6g:2666
window.XMLHttpRequest.send  @   main.js?attr=9IDcL1d…Qz3N6ZuKrKVk6g:2557
send    @   jquery.js:10260
ajax    @   jquery.js:9744
post    @   storage.js:46
(anonymous) @   set-payment-and-update-totals.js:32
(anonymous) @   cash-on-delivery-fee.js:26
notifySubscribers   @   knockout.js:1320
valueHasMutated @   knockout.js:1538
observable  @   knockout.js:1504
(anonymous) @   select-payment-method.js:20
_super  @   wrapper.js:73
(anonymous) @   select-payment-method-mixin.js:20
(anonymous) @   wrapper.js:78
selectPaymentMethod @   default.js:176
(anonymous) @   knockout.js:4245
dispatch    @   jquery.js:5232
elemData.handle @   jquery.js:4884

POST https://mysite/rest/default/V1/carts/mine/set-payment-information 400 main.js?attr=9IDcL1d…Qz3N6ZuKrKVk6g:2666
xhrSendProcessor    @   main.js?attr=9IDcL1d…Qz3N6ZuKrKVk6g:2666
window.XMLHttpRequest.send  @   main.js?attr=9IDcL1d…Qz3N6ZuKrKVk6g:2557
send    @   jquery.js:10260
ajax    @   jquery.js:9744
post    @   storage.js:46
(anonymous) @   set-payment-information-extended.js:73
(anonymous) @   select-payment-method-mixin.js:27
(anonymous) @   wrapper.js:78
selectPaymentMethod @   default.js:176
(anonymous) @   knockout.js:4245
dispatch    @   jquery.js:5232
elemData.handle @   jquery.js:4884

I try to disable all extensions in checkout but with no luck
My first thought is that could be an issue from cookies...
Guest user place order without problem, Registred user have this issue and when they click Place Order they redirect to cart
How can i find or solve this? Had anyone face it?
I Request Payload (set-payment-information-and-get-totals)
for guest user
{cartId: "dxJXdNDj7P2PLpF7puxeFGwRcrKOlAjX",…}
billingAddress: {countryId: "GR", regionId: "489", regionCode: "AT", region: "Αττικής", street: ["test"], company: "",…}
city: "test"
company: ""
countryId: "GR"
firstname: "test"
lastname: "test"
postcode: "12345"
region: "Αττικής"
regionCode: "AT"
regionId: "489"
saveInAddressBook: null
street: ["test"]
telephone: "3213213213"
cartId: "dxJXdNDj7P2PLpF7puxeFGwRcrKOlAjX"
email: "mail@gmail.com"

for registered user
{cartId: "4913",…}
billingAddress: {customerAddressId: "114", countryId: "GR", regionId: "489", regionCode: "AT", region: "Αττικής",…}
city: "city"
company: null
countryId: "GR"
customAttributes: []
customerAddressId: "114"
customerId: "735"
fax: null
firstname: "name"
lastname: "lastname"
middlename: null
postcode: "172 37"
prefix: null
region: "region"
regionCode: "AT"
regionId: "489"
saveInAddressBook: null
street: ["street"]
suffix: null
telephone: "telephone"
vatId: null
cartId: "4913"

I See some questions for this but it isn't solved
I use Magento 2.4.2


texts:
I'm working on migrating my site over to a new server and everything is up and running, except when I go to add an item into stock it doesn't work.

  I am not getting a Magento error nor is it showing an error in my
  error log. There is also no errors in the console when I inspect the page.
  I have tried clearing my cache, and this error exists on different
  browsers. Where should I look next to get this fixed?

Edit: there are no DB errors that I can see, and the items are in stock


texts: Magento 2: How To Include 3rd Party Library in Custom Module

texts:
As an example, I'm looking to use Zendesk's API to create tickets and other things within my custom modules. They have a Packagist that can be installed via composer:

composer require zendesk/zendesk_api_client_php

Now I'm a bit confused on how to actually call or load this API in my custom module(s).

For example, how would you call the Zendesk API library in a custom observer module:

<?php
namespace MyCompany\MyModule\Observer;

use Magento\Framework\Event\ObserverInterface;

class SalesOrderShipmentSaveAfter implements ObserverInterface
{
  public function execute(\Magento\Framework\Event\Observer $observer)
    {
         // Do something here using Zendesk API
    }
}

Is it declared in MyCompany/MyModule composer.json file?


texts: Problem with addWebsiteFilter and addStoreFilter

texts:
I am working on my product collection query. I used "addWebsiteFilter" and "addStoreFilter" in my collection query. The problem is addWebsiteFilter supports array of website ids but addStoreFilter not supporting array of store ids so my query return error. Is any other method which supports array of store id for filtering product collection.

$collection_new = Mage::getModel('catalog/product')
->getCollection()
->addAttributeToSelect(array('description','price'))
->addWebsiteFilter($web_id)
->addStoreFilter($storeId)
->addAttributeToFilter('status', 1);


texts: Magento 2 : Custom Checkout Step Issue While Reload

texts:
Before reload the checkout page, the shipping-method step look like this.

After reload the checkout page, the shipping-method step look like this

anyone please help.


texts: How to disable all extensions by a vendor

texts:
I am stuck with a crappy vendor whose extensions have lot of bugs.

I want to disable all the extensions from that vendor for sometime, without deleting the inside settings, to check if some other problems are caused by this extension or not.

How can I disable all extension from a vendor in shortest possible way?


texts:
Is there a way to show Custom Variables in Magento Description?

There are lots of products which has a paragraph as common, so I want to use the variable for that.

In case something changes in future, I can get it done by editing variable.


texts: I want to stick my cart.summary (sidebar) in cart page. mean that, when i scroll down to see other items in cart page, side bar stick in the left and always can see him over scroll up or down.