texts: Custom product attributes not transferring when user logs in

texts:
I have custom attributes for products (defined via module) with different options/values and price increases. I have managed to track down most of the events that I need in order to transfer these attributes (on add to cart, on front end reorder, on checkout).

I am unable to get these attributes to stay associated with the item when checking the box and adding the item to the cart from the sidebar under "Last Ordered Items". I suspect this has something to do with the ajax add to cart and the data that gets passed through.

The bigger and more important issue is that if a customer adds a product with attributes to their cart, then logs in, none of the attributes transfer over. Is there a specific event I can hook into for this? If I can just use the logic I already have for when I add an item to the cart, and maybe just make it get all items instead of the one item, that would be helpful.

I've tried controller_action_predispatch, customer_login, sales_quote_merge_before and checkout_cart_product_add_after, and neither work, though I'm not sure if it's because of the code I'm using or because the event isn't correct.

Problem is, I don't need to call this on add to cart, I need to call it only when they're logging in.

Here's the function I'm calling:

public function modifyAllItems()
{
    $cart = Mage::getModel('checkout/cart')->getQuote();
    foreach ($cart->getAllItems() as $item) {
        $item_id = $item->getProduct()->getId();
        $product_price = $item->getPrice();
        $exclude_protein = $item->getData('exclude_protein');
        $sub_protein = $item->getData('sub_protein');
        $exclude_sides = $item->getData('exclude_sides');
        $sub_sides = $item->getData('sub_sides');

        $item->setData('exclude_protein', $exclude_protein);
        $item->setData('sub_protein', $sub_protein);
        $item->setData('exclude_sides', $exclude_sides);
        $item->setData('sub_sides', $sub_sides);

        // Set the custom price
        $item->setCustomPrice($product_price);
        $item->setOriginalCustomPrice($product_price);
        // Enable super mode on the product.
        $item->getProduct()->setIsSuperMode(true);
    }
}


texts: How to change checkout page field label in 2.1.7?

texts: I want to change State/Province label. How can I do it?


texts: Magento 2: Send admin email template programmatically

texts:
I have created an email template for my custom form as follows:
Vendor/Module/etc/email_templates.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:Magento:module:Magento_Email:etc/email_templates.xsd">
    <template id="custom_email_template" label="Warranty Email" file="custom_email_template.html" type="html" module="Vendor_Module" area="frontend"/>
</config>

and created the template file in
app/design/frontent/Vendor/Theme/Vendor_Module/email/custom_email_template.html

Now when I create a new template in Marketing -> Email templates I am able to see my new created template in the dropdown. I put the content for the template and save it in admin. But when the email is sent, it is sent from the custom_email_template.html content and not the content from the admin template.
I am sending email programmatically as follows:
$this->inlineTranslation->suspend();
        $sender = [
            'name' => $this->escaper->escapeHtml('Sufyan Khot'),
            'email' => $this->escaper->escapeHtml('sufyan.khot@gmail.com'),
        ];
        $transport = $this->transportBuilder
                        ->setTemplateIdentifier('custom_email_template')
                        ->setTemplateOptions(
                            [
                                'area' => \Magento\Framework\App\Area::AREA_FRONTEND,
                                'store' => 2,
                            ]
                        )
                        ->setTemplateVars([
                            'templateVar'  => 'Custom email',
                        ])
                        ->setFrom($sender)
                        ->addTo('sufyan.khot@gmail.com')
                        ->getTransport();
        $transport->sendMessage();
        $this->inlineTranslation->resume();

You can see I have put the template id as custom_email_template as specified in email_template.xml. When I check in the database I cannot find any column for email template I created in admin.
I want to send the content from the email template created in admin and not from the html file.


texts: Magento EE 1.12 & SOLR integration issue

texts:
I am trying to integrate apache solr with magento enterprise edition version 1.12. Magento 1.12 by default supports solr upto version 3.5. I have tried it with version 3.4, 3.5, 3.6 but i am getting this same error on all versions of SOLR.

Aug 12, 2014 8:57:28 PM org.apache.solr.handler.component.SpellCheckComponent$SpellCheckerListener newSearcher
INFO: Index is not optimized therefore skipping building spell check index for: magento_spell_en

The complete log is similar to: http://pastie.org/pastes/8154512

I am unable to debug the issue as i am unware of core working of SOLR.

Kindly help.


texts: How to roll over log files in magento 2?

texts:
Roll over log fies in Magento 2,
 because after some extend debug.log, system.log and exception.log files size is exceeding, so i want to roll over the file after some extend (10 Mb).


texts: Display Static Block for a Customer Group

texts:
I would like to place a static block for specific customer group on the header.phtml file. What is the customer group ID code to place with the block code below? For example the Customer Group ID is 4.

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('test-banner-gen')->toHtml(); ?>

Thank you


texts:
I'm working on a Magento site for the first time so my knowledge is very limited. I'm trying to change some of the images used in a slider from a product:

The slider is generated from the media.phtml file. The URL for the thumbnail images is obtained with <?php echo $this->helper('catalog/image')->init($this->getProduct(), 'thumbnail', $_image->getFile())->resize($thumbWidth, $thumbHeight); ?>

After some research I've found that all the images should be under /media/catalog/product but I can't find the image corresponding to the product because the URL obtained is a cached image and not the URL to the original image. Where are this product images stored in the directory structure under /media/catalog/product. Is there any way to change them through the admin panel?


texts: Is it good to add a new field to an existing table?

texts:
I need to add a new field to a Magento table  sales_order_item  in order to complete a task. But I am not sure if it is a good idea to do so.

Will this cause the problem for upgrading to a newer version later, Since the sales_order_item table is Magento core table?

I'm using Magento 2.


texts: Error in custom module Adminhtml Grid (setSaveParametersInSession() on boolean)

texts:
I generated a module using this online tool: http://www.silksoftware.com/magento-module-creator/

I am now facing this error:

  PHP Fatal error:  Uncaught Error: Call to a member function setSaveParametersInSession() on boolean in app/code/core/Mage/Adminhtml/Block/Widget/Grid/Container.php:66

But I don't know how I could debug it. Website is running on Magento CC 1.9.3. Saw this setSaveParametersInSession() on a non-object and that Fatal error: Call to a member function setSaveParametersInSession() on a non-object in aBlock\Widget\Grid\Container.php on line 66 but don't see what I could change.

A dump in core's Container.php, on
$this->_blockGroup.'/'.$this->_controller.'_grid'
returns me this:
'destinataires/adminhtml_destinataireschauvinfrance_grid'

Which seems right. Am I wrong?

An extract of my config.xml :

<config>
  <modules>
    <Canalweb_Destinataires>
      <version>0.1.0</version>
    </Canalweb_Destinataires>
  </modules>
  <global>
    […]
    <blocks>
      <destinataires>
        <class>Canalweb_Destinataires_Block</class>
      </destinataires>
    </blocks>
    <models>
      […]
      <destinataires>
        <class>Canalweb_Destinataires_Model</class>
        <resourceModel>destinataires_mysql4</resourceModel>
      </destinataires>
      <destinataires_mysql4>
        <class>Canalweb_Destinataires_Model_Mysql4</class>
        <entities>
          <destinataireschauvinfrance>

destinataires_chauvin_france

          </destinataireschauvinfrance>
          <destinataireschauvinpays>

destinataires_chauvin_pays

          </destinataireschauvinpays>
          […]
        </entities>
      </destinataires_mysql4>
    </models>
    […]
    <admin>
      <routers>
        <destinataires>
          <use>admin</use>
          <args>
            <module>Canalweb_Destinataires</module>
            <frontName>admin_destinataires</frontName>
          </args>
        </destinataires>
      </routers>
    </admin>
    <adminhtml>
      <menu>
        <destinataires module="destinataires">
        <title>Destinataires</title>
        <sort_order>100</sort_order>
        <children>
          <destinataireschauvinfrance module="destinataires">
            <title>Manage Destinataireschauvinfrance</title>
            <sort_order>0</sort_order>
            <action>admin_destinataires/adminhtml_destinataireschauvinfrance</action>
          </destinataireschauvinfrance>
          […]

My Block/Adminhtml/Destinataireschauvinfrance.php :

<?php

class Canalweb_Destinataires_Block_Adminhtml_Destinataireschauvinfrance extends Mage_Adminhtml_Block_Widget_Grid_Container{

    public function __construct()
    {
        $this->_controller = "adminhtml_destinataireschauvinfrance";
        $this->_blockGroup = "destinataires";
        $this->_headerText = Mage::helper("destinataires")->__("Destinataireschauvinfrance Manager");
        $this->_addButtonLabel = Mage::helper("destinataires")->__("Add New Item");
        parent::__construct();
    }

Beginning of my Block/Adminhtml/Destinataireschauvinfrance/Grid.php :

<?php

class Canalweb_Destinataires_Block_Adminhtml_Destinataireschauvinfrance_Grid extends Mage_Adminhtml_Block_Widget_Grid
{

    public function __construct()
    {
        parent::__construct();
        $this->setId("destinataireschauvinfranceGrid");
        $this->setDefaultSort("id");
        $this->setDefaultDir("DESC");
        $this->setSaveParametersInSession(true);
    }

What am I not seeing?


texts: Can not access payment methods tab in magento back office

texts:
I installed the last version available of Magento 1.9.2.1.
I try to access the payment methods tab as an admin and I have this error:

Fatal error: Call to a member function setAllowedTypes() on a non-object in C:\wamp\www\magentomerchant\app\code\core\Mage\Paypal\Model\Config.php on line 1092

I did not modify any of the core modules of magento.
Any explanations ?

Thank you

Edit:

It seems that as soon as I add a new module I have this error.
This is its config.xml

            0.1.0

  <frontend>
    <routers>
        <payment>
            <use>standard</use>
            <args>
                <module>Merchant_Payment</module>
                <frontName>payment</frontName>
            </args>
        </payment>
    </routers>
    <layout>
        <updates>
            <payment>
                <file>payment.xml</file>
            </payment>
        </updates>
    </layout>
</frontend>

<global>
    <blocks>
        <payment>
            <class>Merchant_Payment_Block</class>
        </payment>
    </blocks>

    <models>
        <payment>
            <class>Merchant_Payment_Model</class>
            <resourceModel>payment_mysql4</resourceModel>
        </payment>
        <payment_mysql4>
            <class>Merchant_Payment_Model_Mysql4</class>
            <entities>

                <payment>

transaction_test

                </payment>

                <magentoservice>

magento_service

                </magentoservice>

                <magentotransaction>

magento_transaction

                </magentotransaction>

            </entities>
        </payment_mysql4>
     </models>

