texts: Magento site wont load after reindexing crashed

texts:
My magento website wont load the admin or front end. I updated a new category with some products and flushed the cache and done a reindex. But as I done it, chrome froze on me. Now it wont load anything.

It just shows a white screen.


texts: Magento 2 Elastic search / Elastic suite module from Smile

texts:
I ran this module on my website:
https://github.com/Smile-SA/elasticsuite
Everything seems to be working fine. But I have a problem with the configuration.
When I start  search, gets the result but only the product names:

How to display here also additional attributes, like product image, price, add to the basket etc?
@update
I put file in:
app/design/frontend/Sm/Market/Magento_Search/layout/default.xml
<body>
    <referenceContainer name="Sm_Market">
        <block class="Smile\ElasticsuiteCore\Block\Search\Form\Autocomplete" name="top.search" as="topSearch" template="Smile_ElasticsuiteCore::search/form.mini.phtml">
            <arguments>
                <argument name="rendererList" xsi:type="array">
                    <item name="term" xsi:type="array">
                        <item name="title" xsi:type="string" translate="true">Search terms</item>
                        <item name="template" xsi:type="string">Smile_ElasticsuiteCore/autocomplete/term</item>
                    </item>
                </argument>
            </arguments>
        </block>
    </referenceContainer>
    <referenceBlock name="top.search">
        <arguments>
            <argument name="rendererList" xsi:type="array">
                <item name="product" xsi:type="array">
                    <item name="title" xsi:type="string" translate="true">Products</item>
                    <item name="template" xsi:type="string">Smile_ElasticsuiteCatalog/autocomplete/product</item>
                </item>
                <item name="category" xsi:type="array">
                    <item name="title" xsi:type="string" translate="true">Categories</item>
                    <item name="template" xsi:type="string">Smile_ElasticsuiteCatalog/autocomplete/category</item>
                </item>
                <item name="product_attribute" xsi:type="array">
                    <item name="title" xsi:type="string" translate="true">Attributes</item>
                    <item name="template" xsi:type="string">Smile_ElasticsuiteCore/autocomplete/term</item>
                    <item name="titleRenderer" xsi:type="string">Smile_ElasticsuiteCatalog/js/autocomplete/product-attribute</item>
                </item>
            </argument>
        </arguments>
    </referenceBlock>
</body>


texts: adding custom code to function addItem in Quote.php

texts:
I looked for a way to add a custom order item.

Code -> Core -> Mage -> Sales -> Model -> Quote.php

See:

   public function addItem(Mage_Sales_Model_Quote_Item $item) {
       // Added:
       $item->setTrainingLocation($_REQUEST[‘training_location’]);
       //Before:
       $item->setQuote($this);
   }

Now for the above method I have to do changes in Magento core code. How can I do it via an observer or module.

This is what I have tried:

    <sales_quote_add_item>
        <observers>
            <addextraid>
                <type>singleton</type>
                <class>Mour_Customgroup_Model_Observer</class>
                <method>addextraparameter</method>
            </addextraid>
        </observers>
    </sales_quote_add_item>

And observer.php:

    public function addextraparameter($observer) {
        $item = $observer->getEvent()->getQuoteItem();
        $item->setCustomId(Mage::app()->getRequest()->getParam('custom_id'));
    }


texts: Magento2: Override default phtml file without create custom theme?

texts:
I'm trying to override customer's login.phtml file and I am able to manage the override by creating custom theme Tracks/customtheme, also I put the .phtml file in my custom theme like this /app/design/frontend/Tracks/customtheme/Magento_Customer/templates/form/login.phtml and it is working properly.

My question is, there is a blank folder named Magento in /app/design/ directory after downloading M2. So, why we can't override .phtml file like this /app/design/frontend/Magento/luma/Magento_Customer/templates/form/login.phtml? Any suggestion should be appreciated. Thanks in advance.


texts:
I tried this tutorial https://gist.github.com/WazzaJB/8083094
to add sample product to cart, it creates sample product on admin but it doesn't add this sample product to cart, it redirect me to home page.
please help me, i'm using magento 1.9


texts: Add attributes to the Order API shipping_address

texts:
I am calling this endpoint:
http://localhost/index.php/rest/V1/orders/<myId>

And I want to have 2 customer address attributes inside the response (-> billing_address). In order to get there I created extension_attributes.xml and added this content:
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Api/etc/extension_attributes.xsd">
    <extension_attributes for="Magento\Customer\Api\Data\AddressInterface">
        <attribute code="my_attribute_1" type="string" />
        <attribute code="my_attribute_2" type="string" />
    </extension_attributes>
</config>

However, I do not see the response contain the respective Key-Value data.
To visualize, I want to have the attributes here:


texts: Attribute property 'system' - what it exactly does

texts:
'system' => 0

What that property of (product - only?) does or means?
I've noticed that all built-in Magento attribute has it with value 1.
So my custom attributes should have 0? is it only for marking custom and built-in attributes?


texts: Exporting Multiselect Attribute not working properly in magento

texts:
I am facing one issue that is....I have one product in which I have one multi select attribute & I have selected 2 values in that. Now when I am exporting that product from System -> Import/Export -> Export then that column remains empty. If I select only 1 value & then export that product, then that one value comes in export. Why it is happening? What should I do to get all the selected values?

I referred one article but could not found the solution. That article is this
Unable to get multi selected eav attribute values in magento

Thank You.


texts:
After all findings, Not able to understand how to resolve this issue.
We were unable to perform one or more Brute Force checks.
This may expose your installation to Brute Force attacks.Error occurred while checking URL(s):
/catalog/Adminhtml_category
/catalog/AdminHtml_category
/catalog/AdminHtml_CategorY
/cms/Adminhtml_block
/cms/Adminhtml_block/index
/cms/Adminhtml_Block/Index
/cms/Adminhtml_block/edit
/cms/Adminhtml_bloCk/ediT
/cms/Adminhtml_page
/cms/Adminhtml_pAge
/customer/Adminhtml_inDex
Check that access to this URL(s) is restricted at the web server configuration level.

I am getting this issue in site scanning.
Magento ver: 2.3.0

Anyone have any idea
Thanks!


texts: Add Pagination/Toolbar using array of product ID's

texts:
I have a custom view that uses a range of conditional statements on a collection to narrow down a specific set of product ids. I then need to be able to display these with the pagination and toolbar present

// create product collection
$_category  = $this->getCurrentCategory();
$collection = $_category->getProductCollection();
Mage::getModel('catalog/layer')->prepareProductCollection($collection);

//  create empty array for product id's
$ids = array();

// if and else conditions on collection for each
foreach($collection as $_product){
    $cats = $_product->getCategoryIds();
    if (condition 1 == ...){
        if (condition 2 == ...){
        }
        else if (condition 3 == ...) {
        }
    }
}

// end up with final array of product ids
$ids

How can i take these product ids and add the toolbar and pagination to it (like a normal view?) I've simplified the above code so it's clearer as I had a lot of irrelevant code in there so hopefully it makes sense


texts: Script executar apenas para algum manufacture

texts:
I want to make javascript at the end of the file run only if the product is not from the "hello-kitty" manufacturer but for that I need to somehow take the manufacturer of the product to store in a variable and put it in javascript condition.How  i do that?

FIle: vendor/magento/module-catalog/view/base/templates/product/price/amount/default.phtml

<?php
    /**
     * Copyright © Magento, Inc. All rights reserved.
     * See COPYING.txt for license details.
     */

    // @codingStandardsIgnoreFile

    ?>

    <?php /** @var \Magento\Framework\Pricing\Render\Amount $block */ ?>

    <span class="price-container <?= /* @escapeNotVerified */ $block->getAdjustmentCssClasses() ?>"
            <?= $block->getSchema() ? ' itemprop="offers" itemscope itemtype="http://schema.org/Offer"' : '' ?>>
        <?php if ($block->getDisplayLabel()): ?>
            <?= /* @escapeNotVerified */ $block->getDisplayLabel() ?>
        <?php endif; ?>
        <span <?php if ($block->getPriceId()): ?> id="<?= /* @escapeNotVerified */ $block->getPriceId() ?>"<?php endif;?>
            <?= ($block->getPriceDisplayLabel()) ? 'data-label="' . $block->getPriceDisplayLabel() . $block->getPriceDisplayInclExclTaxes() . '"' : '' ?>
            data-price-amount="<?= /* @escapeNotVerified */ $block->getDisplayValue() ?>"
            data-price-type="<?= /* @escapeNotVerified */ $block->getPriceType() ?>"
            class="price-wrapper <?= /* @escapeNotVerified */ $block->getPriceWrapperCss() ?>"
        ><?= /* @escapeNotVerified */ $block->formatCurrency($block->getDisplayValue(), (bool)$block->getIncludeContainer()) ?>
        <?php if ($block->hasAdjustmentsHtml()): ?>
            <?= $block->getAdjustmentsHtml() ?>
        <?php endif; ?>
        <?php if ($block->getSchema()): ?>
            <meta itemprop="price" content="<?= /* @escapeNotVerified */ $block->getDisplayValue() ?>" />
            <meta itemprop="priceCurrency" content="<?= /* @escapeNotVerified */ $block->getDisplayCurrencyCode() ?>" />
    <?php endif; ?>


texts: Magento 2 Migration: Volume Check Failed

texts:
I'm attempting a Magento 2 Migration on my local machine, mostly so that I have real data to work with as I learn Magento 2 (accuracy of the migration is not important).

When I run the migration tool, I get this error(s):

[ERROR]: Incorrect value: Freightquote_Shipping_Model_Carrier_Source_Class in: eav_attribute.source_model for attribute_code=freightquote_class
[ERROR]: Incorrect value: Freightquote_Shipping_Model_Carrier_Source_Packaging in: eav_attribute.source_model for attribute_code=freightquote_packaging
[ERROR]: Incorrect value: Freightquote_Shipping_Model_Carrier_Source_Commodity in: eav_attribute.source_model for attribute_code=freightquote_commodity
[ERROR]: Incorrect value: Freightquote_Shipping_Model_Carrier_Source_Content in: eav_attribute.source_model for attribute_code=freightquote_content

and ending with

[Migration\Exception]
Volume Check Failed

In the the eav_attribute source table (abbreviated):

attribute_code           | backend_type | frontend_input | source_model
-----------------------------------------------------------------------------------------------------------------
freightquote_class       | varchar      | select         | Freightquote_Shipping_Model_Carrier_Source_Class
freightquote_packaging   | varchar      | select         | Freightquote_Shipping_Model_Carrier_Source_Packaging
freightquote_commodity   | varchar      | select         | Freightquote_Shipping_Model_Carrier_Source_Commodity
freightquote_content     | varchar      | select         | Freightquote_Shipping_Model_Carrier_Source_Content

