texts: Issue with custom payment method info not showing in the email on Magento 1.9

texts:
I'm stuck on an issue with displaying the payment method details in the email that is sent to client on new orders, this is using a custom payment method that I created. What I have so far is; I have created a module with a block at app/code/local/PayOnDelivery/Block and in it a Info.php file with the following content:

class PayOnDelivery_Block_Info extends Mage_Payment_Block_Info
{
    protected function _construct()
    {
        parent::_construct();
        $this->setTemplate('payondelivery/info.phtml');
    }
}

Secondly I have created a info.phtml in app/design/frontend/default/default/template/payondelivery.

I have also created Data.php at app/code/local/PayOnDelivery/Helper, the file is empty with just the class defininition in it (shouldn't need anything else).

class PayOnDelivery_Helper_Data extends Mage_Core_Helper_Abstract
{

}

Also I have the necessary PayOnDelivery.php in app/code/local/PayOnDelivery/Model, the file has the necessary functions for the info.phtml to use.

The content of the info.phtml get printed nicely on the page when printing the order confirmation and also on the order page when displaying the order afterwards. For some reason the same content does not get applied to the email that is sent as new order.

I'm using the default order_new.html template for emails but the {{var payment_html}} is ending up empty. Anyone got ideas of the cause? I'm using Magento 1.9...


texts: Magento 2: How to create custom layout instructions to match a custom product page layout?

texts:
I am trying to work on a product subscriptions page which is very different in function from a standard product page. I have created my new Magento_Theme/page_layout/subscription.xml I set Magento 2 to use my custom layout for the product I want.

My question is, how do I create a custom set of layout instructions Magento_Catalog/layout/catalog_product_view.xmlto be used only with Magento_Theme/page_layout/subscription.xml ?

I still need most catalog_product_view pages to use the standard layout instructions. The main reason for this, is that subscription pages are going to be so different I need entirely different XML for the page layout.

Essentially, I would like to have a specific paired page_layout and layout for the subscription products.

Thanks!


texts:
To start I want to make it clear that this is not the old 'price rules disappear at midnight' question - I have all that set up properly. This is a little stranger.

I have a Catalog Price Rule set in Magento 2.2.5 that will give all customers in the a specific customer group a percentage off the price of all items except for those in a particular category.

When the customer logs in, everything looks good - the special price is shown on category and product view. But when they add just one product to the shopping cart, things start to go wrong. The special price is not shown in the cart, instead the full price is shown. And from here on out, the product and category views are also showing the full price again - it's as though the session has lost the value for customer group, because the only way I can get the special price to show consistently is to also apply it to the default customer group.

The value of $product->getFinalPrice() changes in each case, so it is no longer applying the Catalog Price Rule.

I have run a couple of queries to ensure the rule is being saved in the database, but each returns what you would expect.

SELECT
    *
FROM
    catalogrule_product_price
WHERE
    product_id = 'YOUR_PRODUCT_ID' AND website_id = 1

This returns the correct discounted price for the product with entries for the current date.

SELECT
    product_id
FROM
    catalogrule_product
WHERE
    rule_id = 1

This returns a list of products that the rule applies to, and I have verified that the product I am testing this on is in that list.

All that said, I'm rather stuck. Has anyone encountered anything like this before? I've tried to step through the code but I haven't had any luck finding it.


texts: Magento 2 - Add Custom Attribute to Product Collection without Flat Catalog EAV?

texts:
I have the below collection:

$this->_collection->getSelect()
                  ->order(new \Zend_Db_Expr('price_index.min_price / IF(e.unit_of_sale = NULL, 1, e.unit_of_sale) DESC'));

This is used for sorting by each price on the frontend and worked perfectly while product flat catalog was enabled. Now however with product flat catalog disabled the following error is shown:

Exception #1 (PDOException): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e.unit_of_sale' in 'order clause'

I'm guessing i need to add the attribute so it can be used for the ORDER clause. I have tried the below however with no luck:

->addAttributeToSelect('unit_of_sale')
->addFieldToSelect('unit_of_sale')

Using ->addAttributeToFilter('unit_of_sale') gets rid of the error and so have just created a false filter ->addAttributeToFilter('unit_of_sale', array('neq' => '-1')) so that I can use the attribute for the order but would rather know how to add the attribute for order clause.

How can i add a custom attribute to a collection while flat catalog is disabled?


texts:
I have followed the below link and added the code in success.phtml but my orders are not tracked in Google Analytics. In Chrome, the below error comes

https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce

success.phtml

<script type="text/javascript">
    ga('create', '<?php echo Mage::getStoreConfig('google/analytics/account') ?>');
    ga('require', 'ec');
    <?php
        foreach ($items as &$item) {
            echo $block->getItemJs($trans['id'], $item);
        }
        echo $block->getTransactionJs($trans);

    ?>
    ga('send', 'pageview');
</script>

  Uncaught ReferenceError: ga is not defined

Can anyone help me,?


texts: How to get attribute label when creating variations?

texts:
When creating configurable products, step 2 shows attribute checkboxes with admin label:
Example: (checkbox) 01
<label data-bind="text: label, visible: label, attr:{for:id}"
                class="admin__field-label"></label>

My admin labels  are numbers. The reason for this is to autogenerate number to SKU. So i need to display labels where store id is 1 (English labels). Reason for this is to recognize the color i want to choose. How to achieve this?
Example: (checkbox) Blue


texts: Can I make free shipping on a specified product in magento 1?

texts: I need to create a new product which my customer need not to pay shipping amount for this (ex: free shipping), but, it doesn't work, here is the snapshot for your reference.


texts: What is the wrong when i get the product attribute lable?

texts:
I am using two different ways to load the products in my magento page.

Method 1 : Load the category products by Category id

$productId = (int) trim($getId[0]);//HERE $productId IS A CATEGORY ID
$obj = Mage::getModel('catalog/category');
$_product = $obj->load($productId);

$category = Mage::getModel('catalog/category')->load($_product ->getId());

$productslist = Mage::getResourceModel('catalog/product_collection')
    ->setStoreId(Mage::app()->getStore()->getId())
    ->addCategoryFilter($category)
    ->addAttributeToSort('position', 'asc');

foreach ($productslist as $_productslist) { $arrIds[] = $_productslist->getId(); }

 //$arrIds[0] :- this variable holds the first product id of the collection.
$product = Mage::getModel('catalog/product')->load($arrIds[0]);
$attributes = $product->getAttributes();
foreach ($attributes as $attribute) {

    if ($attribute->getIsVisibleOnFront() && $attribute->getFrontend()->getValue($product) != "") {
        $label = $attribute->getStoreLabel($product);
    }
}

In This way i can use getStoreLabel and retrieve the label values of the attribute for the product.

Method 2 : Load the products by Product name

$productName = (int) trim($_POST['partnumber']); //this is user search value for product name

$productslist = Mage::getModel('catalog/product')
                    ->setStoreId(Mage::app()->getStore()->getId())
                    ->getCollection()
                    ->addAttributeToSelect('*')
                    ->addAttributeToFilter('name', ['like' => $productName . '%']);

foreach ($productslist as $_productslist) { $arrIds[] = $_productslist->getId(); }
//$arrIds[0] :- this variable holds the first product id of the collection.
$product = Mage::getModel('catalog/product')->load($arrIds[0]);
$attributes = $product->getAttributes();
foreach ($attributes as $attribute) {

    if ($attribute->getIsVisibleOnFront() && $attribute->getFrontend()->getValue($product) != "") {
        $label = $attribute->getStoreLabel($product);
    }
}

Here in method 2 a 404 page is coming.
What is the mistake i am doing here.I used the same way to get the attribute and attribute label for both scenario.

UPDATE

I managed to fix this issue by removing $product in $label = $attribute->getStoreLabel($product);, I want to know why this argument work in method 1 and not work in method 2.Please explain me.


texts: How to get all product information as per category Id using Rest API in Magento 2?

texts:
I got product SKU as per category id with following code

$requestUrl='https://www.vaibhavjewellers.com/staging/index.php/rest/V1/categories/3/products/';

With the above code, I am getting all SKU for category id 3.
After getting product SKU I want to get all product details.

$requestUrls="https://www.vaibhavjewellers.com/staging/index.php/rest/all/V1/products?searchCriteria[filter_groups][0][filters][0][field]=sku&searchCriteria[filter_groups][0][filters][0][value]=%201VA1184%25
";

But above code returning nothing ....
Anyone can help me regarding this
Thank you.

<?php
//API URL for authentication
$apiURL="https://www.vaibhavjewellers.com/staging/index.php/rest/V1/integration/admin/token";
//parameters passing with URL
$data = array("username" => "sarveshmobileapp", "password" => "Sarvesh@123");
$data_string = json_encode($data);
$ch = curl_init($apiURL);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json","Content-Length: ".strlen($data_string)));
$token = curl_exec($ch);
//decoding generated token and saving it in a variable
$token=  json_decode($token);
//******************************************//
//Using above token into header
$headers = array("Authorization: Bearer ".$token);
//API URL to get all Magento 2 modules
$requestUrl='https://www.vaibhavjewellers.com/staging/index.php/rest/V1/categories/3/products/'; ///V1/products?searchCriteria[pageSize]=20 ///V1/products?searchCriteria
$ch = curl_init($requestUrl);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
//printing result
//print_r($result);
//decoding result
$results=  json_decode($result,true);
foreach($results as $result){
    /*echo '
';
    print_r($result);
    echo '
';*/
    echo $sku = $result['sku'].'
';
}
echo $requestUrls="https://www.vaibhavjewellers.com/staging/index.php/rest/all/V1/products?searchCriteria[filter_groups][0][filters][0][field]=sku&searchCriteria[filter_groups][0][filters][0][value]=124-VG2303
"; ///V1/products?searchCriteria[pageSize]=20 ///V1/products?searchCriteria
$ch = curl_init($requestUrls);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$resultr = curl_exec($ch);
//printing result
print_r($resultr);


texts:
Table cataloginventory_stock_item column low_stock_date In our db
most of the products have the same exact timestamp. how the event trigger for low stock and how to get the exact date. Actually lot of these products being out of stock for a long time.


texts: Magento 2. How to create new uiComponent(e.g. my_customer_form) that extends from existing one(customer_form)?

texts:
In this context we use the term UiComponent to define a configured collection of components to create a form or a listing, for example customer_form which is configured in customer_form.xml

How can I create a new uiComponent(e.g. my_customer_form) that extends from existing one(customer_form)?

I'm 90% percent sure there is a way to inherit from existing uiComponents but i can't remember what is the syntax.

For example in my component to write:

<form>
...
<some_special_node>customer_form<some_special_node>
...
</form>

As a result my new uiComponent has everything the customer_form has and I can add new fields.

Any tips are highly appreciated.


texts: jquery min file not loading in the homepage in Magento 1.9 installation

texts:
Until yesterday this website has been working properly. Strangely now when this url http://solankitextileagency.com is loaded, I'm getting this error

  A script on this page may be busy, or it may have stopped responding.
  You can stop the script now, open the script in the debugger, or let
  the script continue

Script:http://solankitextileagency.com/js/lib/jquery/jquery-1.10.2.min.js

The order in which it is called in the page.xml is:
1.prototype/prototype.js
2.lib/jquery/jquery-1.10.2.min.js
3.lib/jquery/noconflict.js

Tried pretty much everything to debug, this issue has popped up all of a sudden. Was not there from the beginning. Any help/advice will be very much appreciated.


texts: How can I redirect user to the payment gateway after placing order in magento 2?

texts: I am creating my own payment method which should redirect user to the payment gateway of a bank after placing order. How can I do it?


texts:
I noticed that some simple products aren't accessible via direct URL.
Magento version: 1.13.0.2 (enterprise edition).

I tested by going in the admin under Manage products and I manually composed the native URL using the product's ID (example: domain.com/catalog/product/view/id/1869). When I try this I'm getting a 404 error. The simple products have the visibility set to Not Visible Individually. If I change the visibility to anything else like, Catalog, Search or Catalog, Search and try the native URL again, I don't get the error anymore and the product page is loaded.

I also tried to use the URL key with the appropriate suffix and I'm getting the same thing.

Because of the way the store is built we have to keep the visibility of the simple products to Not Visible Individually, so my questions are:

  Is it normal for products that are set to "Not visible individually" to not be accessible via direct URL? If not, what could be causing the issue and how could it be fixed?


texts: Is there any way to Schedule a Cron Programatically

texts:
I have created a CRON from My Customer this extension has a CRON. now the client is asking me to do something that CRON should schedule automatically on Magento Extension Installation

He doesn't want to run php bin/magento cron:run


texts: Prevent Magento 2 website down when running setup:upgrade

texts:
Currently my magento 2 website is on  production mode and the website traffic is very high 24/7 , when there's a code/module update i need to run the following command in the terminal:

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy

when i run this bin shell in the terminal the website is temporary down, and it will live again after it finish run the shell, how to prevent website down when i run this shell command?


texts: seperate product listing page into blocks and get content from different phtml file

texts:
I'm in a product listing page list.phtml, i have overwritten template file adding another view. As this file looks mess(also more lines of codes), i want to break down this file into different phtml file.

Here is what i want to achieve.

<?php
    if ($this->getMode() == 'newview'):
        //New added view
        //Get this part from another phtml file
   elseif($this->getMode() == 'grid'):
        //Grid view
        //Get this part from another phtml file
   else:
        //List view
        //Get this part from another phtml file
   endif;
?>

And obviously the product data $_productCollection,$_attributes and so on needs to be accessible form the separated file.

i have overwritten the product listing page(file) from layout file like this

<catalog_category_default>
    <reference name="product_list">
         <action method="setTemplate">
             <template>newview/catalog/product/customlist.phtml</template>
         </action>
    </reference>
    <reference name="product_list_toolbar">
        <action method="setTemplate">
            <template>newview/catalog/product/list/customtoolbar.phtml</template>
        </action>
    </reference>
</catalog_category_default>
<catalog_category_layered>
    //Same content as above.
</catalog_category_layered>

I am wondering as, i'm already inside a condition, is it possible to manage those parts from different file.


texts:
So, most of the time I saw using getFirstItem and getLastItem used in case of collection.

But I  can't see any possible method to get the last item for ::getModel())

So, is there a possible way to get the last item when not using collection but instead just using getModel("..")->load();

(
[0] => Array
    (
        [id] => 102
        [payment_tbl_id] => 924
        [order_id] => 3151
        [pg] => razorpay
        [amount] => 160.00
        [status] => 1
        [refund_transaction_id] =>
        [stop_refund] =>
        [stop_refund_reason] =>
        [created_at] => 2020-04-17 07:49:53
        [updated_at] => 2020-04-17 07:49:53
    )

[1] => Array
    (
        [id] => 103
        [payment_tbl_id] => 924
        [order_id] => 3151
        [pg] => razorpay
        [amount] => 15.00
        [status] => 1
        [refund_transaction_id] =>
        [stop_refund] =>
        [stop_refund_reason] =>
        [created_at] => 2020-04-17 07:50:23
        [updated_at] => 2020-04-17 07:50:23
    )

)

This is the output of getResourceModel, as it can be seen there can be mutilple rows, but I need to fetch the last one and make the stop_refund value as 1, and update the row  in db.


texts: Load Custom CSS After style-l.css For Home Page

texts:
I am using below code to include my custom CSS file in home page only:

File: app/design/frontend/[Package]/[Theme]/Magento_Theme/layout/cms_index_index.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <css src="Magento_Theme::css/home/slider.css" />
    </head>
</page>

This includes the css/home/slider.css file in the HTML but which loads before style-l.css and after style-m files included by Magento. I need my CSS file to be included after the style-m.css and style-l.css loaded by Magento.

Magento loads its style CSS files via default_head_blocks.xml which I believe if I use in my case, it will load my custom CSS style in every page which I don't want at all.

So how can achieve the desired behavior via layout updates?

EDIT

As Kishan's answer points out, adding media="all" did the trick. But I would like to know how that magic happens.


texts: Magento2: How to get Bestseller products collection by category ids(subcategories)

texts:
I need to get Bestseller products collection by category ids(subcategories)

Thanks


texts:
How can I translate my transaction E-Mails.
At my Template, I have this

{{layout handle="sales_email_order_items" order=$order}}

And on my german shop the 'Sku' should be 'Artikelnummer' or 'Object' -> 'Artikel'
I tried to add the words in my translate.csv like this

"Mage_Sales:Item","Artikel"
"Mage_Sales:Sku","Artikelnr."

But it doesn't work. Anyone an idea?
Thanks.


texts: magento 1.9 switch theme on checkout page

texts: I am working on custom theme and i want to change to switch to RWD theme on checkout and cart page only , so when customer click on or come on checkout page i want to load RWD theme ?


texts:
This is what I see when I browse cms edit page in magento:

This bug is not visible in cms block edit page or category/product edit pages. Just the CMS > Page.

I tried updating to the latest version (1.9.3.8) and disabling all extensions. Non of these worked. Also, there's no javascript error on page.
Any ideas how to fix this?


texts: How to change Product Stock Alert email template in custom theme

texts: I want to change email template of stock alert but I could  found only single variable in the template file "alertGrid". Please tell me how I will change the alertGrid layout. So, I can change the email template.


texts: Magento 2 - Invalid template file in catalog_category_view.xml

texts:
I have a custom template for category page list.phtml in my theme. list.phtml was addressed in catalog_category_view.xml as

<?xml version="1.0"?>
    <!--
    /**
     * Copyright © 2013-2017 Magento, Inc. All rights reserved.
     * See COPYING.txt for license details.
     */
    -->
    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <body>
            <referenceBlock remove="true"  name="category.product.addto">
            <referenceBlock
                name="category.products.list">
                <action method="setTemplate">
                    <argument name="template" xsi:type="string">MYVENDOR_Theme::product/list.phtml</argument>
                </action>
            </referenceBlock>
            </referenceBlock>
        </body>
    </page>

The template was working with Magento 2.1.6 version. I have updated my project from 2.1.6 to 2.3 and now I receive

Invalid template file: 'MYVENDOR_Theme::product/list.phtml' in module: 'Magento_Catalog' block's name: 'category.products.list'

It seems that action method or action tag itself is invalid, but I can't find the correct replacing tag for it. Anyone has any idea?


texts: Have external php script output to block

texts:
I have a folder in magento root dir with a php script and want to run/output it in a block.
What code is needed to run the script in a block?


texts: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '17-18' for key 'CAT_PRD_ENTT_MDA_GLR_VAL_TO_ENTT_VAL_ID_ENTT_ID'

texts:
I'm migrating magento 1.9.2.1 to magento 2.0.2..
I can't really understand what is CAT_PRD_ENTT_MDA_GLR_VAL_TO_ENTT_VAL_ID_ENTT_ID?


texts: SEO Product URLs Not Showing in Anchor Categories on Store View

texts:
I have a lot of categories that are set as anchors for its subcategories. It seems to me that this is easier on the database, rather than having so many rows to crawl through. However, on one of my stores I noticed that products that show up in these categories aren't using SEO-friendly urls unless they are actually in a category, not as an anchor. The cart is set to add category paths to urls. I've checked that my configurations in default and store view are the same. Not exactly sure why SEO product urls work with anchor categories on the main store, but not the store view.

How can the SEO-friendly urls be turned on for products being displayed in an anchor category on a store view?


texts: Add custom stylesheet with my custom block

texts: *In my custom block I want to add custom stylesheet to display the block as like i want. How it can be possible.


texts:
I want to empty my cart, because I made a mistake. I can't empty my cart now using the 'clear cart' button, so I want to force it to empty.

I already used this code on my view.phtml page:

Mage::getSingleton('checkout/cart')->truncate()->save();

But that resulted in a 404 page. Is there a way to force my cart to empty, via code or the admin?

Btw a module that allows you to force everyone's cart empty (only in dev mode) would be lovely haha


texts: How to add append jquery function in magento

texts:
in my case I want to add the 'div1' class to the 'div2' class but I don't really know how to do it. I tested a code but after the else part, the code doesn't execute (just the append method not other function like alert()...), is there any syntax error for the Magento logic
this is error in console :
require.js:166 Uncaught Error: Mismatched anonymous define() module: function($){
    "use strict";
    return function myfunctionCheck()
    {
        //code
    }
     else {
        //code
    }
    }
}