    <resources>
        <payment_write>
            <connection>
                <use>core_write</use>
            </connection>
        </payment_write>
        <payment_read>
            <connection>
                <use>core_read</use>
            </connection>
        </payment_read>
    </resources>
</global>

<admin>
    <routers>
        <payment>
            <use>admin</use>>
            <args>
                <module>Merchant_Payment</module>
                <frontName>payment</frontName>
            </args>
        </payment>
    </routers>
</admin>


texts: Paypal Config All Greyed out/Disabled in magento backend

texts: For some reason all my paypal configure buttons became disabled and greyed out. I filled in all my store info and thats correct so that cant be the case. I am on magento 1.9.1


texts: Special price tax applied in catalog but not in product page

texts:
I'm migrating Magento 1.7.0.2 to 1.9.1.1 and having following issue.

In catalog view products that has special price set are displayed with tax applied. Although, in the product view the same product shows regular price as well as special price but special price is before tax.

In both cases template uses $this->getPriceHtml($_product, true) which, I assume should display proper price.

Before upgrade, on 1.7.0.2 that wasn't a problem because special price was displayed the same as in product list.

I'm not an expert here and I believe that I'm missing something. Could someone explain me why that happens and what possible solutions are?

In admin I have following settings (some of them might be irrelevant):

Tax > Calculation Settings > Catalog Prices > Excluding Tax
Tax > Price Display Settings > Display Product Prices In Catalog > Including Tax
Tax > Price Display Settings > Display Shipping Prices > Including Tax
Tax > Fixed Product Taxes > Enable FPT > No
Tax > Fixed Product Taxes > Display Prices In Product Lists > Including FPT Only
Tax > Fixed Product Taxes > Display Prices On Product View Page > Including FPT Only

Let me know if I can provide more information.


texts: How to get regular price of BUNDLE product

texts:
I have an bundle product like this:

Bundle product:
**Option 1:
-subproduct:15$
-subproduct:7$
**Option 2:
-subproduct:5$
-subproduct:20$
In admin of product page, i set Special Price 90%.

In category page, it's display:

Bundle product
As low as:
10.8$

How can i show regular price like this?

As low as:
Reg:12$  Spec:10.8$

Thanks for read.


texts: I am getting error running this command php bin/magento indexer:reindex

texts:
I am getting this error while running this command.php bin/magento indexer:reindex

here is the error

  PHP Fatal error:  Uncaught Error: Class 'DOMDocument' not found in /opt/lampp/htdocs/magento2.2.5/vendor/magento/framework/Config/Dom.php:384
    Stack trace:
    #0 /opt/lampp/htdocs/magento2.2.5/vendor/magento/framework/Config/Dom.php(115): Magento\Framework\Config\Dom->_initDom('<?xml version="...')
    #1 /opt/lampp/htdocs/magento2.2.5/vendor/magento/framework/ObjectManager/Config/Reader/Dom.php(70): Magento\Framework\Config\Dom->__construct('<?xml version="...', Object(Magento\Framework\App\Arguments\ValidationState), Array, 'xsi:type', NULL)
    #2 /opt/lampp/htdocs/magento2.2.5/vendor/magento/framework/Config/Reader/Filesystem.php(149): Magento\Framework\ObjectManager\Config\Reader\Dom->_createConfigMerger('Magento\\Framewo...', '<?xml version="...')
    #3 /opt/lampp/htdocs/magento2.2.5/vendor/magento/framework/Config/Reader/Filesystem.php(130): Magento\Framework\Config\Reader\Filesystem->_readFiles(Object(Magento\Framework\Config\FileIterator))
    #4 /opt/lampp/htdocs/magento2.2.5/vendor/magento/framework/App/ObjectManagerFactory.php(275):  in /opt/lampp/htdocs/magento2.2.5/vendor/magento/framework/Config/Dom.php on line 384


texts: Magento 2 Product detail page show content without Tabs

texts:
I want to show content without tabs on product detail page.  Magento shows description and reviews in tab on product detail page.

Is there any way we can remove the tab and show content vertically?

just like amazon:


texts: Configurable product image not switching with swatch change

texts:
I am trying to get configurable swatches working in a custom theme in a 1.9 build. I am basically using this method of importing the functionality in the theme. The swatches are working fine, they are setting the correct values of the configurable product, but when selecting the options, the product image is not switching.

Looking at a working RWD implementation as an example, the JS that is driving the functionality adds in the switching images dynamically when you click on of the swatches and will then switch between them as the user continues to click. The image that is added looks like this:

<img src="http://{{site-home}}/media/catalog/product/cache/1/image/1800x/040ec09b1e35df139433887a97daa66f/m/t/mtk004t_7.jpg" class="gallery-image visible">

For my site, this image is not being generated when I click on my swatch.

I tracked down the functionality to this file: /skin/frontend/{{vender}}/{{theme}}/js/configurableswatches/product-media.js. As far as i have been able to de-bug this file, the fail point is here:

getSwatchImage: function(productId, optionLabel, selectedLabels) {
    var fallback = ConfigurableMediaImages.productImages[productId];
    console.log(fallback);
    if(!fallback) {
        return null;
    }

Where the var fallback is returning undefined because the .productImages is not getting set. The productId is getting passed in correctly. Before the call to the productId the JS is only defining it as an empty object, and it hasn't had any value pushed into it.

At this point i'm not sure what to check to find out what might be causing this to fail. There are no JS errors on the site, and to my understanding all the files are loading correctly and in place. The product has images set in the configurable and the simple, so i don't "think" that's the issue. If anyone has any experience de-bugging this functionality, any clue to what might be failing would be great.

thanks


texts: How to execute a section only when user is logged in else skip the section?

texts:
I have these codes for account link. How can I change the code in phtml account link section so that if user is not logged in the acount link section code will not execute else it will execute.

app/design/.... /account-links.phtml

<?php if ($accountLinksHtml): ?>
<div id="header-account" class="account-links top-links links-wrapper-separators-left skip-content skip-content--style">
    <?php echo $accountLinksHtml; ?>
</div>

app/code/...... /account-links.php

class AccountLinks extends \Magento\Framework\View\Element\Template
{
    /**
     * Theme helper
     *
     * @var HelperData
     */
    protected $theme;

    /**
     * @param \Magento\Framework\View\Element\Template\Context $context
     * @param HelperData $helperData
     * @param array $data
     */
    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        HelperData $helperData,
        array $data = []
    ) {
        $this->theme = $helperData;
        parent::__construct($context, $data);
    }

   /**
     * Get helper
     *
     * @return HelperData
     */
    public function getHelperTheme()
    {
        return $this->theme;
    }

}


texts: How can we set sizes for Product image while uploading in Admin Section

texts:
I am using Magento 1.9 version.

I am working on creating products in Magento, due to some specific conditions I need the size of images of uploaded image in defined ratio.

So I need to set the width and Height of a image when we are uploading it in Image section of a Manage Product.

Thanks in advance for any help.


texts: Remove Fotorama and output only images (Magento 2)

texts:
Trying to figure out how to remove Fotorama from product detail page and just output all the images on page. I want to make another style for this part.
Since longtime searching for this.


texts: When styles-old.less from Magento/backend theme is used?

texts:
When Magento 2 backend theme styles-old.less is used?

I see only styles.less linked in the admin panel.


texts: Magento 2 : keep disable product in cart

texts:
I want to keep disabled product in cart.

Let's say I have added one product to the cart. After that I have disabled that product from Magento admin. Now when I visit cart page, there is message that your cart is empty. But I want to keep disabled product in cart.

Persistent shopping cart is already enabled in my case.

How to prevent Magento from removing the disabled items from cart?


texts:
I'm trying to add an image upload field to the admin module form so admin users can have a profile picture, I've managed to add a column in the database through the installSchema but can't work out how to add the upload button and save the image on the frontend.

Can anyone point me in the right direction?


texts:
How to create table,alter table and drop the table using declarative schema??

If anyone have reference links or extension then please guide me.

I already referred below links.

  inchoo Blog

  dckap Blog

  AncutaIonela GitHub

  victortodoran Githunb

  yireo-training GitHub

  bdcrops GitHub


texts:
I have a quick question on magento coupon code generator. Please see the below method in core/Mage/SalesRule/Model/Rule.php:

 /**
 * Acquire coupon instance
 *
 * @param bool $saveNewlyCreated Whether or not to save newly created coupon
 * @param int $saveAttemptCount Number of attempts to save newly created coupon
 *
 * @return Mage_SalesRule_Model_Coupon|null
 */
public function acquireCoupon($saveNewlyCreated = true, $saveAttemptCount = 10)
{
    if ($this->getCouponType() == self::COUPON_TYPE_NO_COUPON) {
        return null;
    }
    if ($this->getCouponType() == self::COUPON_TYPE_SPECIFIC) {
        return $this->getPrimaryCoupon();
    }
    /** @var Mage_SalesRule_Model_Coupon $coupon */
    $coupon = Mage::getModel('salesrule/coupon');
    $coupon->setRule($this)
        ->setIsPrimary(false)
        ->setUsageLimit($this->getUsesPerCoupon() ? $this->getUsesPerCoupon() : null)
        ->setUsagePerCustomer($this->getUsesPerCustomer() ? $this->getUsesPerCustomer() : null)
        ->setExpirationDate($this->getToDate());

    $couponCode = self::getCouponCodeGenerator()->generateCode();
    $coupon->setCode($couponCode);

    $ok = false;
    if (!$saveNewlyCreated) {
        $ok = true;
    } else if ($this->getId()) {
        for ($attemptNum = 0; $attemptNum < $saveAttemptCount; $attemptNum++) {
            try {
                $coupon->save();
            } catch (Exception $e) {
                if ($e instanceof Mage_Core_Exception || $coupon->getId()) {
                    die(print_r($e));
                    throw $e;
                }
                $coupon->setCode(
                    $couponCode .
                    self::getCouponCodeGenerator()->getDelimiter() .
                    sprintf('%04u', rand(0, 9999))
                );
                continue;
            }
            $ok = true;
            break;
        }
    }
    if (!$ok) {
        Mage::throwException(Mage::helper('salesrule')->__('Can\'t acquire coupon.'));
    }

    return $coupon;
}

I can see it has 10 attempts by default. However if I generate a code which exists in the database, I get an exception immediately:

a:5:{i:0;s:41:"Coupon with the same code already exists.";i:1;s:3513:"#0 /var/www/html/magento1/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(676)

Is there any way to prevent this without touching the core code? And in case the coupon code exists - should there not be another try as there are 10 attempts?


texts: Updated Magento 1.9.2.2 Blank Admin but Frontend Works

texts: We received a couple questions about blank admins after upgrading to Magento 1.9.2.2 but the frontend of the store was working properly. There was no errors being returned on admin or on server logs.


texts: Price not getting updated for second product...

texts:
I m trying to remove the group of item from the cart and adding another group of product to the cart. My error is, price is displaying only for first item not other items in cart page after doing the replace in cart..

Friends pls help me out..In new to magento

Below is my code

use Magento\Framework\App\Action\Action;
use Magento\Framework\App\Action\Context;
use Magento\Framework\App\RequestInterface;
use Magento\Catalog\Model\ProductFactory;
use Magento\Customer\Model\Url;

class UpdatePost extends Action
{

    protected $cart;
    protected $product;

    protected $_customerSession;

    protected $_catalogProduct;
    protected $checkout_session;

    public function __construct(
        Context $context,
        ProductFactory $catalogProduct,
        \Magento\Customer\Model\Session $customerSession,
        \Magento\Catalog\Model\Product $product,
        \Magento\Checkout\Model\Cart $cart,
        \Magento\Checkout\Model\Session $checkout_session
    ) {
        $this->_customerSession = $customerSession;
        $this->_catalogProduct = $catalogProduct;
        $this->cart = $cart;
        $this->product = $product;
        $this->checkout_session = $checkout_session;

        parent::__construct($context);
    }

    public function execute()
    {
        $params = $attr = array();
        $productInfo = array();
        $params = $this->getRequest()->getParams();
        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();

        if(isset($params['item_id']) && count($params['item_id']) > 0){

            /* remove item cart starts */
            for ($i=0; $i cart->removeItem($item_id)->save();
                $quoteItem = $this->getItemModel()->load($item_id);
                $quoteItem->delete();
                /* remove the exiting product from cart ends*/

            }
            /* remove item cart ends */

            for ($i=0; $i  $opt_val) {
                            $attr['options'][$opt_key]  = $opt_val;
                        }
                    }
                }
                /* add current product to cart starts*/
                $_product = $this->_catalogProduct->create()->load($product_id);
                if ($_product)
                {
                    $this->cart->addProduct($_product, $attr);
                    $this->cart->save();
                }
                /* add current product to cart ends*/

            }

            $this->messageManager->addSuccess(__('Cart Updated successfully.'));

        }else{
             $this->messageManager->addError(__('Invalid Item. Please select item in cart!'));
        }

