texts: Add option for custom select attribute on customer edit page Magento 2

texts:
I want to add my own custom option for an attribute.Please see attached image.

Just guide me which files i need to create.

I have just created one file for now.
Please see code below,
app/code/Vendor/Module/view/base/ui_component/customer_form.xml

<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <fieldset name="customer">
        <field name="ffl" formElement="select">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="source" xsi:type="string">customer</item>
                </item>
            </argument>
            <settings>
                <dataType>text</dataType>
                <visible>true</visible>
            </settings>
        </field>
    </fieldset>
</form>


texts:
i want to display on my product view all the products that have the same value of an attribute.
In my case, i want to show all the products(books) who have the same editor as my current product.
When i iterate, it renders all the products.

 <?php  $same_editions=Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*')-  >addAttributeToFilter('editeur',array('eq'=>$_product->getEditeur()))->load();
?>
<p>
<?php foreach($same_editions as $editeur){
  $editeur = Mage::getModel('catalog/product')->load($editeur->getId());?>
<?php echo $editeur->getName();?>
</p>
<?php }?>

My attribute name is : editeur.


texts: Magento2.3.2: Path "app/etc/" cannot be used with directory "/app/etc/"

texts:
I am working on Magento2.3.2

When I tried to enable cache types from the admin panel, I am getting the following error.

Path "/opt/bitnami/apps/magento/htdocs/app/etc/" cannot be used with directory "/opt/bitnami/apps/magento/htdocs/app/etc/"

I am not seeing any log also.

I tried changing all permissions by using the following commands

sudo find . -type d -exec chmod 755 {} \;
sudo find . -type f -exec chmod 644 {} \;

After I used to run above commands, I am getting the following Fatal error:

  Fatal error: Uncaught Zend_Cache_Exception: cache_dir
  "/opt/bitnami/apps/magento/htdocs/var/page_cache" is not writable in
  /opt/bitnami/apps/magento/htdocs/vendor/magento/zendframework1/library/Zend/Cache.php:209
  Stack trace: #0
  /opt/bitnami/apps/magento/htdocs/vendor/magento/zendframework1/library/Zend/Cache/Backend/File.php(180):
  Zend_Cache::throwException('cache_dir "/opt...') #1
  /opt/bitnami/apps/magento/htdocs/vendor/colinmollenhour/cache-backend-file/File.php(87):
  Zend_Cache_Backend_File->setCacheDir('/opt/bitnami/ap...') #2
  /opt/bitnami/apps/magento/htdocs/vendor/magento/zendframework1/library/Zend/Cache.php(153):
  Cm_Cache_Backend_File->__construct(Array) #3
  /opt/bitnami/apps/magento/htdocs/vendor/magento/zendframework1/library/Zend/Cache.php(94):
  Zend_Cache::_makeBackend('Cm_Cache_Backen...', Array, true, true) #4
  /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/App/Cache/Frontend/Factory.php(156):
  Zend_Cache::factory('Magento\Framewo...', 'Cm_Cache_Backen...',
  Array, Array, true, true, true) #5 /opt/bit in
  /opt/bitnami/apps/magento/htdocs/vendor/magento/zendframework1/library/Zend/Cache.php
  on line 209


texts: What is static file materialization in Magento 2 and the difference with static views?

texts:
Just had a confusion with some of the concepts in Magento 2. What is static file materialization means in Magento 2 and wanted to know its different with static views ?

It will be great if someone can explain both concepts and the difference as I didn't find enough resources to explain what exactly "static file materialization" means.


texts: Customize magneto native captcha appearance, Change amount of lines and dots

texts:
I want to change the layout of my captcha on contact form. I need to decrease the amount of lines and dots it contains so, a user can see the text more clearly.Does anyone have any idea how to do it?
Thanks in advance.


texts: Fresh Installation of Magento 2.2.2 is showing Error 503

texts:
I am trying to install Magento 2.2.2 via a demo directory and getting Error 503

While Magento 2.2.1 is installing fine on the same directory.
The Link www.domain.com/demo is showing Error 503 on Magento 2.2.2

While the link www.domain.com/demo1 is showing installation screen on Magento 2.2.1

Please help me, I want to install Magento 2.2.2.

Is there any particular php modules to be installed for running Magento 2.2.2


texts: Magento EE 1.11 doesn't show Auto Generated Specific Coupon Codes section?

texts:
On the Admin menu, select System > Configuration. Then in the panel on the left under Customers, select Promotions. But I can't see any Auto Generated Specific Coupon Codes section there as described in http://docs.magento.com/m1/ce/user_guide/marketing/price-rules-shopping-cart-coupon-code-autogenerate.html

What might be the cause for this?

( Although I went through Magento documents, it is for EE 1.14 and above versions. )


texts: Don't display swatches on product listing in Magento 2

texts:
I want that the swatches display only in the product detail, but not on the product listing.

I'm looking for the option to do not display the swatch options on product list, but I only find how to do it in magento 1.x, and I need to do it in magento 2.1.3

Where is the option to hide the swatch options in magento 2?

Edit: I should say that I was looking for the 'option to hide swatch options' in the admin menu, hide the whole block doesn't work for what I needed.


texts: Override a class doesn't work for his child?

texts:
I want to override this class : 'Magento\Checkout\Block\Cart\Item\Renderer'
This class has a child like : 'Magento\ConfigurableProduct\Block\Cart\Item\Renderer'
So i use     <preference for="Magento\Checkout\Block\Cart\Item\Renderer" type="Custom\Checkout\Block\Cart\Item\Renderer" />
It's works only when i use the parent class ( Cart\Item\Renderer ). but when i instantiate the child i can't use my custom function.
Is there something else to do ?
I have to override all the child class ?


texts: Magento 2.2.5 get the product collection without Stock data

texts:
I am using Magento 2.2.5. In that, I am creating the products using the below code.

$product = $this->objectManager->create ( 'Magento\Catalog\Model\Product' )->load ( $productId );
$product->setName ( $name );
$product->setDescription ( $description );
$product->setPrice ( $price );
$product->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_DISABLED);
$id = null;
$manager = $this->objectManager->get ( 'Magento\Store\Model\StoreManagerInterface' );
$store = (int) $this->getRequest()->getParam('store', 0);//$manager->getStore ( $id );
$websiteId = $store->getWebsiteId ();
$product->setWebsiteIds ( array ( $websiteId) );
$product->setStockData ( array ('use_config_manage_stock' => 0,'is_in_stock' => 1,'manage_stock' => 0,'use_config_notify_stock_qty' => 0 ) );
$product->save ();

It is saving. When I loading with Block using following code:

 protected function _construct() {
    parent::_construct ();
    $collection = $this->getFilterProducts ();
    $this->setCollection ( $collection );
}
public function getFilterProducts() {
    /**
     * Filter by product attributes
     */
    $product = $this->productFactory->addAttributeToSelect ( '*' )->addAttributeToFilter ( 'user_id', $customerSession->getCustomer()->getId () );
    $product->addAttributeToFilter ( 'visibility', array (
            'eq' => \Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH
    ) );
    $product->addAttributeToSort ( 'entity_id', 'DESC' );

    /**
     * Return product object
     */
    return $product;
}
protected function _prepareLayout() {
    parent::_prepareLayout ();
    /**
     *
     * @var \Magento\Theme\Block\Html\Pager
     */
    $pager = $this->getLayout ()->createBlock ( 'Magento\Theme\Block\Html\Pager', 'mymodule.product.list.pager' );
    $pager->setAvailableLimit(array(
            10 => 10,
            20 => 20,
            50 => 50
        ))->setShowAmounts ( false )->setCollection ($this->getCollection ());
    $this->setChild ( 'pager', $pager );
    $this->getCollection () ->load();
    return $this;
}

public function getPagerHtml() {
    return $this->getChildHtml ( 'pager' );
}

In this block file I am trying to print the product collection, It has all the products with the user_id(custom attribute). But When I am printing the collection in the phtml file as $this->getCollection() it has the filter with stock data. But I am not including this stock filter anywhere. Is this Default or How I can get the product collection without Stock data. Please help me to get the product collection.


texts: How to move products, categories and attributes from one store to another - Magento 1.8.1

texts:
I have a broken Magento store version 1.8.1 and I want to move to a fresh installed Magento 1.8.1 only products, categories and attributes. After this I will install any necessary extension.

Is there any free extension that can do this or can you give me the list of all tables that I must export from the old store?

EDIT: i have 11.000+ products and 200+ categories.
I have some extensions that are custom made for 1.8.1 and i do not know if they work fine on 1.9

Thanks,
Have a nice day


texts:
after upgrading from Magento CE 1.9 to 1.9.1 order confirmations not being sent :(. I am using aoe sheduler and I am thinking that's looks fine or not?

But the exception log contains for example after a paypal express order the following:

2015-01-10T08:12:09+00:00 ERR (3):
exception 'Varien_Exception' with message 'Invalid method Mage_Sales_Model_Order::queueNewOrderEmail(Array
(
)
)' in /home/magento/www/lib/Varien/Object.php:653
Stack trace:
#0 /home/magento/www/app/code/core/Mage/Paypal/Model/Express/Checkout.php(634): Varien_Object->__call('queueNewOrderEm...', Array)
#1 /home/magento/www/app/code/core/Mage/Paypal/Model/Express/Checkout.php(634): Mage_Sales_Model_Order->queueNewOrderEmail()
#2 /home/magento/www/app/code/core/Mage/Paypal/Controller/Express/Abstract.php(320): Mage_Paypal_Model_Express_Checkout->place('EC-28N558743076...')
#3 /home/magento/www/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Paypal_Controller_Express_Abstract->placeOrderAction()
#4 /home/magento/www/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('placeOrder')
#5 /home/magento/www/app/code/community/Mdl/UnderConstruction/Controller/Router/Standard.php(72): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#6 /home/magento/www/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mdl_UnderConstruction_Controller_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#7 /home/magento/www/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#8 /home/magento/www/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#9 /home/magento/www/index.php(87): Mage::run('', 'store')
#10 {main}

Hope you can help me, because sending order confirmations manually isn't a solution for me.


texts: After Payment not redirecting to success page and getting this error with magento2.2.4