texts: Can publish a plugin in magento connect, which developed for my own website

texts:
I have been working on a project built on cake PHP. The project is an multivendor eCommerce platform.

The client for which I am building this application ,wants to create a magento plugin. This plugin will install on any magento powered ecommerce platform and communicate with the client multivendor ecommerce website.

I know, how we can developed such plugin. But what I don't know, is weather can I publish such plugin to MagentoConnect, which catered to specific application only. It would be great help if someone point me to acceptance criteria on publishing the plugin on magento.

I know how to publish a plugin in Magento Connect. But Does magento connect will accept a plugin in their portfolio, which is made for a specific website. And will be used by business client of that website only?


texts: Gender of the customer who made a particular order in magento

texts: I want the SQL or the table relationships to find out the gender of the customer who made a particular order in magento.


texts:
How Do I exclude a Magento category from the main menu and still maintain it in the side bar. I have tried these two code I got while searching on Google by replacing the default magento to these but its not working

Here is the code

<?php $_menu = "" ?>
  <?php if($_menu): ?>

  <?php foreach ($this->getStoreCategories() as $_category): ?>
  <?php if(stristr('71,70,69', $_category->getId()) === FALSE) : ?>
  <?php echo $this->drawItem($_category) ?>
  <?php endif ?>
   <?php endforeach ?>

   <?php // echo $_menu ?>

  <?php endif  ?>