         return $this->goBack($this->_redirect->getRefererUrl());

    }


texts: Magento 2: Display specific categories to specific usergroups

texts:
Sorry guys this might be bit silly question but I am new in Magento.

I am trying to display specific categories according to specific Usergroups:

For example: I have usergroups

  "customergroup1",
  "customergroup2"
  "customergroup3"

And I have Categories

  "category1",

  "category2",
  "category3",
  "category4"

etc

Now I want if customer belongs to "customergroup1" he can only see "category1" and "category2"

And if customer is from "customergroup2" he can only veiw "category2" and "category3" etc

My first priority is to do this without extension.


texts: How can I change pagination to show first last previous next

texts:
Hello how can I change the pagination in Magento that it shows links for previous site, next site, last site and first site?

What I want is that:

(1) 2 3 4 5 next last

first previous 1 (2) 3 4 5 next last

first previous 23 23 (25) 26 27 next last

first previous 3 4 5 6 (7)

I am using standard toolbar/pagination from Magento.


texts: Enabling Catalog Search -> Elasticsearc6+ results error in frontend

texts:
In Magento 2.3.2 I enabled Elasticsearch6+ in Catalog Search -> Search Engine. It resulted this error in front end:

  Class
  Magento\Elasticsearch6\Model\Adapter\FieldMapper\ProductFieldMapper
  does not exist

Any ideas what this is about?


texts:
How to display Multiple thumbnail images Below main product image. Right Now i am getting only one but on admin side having multiple.

Magento version 2.1.8


texts: Search Products that are NOT in any categories

texts:
It is easy to find out what products are in a category.

Is there a way to find out what products are NOT in a category?

Is there a way to find out what products are NOT in any categories?

My purpose for this is to search products that may have been entered and, for some reason, the category tab was forgotten resulting in a product that cannot be found as it should.


texts: 404 when submit Forgot password form added in custom theme

texts:
I have added a forgot password form to all the pages, by adding the following line in the default.xml of my custom theme:

<block class="Magento\Customer\Block\Account\Forgotpassword" name="forgotPassword.pop" template="Magento_Customer::form/forgotpassword.phtml">

But, when the end-user clicks on the Reset my password button, the page redirects to this URL:

/cms/index/forgotpasswordpost

And the page returns the 404  (screenshot is attached).

Any help is greatly appreciated.

M 2.2


texts: Required modifications for using Varnish on Magento CE

texts:
I'm struggling to find any good working examples of what modifications are required to allow Varnish to cache a Magento site.

Ideally I'd like a list of tasks, such as things to disable/enable and where to look for them. It would also be good to have the Varnish config that those changes are designed to work with.

The Magento performance guide talks a lot about Varnish, so I know it's been done before, however it doesn't actually explain how to get it working.


texts:
After upgrading from 1.9 to 1.9.2 everything seems to be working fine but when I go to System>Configuration>Configurable Swatches I get the following error:

  Fatal error: Call to a member function toOptionArray() on a non-object in app/code/core/Mage/Adminhtml/Block/System/Config/Form.php on line 463

I tried re-installing admin_html from magento connect but it didn't help and I am sure my theme supports configurable swatches because it's enabled on the demo. Any suggestions on how to solve this problem?


texts:
Since most people were having problem with Webservicex of Magento 1.9.2, I am using the Fixer.io to update my currency rates. When I do it manually it works like a charm and I have enabled the scheduled update on System > Configuration > Currency Setup but for some reason it doesn't seem to be updating them through cron daily so I have to do it manually all the time.

In my crontab I have the following line of code to run the cron:

*/5 * * * * wget -O /dev/null -q http://www.example.com/cron.php > /dev/null

Of course example is replaced with my proper website domain, any suggestions on why its not working as intended or a good way to check if the cron job is getting executed correctly?

Thanks in advance.


texts: Magento API calling using HTML and javascript

texts:
I'm new to Magento and I'm developing a PhoneGap app using HTML5, CSS and Javascript. I searched many places and read Magento documentations, but couldn't get any example for authenticating, calling, getting results from the Magento APIs using javascript. I came to know that token-based authentications is needed and REST APIs are suitable for my purpose. Maily I have the following doubts.

What are the settings I have to do in admin panel of Magento for accessing APIs.
How to authenticate to Magento APIs in a page using HTML5 and Javascript.
What are the APIs provided by Magento and how to call them in a page using HTML5 and Javascript.


texts: Magento 1.9.4.3 - Can't edit customer in Adminside or backend

texts:
I have many customers but when I edit customer thought
backend like admin side but can't edit I face some issue
and when Add New Address can't do anything see below snap..

when edit customer address can't be edit see above image and can't add the new address
see below snap I tried to find solutions but can't get the solution
please give me a suggestion on how can I fix it ASAP.

Thank you.


texts: Magento 2 - Move Layered Navigation above products

texts:
Currently my Layered Navigation on mobile is under the products. On a large Category we have 60 Products displayed with additional filters for the layered navgiation. Since the users cant find the filter options I want to move it above the products to make it visible for everyone.

For some reason i dont know where to start, is there anyone who could help me with that?

Magento Version: 2.2.6


texts: How we remove the word "out stock" in the label of product in the catalog, although haven't in the inventory this product.


texts: Override review summary.phtml under custom template

texts:
I want to override vendor/magento/module-review/view/frontend/templates/helper/summary_short.phtml under my custom template.
I created the phtml file under app/design/frontend/XXX/XXX/Module_Review/view/frontend/templates/helper/summary_short.phtml but it's not working.


texts: Magento2: Unable to reload customer cart section

texts:
I am using welpixel quick view extension for quick view on product listing, but due to some customizations I am unable to use it as it is. So I just used its url to get html and appended data using jQuery as:

$('#'+appendDiv).html('<object type="text/html" data='+quickUrl+' ></object>');

Now everything works fine except one thing that on add to cart I am unable to refresh customer min cart section.

Approaches tried:

Approach 1:

<action name="frontname/controller/action">
    <section name="cart"/>
</action>

Approach 2:

require(['jquery','Magento_Customer/js/customer-data'], function
($,customerData) {
  var sections = ['cart'];
    customerData.invalidate(sections);
    customerData.reload(sections, true);

 });

In WeltPixel QuickView I found a JS on which after addtocart I am in. I also did console log and got output there successfully then I used the second approach as

require('Magento_Customer/js/customer-data').reload(['cart'], false)

On doing so in Network I can see my section GET ajax is called and which contains correct cart data, but unfortunately, it is not been reflected in the frontend. There is no error in the console as well at this moment.

I think to do with In JS i.e. Approach 2 should work but unfortunately, it is not. Also cleared cache, var/*, generated, incognito but no luck.

Any idea how I can do this?


texts: Magento 2 - Is there anyway to send newsletters out faster?

texts: We have a list of over 12k subscribers and it currently takes 2-3 days to send. Isn't there a way to send them faster?


texts: How do i magento2 migrate setting from from magento 1.9.0.1 to magento2.2.6 , I am using CE and working on windows machine wamp server

texts:
i am new to magento
using the below command and got the issue as below

E:\wamp\www\magento226>php bin\magento migrate:setting -r vendor\magento\data-migration-tool\etc\opensourse-to-opensourse\1.9.0.1\config.xml

[Migration\Exception]
  Invalid config filename: vendor\magento\data-migration-tool\etc\opensourse-to-opensourse\1.9.0.1\config.xml

migrate:settings [-r|--reset] [-a|--auto] [--]

And generally in the tutorials can able see in the etc folder ce-to-ce, ce-to-ee and ee-to-ee, but here in my machine i can see commerce-to-commerce,opensource-to-commerce and opensource-to-opensource


texts:
Is it possible to skip the Shopping Cart (i.e. /checkout/cart/)?

So, there's natively 2-steps to buy something: View and Edit Cart > Checkout

What I'd like to do is remove the View and Edit Cart step. The way I see it, there are 2 obvious options to pursue:

Create a URL rewrite for /checkout/cart/ to /checkout/
Find and hide any buttons/links that point to /checkout/cart/

However, I'm looking for a less aggressive option that applies to good practice (if one exists).

Side-Note

Anyone curious as to why I'd want to remove this step:

I use an OPC that allows for basket editing
Minimising the steps to checkout is good practice


texts:
My category list is showing a random list of products, but as one scrolls down the page it shows duplicates because it is just takes into account the first 20, as set by setPageSize.

$_productCollection = Mage::getModel('catalog/product')
->getCollection()
->addAttributeToSort()
->addAttributeToSelect('*')
->addFieldToFilter(array(array('attribute'=>'visibility', 'neq'=>"1")))
->addAttributeToFilter('status', 1)
->addCategoryFilter($ccat->load());

$this->$_productCollection =
Mage::getSingleton('cataloginventory/stock')
->addInStockFilterToCollection($_productCollection);

$_productCollection->setPageSize(20)->setCurPage(1);
$_productCollection->getSelect()->order(new Zend_Db_Expr('RAND()'));

I tried creating a 'seen products' array but only the first twenty are added.

Is there any way I can randomise the collection but ensure each product shows once?


texts:
I have received this error only once. The customer tried to place an order using afterpay payment method and afterpay approved the payment but while creating order in Magento it threw this error:

  There was a problem with order creation. Notice: Array to string
  conversion in /vendor/magento/framework/DB/Adapter/Pdo/Mysql.php on
  line 3088

The problem is I cannot reproduce it again. How do I fix this?

Is this a core bug?


texts: Bestseller Products Collection Not coming zero for current month and day even it is using old collection magento 2?

texts:
Here Bestseller Products Collection Not coming zero for current month
  or day because for this month or day we don't have any orders even it
  is using old records  and showing some number of data in magento 2??

<?php
namespace Vendor\Module\Block;
class BestSeller extends \Magento\Framework\View\Element\Template
{
   protected $_collectionFactory;
   public function __construct(
       \Magento\Backend\Block\Template\Context $context,
       \Magento\Sales\Model\ResourceModel\Report\Bestsellers\CollectionFactory $collectionFactory
   ) {
       $this->_collectionFactory = $collectionFactory;
       parent::__construct($context, $data);
   }

    public function getBestSellerData(){

        $bestSellerProdcutCollection = $this->_collectionFactory->create()
                    ->setModel('Magento\Catalog\Model\Product')
                    ->setPeriod('day') //you can add period daily,yearly
                    ->setPageSize(8);

        return $bestSellerProdcutCollection;

    }

}


texts: Products with included tax price are not displayed right

texts:
As mentioned in the title i have set a tax rate at 23% and through the tax calculation i have chosen the product prices to include tax. My problem is that when i am going to the cart the tax is calculated again and added to total once more. That makes my product to have double tax.
How can this be solved?


texts: where is my watermark image display in magento2 admin?

texts:
I have checked in

  content->design->configuration->Mytheme->Product Image Watermarks

but I didn't found uploaded watermark image.
see:


texts: Shipping error, sales_flat_shipment_item missing along with all sales_flat... tables

texts:
I was trying to ship an order through magento and got an error that starts with below (it's very long, didn't paste all of it.

When I went to look for that table I realized I don't have any tables that start with sales_flat. My tables stop at letter R, last table is rating_option_vote.

  a:5:{i:0;s:228:"SQLSTATE[42S02]: Base table or view not found: 1146
  Table 'sales_flat_shipment_item' doesn't exist, query was: SELECT
  main_table.* FROM sales_flat_shipment_item AS `main_ta


texts: Product attribute drop down value show according to it's parent drop down selection

texts:
I want to product attribute(attribute2) having input type select depend on other attribute's (attribute1)value on admin side.

For example, Customer module state dropdown selection based on country.

In my case, I have two dropdown "destination", and "location". location dropdown value select based on destination value.


texts: How to get parent sku from child sku magento 2

texts:
I have a child SKU in an array and I need to get all the parents from the existing child SKUs from the array.
Can everybody help me ?
Thanks


texts: API error when adding an extension attribute

texts:
I'm trying to follow Magento's tutorial for adding an extension attribute.  I want to add an extension attribute called "exportedFlag" to the Invoice class, and have it returned through the V1/invoices/ API method.

Here's my API call

http://magento.test/rest/V1/invoices/?
searchCriteria[filter_groups][0][filters][0][field]=store_id&
searchCriteria[filter_groups][0][filters][0][value]=1&
searchCriteria[filter_groups][0][filters][0][condition_type]=eq

Here's the error I'm getting:

Fatal Error: 'Uncaught TypeError: Argument 2 passed to
MyCompany\\Invoice\\Model\\Plugin\\Invoice\\Repository::afterGetList()
must be an instance of Magento\\Framework\\Api\\SearchResults,
instance of Magento\\Sales\\Model\\ResourceModel\\Order\\Invoice\\Collection given,
called in /var/www/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php
on line 146 and defined in
/var/www/magento2/app/code/MyCompany/Invoice/Model/Plugin/Invoice/Repository.php:53
Stack trace:
#0 /var/www/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(146):
MyCompany\\Invoice\\Model\\Plugin\\Invoice\\Repository->afterGetList(Object(Magento\\Sales\\Model\\Order\\InvoiceRepository\\Interceptor),
Object(Magento\\Sales\\Model\\ResourceModel\\Order\\Invoice\\Collection),
Object(Magento\\Framework\\Api\\SearchCriteria))
#1 /var/www/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(153):
Magento\\Sales\\Model\\Order\\InvoiceRepository\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\Api\\SearchCriteria))
#2 /var/www/mag' in '/var/www/magento2/app/code/MyCompany/Invoice/Model/Plugin/Invoice/Repository.php' on line 53

Here's the relevant code

/**
 * Class Repository
 * @package MyCompany\Invoice\Model\Plugin\Invoice
 */
class Repository
{
    /**
     * Adds the "exported flag" to invoice extension attributes.
     *
     * @param \Magento\Sales\Api\InvoiceRepositoryInterface $subject
     * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
     * @return \Magento\Framework\Api\SearchResults
     */
    public function afterGetList
    (
        \Magento\Sales\Api\InvoiceRepositoryInterface $subject,
        \Magento\Framework\Api\SearchResults $searchResult
    ) {
        /** @var \Magento\Catalog\Api\Data\InvoiceInterface $invoice */
        foreach ($searchResult->getItems() as $invoice) {
            $this->addExportedFlagToInvoice($invoice);
        }
        return $searchResult;
    }
}

For reference, here's the comparable bit of code from Magento's Github example

/**
 * Class Repository
 * @package MyCompany\Invoice\Model\Plugin\Invoice
 */
class Repository
{
    /**
     * Add Social Links to product extension attributes
     *
     * @param \Magento\Catalog\Api\ProductRepositoryInterface $subject
     * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
     * @return \Magento\Framework\Api\SearchResults
     */
    public function afterGetList
    (
        \Magento\Catalog\Api\ProductRepositoryInterface $subject,
        \Magento\Framework\Api\SearchResults $searchResult
    ) {
        /** @var \Magento\Catalog\Api\Data\ProductInterface $product */
        foreach ($searchResult->getItems() as $product) {
            $this->addExternalLinksToProduct($product);
        }
        return $searchResult;
    }
}

Why is Magento passing an instance of Magento\\Sales\\Model\\ResourceModel\\Order\\Invoice\\Collection as my second parameter to afterGetList, when Magento's example shows that the second parameter should be \Magento\Framework\Api\SearchResults?


texts: Magento 2 Fotorama - Customise product gallery thumbnail scroll

texts:
I currently have the basic Fotorama settings but I'm hoping to change those to have three thumbnails showing at a time.
When I click through using the large view next arrow, the thumbnail container will then scroll to the next three and vice versa.

I've used flexbox to override the default CSS to now only show three thumbnails with some margin in-between. It's looking great BUT the thumbnail container doesn't scroll till it hits the fifth thumbnail.
It looks like javascript is calculating and injecting the transform settings

x axis after the first scroll point - transform: translate3d(-586px, 0px, 0px);

Using my child theme, how can I edit/override this (when to scroll) setting or the transform calculation?


texts: How can i migrate Subscriber username and password from bigcommerce to magento

texts: How can I migrate subscribers usernames and passwords from bigcommerce to magento?


texts: Magento 2.1.7 New Sort Options Have Appeared by Themselves

texts:
We have recently noticed that two new sort options have appeared in our Sort By field. The options are "Discontinued Product" and "Product Name". I cannot find where in the code base these options would have been populated. Does anyone have a lead on how or where I can locate the origins of those two Sort By options?

Front end code from Inspector:

Sort By
<select id="sorter" data-role="sorter" class="sorter-options">
                <option value="position">
            Featured            </option>
                <option value="name">
            Product Name            </option>
                <option value="price" selected="selected">
            Price            </option>
                <option value="product_brand">
            Brand            </option>
                <option value="product_discontinued">
            Discontinued Product            </option>
        </select>

        High to Low


texts: Magento is sending the original order along with the order filled status email

texts:
We have a Magento e-commerce website. When an order is filled, we upload an xml file to our web server and a cron job is run that checks the contents of the folder for these xml files and then updates the status of the customer's order in their account on the website. In addition to updating the status, an email is sent to them notifying them that the order is complete and has been dispatched. This is correct, however in addition to the status filled email, they are also receiving a copy of the original order. This is not correct as they don't need to receive this order as they already have the original copy.

I wondered if anyone could tell me if there is a setting in the Magento backend that can switch off this duplicate order email so that the customer only receives the confirmation email that their order has been sent? Or is this hardcoded in the cron job?

Really appreciate any advice.


texts: Magento 2.0 Make Javascript Required Field Validation Conditional

texts: is it possible to make data-validate="{required:true}" conditional?  I need to make the validation trigger only if Synch To Rahaha dropdown field is YES.  What changes are needed to make it happen?


texts: Magento 2 : How to get giftcard product price from order?

texts:
$product->getPrice() is 0 for gift card product.
    $prduct_prices = null;
    foreach ($order->getAllVisibleItems() as $item) {
    $product = $item->getProduct();

    $prduct_prices[] = array(

        'price'         => $product->getFinalPrice(),
        'regular_price' => $product->getPrice(),
        'special_price' => $product->getSpecialPrice(),
    );

}


texts: Magento 2 ; How to pass custom params with save button in UI Form

texts:
I want to pass a value/params via the save button of my ui adminform.

i tried this:

public function getButtonData()
    {
        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $request = $objectManager->get('Magento\Framework\App\RequestInterface');
        $id = $request->getParam('id');

        return
            [
                'label' => __('Save'),
                'class' => 'save primary',
                'on_click' => '',
                'sort_order' => 80,
                'data_attribute' => [
                    'mage-init' => [
                        'Magento_Ui/js/form/button-adapter' => [
                            'actions' => [
                                [
                                    'targetName' => 'thechateau_magenest_bookable_save',
                                    'actionName' => 'save',
                                    'params' => [
                                        true,
                                        ['multidome_id' =>$id],
                                    ]
                                ]
                            ]
                        ]
                    ],

                ]
            ];
    }

I can indeed see the values in the save button of the phtml page.

<button id="save" title="Save" type="button" class="action- scalable save primary" data-mage-init="{&quot;Magento_Ui\/js\/form\/button-adapter&quot;:{&quot;actions&quot;:[{&quot;targetName&quot;:&quot;thechateau_magenest_bookable_save&quot;,&quot;actionName&quot;:&quot;save&quot;,&quot;params&quot;:[true,{&quot;multidome_id&quot;:&quot;1&quot;}]}]}}"  data-ui-id="save-button" >
    Save
</button>

however when i try to retreive these values it comes up null.

$request = $this->_objectManager->create('Magento\Framework\App\RequestInterface');

$multiDome = $request->getParam('multidome_id');

i also tried to add it as part of the URL of the save button but it does not even show up on this:

public function getSaveUrl()
    {
        return $this->getUrl('*/*/save',['param'=>'value']);

    }


texts: How to remove the highlighting of the text box?

texts:
My magento version is 1.9.2.4. I inherited the rwd theme package and built theme from it.
When I click on any text box it is getting highlighted in blue color like below:

I tried removing .input-text:focus from rwd theme but it is not working for chrome.


texts: which factory and which method of that factory to use to send data

texts:
Basically, I want to send the data taken from "form" and send it to database. I know how to get data from the database (using collection factory).

I need to know the procedure to send the data to the database using the factory method, not object manager method.


texts: How can i take magento multi store database dump backup without phpmyadmin access?

texts:
I create php script for magento database backup that work well for Single store site but showing error for multi-store

//Magento Database Backup php script
    error_reporting(E_ALL ^ E_NOTICE);
    ini_set('display_errors', 1);
    ini_set('memory_limit', '1512M');