I'm fine excluding this module from the migration if possible/necessary. I tried looking through the various config.xml and map.xml files for examples of how this might be handled, but couldn't really get a grasp on it.


texts: Missing required argument $encoder of MSP\TwoFactorAuth\Model\UserConfigManager

texts:
I am facing this issue on Magento 2.3.2 Enterprise Edition

ON Deployment Getting Following error.

In AbstractFactory.php line 238:

  Missing required argument $encoder of MSP\TwoFactorAuth\Model\UserConfigMan
  ager.


texts: Changing value of Block function from observer

texts:
I have an observer function on the event checkout_cart_add_product_complete that is pulling parameters out of the URL and modifying the cart based on the parameters.  This portion is all working fine.

However, there is a block injected by a 3rd party module that sets a value on radio buttons based on a function that evaluates settings in the Magento backend.  I would like to override the value returned by this function based on the results of my observer.

What would the best way to go about this be?


texts:
How can I get a category filter by name?

If I used

  http://example.com/index.php/rest/V1/categories?
  searchCriteria[filter_groups][0][filters][0][field]=name&
  searchCriteria[filter_groups][0][filters][0][value]=Robots&
  searchCriteria[filter_groups][0][filters][0][condition_type]=eq

Then it returned me all categories but I want only the category with name = Robots

Is it possible?

Thanks

thanks for your help

But if I send:

  http://example.com/index.php/rest/V1/categories/list?searchCriteria[filterGroups][0][filters][0][field]=name&searchCriteria[filterGroups][0][filters][0][value]=Robots&searchCriteria[filterGroups][0][filters][0][conditionType]=eq

Then I get:

  {
      "message": "Invalid type for value: \"list\". Expected Type: \"int\"." }

If I send:

  http://example.com/index.php/rest/V1/categories?searchCriteria[filterGroups][0][filters][0][field]=name&searchCriteria[filterGroups][0][filters][0][value]=Robots&searchCriteria[filterGroups][0][filters][0][conditionType]=eq

I get all the categories

Thanks


texts: Automatically assign a customer attribute based on that customer's entity ID during the account creation process?

texts: Example:  Customer is created with entity_id of 115.  Customer attribute custom_id is assigned with a prefix of "HH" followed by the entity_id.  So the custom_id is "HH115".  I assume this would be done with an observer and then happen on the before save of the customer account.  Though, i don't know how to get access to the entity_id before the account is actually created.


texts: Magento 2 : Which event is dispatched when a discount is applied?

texts:
I have tried already listening to salesrule_validator_process, controller_action_predispatch_checkout_cart_couponPost and controller_action_postdispatch_checkout_cart_couponPost. None of these are getting dispatched when I apply a discount coupon on the checkout page.
Here is my /etc/frontend/events.xml

<event name="salesrule_validator_process">
   <observer name="bt_add_coupon_from_cart" instance="BT\Connect\Observer\TrackCoupon"/>
</event>
<event name="controller_action_predispatch_checkout_cart_couponPost">
   <observer name="bt_add_coupon" instance="BT\Connect\Observer\TrackCoupon"/>
</event>
<event name="controller_action_postdispatch_checkout_cart_couponPost">
   <observer name="bt_add_coupon" instance="BT\Connect\Observer\TrackCoupon"/>
</event>


texts: I am not able to import and export my products, but one thing partially export working, which means 100's products successfully exported, but 1000's of products not able to export (In my site consists 20,000 products),


texts: Order email send and reply different email

texts:
is it possible on magento make the email that sends the order be different with the reply email order from the client?

For example i wish when the client receives the order email, it shows email A that send him, but when he makes reply to the order email, it replys to email B.

Is it possible in magento? I cant find this specific option on the backend.


texts: How to un-check "billing address same as shipping address" and keep billing address form open by default?

texts:
By default I want to keep "My billing and shipping address are same" button un-checked and billing address form open on checkout page. For this I have copied billing-address.js file in my theme at app/design/frontend/Vendor/Theme/Magento_Checkout/web/js/view/billing-address.js and inside quote.billingAddress.subscribe I have added my code as given below

if (quote.isVirtual()) {
   this.isAddressSameAsShipping(false);
}
/* my custom code starts*/
if(window.checkoutConfig.quoteData.delivery_type == 'store') {
    this.isAddressSameAsShipping(false);
    jQuery( ".action-edit-address" ).trigger( "click" );
}
/* my custom code ends*/

After adding above code, checkbox is un-checked but still form is not open. If I paster trigger code in browser's console form is getting opened ? How I can make the form also open?


texts: Magento admin backend not saving ANY changes - tried all common solutions NO LUCK

texts:
Magento admin area not updating any changes. Examples are the following;

System>Configuration>Advanced Tab>Advanced - Change any NONcore module from enable to disable>save config

= Reverts back to all enabled

Configuration Scope = Main Website>System>Configuration>Advanced Tab>Developer - Change Template Path Hints and Add Block Names to Hints to No>Save Config

=Reverts back to Yes/Yes

-I have cleared var Cache and deleted

-I have changed configuration scope to each separate view trying to change

-I have flushed magento cache and cache storage (screenshot attached)

-I have selected all cache type and refreshed

**I noticed some threads about Amasty extensions causing this issue but since this issue prevents me from disabling any extension I can not rule it out. (screenshot attached of Amasty Modules)


texts:
My side navigation bar is cutting off half my words if they are to long, how do i get them to go onto the next line when they reach the end of the box??

This is my code that makes the side bar, if you need the CSS as well let me know.

<?php
ob_start();

$store_categories = $this->getLeftCategories();
if ($count = count($store_categories)) {

$block_title = $this->getBlockTitle();
if ( empty($block_title) ) $block_title = 'Categories';
?>

        <?php echo $this->__($block_title) ?>

        <?php
        $i=0;
        foreach ($store_categories as $_category) {
            $class = array();
            if (!$i) {
                $class[] = 'first';
            } elseif ($i == $count) {
                $class[] = 'last';
            }
            echo $this->drawOpenCategoryItem($_category, 0, $class);
            $i++;
        } ?>

<?php
}
// if ($count = count($store_categories)) {
$mdms_blocks = Mage::registry('mdms_blocks');
if ( !$mdms_blocks ) {
    $mdms_blocks = array();
} else {
    Mage::unregister('mdms_blocks');
}
$mdms_blocks['block_left_nav'] = ob_get_clean();
Mage::register('mdms_blocks', $mdms_blocks);

I have also added a pic to show you what i mean.

Thank you.


texts: Magento 2 : After Migration from 1.9 to 2.2.2 data not show in Admin Panel

texts:
After migration from 1.9 to 2.2.2 data not show in admin panel
ordered item position.


texts:
I'm trying to create my own template and inheritance from another that I bought on themestore. I think it's a good practice, just for change some things, doing this way the 3rd party template is intact.

But I get some JS errors, because some snippets are empty, like this:

var ThemeOptions = {
    box_wide: ,
    rtl_layout: ,
    sticky_header:
};

I think that is because this options are defined on admin panel, but because the 3rd party template is not active, this values are not defined.

Is there any way to make this practice well done?

UPDATE: this JS snippet is on: Magento_Theme/templates/html/head_options.phtml

<script type="text/javascript">
var ThemeOptions = {
    box_wide: <?php echo $_themeHelper->getConfig('general_section/layout/box_wide') ?>,
    rtl_layout: <?php echo $_themeHelper->getConfig('general_section/layout/enable_rtl') ?>,
    sticky_header: <?php echo $_themeHelper->getConfig('general_section/header/sticky_header') ?>
};
if(navigator.userAgent.match(/iPad|iPhone|iPod|iPad Simulator|iPhone Simulator|iPod Simulator/i) !== null){
    document.addEventListener("DOMContentLoaded", function(event) {
        document.body.classList.add('iMenu');
    });
}
</script>


texts:
I'm using the following code to try and update a product's description:
$product = $this->productRepository->getById(5);
$product->setData('description', 'foo');
$this->productRepository->save($product, $saveOptions = false);

While the data does get saved
(I can fetch it correctly via $product->getData('description');),
it is not changed in the db and thus no changes in the actual description.
Are additional steps necessary or am I using a false approach entirely?


texts: Why I am getting GraphQL error: The billing address must contain either "customer_address_id" or "address"?

texts:
I am using magento graphQL api to build mobile app of magento site. In checkout process we have to set billing address. So I used one of mutation setBillingAddressOnCart to set billing address on checkout. And I want to use billing address same as shipping so I passed same_as_shipping: true in billing_address. But when it's run, I am getting error :

Error: GraphQL error: The billing address must contain either "customer_address_id" or "address".

Here is mutation I used to set billing address :
  mutation setBillingAddressSameAsShipping($cartId: String!) {
    setBillingAddressOnCart(input: { cart_id: $cartId, billing_address: { same_as_shipping: true } }) {
      cart {
        id
        email
        shipping_addresses {
          selected_shipping_method {
            method_code
            method_title
          }
        }
      }
    }
  }

Please anyone can tell me why I am getting this error ? Why I have to pass customer_address_id even if I want to use billing address same as shipping ? And if I customer_address_id is really required than what for guest user ?


texts:
Magento 2 : how make Burger menu in 768px

I want make burger menu in mediaquery 768px, because I have 11 category menu in nav so if already 768px, it's look messy, any body have exprience make burger menu in 768px?


texts: Magento 2.3 - Multiple Store if condition for different attributes

texts:
I have setup 2 Store Views i want to call different attributes based on store view on category and product detail pages.
Screenshot 1
https://nimb.ws/ljVb0W
if store id == 1
getResource()->getAttribute('fit-option1');
if ($attributeName) {
$labelValue = $attributeName->getFrontend()->getValue($_product);
}
echo $labelValue;
 // END DISPLAY ATTRIBUTE
?>
else if store id == 2
getResource()->getAttribute('fit-option2');
if ($attributeName) {
$labelValue = $attributeName->getFrontend()->getValue($_product);
}
echo $labelValue;
 // END DISPLAY ATTRIBUTE
?>


texts: Magento 2 - How to send e-mail to customer after order payment was successful

texts: How to send e-mail to customer after order payment was successful, right its sending before the success payment. So, disabled the Order Emails from Magento back-end, so order emails are stopped. But we need to send email for order confirmation to customer after the payment made (in this case Payumoney). May be through success page email trigger.


texts: Magento 2 - "Property \"Slider\" does not have corresponding setter in class "Magento\\Eav\\Api\\Data\\AttributeOptionInterface\"."

texts:
I am trying to override Magento\Eav\Api\Data\AttributeOptionInterface in my custom module. I want to add one new option to existing interface.

The idea behind is, As of now we can only pass defined options data in attribute options REST API

See below API request format for more clarity.

Api

Url = http://test.com/index.php/rest/V1/products/attributes/manufacturer/options/
Api Methodd - Post
Api body - {
  "option": {
    "label": "test",
    "is_default": "true",
  }
}