texts:
[19-Mar-2020 09:30:31 UTC] PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Magento\Paypal\Model\Adminhtml\Express::isOrderAuthorizationAllowed() must be an instance of Magento\Sales\Model\Order\Payment, null given, called in /home/hofadmin/public_html/vendor/magento/module-paypal/Plugin/OrderCanInvoice.php on line 41 and defined in /home/hofadmin/public_html/vendor/magento/module-paypal/Model/Adminhtml/Express.php:169
Stack trace:
0 /home/hofadmin/public_html/vendor/magento/module-paypal/Plugin/OrderCanInvoice.php(41): Magento\Paypal\Model\Adminhtml\Express->isOrderAuthorizationAllowed(NULL)
1 /home/hofadmin/public_html/vendor/magento/framework/Interception/Interceptor.php(146): Magento\Paypal\Plugin\OrderCanInvoice->afterCanInvoice(Object(Magento\Sales\Model\Order\Interceptor), false)
2 /home/hofadmin/public_html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Sales\Model\Order\Interceptor->Magento\Framework\Interception{closure}()
3 /home/hofadmin/public_html/generated/code/Magento/Sales/Model/Order/Interceptor.php( in /home/hofadmin/public_html/vendor/magento/module-paypal/Model/Adminhtml/Express.php on line 169


texts: Bundle products not saleable when all associated products are out of stock?

texts:
By default Magento indicates a bundled product out of stock if none of the associated products are in stock. Is there a way to change that behaviour?

I'm not using any isSaleable() conditionals, so that can't be the cause.

I'm getting the bundle products via product_collection model like this:

$products = Mage::getResourceModel('catalog/product_collection')
->addAttributeToSelect('*')
->addStoreFilter()
->addIdFilter($child_prods[0], false);
#->addAttributeToFilter('status', Mage_Catalog_Model_Product_Status::STATUS_ENABLED);

$products->load();

where $child_prods[0] is a list of product IDs of bundle products.

I tried changing the isSalable() method in /app/code/core/Mage/Bundle/Model/Product/Type.php to return always true, but the change didn't take effect. Any ideas?


texts: How to uncheck checkbox of Use Config Settings in Catalog Product Inventory

texts:
I want to uncheck checkbox Use Config Settings by default in Inventory section in Catalog=>Product section as below image---

I know that we can update it from DB query but I want to make them uncheck when adding new products.


texts: magento order email send without make payment of ccavenue

texts:
i click on place order button after selecting payment method.my url is redirected to cc-avenue payment environment.but order email was send without make payment.

i use ccavenue extension by bluezeal

please help for that

thanks in advance


texts:
Type Error occurred when creating object: Magento\Framework\Locale\Resolver

when I run this command this error shows. I am using third party theme.

Already tried deleting generated and var/di


texts: Cannot process definition to array for type json after updating magento 2.2.3 to 2.3.3

texts:
I am upgrading magento 2.2.3 to 2.3.3 via command line

after running this command php bin/magento setup:upgrade
but I am getting this error:

Cannot process definition to array for type json

what should I do? How should I find the cause of this error?


texts: "invalid form key. please refresh the page" - cannot login to admin panel

texts:
I regularly visit my site to make sure its working and noticed that images for products were not appearing, thinking it was a problem with indexing  cache I tried to login to the admin panel and received the error:
"invalid form key. please refresh the page"

Other symptoms are customers could not add products to cart and extremely slow performance.
There are no errors in the logs (/var/logs)
What additional steps should I perform to resolve this issue?


texts: I Have Big-Rock server on Linux Hosting, and server provides : Host and Port but  Magento default smtp provides windows server setting. so that's why magento not able to send mail ??


texts: How to create same link for mobile and desktop

texts:
I wan to create same link for my mobile and desktop website in magento. So my question is that when i used htaccess then it will redirect by check device,but url changed in url bar, so how can i prevent this .

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} "!(android|blackberry|googlebot-mobile|iemobile|ipad|iphone|ipod|opera mobile|palmos|webos)" [NC]
RewriteRule ^$ http://www.example.com/ [L,R=302]
</IfModule>


texts: Magento 2 How to add a list of Programatocally products

texts:
I followed this tutorial http://inchoo.net/magento/programming-magento/programatically-manually-creating-simple-magento-product/ but I did not understand where to put the code exactly

Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
$product = Mage::getModel('catalog/product');
try{
$product
->setWebsiteIds(array(1)) //website ID the product is assigned to, as an array
->setAttributeSetId(9) //ID of a attribute set named 'default'
->setTypeId('simple') //product type
->setSku('testsku61') //SKU
->setManufacturer(28) //manufacturer id
->setColor(24)
....
->setShortDescription('This is a short description')
->setCategoryIds(array(3, 10)); //assign product to categories
$product->save();
}catch(Exception $e){
Mage::log($e->getMessage());
}
?>

I put it in the app folder, but it does not show anything to the list of products I need help. thank you in advance


texts: what is the use of core registry in magento 2?

texts:
while trying to perform crud operation i came across

$this->coreRegistry->register(RegistryConstants::CURRENT_AUTHOR_ID, $authorId);

to perform edit action they got the id param and registered in core registry.
I'm new to this and looking for logic and concept behind this...
why do we need core registry in magento 2?


texts: How to make my theme styling apply to all CMS pages?

texts:
How could I achieve this?

All headers, paragraphs, etc. on all CMS pages having the same styling if my theme is being used.

I could not find an answer for this.


texts:
i want to show back to school call out only on homepage in magento and no need to display on all other pages
i tried with commenting this but its removing in home page also

<block type="core/template" name="right.permanent.callout" template="callouts/right_col.phtml">
      <action method="setImgSrc"><src>images/media/col_right_callout.jpg</src></action>
      <action method="setImgAlt" translate="alt" module="catalog"><alt>Keep your eyes open for our special Back to School items and save A LOT!</alt></action>
</block>

Any help would be appreciated.


texts: Magento2 customer account navigation wishlist Items how to display in phtml

texts:
In app\code\Magento\Wishlist\view\frontend\layout\default.xmlfile,I find the block

<referenceBlock name="top.links">
    <block class="Magento\Wishlist\Block\Link" name="wish-list-link" after="my-account-link"/>
</referenceBlock>

And in app\code\Magento\Wishlist\Block\Link.phpSpecifies the template file

protected $_template = 'Magento_Wishlist::link.phtml';

So I open app\code\Magento\Wishlist\view\frontend\templates\link.phtml

    <a <?php /* @escapeNotVerified */ echo $block->getLinkAttributes() ?>><?php echo $block->escapeHtml($block->getLabel()) ?>


texts: Adding new product causes foreign key constraint error

texts:
I am unable to add new products to my Magento2 install that I have inherited.

I'm getting the following error:

  SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or
  update a child row: a foreign key constraint fails
  (`tapetstore_magento2`.`catalog_product_entity_varchar`, CONSTRAINT
  `CAT_PRD_ENTT_VCHR_ENTT_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY
  (`entity_id`) REFERENCES `catalog_product_entity_original` (`ent),
  query was: INSERT INTO `catalog_product_entity_varchar`
  (`attribute_id`,`store_id`,`entity_id`,`value`) VALUES (?, ?, ?, ?),
  (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?),
  (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?),
  (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?)
  ON DUPLICATE KEY UPDATE `value` = VALUES(`value`)

I'm not sure how to correct this, any suggestions please?


texts: Magento2.2.6 How to redirect url after pass parameter?

texts:
I have using Magento2.2.6 I have tried to add URL rewrites into Magento 2 using the Marketing -> Url Rewrite tool.

The old URLs for the store look like this:

group.asp?group=320

http://XXXXXXX/magento231/catalogsearch/result/?q=test

I can enter that into the Request Path just fine, but anything with a ? in it never actually forwards to the Target Path. If I remove the ?, it redirects fine.. but obviously that is not a valid URL.

Any ideas or suggestions?


texts: Solution needed for bulk import Magento CSV

texts:
For a client i need a solution to import 10.000 products (daily).

He gets a CSV or XML (both available) through FTP on a daily base.

The CSV file has custom headers.

There a no Magento default row names, “sku” for example is called “Productid” and rows needed for a product import like “status” and “website” are not there at all.

What would be the best workaround to import these products?


texts:
I am trying to configure multiwebsite setup using magento 2.3.5 on nginx webserver on my localsystem.

The main website is http://www.myshop.com
and other is supposed to be http://myshop1.myshop.com

whenever I hit http://myshop1.myshop.com, It redirects to http://www.myshop.com

My Host Entries

127.0.0.1       *.myshop.com
127.0.0.1       www.myshop.com
127.0.0.1       myshop.com

I have made a nginx config as follows-:

upstream fastcgi_backend {
  server  unix:/var/run/php/php7.2-fpm.sock;
}

server {
  listen 80;
  server_name myshop.com www.myshop.com *.myshop.com *.myshop1.myshop.com;
  set $MAGE_ROOT /home/kitchenlogsnew/myshop;
  include /home/kitchenlogsnew/myshop/nginx.conf.sample;
}
~

My store and web configuration in magento is as follows-:


texts: How can I check if the module output is enabled on the Magento 2?

texts:
I created a simple verification adding on the admin panel a select to enable or disable, but I want to add a verification to check if my module output is enabled, how can I do that?

Today I'm using this code on my module:

public function isEnable(){
    return $this->getConfig('general/enabled');
}


texts: How to get current page url in static blocks

texts:
I want to get my current page URL in one of my static blocks

How do I get that?


texts: Override Magento_Ui base view template file on Magento 2

texts:
In Magento, we can override vendor's file

  vendor/magento/module-ui/view/frontend/web/templates/form/element/input.html

like:

  app/design/frontend/{Vendor}/{ThemeName}/Magento_Ui/web/templates/form/element/input.html

- Above file is used for frontend.

But I want to override vendor base template file of

  vendor/magento/module-ui/view/base/web/templates/form/element/input.html

- This file is used for Admin/Backend(adminhtml).

How can i override base file in theme folder ?

Does anyone know its solution?


texts: Get quantity of specific item (simple product) in cart by ID

texts:
Seems straight forward but I am seeing every scenario on Google except for the one I need. I just need to "query" Magento (or its quote model?) and return that number in the shopping cart based on the ID I provide via PHP. I believe Magento loops through the product data as line items so I can't lock down the qty field that is plainly visible right next to the item I just added to the cart.

Background: I have created an upsell module I've and I need to multiply the upsells by the number of base products in the cart.


texts: Implement "Use system value" in custom module

texts:
In the magento backend under Stores -> Configuration some of the fields have the "Use system value" checkbox next to them and some don't have it.