And here is the second piece of code. Also I got this from googling.

 <?php $_menu = ''?>
  <?php foreach ($this->getStoreCategories() as $_category): ?>
  <?php $_menu .= $this->drawItem($_category) ?>
 <?php endforeach ?>
 <?php if ($_menu): ?>

    <?php foreach ($this->getStoreCategories() as $_category): ?>
       <?php if (!in_array($_category->getId(), array(12,34,56))) : ?> <?php echo $this-     >drawItem($_category) ?>
      <?php endif; ?>
     <?php endforeach ?>

  <?php endif; ?>

None of them seem to be working. I am using magento 1. 7.1

Thanks for your help


texts: Magento 2.1.1: Does a guest customer need to be created in the system prior convert the quote to order?

texts:
I tried to follow the example on how to create quote and order from the following URL: http://webkul.com/blog/create-quote-and-order-programmatically-in-magento2/.

I notice that from line 50 to 58 of the code, it will create a customer entity and save it. However, is that really necessary to do it if the customer is a guest that would not have a login credential?

Also what would it mean if a customer pay as a guest but already have login account with the same email? Would the order be linked?

Thank you,


texts:
I have a problem with magento 2.1.7, every time a guest user subscribe to the newsletter he doesn't receive confirmation email. I have already check on

Configuration > Customer > Newsletter
Configuration > Advanced > Admin

and check the cron job as well.
everything is fine but no resolution.
please help.


texts: Magento 2 knockout Select options not returning the value

texts:
I have Created custom component with select drop down when I select an option and alert the select option it spits out :

 function observable() {
          if (arguments.length > 0) {
             // Write

             // Ignore writes if the value hasn't changed
        if (observable.isDifferent(_latestValue, arguments[0])) {
            observable.valueWillMutate();
            _latestValue = arguments[0];
            if (DEBUG) observable._latestValue = _latestValue;
            observable.valueHasMutated();
        }
        return this; // Permits chained assignments
    }
    else {
        // Read
        ko.dependencyDetection.registerDependency(observable); // The caller only needs to be notified of changes if they did a "read" operation
        return _latestValue;
    }
}

I have :

  availableCountries : ko.observableArray(['--Please Select--', 'France', 'Germany', 'Spain']),
              chosenCountries : ko.observableArray(['--Please Select--']),

I can display just fine like so:

I can push from my function just fine like so:

  this.availableCountries.push('New item')

BUT I CAN'T from my function

  alert(this.availableCurrencies)

or

  console.log(this.availableCurrencies)

it spits the the observable  function above!

UPADTE: I did console.log(this.availableCurrencies._latestValue); and it gives me the previous value how to get currnetValue?

Full js component :

define(
    [
        'uiComponent',
        'jquery',
        'Magento_Checkout/js/model/step-navigator',
        'Magento_Checkout/js/model/quote',
        'ko'
    ],
    function (Component, $, stepNavigator, quote, ko) {
        'use strict';
        return Component.extend({
            defaults: {
                template: 'Magento_Checkout/view/summary/country'
            },
            availableCountries : ko.observableArray(['--Please Select--', 'France', 'Germany', 'Spain']),
            chosenCountries : ko.observableArray(['--Please Select--']),
            initialize: function () {
                this._super();
                return this;
            },
            getCountry:function (data, event) {
                console.log(this.chosenCoutries());
            }

        });
    }
);

and country.html:

    <select data-bind="event:{ change: getCountry}, options: availableCountries, selectedOptions: chosenCountries"></select>

Anyone nay help please!Appreciate


texts: How to enable company registration on Magento CE?

texts:
My customer registration form only shows simple user related fields. ( First name, Last name, etc. ) I even checked the 'is_required' field in DB in eva_attr. table on the Company row but still nothing.

It really annoys me and I can't make it work... I tried amending the xml templates but it won't do anything.

How do I show the company field on the registration form???

Please help, it's killin me.... :@


texts: Can't Install Magento : Blank page - Magento 1.8

texts:
I try to install Magento 1.8.0, but when i load install page i get:

  Firefox: blank page

  Chrome: This page isn’t working localhost is currently unable to
       handle this request. HTTP ERROR 500

Please can you help me to resolve this problem

Work Environment :

Ubuntu 16.04
php 5.6
nginx 1.10.0
mysql 5.7.18

Info can be useful: I tried to debug index.php and i discover that index file can't include /app/mag.php

Thank you


texts:
I'm trying to display my attributes on the product view page, it worked fine at first but suddenly it stopped working and I get the following error:

Call to a member function getSortedChildren() on a non-object in /template/catalog/product/view/type/options/configurable.phtml on line 32

When I look in the file on line 32 I find the following:

$_renderers = $this->getChild('attr_renderers')->getSortedChildren();

How can I fix this problem?


texts:
I tried to call the block function from my custom module helper like this:

$resultLayout = $this->_resultLayoutFactory->create();
$block = $resultLayout->getLayout()->getBlock('category.products.list');
if ($block) {
  $collection = $block->getLoadedProductCollection();
}

but i got an error like this:

  Exception #0 (RuntimeException): Illegal state


texts: Magento URL Rewrite for custom template for seo friendly urls

texts:
i am working on a website omegabanners.com and i have create the some custom template for designing tool. the product is saving into the database. when someone open the product the url shows http://www.omegabanners.com/fullcolorbanner?productId=1277

This kinds of url is not good for SEO i need SEO friendly URL for my website. like http://www.omegabanners.com/category/product-name

can anyone help me how can i do that either on template code or using the htaccess.

please check on specific url

[1]omegabanners.com/doublesidedbanner?proId=1239
[2]omegabanners.com/banner-stands/retractable-banner-stands/retractable-banner-stand-47x78.html
[3]omegabanners.com/index.php/catalog/product/view/id/1239/s/retractable-banner-stand-47x78/

These are the specific url for one product. my currently url show like url [1]
but i need it to shows like [2]. how i can i show it like [2]

and when i try to fetch the url magento ass [2] the desgin goes totally disturb i know the is the template reason..


texts: Product List Collection to not show products in Category x unless products ids in?

texts:
I have created an observer listening to the catalog_block_product_list_collection event.

What I am trying to do is limit the products being listed by customer group and whether a customer has a custom price for that product.

What I have so far is the observer limiting the products by customer group:

$collection = $observer->getCollection();
$collection->addAttributeToSelect('scode') //custom attribute
           ->addFieldToFilter('scode', array('in' => $filter)); //array of values pulled from a custom table based on customer group id.

For the majority of pages this is fine, however when in Category X (id 6) or when searching, how do I filter the collection so any products in Category X need to be limited to those with product id in array (values to be drawn from another custom table).

If this was just being applied to the category listings, then I would do something like:

$cat = Mage::registry('current_category');
if($cat && $cat->getId() == 6) {
    $collection->addFieldToFilter('product_id', array('in' => $product_ids));
}

but that does not help for search pages where I want to return all products in all categories except products in category X that are not white-listed.

How do I add a filter to my collection to do as I want in the above scenario?


texts: how to create new backend_type like int ,decimal,datetime?

texts:
I have seen Magento enterprise reward points module created new backend_type integer for following fields in eav_attribute table.
reward_points_balance_refunded,reward_salesrule_points.

How we can create new backend_type and store into that particular table


texts:
I created a custom charges on order for some specific products, Unfortunately custom charge was not updated in order total like cash on delivery,

Is there any way to update orders totals after order created without cancel order?


texts:
How to include Tooltip for a lastname field in checkout?
Tooltip like for email field.

in checkout_index_index.xml I did not find anything.


texts: How to add product link in order email magento 2

texts:
My order mail.phtml

 $_item = $block->getItem();
$_order = $_item->getOrder();

    <td class="item-info<?php if ($block->getItemOptions()): ?> has-extra<?php endif; ?>">
     <a href=<?php echo $_item->getProduct()->getProductUrl() ?>>

<?= $block->escapeHtml($_item->getName()) ?>

<?= /* @escapeNotVerified */  __('SKU'); ?>: <?= $block->escapeHtml($block->getSku($_item)) ?>

         <?php if($block->getConfig('sales_email/imageconfig/enabled')):?>

            <img src="<?=$productImage?>" title="<?= $block->escapeHtml($_item->getName()) ?>" alt="<?= $block->escapeHtml($_item->getName()) ?>" />

        <?php endif;?>

        <?php if ($block->getItemOptions()): ?>

            <?php foreach ($block->getItemOptions() as $option): ?>

<?= /* @escapeNotVerified */  $option['label'] ?>

                    <?= /* @escapeNotVerified */  nl2br($option['value']) ?>

            <?php endforeach; ?>

        <?php endif; ?>

here i were added  getProduct()->getProductUrl() ?>>

this line for product link but not showing link in order mail


texts: Use Magento header and footer on a webpage inside Magento root Directory in Magento2

texts:
I have a working web page which includes HTML and javascript.
I want to use Magento Header and Footer on that webpage.

Supposing that I kept that web page inside the Magento root directory, What is the easiest way to Use Magento header and footer on external the webpage?


texts:
I'm working on a very customised website using magento 1.7.0.2.

I'm creating some configurable products setting simple ones as not visible individually. Unfortunately they are still visible on both list and view page.

I checked product collection object and it seems to me correct as it has visibility 2,4.
Also, I've reindexed and clean the cache.

Do you have an idea about what is going wrong?
thank you


texts: Magento 1.8 after migrate live server to locahost admin URL not working

texts:
I change my Magento store Live server to Localhost, and i change core_config_data table also that is following,

I clear all cache files in var/cache folder and session files var/session folder.

Now my store front-end working fine. But when am enter http://127.0.0.1/ramesh/mirror-white/admin it move to http://127.0.0.1/dashboard/ page.