As of now its passing 3 parameters as value, I want to add my custom 4th parameters Ex - Slider.

So parameters should be

{
  "option": {
    "label": "test",
    "is_default": "true",
    "slider":"test1"
  }
}

I have tried to override interface and its method but its giving property setter not defined

Error Message

"message": "Property \"Slider\" does not have corresponding setter in class \"Magento\\Eav\\Api\\Data\\AttributeOptionInterface\"."

So here my question is how can I override API interface and pass my custom or add my option in existing parameters.

Thanks.


texts: Shipping Address Issue while Creating an Order in Admin

texts:
I have been battling this issue since we moved to Magento2. I figured it is probably just the way it is designed but truly frustrating. Currently, we are on version 2.2.3. Steps to recreate the issue:

Sales->Orders->Create New Order->Select Customer or Create New Customer

Uncheck the Same As Billing Address box, then change any information on the Shipping Address (or add new). I receive a Please Wait Loading icon for EVERY field. And you cannot tab through the process like the Billing Address so you have to select each field again with the cursor. This takes an extremely long time to complete the Shipping Address, when compared to the Billing Address which works perfectly fine. I have a feeling it has to do with the shipping quotes, but that shouldn't really matter until you select Get shipping methods and rates.

Every time a field is changed in the Shipping Address (this does not happen at all in the Billing Address) I am receiving 2 POST methods with 200 code. The requested url is ending with:

block/billing_method,shipping_address,totals,giftmessage,items,shipping_method,shipping_address?isAjax=true

Another issue tied to the one above. Say you have the Shipping Address correct and you start to get the Credit Card information from the customer. After all that information is entered, you notice a typo in the Shipping Address or the customer wants to change something. If you change anything in the Shipping Address it will clear the Credit Card information, requiring you to enter the information again. Which is a real headache, asking the customer for all the credit card information again.

Thanks!


texts: magento newsletter is only sending 4 out of 30 recipients

texts:
For some reason, magento newsletter is only sending 4 out of 30 messages to my subscriptors and then the queue ends, is there an error log where i could check and report to you guys? here is a screenshot of how it ends

here is the report log
http://pastebin.com/YjfgUXRv


texts: How to trigger custom field reindex for catalog product rules on product save?

texts:
I have to display a text field dependent on the applied catalog product rule in the frontend, so I extended Magento\CatalogRule\Model\Rule, Magento\CatalogRule\Api\Data\RuleInterface and Magento\CatalogRule\Model\Indexer\ReindexRuleProduct to contain a custom text field.

The Catalog Product Rule with the text is applied for every product with special_price. After triggering reindexing of Catalog Rule Product index everything works fine and I can get the text from the rule. Now when I edit the Special_Price of another Product and save it, the rule isn't applied for this product and I have to trigger reindexing manually.

How can I trigger reindexing of catalog product rules with my custom field for this product on save automatically?


texts: Droppick JS via require.js confgurable options are not shown

texts:
I have to implement droppick select box in our project. I used the theme to add the main droppick js. So that I added the below code in ../app/design/frontend/Themename/newtheme/Magento_Theme/requirejs-config.js

var config = {
    map: {
        '*': {
            dropkick: 'Magento_Theme/js/dropkick'
        }
    }
};

then added the droppick.js file (main js to make work the droppick select box) in the path of .../app/design/frontend/Themename/newtheme/Magento_Theme/web/js

after that included the main css file (dropkick.css) for the droppick in the below path ../app/design/frontend/Themename/newtheme/web/css

and it's called via layout like below in theme ../frontend/Korla/Themename/Magento_Theme/layout/default.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
   <head>
        <css src="css/dropkick.css" />
   </head>
</page>

Then I implement the droppick select box in my custom script

 require(['jquery','dropkick', 'jquery/ui'], function($){
        jQuery(document).ready(function(){
           jQuery('.super-attribute-select').dropkick();
//to implement the droppick select box for the configurable options select box
        });
    });

JS is called fine. But in the configurable product page, it's having some problem with the configurable options. Select box is not listing the options. I'm getting the below error

Uncaught TypeError: Cannot read property 'length' of undefined(…)configurable.js:395

it comes from this line of code in configurable.js