Checking the checkbox "restores" the field to the default value (which is defined in module's config.xml file).

How can I implement this "Use system value" checkbox in a custom module? Is it possible?

When I add custom config fields to my module, they don't have this "Use system value" checkbox.


texts: Magento 2 Show custom fee in admin invoice pdf

texts:
I have created a module to add custom fee value. I want to show this custom fee in all pages(frontend:order view page, print page etc, backend:order view page, sales invoice pdf, emails)

I have shown it all pages except for admin side invoice pdf.
How can I do that? Which XML do I need to edit?

I have tried editing the layout in adminhtml sales_order_invoice_new.xml, sales_order_invoice_updateqty.xml, sales_order_invoice_view.xml

Please help...


texts:
Currently, reviews for each product only display assigned to one product. https://prnt.sc/rhmt1q

Any solution to display all opinions in this tab from the website and add above each opinion the name of the product to which the opinion relates?

We sell clothing, so the products change dynamically and are not likely to return the same models.
That is why we want to display all opinions from the website.


texts: Magento 2 - passing variable output to another variable in email template

texts:
I'm working on order confirmation email and I want to pass variable output:

{{var order.getMyCustomItem().getSomething('key')}}

To another variable. In my case it's an order model:

{{var order.pimpMyValue(order.getMyCustomItem().getSomething('key'))}}

So my order model contains pimpMyValue public method and getMyCustomItem method which returns order item model. And order item model has getSomething method which accepts one string parameter. It returns string.

So when I use first code:

{{var order.getMyCustomItem().getSomething('key')}}

It works. When I use second code (withot combaining it with another variable) it also works:

{{var order.pimpMyValue('my_value')}}

But I can't make it to work with nested variables. Is it even possible?


texts: Download customer address in pdf onclick button

texts:
I displayed button Download [ last column in below image ]  in Sales Order grid page for each order. Once i click on button, I want to generate pdf with information of "Customer address" of that order.

I checked Firegento & comwrap , but both will generate only invoice, shipping, credit memos only.

app/code/community/Raveinfosys/Deleteorder/Block/Adminhtml/Sales/Order/Render - Delete.php

class Raveinfosys_Deleteorder_Block_Adminhtml_Sales_Order_Render_Delete extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
{
    public function render(Varien_Object $row)
    {
        $getData = $row->getData();
        $orderID = $getData['entity_id'];
        $link = 'Download;';
        return $link;
    }
}

Please guide me on this....


texts: identifying index tables in Magento (1.4) and can they be skipped on export and rebuilt

texts:
I am familiar with the core data tables for products and categories, i.e. catalog_category_entity_.. and catalog_product_entity_..

I know also that there are some tables that flatten indexes and this happens when you index products or categories.  Question #1: Do they all end in _idx? Can someone help me identify them?

Reason: my company has a very large database of products and export is taking a while.  I am considering exporting from production with all the index tables blank, and building them on the receiving end in QA.

Question #2: Will this work?
Question #3: Will this provide a significant space/time savings?


texts: Adding second attribute into product detail description tab via Layout

texts:
I am attempting to add a second attribute into the Details tab on a product description page, but I have been unable to make it work. Here is the code that I am trying within my catalog_product_view.xml file (which is working). I am attempting to do it through the custom template file listed in the code below.

<referenceBlock name="product.info.description">
    <block class="Magento\Catalog\Block\Product\View" name="included.package" after="-"  template="Gl_Experience::included.phtml" />
</referenceBlock>

I have validated that this block works if I reference a block other than product.info.description.

Thanks


texts: Magento 2: Add custom attributes to customer grid

texts:
I want to add a custom attribute to the admin customer grid. For that, I have added two attributes using ui_component.

The columns show up in the grid but without data from customer_grid_flat (because Magento 2 uses a flat grid table for retrieving data to the grid).

I found the following answer on StackExchange:

add a custom column in customer grid

According to that, I added an indexer.xml file to my custom module:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Indexer/etc/indexer.xsd">
    <indexer id="customer_grid" view_id="customer_dummy" class="Magento\Framework\Indexer\Action\Entity" primary="customer">
        <fieldset name="customer" source="Magento\Customer\Model\ResourceModel\Customer\Collection" provider="Magento\Customer\Model\Indexer\AttributeProvider">
            <field name="webshop" xsi:type="filterable" dataType="int"/>
            <field name="aktiv" xsi:type="filterable" dataType="int"/>
        </fieldset>
    </indexer>
</config>

and executed php bin/magento indexer:reindex customer_grid.

Now, I face two different errors in two different conditions:

Please note above indexer attribute view_id. it is customer_dummy (Which is default to native customer module). if I use the same view_id name in my custom module I get error Customer grid index is locked by another reindex process. Skipping
If I use a different view_id name and execute php bin/magento indexer:reindex customer_grid then it shows view_id (in my case it just dummy) view does not exist.


texts: A technical problem with the server created an error + magento

texts:
We are using the Linux server and In Magento Panel we are facing below error,

A technical problem with the server created an error. Try again to continue what you were doing. If the problem persists, try again later.

The client had run 777 commands to /var partition by mistakenly but I realised that and reverted the changes and corrected the permissions. But still getting the same error.


texts:
Its working in my localhost, but when use same code in magento 2 its not working any suggestions please

<!DOCTYPE html>

    <title>fancyBox - Fancy jQuery Lightbox Alternative | Demonstration</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

    <link rel="stylesheet" type="text/css" href="../source/jquery.fancybox.css?v=2.1.5" media="screen" />

Ajax


texts: Magento 2 | How to put Button in Guest user Order and Account Information Page?

texts:
I need to edit email address of Guest Customer.

As form the picture:

I know it should be done by plugin but I want to know What is the right way
to find right method to override for putting button at this particular place and applying the functionality.


texts:
I am using Magento 1.9.0.1 and I am trying to use the magento coupon code feature. However, it's not working when I add any condition on subtotal.

My condition is if the subtotal is greater than or equal to some amount (say $200) then customer will get 20% discount. I have found that there was a Magento bug. But they have said that they fixed the bug.

However, when it wasn't working then I have used a hack which I have found in the comments of the bug and that extension is working in fresh 1.9.2 in my local environment. However, in the server version of 1.9.0.1 it is not working.

I am debugging the code and found that the discount logic wasn't passing the line

        if (!$rule->getActions()->validate($item)) {
            continue;
        }

I have also found that though I have saved the coupon Action to

  Percent of the product price discount

but when I dump the var_dump($rule->getSimpleAction()); then I found the value is "cart_fixed" whereas it should be "by_percent". It means whenever I save the coupon in the admin panel it's not being saved into "by_percent" mode. Instead it's being saved into "cart_fixed" mode which refer to "Fixed amount discount for whole cart".

Could anyone tell me what should I do or what might be the reason behind this?


texts: Spanish Language not showing in magento 1.9

texts:
I have the Spanish language on my website.A few days back it is working fine.Suddenly both the frontend and backend were displaying in English.
I have only one store in this language.

In the backend only the time is showing in spanish language.

  jueves, 18 de enero de 2018

Any suggestions.

Thanks in advance.


texts:
How to remove empty attributes “N/A” in Magento 2?
Remove Empty attribute from the Product Page Tabs section, By Default Text, will be displayed as ‘N/A’ for empty attributes.


texts: Can't override a core block using the referenceBlock method

texts:
I was wondering is someone has any idea of why my code is not working. I'm trying to override the sales order view to show an extra item on the "Items Ordered list". For this I created a module that is replacing the blocks on the sales_order_view.xml.

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceBlock class="Magento\Sales\Block\Adminhtml\Order\View\Items" name="order_items" template="Company_Module::order/view/items.phtml">
        <block class="Magento\Sales\Block\Adminhtml\Order\View\Items\Renderer\DefaultRenderer" as="default" template="order/view/items/renderer/default.phtml"/>
        <block class="Magento\Sales\Block\Adminhtml\Items\Column\Qty" name="column_qty" template="items/column/qty.phtml" group="column"/>
        <block class="Magento\Sales\Block\Adminhtml\Items\Column\Name" name="column_name" template="items/column/name.phtml" group="column"/>
        <block class="Magento\Framework\View\Element\Text\ListText" name="order_item_extra_info"/>

    </referenceBlock>
</body>

So far, the order_items template is overridden as expected but I can't not find a way to override the default.phtml one. I have tried with referenceBlock but it doesn't seem to be working. How could I target a block that is not using a name but an alias instead?


texts: This jobs run all time and consuming 25% cpu power each


texts:
After installed, trying to login admin panel getting an error,

  Warning: class_implements(): Class � does not exist and could not be
  loaded in
  C:\xampp\htdocs\abc\vendor\magento\framework\Code\Reader\ClassReader.php
  on line 64

<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
namespace Magento\Framework\Code\Reader;

class ClassReader implements ClassReaderInterface
{
    /**
     * Read class constructor signature
     *
     * @param string $className
     * @return array|null
     * @throws \ReflectionException
     */
    public function getConstructor($className)
    {
        $class = new \ReflectionClass($className);
        $result = null;
        $constructor = $class->getConstructor();
        if ($constructor) {
            $result = [];
            /** @var $parameter \ReflectionParameter */
            foreach ($constructor->getParameters() as $parameter) {
                try {
                    $result[] = [
                        $parameter->getName(),
                        $parameter->getClass() !== null ? $parameter->getClass()->getName() : null,
                        !$parameter->isOptional(),
                        $parameter->isOptional()
                            ? ($parameter->isDefaultValueAvailable() ? $parameter->getDefaultValue() : null)
                            : null,
                    ];
                } catch (\ReflectionException $e) {
                    $message = $e->getMessage();
                    throw new \ReflectionException($message, 0, $e);
                }
            }
        }

        return $result;
    }

    /**
     * Retrieve parent relation information for type in a following format
     * array(
     *     'Parent_Class_Name',
     *     'Interface_1',
     *     'Interface_2',
     *     ...
     * )
     *
     * @param string $className
     * @return string[]
     */
    public function getParents($className)
    {
        $parentClass = get_parent_class($className);
        if ($parentClass) {
            $result = [];
            $interfaces = class_implements($className);
            if ($interfaces) {
                $parentInterfaces = class_implements($parentClass);
                if ($parentInterfaces) {
                    $result = array_values(array_diff($interfaces, $parentInterfaces));
                } else {
                    $result = array_values($interfaces);
                }
            }
            array_unshift($result, $parentClass);
        } else {
            $result = array_values(class_implements($className));
            if ($result) {
                array_unshift($result, null);
            } else {
                $result = [];
            }
        }
        return $result;
    }
}

How can i solve the error.


texts: Add every product as a new item into cart instead of updating cart quantity

texts:
How can i add every product as a new item into cart instead of updating cart quantity?

ie. Suppose a product is already added in cart. If i add that product again to cart it should add new product not only updating quantity of that product.


texts: Create "Catalog Input Type for Store Owner" for Magento

texts:
I want to create new "Catalog Input Type for Store Owner" for attributes.

I can do this by reference link  Edge ProductAttachments

But now my query is How can I add custom text boxes,radio buttons in "Manage Label / Options" part ? See attached image for referance.


texts: Magento 2 : How to assign related product to main product programatically

texts:
Is their any way can we assign multiple related products to a product ?
for example i have to assign from a csv row
Main SKU, SKU #1, SKU #2,  SKU #3,  SKU #4
p226944, p210881, p213312, p218070, p228407


texts:
I'm getting this error on my magento website when I try to create new user account.Can anyone kindly assist?

https://i.stack.imgur.com/caIKp.png


texts: How to set pager on ajax call on a custom table.


texts: catalog_category_view.xml is there possibility to add custom xml file into product_list?

texts:
I'm trying to add custom label into each product in category view page but it doesn't work.

catalog_category_view.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceContainer name="content">
        <block class="Vendor\ModuleName\Block\Sticker" name="productlabel.sticker" template="Vendor_ModuleName::product/label.phtml" />
    </referenceContainer>
    <move element="productlabel.sticker" destination="product_list" />
</body>
</page>

label.phtml

<img src="..." />

I know that i can override                 <block class="Magento\Catalog\Block\Product\ListProduct" name="category.products.list" as="product_list" template="Magento_Catalog::product/list.phtml"> and put this image in custom list.phtml, but i use this productlabel.stickeralso in catalog_product_view.xml(works)

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceContainer name="product.info.main" >
        <block class="Vendor\ModuleName\Block\Sticker"
               name="productlabel.sticker"
               template="Vendor_ModuleName::product/label.phtml"
               before="page.main.title"/>
    </referenceContainer>
    <move element="productlabel.sticker" destination="product.info.main" before="page.main.title" />
</body>

therefore i want insert it as xml block in catalog_category_view. Any ideas?


texts: Cron executed successfully but product is not getting updated

texts:
I setup the cronjob in Magento 2.1.7 but I got an unexpected result. All the indexer were updated except Product category an Category product when I add a new product.

Check in the cron_schedule table, but no exception found i.e, all the crons are updated succesfully.

Newly added product is not showing in category not in search. Cron has not throwing any error.

When I run the indexer manually then all product is shown.


texts: How to get bundle product price by product id ? Magento2

texts:
In the code below, I get the product price by identifier, but only the first product price is returned for different product id. Can help me ?

    public function getBundlePriceByid($product_id){
      $_store = 1;
      $this->emulation->startEnvironmentEmulation($_store, \Magento\Framework\App\Area::AREA_FRONTEND, true);
      $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
      $product = $objectManager->get('Magento\Catalog\Model\Product')->load($product_id);
      $prices = $product->getPriceInfo()->getPrice('final_price')->getMaximalPrice()->getValue();
      $this->emulation->stopEnvironmentEmulation();
      return $prices;

   }
// 1 = 250$
// 7 = 260$
// 8 = 270$
 $prIds= array(1,7,8);
    foreach($prIds as $prId){
        echo $this->getBundlePriceByid($prId);
    }

returns only 250$

This code I call in Cron Job


texts:
The following are causeing PHP version error
plz suggest solution


texts: New customer registration assigned a registration date in the future (we have 8 customers that registered as far as December 2nd, 2018)

texts:
Magento 1.9.1
Porto theme

We haven't changed any settings but strange things are starting to happen such as when the customer registers on the website - it is assigning the incorrect date value. Also we are having problems with cookies (getting the "Shopping Cart is Empty" Error which usually happens for us when the date/time is out of sync somehow).

One customer registered today and it says:

Account Created on: Jun 5, 2018 9:16:27 AM which is obviously not possible.

Is there a setting on the server that needs to be changed so that it is reporting the correct date/time? Or what other setting within Magento needs to be checked?

I just did a sort by the date and it appears that we have 8 customers in total with future registration dates all the way up to December 2nd, 2018.

I contacted the hosting company and this is what they replied:

"Thank you for your reply!
Sun May 6 16:39:06 -06 2018 - the server date and time are correct.
Where's the registration form taking it's date/time feed from?
Perhaps you need to look this up on your Magento installation.
If it's set to lookup the server time upon registration, it will be the correct one."


texts:
I've set a Magento2 installation up with an SSL. I have this working fine in the backend of the website however all css/other calls in pub/static aren't being pulled through via HTTPS but HTTP.

I've tired to redeploy the static content but this doesn't seem to help.


texts: How are configurable options rendering on frontend

texts:
i need to add data-imagesrc="imgurl" inside <option> tag. It should look something like

<option value="16" price="0" data-label="grey" data-imagesrc="imgurl">Grey</option>

And when i see the rendered part of configurable options (app/design/frontend/<mypackage>/<mytheme>/template/catalog/product/view/type/options/configurable.phtml)

$_attributes = Mage::helper('core')->decorateArray($this->getAllowAttributes());
<?php foreach($_attributes as $_attribute): ?>
    <?php
    $_rendered = false;
    foreach ($_renderers as $_rendererName):
        $_renderer = $this->getChild('attr_renderers')->getChild($_rendererName);
        if (method_exists($_renderer, 'shouldRender') && $_renderer->shouldRender($_attribute, $_jsonConfig)):
            $_renderer->setProduct($_product);
            $_renderer->setAttributeObj($_attribute);
            echo $_renderer->toHtml();
            $_rendered = true;
            break;
        endif;
    endforeach;

    if (!$_rendered):
    ?>

*<?php echo $_attribute->getLabel() ?>

    <dd<?php if ($_attribute->decoratedIsLast){?> class="last"<?php }?>>

                <select name="super_attribute[<?php echo $_attribute->getAttributeId() ?>]" id="attribute<?php echo $_attribute->getAttributeId() ?>" class="required-entry super-attribute-select">
                    <option><?php echo $this->__('Choose an Option...') ?></option>
                </select>

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

From where are those options being rendered ? and how can i add data-imagesrc inside option tag of configurable combobox ?

I'm trying to achieve like shown on the image below, and i am doing with a jquery plugin.


texts: How to check image value in custom module in magento 1.9?

texts:
Here, I would like to upload  image in admin panel grid form in magento. I create images upload in admin panel grid form. Here I attached my sample image upload coding.

[...]
$fieldset->addField('collar_image', 'image', array(
            'name'      => 'collar_image',
            'label'     => Mage::helper('measurement_setter')->__('collar Image'),
            'title'     => Mage::helper('measurement_setter')->__('collar Image'),
            'required'  => true,
            'disabled'  => $isElementDisabled
        ));
[...]

When i save that image data into MYSQL database it results array.And i get response in that save script it results Array.

public function saveAction()
    {
        $redirectPath   = '*/*';
        $redirectParams = array();

        // check if data sent
        $data = $this->getRequest()->getPost();
        echo "<pre>";
        print_r($data);exit;
        if ($data) {
            $data = $this->_filterPostData($data);
            // init model and set data
            /* @var $model Magentostudy_News_Model_Item */
            $model = Mage::getModel('measurement_setter/setter');
 [...]

How to check image values whether correct or not? And How to get check image values?


texts: Full width template for end level category

texts:
I have lots of categories and sub categories for them. For example,

Car is a category Benz, Audi, BMW are its sub categories.

So if the user is in Car category page it will show a small description of Car with a photo, also list all the sub categories of Car after that. Important thing is that this page is two column. In other words, this page have sidebar.

Now if a user comes to Benz category, it shouldn't have that side bar. In other words it should be full width template.

How to achieve this requirement.?

Note : I don't want to set template manually for that category through admin panel. I want to do this automatically. Like if the category don't have any sub category, then full width template should load.


texts:
I add block .phtml file below </body> tag in my /Vendor/Module/view/frontend/layout/default.xml like this:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
  <body>
    <referenceContainer name="content">
      <block class="Vendor\Module\Block\Test" name="test" template="Vendor_Module::test.phtml"  after="before.body.end">
      </block>
    </referenceContainer>
 </body>
</page>

but it's not showing the content inside .phtml file at all


texts: Magento2.3.3 - Can't check requested quantity for products without Source Items support in product list grid

texts:
I see someone getting the same error but different magento2 version.
Ref - Can't check requested quantity for products without Source Items support


texts: Set custom orderfield on checkout succes page

texts:
I have create a custom field in the table sales_flat_order. When the payment is succesfull i want to add a value to that field, how can i do this?

I've tried to use this $this->setTicket('test'); in the succes.phtml, but it didn't worked


texts: Bundled products within a configurable product?

texts:
My client has an online store selling a number of simple products:

Light Wax
Medium Wax
Strong Wax
Extra Strong Wax

They also want to sell "box sets" combining pairs of products, specifically:

Light Wax + Medium Wax
Medium Wax + Strong Wax
Strong Wax + Extra Strong Wax

Furthermore, they want a parent product called "Box Sets" with the options above selected via dropdown, similar to this example image:

My client prepares these box sets from the individual (simple) products as they are ordered, so stock management is important - when a customer makes their selection and completes the order, the stock levels of the associated simple products should also decrease appropriately.

So far, I can create a bundled product for each combination above, but it doesn't seem possible to assign them to a configurable product - this would allow the customer to select which bundle they want via the dropdown on the parent product page.

Is there a way to achieve this out-of-the-box or can anyone recommend a workaround or how to achieve this via an extension? (I looked at the Brim Grouped Options extension but I'm not convinced that it's the correct solution)

Many thanks!


texts: How to render HTML in x-magento-template?

texts:
I have used this blog https://webkul.com/blog/how-to-write-javascript-template-in-magento2/ to use x-magento-template. In this I can render data using such code:

<%- data.name %>

But it shows only text data, if I pass HTML, then also it renders it as text. Can someone tell me the solution of it?


texts: Facing the issue : contains 1 abstract method and must therefore be declared abstract

texts:
Fatal error: Class Tutorial\SimpleNews\Controller\Adminhtml\News contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Magento\Framework\App\ActionInterface::execute) in /home/dukaania/public_html/testing2/app/code/Tutorial/SimpleNews/Controller/Adminhtml/News.php on line 11

Here's my code:

/home1/dukaania/public_html/testing2/app/code/Tutorial/SimpleNews/Controller/Adminhtml/News.php

    <?php

     namespace Tutorial\SimpleNews\Controller\Adminhtml;

     use Magento\Backend\App\Action;
     use Magento\Backend\App\Action\Context;
     use Magento\Framework\Registry;
     use Magento\Framework\View\Result\PageFactory;
     use Tutorial\SimpleNews\Model\NewsFactory;

     class News extends Action
    {
     /**
     * Core registry
     *
     * @var \Magento\Framework\Registry
     */
   protected $_coreRegistry;

/**
 * Result page factory
 *
 * @var \Magento\Framework\View\Result\PageFactory
 */
protected $_resultPageFactory;

/**
 * News model factory
 *
 * @var \Tutorial\SimpleNews\Model\NewsFactory
 */
protected $_newsFactory;

/**
 * @param Context $context
 * @param Registry $coreRegistry
 * @param PageFactory $resultPageFactory
 * @param NewsFactory $newsFactory
 */
public function __construct(
    Context $context,
    Registry $coreRegistry,
    PageFactory $resultPageFactory,
    NewsFactory $newsFactory
) {
   parent::__construct($context);
    $this->_coreRegistry = $coreRegistry;
    $this->_resultPageFactory = $resultPageFactory;
    $this->_newsFactory = $newsFactory;
}

/**
 * News access rights checking
 *
 * @return bool
 */
protected function _isAllowed()
{
    return $this->_authorization->isAllowed('Tutorial_SimpleNews::manage_news');
}

    public function execute()
 {
/** @var \Magento\Backend\Model\View\Result\Page $resultPage */
$resultPage = $this->_resultPageFactory->create();

return $resultPage;
}

}

/home1/dukaania/public_html/testing2/app/code/Tutorial/SimpleNews/Controller/Adminhtml/News/Index.php

   <?php

  namespace Tutorial\SimpleNews\Controller\Adminhtml\News;

   use Tutorial\SimpleNews\Controller\Adminhtml\News;

   class Index extends News
  {
/**
 * @return void
 */
   public function execute()
  {
  if ($this->getRequest()->getQuery('ajax')) {
        $this->_forward('grid');
        return;
    }

    /** @var \Magento\Backend\Model\View\Result\Page $resultPage */
    $resultPage = $this->_resultPageFactory->create();
    $resultPage->setActiveMenu('Tutorial_SimpleNews::main_menu');
    $resultPage->getConfig()->getTitle()->prepend(__('Simple News'));

    return $resultPage;

}
}


texts: new products not appearing on the front end

texts:
New products don't appear on the front end after creating them. I ensured to tick all the boxes of checklists like this. Older products are there fine. I'm creating them manually rather than importing, making sure everything is in stock, activated, in the correct category etc.

Apart from making sure the different store views are ok, quantities etc in my first link above, I've also tried indexing all, flushing all caches, truncating the core_url_rewrite table (now small). I thought it could be cron related but n98-magerun.phar sys:cron:history shows the jobs returning a success message. (I made sure the cron process was owned by the correct user).

What else could it be? I check the logs but nothing stands out of the ordinary. Could it be permission-related? These are my current settings.

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
chmod 550 mage


texts: This error has occured in magento 2, how can I fix it?

texts: Warning: include(/home/healthba/public_html/var/view_preprocessed/pub/static/vendor/magento/module-theme/view/base/templates/root.phtml): failed to open stream: No such file or directory in /home/healthba/public_html/vendor/magento/framework/View/Result/Page.php on line 326


texts: Wrong option login in Magento Enterprise

texts:
After Login into Magento as a customer from frontend, the label Logout is changed to Login; if I click anywhere on the page like Filters or home page or products.

I think, problem is caused by Magento cache?


texts: Magento 2.3.4 [SOLVED] can't delete crontab created in development mode

texts:
When we created the store in development mode, a conjob was created.
On moving to the definitive domain, we noticed errors in the cron tasks and did an install: cron again
But now I have two cronjobs and I can't erase the old "ff16f1079b ............. 1e87e48139360e1"
When I run the crontab -l query this is what it shows:
# crontab -l
MAILTO=""
#       35      3       *       *       *       /bin/sh /usr/local/src/mysql_backup.sh
40      10      *       *       6       /bin/sh /root/modsecurity.sh
#~ MAGENTO START ff16f1079b.............1e87e48139360e1
* * * * * /opt/plesk/php/7.3/bin/php /var/www/vhosts/domain.es/domain.com/bin/magento cron:run 2>&1 | grep -v "Ran jobs by schedule" >> /var/www/vhosts/domain.es/domain.com/var/log/magento.cron.log
* * * * * /opt/plesk/php/7.3/bin/php /var/www/vhosts/domain.es/domain.com/update/cron.php >> /var/www/vhosts/domain.es/domain.com/var/log/update.cron.log
* * * * * /opt/plesk/php/7.3/bin/php /var/www/vhosts/domain.es/domain.com/bin/magento setup:cron:run >> /var/www/vhosts/domain.es/domain.com/var/log/setup.cron.log
#~ MAGENTO END ff16f1079b.............1e87e48139360e1
#~ MAGENTO START 97f2843.............d47eaae
* * * * * /opt/plesk/php/7.3/bin/php /var/www/vhosts/domain.es/httpdocs/bin/magento cron:run 2>&1 | grep -v "Ran jobs by schedule" >> /var/www/vhosts/domain.es/httpdocs/var/log/magento.cron.log
* * * * * /opt/plesk/php/7.3/bin/php /var/www/vhosts/domain.es/httpdocs/update/cron.php >> /var/www/vhosts/domain.es/httpdocs/var/log/update.cron.log
* * * * * /opt/plesk/php/7.3/bin/php /var/www/vhosts/domain.es/httpdocs/bin/magento setup:cron:run >> /var/www/vhosts/domain.es/httpdocs/var/log/setup.cron.log
#~ MAGENTO END 97f2843.............d47eaae

the /var/www/vhosts/domain.es/domain.com/ directory no exists (it was the development directory)
the /var/www/vhosts/domain.es/httpdocs/ directory is correct
I have run cron: remove but it does not delete the old cron
/opt/plesk/php/7.3/bin/php /var/www/vhosts/domain.es/httpdocs/bin/magento cron:remove
Magento cron tasks have been removed
crontab -l
MAILTO=""
#       35      3       *       *       *       /bin/sh /usr/local/src/mysql_backup.sh
40      10      *       *       6       /bin/sh /root/modsecurity.sh
#~ MAGENTO START ff16f1079b.............1e87e48139360e1
* * * * * /opt/plesk/php/7.3/bin/php /var/www/vhosts/domain.es/domain.com/bin/magento cron:run 2>&1 | grep -v "Ran jobs by schedule" >> /var/www/vhosts/domain.es/domain.com/var/log/magento.cron.log
* * * * * /opt/plesk/php/7.3/bin/php /var/www/vhosts/domain.es/domain.com/update/cron.php >> /var/www/vhosts/domain.es/domain.com/var/log/update.cron.log
* * * * * /opt/plesk/php/7.3/bin/php /var/www/vhosts/domain.es/domain.com/bin/magento setup:cron:run >> /var/www/vhosts/domain.es/domain.com/var/log/setup.cron.log
#~ MAGENTO END ff16f1079b.............1e87e48139360e1

I appreciate your help


texts: Call a class in magento2 code which resides in root

texts:
May be a very bad question. Not sure.

Just a brief

I am trying to add simplesamlphp in magento2.

  1) I added it through composer and its added inside vendor directory.
  And i can access the classes like this $auth = new \SimpleSAML_Auth_Simple('default-sp'); And this works..and i can access functions also.

Now the issue is its not written keeping magento2's structure in mind. It will work only if i put the whole code in magento2's root.

EDIT

Now if i put the whole code in magento root and try to access like this(dont get me wrong..just try to check with object manager. Wont use it. Chill.)

$object_manager = \Magento\Framework\App\ObjectManager::getInstance();
        $dir = $object_manager->get('\Magento\Framework\Filesystem\DirectoryList');
        $base = $dir->getRoot();
        $lib_file = $base.'/simplesamlphp/simplesamlphp/lib/_autoload.php';
        require_once($lib_file);
        $auth = new SimpleSAML_Auth_Simple('default-sp');

It gives me this

  Fatal error: Class
  'Magento\Customer\Controller\Account\SimpleSAML_Auth_Simple' not
  found.  // BTW trying to call it from LoginPost action.

How to include classes which are at magento2's root? (Probably autoload wont work but still)


texts: Uncaught Error: Undefined class constant 'ACTION_AUTHORIZE' in magento 2?

texts:
how to solve this issue?

 <?php
    /**
     * PHP version 7
     * Copyright © Mobegic Inc. DBA Unbound Commerce.
     * All rights reserved.
     */

    namespace UnboundCommerce\GooglePay\Model\Adminhtml\Source;

    use Magento\Framework\Option\ArrayInterface;
    use Magento\Payment\Model\MethodInterface;

    /**
     * Class PaymentAction
     */
    class PaymentAction implements ArrayInterface
    {
        /**
         * Actions available for place order call
         *
         * @return array
         */
        public function toOptionArray()
        {
            return [
                [
                    'value' => MethodInterface::ACTION_AUTHORIZE,
                    'label' => __('Authorize'),
                ],
                [
                    'value' => MethodInterface::ACTION_AUTHORIZE_CAPTURE,
                    'label' => __('Authorize and Capture'),
                ]
            ];
        }
    }


texts: Magento 2: How to get current admin user detail?

texts: How to get the current admin user detail in back-end ?


texts: What is the function of "_initLayout" in magento?

texts:
What does this function do in magento?

$this->_initLayoutMessages('customer/session');
$this->_initLayoutMessages('catalog/session');

What _initLayoutMessages() return?


texts:
Once I place an order, confirmation email is not sent.

In the backend (Sales -> Orders), the order says that "The order confirmation email is not sent".

If I click "Send Email", it still doesn't send.

Other mail functionality works (e.g. Forgot Password). Emails are configured under Stores -> Configuration -> Sales -> Sales Emails. Under Advanced -> System, my Mail Sending Settings are as so:

Cron job is setup and running four times every hour, as so:

system.log: https://pastebin.com/X2Vm0trx

update.cron.log:

Could not open input file: /home/[user]/public_html/update/cron.php
Could not open input file: /home/[user]/public_html/update/cron.php
Could not open input file: /home/[user]/public_html/update/cron.php
Could not open input file: /home/[user]/public_html/update/cron.php
Could not open input file: /home/[user]/public_html/update/cron.php
...

update.log:

[2018-09-02 22:14:02] setup-cron.ERROR: Could not locate magento/magento2-base/composer.json file. [] []

I suspect it's from a conflict with one of my installed extensions, given the error in my system.log:

[2018-09-02 23:52:02] main.ERROR: Notice: Undefined property: MageArray\OrderAttachments\Model\Order\Email\SenderBuilder::$messageManager in /home/[user]/public_html/app/code/MageArray/OrderAttachments/Model/Order/Email/SenderBuilder.php on line 75 [] []

But there are also those other errors that are present, and I don't know if those errors are the ones causing the order confirmation emails to not be sent.


texts: Make an ajax call in observer on 'checkout_cart_product_add_after' event

texts: Need to fire an ajax call after adding a product to magento cart. looking for list of Magento Javascript Events to achieve this. any suggestions will be highly appreciated.


texts:
I need to display a non-editable field in Magento 2.1 Admin grid. so i tried to use :

        <field name="type">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="dataType" xsi:type="string">text</item>
                <item name="label" translate="true" xsi:type="string">type</item>
                <item name="formElement" xsi:type="string">label</item>
                <item name="source" xsi:type="string">Order</item>
                <item name="sortOrder" xsi:type="number">110</item>
                <item name="dataScope" xsi:type="string">type</item>
                </item>
            </item>
        </argument>
    </field>

but i'm getting the following error:

a:4:{i:0;s:94:"The requested component ("label") is not found. Before using, you must add the implementation.";i:1;s:7394:"#0 /var/www/magento /vendor/magento/module-ui/Model/Manager.php(207): Magento\Framework\View\Element\UiComponent\Config\Provider\Component\Definition->getComponentData('label')

note: i'm aware about :

<item name="disabled" xsi:type="boolean">true</item>

but this will just show an inout field as disabled , where i want to show a plain text

any advice?

reference:
https://github.com/magento/magento2/blob/2335247d4ae2dc1e0728ee73022b0a244ccd7f4c/lib/internal/Magento/Framework/Data/Form/Element/Label.php


texts: Ajax doesnt work when Compilation Enabled

texts:
I figured that Ajax add to cart doesnt work when Compilation is enabled. As well /admin page oftentimes is blank if I open it in a new browser.

The moment I DISABLE compilation, everything works perfectly.

*I tried running compilation and still, website doesnt function well when compilation is Enabled.

Any ideas why ?


texts:
The default 1.9 product magnifier is not initialising properly on page load. But does initialise when a thumbnail i.e. .thumb-link is clicked.

I have done a diff on the difference between .product-image and it's descendants before and after manual initialisation of the magnifier by virtue of clicking on a thumbnail.

The difference is the addition of zoom-available to the product-image class as well as visible to the gallery-image class.


texts: Reindex from php code doesn't work properly

texts:
I've a PHP script that import products from an external XML File using AWS Fast Simple Import, a magento extension.

Every X minutes it call the XML and check if the product is modified or is new, then it updates or create a new product.

The problem is when a product become unavailable. I've already set up the configuration of magento to NOT SHOW the unavailable products but every time the script goes the unavailable products appear on the catalog page.

So I tried to reindex manually the catalog_product_price and if I refresh the catalog page it works correctly.

But when  I do it from PHP using this code:

$process = Mage::getModel('index/indexer')->getProcessByCode('catalog_product_price');
$process->reindexAll();

It doesn't work. I mean if I look at the latest index time it works but in the catalog view I still see the unavailable products.


texts: Cannot add new cli command "Class does not exist" on setup:upgrade

texts:
I am trying add custom command for beginning 'hello world'. I'm doing all by guide but always have this error

  [ReflectionException]
    Class Hesoy\HelloWorld\Console\Command\HelloWorldCommand does not exist

This is my setup steps:

Clear cache
setup:upgrade

This is my files

Command

namespace Hesoy\HelloWorld\Console\Command;

use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class HelloWorldCommand extends Command
{
    public function __construct($name = null)
    {
        parent::__construct($name);
    }

    protected function configure()
    {
        $this->setName('hesoy:hello-world')
            ->setDescription('Hello world');

        parent::configure();
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $output->writeln('Hello world!');
    }
}

di.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Framework\Console\CommandListInterface">
        <arguments>
            <argument name="commands" xsi:type="array">
                <item name="helloWorld" xsi:type="object">Hesoy\HelloWorld\Console\Command\HelloWorldCommand</item>
            </argument>
        </arguments>
    </type>
</config>

module.xml

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

registration.php

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


texts: Magento 2 : How to drag the unwanted attributes to the right

texts:
I'm not able to drag the unwanted attributes to the right.

=> For example : country_of_manufacture.

it cannot be dragged across the line to the right where the unassigned attributes are.


texts: How to translate knockout string variables in Magento 2

texts:
I'm extending and translating a third party module which has the following in a template:

</option>

The label variable pulls in three attributes in a loop, but because there is no literal string value declared - the dictionary does not pick it up and any attempts to translate the value label returns are ignored.

I have hacked it by doing the following:

</option>

So here the translations are picked up because the literal strings to be translated are declared in the template and picked up by the dictionary parser.

But I'm curious what is the correct approach to this...


texts: How to view custom option that added programmatically, from the backend

texts:
I have added custom option programmatically when product adding to the cart. Now I want to know how to view it from the back end after order placed.

Adding the custom option

$product = Mage::getModel('catalog/product')->load($productId);
$cart =  Mage::getSingleton('checkout/cart');
$param = array(
        'product' => $product->getId(),
        'qty' => $qty,
        'options' => array(
            123 => $imagePath  // Custom option with id: 123
        )
    );
    $request = new Varien_Object();
    $request->setData($param);
    $cart->addProduct($product, $request);


texts: Magento 2: Prevent customer account auto registration

texts: Anyone know the best method to prevent automatic customer account registration? there is a captcha method any other?


texts: How to reduce Magento 2 rest api performance time?

texts:
I have created some custom rest api's and using Magento's default rest api's.
I want to reduce the loading time of the api, as I have custom api's too so the request time and response time is quite more than usual.
Is there any way or solution to this scenario. that will be a great help.
Thanks in advance.


texts: Move top menu bar to left side in Magento 2

texts:
I want to move the top menu bar to left sidebar I have written this code

<move element="catalog.topnav" destination="header-wrapper" after="block-search"/>

Through this code it is moving in header now, I want to know what to write in destination to move it to left side?
Any help will be appreciated.


texts: catalog price rule plus day and minus day

texts: I am odd why magento want to make rule date contain three date (current day, - 1 days before, + 1 days after). Will you tell me any purpose from the following code? Because we have not setup cron so and i don't want to setup cron.


texts:
I am trying to generate the code coverage report in HTML format for a module I am writing so I can work out where I need to improve coverage.

Normally when I run tests for my module I use the following command:

vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist vendor/vendorname/m2-module-name/

I tried to generate the report using the following command:

vendor/bin/phpunit -c dev/tests/unit/phpunit.xml.dist --coverage-html ./report vendor/vendorname/m2-module-name/

As you can see PHPUnit is generating the report for the setup module.

Does anybody know how to run code coverage on Magento 2?

I have also tried editing the phpunit.xml.dist to include the following line but it doesn't seem to do anything:

<logging>
    <!--coverage_html_placeholder-->
        <log type="coverage-html" target="/usr/share/nginx/html/test-reports/coverage" charset="UTF-8" yui="true" highlight="true"/>


texts:
I recently added an extension to my store (more precise) and the url I am getting is www.mystore.com/catalogextensions/index/promotional/.

Where does this url generate and how can i change it?

For example I would prefer having www.mystore.com/sale. I am quite new to Magento, so I apologize for this simple question ;)


texts: Magento 2: adminhtml menu.xml redefine menu item because independent extensions

texts:
I developed some extensions, and I'm installing on various merchants. I'm trying to add a menu item (first level) with my vendor name, and on the second level the menu items of my extensions.

The problem is, if I define for an extension the first level menu item, the other extensions cannot redefine the same menu item. I should add only the second level menu items indicating the parent.

The only solution I found is what some vendors are actually doing. Creating a base/core extension.

Is this the only way to do what I need to? I don't like having to install an extension only for that... It's not possible to do a simple "create if not exist" for example?

Why with system.xml we don't have this problem? You just define all what you want, and if something it's redefined nothing happens, no error and not duplicated item.

Well I only wanted to know if exists alternatives


texts:
Can I get some general hints on how to extend and modify the Blank theme for Magento2? I have created a theme module, I have added web/css/source/_theme.less and _extend.less, and I understand how to use . Past that, changing this theme seems completely unworkable!

For example, if I move the currency selector, it is no longer a dropdown selector but transforms into a huge list of currencies.

If I try to change the navbar color, no matter how many color variables I override, none of the submenu colors actually change.

I have no clue how to change the catalog Add to Cart button action to "customize" instead of "addtToCart". If I just insert the Customize button block into an extending layout xml, nothing appears.


texts: How to Import bulk products (60000+) to magento?

texts:
I am having a list of 60000 products and I want to import them to magento website using csv.
I have created the csv file by exporting a fake product from magento and then inserted the required data to them.
I used import feature of Magento but it was taking too much time.
So I have created the bunch of 500 products to import at a time but after importing 9-10 times i.e. 5000 products, its taking too much time.
Is there any way to import products very fast?

Please suggest me. I have tried to use Magmi but did not able to do with this.
As I am new to Magento please explain the solution in detail will be highly appreciable.


texts: Magento : Filter Collection by Attribute that Doesn't Exist or Null or another condition

texts:
I have created a new product eav attribute, assume it is created correctly.
Now I write something in this attribute in some products (5 for example), and I delete it from some of them (4). So this attribute only exist in 5 products, one is written and other 4 are null, but it doesn't exist yet in rest of products.

How do I get all product which don't have that attribute set or have it null?

I can do it with ones that have this value set:

$_products = Mage::getModel('catalog/product')
      ->getCollection()
      ->addAttributeToSelect(array('sku', 'name', 'newfield'))
      ->addAttributeToFilter(
        array(
            array('attribute'=> 'newfield','null' => true),
            array('attribute'=> 'newfield','eq' => '')
        ));

But it returns me only the 4 products that I have written and erased 'newfield', and not rest of products that doesn't have it set yet.

Edit:

I found a half solution (Filter collection by existence of attribute).

$_products = Mage::getModel('catalog/product')
      ->getCollection()
      ->addAttributeToSelect(array('sku', 'name', 'gtin'))
      ->addAttributeToFilter('newfield', array('null' => true), 'left');

I do not understand the third argument 'left', but this one returns me all the products with NULL in the newfield or where it does not exist yet (more than 13000 products), but I want to make an OR condition, I also want the products that contains string(0) "" or string(8) "NO FIELD"

I tried

$_products = Mage::getModel('catalog/product')
      ->getCollection()
      ->addAttributeToSelect(array('sku', 'name', 'newfield'))
      ->addAttributeToFilter(
        array(
            array('attribute'=> 'newfield','null' => true, 'left'),
            array('attribute'=> 'newfield','eq' => ''),
            array('attribute'=> 'newfield','eq' => 'NO FIELD')
        ));

But it is not acting like an OR condition and I only get back 3 results instead of more than 13000, probably it is because i'm not using the third argument 'left' properly.

Edit2:

I finally found something about the third parameter 'left' here (http://blog.adin.pro/2013-03-07/left-join-on-addattributetofilter-with-eav-tables/). But I see that I'm using like this in my OR condition and still getting only 3 results instead of more than 13000. What am I doing wrong here?

Edit3: Seems a definitive solution

I finally found this (https://hannah.wf/snippet-magento-using-or-and-left-join-in-addattributetofilter/), and then I made it:

$_products = Mage::getModel('catalog/product')
      ->getCollection()
      ->addAttributeToSelect(array('sku', 'name', 'newfield'))
      ->addAttributeToFilter(
        array(
            array('attribute'=> 'newfield','null' => true),
            array('attribute'=> 'newfield','eq' => ''),
            array('attribute'=> 'newfield','eq' => 'NO FIELD')
        ),
        '',
        'left');

It seems to return all the products I'm looking for, but I don't understand why it has to end with:

[...]
,
'',
'left');

My own logic says it should be

[...]
,
'left', //for the first condition
'',     //for the second condition
'');    //for the thrid condition

but my logic is returning only 3 results, so it's not working. The first one seems to work fine, but I don't understand why '', 'left'.


texts: How to fix checkout onepage logo & black screen after display mini cart

texts:
I am using 2.2.6

Checkout onepage LOGO look like css:z-index:1 & black screen after display mini cart.

How can i fix it?
i have tried to edit vendor/magento/module-checkout/view/frontend/web/template/estimation.html <button> to <a> , but not working for me. please help!


texts: Is it possible to configure 2 productlevels?

texts:
I am running into a problem trying to configure my catalog.
I set up a category tree.
I can now add products to the deepest level.
But what I want is a deeper product level under this product level.

The productlevel under the deepest category should contain images, files, descriptions, drawings, etc… in tabs.
But no price info, as the actual varieties vary in price!
I want the level under this to contain the actual varieties in the product with prices. And this can be a list only.
A little difficult to explain.

Please have a look at https://www.etk.nl/nl/catalog/inbouw/downlighters-led/cis-v16 where CIS-V16 is my actual product and the cis16-2700w etc. are the unique article codes of the variaties with their prices.

I cannot use a drop down menu and use configurable products, as there are no recurring options, they are too divers.

I am getting a little desperate, I have tried all and browsed the internet, but no clue how to solve this.
But I have to say that I just started using Magento, so I might overlook something.
(Link to my test website: http://www.etk-mood.nl/shop/catalogus/inbouw/downlighters-led.html)

Thanks in advance.


texts: Updating products on back end not reflected on front end

texts:
I have 2 problems and I am not sure if they are related.

First of all I have added a new category with new products, I can click on the Category but no products are displayed. If I go to the actual URL for the product I can see it but it appears as out of stock. However, I have stock management turned off, I have set out of stock items to display, I have gone back and set the quantity of stock to 100, I have even gone and set it to out of stock saved and then set to back in stock but it is still not appearing on the category page and the product page still says out of stock.

Secondly, I have updated the price of another product in another category, when looking at the category page the price is still the old price but when looking at the actual product page the price is updated properly.

I have flushed the cache and reindexed everything and cleared my own browser cache and cookies etc,. but nothing I do seems to make a difference. I feel  like there has to be something cached in the background that is not updating the products on the front end.

Any help with this would be greatly appreciated.

I am using Magento 2.1.11.


texts: Dynamic Terms and Conditions based on Product Selection

texts:
Is there a way of only showing particular (or all) Terms and Conditions during the checkout process if particular products are in the basket?

I realise that I will need to add an attribute to the products will will indicate whether or not the T&Cs apply, but other than that I don't know where to go.


texts: Whats the best way in Magento 2 to save value for the checkout process

texts:
I am doing a module that has different steps before the checkout and in one of the screens i need to save a value to add in the order.

I don't have any trouble to get the value and sending via ajax to the controller but i am not sure the best way to keep this value and get it after the client refresh the page select the product and goes to the checkout.

Not sure if it is better to use e session, cookie or save in a custom table with some kind of session id ?


texts: Where is a template for messages in Magento 2?

texts:
For example I got this piece of html on catalog search result page

    Your search 'test' did not match any products.

    Showing results using some of your search terms        'test 2 '.

Where this html was formed?


texts: Magento 2.3.0 product image cache resizing images to look very bad

texts:
i have uploaded images to magento 2.3 and when i look on product page i can see it been resizing to different size with white lines.
look at original image that has been uploaded: https://babybeddingdesign.r.worldssl.net/pub/media/catalog/product/d/u/dumbo_bedding_set.jpg

the one seen on my site: https://babybeddingdesign.r.worldssl.net/pub/media/catalog/product/cache/9d08971813a040f8f96067a40f75c615/d/u/dumbo_bedding_set.jpg

link to the item: https://babybeddingdesign.com/dumbo-crib-bedding-collection-crib-bedding-set

all my products also old ones have been resizing. what is the problem with Magento 2.3?


texts: Shipping failure - 404 or 400 on Magento 2

texts:
When a user orders using a valid address any where in Massachusetts or Montana then attempts to proceed past the shipping step of the one page checkout They're hit with the following errors;

Table rates shipping method selected; (Magento native configuration)

error;

POST daad827….js:12695 POST http://livingfresh.com/rest/default/V1/guest-carts/423071982511bf7b3d3fa8a0c1e9d228/shipping-information 404 (Not Found)

Upon navigating to the link above I land on a page that states;
"This XML file does not appear to have any style information associated with it. The document tree is shown below."

<response>
<message>Request does not match any route.</message>
</response>

error comes from file;

http://livingfresh.com/pub/static/_cache/merged/daad827d0070acc6a4deedf6cf1c72ae.js

offending code in file above;

// Do send the request
// This may raise an exception which is actually
// handled in jQuery.ajax (so no try/catch here)
xhr.send( ( options.hasContent && options.data ) || null );

When the user tries to use the express method (Magento native configuration) they get a 400 error from the same code and the same file.

Thanks.


texts: Add Product to cart error: invalid request for adding product to quote

texts:
I have a plugin and i want to add a product to the actual cart. This is my code:

          $productId = 2;
          $params = array(
                        'form_key' => $this->formKey->getFormKey(),
                        'product' => $productId, //product Id
                        'qty'   =>1 //quantity of product
                        'price' => 0
                    );
$_product = $this->product->load($productId);
$cart->addProduct($_product, $params);
$cart->save();

and i get the error: invalid request for adding product to quote.
I try this:

          $productId = 2;
          $params = array(
                        'form_key' => $this->formKey->getFormKey(),
                        'product' => $productId, //product Id
                        'qty'   =>1, //quantity of product
                        'price' => 0
                    );
          //Load the product based on productID
          $request = new Varien_Object();
          $request->setData($params);
          $_product = $this->product->load($productId);
          $cart->addProduct($_product, $params);
          $cart->save();

But it crash without any error.

Can someone help me to add a product to cart?

Thank you in advance!


texts: Magento 2 : Validate form fields that are loaded with Knockout on blur-event

texts:
I have a form that is generated through a .phtml file, and in this form various fields are loaded with KnockOut (using the uiComponent javascript-object).

.phtml:

<form action="#" class="form checkout__account" method="post" data-mage-init='{"validation":{}}'>
    <?php echo $block->getBlockHtml('formkey'); ?>
    <fieldset class="fieldset" data-bind="scope:'vendor_module_account'">
        <!--
            Account form:
        -->
        <!-- ko template: getTemplate() --><!-- /ko -->
    </fieldset>
</form>

.html (which is inserted in ko template: getTemplate()):

<input type="text" name="login[username]" id="email" class="input-text required-entry"
       data-validate="{required:true, 'validate-email':true}"
       data-bind="event:{change:checkEmailAddress,blur:checkEmailAddress,keypress:absorbEnter},value:emailAddress" />

Now I can get it why this wouldn't directly work on blur, but also when I submit the form (Using the inspector $0.submit()) the validation doesn't get executed.

Another interesting detail: the form gets an attribute novalidate="novalidate" added, I guess by the data-mage-init-attribute.

Anyone know why my form isn't validated and/or what I have to do is make it validate on submit/blur?


texts: Magento 2 : override customer login.phtml file in custom module

texts:
I had developed "Hello world" extension in Magento 2.

I want to override Customer login form of core files. What is correct way for overriding Customer login  form file in Magento 2.

I have coded like this

<referenceBlock name="customer_form_login">
    <action method="setTemplate">
     <argument name="template"xsi:type="string">Namespace_Loginoverride::login.phtml</argument>
   </action>
</referenceBlock>

but above code does not work for me

Please help me. Any help would be appreciated.


texts: Product's Tax Class change to "None" on Reindex. Any ideas?

texts:
We've just migrated from Magento 1.9.2.2 to Magento 2.2.8. We noticed in the last couple of days some orders are created without billing any tax. When We go check the product We notice the tax class is set to "None" (0 tax) so we change it back to our custom tax ("Taxable Goods") and later We notice new products (sometimes the same) go back to "None".

We were able to check every product with "None" as tax class by running following mysql command:

SELECT * FROM `catalog_product_flat_6` WHERE `tax_class_id` = 0

Even though We've updated them to our tax_class_id We noticed each time We run:

php bin/magento indexer:reindex

4 item's tax class change to "none".

We don't know where to look at this issue. We didn't customize Magento in any form and There are no issues in log files.

Any suggestions?


texts:
Error:

Fatal error:

Method Magento\Ui\TemplateEngine\Xhtml\Result::__toString() must not throw an exception, caught TypeError: Argument 5 passed to Sparx\Drm\Model\ResourceModel\Grid\Collection\Interceptor::__construct() must implement interface Magento\Framework\DB\Adapter\AdapterInterface, string given, called in /home/bargaink/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 93 in /home/bargaink/public_html/vendor/magento/module-ui/Component/Wrapper/UiComponent.php on line 0

When i removed var/di error removed. But when i again run bin/magento setup:di:compile i got same error.

magento version 2.1.7

Here is the file:

<?php
namespace Sparx\Drm\Model\ResourceModel\Grid;

class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
{
    /**
     * Define resource model
     *
     * @return void
     */
    // protected function _construct()
    // {
    //     $this->_init('Sparx\Drm\Model\Drm', 'Sparx\Drm\Model\ResourceModel\Drm');
    // }

    protected $_idFieldName = 'id';

    protected $_storeManager;

    public function __construct(
        \Magento\Framework\Data\Collection\EntityFactoryInterface $entityFactory,
        \Psr\Log\LoggerInterface $logger,
        \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
        \Magento\Framework\Event\ManagerInterface $eventManager,
        \Magento\Store\Model\StoreManagerInterface $storeManager,
        \Magento\Framework\DB\Adapter\AdapterInterface $connection = null,
        \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource = null
    ) {
        parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
        $this->_storeManager = $storeManager;
    }

    protected function _construct()
    {
        $this->_init('Sparx\Drm\Model\Drm','Sparx\Drm\Model\ResourceModel\Drm');
        $this->_map['fields']['entity_id'] = 'main_table.id';
    }

}

Is there something wrong with the coding?

Thanks


texts: Cash on delivery instruction field not showing in order details and order transactional emails

texts:
I've typed in some text into instructions field of cash on delivery payment method. The issue is that the content of this text area is not showing in order details, on the payment information section.
Instructions are missing also in transactional order emails.
Anyone has never encountered this problem?
Which could be the cause of missing instruction text for cash on delivery default Magento module?
I'm using Magento 1.9.3.2, cash on delivery module has not been modified, it's default one.


texts: Error/Success messages show wrong page and are not cleared

texts:
I'm on 2.2.1 with custom theme
when login failed, message showed up but are not cleared, it showed duplicate, and when login successfully, its still showing in account infomation page


texts: How to apply simpler password constraints for customers in magento 2

texts:
When setting up a new password, a customer may read the following message :

Minimum of different classes of characters in password is 3. Classes of characters: Lower Case, Upper Case, Digits, Special Characters.

I understand it's a good thing in terms of security, but I think this is way too much complicated for customers, and that it may prevent some of them to create an account at all.

Is there a way too apply simpler password constraints for customers ?


texts:
I try to add block to my template and I want to use reference, to my Magento 1.9.1.
So I did like this in local.xml:

<reference name="root">
    <block type="core/text_list" name="customerLinks" as="customerLinks" translate="label">
    <label>Customer Links</label>
    </block>
</reference>
<reference name="customerLinksReference">
    <block type="page/html" name="customerLinksReference" template="page/html/customerlinks.phtml" />
</reference>

...and to header.phtml:

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

and add customerlinks.phtml to folder: app/design/frontend/crazytee/default/template/page/html
(in block template I try with and without page/html)

I have switched off all caches.
I got this from here: http://inchoo.net/magento/custom-reference-structural-block/


texts: how to set start page in backend magento for different role user in magento

texts: suppose in magento backend i have to 2 role one is admin, other is sales. just like admin set start page for admin is dashboard. I want to set sales order is to be start page for sales role user.i want to know is there is any way to assign a start page for different role in magento.


texts: How to add new credit card type in Magento 2?

texts:
I need to add some news credit cards type to Magento 2 like:

"DC" => "Diners Club"
"EL" => "ELO"

I know that Magento 2 has the default credit card above:

"AE" => "American Express"
"VI" => "Visa"
"MC" => "MasterCard"
"DI" => "Discover"
"JCB" => "JCB"
"SM" => "Switch/Maestro"
"DN" => "Diners"
"SO" => "Solo"
"MI" => "Maestro International"
"MD" => "Maestro Domestic"
"OT" => "Other"

But how to add Diners Club and Elo?

Thanks!


texts: If coupon is applied then remove selling price and use mrp price

texts:
I tried,
Admin > Catalog > Manage Attributes:

Edit special_price attribute, setting "Use for Promo Rule Conditions" to "Yes"
Add special_price = 0 condition to coupon logic .


texts: Override Protected Function in magento 2

texts:
Abc\Tax\etc\di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
   <preference for="Magento\Tax\Model\Sales\Total\Quote\CommonTaxCollector" type="Abc\Tax\Model\Sales\Total\Quote\CommonTaxCollector" />
</config>

Abc\Tax\Model\Sales\Total\Quote\CommonTaxCollector.php

<?php
  namespace Abc\Tax\Model\Sales\Total\Quote;
  use Magento\Quote\Api\Data\ShippingAssignmentInterface;
  use Magento\Quote\Model\Quote\Address as QuoteAddress;
 class CommonTaxCollector extends    Magento\Tax\Model\Sales\Total\Quote\CommonTaxCollector
{
protected function processProductItems(
    ShippingAssignmentInterface $shippingAssignment,
    array $itemTaxDetails,
    QuoteAddress\Total $total
) {
    $store = $shippingAssignment->getShipping()->getAddress()->getQuote()->getStore();
     ........

    $total->setTotalAmount('tax', 10);
    $total->setBaseTotalAmount('tax', 10);

   ......
    return parent::processProductItems($shippingAssignment,$itemTaxDetails,$total);
}

}

Tax changes is not working How can i do this?


texts: Magento and PHPUnit Mocking Mage::getStoreConfig()

texts:
I am writing unit tests using the EcomDev PHPUnit extension.
When trying to provide values to the Mage::getStoreConfig() method using a fixture, I am not getting the value from my fixture, but the default value (from XML or from DB).
The fixture file has been found (I know that, because it threw errors until it was named correctly and in the right folder) and is very simple (myMethod.yaml):

config:
  payment/mymodule/numdays: 5

However in my block test in the method myMethod():

/**
* @test
* @loadFixture
*/
public function myMethod() {
//...
    Mage::getStoreConfig('payment/mymodule/numdays'); // returns 14
//...
}

Also, the store config returns 14 when it is called in the block under test.

Did I misunderstand the way to use these config value fixtures?
In the backend, all cache types are turned off.


texts: Possible ways that Paypal email address can be changed

texts: This morning, looking at paypel settings we realised that the paypal email address has been changed! How is it possible? has some one got access to admin panel? Whta are possible way to do that? could he get access to the database? Please help :(


texts: Magento 2: How to make the custom checkout step as inactive?

texts:
I have created a custom checkout step before the shipping step and its working fine. Now my requirement is that I have to make the custom checkout step as inactive and whenever I proceed to checkout, I want to show the shipping step as active and not my custom step.
Please guide me.


texts: Magento 2 - Moving Category Listing Toolbar

texts:
I'm trying to move the category page's toolbar above the left and right column in the 2columns-left layout so it spans over both the left column and right column, but nothing seems to be working.

In my theme's catalog_category_view.xml I have the following:

<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>
        <move element="product_list_toolbar" destination="columns" before="div.sidebar.main" />
    </body>
</page>


texts:
The contractor we hired several years ago installed Magento 1.4.0.1 and ended up modifying several core files. In the attached image, I am showing the diffs between our installation and a fresh 1.4.0.1 installation. Included is a short description of the change in each file that was changed.

From looking at it, how should I fix this situation using either plugins, extensions, module, etc? I have never written a Magento extension or module and not sure how I should do this with the changes involved. Some of them look like they are not going to be able to be done that way.

I'd appreciate any hints on how to tackle this as we have not been able to upgrade and I have not been able to get the USPS module changes installed, so we have to use flat rate shipping, which is costing us a ton.

I would hope that there are some concrete ideas posted and not just links to all the blog posts about writing Magento extensions and overriding Magento core as I've read probably every one of them; I just not sure what needs to be put where.

If you have any questions about the changes listed, please ask. I'll be as forthcoming as possible.

I intend to install a fresh version of 1.4.2 and begin the work there, then upgrade all the way to 1.9.

FYI...
We use Magento as a shopping cart "off the side" of an ExpressionEngine-based site. Essentially all we use is the cart portion. The product listings, etc are all handled by EE. Our authentication is through a web service to our Oracle DB and every Magento customer has the same password, they are automatically logged in by the system when they login to the site using our authentication scheme.


texts: Magento 2, less debug by grunt exec, but images and fonts were ignored

texts:
I'm trying to debug less files, but after I try "grunt exec" with my new theme, it clears already created folder at pub/static/frontend/My/design/en_US and does not creates symlinks to fonts and images (or maybe should copy that?).
How to deploy links to styles with images and fonts by grunt or by other quick way for developers?

dev/tools/grunt/configs/themes.js configured with follow section:

mysample_design: {
    area: 'frontend',
    name: 'MySample/design',
    locale: 'en_US',
    files: [
        'css/styles-m',
        'css/styles-l'
    ],
    dsl: 'less'
},

At the Magento guide I can not find solution.


texts: Magento 2: I am not aware about Magento optimization. Can you please share the steps for this?

texts:
I am not aware about Magento optimization. Can you please share the steps for this? How to compete with this?

Thanks


texts: product images not upload from backend in magento 1.9.3.7 it show only Complete but not display image


texts: Magento 2: How to check product has video or not

texts:
In the product list.phtml I want to check

if(product has video)
{
    show button video
}else
{
    not show button video
}

Any way to solve it? Thank in advance.


texts: change product special price for current session

texts: Is it possible to set product special price for current session? because i have to set product special price if my custom condition is satisfied?is it possible?


texts: Hide shipping and payment method for not logged in customer when traing to procceed checkout for a specific category of products

texts: I want to disable not logged in the customer to pay or see the shipping methods when they try to proceed checkout for the new arrivals products so what do i have to configure or override to do that. If anyone have an idea i will be thankful


texts: Do you know how I can move the "City" field before "Zip/Postal Code" in the Estimate Shipping and Tax part of the checkout cart?


texts: How to add validation on checkbox , select option and text fields in magento 2?

texts:
I have created 3 steps between review and Payment page in Magento 2.
But how to add validation on those fields which are ( checkbox , select option and text fields )
will anyone suggest anything for that ?


texts: Migrate database from Enterprise to Community Edition

texts:
I'm in the process of downgrade from Enterprise 1.14 to Community.
I have seen this post http://www.yanted.com/2014/02/21/downgrading-magento-enterprise-to-community/
What I want to do is do a fresh install of Magento Community (latest version) and use my old database from enterprise but fix it to can use it with community.
So, should I delete all the tables that start with the prefix enterprise? And also do what says in the post

DELETE FROM eav_attribute WHERE source_model LIKE 'enterprise_%';
DELETE FROM eav_attribute WHERE backend_model LIKE 'enterprise_%';
DELETE FROM eav_attribute WHERE attribute_code IN ('gift_wrapping_available', 'gift_wrapping_price');

I want to do it the cleanest but need to preserve the data.


texts: Enterprice / Gift card accounts Active and Redeemable

texts: In Gift Card Account edit screen, why do we have both Redeemable and Active? What is the difference?