How to solve this error...?

And thanks for advance...!


texts: Add Dynamic Order Number Prefix [mm-yy-ordernumber]

texts:
My client wants the current month and year as a prefix in order numbers. I have read many blogs but they are all for static prefix for order number.

I am looking for a solution in Magento 2.


texts: How to add a custom button to product widget

texts: I have create a magento 2 product list grid and I need to add a custom button to the grid as shown below


texts: Multi-select value does not store empty values

texts:
I am working in Magento 1.9 , I have made a multiselect field in system.xml . When i select some fields in multiselect and click on save config it works fine  , but when i did not select any field it should save empty string in DB but it stores the previous values  .
see my code in system.xml.

<onerateserviceOptions>
                            <label>One Rate </label>
                            <frontend_type>multiselect</frontend_type>
                            <source_model>FedExSmall/Source_FedExSmallIoneRateServices</source_model>
                            <sort_order>12</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </onerateserviceOptions>

Note : That issue only occur in case when i did not select any field .
Looking for kind help .
Thank You in advance.


texts: shopping cart rules is not working correctly for two different rules

texts:
I have created two different shopping cart rules to apply discount when i check it on front-end it is showing incorrectly.it was applied both rule same time as there are different condition for both rules.

Here is how my rule condition look.
First rule to be applied on selected product only.

https://www.screencast.com/t/gNCBtJu6BgA

second rule to be applied on non selected product only

https://www.screencast.com/t/fgJ6h3cX

How its look on front-end
https://www.screencast.com/t/ib7B8jlV

it should only applied to selected product but it is applying both rule.

Can any please help me on this.


texts: Magento 1.9.2.3, Shopping Cart Rule are not working properly

texts: Currently I am facing issue regarding Shopping Cart Rule in Magento 1.9.2.3. I have apply rule on just Single Product SKU but somehow it applies on other product as well. Don't know whats Wrong?


texts: How to get All Active Categories in Custom Module Admin Form Dropdown in Magento 2?

texts: I am implementing a custom module in magento 2.In that module I want to show all active categories in admin form dropdown.How can I show them please help me on this.Thanks in Advance.


texts: How do I view/fix errors on static-content:deploy?

texts:
I am installing a theme and when I run bin/magento setup:static-content:deploy I get an error on some of the themes eg:

=== adminhtml -> Magento/backend -> en_US === ... Successful: 1997 files; errors: 1

how do I see what these errors are so I can fix them, or can I ignore these?

I am using a fresh install of Magento 2.1, in developer mode


texts: Separate mail for customer and store(owner of store) for enquiry form

texts:
I have a new form named Service Request. When user submit a request I need to get separate  mail for both user and store.

The user content should be like   : Thanks You for contacting, Our team will assist you soon

The store content should contain the details that entered in form.

How can I achieve this....


texts: Exception #0 : Notice: Trying to access array offset on value of type null in ../Calendar.php PHP 7.4

texts:
I did a new installation of Magento 2.4.2 (PHP 7.4.3). There were no errors during the installation.
The ShopURL is running.
The backend login also works.
After I switched the backend to German, the following error message occurs:
"Exception #0 (Exception): Notice: Trying to access array offset on value of type null in /myPath2project/shop/vendor/magento/framework/View/Element/Html/Calendar.php on line 114"

Where could I start to solve the problem.
Thanks in advance
Greetings heiko


texts: Magento 2 - Redirect customer to custom page after login

texts:
Which class I should override in order to redirect a customer to a specific page after login?

I have tried to set Redirect Customer to Account Dashboard after Logging in in the store configuration but it is not working.


texts:
How to remove Tax of Associated Products of Group Product in Cart and Checkout Page in Magento2?

Ex: Group Product $1000 (Set Custom Price using Observer)

Product A : $500
Product B : $500
Tax Rate Set : 15%

So Subtotal becomes $1150 ($150 As a Tax).

I want to make Subtotal $1000(Only In Group Product).


texts: SKU codes problems while uploading bulk products

texts:
I am having problem while uploading bulk products.
Let suppose I am uploading 3 products having SKU following:

SFP-10G-AOC1.5M-AO
SFP-10G-AOC1-5M-AO
SFP-10G-AOC1/5M-AO

While uploading my slugify function convert the first SKU to SFP-10G-AOC1-5M-AO, second to SFP-10G-AOC1-5M-AO and third to SFP-10G-AOC1-5M-AO.
At the end i am having error of same SKU. Can it handle in Magento?


texts:
I am trying to change the position of top links. I want to move top.menu before top.links.
In my page.xml following code is given:

            <block type="page/html_header" name="header" as="header">
                <block type="page/template_links" name="top.links" as="topLinks"/>
                <block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/>
                <block type="core/text_list" name="top.menu" as="topMenu" translate="label">
                    Navigation Bar
                    <block type="page/html_topmenu" name="catalog.topnav" template="page/html/topmenu.phtml"/>
                </block>
                <block type="page/html_welcome" name="welcome" as="welcome"/>
            </block>

And I have changed it as following to move top.menu above:

            <block type="page/html_header" name="header" as="header">
                <block type="page/switch" name="store_language" as="store_language" template="page/switch/languages.phtml"/>
                <block type="core/text_list" name="top.menu" as="topMenu" translate="label">
                    Navigation Bar
                    <block type="page/html_topmenu" name="catalog.topnav" template="page/html/topmenu.phtml"/>
                </block>
                <block type="page/template_links" name="top.links" as="topLinks"/>
                <block type="page/html_welcome" name="welcome" as="welcome"/>
            </block>


texts: Why can't Simple Products with options be grouped?

texts:
Synopsis

I have a store where-by I create a Grouped Product and associate a number of Simple Products.  When I add custom options to the simple products it is not visible in the Grouped Products' Associated Products Grid neither the Front-End.

However I have implemented a local, custom module to amend this behaviour, but what I would like to know is:

What are the reasons for this behaviour in Magento?
Is my module a good/bad idea?

Sources

config.xml

<global>
    <blocks>
        <adminhtml>
            <rewrite>
                <catalog_product_edit_tab_super_group>Vendor_Catalog_Block_Adminhtml_Catalog_Product_Edit_Tab_Super_Group</catalog_product_edit_tab_super_group>
            </rewrite>
        </adminhtml>
    </blocks>
    <models>
        <catalog>
            <rewrite>
                <product_type_grouped>Vendor_Catalog_Model_Product_Type_Grouped</product_type_grouped>
            </rewrite>
        </catalog>
    </models>
</global>

Block/Adminhtml/Catalog/Product/Edit/Tab/Super/Group.php

<?php

class Vendor_Catalog_Block_Adminhtml_Catalog_Product_Edit_Tab_Super_Group
    extends Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Group
{
    protected function _prepareCollection()
    {
        $allowProductTypes = array();
        $allowProductTypeNodes = Mage::getConfig()
            ->getNode('global/catalog/product/type/grouped/allow_product_types')->children();
        foreach ($allowProductTypeNodes as $type) {
            $allowProductTypes[] = $type->getName();
        }

        $collection = Mage::getModel('catalog/product_link')->useGroupedLinks()
            ->getProductCollection()
            ->setProduct($this->_getProduct())
            ->addAttributeToSelect('*')
            #->addFilterByRequiredOptions() # removed this
            ->addAttributeToFilter('type_id', $allowProductTypes);

        if ($this->getIsReadonly() === true) {
            $collection->addFieldToFilter('entity_id', array('in' => $this->_getSelectedProducts()));
        }
        $this->setCollection($collection);

        $parent = get_parent_class(get_parent_class($this));
        return $parent::_prepareCollection();
    }
}

Vendor/Catalog/Model/Product/Type/Grouped.php

<?php

class Vendor_Catalog_Model_Product_Type_Grouped
    extends Mage_Catalog_Model_Product_Type_Grouped
{
    public function getAssociatedProducts($product = null)
    {
        if (! $this->getProduct($product)->hasData($this->_keyAssociatedProducts)) {
            $associatedProducts = array();

            if (! Mage::app()->getStore()->isAdmin()) {
                $this->setSaleableStatus($product);
            }

            $collection = $this->getAssociatedProductCollection($product)
                ->addAttributeToSelect('*')
                #->addFilterByRequiredOptions() # removed this
                ->setPositionOrder()
                ->addStoreFilter($this->getStoreFilter($product))
                ->addAttributeToFilter('status', array('in' => $this->getStatusFilters($product)));

            foreach ($collection as $item) {
                $associatedProducts[] = $item;
            }

            $this->getProduct($product)->setData($this->_keyAssociatedProducts, $associatedProducts);
        }
        return $this->getProduct($product)->getData($this->_keyAssociatedProducts);
    }
}


texts: Magento - Insert the media gallery of the product in view.phtml

texts:
I'm trying to move the media gallery of the product from the media.phtml file to the view.phtml file. Basically I want to move the div with class = "more-views" which is contained in the media.phtml file.

When I try to insert it in a section of the view.phtml file and try to click on the product thumbnail, the effect of the photo change does not work. I noticed that this effect works only if the media gallery's thumbnails are inserted into the div with class = "gallery gallery_img" which is in the media.phtml file.

So, how can I make the effect of the image change of the product work if I move the thumbnails of the photos in the view.phtml file?

Thanks so much

I attached a photo for a better comprehension:


texts: What does xsi mean when defining arguments

texts:
I've seen for a while now that inside the arguments tag in di.xml or in the layout files the attribute xsi:type is used.
I took it for granted and used it like that, but I don't understand why the need for the xsi namespace. What does it mean?
The name attribute does not have a namespace.

Here is a random example.

 <arguments>
    <argument name="configurationsMap" xsi:type="array">
        <item name="default_message_identifier" xsi:type="array">
            <item name="renderer" xsi:type="const">\Magento\Framework\View\Element\Message\Renderer\EscapeRenderer::CODE</item>
        </item>
    </argument>
</arguments>

I know what the value of the xsi:type attribute means, but not why the need for the namespace.
This is not impeding my work, but it bugs me a lot.


texts: How to use another default_head_blocks.xml for a specific template?

texts:
My theme 'theme1' has Blank as parent.

I created a page_layout called landing in app\design\frontend\me\theme1\Magento_Theme\page_layout\landing.xml

<?xml version="1.0"?>
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
    <container name="root">
        <block class="Magento\Framework\View\Element\Template" template="Magento_Theme::html/landing.phtml"></block>
    </container>
    <referenceContainer name="page.main.title" remove="true"/>
</layout>