for (i = element.options.length - 1; i >= 0; i--) {

How to solve this problem? Any help is appreciated...


texts: Find the Grand Total Number of Orders Placed?

texts:
I wish to display the number of Orders placed through the website on the Home Page, irrelevant of success or failure.

I found a similar question, but not too sure if it's the correct way to solve my problem, and also where the solution would be placed?

$processingOrders = Mage::getModel('sales/order_grid')->getCollection()
    ->addFieldToFilter('state', Mage_Sales_Model_Order::STATE_?????????);
$total = $processingOrders->count();

Will not be using the Order facility of Magento, just acting upon the emails of orders received.

I'm using Magento CE 1.9.2, and am relatively new to Magento but have extensive development and PHP / SQL experience.


texts:
Is there any way of url masking with Magento.

For Eg :

Main website :

  www.magento.com

another domain :

  subdomain.magento.com

Now when i open www.magento.com website is masked/redirect to subdomain.magento.com with all the content of www.magento.com, and in URL it will display subdomain.magento.com.

let me know if this is possible in case of Magento without creating multiplestores.


texts:
when i am installing a theme I got the following error

https://www.ubertheme.com/magento-themes/purity/


texts:
I want to custom my contact form like this:

It must send data for user submitted via email

How can I do that?

Any help? Thank in advance.


texts: Magento Error - Reinstalled Live Database

texts:
I had a error with a module, so I had to reinstall a copy of the Live database. But when I have installed it on the front end of the website I get a Magento error code, and I have checked it in the logs and it gave me:

a:5:{i:0;s:102:"Cannot send headers; headers already sent in /home/vhosts/dev/hershesons/htdocs/app/Mage.php, line 767";i:1;s:1085:"#0 /home/vhosts/dev/hershesons/htdocs/lib/Zend/Controller/Response/Abstract.php(115): Zend_Controller_Response_Abstract->canSendHeaders(true)
#1 /home/vhosts/dev/hershesons/htdocs/app/code/core/Mage/Core/Model/App.php(1246): Zend_Controller_Response_Abstract->setHeader('Content-Type', 'text/html; char...')
#2 /home/vhosts/dev/hershesons/htdocs/app/code/core/Mage/Core/Controller/Varien/Front.php(80): Mage_Core_Model_App->getResponse()
#3 /home/vhosts/dev/hershesons/htdocs/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(202): Mage_Core_Controller_Varien_Front->getResponse()
#4 /home/vhosts/dev/hershesons/htdocs/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#5 /home/vhosts/dev/hershesons/htdocs/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#6 /home/vhosts/dev/hershesons/htdocs/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#7 /home/vhosts/dev/hershesons/htdocs/index.php(87): Mage::run('', 'store')
#8 {main}";s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}

Is there anyway around this, as I am looking at getting the site back up.


texts:
this is the first time I'm working with owebia rules so as I don't really know where to start.
I need to implement somes rules under some circumstances
Exemple :

If I have in my cart a specific set of products : Then the delivery price of the command need to be free.

I can quickly filter and find the products I want with something like that
$items = $this->_checkoutSession->getQuote()->getAllVisibleItems();
$productFreeSetDeliveryPrice = explode(";", $this->scopeConfig->getValue('catalog/cpy/product_free_delivery', \Magento\Store\Model\ScopeInterface::SCOPE_STORE));
foreach ($items as $item) {
    if (in_array($item->getProductId(), $productReYt)) {
        .... TODO IMPLEMENT THE RULE TO GET FREE DELIVERY...
    }
}

But I don't really know where I'm supposed to add this peace of code...neither as how i'm supposed to set the delivery free.
This seems to be all related to Owebia rules...but as I'm telling you I don't know where to find them neither how it works :/
Thanks for the assistance


texts: When Importing Products Warning is thrown in Magento 2

texts:
I have edited the qunatity Field of 4 products .And I have imported that CSV the Following fields have imported succesfully. But I got a Following Warning message

General system exception happened

Warning: IntlDateFormatter::parse(): Date parsing failed in
\vendor\magento\framework\Stdlib\DateTime\Timezone.php on line 178


texts: Magento 2.X not getting success page when used authorized.net payment method

texts: Now i am using another magento 2.0.2. I want to test authorized.net and set API login id and transaction id, test mode "YES", gateway URL is https://test.authorize.net/gateway/transact.dll , transactional detail URL is null and set test mode on authorized.net. now result is transaction has been approved and order has placed successfully in admin but not redirecting on success or failure page. what can i do.


texts:
My inod limit is increasing automatically day by day and after some research, I was told to clear the cache files i.e delete them. So I was asking if is it ok to flush cache storage form Magento 2 backend.

Or is there any way I can stop the Inod files to increase? they are increasing so rapidly which is causing my website to slow down.

Also, I hope it won't harm my website if I do flush cache storage?

Thanks in advance.


texts: Issue in setting up Godaddy emails on Magento

texts: We have recently migrated our email server to Godaddy and transactional emails have stopped working from Magento. We have tried all options but of no help. Our customers have stopped getting emails related to order confirmation etc.


texts:
I am trying to install the magento2-pdf-generator2 extension, but I first need to install the mpdf library, I ran the composer require mpdf/mpdf command and then ran php bin/magento setup:upgrade and php bin/magento setup:static-content:deploy to clear the caches.

I tried the following example example and put it in a file called test1.php in the root directory:

require_once __DIR__ . '/vendor/autoload.php';

$mpdf = new \Mpdf\Mpdf();
$mpdf->WriteHTML('
Hello world!
');
$mpdf->Output();

But I am getting an error:

[31-May-2017 16:30:00 UTC] PHP Fatal error:  Uncaught Error: Class 'Mpdf\Mpdf' not found in /home/public_html/test1.php:4
Stack trace:
#0 {main}
  thrown in /home/public_html/test1.php on line 4

all that I have in my test file is:

<?php
require_once __DIR__ . '/vendor/autoload.php';

$mpdf = new \Mpdf\Mpdf();
$mpdf->WriteHTML('
Hello world!
');
$mpdf->Output();
?>

I do have the mbstring, gd, zlib and bcmath extensions enabled. I am unsure why it isn't loading


texts:
I want to add a new field in magento2 tier price. This field will contain another price. So that when we add percentage in tier price then percenatage of this custom price should be taken, not the base price. Please tell me how can I achieve this.

Thank you


texts: Offline Payment methods did not work after setup:di:compile

texts:
I did try to add Extension attributes to Magento\Checkout\Api\Data\PaymentDetailsInterface for my custom payment module.

After setup:di:compile (it took more than two hours, is this normal??) my payment method and none of the existing OfflinePayment methods did work anymore. When placing an order in checkout I got this error message:

{"messages":{"error":[{"code":500,"message":"Fatal Error: 'Call to a member function getMethod() on null' in '...myModule\\Observer\\BeforePlaceOrderObserver.php' on line 46","trace":"Trace is not available."}]}}

It shows that my Observer class was not able to get a payment object anymore. The code below is from Magento\OfflinePayments\Observer\

      public function execute(\Magento\Framework\Event\Observer $observer)
{
    $payment = $observer->getEvent()->getPayment();
    $instructionMethods = [
        Banktransfer::PAYMENT_METHOD_BANKTRANSFER_CODE,
        Cashondelivery::PAYMENT_METHOD_CASHONDELIVERY_CODE
    ];
if (in_array($payment->getMethod(), $instructionMethods)) {...

Even after rolling back my code (and compiling again) the system's behaviour is still the same.
Additional information:
Because I am working on a bitnami stack I do not work on the latest m2 version. Before compiling I did the trick found in that ticket to prevent from the related compiling error. As the author said there are several more errors but the compiling did finish.

Any ideas?

Update:
The raising event is "sales_order_place_after"
As far as I can see the getPayment()-method returns a null value. But I have no idea why.


texts: Fatal error "Call to undefined function" with __() when running unit test in magento2

texts:
I am run unit test for catalog module.
There are error display like below in cmd:

  Fatal error: Call to undefined function
  Magento\Catalog\Block\Adminhtml\Product\Edit\Action\Attribute\Tab__()
  in
  /var/www/html/magento2/vendor/magento/module-catalog/Block/Adminhtml/Product/Edit/Action/Attribute/Tab/Inventory.php
  on line 89

And in Test folder error like below:

Magento\Catalog\Block\Adminhtml\Product\Edit\Action\Attribute\Tab\Inventory->getTabLabel() /var/www/html/magento2/vendor/magento/module-catalog/Test/Unit/Block/Adminhtml/Product/Edit/Action/Attribute/Tab/InventoryTest.php:148

what is the cause of issue for  error in magento 2.


texts: Override Custom Theme Layout File with one in Module?

texts:
I have a custom layout file mytheme/default/magento_theme/layout/custom_cms_name.xml
I need to override with a theme file from my custom module:
/companyname/modulename/frontend/layout/

I tested and "/companyname/modulename/frontend/layout/cms_page_view_id_idhere.xml" works so I know the module is working but /companyname/modulename/frontend/layout/custom_cms_name.xml does not work.
What naming convention can I use within my module to override custom layout form my theme ??


texts: Customer login not working after exporting customer from one magento and importing to another

texts:
I have exported customers from a magento site. Some customers have confirmed email verification while some have not.

In the exported CSV file, i can see that the customers who have confirmed their account have value set to null in "confirmation" field while those who have not confirmed their email have some hash value set in "confirmation" field.

Now that i import the the customer to another magento site and try to login, i get the message: "user email not confirmed".

When i searched for value for confirmation attribute in database for the particular customer_entity, i see that some hash value is set for the confirmation field. so when i set the value to null, the login works fine for the customer who have their email confirmation done.

But this won't be appropriate when i have three thousand customer to migrate.

What would be a proper solution for this? Am i doing something wrong in the import/export process?


texts: Magento 2 admin Ajax call failed bad request

texts:
I'm using custom js in Product Add/Edit page of magento 2 admin. I need to make a ajax call when the product save button clicked. I used the below code.

require(['jquery', 'domReady!'], function ($) {
    $(document).ajaxComplete(function () {
        let data = '';
        varr.forEach((i, j) => {
            if (i.length > 0) {
               data = JSON.stringify({
                  "data": {
                     "sku": sku,
                     "brand": i[0].brand,
                     "variant": i[0].variant,
                     "vehicle_type": "car",
                     "model": i[0].model
                  }
               });
            }

            var settings = {
               "async": true,
               "crossDomain": true,
               "url": "http://192.168.2.196/motogaadi/rest/V1/garage/garage_sku_insert/",
               "method": "POST",
               "headers": {
                 "Content-Type": "application/json",
                 "Cache-Control": "no-cache",
                 "cache-control": "no-cache"
               },
               "processData": false,
               "data": data
             }

             $.ajax(settings).done(function (response) {
               console.log(response);
             });

      });
});

});

I am receiving the below issue.

POST http://192.168.2.196/motogaadi/rest/V1/garage/garage_sku_insert/?isAjax=true 400 (Bad Request)

The same Ajax call is working in frontend but not in adminhtml.


texts: Adding a shipping Address to a guest cart in Magento

texts:
I am trying to add a shipping address to a guest cart in magento but it's throwing the following error.

POST: http://staging.yudala.com/ee/rest/V1/guest-carts/0faff9e835d1ca9c84d7526ee288398f/shipping-information

{
  "message": "Carrier with such method not found: %1, %2",
  "parameters": [
    null,
    null
  ],
}

here is my payload:

{
   "addressInformation": {
      "shippingAddress": {
         "city": "Nigeria",
         "country_id": "NG",
         "firstname": "someone",
         "lastname": "something",
         "postcode": "11756",
         "region_code": "LG",
         "street": [
            "address01",
            "address02"
         ],
         "telephone": "1111111111"
      }
   }
}

Please am I missing out something?


texts:
I am storing an array of values in registry.It works fine.But I am unable to retrieve the array values from the registry. For example,

$products=array(
            'product1'=>$this->getRequest()->getParam('product1'),
            'product2'=>$this->getRequest()->getParam('product2'));

// saving in registry
Mage::register('orderproducts_products', array_filter($products));

//This is not working
Mage::log(Mage::registry("orderproducts_products['product1']"));

How do i retrieve an array value from a registry?


texts: Magento2: How to delete form address c/d

texts:
I need to remove the additional two additional address lines from all forms (registration and ordering).

Does anyone know where I can find and remove it?


texts: Add the weight to the Magento 2 .pdf invoice

texts: I'm using Magento 2.3.0 and I would like to add the products weight, or overall weight of the order on the .pdf invoice.


texts: What model/collection to be used for Custom Product Attribute

texts:
I have a custom product attribute "Manufacturer". I need to include it in Magento default reports at the admin panel Reports->Products->Low Stock. Can anyone say from which collection I need to fetch the value. It is not present in 'catalog/product'. Im able to get only the corresponding Manufacturer's id. Not the value of the id.

Thanks in adv.


texts: Magento sorting collection only sorting first 20 products

texts:
I'm passing a collection to a method that will conditionally apply sorting to it.  However, it seems that only 20 of the total products are being sorted, the rest, are unsorted and lay at the end of the bulk sorted section.  Why is this?  Below is the the conditional:

protected function sortProducts($collection)
{
    switch ($this->getOrder()) {
        case 'product group':
            return $collection->addAttributeToSort('price', 'asc');
    ...
    ...
    }
}

Below is the resultant log of the product collection (note this is a new products collection containing 25 products in total).

  2015-01-29T21:53:38+00:00 DEBUG (7): SELECT 1 AS status,
  e.entity_id, e.type_id, e.attribute_set_id,
  cat_index.position AS cat_index_position, 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, e.name, e.short_description,
  e.price, e.special_price, e.special_from_date,
  e.special_to_date, e.small_image, e.thumbnail,
  e.news_from_date, e.news_to_date, e.url_key,
  e.required_options, e.image_label, e.small_image_label,
  e.thumbnail_label, e.msrp_enabled,
  e.msrp_display_actual_price_type, e.msrp, e.tax_class_id,
  e.price_type, e.weight_type, e.price_view,
  e.shipment_type, e.links_purchased_separately,
  e.links_exist, e.giftcard_amounts, e.allow_open_amount,
  e.open_amount_min, e.open_amount_max 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 = '2'  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 = 0 WHERE (((((e.news_from_date <=
  '2015-01-29 23:59:59') OR (e.news_from_date IS null))))) AND
  (((((e.news_to_date >= '2015-01-29 00:00:00') OR (e.news_to_date IS
  null))))) AND ((e.news_from_date IS not null) OR
  (e.news_to_date IS not null)) ORDER BY e.news_from_date desc,
  price_index.min_price asc


texts: Add demo products in onepage checkout order review page

texts:
I am trying to add a block in one page checkout order review page.

I have the following added in app/design/frontend/mytheme/default/layout/mypackage/mymodule.xml

<?xml version="1.0"?>
<layout version="0.1.0">
    <checkout_onepage_review>
          <reference name="checkout.onepage.review.info.items.before">
            <block type="mymodule/mymodule" name="mymodule.mymodule" output="toHtml" template="mymodule/mymodule.phtml" />
        </reference>
    </checkout_onepage_review>
</layout>

Now when I am trying to access the block in mymodule.phtml with the code $this->myFunction();, I am getting an error undefined variable: this

NOTE: myFunction() is defined within the block class MyPackage_Mymodule_Block_Mymodule

Can someone tell me what I am doing wrong.


texts: Unable to set success message from helper & Observer in 1.9

texts:
I have an observer for

checkout_onepage_controller_success_action

which will call the method :

sendSmsOnSuccess()

The method is as follows :

public function sendSmsOnSuccess($observer)
{
    if($order->getStatus()== ($this->ORDER_STATUS_COMPLETE) || $order->getStatus()== ($this->ORDER_STATUS_PROCESSING))
    {
      if(!$this->sandbox){
            $helper->prepareSmsData($orderid);
        }
    }
}

The prepareSmsData method :

public function prepareSmsData($orderid,$showAlert=false)
{
  // after some processing the data
 return($this->sendSms($sms_text,$customerData->getTelephone(),$showAlert));
}

The sendSms Method

private function sendSms($text,$gsm_num,$showAlert)
{
   if(!Mage::registry('messageDisplayed')){
   Mage::register('messageDisplayed',true);
   $session = Mage::getSingleton('core/session');
   $message = 'Coupon code & Redeem code sent to your mobile number ('.$gsm_num.')';
   $session->addSuccess($message);
    if($showAlert)
          {
              echo('<script language="JavaScript" type="text/javascript">
                    alert("Message sent to Mobile Number");
                    window.close();
              </script>');
          }
   }
}

The problem is : the successMessage is never displayed on frontend, if i var_dump($session) with in the sendSms method, i can see the success message. i tried to display successMessage even from the Observer.php. but not showing at all


texts: ($_FILES array is empty) error on saving image in admin - Magento 1.9

texts:
Magento Save Custom Image In Backend

public function saveAction()
{
    if ( $this->getRequest()->getPost() ) {
        try {

            $postData = $this->getRequest()->getPost();
            $uploader = new Varien_File_Uploader('img');
            $uploader->setAllowedExtensions(array('jpg','jpeg','gif','png')); // Your Format Here
            $uploader->setAllowRenameFiles(true);
            $uploader->setFilesDispersion(false);
            $path = Mage::getBaseDir('media').DS.'Gallery'.DS;
            $uploader->save($path, $_FILES['img']['name']);
            $img = $_FILES['img']['name'];
            $galleryModel = Mage::getModel('gallery/gallery');
            $galleryModel->setId($this->getRequest()->getParam('id'))
                ->setTitle($postData['title'])
                ->setDescription($postData['description'])
                ->setStatus($postData['status'])
                ->setImageurl($postData['imageurl'])
                ->save();

            Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Item was successfully saved'));
            Mage::getSingleton('adminhtml/session')->setgalleryData(false);

            $this->_redirect('*/*/');
            return;
        } catch (Exception $e) {
            Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
            Mage::getSingleton('adminhtml/session')->setgalleryData($this->getRequest()->getPost());
            $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));
            return;
        }
    }
    $this->_redirect('*/*/');
}

I got below this error


texts: Move Logo from header content to panel header

texts:
Magento 2 Luna Theme

How can I move the logo from the header content div class to the panel header class so that the logo would move up to be on the same line as

Default welcome message!  Sign In   Create an Account


texts: Add custom shipping carrier validations not working. Any body faced the same?

texts:
We just followed the same steps at

https://devdocs.magento.com/guides/v2.2/howdoi/checkout/checkout_carrier.html

Still the validation not works properly.

Magento CE 2.2.6 having any core issue related to that?


texts: Magento2 Apis fetching product video details

texts:
Can anyone help me how to fetch the videos details of product in magento2 Apis

I wants display content like below screenshot in my module Api;

please find the screenshot below:

https://prnt.sc/i3ywvq

Thanks


texts: app:config:import does not update web/secure/base_url

texts:
We have defined the default web/secure/base_url like this in our app/etc/env.php of our Magento 2.4.2-p1 CE for example:
return [
    'system' => [
        'default' => [
            'web' => [
                'unsecure' => [
                    'base_url' => 'http://example.com/',
                ],
                'secure' => [
                    'base_url' => 'https://example.com/',
                ],
            ],
        ],
    ],
];

However, if we change these values in the env.php and then execute
$ bin/magento app:config:import
Processing configurations data from configuration file...
System config was processed

the actual database values in core_config_data do not change for the default scope of the web/secure/base_url path - even though the command confirmed "System config was processed" instead of "Nothing to import.". Curiously these values cannot be edited in the back end, as they are otherwise identified to be persisted via the config files.
We would like to persist the default base URLs for the respective environment via the env.php this way - however for some reason Magento is not actually updating the value in the database when executing setup:upgrade or app:config:import.


texts: how can show child out of stock of configurable product in Magento 2.2.3

texts:
I am currently using Magento 2.2.3 and I am having some inventory issues with Configurable Products. I am trying to show Out of Stock Simple Products in the Dropdown but let the Customer know it is out of stock when selected.
When I getAttributesData of product via  Magento\ConfigurableProduct\Model\ConfigurableAttributeData.php  but it don't have product is out of stock.

Thanks advance!


texts: How to get config file from phtml file to change block-title

texts:
I have a template with a menu and I want to change the "All categories"

When I inspect the item it is shown with div class="block-title"

With that information I can search the .phtml file:
$config       = $this->getConfigObject();
....
<div class="<?php echo $prefix; ?>block-title"
style="font-size: 16px; font-weight: bold;"><?php echo $config['title']; ?>

But in which file can I change the $config['title']? I was looking in the config.xml file located in the etc folder but did't find it. Whereelse could the file be located? Thanks


texts: How can I place a coupon code window on the top of my webpages?

texts: Sorry, newbie here! For the convenience of customers, I'd like the coupon code window to appear at the top of web pages, rather than buried in the shopping cart or checkout page. My old website in magento 1.x has it  (please have a look at www.vitadeals.sg), but the developer for our magento 2.x site says it cant be done... Can someone please help shed some light on this for me? Many thanks in advance!


texts: Looking for an example on how to create admin modal similar to what's used in advanced pricing on product edit. Does anyone have an example with basic block logic inside.


texts: how to have a product collection with only one website and not more

texts:
I want to only select products that have the website id of 1 and only 1, I don't want products that has websites ids of 1,2,3,... .

I want to select only products that are assigned to only website id 1, if I do the

$websiteIds=1
    $productCollection = Mage::getResourceModel('catalog/product_collection');
    $productCollection->addWebsiteFilter($websiteIds);

it does not show me what I want, it has products with website id 1 and other websites as well.

I think the solution is to use something like

addfieldtoFilter('website_ids',array('eq'=>(1)))
addfieldtoFilter('website_ids',array('neq'=>(2,3,4)))

however we have no such thing as website_ids, if I run this:

$productCollection = Mage::getResourceModel('catalog/product_collection');
$productCollection->addWebsiteFilter($websiteIds);
foreach($productCollection as $product)
{
    echo $product->getWebsiteIds();
    echo $product->getData("website_ids")
}

we don't have "website_ids" as an attribute that I can go and do it, so the  echo $product->getData("website_ids") is wrong and null, I was wondering how I can achieve this. I know that I can select all products and then get count($websiteids) and if the count was 1 and also website_id was equal to 1 I can tag the product as my selected product which I am looking, but I think it should have a better solution.

P.S, for example:

Product A has following websites 1,2,3
Product B has following websites 1,2,5
Product C has following websites 1

the program should only return C, however with the solution that I have I will have A,B,C which is not my goal.


texts: Magento 2: Which event get called when selecting shipping method on checkout?

texts: I build a custom shipping method and i want to hide "cash on delivery" payment method based on my shipping method selection. I am assuming that one possible way to write the code in observer and set the "is_available"= false for that payment method. But i am not sure whether is there any event get called when user choose the shipping method on checkout


texts: Magento Persistence and Guest Checkout strange behavior

texts:
today we had an interesting situation. We have 3 stores, all with guest checkout enabled. Today (only) 1 store suddenly reported "no guest checkout available" messages in the last step of checkout.

After some digging in Google there appears to be a relation between this error and the Persistent Shopping Cart. If we disable Persistent Shopping Cart the Guest Checkout works again.

Question:
we enjoy having persistence turned on, but how can we prevent this situation where  no guest checkout available breaks our conversion?

Is there a way to fix this and still have Persistent Shopping Cart turned on?

thanks!


texts: How to Enable Custom Shipping Method For Specific Store View?

texts:
I have Multistore website and now I want to enable Custom Shipping Method for Specific Store. How to I'll do this ?
Thanks


texts: Magento 2 : CAPTCHA image display too much dots

texts:
I'm new in magento. I am working in custom module.

I apply captcha in registration page and login page. But, there are too much dots and lines display in image. Sometimes, I can't read text properly.

I checked in admin configuration. But, I didn't found any configuration to decrease dots and lines from CAPTCHA.

How to do manage this?

please help me to solve this issue.

Thanks.


texts:
I am getting below error in magento2 local system.

  We're sorry, an error has occurred while generating this email.

Can anyone help me please


texts:
I need to retreve the closest category witch has an image assigned and place this image as the sub-category image. Currently I have 4 levels of categories, but it may grow in the future, that is why I need to retrieve the closest parent category witch has an image.

For example, I have the Category Winter with 5 sub-categories, and only Winter has an image assigned, so I want to display this image as a subcategory image.

I hope I make myself clear..

Please help,

Thanks a lot.

My current page_header.phtml

<?php
    $_helper    = Mage::helper('catalog/output');
    $_category  = Mage::registry('current_category');
    $_imgUrl = $_category->getImageUrl();
?>
<?php
    if (!$_imgUrl){
?>

<?php
    }
?>

        <div class="container row" style="<?php if($_imgUrl): ?>background-image: url(<?php echo $_imgUrl; ?>);<?php endif; ?>">

<?php echo $_helper->categoryAttribute($_category, $_category->getName(), 'name') ?>

                    <?php echo $this->getChildHtml("breadcrumbs"); ?>


texts:
I know that magento 1.9.4 will support for php7.2.
Php7.2 security support will end by this year nov 2020(https://www.php.net/supported-versions.php).

For considering security aspect, planning to run magento 1.9.4 using php 7.4.

can we run  magento 1.9.4 using php 7.4?

Please let me know (magento expert*).

Thanks,


texts: Suspicious sql injections via site search

texts:
On my Magento site, I clicked on Search Terms to see what is popular and I noticed what you see below several attempts of SQL injections. Can someone point out what damage they could have done and how to stop them?

--Apple' union select 0x5e252a,0x5e252a,0x5e252a,0x5e252a,0x5e252a,0x5e252a,0x5e252a,0x5e252a,0x5e252a,0x5e252a,0x5e252a
--Apple' union select 0x5e252a,0x5e252a,0x5e252a,0x5e252a,0x5e252a,0x5e252a,0x5e252a,0x5e252a,0x5e252a,0x5e252a
--Apple' union select 0x5e252a,0x5e252a,0x5e252a,0x5e252a,0x5e252a,0x5e252a,0x5e252a,0x5e252a,0x5e252a
--Apple' union select 0x5e252a,0x5e252a,0x5e252a,0x5e252a,0x5e252a,0x5e252a,0x5e252a,0x5e252a
-- Apple' union select 0x5e252a,0x5e252a,0x5e252a,0x5e252a,0x5e252a,0x5e252a,0x5e252a
-- Apple' union select 0x5e252a,0x5e252a,0x5e252a,0x5e252a,0x5e252a,0x5e252a
-- Apple' union select 0x5e252a,0x5e252a,0x5e252a,0x5e252a,0x5e252a
-- Apple' union select 0x5e252a,0x5e252a,0x5e252a
-- Apple' union select 0x5e252a,0x5e252a
-- audio bag Barkan


texts:
I am developing a custom module for Magento (CE, 1.9) and I'm running into the most basic problem, my models (which should override core models) are not being found/loaded correctly. I have diagnosed this back to Mage.php and can see where it is adding, for example the singleton catalog/layer, and instead of adding the object it only gets a boolean. This causes all subsequent code to fail of course.

I have checked my configuration against this module creator and my directories and code all match exactly what is produced, so I'm at a loss!

etc/modules/Namespace_Pricing.xml

<?xml version="1.0"?>
<config>
  <modules>
    <Namespace_Pricing>
      <active>true</active>
      <codePool>community</codePool>
      <version>0.1.0</version>
    </Namespace_Pricing>
  </modules>
</config>

app/code/community/Namespace/Pricing/etc/config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Namespace_Pricing>
            <version>1.0</version>
        </Namespace_Pricing>
    </modules>
    <global>
        <helpers>
            <pricing>
                <class>Namespace_Pricing_Helper</class>
            </pricing>
        </helpers>
        <models>
            <pricing>
                <class>Namespace_Pricing_Model</class>
            </pricing>
            <catalog>
                <rewrite>
                    <product_type_price>Namespace_Pricing_Model_Catalog_Product_Type_Price</product_type_price>
                </rewrite>
            </catalog>
            <catalog>
                <rewrite>
                    <layer>Namespace_Pricing_Model_Catalog_Layer</layer>
                </rewrite>
            </catalog>-->
        </models>
    </global>
</config>

app/code/community/Namespace/Pricing/Model/Catalog/Layer.php

<?php
class Namespace_Pricing_Model_Catalog_Layer extends Mage_Catalog_Model_Layer
{

}

app/code/community/Namespace/Pricing/Model/Catalog/Product/Type/Price.php

<?php
class Namespace_Pricing_Model_Catalog_Product_Type_Price extends Mage_Catalog_Model_Product_Type_Price
{

}

Namespace is not literal, but it's just a string and is correctly cased everywhere used. What else do I need to look at outside these directories? With the module active, in fact just with the rewrites in place in config.xml, Magento throws an exception that the model (catalog/layer etc) already exists in the registry, because it only exists as a boolean False when set.


texts: Magento 2 : How to create a ConverToCsv.php for company admin grid export?

texts: I want to create a custom export csv file for company grid.I got to know that we can create ConvertToCsv.php to do that. Can someone explain steps on how to do that?


texts: Creating event and observer for an action at backend of Magento 2

texts: How to create an custom event and observer for that event at backend in Magento2. For example I want to create an event that whenever an admin deletes a customer profile a separate log file is generated. Please help me with the detailed solution and the directory structure.


texts: Magento 2 create widget container to display in admin end while selcting widget position

texts:
I have a requirement in Magento 2 to create a new custom container , so that while adding a new widget from admin end , under the select container section it should come as an option. Mainly my requirement is to create a container for home page.

Please check the attachment for reference.

Thanks in advance


texts: How to get Region text from address id (Magento 2)

texts:
I am not able to get region text from address id,

 <?php $_pAddsses = $block->getDefaultBilling() ?>
 <?php echo $block->getAddressById($_pAddsses)->getRegionId() ?>
  // output 5

 <?php echo $block->getAddressById($_pAddsses)->getRegion() ?>
   //output ""(empty)

And for my question, I don't have any region code, as many countries don't have region dropdown, like - India country dropdown doesn't have region dropdown, so in the database, the region id is 0 and region is whatever we filled in the text box for the region.

I checked the database it does contain region text.

I need region text to populate the region text box for which region dropdown is not available for countries.

I am not able to figure out what am I doing wrong.


texts: How to Create a Dynamic Drop Down list in Magento 2 using AJAX

texts: I am working on year make like module in magento 2.In that module there will be dynamic drop down list in the front end. When some one will  select a category from the first option the next option will be enabled and and it will display all its child categories.I am stucked in creating the dynamic drop down list.


texts: the suggested search terms still display (with display_in_terms =0) below the search textfield

texts:
My Magento website search bar displays the suggested search terms still display (with display_in_terms =0) below the search text field.

How can I fix the problem? Is it a bug of Magento 1.8.1?


texts: The page URL key contains capital letters or disallowed symbols.";i:1;s:986:"

texts:
0 /home/cel/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
Why is it an error in the core? I've never edited anything in the core? This error completely confuses me... any help would be greatly appreciated. Thank you.
if ($result) {
                    $this->_setResourceVersion($actionType, $file['toVersion']);
                }
            } catch (Exception $e) {
                printf('<pre>%s</pre>', print_r($e, true));
                throw Mage::exception('Mage_Core', Mage::helper('core')->__('Error in file: "%s" - %s', $fileName, $e->getMessage()));
            }
            $version = $file['toVersion'];
            $this->getConnection()->allowDdlCache();
        }
        self::$_hadUpdates = true;
        return $version;
    }


texts: Magento 1.7 custom options not updating price

texts:
On a Magento 1.7 website the product option price is not longer updating the main price. I updated the prototype.js file which I though was causing the issue but still no luck. When I inspect the code with Firefox I can see 3 "unreachable code after return statement" on 3 files: calendar.js, product.js, configurable.js

An example

This happened all of a sudden, no code or configuration changes have been made. Any pointers much appreciated.


texts:
I am getting below error:
Uncaught TypeError: $(...).unveil is not a function stuck in this.

<script type="text/javascript">
    require([
        'jquery',
        'jquerypopper',
        'jqueryunveil',
        'jquerybootstrap',
        'yttheme',
        'domReady!'
    ], function ($, Popper) {
        <?php if($enableLadyLoading){ ?>
        function _runLazyLoad() {
            $("img.lazyload").unveil(0, function () {
                $(this).load(function () {
                    this.classList.remove("lazyload");
                });
            });
        }

        /*_runLazyLoad();
        $(document).on("afterAjaxLazyLoad", function (event) {
            _runLazyLoad();
        });*/

        <?php } ?>
    });
</script>


texts: magento, problem with login to admin , php error

texts:
when I try to login to the admin panel I get a 500 error
in logs i have this:
AH01071: Got error 'PHP message: PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 82 bytes) in /var/www/vhosts/mysite.com/mysite.com/lib/Zend/Db/Statement/Pdo.php on line 291\n', referer: mysite.com/index.php/admin/

how can i solve this problem?


texts:
I am trying to remove the

<meta name="robots" content="INDEX,FOLLOW"/>

Using Layout Update XML within Magento 2 Design Tab but i am keep getting the following error

Please correct the XML data and try again. Element 'head': This element is not expected. Line: 2

Here is the XML code i am using

<referenceContainer name="page.wrapper">
    <referenceContainer name="robots" remove="true"/>
</referenceContainer>

Its not working. I want to remove this from within magento 2 backend using Layout Update XML option under design tab when customizing any page for specific staic page and then want to add my own using same Layout Update XML Option with


texts:
I get this error in the system.log:

   [2018-03-13 16:20:04] main.CRITICAL: Invalid template file: 'Magento_Checkout::js/components.phtml' in module: '' block's name: 'checkout_page_head_components' [] []

It's never good to see any error regarding the checkout, has anyone came across it and knows what is the cause and how to resolve it?

Running Magento ver. 2.1.8 and Varnish using Linux.

Also, found this which can be related:

[2018-03-14 09:03:15] main.CRITICAL: Broken reference: No element found with ID 'checkout.header.wrapper'. [] []

Edit:

This is the path to my components.phtml file in my custom theme:

/http/app/design/frontend/Venustheme/cricket_child/Magento_Checkout/templates/js/components.phtml

My layout/default.xml file:

    <referenceBlock name="head.components">
        <block class="Magento\Framework\View\Element\Js\Components" name="checkout_page_head_components" template="Magento_Checkout::js/components.phtml"/>
    </referenceBlock>

My layout/checkout_cart_configure.xml file:

    <referenceBlock name="head.components">
        <block class="Magento\Framework\View\Element\Js\Components" name="checkout_cart_configure_head_components" template="Magento_Checkout::js/components.phtml"/>
    </referenceBlock>


texts: In Magento 2 how do i get the order number from the invoice collection factory

texts:
I manage to get the order id but not the order number

$invoicesCollection = $this->_invoiceCollectionFactory->create()->addFieldToSelect(array('*'));
$invoices = $invoicesCollection->getItems();
foreach($invoices as $invoice){
    $orderId = $invoice->getOrderId();
}


texts: Magento 1.9 API to create and assign voucher codes programmatically

texts:
We have a situation where we need to create voucher codes dynamically and assign it to a set of rules. Since I'm new to magento programming I'm not aware of using the REST API and all.

Could someone suggest how to do this, Is there an alternative way of accessing it via Python and PostgreSQL?

Also, we need this voucher codes to be sent to the customers on their first order, Do you know what all tables are involved in this?

Awaiting your suggestions. Thanks in advance.


texts: How to refresh page cache type in magento2

texts:
I updated price by raw sql queries.but its not reflecting in front end.but its reflecting admin side.
If i refresh page cache then its reflecting in the front end.

Mage::app()->getCacheInstance()->cleanType($type);

and my code to update price:

 $query= "SELECT entity_type_id  FROM ".$this->getTable('eav_entity_type')." WHERE entity_type_code = 'catalog_product'";
        $entityTypeId = $this->getConnection()->fetchOne($query);
        $query= "SELECT attribute_id FROM ".$this->getTable('eav_attribute')." WHERE entity_type_id = '".$entityTypeId."' AND attribute_code = 'price'";
        $attributeId = $this->getConnection()->fetchOne($query);
        if(count($Data)){
            foreach($Data as $key=>$value){
                $query= "SELECT entity_id  FROM ".$this->getTable('catalog_product_entity')." WHERE sku = '".$key."'";
                $entityId = $this->getConnection()->fetchOne($query);
                 if($entityId)
                 $this->getConnection()->query("UPDATE ".$this->getTable('catalog_product_entity_decimal')." SET value='".$value."' WHERE attribute_id='".$attributeId."' AND entity_id='".$entityId."'");
            }
        }


texts: can't access website after adding store code to url

texts:
I am using magento 2.2.2

My store was working fine till I added store code to urls so I am no longer able to access my website using my website url mystore.com I have to add store code to access

like this mystore.com/en

how to make resolve this problem so when someone put mystore.com goes directly to mystore.com/en

thank You.


texts: migration Magento 2 to localhost with xampp Admin stuck to login box without fields

texts:
i have a magento 2.0.4 website working on a server. As I want to upgrade it to 2.1.0, I did a backup and installed it on my local server W10 with xampp & composer, localhost (127.0.0.1).

I did clean the cache and removed everything, except .htaccess file from pub/static folder, run the command on Magento root :

php bin/magento setup:static-content:deploy

I opened up app/etc/di.xml find the path Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink and replaced to Magento\Framework\App\View\Asset\MaterializationStrategy\Copy

the website frontend is good but not the admin backend, it shows just white box in admin and no fields to login in to admin as well. There's no error in the console dev.

I checked as well, my account is not locked.

I did try to install a new fresh magento2 version with xampp and it's working... But not my website version.

Do you have any idea how to make the admin work again?


texts:
I have added a code inside the script tag for an on-change function.

But i am m getting error like this

  Server cannot understand Content-Type HTTP header media type
  application/x-www-form-urlencoded

And the code added in phtml file is as follows:

<script type="text/javascript">

    require(["jquery"],function($) {
        $(document).ready(function () {
            $('#sellerList').change(function () {
                $.ajax({
                    url: "/rest/default/V1/Ivy/ChangeCustomPrice",
                    data: {
                        "changeRequest": {
                            "product_id": $('#sellerList').value,
                            "seller_id": <?php echo $_product->getId(); ?>
                        }
                    },

                    type: 'POST',
                    dataType: 'application/json',
                    showLoader: true,
                    success: function(data, status, xhr) {
                        console.log("success");
                    },
                    error: function (xhr, status, errorThrown) {
                        console.log('Error happens. Try again.');
                        console.log(errorThrown);
                    }
                });
            })
        });
    });
</script>

Can anyone say what am i doing wrong here?


texts: Magento 2 How to display shipping costs in minicart popup?

texts: How can I display shipping methods/prices on minicart pop up in Magento 2?


texts: Updating product images programmatically

texts:
I have created one custom module where user(customer) can upload and edit his own product through frontend( my account ) dashboard. In this I have used code to edit the image and set it to thumbnail, base, and image for uploaded product. But it was not updating the Image. So Later on I tried to change through admin dashboard. Even after setting up thumbnail, small_image and and image but now it is not upating the product image for any product through admin dashboard(backend).

I have used the code

if (!$product->hasSmallImage()) $product->setSmallImage($product->getImage());
if (!$product->hasThumbnail()) $product->setThumbnail(Mage::helper('catalog/image')->init($product, 'thumbnail'));

I dont know where should check for the error as it is not showing error on admin dashboard as well. I have checked the database for product_entity table and for gallery and it is showing the image.


texts: Optimize Code in Magento for repeated phtml files.(4 files have same code)

texts:
I am working on e-commerce store in Magento and about to finish my work. I want to optimize my code its size/time complexity. In my product view there are 4 different sliders one of then include another 4 subslider. For example if slider3.phtml which call another sliders depends on some category id.

Here is code-

if ($result == '26') {
    echo $this->getLayout()->createBlock('catalog/product_view')->setTemplate('slider/themes.phtml')->toHtml();
}

if ($result == '27') {
   echo $this->getLayout()->createBlock('catalog/product_view')->setTemplate('slider/collabs.phtml')->toHtml();
}
.
.

And same for two more sliders.

The slider which I called in if code block(theme.phtml/collabs.phtml/etc) includes same repeated code only one change is there of category id-. And the code is more than 300 lines.

I want to know if this is fine? or do I need to call it with function? means I will create only one phtml file and create function which call this file with parameter i.e category id.

Or there is no need to do any thing with the code, because code is absolutely working fine. This will affect time complexity of my store?

Please explain me. thanks in advance.


texts: how to hide shipping Method Block from Cart page

texts:
I am Creating New Shipping Method In magento and follow below tutorial.
http://inchoo.net/magento/custom-shipping-method-in-magento/

But it display Shipping method on Checkout/cart page also.

I want to display my custom shipping method only on Onepage Checkout.

I am using Magento 1.9.2.4.

Anybody Can tell me how can i do that ??


texts: Magento2, Is it still necessary to disable a module before uninstalling it, and setup:upgrade? Any idea why this can't be the one command?

texts:
To disable a Magento2 module, I do the following.

php bin/magento module:disable <ExtensionProvider_ExtensionName> --clear-static-content
php bin/magento module:uninstall <ExtensionProvider_ExtensionName> -r
composer update
php bin/magento setup:upgrade

Is there any reason this can't be part of the uninstall procedure? What problems are preventing better solutions right now?  What needs to be improved to make the abstractions less leaky?


texts: “Add to wishlist” without redirecting to wishlist page Magento 2.06

texts:
I need to add to wishlist ajax based or customer should not redirect to wishlist page with out redirect in Magento 2 environment.

anyone have suggestion please share.


texts:
I am trying to add phpfilename with .php extension.
My partial NGINX configuration is:

server {
    set $MAGE_ROOT /home/user/public_html;
    root $MAGE_ROOT/pub;

    location / {
        root $MAGE_ROOT;
        try_files $uri $uri/ /index.php$is_args$args;
    }

    location /pub/ {
        ...
        alias $MAGE_ROOT/pub/;
        add_header X-Frame-Options "SAMEORIGIN";
    }

    location ~ (index|get|static|report|404|503|phpfilename)\.php$ {
        fastcgi_intercept_errors off;
        try_files $uri =404;

        fastcgi_pass $PHPFMSOCK_LOC;
        fastcgi_buffers 1024 4k;

        fastcgi_read_timeout 600s;
        fastcgi_connect_timeout 600s;
        fastcgi_index  index.php;

        include        fastcgi_params;
        fastcgi_param  PHP_FLAG  "session.auto_start=off \n suhosin.session.cryptua=off";
        fastcgi_param  PHP_VALUE "memory_limit=768M \n max_execution_time=18000";
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
    }

    location ~* (\.php$|\.htaccess$|\.git) {
        deny all;
    }

}

Option 1 (FAIL):
Placing file in to the root /home/user/public_html/
Output: No input file specified.

Option 2 (FAIL):
Placing file in to the pub folder /home/user/public_html/pub/
Output: No input file specified.

Option 3 (SUCCESS):
Placing same duplicate file in to the root AND pub folders
/home/user/public_html/
/home/user/public_html/pub/
Output: page file contents.

Environment:
Magento 2.2.0
Nginx nginx/1.9.14
Cpanel with Centos 6
PHP 7.0.24
php.ini cgi.fix_pathinfo = 0

Iv been trying all insane dated and outdated ways all day since morning, and still unable to figure out the proper way. Any suggestions will be really appreciated. Thank you.


texts:
I need to create a magento cluster with multiple node, I created one using AWS quick start and was able to deploy it with two instances. by default it has only pub/media mounted and share between both instances, however, when I generate static content it does not work correctly since pub/static is not shared, I Installed a plugin using composer and I had to install it separately on both the instances. I am assuming I will have to share pub/static too. any ideas which other directories should be shared between both instances?

thanks


texts: Magento community and enterprise development difference

texts: I'm planning to use the enterprise edition for the production server, but it will take a few months to get the custom development ready, so my question is if we develop the code based on the community edition, will it be a problem to migrate to enterprise edition later?


texts:
I am working on theming part in Magento2.

Whenever I compile .less file, two css file is created: styles-l.css and styles-m.css. Whenever we inspect the element and try to see the CSS applied in the browser, we are not able to find the CSS file path. I mean, I cannot know from which files my CSS is coming. Is there any way to find the CSS file path?


texts: How to assign different template to product detail page of specific category in Magento 2

texts:
I have created two category "wine" and "events". I added product to each category and now I want to apply different template/design to product view page according to category.

Products in event category have different design, and so on for wine category.

How to achieve this please.


texts: Magento2 Mageplaza LayeredNavigation multiselect filter with AND condition

texts:
I am working on a project which uses Mageplaza Layered Navigation. I need to change the behavior of multiselect from OR to AND.

As an example, I create attribute color. When I search for red and black, it should only show products that are red AND black not all the products which have red OR black.

Multiselect is correctly set, the only problem is to change the code - I cannot find where should I change. And what the code to change.
If anyone has the code or updated extension meets the upper condition please share.


texts: Magento2 - localhost/Magento2/admin/ cant be reached

texts:
http://localhost/Magento2/admin

Can't be reached on Windows10 server after successful Magento2 installation.


texts:
Below given is crontab.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
<group id="customemarsys_cron">
    <!-- catalog Related Jobs -->
    <job name="custom_product_sync" instance="Custom\Module\Cron\ProductSync" method="execute">
        <schedule>* */1 * * *</schedule>
    </job>
</group>

cron_groups.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/cron_groups.xsd">
<group id="customemarsys_cron">
    <schedule_generate_every>15</schedule_generate_every>
    <schedule_ahead_for>20</schedule_ahead_for>
    <schedule_lifetime>15</schedule_lifetime>
    <history_cleanup_every>10</history_cleanup_every>
    <history_success_lifetime>10080</history_success_lifetime>
    <history_failure_lifetime>10080</history_failure_lifetime>
    <use_separate_process>0</use_separate_process>
</group></config>

I tried to run php -dmemory_limit=6G bin/magento cron:run --group customemarsys_cron

But it reflects error

  main.WARNING: Could not acquire lock for cron group: customemarsys_cron, skipping run [] []


texts: Magento 2 : Is it possible to add order cancellation functionality in frontend?

texts:
I want to give the order cancellation functionality in frontend to user in case of order not shipped.
What would be the step to achieve this functionality ?


texts: International shipping not working after upgrade

texts:
We had a company upgrade our website from Magento 1.7.0.2 to Magento version 1.9.2.4.

For some reason after the upgrade our international shipping method does not show on the checkout page.

Does anyone have any idea what could be causing the problem?


texts:
I am creating a module where it removes a specific Shipping Method whenever this field value matches certain criteria. The conditions are handled from the backend where it uses the Magento 2 plugin feature. Now I want to trigger the estimates rates through knockout js.

Now my questions are, how are we able to trigger the request estimate shipping methods?


texts: Troubles with Downloadable in Grouped in 2.1.2

texts:
I have a downloadable product in a grouped product and after placing the order for the downloadable product from the grouped product display it doesn't show up in My Downloadable Products (it does if I order the downloadable product by searching for it and placing the order from its own display (not from within the grouped product).

It seems that the main thing we're seeing is that there are no records inserted for downloadable_link_purchased and downloadable_link_purchased_item.

The quote_item_option record for info_buy_request is different when adding to the cart as well as there being an additional record for the grouped_product_type in that table also.

I'm not finding any other questions related to this so I'm also wondering if this is working for anyone else.

I appreciate any comments or suggestions or notes on success or failure from anyone else who can test this!  Thank you!

Magento CLI version 2.1.2

EDIT:
(and thanks for the welcome!)

I'd like to add the steps to test this to see if anyone could share whether it is my issue or existing code:

1) Set up a downloadable product

2) Set up a grouped product

3) Add downloadable product to grouped product