    // Get Magento Application
    require_once 'app/Mage.php';
           Mage::app('default');
           //Mage::app('main');

    // get Magento config
    $config  = Mage::getConfig()->getResourceConnectionConfig("default_setup");

    $dbinfo = array(
        "host" => $config->host,
        "user" => $config->username,
        "pass" => $config->password,
        "dbname" => $config->dbname
    );

    // Database Config
    $db_host = $dbinfo["host"];
    $db_user = $dbinfo["user"];
    $db_pass = $dbinfo["pass"];
    $db_name = $dbinfo["dbname"];

    //echo $db_name; die();

    // filename
    $backup_file = $db_name ."-". date("ymdHis") . ".zip";

    $command = "mysqldump --database " . $db_name  . " -u ". $db_user  . " -p'". $db_pass . "' | gzip > " . $backup_file;

    echo 'command executing is ' . $command . '
' ;

    $output = shell_exec($command);

    echo 'Finished!
' ;

    //shell_exec("mysqldump --opt --default-character-set=utf8 -uuser {$backup_db} > {$sql_name}")

Error For Multi-store as follows:

Fatal error: Uncaught exception 'Mage_Core_Model_Store_Exception' in
/public_html/app/code/core/Mage/Core/Model/App.php:1357 Stack trace: #0
/public_html/app/code/core/Mage/Core/Model/App.php(842): Mage_Core_Model_App->throwStoreException() #1 /public_html/app/code/core/Mage/Core/Model/App.php(491): Mage_Core_Model_App->getStore() #2 /home
/public_html/app/code/core/Mage/Core/Model/App.php(274): Mage_Core_Model_App->_initCurrentStore('default', 'store') #3
/public_html/app/Mage.php(616): Mage_Core_Model_App->init('default', 'store', Array) #4
 /public_html/mege_dbbackup.php(9): Mage::app('default') #5 {main} thrown in
 /public_html/app/code/core/Mage/Core/Model/App.php on line 1357


texts: How to change "Privacy Policy" footer link

texts:
I am looking to amend the link to the Privacy Policy in my Magento 2.3.x installation. It is currently pointing to /privacy-policy-cookie-restriction-mode however I would like it to point to /privacy-policy.

I have inserted the following code to default.xml and cleared my cache but it has no effect. I'm struggling to troubleshoot.

 <!-- Corrects Privacy Policy Link -->
    <referenceBlock name="footer_links">

    <block class="Magento\Framework\View\Element\Html\Link\Current" name="privacy-policy-cookie-restriction-mode">

    <arguments>

    <argument name="label" xsi:type="string">Privacy Policy</argument>

    <argument name="path" xsi:type="string">privacy-policy</argument>

    </arguments>

    </block>

    </referenceBlock>


texts: Magento 2: Switch shipping method in back-end

texts:
In a Magento 2.1.15 shop we are running two shipping methods DHL & UPS

Now we would like to give the shop owner the possibility to switch
the shipping method in the back-end.
F.e.: A customer has chosen DHL and now the shop owner would like to
send it via UPS.

Is this possible? Many thanks, Urs


texts: 1.9 - Setting up multi-website using subdomain

texts:
So I'm attempting to setup a second website under Magento, and I'd like it to be on a subdomain, for example, second.mywebsite.com. My main store is mywebsite.com.  I've essentially got everything setup on Magento itself, and have the subdomain created.

First, using cPanel, creating a new subdomain automatically points it to /public_html/second and wasn't sure if that's correct since I know it needs to point my root directory.

Second, I'm unsure of the correct configuration for .htaccess to get correct redirecting. I already have one redirect setup for a test environment, located at dev.mywebsite.com. What I have for rewriting currently:

RewriteCond %{HTTP_HOST} !^dev\.mywebsite\.com/$

RewriteRule .* index.php [L]

I know this isn't entirely correct, because right now everything else doesn't redirect correctly back to index.php. For instance, abcd.mywebsite.com gives a "SORRY!" cPanel page.

What I think I need to add:

RewriteCond %{HTTP_HOST} www\.mywebsite\.com [NC]
RewriteRule .* - [E=MAGE_RUN_CODE:site_code1]
RewriteCond %{HTTP_HOST} www\.mywebsite\.com [NC]
RewriteRule .* - [E=MAGE_RUN_TYPE:website]

RewriteCond %{HTTP_HOST} !^second\.mywebsite\.com [NC]
RewriteRule .* - [E=MAGE_RUN_CODE:site_code2]
RewriteCond %{HTTP_HOST} !^second\.mywebsite\.com [NC]
RewriteRule .* - [E=MAGE_RUN_TYPE:website]

Am I headed in the right direction? I basically need to get the two above to redirect properly to the correct website stores, the dev subdomain to redirect correctly and then anything else to the main website.

I have tried above and have no luck on correct redirect.

I've set up the subdomain as shown below, with its document root pointing to the same root of the main site:

Update: I've managed to correctly setup the subdomain as an alias of the the main site. All I'm having trouble with now is getting the site to actually show the correct website/store when using the subdomain. So essentially, the correct syntax for the .htaccess file. Also whether I'm using the Website's code or the Store View's code in that block of code.


texts: Donnot show date time value in field system config BE Magento 2

texts:
<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
        <tab id="mycustom" translate="label" sortOrder="450">
            My Custom Setting
        </tab>

            <class>separator-top</class>
            My Custom Setting
            <tab>mycustom</tab>
            <resource>Magento_Checkout::config</resource>
            <group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                <field id="mydate" translate="label" type="date" showInDefault="1" showInWebsite="1" showInStore="1">
                    My Date Field
                    <frontend_model>Vendor\Checkout\Block\Adminhtml\System\Config\Date</frontend_model>
                </field>
            </group>

    </system>
</config>

How to fix it?


texts: How to implement One Tap Login in Magento 2?

texts:
I'm trying to implement Google One Tap Login on our Magento 2 site and I have followed the below guide but not sure where can I start
https://developers.google.com/identity/one-tap/web

Please help me to implement the One Tap Login on my website.
Any help will be appreciated!


texts:
I am trying to split an order into multiple orders by referencing Magento multiple order on one checkout or order splitting.

I have extended Mage_Checkout_Model_Type_Onepage class and written the new code in saveOrder method.

class My_Module_Model_Type_Onepage extends Mage_Checkout_Model_Type_Onepage
{
    public function saveOrder()
    {

        Mage::log('saveOrder() is called from mymodule....',null,'mylog.log');

        $quote = $this->getQuote();

        //First build an array with the items split by category
        $sortedItems = array();
        foreach($quote->getAllItems() as $item)
        {
            $product = $item->getProduct();
            $cats = $product->getCategoryIds(); //every product has single category
            foreach($cats as $category_id)
            {
                //$vendor = $item->getProduct()->getVendor(); // <- whatever you need
                $_cat = Mage::getModel('catalog/category')->load($category_id) ;
                $_cat_name = $_cat->getName();

                if (! isset($sortedItems[$_cat_name]))
                {
                    $sortedItems[$_cat_name] = $item;
                }
            }
        }

        foreach ($sortedItems as $cat => $items)
        {
            // Empty quote
            foreach ($quote->getAllItems() as $item)
            {
                $quote->getItemsCollection()->removeItemByKey($item->getId());
                Mage::log('removing from cart',null,'mylog.log');
            }
            foreach ($items as $item)
            {
                $quote->addItem($item);
                Mage::log('adding to cart',null,'mylog.log');
            }
            // Update totals for categories
            $quote->setTotalsCollectedFlag(false)->collectTotals();

            // Delegate to parent method to place an order for each categpry
            parent::saveOrder();
        }
        return $this;
    }
}

Here, I am trying to split an order by categories. This newly written method is called when I click on place an order button.

But in the above code, adding to cart text message is not printing in the log file. removing from cart message is present in the log file. (I think, it means item is removed from the quote but again that item is not added).

Can anyone tell me what I am doing wrong here?


texts: Magento2 - remove custom theme not composer

texts:
Magento2, testing stuff, and created custom themes, did not use composer, so how do I remove theme from system, command line uninstall themes does not seem to work, screenshot below:

simply deleting the folders and clearing cache does not seem to do it.


texts: Magento2 custom script export configurable product with associated

texts: Magento2 how to developed custom script export for a configurable product with associated sku please if anyone creates the script to share with me as soon as.i attched screenshot for get export csv like this


texts:
i have written a magento script to get skus of products from a csv file and update them in stock and assign a category. It works fine just it takes a very long time, more then 2 hours for just 14 000 skus!
I want to know is this normal behaviour.
My question is if there something i can to optimize the code.

Here is a snippet of code.