I don't want to load the same head block for this layout. How do you tell Magento to load let say app\design\frontend\me\theme1\Magento_Theme\layout\landing_head_blocks.xml ?


texts:
I'm trying to find the date when Invoice was paid in magento.

I know that sales_flat_invoice has created_at and updated_at fields, but I need to know exactly the date when an invoice was paid?


texts: magento2 - Data migration: missing configurable attributes after migration from 1.9.4.2

texts:
After completing a data-migration trying to exclude the import of products I can no longer complete the saving of a configurable product and the following window is shown

I have a dump of the db created before migrating (with all configurable products ok), which table can I look at to try to solve the problem? thank you all in advance


texts: Add block from Luma parent into child theme

texts:
I'm using a custom child theme with Luma as the parent, I have a custom page layout xml file and I'd like to include a block that's defined in the parent theme:

<block class="Magento\Theme\Block\Html\Title" name="page.main.title" template="Magento_Theme::html/title.phtml"/>

Adding the above into a <container> in my custom.xml page layout file does nothing, seeing as I'm not looking to modify the parent theme block, do I have to copy title.phtml to my child theme and use that?

If that's the case so be it, but if I can add unmodified parent blocks without duplicating their files that would be ideal, as I have many parent blocks to add to many custom page layouts.

I'm hoping I just need to change the "template" and/or "class" parameters in the code above to achieve this.

Note that my own custom template blocks inside my child theme folder show up as expected in my custom page layouts, so I don't believe I've misidentified this issue.


texts:
I want to change/translate the default magento cart and checkout URL.
I use the default Magento checkout.

So http://www.(domain).com/cart will be
http://www.(domain).com/winkelmand

and

http://www.(domain).com/checkout will be
http://www.(domain).com/bestellen

How can I achieve that?


texts: How to send welcome email when checkbox is checked in contact form in Magento2.2.5?

texts:
I want to send welcome email when a checkbox is checked in contact form in Magento2.2.5?

Refer screenshot

Any help would be appreciated.


texts: What are the different logging levels in Magento?

texts:
I am disabling logging to increase performance, and in core_config_data I see dev/log/active and system/log/active

What is the difference?


texts: Site is redirecting from checkout page to cart page

texts: I am working with a site http://www.themaorishop.co.nz ... In this, on some system after selecting shipping method page is redirected to cart page and operation is not completing. I am not able to find problem. Please have a look.


texts:
Does anyone know how to stop Knockout HTML templates from being cached (for dev purposes)? I don't have this issue with any other files (CSS, PHTML, XML, JS), it only happens with HTML templates.

As an example I will add the word test to the checkout button in the minicart. The file already exists, the only change I'm making is to add the word test.

<!-- ko i18n: 'Go to Checkout TEST' --><!-- /ko -->

File: app/design/frontend/VENDOR/THEME/Magento_Checkout/web/template/minicart/content.html

These are the steps I usually have to take to display my changes:

Clear Magento cache (php bin/magento c:f)
Clear browser cache
Refresh

No change.

Clear browser cache again
Refresh

The change is now visible. This time I got lucky, sometimes it requires more cache clears and other times I give up and delete the caches, var/view_preprocessed and pub/static/frontend.

My questions are:

What causes this?

Why does it only affect HTML files?

Is there a workaround?


texts: Change shipping price programmatically in checkout

texts:
I want to customize shipping price after customer select shipping method in checkout page. I have added a few lines of these code into Magento_Checkout/Model/ShippingInformationManagement.php, but nothing has changed.

$totals = $this->cartTotalsRepository->get($cartId);
$totals->setShippingAmount($customPrice);
$totals->setBaseShippingAmount($customPrice);


texts:
need to show, store wise qty.

> karama 01 19 left
> karama 02 10 left

there is two stores and qty mentioned


texts:
we are using custom import export for uploading the products.

but when we gave 777 permission for "media" folder, than only it will upload the images.

otherwise we will get error while uploading.

so is it fine with giving 777 permissions for only "media" folder.

or is there any security problems will appear for this.


texts: How to using Fall-Back Hierarchy change a file in:

texts:
How to using Fall-Back Hierarchy, properly modify a file eg: /app/design/adminhtml/default/default/template/login.phtml

My theme is:
Package: Ultimo
Theme: default

I tried save modified file into these:
/app/design/adminhtml/ultimo/default/template/login.phtml
/app/design/adminhtml/delault/ultimo/template/login.phtml

non of these working, what do I do wrong?
Please advise


texts: Add custom template in footer in magento2

texts:
I have added the custom template in footer. It displayed in all page .But in view page its throwing

     1 exception(s):
Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file: 'Magento_Theme::html/footer/trustworthy.phtml' in module: '' block's name: 'trust.shy'

In default.xml:

<referenceContainer name="footer-container">
 <block class="Magento\Framework\View\Element\Template" name="trust.shy" template="Magento_Theme::html/footer/trustworthy.phtml" after="subscribe.container"/>
</referenceContainer>

Added template in following path /var/www/html/magento/app/design/frontend/OX/shy/Magento_Theme/templates/html/footer/trustworthy.phtml

If any thing i want to change it ...

thanks.


texts: AWS Elastic Load Balancer Creating Cache Misses?

texts:
Forgive me if my title is way off the mark, here. I am by no means an expert in DevOps or cloud architecture.

I've inherited a client store hosted on Amazon EC2, which runs a total of 10 instances (5 web, 1 separate admin, 1 solr, 1 monitoring, etc). The 5 web servers are managed through a single load balancer.

I don't know much about the methods employed by AWS to balance traffic load, nor how to tune Magento's session/cache management mechanisms to deal with this, but what I can observe is some clear latency between page loads in a seemingly random order.

For example, if I refresh a page 10 times, 5 out of those 10 may be instantaneous, confirmed to be served from FPC. However, the other 5 seem to have no cache out of which to serve the page, and so I'm left waiting for Magento to generate from scratch.

My guess is that it has to do with the load balancer bouncing me around to different instances where cache has not yet been primed. How do I confirm this?

Further, is there a guide which describes the correct configuration of a load balancer in the context of Magento's cache and session management?

Useful notes: Magento EE 1.13.1.0, FPC enabled, Redis backend cache, Redis session management.

Update: Here also is a snippet of local.xml for this instance (URLs changed):

    <!-- backend cache -->
    <cache>
        <backend>Cm_Cache_Backend_Redis</backend>
        <backend_options>
            <server>some.server.cache.amazonaws.com</server>
            <port>6379</port>
            <database>0</database>
            <password></password>
            <force_standalone>0</force_standalone>
            <connect_retries>1</connect_retries>
            <automatic_cleaning_factor>0</automatic_cleaning_factor>
            <compress_data>1</compress_data>
            <compress_tags>1</compress_tags>
            <compress_threshold>20480</compress_threshold>
            <compression_lib>gzip</compression_lib>
            <persistent>1</persistent>
        </backend_options>
    </cache>

    <!-- full-page caching -->
    <full_page_cache>
        <backend>Cm_Cache_Backend_Redis</backend>
        <backend_options>
            <server>some.server.cache.amazonaws.com</server>
            <port>6379</port>
            <database>1</database>
            <password></password>
            <force_standalone>0</force_standalone>
            <connect_retries>1</connect_retries>
            <automatic_cleaning_factor>0</automatic_cleaning_factor>
            <!-- FPC data is already gzipped -->
            <compress_data>0</compress_data>
            <compress_tags>1</compress_tags>
            <compress_threshold>20480</compress_threshold>
            <compression_lib>gzip</compression_lib>
            <lifetimelimit>43200</lifetimelimit>
            <persistent>2</persistent>
        </backend_options>
    </full_page_cache>

    <!-- session caching -->
    <session_save>db</session_save>
    <redis_session>
        <host>some.server.cache.amazonaws.com</host>
        <port>6379</port>
        <db>3</db>
        <password></password>
        <timeout>2.5</timeout>
        <compression_threshold>2048</compression_threshold>
        <compression_lib>gzip</compression_lib>
        <log_level>1</log_level>
        <max_concurrency>6</max_concurrency>
        <break_after_frontend>5</break_after_frontend>
        <break_after_adminhtml>30</break_after_adminhtml>
        <bot_lifetime>7200</bot_lifetime>
        <persistent>3</persistent>
    </redis_session>


texts:
Is jQuery injection needed in following example ?
define(['jquery', 'componentX'], function(jQuery){
    jQuery('#test').html('')
})

What is worth to mention, componentX looks more or less like this:
define(['jquery'], function(jQuery){
   ...
})


texts: SQL to update price and special price based on specific store

texts:
I have a Magento Enterprise 1.14.2.1 multi-site and what I want is lets say I have two store views setup store "store_US" and "store_AU"

I want to run a php file that would get each sku, price and special price from the "store_US" and then multiple the price used in the store_us and save the new value to the price in the "store_au" for that sku. and then the same for the special price value of each sku.

I believe the table I would need to do the query on is the catalog_product_entity_decimal table. However not sure how to write the sql.

So far I have the below query which I believe will get the price of all products within a specific store id. However I am not sure how to add to this query to also get the sku of the item it is getting the price for.

$storeId = 4;
$sql = "select value from catalog_product_entity_decimal val
        where val.attribute_id =
            (
               SELECT attribute_id FROM eav_attribute eav
               WHERE eav.entity_type_id = 4
               AND eav.attribute_code = 'price'
            )
        AND val.store_id = $storeId
        ";

I also tried the below query which I thought might give me the products sku and price

 select value from catalog_product_entity_decimal val
        where val.attribute_id =
            (
                SELECT attribute_id FROM eav_attribute eav
                WHERE eav.entity_type_id = 4
                AND eav.attribute_code = 'price'
            )
        AND val.attribute_id =
            (
                SELECT attribute_id FROM eav_attribute eav
                WHERE eav.entity_type_id = 4
                AND eav.attribute_code = 'sku'
            )
        AND val.store_id = 4

however the second query also does not return anything


texts: Magento 1.9 Bulk Product uploading Error


texts: Magento2: magento rest api not triggering my custom plugin and observer?

texts:
I have created an observer "checkout_cart_save_before" and plugin Addproduct.
It is working perfectly for the website but not triggering for API while hitting on the postman.
Any suggestions about how to make this work.
Any help would be appreciated.


texts: Magento 2.3: Difference b/w Elastic search and Built-In search

texts:
I've searched about difference between Elastic search and Built-In search option available in the Magento search configuration but didn't find an answer regarding the same.

I want to know the difference between these two options.

Thanks in advance for your better support.


texts: How can you get the config value in html