4) Search / Go to downloadable product display and order it (works and shows in downloadable files list)

5) Go to grouped product and order the downloadable product (orders but does not show in downloadable files list)


texts:
How to redirect same page or Homepage instead of Customer dashboard?

Here is my code: Magento 2.1.1

<?php if( $isLoggedIn ) { ?>

        <a id="quick_sigup_link" style="positon:relative;" href="<?php echo $this->getUrl('customer/account/'); ?>">
                Hello. User
                My Account


texts: How do i find the variable name for coupon code and coupon value?

texts:
Can anyone tell me how I can include the coupon code and value of the coupon in an Order CSV that gets sent to the order fulfillment company? I am using Magento CE 1.8.1.

Basically when an order is generated, it also generates a CSV file with the order details and uploads this to the order fulfillment company. Looking through the code I can see that it pulls in other order data from variables e.g:

    $billingAddress = $order->getBillingAddress()->toArray();
    $email = $billingAddress['email'];
    $telephone = $billingAddress['telephone'];

What would be the variable name for pulling in the name and value of any money-off coupon that happens to be used for that order? I can't see any way of finding this out.


texts:
I have a customised CMS page which includes a login form, I have code that lets me grab the referrer url parameter which works fine when testing in pure php.

However when putting this live I encounter a strange problem

If the URL to the cms page is \loginnew, the referral URL is \loginnew\referer\encodedurl which returns a not found page instead of the intended CMS page with paramaters

I'm not sure how to enable a CMS page to accept the refer parameter, but can capture the parameter when testing outside of Magento with code I found here


texts:
Long time reader first time poster.

I have about 1200 products in my Magento 1.9 store. I'd like clear out all of the existing Related Products (setting all products to have no relations). Is there an easy SQL statement I can run in MySQL that can do this? Or am I stuck either having to purchase a extension, or worst case -- gasp -- do i have to do it manually for each product?

Thanks in advance.


texts: Why does the web based install of Magento 2 on Windows 7 localhost using XAMPP always fail?

texts:
This is on Windows, so the usual advice regarding chmod etc doesn't apply. By "fail" I mean I get no css styling and 404's with almost every link.

Here is what I did to try, does anyone have any suggestions please?

Set up an Apache URL in XAMPP (7.0.8) - I used http://localhost/www.example.com with this httpd.conf entry

    Alias /www.example.com "E:\www\magento\www.example.com"

    <Directory "E:\www\magento\www.example.com">
      Options Indexes FollowSymLinks ExecCGI Includes
      AllowOverride All
      Order allow,deny
      Allow from all
      RewriteEngine On
    </Directory>

(Added a file showing phpinfo() there to prove basic serving & php works and confirm apaches mod_rewrite is enabled.)

In MySql, "create database magento_example;"
From https://www.magentocommerce.com/download, Download Community Edition 2.1.1 zip
Unzip  to E:\www\magento\www.example.com
Before commencing, edit app\etc\di.xml so the "view_preprocessed" value is changed from "Symlink" to "Copy"

Before:
<item name="view_preprocessed" xsi:type="object">Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink</item>
After:
<item name="view_preprocessed" xsi:type="object">Magento\Framework\App\View\Asset\MaterializationStrategy\Copy</item>

Visit http://localhost/www.example.com/setup & begin - ensure readiness check passes 100%
Complete the database setup appropriately
Note the generated admin URL
Customise the locale if required
Create admin acc & proceed. Observe "success" message when done.
Click launch Magento Admin. Observe 404.
Visit http://localhost/www.example.com. Observe unstyled page. Click "Sign in". Observe 404. Click "Privacy Policy." Observe 404.
View source. Click link for a sample CSS - e.g. calendar.css. Observe 404.
Note: Situation currently identical to https://community.magento.com/t5/Just-Ask-Alan/Magento-2-front-amp-backend-returning-404-error-after/m-p/39961#M454
Delete all files in var/cache, pub/static (except .htaccess)
In root of site, "php bin/magento setup:static-content:deploy"
Using Chrome, Switch Person | Browse as Guest to eliminate browser cache/cookie problems
Observe many files copied, yet after completion still same as (12)
Check /var/log - observe only 2 files, debug.log and install.log, both of which are full but don't provide anything useful.


texts:
I am trying to send welcome email on signup to store 1 only,but not to store 2.
but the problem is that when i write plugin ,it sends email to none


texts: What's the right way to add assets to layout XMLs in CE 1.9 and EE 1.14?

texts:
I want to add another css file in the header on every page. In earlier versions, I would have

Copied app/design/frontend/base/default/layouts/page.xml to app/design/frontend/my_package/my_theme/layouts/page.xml
Add my action to the appropriate block in app/design/frontend/my_package/my_theme/layouts/page.xml

<default translate="label" module="page">
    <label>All Pages</label>
    <block type="page/html" name="root" output="toHtml" template="page/3columns.phtml">
        <block type="page/html_head" name="head" as="head">
            ...
            <action method="addItem"><type>skin_css</type><name>css/my_header.css</name><params/><if>lt IE 8</if></action>
        </block>
        ...
    </block>
    ...
</default>

From what I understand, the theme fallback in 1.9 is supposed to keep you from having to copy from the base .xml files. Following what I found at Layout updates in theme.xml, I attempted this using the following:

app/design/frontend/my_package/my_theme/etc/theme.xml:

<?xml version="1.0"?>
<theme>
    <parent>rwd/default</parent>
    <layout>
        <updates>
            <default_page>
                <file>my_theme/page.xml</file>
            </default_page>
        </updates>
    </layout>
</theme>

app/design/frontend/my_package/my_theme/layout/page.xml:

<layout version="0.1.0">
    <default translate="label" module="page">
        <block type="page/html" name="root" output="toHtml" template="page/3columns.phtml">
            <block type="page/html_head" name="head" as="head">
                <action method="addItem"><type>skin_css</type><name>css/my_header.css</name><params/><if><![CDATA[<!--[if (gte IE 9) | (IEMobile)]><!-->]]></if></action>
            </block>
        </block>
    </default>
</layout>

Doing this kills my theme as well as the RWD theme. What am I missing? I know I could just copy it as in previous versions. What's the right way to do this?


texts:
How can I add CSS to Magento2 ? Like I would like to add

.customer .top-links li { padding-right:5px; }

CSS Code in Style Sheets of Magento2, What should I do ?


texts: Magento 2.2.7 404 on all front end product pages and 'This product doesn't exist' on back end products

texts:
After updating, all products on the front end give a 404 when trying to view. All the small views, search, categories etc. work fine and show the products. It's only when you try to visit the page.

The same on the back end - all products are visible but if you try to open one you get the error: This product doesn't exist.

Side note: when trying to reindex using PHP 7.0 the following error shows for search:

Notice: Undefined offset: 4 in /vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Action/Full.php on line 384

If we switch to PHP 7.1 it reindexes fine.

No errors are showing in any logs and all the products in 'catalog_product_entity' have their SKUs.

Tried installation on 2.2.6 and same thing.

Currently in developer mode and using duplicate db and content from live site but on a subdomain.

Also using MariaDB.

Have tried reindexing and clearing all caches.

/* Update */

Doing some more digging if I try to open a URL_rewrite (Marketing > URL Rewrites > Edit) I am getting this error:

1 exception(s):
Exception #0 (Exception): Notice: Undefined index: media_type in /vendor/magento/module-product-video/Model/Plugin/Catalog/Product/Gallery/ReadHandler.php on line 60


texts: Magento 2 form ui component ajax fieldset

texts:
I see that in the latest versions of Magento 2, the add/edit form for categories, blocks and pages are generated via a ui component form xml.
Here is the example for cms pages.
I want to use that for my own module like the big boys do.
I got most of the things figured out, but I wasn't able to add a fieldset that retrieves its contents via AJAX.
For example, I want to associate my custom entity "many to many" with the products, so I need a fieldset that contains nothing at first, but when is clicked it will retrieve the list of products via an ajax call.
I don't need the actual products grid code. All I need is a way to do an ajax call when clicking the fieldset header.


texts: Magento 2 add new custom container above  tag

texts:
I want to add new custom container the <main> tag.

I have created the custom layout for my custom page design. I have created in the below directory:

app\design\frontend\Vendor\Theme\Magento_Theme\page_layout\custom_layout.xml

And than assigned this in the layouts.xml like below:

app\design\frontend\Vendor\Theme\Magento_Theme\page_layout\custom_layout.xml

<?xml version="1.0" encoding="UTF-8"?>
<page_layouts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/PageLayout/etc/layouts.xsd">
    <layout id="custom_layout">
        <label translate="true">Custom Layout</label>
    </layout>
</page_layouts>

And assigned this layout to my custom page. It's spearing in the frontend design, I just want to add new div container above the <main>.

How I can add new div container above the <main>?


texts: Add notice under State input filed in one page checkout in magento2

texts: How can i add notice under state input filed on one page checkou in magento2?


texts:
I have the product reviews working on one store. Ratings are showing up, review details appears fine.
I have to show all the reviews on other store as well. So I created a shell script to set store.

$collection = Mage::getModel('review/review')->getCollection();
$storeIds = array(1,2);
foreach ($collection as $review)
{
    $review->setStores($storeIds)->save()->aggregate();
}

Now the reviews are showing up, but the ratings are not.
Did I miss something on the code or I have to do this via admin?


texts: Magento 2 Add Discounts to totals to Quote

texts:
I am trying to create my custom reward points module. I need to apply discount to customer based on his reward points when he click use my rewards in cart/checkout page. For that i am followed below link

How to add fee to order totals in Magento 2.

It's adding discount to cart when i enter into checkout page, but i need to give authority to customer to apply rewards or not. If he select apply rewards then only discount to be add to cart totals.


texts: Magento 2 Email Confirmation Not Working

texts:
I have a problem with Magento 2.2.5.
All the links sent on email like the email confirmation link or the password reset link is not working.

The problem is that is my website is my_website.com then these links belong to a subdomain links.my_website.com.

Is this a bug or am I doing something wrong in the configuration?


texts: How to get add to cart url in custom product collection?

texts:
I created a custom collection using below code.

<?php
        $catNum = 19; //The number of the category you want to load
        $category = Mage::getModel('catalog/category')->load($catNum);
        $products_best = Mage::getResourceModel('reports/product_collection')
        ->addOrderedQty()
        ->addAttributeToSelect('*')
        ->setStoreId($storeId)
        ->addStoreFilter($storeId)
        ->addCategoryFilter($category)
        ->setPagesize(6);

        foreach ($products_best as $_product_best){
        $productt = Mage::getModel('catalog/product')->load($_product_best->getId());
            $urlll = Mage::helper('checkout/cart')->getAddUrl($productt);
            echo $_helper->productAttribute($_product_best, $_product_best->getName(), 'name')."
";

             echo $this->getPriceHtml($_product_best, true)."
";
             ?>

             <img class="image" style="opacity: 1;" src="<?php echo $this->helper('catalog/image')->init($_product_best, 'small_image')->keepFrame(FALSE)->resize(336,157); ?>"
                     alt="<?php echo $this->stripTags($this->getImageLabel($_product_best, 'small_image'), null, true) ?>">

             <button type="button" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" onclick="setLocation('<?php echo $urlll; ?>')"><?php echo $this->__('Add to Carts') ?></button>
             <?php
        }
?>

When i click add to cart button in the checkout page the message said that "product was added to your shopping cart" but below section there is nothing added to the card(shoppincart.png).
How can i fix this issue.


texts:
I am looking a Solution for my store. I have two types of products.

Option 1: The tax should be calculate after discount amount if exist.

**Price: USD 100
Discount :10 %
Remaining amount : 90
17 % GST( Remaining Amount) = 15.3
Total amount: 105.3****

option 2 : The tax should be calculate on the base of product price and the discount

Price: USD 100
17 % GST : 15.3
Discount :10 %
Remain amount : 90
Total Amount :  90 +15.3 ( GST) = 105.3


texts: How to Configure Magento2 with Gulp instead Grunt

texts:
How to configure Magento2 with Gulp instead Grunt.
Anyone have idea ?