 $product = Mage::getModel('catalog/product')->loadByAttribute('sku', $sku);
    if ($product)
            {
            $product->load($product->getId());
                         if($qty > 0) {
                     $product->setStockData(array(
                   'use_config_manage_stock' => 0,
                   'manage_stock'=>1,
                   'min_sale_qty'=>0,
                   'use_config_min_sale_qty'=>0,
                   'max_sale_qty'=>0,
                   'is_in_stock' => 1,
                   'qty' => $qty
                                )
                         );
              $product->setCategoryIds($categories);
              $product->getResource()->save($product);


texts: Magento 2: changes made on one store must be apply to default store too

texts: When you edit a product on the All Store View scope it applies the changes to all the stores. I want the reverse of it like if I made changes to a different store then that change must be applied to default or all stores. i.e if I disable an image for store 1 it should be must be disabled for every other store too.


texts: Customer login is missing in Magento 2 Luma header

texts:
I have a custom Luma theme I use for my store, for whatever reason sign in link is missing but I do have Create an Account on the header - where should I start looking to resolve this issue. I see system error report, "main.CRITICAL: Broken reference: No element found with ID 'customer'

I am guessing its related to missing login

Thanks

here my custom theme XML

<?xml version="1.0"?>

<referenceBlock name="footer_links" remove="true" />
    <referenceContainer name="header.panel">
        <block class="Magento\Framework\View\Element\Html\Links" name="header.links">
            <arguments>
                <argument name="css_class" xsi:type="string">header links</argument>
            </arguments>
        </block>
    </referenceContainer>
    <referenceBlock name="logo">
        <arguments>
            <argument name="logo_img_width" xsi:type="number">148</argument>
            <argument name="logo_img_height" xsi:type="number">43</argument>
        </arguments>
    </referenceBlock>
    <referenceContainer name="footer">
        <block class="Magento\Store\Block\Switcher" name="store_switcher" as="store_switcher" after="footer_links" template="switch/stores.phtml"/>
    </referenceContainer>
    <referenceBlock name="report.bugs" remove="true"/>
    <move element="copyright" destination="before.body.end"/>
</body>


texts:
I wan't to make sure that only an "authorized"/certified customer can login in my Magento Store.

I need to certify a specific customer. It's something like a 'check email for login' but for me (not for the customer). So then I can say that I wan't to sell to this customer or not.

Is there any default options or extensions to do something like this?

Thanks,
Rafael


texts: Cannot retrieve block from layout when full page cache is enabled

texts:
The problem is I cannot retrieve any block from layout or child block from my cached block  when full page cache is enabled.
I have next files: 1) cache.xml

<config>
<placeholders>
    <socialfeed_posts>
        <block>onepica_socialfeed/country_story</block>
        <name>country_story</name>
        <placeholder>SOCIAL_COUNTRY_STORY</placeholder>
        <container>OnePica_SocialFeed_Model_Cache_Container_Country_Story</container>
        <cache_life>0</cache_life>
    </socialfeed_posts>
</placeholders>
</config>

2) OnePica_SocialFeed_Model_Cache_Container_Country_Story.php

class OnePica_SocialFeed_Model_Cache_Container_Country_Story extendsEnterprise_PageCache_Model_Container_Abstract
{
protected function _renderBlock()
{
    $blockClass = $this->_placeholder->getAttribute('block');
    $template = $this->_placeholder->getAttribute('template');
    /* @var $block OnePica_SocialFeed_Block_Country_Story */
    /*$block = new $blockClass;
    $block->setTemplate($template);
    $layout = Mage::app()->getLayout();
    $block->setLayout($layout);
    return $block->toHtml();
}
}

3) OnePica_SocialFeed_Block_Country_Story.php

class OnePica_SocialFeed_Block_Country_Story extends Mage_Core_Block_Template
{
...
public function getPager()
{
    if (null === $this->_pager) {
        $this->_pager = $this->getLayout()->getBlock('social_feed_pager');
    }
    return $this;
}
...
}

4) layout.xml

<reference name="root">
        <action method="setTemplate"><template>page/1column.phtml</template></action>
        <block type="onepica_socialfeed/html_pager" name="social_feed_pager" template="onepica/socialfeed/page/html/pager.phtml" />
<!-- Tried as a simple block of layout-->
    </reference>
    <reference name="content">
        <block type="onepica_socialfeed/country_story" name="country_story" as="country_story" template="onepica/socialfeed/country/story.phtml" >
            <block type="onepica_socialfeed/html_pager" name="social_feed_pager" template="onepica/socialfeed/page/html/pager.phtml" />
    <!-- Tried as a CHILD block of my cached block-->
        </block>
</reference>

When page load at first all be right, but when I tried reload page second time, page is crached, due to $this->getLayout()->getBlock('social_feed_pager') row.
I don't want to create 'social_feed_pager' block in my Block using $this->getLayout()->createBlock('social_feed_pager'). I need retrieve block from layout.

Any help would be much appreciated.
Thanks!


texts: How to restrict user account based on website? How to create website wise user account in magento 1.9.2.3?


texts: How to create Rest API in magento 2 custom module. Is there any way to create API without writing di.xml?


texts: Custom module magento 2.1 But 404 not found

texts:
I created a simple custom module for my magento 2.1
I followed this article
http://javascriptsolution.com/create-custom-module-in-magento-2-1/

Then when I run my localhost/myshop/excellence/custom/index I have 404 not found..

Any help please?

Thanks in advance


texts: Magento2 Compile command ends at Repositories code generation 1/7

texts:
Magento v2.1.7 CE
PHP 7.0
Permissions double checked

When I run compile command through cli, it ends at step 2 as seen in the image below.

I found that it might be due to a wrong auth.json in composer settings which is used for magento repo. I could not find any auth.json file though, the composer folder was present in the parent directory as .composer but it had only one folder cache.

It used to work well as this is not a fresh installation. Any clues or guidance?


texts: How can I sort a data collection in ascending order on the 'sort_order' column?

texts:
I want to load data from a table using collection and I need the result to be in the ascending order of the 'sort_order' column which is an integer value.

The above pic shows the columns in admin form.

The above pic is of the database table.

This is the code which I used to retrieve the collection.

                    $collection = Mage::getModel('hm_faq/object')->getCollection()->addFieldToFilter('category_id',$category->getId());

                    $collection->setPageSize(5);
                    $collection->setCurPage(2);
                    $size = $collection->getSize();
                    $cnt = count($collection);
                    foreach ($collection as $button) {
                        $i = $i+1;

                ?>
                <a id="<?php echo $button->getUrlId(); ?>" href="<?php echo $button->getUrlLink(); ?>" >

<?php echo $button->getUrlLabel(); ?>
>

            <?php echo '
';} ?>

How can i arrange the result in the ascending order of the sort_order?


texts: I am using Magento's file upload on the front end for customers to upload pictures.  When I get to the cart, it shows the product image and not the uploaded file.  What do I need to add to get the uploaded file to show instead of the generic product image?  Thanks.


texts: Is it possible to setup different front pages in Magento for different cities?

texts: Would it be possible to create new front pages for different cities - IE a San Diego page, a Los Angeles page, etc. using the same domain? What would be the best way to do that?


texts: Magento 2 slow category page, search_tmp tables

texts:
I'm trying to debug a slow Magento 2 category page, containing more than 10000 products. The following query keeps coming back, sometimes even blocking other queries and slowing down the whole site.

SELECT
    1 AS `status`,
    `e`.`entity_id`,
    `e`.`attribute_set_id`,
    `e`.`type_id`,
    `e`.`created_at`,
    `e`.`updated_at`,
    `e`.`sku`,
    `cat_index`.`position` AS `cat_index_position`,
    `e`.`name`,
    `e`.`short_description`,
    `e`.`price`,
    `e`.`special_price`,
    `e`.`special_from_date`,
    `e`.`special_to_date`,
    `e`.`manufacturer`,
    `e`.`manufacturer_value`,
    `e`.`image`,
    `e`.`small_image`,
    `e`.`thumbnail`,
    `e`.`news_from_date`,
    `e`.`news_to_date`,
    `e`.`required_options`,
    `e`.`image_label`,
    `e`.`small_image_label`,
    `e`.`thumbnail_label`,
    `e`.`url_key`,
    `e`.`msrp`,
    `e`.`msrp_display_actual_price_type`,
    `e`.`price_type`,
    `e`.`weight_type`,
    `e`.`price_view`,
    `e`.`links_purchased_separately`,
    `e`.`links_exist`,
    `e`.`swatch_image`,
    `e`.`tax_class_id`,
    `e`.`delivery`,
    `price_index`.`price`,
    `price_index`.`tax_class_id`,
    `price_index`.`final_price`,
    IF(price_index.tier_price IS NOT NULL, LEAST(price_index.min_price, price_index.tier_price), price_index.min_price) AS `minimal_price`,
    `price_index`.`min_price`,
    `price_index`.`max_price`,
    `price_index`.`tier_price`,
    `stock_status`.`stock_status` AS `is_salable`,
    (   SELECT
            SUM(order_item.qty_ordered)
        FROM
            sales_order_item AS order_item
        WHERE
            order_item.product_id = e.entity_id
        AND order_item.created_at > '2017-08-24'
        AND order_item.store_id = 1
    ) AS `bestsellers`,
    `stock_status_index`.`stock_status` AS `is_salable`
FROM
    `catalog_product_flat_1` AS `e`
INNER JOIN
    `catalog_category_product_index` AS `cat_index`
ON
    cat_index.product_id=e.entity_id
AND cat_index.store_id=1
AND cat_index.visibility IN(2, 4)
AND cat_index.category_id='14'
INNER JOIN
    `catalog_product_index_price` AS `price_index`
ON
    price_index.entity_id = e.entity_id
AND price_index.website_id = '1'
AND price_index.customer_group_id = '1'
INNER JOIN
    `search_tmp_59ee2169992f00_12966690` AS `search_result`
ON
    e.entity_id = search_result.entity_id
LEFT JOIN
    `cataloginventory_stock_status` AS `stock_status`
ON
    e.entity_id = stock_status.product_id
AND stock_status.website_id=0
LEFT JOIN
    `cataloginventory_stock_status` AS `stock_status_index`
ON
    e.entity_id = stock_status_index.product_id
AND stock_status_index.website_id = 0
AND stock_status_index.stock_id = 1
ORDER BY
    `stock_status_index`.`stock_status` desc,
    IF(IFNULL(`small_image`, "no_selection")="no_selection", 1, 0) asc,
    `bestsellers` desc
LIMIT 30

This seems to be a Magento 2.1.x bug (more info here: magento2 search_tmp join leads to empty results in category listing). But the solution given there didn't work for me.

Is anyone familiar with this Magento 2 bug? What can we do to solve this problem?


texts: How to modify Bank Transfer Payment OR Cash On Delivery Payment methods? Looking to rename one of those and add extra fields

texts:
Magento 1.9.4
Porto theme

We urgently need to modify either the 'Bank Transfer Payment' payment method or the 'Cash On Delivery' payment method. What we are after is:

label the existing form text field

and

add 2 more drop-down type form fields

How can this be done so that it captures the information and adds it to the order?

UPDATED on February 18th:

It should look like this:

Without the "What is this?" link (we do not need that).

UPDATED on February 19th, 2019:

The solution proposed by mydons seems to work except for:

it does not show the CVV code on the order itself in the Admin panel even-though this option was selected in the Admin panel and filled out by customer:

I selected the Request Card Security Code = YES in the Admin panel:

it does show on the front end fine - it even has 'Card Verification Number' field for the CVV code and a link to 'What is this?' (which works BTW - it shows a photo of where to find the CVV code):

But on the order it looks like this (no CVV information):


texts: How to remove shipping method in checkout page Magento 2

texts: I want to remove shipping method from checkout page. Can you guide me how can I do?


texts: How to stop loading the page using knockout js after the event has completed in magento 2

texts:
I am adding the custom price to order total, its fine adding the price.but the page loading is still loading, how can i stop loading using knockout js.
Thanks in advance

i have this code in my knockout file js

 return storage.delete(
                url,
                false
            ).done(
                function () {
                    var deferred = $.Deferred();
                    isApplied();
                    totals.isLoading(true);
                    getPaymentInformationAction(deferred);
                    $.when(deferred).done(function () {
                        totals.isLoading(false);
                        isLoading(false);
                    });
                    messageContainer.addSuccessMessage({
                        'message': message
                    });
                }
            ).fail(
                function (response) {
                    isLoading(false);
                    totals.isLoading(false);
                    errorProcessor.process(response, messageContainer);
                }
            ).always(
                function () {
                    isLoading(false);
                }
            );


texts: $installer->addAttribute Some Settings Ignored

texts:
Inside a mysql4 upgrade script for my module, I have the following:

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

// Code that builds the var $optionList is here

$collection = array(
    'label'             => 'Collection:',
    'input'             => 'multiselect',
    'default'           => '0',
    'class'             => '',
    'backend'           => '',
    'frontend'          => '',
    'source'            => '',
    'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
    'visible'           => true,
    'required'          => false,
    'user_defined'      => true,
    'searchable'        => true,
    'filterable'        => true,
    'comparable'        => true,
    'visible_on_front'  => true,
    'visible_in_advanced_search' => true,
    'unique'            => false,
    'option'            => $optionList
);

$installer->addAttribute('catalog_product', 'collection', $collection);

$installer->endSetup();

All of the => true settings that I have here are showing up as No on the final attribute edit screen in the Admin. (Screenshot: http://goo.gl/aSQ3wk)

Here is the <resources> section of my config.xml file:

<resources>
    <company_modulename_setup>
        <setup>
            <module>Company_Modulename</module>
            <class>Company_Modulename_Model_Resource_Eav_Mysql4_Setup</class>
        </setup>

        <connection>
            <use>core_setup</use>
        </connection>
    </company_modulename_setup>

    <company_modulename_write>
        <connection>
            <use>core_write</use>
        </connection>
    </company_modulename_write>

    <company_modulename_read>
        <connection>
            <use>core_read</use>
        </connection>
    </company_modulename_read>
</resources>

I'm not sure why all of these settings aren't taking. Any ideas?


texts: Load Customer Model by Extension Attribute in Magento 2

texts:
How can I load the Customer Model and Collection by Extension Attribute in Magento 2?

I've declared an extension attribute in extension_attributes.xml and saved to the Customer Model. Now, How can I load the Customer Model and Collection by the Extension Attribute?

<extension_attributes for="Magento\Customer\Api\Data\CustomerInterface">
    <attribute code="building_name" type="string"/>
</extension_attributes>


texts:
I recently upgraded from 2.2.3 to 2.2.8 then to 2.3 and onto 2.3.3 and I've come across a strange error. When an order is being created, I get the following error:

  Failed address validation: Email has a wrong format

I've searched stack exchange and Magento forums and I cannot seem to find out why this is happening. In the logs, it shows a valid Paypal email address.

Any help would be appreciated.

The full error is:

main.CRITICAL: Exception message: Failed address validation:
Email has a wrong format
Trace: <pre>#1 Magento\Quote\Model\QuoteManagement->submitQuote() called at [vendor/magento/module-quote/Model/QuoteManagement.php:447]
#2 Magento\Quote\Model\QuoteManagement->submit() called at [generated/code/Magento/Quote/Model/QuoteManagement/Interceptor.php:89]
#3 Magento\Quote\Model\QuoteManagement\Interceptor->submit() called at [vendor/magento/module-paypal/Model/Express/Checkout.php:807]
#4 Magento\Paypal\Model\Express\Checkout->place() called at [vendor/magento/module-paypal/Controller/Express/AbstractExpress/PlaceOrder.php:98]
#5 Magento\Paypal\Controller\Express\AbstractExpress\PlaceOrder->execute() called at [vendor/magento/framework/App/Action/Action.php:108]
#6 Magento\Framework\App\Action\Action->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#7 Magento\Paypal\Controller\Express\PlaceOrder\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#8 Magento\Paypal\Controller\Express\PlaceOrder\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#9 Magento\Paypal\Controller\Express\PlaceOrder\Interceptor->___callPlugins() called at [generated/code/Magento/Paypal/Controller/Express/PlaceOrder/Interceptor.php:26]
#10 Magento\Paypal\Controller\Express\PlaceOrder\Interceptor->dispatch() called at [vendor/magento/framework/App/FrontController.php:159]
#11 Magento\Framework\App\FrontController->processRequest() called at [vendor/magento/framework/App/FrontController.php:99]
#12 Magento\Framework\App\FrontController->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#13 Magento\Framework\App\FrontController\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#14 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php:94]
#15 Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135]
#16 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php:73]
#17 Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135]
#18 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#19 Magento\Framework\App\FrontController\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:26]
#20 Magento\Framework\App\FrontController\Interceptor->dispatch() called at [vendor/magento/framework/App/Http.php:137]
#21 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:24]
#22 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:261]
#23 Magento\Framework\App\Bootstrap->run() called at [index.php:39]
</pre> [] []


texts: How to use category image in detail page?

texts:
I need to display relevant category image alongside product detail page. I need to display product's sub category image. Im using custom phtml file to display logo image on top of/before the product name. (image location)

My categories are like this,
Category one
Category two
Category three

each category has a few manufacturers as sub categories. I need to display that manufacturer logo image on product's detail page.

I tried using module_catelog/templates/category/image.phtml but it shows some errors on this line of code.

$_imgUrl = $_category->getImageUrl()

How can I get the category image URL in my phtml file?


texts: Failed to create invoice for orders having bundle product with fixed pricing

texts:
I have configured a Bundle products comprised of Virtul & Simple products and using fixed pricing for each bundle option.
When trying to create order at checkout and creating invoice behind the scene, it is throwing error

PHP Fatal error: Uncaught TypeError: Return value of Magento\InventorySourceSelection\Model\Request\InventoryRequest::getItems() must be of the type array, null returned in /www/vendor/magento/module-inventory-source-selection/Model/Request/InventoryRequest.php:102

I was looking for the solution and found out that this is a bug in Magento 2.3 reported at https://github.com/magento/inventory/issues/3172
The above reported issue is still not resolved by Magento. Is there anyone else who faced such issue? Looking for some suggestions here about how to handle this issue using Magento 2.3
P.S I am trying to create invoice immediately after the transaction is authorized i.e. when customer palces order from checkout via Stripe


texts:
A client of mine on Magento 1.9.0.0 is experiencing an issue with Paypal randomly marking some orders as complete in the back end and invoices are blank so have to be prepared manually.

We've just moved the client to a new server but that shouldn't have any impact.

Any ideas anyone?


texts: Magento 1.9.0.1 add a product to the cart by URL?

texts:
I am currently using Magento 1.9.0.1.

I want to add a product to the cart by URL execution.

I am trying the solutions pointed here: http://www.magentocommerce.com/wiki/4_-_themes_and_template_customization/catalog/adding_a_product_to_the_cart_via_querystring but none of them works.

Any ideas how i can make it ?

Thanks in advance!


texts: Magento 2, One or more indexers are invalid. Make sure your Magento cron job is running

texts:
I need assistance in this index error message that appears in admin area:

  One or more indexers are invalid. Make sure your Magento cron job is
  running.

I'm using MAMP on Mac.


texts: Magento 2: Custom validation on custom UI grid

texts:
I want to add a custom validation on my custom UI grid.
Logic is that the Max qty must be greater than the Min qty. This is working fine for the UI form, but not working for UI grid mass action.
Screenshot attached for reference.

Working code for UI form is below:
require(
        [
    'Magento_Ui/js/lib/validation/validator',
    'jquery',
    'mage/translate'
], function(validator, $){
    validator.addRule(
        'validate-minmax',
        function (value) {
            var minQty = $("[name='min_qty']").val();
            var maxQty = $("[name='max_qty']").val();
            if (minQty == 0 && maxQty == 0) {
                return true;
            }
            if (minQty > 0 || maxQty > 0) {
                if (minQty >= maxQty) {
                    return false;
                }
                if (minQty < maxQty) {
                    return true;
                }
            }
        }
        ,$.mage.__('Max qty must be greater than min qty.')
                );
        });

What changes should I make in my code to make it work for UI grid inline edit?
Should I validate it in controller (on server side)?


texts: Magento2 Auto generated coupons are not working?

texts:
I am using Magento2 enterprice edition 2.1.2

Magneto2 specific coupons are working well.

When created a cart price rule with coupon as a "auto" and generated multiple coupons in Manage Coupon code.
When used this coupon code magento showing all coupons are invalid.

Please check attached screen-shot's

[enter image description here][1]


texts: WordPress installation under subdirectory all pages except gives 404

texts:
I have a Magento installation in base directory and WordPress installation in my sub directory. When I open the home page of WordPress it opens normally but when I go to any sub-page/post of WordPress it gives 404 not found error from Magento. I've tried almost everything on the .htaccess file but didn't find the solution. I also tried the solution from Magento under WordPress as subdirectory not working but that doesn't work for me.

This is my .htaccess file:

DirectoryIndex index.php
<IfModule mod_php5.c>
    php_value memory_limit 256M
    php_value max_execution_time 18000
    php_flag magic_quotes_gpc off
    php_flag session.auto_start off
    php_flag suhosin.session.cryptua off
    php_flag zend.ze1_compatibility_mode Off
</IfModule>
<IfModule mod_security.c>
    SecFilterEngine Off
    SecFilterScanPOST Off
</IfModule>
<IfModule mod_ssl.c>
    SSLOptions StdEnvVars
</IfModule>
<IfModule mod_rewrite.c>
    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule ^api/rest api.php?type=rest [QSA,L]
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteCond %{REQUEST_METHOD} ^TRAC[EK]
    RewriteRule .* - [L,R=405]
    RewriteCond %{REQUEST_URI} !^/(media|skin|js)/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l
    RewriteRule .* index.php [L]
</IfModule>
AddDefaultCharset Off
<IfModule mod_expires.c>
    ExpiresDefault "access plus 1 year"
</IfModule>
Order allow,deny
Allow from all
<Files RELEASE_NOTES.txt>
    order allow,deny
    deny from all
</Files>
<Files cron.php>
    Order allow,deny
    Deny from all
</Files>

and .htaccess for WordPress:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/*
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
</IfModule>


texts: How to call phtml of custom module in my custome theme layout Magento2?

texts:
Help me to get the content written in custom phtml of the custom module to my custom theme.

I have custom theme Customtheme_Sample, which is having custom layout customhome.xml.

And I have the custom module Showcase_Newitems, here I have helloworld.phtml in templates. Now, I need to call helloworld.phtml from customhome.xml.

How Can I achieve this?


texts: How to show USPS shipping rates on product detail page Magento 2?

texts: I want show on product detail page USPS shipping method and there rates in Magento 2.


texts: How to get all simple products assigned to configurable products in magento 2

texts: On product view page in magento 2 how can I get all details of associated products with image, name, qty box and add to cart button seperately for each product below details of main product?


texts:
I ma using magento 2.1.0, and i am trying to save city option in my grid.

City dropdown ui file:

<field name="city">
            <argument name="data" xsi:type="array">
            <item name="options" xsi:type="object">xxx\xxx\Model\City\CityOption</item>
            <item name="config" xsi:type="array">
                <item name="dataType" xsi:type="string">text</item>
                <item name="label" xsi:type="string" translate="true">city</item>
                <item name="formElement" xsi:type="string">select</item>
                <item name="source" xsi:type="string">page</item>
                <item name="dataScope" xsi:type="string">city_id</item>
                <item name="caption" xsi:type="string" translate="true">-- Please Select --</item>
            </item>
            </argument>
        </field>

city column in grid:

<column name="city_id">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="filter" xsi:type="string">text</item>
                <item name="label" translate="true" xsi:type="string">city</item>
                <item name="editor" xsi:type="array">
                    <item name="editorType" xsi:type="string">text</item>
                    <item name="validation" xsi:type="array">
                        <item name="required-entry" xsi:type="boolean">false</item>
                    </item>
                </item>
            </item>
        </argument>
    </column>

this is the retrriving data in city dropdown

 public function toOptionArray()
{
$options = array();
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$model = $objectManager->create('\xxx\xxx\Model\City')->getCollection();
foreach($model as $mdl)
     {

        $options[] =  array('label' => $mdl->getCity() , 'value' => $mdl->getCityId());

    }

    return $options;
}

now, through this i am able to save city in database as their id, but same id also display in grid column, i want to show city name in grid.


texts: How to validate form fields such as city, zipcode in address form

texts:
I have done form validation as follows

<form class="form-address-edit"
  action="<?= $block->escapeUrl($block->getSaveUrl()) ?>"
  method="post"
  id="form-validate"
  enctype="multipart/form-data"
  data-mage-init='{"validation":{}}'>

  <fieldset class="fieldset required">
    <legend class="legend"><?= $block->escapeHtml(__('Address')) ?></legend>

        <?= $block->escapeHtml(__('City')) ?>

            <input type="text"
                   name="city"
                   value="<?= $block->escapeHtmlAttr($block->getAddress()->getCity()) ?>"
                   title="<?= $block->escapeHtmlAttr(__('City')) ?>"
                   class="input-text <?= $block->escapeHtmlAttr($this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('city')) ?>"
                   id="city" data-validate="{'required':true,'minlength':4,'maxlength':50 }">

            <?= $block->escapeHtml(__('Zip/Postal Code')) ?>

            <input type="text"
                   name="postcode"
                   value="<?= $block->escapeHtmlAttr($block->getAddress()->getPostcode()) ?>"
                   title="<?= $block->escapeHtmlAttr(__('Zip/Postal Code')) ?>"
                   id="zip" data-validate="{'required':true,'minlength':6,'maxlength':6}"
                   class="input-text validate-zip-international <?= $block->escapeHtmlAttr($this->helper('Magento\Customer\Helper\Address')->getAttributeValidationClass('postcode')) ?>">

</fieldset>

        <button type="submit"
                class="action save primary"
                data-action="save-address"
                title="<?= $block->escapeHtmlAttr(__('Save Address')) ?>">
            <?= $block->escapeHtml(__('Save Address')) ?>
        </button>

        <a class="action back" href="<?= $block->escapeUrl($block->getBackUrl()) ?>">
            <?= $block->escapeHtml(__('Go back')) ?>

The above form works only for the required fields. But validations like minlength and maxlength validate-digits are not working.


texts:
When customer make an order.
I cannot received order confirmation trough email.

Customer also cannot received it.

Please advice on how to fix this issue.


texts: Magento1 how to check email when register?

texts:
I am doing the check email before register. But I can't check with code. I need help from everybody

public function createPersonAction(){

$data = $this->getRequest()->getPost();

$session = Mage::getSingleton('core/session');

$person = Mage::getModel('course/course');

        $person->setData('course_name',$data['course_name']);
        $person->setData('course_email',$data['course_email']);
        $person->setData('course_courses',$data['course_courses']);
        $person->setData('course_age',$data['course_age']);
        $person->setData('course_gender',$data['course_gender']);
        //$person->setData('course_image',$data['course_image']);
        try{
            //$customer = Mage::getModel('course/course');
            $person->setWebsiteId(Mage::app()->getWebsite()->getId());
            $person->loadByEmail($course_email);
            if($person->getId())
            {
                "Email Exist";
            }
            $person->save();
            $session->addSuccess('Add a person sucessfully');
        } catch(Exception $e){
            $session->addError('Add Error');
        }
        $this->_redirect('');
    }


texts: Recent viewed product conflcit with infiniteScroll

texts:
I have installed the Infinite scroll extension On my category Listing page.
I have also added the feature of recent viewed product, but it not compatible with infinite scoll.
I have done the changes in the layout catalog_category.view.xml

 <block class="Magento\Framework\View\Element\Template" name="recentview.products" template="Magento_Theme::recentProduct.html" after="category.products" />


texts: Magento multistore - translating ALT tags and images & store view levels

texts:
Whilst translating a site to language 2 coming from language 1. We Changed the image ALT text (as seen in screenshot) thinking that Magento would:
* use the image (+filename) from the default config or store name
* but set the ALT and TITLE tag to the text we entered as the label value

Now I see that these ALT and TITLE tags are still set in language 1. Is this the correct way of working? It does not have a tickbox for "Use default value" - ...

Question: How can we easily set the ALT and TITLE tags per store view? (whilst not wanting to heave the whole image management to the store view. We kind of like it that the main image etc. are all set on store name level.)

So to sum up: our wish would be to respect the "Use default value" for Base,Small and Thumbnail image except for the Label value per store view

Thanks in advance


texts: Magento 2 Build Xml Request For External API

texts:
I would need to pass request payload in XML format for a web service. Below is the code I tried.

How do I verify & view XML is constructed properly?

Is there a better Magento way to create an XML request since a big payload needs to be constructed?

Note: object manager being is used for testing purposes

$xmlFactory=$obj->get('\Magento\Framework\Simplexml\ElementFactory');
    $xmlHeader = '<?xml version="1.0" encoding="UTF-8"?><OrderStatusQuery xmlns="http://some-schema"></OrderStatusQuery>';

    $request=$xmlFactory->create(['data'=>$xmlHeader]);
    $request->addChild("OrderNumbers","","");
    $request->addChild("OrderNumber","1234567");

    $http->setUri('https://some-external-api-endpoint');
    $http->setHeaders(['Content-Type: text/xml']);
    $http->setMethod(\Zend_Http_Client::POST);
    $http->setRawData($request);
    $responseBody = $http->request()->getBody();
    var_dump($responseBody);


texts:
After migrating magento I've encountered weird errors.

On the bottom of my product page there is a 404 error. Nevertheless, all content is showing above and everything other works fine.
There is another error when I access some page in main menu, from product page, then there is prefix added to the url nameofthecategory/nameofthepage.html and I get also 404.

I've managed to solve this second error by turning off urls for categories path, so the link format now is nameoftheshop.com/nameoftheproduct.html

However error number one stays. I tried:

Clearing cache
Reindex
Deleting and reaploading .htaccess to the root folder of magento installation
Checked catalog.xml for product view layout, also checked view.phtml
Checked base url in the database on that two places
Checked product sufixes
Adding index.php in front of product url does not change anything

Any ideas? Im struggling with this for 3 days now..


texts: Changing base currency to Dollar According to Geo IP

texts:
how can the base currency be changed to US dollar if visitors country is not India.
there must be some easy way to do it


texts: Why doesnt my block render in the header?

texts:
This is my Local.XML

<reference name="header">
        <block type="cms/block" name="topsocial" as="topsocial">
        <action method="setBlockId"><block_id>topsocial</block_id>
        </action>
        </block>
</reference>

This is my header.phtml placement

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

I created the static block in the admin panel with the same name. May I ask why its not working? The block is 4 LI's with Font Awesome icons.


texts: How to edit /var/www/html/app/locale/en_US/ves_vendors/main.csv file in magento

texts: I am changed main.csv file line no. 180 (Thank you for registering with %s. Your vendor account info is submited for approval.) to replace (Your account is created and will be ready in 15 minutes.). But changes not working its show old message. Please give me right solution to fix it this success message to change.


texts: Static files version folders not found hence design collapsed and getting 404 for all css and js

texts:
I was trying to rectify some ACL issues in my application I removed the static folder inside pub and I run di:compile and static-content:deploy and I gave 777 permission to var and generated folders, Now when I open the application in the browser no css and js is loaded, I have seen many similar issues but in my case the css and js files are available but the version folder is not available I mean if I saw the source code the URL's are like

  http://ipaddress/magento2/pub/static/version1515489121/adminhtml/Magento/backend/en_US/extjs/resources/css/ext-all.css

But the actual file is like

  /var/www/html/magento2/pub/static/adminhtml/Magento/backend/en_US/extjs/resources/css/ext-all.css

As I mentioned in the example the version folder is not showing

I don't understand how the folders are created without the version folder.


texts:
I got this error when I hit my website.

  There has been an error processing your request
  SQLSTATE[HY000]: General error: 1030 Got error 28 from storage engine, query was: DESCRIBE `log_visitor_info`

and I am also unable to open Magento admin, inserted right username and password, but it remains on the same page. And I am also unable to open phpmyadmin.