texts:
I want to know if you can get the config value to html
I have a class which provides the value for config
Not sure how to get this checked in HTML

I have been looking at configproviderinterface


texts:
I already asked this question on stackoverflow but no replies. Neither did I find a useful reply to this issue on the web! So I am asking it here again.

https://stackoverflow.com/questions/18983505/recurring-profile-magento-payment-gateway-india

I want to use any payment gateway which can accept recurring profile payment from a magento store in INR. Please do not suggest paypal as it won't work in our case.

My requirements are clear:

I just want to confirm the transaction for a product which has recurring profile. So the payment gateway should accept the parameters for a recurring payment.

I do NOT want recurring payments(deductions from the account each month)

Right now, I have integrated EBS payment gateway successfully into my store and made modifications into it so that the payment method shows up during checkout.

However, after I click place order, the purchase is successful and the user is not redirected to EBS (just for the products with recurring profile).

Please reply. Even a minor help could be much fruitful for me. Many thanks viewers


texts:
So I'm creating an admin grid and one of the fields is a dropdown select:

<?php

namespace Vendor\Module\Ui\Component\Listing\Columns;

class Status implements \Magento\Framework\Option\ArrayInterface
{
    //Here you can __construct Model

    public function toOptionArray()
    {
        // return your data
        return [['value' => 0, 'label' => __('Option 1')], ['value' => 0, 'label' => __('Option 2')]];
    }
}

I noticed that you can just pass a label and value without calling a status table, I initially created one with my module because I thought of usual DB design of using foreign keys to match it to a value in an options table, but this function toOptionArray makes that seem redundant.

So my question is, do I need those FK tables or is this enough?

Thanks!


texts: How to remove "Signed-up Point" from Admin HTML New Orders Page?

texts:
In Sales > Orders > Create New Order the screen presents a list of existing customers. One of the columns is "Sign-up Point". How do I remove this column?
The column is being added in the /vendor/magento/module-sales/view/adminhtml/layout/sales_order_create_customer_block.xml file:
<!--other stuff-->
<block class="Magento\Backend\Block\Widget\Grid\Column" name="adminhtml.customer.grid.columnSet.store_name" as="store_name">
    <arguments>
        <argument name="header" xsi:type="string" translate="true">Signed-up Point</argument>
        <argument name="index" xsi:type="string">store_name</argument>
        <argument name="align" xsi:type="string">center</argument>
    </arguments>
</block>
<!--other stuff-->

In my file (/vendor/<vendor>/<module>/view/adminhtml/layout/sales_order_create_customer_block.xml) I have the following content:
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="store_name" remove="true"/>
    </body>
</page>

I've tried using the short name ("store_name") and the long name ("adminhtml.customer.grid.columnSet.store_name") but the grid column remains.
How do I remove this column?


texts: getting this "Integrity constraint violation: " while creating custom option

texts:
I have create custom module to create custom option with the reference of this "https://meetanshi.com/blog/create-custom-options-programmatically-in-magento-2/" page.

I'm getting bellow error for this "$option->save();" method.

  a:4:{i:0;s:277:"SQLSTATE[23000]: Integrity constraint violation: 1062
  Duplicate entry '0-0' for key
  'CATALOG_PRODUCT_OPTION_TYPE_PRICE_OPTION_TYPE_ID_STORE_ID', query
  was: INSERT INTO catalog_product_option_type_price
  (option_type_id, store_id, price, price_type) VALUES (?, ?, ?,
  ?)";i:1;s:7500:"#0
  /app/vendor/magento/framework/DB/Statement/Pdo/Mysql.php(95):

I have already try with reindex and FOREIGN_KEY_CHECKS, but still getting error.


texts: Save email template to database when install data Magento 2

texts: I want create a new template, but not from Marketing > Email Templates i want to do it programmatically from my custom extension, the idea is the new template will be saved when Setup/InstallData.php runs, is there any way to do this?


texts: Error website after installing the language pack

texts:
I wanted to install the German language packet from GitHub. https://github.com/mageplaza/magento-2-german-language-pack

Via composer I opened Putty and run first command line:

composer require mageplaza/magento-2-german-language-pack:dev-master

after this I wanted deploy via command:

php bin/magento setup:static-content:deploy de_DE -f

and now I see error:

Page has stopped displaying:

I have deleted module-core from vendor:

rm -rf vendor/mageplaza/module-core

and now error:

PHP Warning:  require(/home/fsg/domains/aron.pl/public_html/vendor/composer/../mageplaza/module-core/registration.php): failed to open stream: No such file or directory in /home/fsg/domains/aron.pl/public_html/vendor/composer/autoload_real.php on line 70


texts: How can i add custom field in customer address magento 2

texts:
I want to add a field in customer address create and save into customer information how can i add this.

i try this
http://www.extensions.sashas.org/blog/magento-2-make-customer-attribute.html
but it make a field in Account information.


texts:
I'm trying to load a layout and set my custom phtml after the cart page.

But when I put the directives to load the layout, I have the following error:

Fatal error: Call to a member function getRequestedRouteName() on a non-object in /var/www/html/magento/edubras.dev/html/app/code/core/Mage/Core/Controller/Varien/Action.php on line 226

config.xml:

<?xml version="1.0"?>
<config>
    <modules>
        <GrupoNDB_EmailCatcher>
            <version>0.0.1</version>
        </GrupoNDB_EmailCatcher>
    </modules>

    <global>
        <blocks>
            <grupondb_emailcatcher>
                <class>GrupoNDB_EmailCatcher_Block</class>
            </grupondb_emailcatcher>
        </blocks>
        <helpers>
            <grupondb_emailcatcher>
                <class>GrupoNDB_EmailCatcher_Helper</class>
            </grupondb_emailcatcher>
        </helpers>

        <models>
            <grupondb_emailcatcher>
                <class>GrupoNDB_EmailCatcher_Model</class>
            </grupondb_emailcatcher>
        </models>
        <events>
            <controller_action_predispatch_onestepcheckout_index_index>
                <observers>
                    <grupondb_emailcatcher>
                        <class>grupondb_emailcatcher/observer</class>
                        <method>displayEmailCatcherPage</method>
                    </grupondb_emailcatcher>
                </observers>
            </controller_action_predispatch_onestepcheckout_index_index>
        </events>
    </global>
</config>

My observer code:

<?php

class GrupoNDB_EmailCatcher_Model_Observer {

    public function __construct() {

    }

    public function displayEmailCatcherPage($observer) {

        $frontA = new Mage_Core_Controller_Front_Action;
        $frontA->loadLayout()->getLayout();

        $eCookie = Mage::getModel('core/cookie')->get("email");

        if( $eCookie == 'none'|| !isset($eCookie) || empty($eCookie) ) {
            echo Mage::app()->getLayout()->createBlock('core/template')->setTemplate('grupondb/email-catcher/cadastroEmail.phtml')->toHtml();
            die;
        }

        // Call the block to fill the fields in checkout
        echo Mage::app()->getLayout->createBlock('core/template')->setTemplate('grupondb/email-catcher/set-email-field.phtml')->toHtml();

    }

}

Someone can help me with this?

Cheers!


texts:
I think this might be impossible but I thought I would ask from some of the Magento developers here.

I want to use the 'aftertext' attribute when using the addLink() method of the top links block in layout xml.

But, I want to use the output of a rendered block/template for the value.

Is this possible?


texts: Magento 2 checkout page UI change to magento 1.9

texts: Magento 2 checkout page change to same as magento 1.9, Please anyone suggest me how to change the ui same as magento 1.9.


texts: Validate the T&C before the paypal popup in magento2

texts: Braintree Paypal Issue - There should be also a validation on the T&Cs for paypal before you go off to paypal not after


texts: How to find a place when shopping cart price rules applied?

texts: I'm looking for place at code where shopping cart price rules are applied. Lets say, I've created a rule and when I add some product to shopping cart which match this rule, this rule will be applied and can change a price. I'm trying to explore module SalesRules, but without success. Maybe someone can give me a right direction?


texts:
I am attempting to open a php file by pointing the path in the url.

First
I add the testfile.php in the pub fodler since that is the root folder specified in nginx.conf.sample

Second
I edit nginx.conf.sample around line 109 from this:

location ~ (index|get|static|report|404|503|health_check)\.php$ {

to

location ~ (index|get|static|report|404|503|health_check|testfile)\.php$ {

Third
Execute: sudo service nginx reload

I can access files like .txt .jpg but not files like php by entering www.mywebsite.net/testfile.txt

Why I still can't open the testfile.php?


texts: Magento Router getParams() duplication reach 100 iteration

texts:
Not sure why I am having this issue any help appreciated.

When I check: $request->getModuleName(), it is already set and $request->getControllerName() is also already set, the only one that isn't set to what I need is $request->getActionName(). It is set to no-route it should be view.


texts:
I've configured Magento 2 website as maintenance mode from .maintenance.flag it's working, at the same time I have configured released IPs from .maintenance.ip file.

For multiple IPs not working while for single IP it's working fine.

How can I configure to release selected multiple IPs?

For this I have written I have created.

1) .maintenance.flag file from var.

2) .maintenance.ip file from var and written code for release single IP

192.168.0.52

For single I have written above it's working.

192.168.0.52,192.168.0.53

For multiple, I have written above it's not working.

Can you please let me know how can I write to release multiple IP's and also how can I configure to redirect particular page while maintenance Mode?


texts: How to disable "Pay with Store Credit" option from checkout page Magento Commerce

texts:
In Magento 2.3.3 Commerce I want to use the Store credit for backend only.

How to disable Store Credit option from the checkout page?


texts: Security Scan supee-10415 false positive?

texts:
Magento 1 supee-10415 installed in my magento but when i checked that in magereports it's show safe and checked in magento security scan tool it's show " SUPEE-10415 has not been detected!".
Any one have idea about that.


texts:
can i build a Magento 2 Ui Form without use Collection at DataProvider Class?
If i don't use a valid collection not seems to work...

I just want to use the form to post data to external source. I don't know if this is the most appropriate way or i have to use a phtml form.

 protected $name;
protected $primaryFieldName;
protected $requestFieldName;
protected $meta;
protected $data;
protected $collection;

public function __construct(
    $name,
    $primaryFieldName,
    $requestFieldName,
    //CollectionFactory $myCollectionFactory,
    array $meta = [],
    array $data = []
)
{
    parent::__construct($name, $primaryFieldName, $requestFieldName, $meta, $data);
    //$this->collection = $myCollectionFactory->create();
}


texts: Source in insertTotals function pdf invoice

texts:
How to check what is the $source (Invoice or Credit memo) in function insertTotals on pdf Invoices/Creditmemo/Shipment.

protected function insertTotals($page, $source){

    $order = $source->getOrder();
    $totals = $this->_getTotalsList($source);
    $lineBlock = array(
        'lines'  => array(),
        'height' => 15
    );
    foreach ($totals as $total) {
        $total->setOrder($order)
            ->setSource($source);

        if ($total->canDisplay()) {
            $total->setFontSize(10);
            foreach ($total->getTotalsForDisplay() as $totalData) {

                $lineBlock['lines'][] = array(
                    array(
                        'text'      => $totalData['label'],
                        'feed'      => 475,
                        'align'     => 'right',
                        'font_size' => $totalData['font_size'],
                        'font'      => 'bold'
                    ),
                    array(
                        'text'      => $totalData['amount'],
                        'feed'      => 565,
                        'align'     => 'right',
                        'font_size' => $totalData['font_size'],
                        'font'      => 'bold'
                    ),
                );

            }

        }

    }

    $this->y -= 10;
    $page = $this->drawLineBlocks($page, array($lineBlock));
    return $page;

}

This is how it's called function in Creditmemo.php:

$this->insertTotals($page, $creditmemo);

And from Invoice.php:

$this->insertTotals($page, $invoice);


texts: How to add a flag icon to Country of Manufacture attribute

texts:
I want to add an icon/image to the attribute Country of Manufacture.  I found something that sort of works but not fully.

https://www.reddit.com/r/Magento/comments/3ntvds/outputting_a_flag_icon_for_country_of_manufacture/

My plan was to use Country of Manufacture as a way to add an image that says "Made In Usa".  This would only show when someone selects United States.

The code attaches it to all products and not just the ones that are made in usa.

This code works but I don't know how to add the image - it just shows the name of the country.  I thought about doing CSS with background image but I would need a class.

<?php echo $_product->getAttributeText('country_of_manufacture');?>


texts: custom attribute in magento with layered navigation as range

texts: How to make a custom attribute in magento to show as range in layered navigation like price any ideas please help


texts:
In Magento 2 every thing is in orange color, the color code is #eb5202.

I want to change this color to another color

How could I change this color?

or

Which file I have to modify?


texts: Can't use inline translation tool on my webpage. Its working fine in backed. I checked on the frontent if Translate Inline>"Enabled for Fronted"` is enabled, but it wasn't. when I translating something it does not change.


texts: magento certified developer exam passed but profile is not updated

texts: I have passed the exam for magento certified developer but my profile is not yet updated.


texts: Magento 2 - Create Account On Order Success Page Doesn't Work

texts:
After purchasing an item using guest checkout, there's an option to quickly create an account on the order success page. On choosing to create an account, there seems to be some sort of error - I can see a warning/alert icon and the div background turns red but there's no error message/text.

I'm not sure if this text is getting accidentally hidden by some CSS and I'm unable to find the error message strings in any of the Magento files.

Since there is no user input at this stage, and the email address has already been validated during checkout, I'm not sure what kind of error could come up at this stage.

How do I find out what the error is without the error text?


texts: After Migrating my site magento1 to magento2 On product detail page images display wrong

texts:
After migrating My site magento1 to magento2 on product detail page images display with watermark.

How can i display original small images?

Original image:(magento1)

Magento2 images after migration:


texts: Additional checkout not displaying on product pages

texts:
I've added the Paypal express checkout on my magento application, the paypal express checkout displays on the default product template, but it is not showing on my custom product template.

I dug further and found that the default product template calls the paypal code when the getchildhtml('addtocart') code gets executed. Where my custom product template is calling the same getchildhtml('addtocart')code the paypal code is not showing.

Is there an xml configuration that I'm missing? Is there any areas that I files that I should take a look at?


texts: Best Way Of Getting Base URL Inside KnockoutJS .html File

texts:
How can I get the base URL inside a KnockoutJS HTML file? See file below:

app/design/frontend/<Vendor>/<Theme>/Magento_Checkout/web/template/<Filename>.html


texts:
I have a Magento website, that occasionally sell very requested and popular items with very limited quantity available. In that cases the traffic on the site become 20x/40x the normal traffic.

When we sell those items, many customer try to buy them, and in fact i sell more products that those available.

Supposing that i load a qty of 10, i sell 12-13 of them.

I noticed that if i use a configurable product the problem is even worst, using a simple product is a bit better, but still generate overselling.

The server is a managed private server, and the company said that even in that cases, the processor and the ram do not reach even 50%, so the problem is not on the server.

The product have just one thing that differ from my other products, the qty limit on the cart set to 1.

The only thing that I noticed on error logs is mysql deadlock on some queries.

Has anyone found a similar behaviour?


texts: I want hide Add New Customer button for specific admin roles

texts: I want to hide "ADD NEW CUSTOMER" button on customer_grid page for certain admin roles, how to specify Specify ACL's for ui_components..?


texts: I am trying to figure out how to apply a dynamic tooltip for a specific custom shipping method. I need to show in the tooltip the separate charges that calculate the total shipping cost. For instance we have a service charge, an import fee, etc. I cannot find (being new to magento development) on how to achieve this.


texts: Change Mobile Menu jQuery Hide/Show Methods Magento 2

texts:
I'm attempting to update the Hide/Show of the mobile menu on Magento 2. It's a custom theme based off Luma.
I'd like to change the hide/show to slide left or right.
Similar to the functionality of Adidas.com
I can't seem to find this in menu.js or navigation-menu.js
Please help!


texts: Magento 2 Around Plugin get posted form value

texts:
I am customizing the address form to add custom arithmetic captcha. We are using ClassyLlama\AvaTax module to validate the customer address in Model File.

Now, to validate my custom captcha on server side i have used plugin method around.  To validate the captcha, i have to check post data. using around plugin method How can i check posted data response?  I did try $this->getRequest()->getPostValues()   and  $subject->getRequest()->getPOstValues()  but it throws call to undefined argument 4 error.

Here is my plugin file code:

   class ValidAddressManagement
   {
   /**
  * @var ValidateInterface
 */
protected $validate;

/**
 * @var RemoteAddress
 */
protected $remoteAddress;

/**
 * @var Config
 */
  protected $config;

   /**
   * @var \Magento\Framework\Controller\Result\RedirectFactory
  */
   protected $resultRedirectFactory;

   /**
   * @var \Magento\Framework\Module\Manager
   */
  protected $moduleManager;

   /**
    * @var \Magento\Framework\Message\ManagerInterface
    */
   private $messageManager;

    public function __construct(
    ValidateInterface $validate,
    RemoteAddress $remoteAddress,
    \Magento\Framework\Controller\Result\RedirectFactory $resultRedirectFactory,
    \Magento\Framework\Message\ManagerInterface $messageManager,
    \Magento\Framework\Module\Manager $moduleManager
)
{
    $this->validate = $validate;
    $this->remoteAddress = $remoteAddress;
    $this->resultRedirectFactory = $resultRedirectFactory;
    $this->messageManager = $messageManager;
    $this->moduleManager = $moduleManager;
}

/**
 * @param \ClassyLlama\AvaTax\Model\ValidAddressManagement $subject
 * @param \Closure $proceed
 * @param \Magento\Customer\Api\Data\AddressInterface $address
 * @param null $storeId
 * @return \Magento\Framework\Controller\Result\Redirect|mixed
 */
public function aroundSaveValidAddress(
    \ClassyLlama\AvaTax\Model\ValidAddressManagement $subject,
    \Closure $proceed,
    \Magento\Customer\Api\Data\AddressInterface $address,
    $storeId = null
)
{
      /*Here Trying to get the Post Data Response but it throws error.  How can i get post reponse. */
        $reCaptchaResponse = $subject->getRequest()->getPostValues();
        if (!isset($reCaptchaResponse)) {
            throw new \Magento\Framework\Exception\LocalizedException(new \Magento\Framework\Phrase('reCaptcha validation failed, please try again.'));
        }
        $remoteIp = $this->remoteAddress->getRemoteAddress();
        if (!$this->validate->validate($reCaptchaResponse, $remoteIp)) {
            throw new \Magento\Framework\Exception\LocalizedException(new \Magento\Framework\Phrase('reCaptcha validation failed, please try again.'));
        }

     return $proceed($address,$storeId);
     }

        }

Is there anything i am missing?

Any help would be appreciated.

Thank you,


texts: magento restrict website to certain country

texts:
i want to disable my site for certaing country and redirect it to specific page only like if person from UK opens website he will be redirected to abc.com/restricted

which is cms page with some message and shows user ip


texts: Unable to get Customer Details in block Magento 2

texts:
My code is

<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
namespace My\Module\Block;
use Magento\Framework\View\Element\Template;
class Abc extends Template
{

    protected $_customerSession;

    /**
     * @param Template\Context $context
     */
    public function __construct(
    Template\Context $context,
    \Magento\Customer\Model\Session $customerSession
    )
    {
        parent::__construct($context);
        $this->_customerSession = $customerSession;

    }

    public function getCustomerDetail(){
            if($this->_customerSession->isLoggedIn()) {
                echo $this->_customerSession->getCustomer()->getId();
                echo $this->_customerSession->getCustomer()->getName();
                echo $this->_customerSession->getCustomer()->getEmail();
                echo $this->_customerSession->getCustomer()->getGroupId();
            }
        }
}


texts: How to save custom field data from a registration form to a custom table when a user creates an account?

texts: I added a custom field to the registration form, but only this field I want to save in my custom table, who can help? Thank you


texts: Magento 2: Get **all** Base URLs for a Specific System

texts:
Magento 2 has a Magento\Framework\UrlInterface interface/type that's mapped to the Magento\Framework\Url object.  This object has a getBaseUrl method which you can use to fetch the base URL for the current scope.

$url = $this->url->getBaseUrl();

Is it possible to use this method (or another method?) to fetch the base URLs for every site/store in a Magento system? i.e Magento systems often have different base URLs depending on how the website, store, and store views are setup and how options like "use store code in URL" are configured.  I'd like a way to fetch every URL in a particular Magento system.

The larger, underlying question here is how does the "scope" object interact with the URL building in Magento 2.  Answers along those lines are more than welcome.


texts:
For installation of the community edition is there any benefit to installing from repo.magento.com instead of Packagist?

I see that there are over 20k downloads of the community edition from packagist so I know it must be a pretty common practice, but the installation instructions recommend to install it from repo.magento.com.

I've searched through their documentation and couldn't find any reason why they want you to use their repo instead of Packagist.

Is there something obvious I'm missing?


texts: Data migration tool - Magento 2 - Donot Reset the current position of migration to start from the beginning

texts:
Do not Reset the current position of migration to start from the beginning

In the Destination database, the data migration tool will truncate the table but we need the data that exist in the destination database.

Is there anyways run the data migration tool without touch previous data in the destination database.


texts: Re-index error: Cannot initialize the indexer process

texts:
I have a problem re-indexing my Magento website. Sometimes I get the error "There was a problem with reindexing process", but sometimes it's "Cannot initialize the indexer process".

I read a lot of related topics on google which say that I should delete /var/locks folder in my root mangento folder. I don't have such folder in my /var/ folder.

I am having problems reindexing the "Product Prices, Index product prices" index.

Could you tell me what can I do in order to fix this issue? Thanks

Magento Version 1.9 (the latest one)
Hosting OS: Linux technical

Changing memory limit:
I contacted my domain host and they told me my php memory was 128M. However it was only possible to change it to 256M because of my hosting plan. Despite the change, the problem remained.

I was able to reindex all of the things in the index management section, until yesterday. If you say that I have run out of memory (which was 128M), is it possible to clean it in some way so I can get space and be able to reindex again?

Var Folder:
I have the permissions required - 755 - which lets the owner to write - but still no locks  folder. The var folder is in my root folder and not in the tmp folder.

I have access to my backend, I am able to Flush all Magento cache. The only thing I am not able to do is reindex this Catalog product price.

Yesterday I created some new attributes and products. Just after that I wasn't able to reindex. Any other suggestions please? Thanks in advance.


texts: Magento Bulk Import Functionality Best Approach

texts:
We are developing a multi vendor module . In this module vendor will upload an excel sheet to import simple and configurable products.

I have a few questions here to proceed. I need a better approach to import products.

The vendor, Excel sheet will contain labels such as "Fabric Care", "Fabric Type" etc. But to import data into Magento we need to know these attribute codes. I am able to get the attributesetid as well from the vendor file as we tagging attribute id and category id to the file name.

But while importing products how can I assign these CSV/EXCEL data values to Magento DB.

Today I have 3 categories, Lets say in future it will be 30 categories, but we can import products to each of these categories without any issue.

Suggestions please!!!


texts: I want to change the Middlename/Initial text to the german translation in my register form. But where do I need to fix it? The only place where I found this text was in two core foulders.


texts: filter_condition_callback function stopped working after using $collection

texts:
Here is my code:

protected function _prepareCollection()
{
    $collection = Mage::getResourceModel('sales/order_grid_collection')
        ->addFieldToSelect('entity_id')
        ->addFieldToSelect('increment_id')
        ->addFieldToSelect('customer_id')
        ->addFieldToSelect('customer_email')
        ->addFieldToSelect('created_at')
        ->addFieldToSelect('grand_total')
        ->addFieldToSelect('base_grand_total')
        ->addFieldToSelect('status')
        ->addFieldToSelect('order_currency_code')
        ->addFieldToSelect('store_id')
        ->addFieldToSelect('billing_name')
        ->addFieldToSelect('shipping_name')
        ->addFieldToFilter('customer_id', Mage::registry('current_customer')->getId())
        ->setIsCustomerMode(true);

    $this->setCollection($collection);
    return parent::_prepareCollection();
}

protected function _avansFilter($collection, $column)
    {
     if (!$value = $column->getFilter()->getValue()) {
                return $this;
            }
            $orderId = $collection->getData();
            $CustomerEmail = $orderId[0]['customer_email'];
            $orders = Mage::getModel('sales/order')->getCollection()->addAttributeToFilter('customer_email', $CustomerEmail)->addFieldToSelect('*');
            //$Subtotal = Mage::getSingleton('sales/order')->loadByIncrementId($orderId)->getSubtotal();

             foreach($orders as $order){
                $OID = $order->getData();
                $OrderIncrementId = $OID['increment_id'];

                    $DiscountAmount = Mage::getSingleton('sales/order')->loadByIncrementId($OrderIncrementId)->getDiscountAmount();
                    $DiscountshippingTotal = Mage::getSingleton('sales/order')->loadByIncrementId($OrderIncrementId)->getDiscountshippingTotal();
                    $FeeAmount = Mage::getSingleton('sales/order')->loadByIncrementId($OrderIncrementId)->getFeeAmount();
                    $ShippingAmount = Mage::getSingleton('sales/order')->loadByIncrementId($OrderIncrementId)->getShippingAmount();
                    $Subtotal = Mage::getSingleton('sales/order')->loadByIncrementId($OrderIncrementId)->getSubtotal();
                    $Grandtotal = Mage::getSingleton('sales/order')->loadByIncrementId($OrderIncrementId)->getGrandTotal();
                    $AvansMethod = Mage::getSingleton('sales/order')->loadByIncrementId($OrderIncrementId)->getAvansMethod();

                    $GSubTotal = $Subtotal + $FeeAmount + $DiscountAmount + $DiscountshippingTotal;

                    if($AvansMethod == 2){
                        $GSubTotal = $GSubTotal / 2;
                        if($GSubTotal > $value){
                            $SearchID .= "$OrderIncrementId";
                        }
                    }
                    if($AvansMethod == 3){
                        $GSubTotal = '00,00';
                        $SearchID .= "$OrderIncrementId";
                    }

                }
            Mage::log(''.$this.'', null, 'grids.log', true);

            $this->getCollection()->getSelect()->where(
                "increment_id like ?"
            , "%$value%");

            return $this;

    }

I do not know why but after i added $orderId = $collection->getData(); in my protected function _avansFilter($collection, $column) the function seems to not return anything when i use  return $this.

When i remove this line $orderId = $collection->getData();  the variable $this is starting again to be working.(ofcource returing not the data i need but returning any data)

It is somehow stopping return any data when i use $orderId = $collection->getData(); in the function, why ?

Looking forward for your response


texts: Update Breadcrumbs phtml file via local.xml

texts:
I'm trying to update the breadcrumbs phtml file being used. I've unset the existing crumb block in layout:

<action method="unsetChild"><name>breadcrumbs</name></action>

But adding the below doesn't output anything. I think the new phtml is being called (a duplicate of the default breadcrumbs.phtml), but $crumbs is empty:

<reference name="content">
<block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs" template="page/html/breadcrumbs_category.phtml" />
</reference>

Thanks


texts:
I want to add order summary at checkout success page, I want to replicate the existing order summary block and template file whether its from backend or frontend.

Which block and template file to use for order summary, including discount, tax, shipping, and etc in details?


texts: I was going through the level up video tutorials about magento, in that they are using the sample data and are making a theme in which one thing they do is shift the block from one side to the other but i do not have this block, so how to put this block into my magento site?


texts: On updating product using ASYNC REST API it doesn't create product in Magento 2

texts:
I have using postman to test API to create a product
API URL : http://127.0.0.1/magento/rest/async/V1/products
Data Passed to test same as documentation :
{
 "product": {
"sku": "MS-Champ-S",
"name": "Champ Tee Small",
"attribute_set_id": 9,
"price": 25,
"status": 1,
"visibility": 1,
"type_id": "simple",
"weight": "0.5",
"extension_attributes": {
    "category_links": [
        {
            "position": 0,
            "category_id": "11"
        },
        {
            "position": 1,
            "category_id": "12"
        },
        {
            "position": 2,
            "category_id": "16"
        }
    ],
    "stock_item": {
        "qty": "10",
        "is_in_stock": true
    }
},
"custom_attributes": [
    {
        "attribute_code": "description",
        "value": "The Champ Tee keeps you cool and dry while you do your thing. Let everyone know who you are by adding your name on the back for only $10."
    },
    {
        "attribute_code": "tax_class_id",
        "value": "2"
    },
    {
        "attribute_code": "material",
        "value": "148"
    },
    {
        "attribute_code": "pattern",
        "value": "196"
    },
    {
        "attribute_code": "color",
        "value": "52"
    },
    {
        "attribute_code": "size",
        "value": "168"
    }
]
}
}

Gets response in postman
{
"bulk_uuid": "412bbfea-c6c9-4bce-8c27-84be8be790c6",
"request_items": [
    {
        "id": 0,
        "data_hash": "df9eef8c84da301b911a57b247d0dd8776556a2e921374db9dece5a9747377aa",
        "status": "accepted"
    }
],
"errors": false
}

When i go to admin to check the product it doesn't create any product.
Shows this at the top
Task "Topic async.magento.catalog.api.productrepositoryinterface.save.post": 1 item(s) are currently being updated.1 item(s) have been scheduled for update.

Any one helped me what i have missed ?
Any help is appeiciated.


texts: Magento 2 I wanna show the Tax amount in product view

texts: I wanna show the Tax amount like this am using Porto theme


texts: Magento 2 REST API, get attribute values instead of ids

texts:
When I make a REST call to get product data, any multi-select attribute (in custom_attributes) is return with a numeric id rather than its text value, ie:

24 => {#2105
  +"attribute_code": "manufacturer"
  +"value": "574"
}
25 => {#2106
  +"attribute_code": "barcode"
  +"value": "XXXXXXXXXXXXX"
}
26 => {#2107
  +"attribute_code": "color"
  +"value": "466"
}
27 => {#2108
  +"attribute_code": "gender"
  +"value": "134"
}
28 => {#2109
  +"attribute_code": "shipping_type"
  +"value": "793"
}
29 => {#2110
  +"attribute_code": "top_size"
  +"value": "215"

How can I return the value of these attributes instead of just the id?


texts:
And when frontend calls it, doesn't answer. Meaning a "css" or "js" 400 error.

Magento works just fine, but it doesn't run commands like di:compile because it can't find them in the directories.

And going to the directories they are found only in the form of shortcuts, what will it be?

here is a print: http://prntscr.com/ot77ql

Thanks in advance. Sorry for the bad English.


texts: Height option not working on var gallery in view.xml

texts: I tried adding <var name="height">530</var> inside <var name="gallery"></var> as this is the parameter to add height in fotorama as per the documentation but my declaration is not applying. I tried doing s:up and c:f but nothing works.


texts: Magento 2 : At Which Place Final Price of Product is Set for Globally?

texts:
I want to know for Entry point of Product final price calculation, those will be used globally in site like listing page,catalog page, shopping cart page,minicart.

I have to customize for product price, Is there any place we can set price and its used in global.

Where i can find final price of product is set(after special price, catalog/shopping rule if available) in magento 2?

Is there any place where product final price is calculated and its working for magento site Globally in all pages?

Thanks.