texts:
Magento Customer Grid Custom attribute can't export csv and export xml, Showing error, how to add custom attributes to the customer export.

  PHP Fatal error:  Uncaught TypeError: Argument 2 passed to
  Magento\Framework\View\Element\UiComponentFactory::argumentsResolver()
  must be of the type array, null given, called in
  /var/www/Magento/vendor/magento/framework/View/Element/UiComponentFactory.php
  on line 220 and defined in
  /var/www/Magento/vendor/magento/framework/View/Element/UiComponentFactory.php:172\nStack
  trace:\n#0
  /var/www/Magento/vendor/magento/framework/View/Element/UiComponentFactory.php(220):
  Magento\Framework\View\Element\UiComponentFactory->argumentsResolver('customer_clv',
  NULL)\n#1
  /var/www/Magento/vendor/magento/module-ui/Component/Listing/Columns/Column.php(77):
  Magento\Framework\View\Element\UiComponentFactory->create('customer_clv',
  'decimal', Array)\n#2
  /var/www/Magento/vendor/magento/module-ui/Component/MassAction/Filter.php(182):
  Magento\Ui\Component\Listing\Columns\Column->prepare()\n#3
  /var/www/Magento/vendor/magento/module-ui/Component/MassAction/Filter.php(180):
  Magento\Ui\Component\MassAction\Filte in
  /var/www/Magento/vendor/magento/framework/View/Element/UiComponentFactory.php
  on line 172, referer:

  customer_listing.xml file containd below code.

<?xml version="1.0" encoding="UTF-8"?> <!-- /**  * Copyright © Ourmodule. All rights reserved.  *  */
--> <listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <columns name="customer_columns" class="Magento\Customer\Ui\Component\Listing\Columns">

        <column name="customer_clv" class="Ourmodule\Customer\Ui\Component\Listing\Column\Customerclv">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="filter" xsi:type="boolean">true</item>
                    <item name="sorting" xsi:type="string">asc</item>
                    <item name="sortable" xsi:type="boolean">true</item>
                    <item name="editor" xsi:type="string">text</item>
                    <item name="label" xsi:type="string" translate="true">Customer Lifetime Value</item>
                    <item name="sortOrder" xsi:type="number">81</item>
                </item>
            </argument>
        </column>
        <column name="predicted_average_profit" class="Ourmodule\Customer\Ui\Component\Listing\Column\Customerclv">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="filter" xsi:type="boolean">true</item>
                    <item name="sorting" xsi:type="string">asc</item>
                    <item name="sortable" xsi:type="boolean">false</item>
                    <item name="editor" xsi:type="string">text</item>
                    <item name="label" xsi:type="string" translate="true"> Transaction Value</item>
                    <item name="sortOrder" xsi:type="number">82</item>
                </item>
            </argument>
        </column>
        <actionsColumn name="actions" class="Ourmodule\Customer\Ui\Component\Listing\Column\ClvActions">
            <settings>
                <indexField>entity_id</indexField>
            </settings>
        </actionsColumn>

    </columns> </listing>


texts: How can I mass remove categories in “Include in Navigation Menu” in Magento?

texts:
I have added way to many items inside of my subcategories into Magento.

I want to some how keep hold of CTRL+/CMD key or the ALT key or some other method to mass edit them and mass Select the option to NO - I do not want these in the Navigation menu.

I do not want to use MySQL EAV updating approach - there should be a way or plugin to do this through the admin panel I hope ?


texts: How to create a category menu like the one here

texts:
Hi Guys still learning every day how to use Magento. My site is coming along nicely http://www.cellar2door.com but wanted some advice on something I saw on another site.

When I look at this site http://www.reedandbarton.com/serveware/barware-pitchers-accessories and that category I see on the left hand side of the page a menu that you can check boxes to further refine the products you are looking at.

Is this something off the shelf or is it something that has been built specially? If it is off the shelf what would I google to find similar products?

Many thanks.


texts:
I want to catch sales order place after event in Magento 2.

Here is my events.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="sales_order_place_after">
        <observer name="neo_ordercomment_observer_orderneo" instance="Neo\OrderComment\Observer\Orderneo" />
    </event>
</config>

And my observer file is Orderneo file,

<?php

namespace Neo\OrderComment\Observer;

class Orderneo implements \Magento\Framework\Event\ObserverInterface
{
    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $order= $observer->getData('order');
        $comment = $this->getRequest()->getParams('comment');
        print_r("Catched event succssfully !"); exit;
    }
}

But it is not comming to this file,

It should print that last line and then exit. But it is redirecting to Magento's order success page.


texts:
I've created a program to automatically create coupon codes based on certain criteria for a user, the code generation works fine, and I can test that by sending the coupon code in through the URL(like this ?code=34o77134iy3). Copying and pasting that code and then pressing "apply discount"(34o77134iy3 in this case) applies the code correctly, but the code below does not apply it automatically.

$coupon = "34o77134iy3";

Mage::getSingleton('checkout/cart')->getQuote()->getShippingAddress()->setCollectShippingRates(true);
Mage::getSingleton('checkout/cart')->getQuote()->setCouponCode($coupon)->collectTotals()->save();
Mage::getSingleton("checkout/session")->setCartCouponCode($coupon);

Edit: Upon further investigation, the ->collectTotals() line is what is resetting it to nothing.

Dumping ->getCouponCode() gives the coupon code until that is run.

I can also use the post coupon code to apply it but for some reason, I can't use any other method.


texts:
I am new to magento.I am using version 1.9. I want to display filter and category section above listed product of the category in small resolution.

But in my case its occurring vice versa.I am unable to find file from which it has been called.

These are line of code that is appearing in inspect element.
I want to exchange the div's position i-e- first i want to have this "col-sm-6 col-sm-pull-18 em-col-left em-sidebar" and then the other one.
I'm doing a maintenance task so i dont know from which file the main div's are coming.

Can someone tell me how to do it?


texts: How do I get the original SKU of a bundle product in the Magento2 cart?

texts:
I want to add bundle products items in cart with SKU and also want to show only bundle products variant in cart, I didn't want to add main bundle product SKU in cart. Same as like configurable products.
Please help.


texts: Can anyone have any idea of security patch file of SUPEE-9652 V2?

texts:
As i'm unable to find the SUPEE-9652 V2 version related security patch, because of these I'm unable to run another patch i.e, SUPEE-10570, can anyone provide me the solutions For Magento 1.9.x. version

Thanks In Advance.


texts: Magento 2.0 - What determines when a global option is displayed in the product edit form?

texts: I am very new to magento and I am trying to understand what determines when the Custom Stock Status will be an option when editing a product. I only find one file where there is some sort of get attribute text for it and when temporarily making it some custom text and clearing the cache, the label does not update. I think my biggest problem is where to look in the code like what files etc. What code file(s) determine what gets shown when editing a product  (catalog/product/edit/id/1041/) What tables may be involved that determines what Global config settings are to be used? I am not seeing this Global Config at all in the CMS unless I am looking in the wrong place which is totally possible. Please help :)


texts: How to add Qty in add to cart form on Product Listings Page in Magento 2

texts:
How can you add a Qty filed to the the add to cart form on the category listings page.

With the Luma theme the user only has the option to add one product to cart at a time from the product listings page:

Is there a way I can edit the form in my theme at: app/design/frontend/Holy/mytheme/Magento_Catalog/templates/product/list.phtml

<form data-role="tocart-form" action="<?php /* @escapeNotVerified */ echo $postParams['action']; ?>" method="post">
    <input type="hidden" name="product" value="<?php /* @escapeNotVerified */ echo $postParams['data']['product']; ?>">
    <input type="hidden" name="<?php /* @escapeNotVerified */ echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php /* @escapeNotVerified */ echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>">
    <?php echo $block->getBlockHtml('formkey')?>
    <button type="submit"
            title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>"
            class="action tocart primary">
        <?php /* @escapeNotVerified */ echo __('Add to Cart') ?>
    </button>
</form>

For now it would work even if I could just do this for simple products.


texts: Magento 2 - Minified static files not used

texts:
I enabled the setting to minify and merge JS & CSS. When I run static-content:deploy it does generate files with a .min.(css|js) appendage and the file contents are minified.

However, when I load either front end or adminhtml, it is requesting the none minified files.

Anyone know why it’s doing it?

Thanks


texts: Product quantity incremet/decrement on home page

texts:
I have a product collection on home page and there I have put increment and decrement buttons.Buttons are working fine, The problem I am currently facing is the updated new quantity is not showing on cart page.

<form action="<?php echo Mage::helper('checkout/cart')->getAddUrl($a); ?>" method="post" id="product_addtocart_form_<?php echo $a->getId() ?>"<?php if ($a->getOptions()): ?> enctype="multipart/form-data"<?php endif; ?>>

                                                        <?php if (!$a->isGrouped()): ?>

                                                            <a class="minus" id="<?php echo $a->getId() . "minus" ?>" href="javascript:void(0);">-
                                                            <input type="text" name="qty" class="input-text clone-qty" id="qty<?php echo $a->getId() ?>"disabled="true" maxlength="12" value="<?php echo ($a->getStockItem()->getMinSaleQty() ? $a->getStockItem()->getMinSaleQty() : 1) ?>" />
                                                            <a class="plus" id="<?php echo $a->getId() . "plus" ?>"  href="javascript:void(0);">+
                                                        <?php endif; ?>

                                                    <button type="button" class="btn-cart button" onclick="this.form.submit()"><?php echo $this->__('Add') ?></button>
                                                </form>


texts: How to create a custom menu has normal website?

texts: I am creating a magento store and according to the design I need to create a custom menu with custom css,js. So can anyone help me to figure out this. I am new to magento CMS.


texts: Fotorama Reload on AJAX Success Magento 2

texts:
Anyone have idea of the Fotorma Gallery Reload on Product Page on AJAX Success Magento 2. Can anyone help me to guide it?

jQuery(".fotorama").empty();
jQuery(".fotorama--hidden").remove();
jQuery('.fotorama').fotorama({
data: image
});

Image var in json_encoded. Thanks


texts: SOLVED: Tax zones limitation -> Puerto Rico

texts:
Context : Magento CE2.2.0
I have to set up the following tax rules:

customer address in   | B2C     |  B2B
----------------------|---------|---------
France                | VAT 20% | VAT 20%
Euro zone             | VAT 20% | VAT 00%
Rest of the world     | VAT 00% | VAT 00%

The only way I could think of in Magento 2.2 (without messing up with modules) is to
- set tax calculation on customer billing address
- upload the tax zones in csv

I set up the csv with the required lines:

one line for france
2 lines for euro zone (B2C, B2B)
one line for any other country

Total is roughtly 270 lines ; Only the first 200 manage to be uploaded in magento. I swapped lines in my csv: confirm that only the first 200 lines are processed.

My questions:

how to make magento handle more than 200 tax zones?
This limit feels arbitrary: is it set as a parameter somewhere?
is there a way to wildcard the country (I could have only 1 line for "rest of the world)

All suggestions are welcome

EDIT/SOLVED: I had Puerto Rico 'PR' in my csv file. It matters not the position of this line, it jammed the import after 200 lines.
Once removed, the import is processed beyond the 200th line.


texts: Get the Product Count on Category with only In-Stock Status

texts: How to get the product count in a certain category with the product status of in-stock only?


texts: How is it possible to output the current store name in a Magento 2 custom template with a custom block?


texts:
I am wondering what would cause a form post to always post empty? However when I take the same html form outside of magento and put into a plain php page the form post works? Here is my form code

 <form class="form subscribe" action="./newsletter_signup_success" method="post">

                <input name="eaddr" type="email" id="footer_newsletter" placeholder="Sign Up & Save 15%"/>

            <button class="action subscribe primary" title="<?php echo __('Subscribe') ?>" type="submit">
                <?php echo __('Subscribe') ?>
            </button>

 </form>

Then the  index.php file which is outside magento 2.1 in a folder called newsletter_signup_success I have this code

<?php
   $emailaddr = $_POST['eaddr'];
    print_r($HTTP_POST_VARS);
   echo " $emailaddr";
?>


texts: Magento 2 cache warmer for all customer groups

texts:
I am creating cache warmer extension for Magento 2.

The main logic that I am using is: A cronjob will get all the URLs from url_rewrite table and crawl every URL using curl calls.

The issue that I am facing is, Magento creates separate cache for all the customer groups, and I need to crawl all the pages along with all the groups.

My question is, how can I crawl a page using curl by using General group and Not Loggedin group?


texts: Magento 2 : After changing DocumentRoot Magento 2.1.16 is not installing

texts:
I have face some issue How can i resolve it ?

I have try to use multiple xampp for use multiple versions of php

  like php5.6, php7.0., php7.1., php7.2., php7.3.

So i have install portable versions of xampp

D:\xampp56
D:\xampp70
D:\xampp71
D:\xampp72

I have change DocumentRoot inside

  httpd.conf from the location D:/xampp*/apache/conf

form

  D:/xampp*/htdocs

to

  E:/Projects

But i have facing some Error in Magento 2 installation

  'http://127.0.0.1/mage231/setup/index.php/session/prolong' return 'success:false'

Now how can i resolve it ?


texts: Magento 2.3 - How to bulk import attributes values?

texts: What is the best practice to bulk import attributes values. How to do it by hit tables?


texts:
I registered a theme but then I deleted it. I want to get default luma theme back online as it was before but Magento 2 is still trying to get that theme that I registered before. What should I do?
Thanks for any help in advance.


texts:
Problem: Some Customer (< 0.5%) got stuck in an endless loop if they visit our Shop (v1.9.2.4) or add a Product to cart. If the Customer delete the Cookies, everything works fine.

Because I can't reproduce the Problem on my local Maschine, I wrote a Script which do a curl Requests with every single session_id and log all 5xx errors.
With this Method I got a couple "bad" sessions and trace down a loop with xdebug. I figured out, that the endless loop appears if the flag sales_flat_quote.trigger_recollect is set to 1.

  app/code/core/Mage/Sales/Model/Quote.php:1375

protected function _afterLoad()
{
    // collect totals and save me, if required
    if (1 == $this->getData('trigger_recollect')) {
        $this->collectTotals()->save();
    }
    return parent::_afterLoad();
}

Trace of the Loop:

The third-party Module Idev_OneStepCheckout listen to sales_quote_collect_totals_before and Call Mage::helper('payment')->getStoreMethods($store, $quote)
This Helper Call the method getConfigData() by a dynamic Model from the current Payment Methods. Module: Payone_Core
getConfig() call another Method which trigger the collectTotals()

A classic infinity Observer loop.

My first approach was to figure out where Magento set trigger_recollect to 1.

  $ grep -nre "trigger_recollect\|triggerRecollect" --ignore-case

I found this two places:

  app/code/core/Mage/Sales/Model/Resource/Quote.php:207
  app/code/core/Mage/Sales/Model/Resource/Quote.php:282

Magento only call this Methods if you have Catalog Price Rules and change the affected Products. Then all quotes with this Product got the trigger_recollect flag.
But we don't have any Price Rules and the Problem appears for new customer without a existing Quote, too.

Because of this two functions, I'm not longer sure if the specific loop is the result of the flag and this is very frustrating, because I can't explain why the trigger_recollect is set.

All logs (Magento, Nginx, PHP) are empty. Except this message:

  Maximum execution time of 30 seconds exceeded

What I also tried was to compare the raw Data of a "normal" Session and a "bad" Session. Both are exactly the same.

A quick and dirty fix would be to rewrite two third party modules, and pass the quote through all method the prevent the getQuote() call, but there should be a reason why Magento set thetrigger_recollect flag or new customer git stuck, too.

Does anybody has a solution or an idea what i can also try or check?


texts: Add Filter to magento 2 category product collection

texts:
a similar problem.
If i want filter product collection, create plugin for Layer (if use event the result will be the same).

The collection is correct and show only 2 products.
But the Pagination order Category Filter show 9 Products.

Why??


texts: Back in stock alert email isn't translated (Magento 2)

texts:
In a new Magento 2 setup I'm testing the back in stock alert email, but the text in the email isn't translated. I'm using the dutch translation package of magento2translations, this contains the text from the email, but the email is still in English.

In magento/module-product-alert/view/frontend/templates/email/stock.phtml is the text located. It is using the default translation functionality of Magento:

<?= __('In stock alert! We wanted you to know that these products are now available:') ?>

The email looks like this:

Does anyone have this problem too? Or does anyone know a solution?


texts: Magento 2 - Dynamic Product Image Magnifier

texts: I want to add magnifier with settings of top position,left position ,width and height to setup and show magnifier accordingly to settings when hovered on image.


texts: Loaded product missing media_gallery attribute

texts:
I am loading a product like so:

$product = Mage::getModel('catalog/product')->loadByAttribute('sku', 'MyStockCode');

Then I try to get the images using:

$existingGallery = $product->getMediaGallery('images');

but it comes back with a null value. When inspecting _data against $product the media_gallery attribute is missing.

From all the references I have read, this is how to load the images against a product but this doesn't seem to be working for me.

Notes:

I can see the images in the admin area against that product so they are definitely there.

I am doing this in the admin area, not frontend.


texts: Fedex 'Ground' shipping method not showing in frontend

texts:
I am on Magento Enterprise ver. 1.12.0.2

I enabled Fedex 'first standard overnight', '2 day', 'smart post', 'ground', and 'international economy' in the Admin for my demo site.

The only shipping methods that are showing when I go to checkout in the frontend are first standard overnight, 2 day and smart post.

Why aren't ground and international economy showing up as shipping methods in checkout?


texts: Wrong product image in sales order email in production mode - Magento2.3.5

texts:
We use the following code to load the product image in the sales order email.
This works perfect in developer mode, but when we switch to production mode the images are not correct for those who do not got any image.
In that case the product that does not have any image, not the placeholder is shown as you should expect, but the same productimage as the product above is displayed.
The next product in line that does have any image, that is then displayed well.
See:

How can we solve this?
Template: /app/design/frontend/theme/theme/Magento_Sales/templates/email/items/invoice/default.phtml
CODE:
<?php $_item = $block->getItem()
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$product_id = $_item->getProductId();
$product = $objectManager->get('Magento\Catalog\Model\Product')->load($product_id);
$_imagehelper = $objectManager->get('Magento\Catalog\Helper\Image');
$image_url = $_imagehelper->init($product, 'cart_page_product_thumbnail')->getUrl();?>

<img src="<?= $image_url;?>"


texts:
i wanna remove footer container and create new footer but it does not work.
this is my code

     <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceBlock name="logo">
        <arguments>
            <argument name="logo_file" xsi:type="string">image/logo.png</argument>
        </arguments>
    </referenceBlock>

    <referenceBlock name="report.bugs" remove="true"/>

    <referenceContainer name="footer" remove="true"/>
    <container name="footer" htmlTag="div"/>
    <referenceContainer name="footer">
            <block class="_\_\Block\Account\Verify" name="verify_mobile_phone" template="_-_::account/verify_form.phtml"/>
    </referenceContainer>
</body>


texts:
I am using magento2.1
If I am using class="validate-one-required-by-name and validate-select" it's not working.

<div class="control" style="margin:10px">
<select id="myselect" name="mySelect" class="validate-one-required-by-name" title="<?php /* @escapeNotVerified */ echo __('Requested Type') ?>">
<option value="choose"><?php /* @escapeNotVerified */ echo __('Please Select Options.') ?></option>
<option value="1">Test</option>
<option value="2">Test two</option>
<option value="3">Test Three</option>
<option value="4">Test Four</option>
</select>
</div>

Thank You


texts: Is it possible to use Magento 2.4 with Elasticsearch 6?

texts:
I know that Elasticsearch 6 is deprecated and we're supposed to use 7.6 or above, but I just went through the process of updating, only to find that my host (Cloudways) doesn't provide access to Elasticsearch 7 (yet), and don't provide root access, so I can't add it myself.
Is there a way to do some sort of workaround to make it work for a couple of weeks, or do I have to just stash my work on its current branch, and revisit this upgrade in a few weeks?
Thanks


texts:
How would i create a dropdown attribute option if it does not already exist for an attribute?

For example, the following will not work correctly if the option values do not exist:

$productColors = array('sku_1' => 'red','sku_2' => 'blue','sku_3' => 'green');

foreach($productColors as $sku => $color) {
    $product = Mage::getModel('catalog/product')->loadByAttribute('sku', $sku);

    $product->setData('color', $color)->save(); // This wont work if that option value is not alaready created

}

I now need a way to ensure the value is set properly


texts:
once I tried to add image to product (and save it ofc) I got this error:

  PDOException: SQLSTATE[23000]: Integrity constraint violation: 1452
  Cannot add or update a child row: a foreign key constraint fails
  (magento.catalog_product_entity_media_gallery_value, CONSTRAINT
  CAT_PRD_ENTT_MDA_GLR_VAL_VAL_ID_CAT_PRD_ENTT_MDA_GLR_VAL_ID FOREIGN
  KEY (value_id) REFERENCES `catalog_product_entity_med) in
  /var/www/domain/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:228

Until this time If I add image to product at backend it save successfully and I am able to see it in backend and frontend.
However image is disappearing after few sec.

In exception.log I got this message:

  main.CRITICAL: Magento\Framework\Exception\InputException: The image
  content is not valid. in
  /var/www/domain/vendor/magento/module-catalog/Model/ProductRepository.php:470

and sometimes:

  main.WARNING: Magento\Framework\Exception\FileSystemException: Cannot
  gather stats! Warning!stat(): stat failed for
  /var/www/domain/pub/media/catalog/product/n/e/image_name.jpg
  in
  /var/www/domain/vendor/magento/framework/Filesystem/Driver/File.php:71

I checked values of catalog_product_entity_media_galery and catalog_product_entity_media_galery_value right after add image and save product -> everything was fine. But for while it just disappear.
Tried with few products and few different images.

It happened on production. Can not reproduce on Local and QA.

Magento 2.1.7
PHP 7.0.20


texts: _origData is null for some models in Magento 2 before or after save

texts:
Let's get a customer save process from the admin panel as an example. We have an event observer for model_save_before and trying to get a set of values for the model that have been changed upon the saving process.
On the customer model load in \Magento\Framework\Model\AbstractModel::load we have a correct value in the model's _origData property. However, during the saving process the system goes through \Magento\Customer\Model\ResourceModel\CustomerRepository::save and we have the customer model with _origData property empty in the model_save_before (or even model_save_after) event observer after. Is there some way to get the customer's _origData somehow and don't have it cleared in the middle of the saving process?
Thanks.


texts: Magento 2: Process of adding custom data to an order

texts:
I would like to add some custom content to orders. When I started out, I thought I needed to create two new columns in the quote table and orders table and then add the custom data to the quote table and then add the content to the order table once the order was complete. However, I've subsequently read on a couple of posts that the data in the quote table is automatically moved over to the orders table.

I've tried to find documentation on the process of adding custom data to an quote/order, but I can't find anything. Does anyone have any resource, or could point me in the right direction, for me to learn how to add custom data to an order properly?


texts: Why can I not create a new home page in Magento 2?

texts:
I am on Magento 2.1.7 community edition and did the composer migration. I have created a page in Magento 2 that I would like to use as my homepage. When I change the homepage to one created in Magento 2 it says "There was no Home CMS page configured or found."  I created multiple pages in Magento 2 to see if any of them could be the homepage and they could not. I have made sure all fields are filled out and the page is enabled.

Edit: Want to add I have flushed cache multiple times.


texts: Shopping cart price rules , ignore conditions?

texts:
I have Magento 1.8.1
I am really desperate with this issue i try to set a shopping cart rule but , when i put a condition , only for SKU: XXX or only when total of cart is XX , it ignore the condition and make the discount for all orders and all products.. someone can help me?

Thank you very much !


texts: Why are there duplicate products exported with a different store view?

texts:
Why are duplicate product entries are exported from a magento 2 install that's data was migrated from magento 1?

The duplicate entries of products don't have names and some other attributes but they have a store_view_code.

The correct products, with all attributes don't have a store_view_code set. Probably global scope.


texts:
I'd like to add mass action column in CMS->Blocks only via observer, and not to overwrite blocks.. ok, so far I have this:

code:

I'm targeting this event:

<events>
  <core_block_abstract_prepare_layout_before>
    <observers>
      <core_block_abstract_prepare_layout_before_handler>
        <type>singleton</type>
        <class>masspages/observer</class>
        <method>addMassAction</method>
        <args></args>
      </core_block_abstract_prepare_layout_before_handler>
    </observers>
  </core_block_abstract_prepare_layout_before>
</events>

and observer code for test col is:

public function addMassAction(Varien_Event_Observer $observer)
{
    $block = $observer->getEvent()->getBlock();

    if ($block instanceof Mage_Adminhtml_Block_Cms_Block_Grid) {

        $block->addColumn('block_id', array(
            'header' => 'My title',
            'index' => 'block_id',
        ));
    }
}

}

I have tried to put function _prepareMassaction() somewhere,, but how to call it makes me puzzled??


texts: Magento 2.2.5 : Save Catalog Rule Conditions

texts:
I am trying to save catalog rule condtions from my custom module, below is the array I get in my controller save.php

[rule] => Array
    (
        [conditions] => Array
            (
                [1] => Array
                    (
                        [type] => Magento\CatalogRule\Model\Rule\Condition\Combine
                        [aggregator] => all
                        [value] => 1
                        [new_child] =>
                    )

                [1--1] => Array
                    (
                        [type] => Magento\CatalogRule\Model\Rule\Condition\Product
                        [attribute] => attribute_set_id
                        [operator] => ==
                        [value] => 4
                    )

            )

    )

The array is further modified to conditions by doing:

if (isset($data['rule'])) {
                $data['conditions'] = $data['rule']['conditions'];
                unset($data['rule']);
            }

My database table column for conditions is conditions_serialized as it is in catalogrule table. Now my question is what are the steps I am missing in between -- because when I save a record I get the error:

  Something went wrong while saving the record !

Any one who has implemented this might be having a better insight in to the problem , please advise .


texts: How to add checkbox in checkout page above subtotal in magento 2

texts:
I have added a js in Magestore/OneStepCheckout/view/frontend/web/js/
customtemplate.js

define(
    [
        'ko',
        'uiComponent'
    ],
    function (ko, Component) {
        "use strict";

        return Component.extend({
            alert('load custom template');
            defaults: {
                template: 'Magestore_OneStepCheckout/customtemplate'
            },
            isChosed: function() {
             if ($('#education').is(":checked"))
                {
                 alert('education');
                }
            if ($('#health').is(":checked"))
                {
                 alert('health');
                }
            if ($('#environment').is(":checked"))
                {
                 alert('environment');
                }
            }
        });
    }
);

Magestore/OneStepCheckout/view/frontend/web/template/customtemplate.html

                                            <input type="checkbox" name="education" data-bind="checked: isChosed, attr: {id: 'education'}" />

                                            <input type="checkbox" name="health" data-bind="checked: isChosed, attr: {id: 'health'}" />

                                            <input type="checkbox" name="environment" data-bind="checked: isChosed, attr: {id: 'environment'}"/>

add js and template in
Magestore/OneStepCheckout/view/frontend/layout/onestepcheckout_layout.xml

<item name="custom-template" xsi:type="array">
                                                    <item name="provider" xsi:type="string">checkoutProvider</item>
                                                    <item name="component" xsi:type="string">Magestore_OneStepCheckout/js/view/customtemplate</item>
                                                    <item name="template" xsi:type="string">Magestore_OneStepCheckout/customtemplate</item>
                                                    <item name="displayArea" xsi:type="string">shipping-method</item>
                                                    <item name="children" xsi:type="array">
                                                    </item>
                                                </item>

i am getting error in console
Failed to load the "Magestore_OneStepCheckout/js/view/customtemplate" component.


texts: addNoticeMessage Vs addNotice : how pass URL in message with new function

texts:
I wanted to add notice to page with URL
 $this->messageManager->addNoticeMessage(
                __(
                    'Go to my account,  My account',
                    $this->urlInterface->getUrl('customer/account/')
                )
            );

But this gives

Previously I was using addNotice (Its deprecated now so wanted to replace it it with addNoticeMessage )
$this->messageManager->addNotice(
        __(
            'Go to my account,  My account',
            $this->urlInterface->getUrl('customer/account/')
        )
    );

it was giving desired result

How can pass URL in new addNoticeMessage


texts: Magento 2:"TypeError: Argument 1 passed to Test\HelloMagento\Plugin\ExamplePlugin::beforeSetTitle()

texts:
di.xml

 <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
    <type name="Test\HelloMagento\Controller\Index\Example">
        <plugin name="Test_HelloMagento_Plugin" type="Test\HelloMagento\Plugin\ExamplePlugin"  />
    </type>
</config>

ExamplePlugin.php

namespace Test\HelloMagento\Plugin;

class ExamplePlugin
{

    public function beforeSetTitle(Test\HelloMagento\Controller\Index\Example $subject, $title)
    {
        $title = $title . " to ";
        echo __METHOD__ . "</br>";

        return [$title];
    }}

Example.php

<?php

namespace Test\HelloMagento\Controller\Index;

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

    protected $title;

    public function execute()
    {
        echo $this->setTitle('Welcome Plugin example');
        echo $this->getTitle();
    }

    public function setTitle($title)
    {
        return $this->title = $title;
    }

    public function getTitle()
    {
        return $this->title;
    }
}

Im getting the below error.

  Fatal error: Uncaught TypeError: Argument 1 passed to
  Test\HelloMagento\Plugin\ExamplePlugin::beforeSetTitle() must be an
  instance of
  Test\HelloMagento\Plugin\Test\HelloMagento\Controller\Index\Example,
  instance of Test\HelloMagento\Controller\Index\Example\Interceptor
  given, called in
  C:\xampp\htdocs\test\vendor\magento\framework\Interception\Interceptor.php
  on line 123 and defined in
  C:\xampp\htdocs\test\app\code\Test\HelloMagento\Plugin\ExamplePlugin.php:8

I am a beginner. Please help.


texts:
I use Magento 1.8 and I won't to add a dropdown selection in my city field in checkout.
Make shipping only in certain cities, if I already have a selection of those available can better manage shipments.


texts: Form Error - Click Send on Subdomain and redirects to Main Domain

texts:
After filling a form and clink send on www.domain.com/subdomain/page
it goes to www.domain.com/contacts/index/post - 404 Not Found error.

How I can fix the redirect link to go to www.domain.com/subdomain/contacts/index/post?

It's happening on every subdomain forms.


texts: Move Magento currency switcher to the left of the product price

texts:
My store runs on Magento 1.942

I want to move the currency switcher from the top to the left of the product price. I tried searching on google for a long time and couldn't find a way. Please help me?


texts: How to manage a product attributes while adding/editing a product?

texts:
I have created 2 attributes for my products, attribute1 and attribute2, both are multi-select dropdowns.
What I wanted to achieve is that the second attribute values changes based on the options selected in the first attribute.

Suppose in attribute1 some abc is selected, in attribute2 some 'asa','asd','asd' these should be available. something like City and Area. If a particular city is selected, the area in that city should be listed there in 2nd dropdown.

I have a separate table for all the links between these attributes.

Layout File(catalog_product_edit);

<?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">
    <body>
        <referenceContainer name="content">
            <block class="Vendor\Module\Block\Adminhtml\Catalog\Product\Edit\Myfle"
                    name="module_block_adminhtml_catalog_product_edit_myfile"
                    template="Vendor_Module::module_product_dw.phtml">
            </block>
        </referenceContainer>
    </body>
</page>

Block File:

<?php
namespace Vendor\Module\Block\Adminhtml\Catalog\Product\Edit\Myfile;
class Myfile extends \Magento\Backend\Block\Template
{
    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        array $data = [] )
    {
        $this->urlBuilder = $context->getUrlBuilder();
        parent::__construct($context, $data);
    }
}

All are the files and folder structure is correct? coz am getting a strange error Parse error: syntax error, unexpected 'class' (T_CLASS) in ......./Block/Adminhtml/Catalog/Product/Edit/Myfile.php on line 7

Note: PHP version is fine(5.6). And also Other blocks loaded without any problem.

Am stuck here.Please help how to do this?


texts: Magento 2.3.X: No such entity with customerId = 259340

texts:
I am getting following error on every page after login.

I am using the magento2.3.2.

main.CRITICAL: No such entity with customerId = 259340


texts:
I am using Magento 1.9.0.1 and i want to export the products along with the related products in the csv.In the magento export sheet i am not getting the related products column.

I had googled but not got success.


texts: how to get product specific attribute codes & values using raw sql query?

texts:
The following query will give product all attribute codes & values.but I want specific attributes.and i want to store that result into one table.the table format like flat catalog product table.

Note:question is updated.

$query = "SELECT    ce.sku,
       ea.attribute_code,
       CASE ea.backend_type
          WHEN 'varchar' THEN ce_varchar.value
          WHEN 'int' THEN ce_int.value
          WHEN 'text' THEN ce_text.value
          WHEN 'decimal' THEN ce_decimal.value
          WHEN 'datetime' THEN ce_datetime.value
          ELSE ea.backend_type
       END AS value
   FROM (select sku ,entity_type_id,entity_id from catalog_product_entity where type_id='simple' limit $limit,$offset ) AS ce
   LEFT JOIN eav_attribute AS ea
       ON ce.entity_type_id = ea.entity_type_id
   LEFT JOIN catalog_product_entity_varchar AS ce_varchar
       ON ce.entity_id = ce_varchar.entity_id
       AND ea.attribute_id = ce_varchar.attribute_id
       AND ea.backend_type = 'varchar'
   LEFT JOIN catalog_product_entity_int AS ce_int
       ON ce.entity_id = ce_int.entity_id
       AND ea.attribute_id = ce_int.attribute_id
       AND ea.backend_type = 'int'
   LEFT JOIN catalog_product_entity_text AS ce_text
       ON ce.entity_id = ce_text.entity_id
       AND ea.attribute_id = ce_text.attribute_id
       AND ea.backend_type = 'text'
   LEFT JOIN catalog_product_entity_decimal AS ce_decimal
       ON ce.entity_id = ce_decimal.entity_id
       AND ea.attribute_id = ce_decimal.attribute_id
       AND ea.backend_type = 'decimal'
   LEFT JOIN catalog_product_entity_datetime AS ce_datetime
       ON ce.entity_id = ce_datetime.entity_id
       AND ea.attribute_id = ce_datetime.attribute_id
       AND ea.backend_type = 'datetime'";


texts: How to remove ?___store= from hreflang url?

texts:
<?php foreach (Mage::app()->getWebsites() as $website) {
    foreach ($website->getGroups() as $group) {
        $stores = $group->getStores();
        foreach ($stores as $store) {
            $storeCode = $store->getCode();
            echo '<link rel="alternate" hreflang="' . $storeCode . '" href="' . $store->getCurrentUrl(false) . '"/>' . "\n";
        }
    } } ?>

This produces, for example,

<link rel="alternate" hreflang="en_ca" href="http://mywebsite.com/en/?___store=en_ca">

But I want to remove ?___store=en_ca part.

I tried replacing:

$this->_href = $this->_href . $symbol . "___store=" . $store->getCode();

into:

$this->_href = $this->_href;

in app/code/core/Mage/Catalog/Block/Widget/Link.php

But didn't work.

How can I achieve this?


texts: How to increase customer login page captcha size(width,height) programmatically?

texts:
I am trying to  increase customer login page capcha size(width,height)
  programmatically magento 2?


texts: How to Configure Selectable weight to a product

texts: Can anyone tell me how can we add selectable weight for the product like 50gms,1 kg.


texts: Magento2: How to create custom API to get all product details of specific category?

texts:
Magento2 : I checked the list of Magento2 open source. I followed the below API:
/V1/categories/:categoryId/products

But this API giving only SKU, Position and Category ID of specific product. I want to fetch all the product details, like name,product description, price, tax details,image,etc.
I have created custom API module, But I stucked in get and set methods of product attribute which I wanted to get in response.


texts: What permissions should I give /var and /media?

texts: I understand that magento says to have /var and /media at 700 for folders and 600 for files but when I do this, it breaks certain parts of my site. I am curious to see what permissions most people use for these folders.


texts: How to not remove layered navigation options (which are removed after selecting other filter)

texts:
My question might be unclear. So first here is an example in this page   From Shoe type when i select sandles, two of color filter options disappears from Color Type. which i want not to disappear instead i want them to be there with disabled.

What i have pointed is, on Mage_Catalog_Block_Layer_Filter getItems() method is returning filter items.


texts: Echo custom attribute if another custom attribute is empty

texts:
I show product reviews based on SKU. what I want is to use the sku of an attribute but if that attribute is empty use another.

For Example:

echo $_product->getwildcardSKU_attribute
if( wildcardSKU_attribute = empty ){
echo $_product->getSKU_attribute
}

I know my code makes no sense but it is just an example.

This is the code I need to use it in.

<?php echo $this->__('<img src="https://www.someURL.com=' . $_product->getwildcardsku() . '" alt="">') ?>


texts: Seperate Shipping Rate for Certain Items Based On Order Value

texts:
I need to set up a separate shipping rate for bulky items based on the total order value

For example total order value of bulky items is less than $1,000 shipping is $100
Order value is between $1,000 - 1,500 shipping is $150

How can i do this and still leave the shipping rates for the other products the same


texts: Magento 2: Add Customer Attribute to Prevent Fastly Full Page Cache in Category and Product Page

texts:
I have a site in Magento Cloud with Fastly configured to Full Page Cache and B2B Extension. I use Shared Catalogs and Customer Groups to restrict Categories and products, adding products to Shared Catalog and using Category Permissions. To be clear, right now, when the customer Logged In, the categories and products they see are the ones assigned to their respectively shared catalog. It works perfectly right now without a problem.
However, I now need to apply a second filter by a Customer Attribute. Specifically, the Customer is assigned to one Physical Store, and the Product could also be assigned to the various Physical Stores. The requirement is that customers can't see products that are not assigned to their Physical Store, Even though it's assigned to their Customer Group/Shared Catalog.
I made a code to do that filter with a custom customer attribute and a custom product attribute. But I now have a problem with the full page cache. When a customer enters the site the first time, the category page they see is cached, and the second customer who enters with the same Customer Group sees the same category and does not enter my code by the Cache.
How can I add the custom customer attribute that stores the Physical Store to the cache?
I don't if I expressed well. I intend that the full page cache cached the combination of Customer Group + Physical Store. When other customers with the same Customer Group + Physical Store enter, they can see the cached page. Still, another customer with the same customer group but another Physical Store enters and sees another catalog.
Any idea how can I do that?


texts:
I wanted to delete the test and cancelled orders from magento but all the codes I found didn't work on 1.9.0 and onwards. So on test site I deleted those orders through phpmyadmin. Is that the correct way?

DELETE FROM sql_flat_rate
WHERE order_id=1;

The script I tried was this one:

require 'app/Mage.php';
Mage::app('admin')->setUseSessionInUrl(false);
//replace your own orders numbers here:
$test_order_ids = [
    '100000001',
    '100000002',
    '100000003',
    '100000111',
    '100000112',
    '100000199',
];
foreach ($test_order_ids as $id) {
    try {
        Mage::getModel('sales/order')->loadByIncrementId($id)->delete();
        echo "order #" . $id . " is removed" . PHP_EOL;
    } catch (Exception $e) {
        echo "order #" . $id . " could not be remvoved: " . $e->getMessage() . PHP_EOL;
    }
}
echo "complete."


texts: Magento soap api not working on secure url

texts:
I have facing issue on Magento soap api connection whenever try  to use  https  as secure url..

My magento  system verson CE 1.7 and soap version 1.

System  Url setup is

Secure url is  https://www.example.com/
Unsecured  is  http://www.example.com/'

When i am changed secure to http://www.example.com/(With out https)

Then the soap client is working properly.

Also,when secure is https://www.example.com ,it
throw below error:

  SOAP-ERROR: Parsing WSDL: Couldn't load from
  'https://www.example.com/index.php/api/soap/index/?wsdl' : failed to
  load external entity
  "https://www.example.com/index.php/api/soap/index/?wsdl"

My code is

try{

$cli = new SoapClient('http://www.example.com/index.php/api/soap/index/?wsdl');
$session = $cli->login('marketplace_usr', 'ezvendorplus');
$result = $cli->call($session, 'catalog_product.info', 10887);
var_dump($result);
}
catch(Exception $e){
    echo '<pre>';
    var_dump($e);
    }


texts: BelVG Free Facebook Like: No Like Button

texts:
Disclaimer: I am woefully behind the times when it comes to social/Facebook integrations. i.e. I don't know what I don't know, so my apologies if this is a simple obvious thing.

I've installed the Facebook Connect and Like Free extension from Magento connect. With this extension enabled, I can see the following HTML code on the catalog_product_view page.

<fb:like href="http://magento-1-9-0-0.dev/test/test-product.html" layout="standart" show_faces="false" width="450"  colorscheme="light"></fb:like>

However — no Facebook like button is rendered on my page.  I've placed some Start and End debugging around the section of PHP which renders this

<?php if($this->helper('facebookfree/active')->isActiveLike()):?>
Start
<fb:like href="<?php echo $this->helper('core/url')->getCurrentUrl()?>" layout="<?php echo $this->helper('facebookfree/active')->getLikeLayout()?>" show_faces="<?php echo $this->helper('facebookfree/active')->isFacesLikeActive()?>" width="<?php echo $this->helper('facebookfree/active')->getLikeWidth()?>"  colorscheme="<?php echo $this->helper('facebookfree/active')->getLikeColor()?>"></fb:like>
End
<?php endif?>

And nothing shows up between those words in my browser.

I know/assume fb:like isn't a standard HTML element, but what's supposed to render this as an actual like link?

I was getting an error in my console about the URL not matching my facebook application's URL settings, but I corrected that.

This is a stock, non production system with a mostly fresh install of 1.9 CE.  It's also running from a local development instance on my laptop.

Also, if I let the page sit there for 45 seconds, I get the following error in my javascript console.

  fb:like failed to resize in 45s


texts: Requirejs urlArgs paramater in the requirejs-config.js file redirects all the min.js file requests to full .js file urls

texts: I have enabled the production mode in my Magento 2.2.4 version, disabled the static sign functionality and added the parameter: urlArgs:"version='test'" in requirejs-config.js file. I have enabled the minify js functionality from the backend of Magento 2 . If i do not add this parameter all the dependency are loaded without any issues with the .min.js suffix, but once i added that parameter for cache busting functionality, all the dependency are loading with .js suffix and ignoring the .min.js files. I am unable to find the solution for this, can anyone please suggest me a solution for it?


texts: How to write database integration tests?

texts:
I know how to test methods that return some values - that is basic unit testing, but what if I want to test methods that enter values to database. I have found this post, that says integration test are right for that?

Also I have found this blog post. Where is example how to write integration tests, to test category and product creation. It uses $this->dispatch() method to get page content from url.

My question is: I have not fount any examples how to write integration tests, which would test database entries that are not displayed in front-end or back-end. Can anyone please post any example codes (I am beginner at Test Driven Development)?

Background: I am trying to write module, that uses previously stored data from database (functions ran by cron are using the data).


texts: Set title tag on Product thumb images Magento2.1

texts:
As suggested by our SEO guys, they wanted to show title tag on product detail page's thumb images. I am able to manage other image's title tags on the same page but not able to set title tag here. Here is screenshot for more idea. http://nimb.ws/hX74Fr

Following files I have modified and added title but no luck.

/vendor/magento/module-catalog/Block/Product/View/Gallery.php

getGalleryImagesJson() function, added title tag

/vendor/magento/module-configurable-product/Helper/Data.php

getOptions($currentProduct, $allowedProducts) function, added title tag.

I assume above files and willing to override if these are the files only. Any help will be highly appreciated.

Thanks in advance.


texts: Short array syntax must be used to define arrays Use ::class notation instead

texts:
I had things like that
  90 | WARNING | [ ] Use ::class notation instead.
  92 | WARNING | [x] Short array syntax must be used to define arrays
  94 | WARNING | [ ] Use ::class notation instead.
  96 | WARNING | [x] Short array syntax must be used to define arrays
  98 | WARNING | [ ] Use ::class notation instead.
 100 | WARNING | [x] Short array syntax must be used to define arrays
 102 | WARNING | [ ] Use ::class notation instead.

'value' => array(
    array(
        'label' => __('Is New (by a period)'),
        'value' => 'Amasty\Xlanding\Model\Rule\Condition\IsNewByPeriod',
    ),
    array(
        'label' => __('Is New (by \'is_new\' attribute)'),
        'value' => 'Amasty\Xlanding\Model\Rule\Condition\IsNew',
    ),
    array(
        'label' => __('Created (in days)'),
        'value' => 'Amasty\Xlanding\Model\Rule\Condition\Created',
    ),
    array(
        'label' => __('In Stock'),
        'value' => 'Amasty\Xlanding\Model\Rule\Condition\InStock',
    )
);

and modified them like that
[
    'label' => __('Is New (by a period)'),
    'value' => 'Amasty\Xlanding\Model\Rule\Condition\IsNewByPeriod',
],
[
    'label' => __('Is New (by \'is_new\' attribute)'),
    'value' => 'Amasty\Xlanding\Model\Rule\Condition\IsNew',
],
[
    'label' => __('Created (in days)'),
    'value' => 'Amasty\Xlanding\Model\Rule\Condition\Created',
],

but still have those warnings and can't pass pipeline
  88 | WARNING | [ ] Use ::class notation instead.
  92 | WARNING | [ ] Use ::class notation instead.
  96 | WARNING | [ ] Use ::class notation instead.

how can I fix this?


texts: How to get all select items options from order object

texts:
I am using a custom extension with an sales_order_save_after event.
The Method gets an observer objects from which I can get the order instance.
I am listing then the products using

$items=$order->getAllVisibleItems();
foreach ($items as  $id=>$item){
  $product = Mage::getModel('catalog/product')->load($item->getProductId());
  $selectedAttributes = ???
 ...
}

How can I get the list (including names & values) of selected Product attributes?


texts: Geo IP based store view selection with Varnish

texts:
I have a Magento site with two store views where the store is determined by geo IP (as long as no store cookie is explicitly set). This is done by setting the environment variable MAGE_RUN_CODE in index.php before the Magento application gets initialized:

/* Store redirect based on geo IP, only if store cookie is not set */
if (!isset($_COOKIE['store'])) {
    $cookieExpire = time() + 60 * 60 * 24 * 3;

    $storeCodes = array();
    foreach (Mage::app()->getStores() as $_store) {
        $storeCodes[] = $_store->getCode();
    }

    $geoip = new Sandfox_GeoIP_Model_Country;
    $geoipCountryCode = $geoip->getCountry();
    $geoipCountryCode = strtolower($geoipCountryCode);

    if (in_array($geoipCountryCode, $storeCodes)) {
        setcookie('store', $geoipCountryCode, $cookieExpire, '/');
        $_SERVER['MAGE_RUN_CODE'] = $geoipCountryCode;
    }
}

This works well until I enable Varnish (using the Turpentine extension).

users will receive the page from cache on first visit
the content of the cache is determined by the IP of the first visitor for each page

I can imagine a solution with a custom VCL, but unfortunately I cannot change it and have to use the default one from Turpentine.

So what I need is a way to bypass Varnish for every new visitor, determine their store view based on the IP and then serve the cached page for this store view.

Any ideas?


texts: How can i get Attributes Values on sales_flat_order_grid after insert new custom column

texts:
I have insert column: warehouse in sales_flat_order_grid.[And also created attributes with values] After added how can i get the attributes values,

 //workout
 $this->addColumn('warehouse', array(
        'header' => Mage::helper('sales')->__('Warehouse'),
        'index' => 'warehouse',
        'type'  => 'options',
        'width' => '70px',

        'options' => Mage::getSingleton('eav/config')->getAttribute('catalog_product', 'warehouse'),

    ));

How to solve the error?


texts:
I am trying to send a custom mail template. I followed this article. It is working but the emails are all blank. Any Suggestions?

EDIT:
Now after rechecking mail is not blank anymore. But, current problem I am facing is I am sending mail from arabic store and my mail is in arabic language. But the text in the mail received is not in arabic due to some encoding problems. Can anyone tell me how to fix my mail encoding?


texts:
ive followed these instructions and added this code to my layout XML on the homepage:

<reference name="left">
    <block type="catalog/layer_view" name="catalog.leftnav" after="currency" template="catalog/layer/view.phtml"/>
</reference>

I also have added this to the homepage:

<reference name="left">
    <block type="catalog/layer_view" name="catalog.leftnav" after="currency" template="catalog/layer/view.phtml"/>
</reference>

DEMO URL

yet it still doesnt add filter to the homepage?
many thanks,
Chris


texts: Setup:upgrade error. Base table or view not found

texts:
Any ideas how to resolve below error please?
Installing schema... Upgrading schema... SQLSTATE[42S02]: Base table or view not found: 1146 Table 'm2.email_template' doesn't exist, query was: SELECT COUNT(*) FROM `email_template` WHERE (template_code = :template_code)

Using Magento 2.4.1 currently. Error occurs when running setup:upgrade command.
I can manually add the table in the database, but this doesn't resolve the error.
Perhaps permissions error where a module install doesn't have permission to create the table in database?
Any help greatly appreciated.


texts:
I used wamp to install Magento 2 but admin not working correctly, how can I fix it

when I opened "inspect" I found this error


texts:
I'm trying to get the subtotal and Grandtotal from an order but the result is always NULL.

I have try a lot of solutions that i found online but nothing works.. The event that i wait is: sales_order_place_after

This is the code:

    class MyCompany_MyObserver_Model_Observer {
public function send_email($observer) {

    $customer = Mage::getSingleton('customer/session')->getCustomer();
    //Get name and email of customer
    $email = $customer->getEmail();
    $fullname = $customer->getName();
    //Get the customer group and check that if Trade customer group a email gets sent
    $groupId = Mage::getSingleton('customer/session')->getCustomerGroupId();

All the code so far works as it should.I can take the name and the email and the groupID
The code below keeps break no matter what! //I have tried all the solutions i could find.I'm trying with var_dump to see the value..

$session= Mage::getSingleton('checkout/session');
    //Get totals
    $number =  Mage::getModel('checkout/cart')->getQuote()->getTotals();
    $subtotal = number_format($number,2);
    $discount = $totals['discount']->getValue();
    $shippingtotal = $totals['shipping']->getValue();
    var_dump($grandtotal);
    //die();

    $grand_total = Mage::getModel('checkout/cart')->getQuote()->getGrandTotal();

    $shippingMethod = Mage::getSingleton('checkout/session')->getQuote()->getShippingAddress()->getShippingMethod();

    $paymentMethod = Mage::getSingleton('checkout/session')->getQuote()->getPayment()->getMethodInstance()->getTitle();

    //Get billing and shipping address

    $billingaddress = Mage::getSingleton('checkout/session')->getQuote()->getBillingAddress();

    $billingStreet = $billingaddress->getData('street');
    $billingPostcode = $billingaddress->getData("postcode");
    $billingCity = $billingaddress->getData("city");
    $billingRegion = $billingaddress->getRegionCode();
    $billingCountry = $billingaddress->getCountryModel()->getName();

    $shippingAddress = Mage::getSingleton('checkout/session')->getQuote()->getShippingAddress();

    $shippingName = $shippingAddress->getName();
    $shippingCompany = $shippingAddress->getData("company");
    $shippingStreet = $shippingAddress->getData("street");
    $shippingPostcode = $shippingAddress->getData("postcode");
    $shippingCity = $shippingAddress->getData("city");
    $shippingRegion = $shippingAddress->getRegion();
    $shippingCountry = $shippingAddress->getCountryModel()->getName();

My config file looks something like this:
Am i catching the right event? The only things i can get are:
Order Id
Customer Name and Email.

<events>
  <checkout_onepage_controller_success_action>
    <observers>
      <sales_order_place_after>
        <type>singleton</type>
        <class>MyCompany_MyObserver_Model_Observer</class>
        <method>send_email</method>
      </sales_order_place_after>
    </observers>
  </checkout_onepage_controller_success_action>
</events>


texts:
How to set below rule?

Shipping & Handling Fee is 20% if the order is between $50 to $150, 15% if the order is between $150 to $300.


texts: How to retrieve customer id from SID magento

texts:
I want to retrieve session data in web services.I have SID in magento in the form 'enjgmb9m8pq2ij2jq3vcr0vln5'.I want to retrieve customer id from it.When I hit url like http://localhost/magento/{web-service-path}?SID=enjgmb9m8pq2ij2jq3vcr0vln5
Then Customer id comes in the collection like:

[visitor_data] => Array
            (
                [] =>
                [server_addr] => 2130706433
                [remote_addr] => 2130706433
                [http_secure] =>
                [http_host] => 127.0.0.1
                [http_user_agent] => Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0
                [http_accept_language] => en-US,en;q=0.5
                [http_accept_charset] =>
                [request_uri] => /magento/index.php/customer/account/index/
                [session_id] => ab3nt9gk9ql56u9p4kn74kf6p2
                [http_referer] => http://127.0.0.1/magento/index.php/customer/account/login/
                [first_visit_at] => 2015-09-29 05:31:43
                [is_new_visitor] =>
                [last_visit_at] => 2015-09-29 05:31:48
                [visitor_id] => 77
                [last_url_id] => 2069
                [do_customer_login] =>
                [customer_id] => 5907
                [customer_log_id] => 8
            )

But I dont want to show SID in url.So I want to know what magento do when we write SID in url.So that I can implement the same code for retrieving session data.


texts: M2| How to put button on sales order information page

texts: I want to add a button with email address. I can add buttons on places like  this. Can any body help me to figure out how to do this on the specific point. Any help should be highly appreciated.


texts:
In the above attach file I want to change

  Magento\SalesRule\Model\Rule\Condition\Address

to

  Company\SalesRule\Model\Rule\Condition\Address


texts: Magento 2.1.2 regionUpdater js error on register.phtml

texts:
I upgraded from 2.1.7 to 2.2.1 and now the State field is throwing an error on my registration page.  It works fine in the backend.  I've tried removing the register.phtml file from my theme so that its using the default Magento version, flushed the cache and rebuilt the static files.

Here's the error I'm receiving:

"http://xxxxx/pub/static/version1513811009/frontend/TemplateMonster/theme007_child/en_US/regionUpdater.js net::ERR_ABORTED

Uncaught Error: Script error for: regionUpdater http://requirejs.org/docs/errors.html#scripterror"

The error is happening on the "head.appendChild(node)" line in requirejs.  I'm at a loss as to where to go from here.


texts:
Dears, Any body has an experience with HypePay Payment Method?

I need to integrate HyperPay with Magento 2. Is there is any extension or Custom Code?


texts: How To use Two models in Action Controller

texts:
I have made my own grid for a contact form,
in that add new contact controller is shown below

<?php
namespace
My\Module\Controller\Adminhtml\Test;
use Magento\Backend\App\Action;
use My\Module\Model\Save as Contact;

class NewAction extends \Magento\Backend\App\Action
{
/**
 * Edit A Contact Page
 *
 * @return \Magento\Backend\Model\View\Result\Page|\Magento\Backend\Model\View\Result\Redirect
 * @SuppressWarnings(PHPMD.NPathComplexity)
 */
public function execute()
{
    $this->_view->loadLayout();
    $this->_view->renderLayout();

    $contactDatas = $this->getRequest()->getParam('contact');
    if(is_array($contactDatas)) {
        $contact = $this->_objectManager->create(Contact::class);
        $contact->setData($contactDatas)->save();
        if($contact->save()){
             $this->messageManager->addSuccessMessage(__('You saved the data.'));
        }else{
             $this->messageManager->addErrorMessage(__('Data was not saved.'));
        }
        $resultRedirect = $this->resultRedirectFactory->create();
        return $resultRedirect->setPath('*/*/index');
    }
}
}

in this i have fields like firstname, lastname, phone, email, address, zipcode, country.
i want to store fristname, lastname, phone, email on table my_module_contact that is working very well in this code
but value of address, zipcode, and country i want in other table
how to do,
can any one HELP


texts: Email Styling in _email-extend.less not applying

texts:
Magento Version: 2.3.4
Parent Theme: Luma
The issue I'm having is that I can't get any changes to work in the email styling. I have followed the docs about where to move what to move where however it isn't applying. I have even changed the css in the Luma source files and that doesn't change anything. I have attempted almost all the solutions I can find.
I believe it might be something to do with my /dev/tools/grunt/configs/themes.js however I am getting errors when running through the solution in this git issue:
https://github.com/magento/magento2/issues/12271
Here is my themes config:
    nsu: {
        area: 'frontend',
        name: 'Optima/nsu',
        locale: 'en_US',
        files: [
            'css/styles-m',
            'css/styles-l',
            'css/email',
            'css/email-inline',
        ],
        dsl: 'less'
    },

My theme Less has been compiling fine, however I don't styles-m or styles-l in the theme, just styles.less.
The error thrown:
Running "exec:theme" (exec) task
Verifying property exec.theme exists in config...ERROR
>> Unable to process task.
Warning: Required config property "exec.theme" missing. Use --force to continue.

I'm running out of ideas on this and don't have the time left on the project to troubleshoot on guesswork. I would really appreciate any help given.
Thanks.


texts: Magento 2.3 Product Images are not showing on HomePage?

texts:
Product images are not showing on home page.

  I am using porto theme in magento 2. Product images are not showing
  but when i open detailed page then it will show product images.


texts: Create Root Category in magento programatically

texts:
I want to create a Root Category programatically, i am using this function but category is created under magento "Default Category".

example


texts: Magento 2 : VAT number validation by VIES

texts:
I want to implement VAT number implementation on my custom page by VIES. How to implement it?

Any help would be appreciated.


texts: copy custom attribute from quote_address to sales_order_address not working

texts:
I created an sms attribute and added sms column into quote_address and sales_order_address database tables.

I am using this extension for the custom attribute.

After click on next on checkout shipping information, it adds value into sms column of quote_address database table for shipping but it is not working for sales_order_address.

P.s fieldset.xml is not working.
Any help please.


texts:
I'm currently configuring my transactional emails for Magento 2 and since I am in germany and want to ship some parts to a partner inside the EU i can place those orders without calculating taxes for that.

Therefore my EU partners have an own customer group without any tax display.

So make everything clear and don't get in trouble with the Tax institute here in germany i have to declare those orders with an special text inside the email and invoice.pdf.

Is there any way to implement an if-statement to call something like:

if customergroup == EU_Partner then display TEXT ?

Thanks in advance

EDIT

I found something while searching for a solution.

{{depend order.customer_group_id}} TEXT {{/depend}}

Does this work on Magento 2 and if so, how do i declare the customer_group_id ?


texts: Get categories, cache problem with getStoreCategories

texts:
I have two different template blocks (extends Mage_Core_Block_Template). Both query some categories.

First:

    $_helper = Mage::helper('catalog/category');
    $children = $_helper->getStoreCategories(false, true, false)
        ->addAttributeToSelect('product_slider')
        ->addAttributeToFilter('product_slider', array('neq' => ''))
        ->addOrderField('product_slider')
        ->addOrderField('name');

Second:

    $children = $_helper->getStoreCategories(false, true, false)
        ->addAttributeToSelect('themen_teaser')
        ->addAttributeToSelect('thumbnail')
        ->addAttributeToFilter('themen_teaser', array('neq' => ''))
        ->addOrderField('themen_teaser')
        ->addOrderField('name');

Problem is that first query is cached and second query returns the same values. You can see the caching in getStoreCategories().

How do I get those categories?


texts:
In magento 1 I can get module name using below code:

$this->_getModuleName()

How can I get module name in helper magento 2?


texts: magento 2 get folter attributes values in custom api

texts:
Hi i created custom API in magento 2 in that i need to implement advance search like store brand,model and year search like this
i am able to get brand fileds `
public function getAddtocar($attribute) {

//        echo "sdfkjhsdkjfhsdkjhfkjdshfjkds";

        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $filterableAttributes = $objectManager->getInstance()->get(\Magento\Catalog\Model\Layer\Category\FilterableAttributeList::class);
        $layerResolver = $objectManager->getInstance()->get(\Magento\Catalog\Model\Layer\Resolver::class);
        $filterList = $objectManager->getInstance()->create(
                \Magento\Catalog\Model\Layer\FilterList::class, [
            'filterableAttributes' => $filterableAttributes
                ]
        );
        $layer = $layerResolver->get();
        $filters = $filterList->getFilters($layer);
//                    $maxPrice = $layer->getProductCollection();

        $i = 0;
        $values = [];
        $filterAttrs = [];
        foreach ($filters as $filter) {
            $attr_code = (string) $filter->getRequestVar();
            if ($attr_code == $attribute) {
                $attr_label = (string) $filter->getName();
                $items = $filter->getItems(); //Gives all available filter options in that particular filter
                foreach ($items as $item) {

                    $values[] = array(
                        "id" => $item->getValue(),
                        "count" => $item->getCount(),
                        "label" => strip_tags($item->getLabel()));
                }
//                $logger->info('Array Log count of values' . print_r($values, true)); // Array Log
                if (!empty($values) && count($values) > 1) {
                    $filterAttrs[] = array(
                        "label" => $attr_label,
                        "options" => $values,
                        "code" => $attr_code);
                }
            }
        }
        $response = ['status' => 'true', 'layeredData' => $filterAttrs];
        echo $json = json_encode($response, JSON_UNESCAPED_UNICODE);
        die();

`by using abouve code i am able to show brand fileds which assigned to products after selection of brand need to get model filed
forexample:: brand->hyundai,lexus,kia once select kia i need to get kia related model can any one suggest how to get like selection based


texts: Magento breaks whenever collectTotals is called

texts:
My cart recently started not working anymore and I have narrowed it down to the collectTotals method in Mage_Sales_Model_Quote model. It happens when it calls collectTotals on the shipping address. I am not really sure where to go from here or what would be the best way to debug this moving forward.

If anyone has has this similar issue or would know of a good way to further debug this situation that would be awesome.

Also I am using EE 1.13.0.2


texts: Magento 2 EE remove url trailing slash through htaccess

texts:
I am using below code in htaccess to remove trailing slash in urls. But after adding this code my admin panel stops working and shows error - Too many redirects.
I don't know whether to place this code within any IfModule block or not.

# remove trailing slash
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{THE_REQUEST} \s(.+?)/+[?\s]
RewriteRule ^(.+?)/$ /$1 [R=301,L]

Please provide a solution.


texts:
Magento categories and store id's.

In the catalog_category_flat_store_1 database table it says the store_id is 1.

When I checked catalog_category_entity_int al entries have a store_id of 0.

If I update this to 1 all categories disappear from the front end.

Manage Stores indicates:
Main Website id: 1
Main website store id: 1
Store view name engligh id: 1

I am having issues with updating categories displaying in navigation menu and wanted to confirm if its normal for magento to have to different store ids in the database tables.


texts: Changing default product view per page in backend

texts: By default, in catalog - > manage product, magento shows 20 products, is it possibile to set the default number to, 50, 100 or 200 ?


texts: Single column layout for category and search results

texts:
I have Magento 2 installed and am using the Luma theme. I've disabled the wishlist and compare but I still have a left sidebar on the category and search result pages. Which files do I have to edit/override in order to have a single column layout for both pages.

Thanks


texts: Same Magento 2 htaccess file but different results on local machine and live server

texts:
I am running Magento 2.1.14 and have a version installed on my local machine as well as a live server.  Both machines are running Apache 2.2.  On my local machine I installed php 7.0.31 and on the live server (shared hosting) I am using php 7.0.31 for my domain.  The default setting for the live server is php 5.6.  I have SSL setup on both and run through https.  I have mod_rewrite enabled on both servers as well.

I have the same htaccess file on both hosts and an identical file tree.  They are identical copies of each other, except for the base and secure URL's.  When I navigate to a literal URL on my local machine, it shows the proper page.  But when I navigate to the literal URL on my live server, it gives me a 404 page.

EDITED
For Example:

https://127.0.0.1/magento.com/testDirectory/phpInfo.php

Where [magento.com] is the name of the directory where my magento store is installed, will show me the page.

BUT

https://magento.com/testDirectory/phpInfo.php
Where [magento.com] is my domain, will throw me a 404 page.

I don't have a large .htaccess file and I'm posting the rewrites section below to see if anyone might be able to tell me why I can view the literal path on my local machine, but my live server is showing me a 404.  Also, which action is correct (showing me the page, or throwing the 404), based on my htaccess file.

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_METHOD} ^TRAC[EK]
RewriteRule .* - [L,R=405]
#added below redirect rule for wordpress - redirects for posts
RewriteRule ^.(\d{0,4})/(.*)$ /blog/$2 [L,R=301]
#added below redirect rule for wordpress - because we deleted the blog category
RewriteRule ^blog/category/blog/(.+)? /blog/$1 [L,R=301]
#added below redirect rule for wordpress - removed catgegory tag in uri
RewriteRule ^blog/category/(.+)? /blog/$1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* index.php [L]
</IfModule>


texts: What's the double curly braces '{{pricing_value}}' in phtml file?

texts:
I see the '{{pricing_value}}' in /app/design/adminhtml/default/default/template/catalog/product/edit/super/config.phtml, I guess that it is a template engine expression, but not sure. What's it?

How does it get value? From the block Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config?

If I want to process it's value, where should I go to edit?
 '{{pricing_value}}' will show null when pricing_value set 0, but I want it just to show 0. At the same time, when I leave it blank, it still blank.


texts: Magento 2: How to import export Categories in csv via backend using Entity Type catalog_category

texts:
I have to need import export categories in csv same as product, in Magento 2 provided same thing for product.

I have tried below code but facing issue in Model file path Vendor/CategoryImportExport/Model/Export/Category.php here need to categories data and after generate csv but I can't getting that details.

I have added Entity Type catalog_category in etc/export.xml for Category and it's displaying fine in Entity Type Dropdown.

  File path: magento/app/code/Vendor/CategoryImportExport/etc/export.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_ImportExport:etc/export.xsd">
    <entity name="catalog_category" label="Category" model="Vendor\CategoryImportExport\Model\Export\Category" entityAttributeFilterType="catalog_category"/>
    <fileFormat name="csv" label="CSV" model="Magento\ImportExport\Model\Export\Adapter\Csv" />
</config>

  File path:
  magento/app/code/Vendor/CategoryImportExport/Model/Export/Category.php

class Category extends \Magento\ImportExport\Model\Export\Entity\AbstractEntity
{
    public function export()
    {
        //Execution time may be very long
        set_time_limit(0);

        $writer = $this->getWriter();
        $page = 0;
        while (true) {
            ++$page;
            $entityCollection = $this->_getEntityCollection(true);
            $entityCollection->setOrder('entity_id', 'asc');
            $entityCollection->setStoreId(Store::DEFAULT_STORE_ID);
            $this->_prepareEntityCollection($entityCollection);
            $this->paginateCollection($page, $this->getItemsPerPage());
            if ($entityCollection->count() == 0) {
                break;
            }
            $exportData = $this->getExportData();
            if ($page == 1) {
                $writer->setHeaderCols($this->_getHeaderColumns());
            }
            foreach ($exportData as $dataRow) {
                $writer->writeRow($this->_customFieldsMapping($dataRow));
            }
            if ($entityCollection->getCurPage() >= $entityCollection->getLastPageNumber()) {
                break;
            }
        }
        return $writer->getContents();
    }
}

Any have idea how to import export Categories in csv then let me know.

Any help would be appreciated. Thanks.


texts: Magento 1.14.3 category page cache issues

texts:
After upgrading from Magento EE 1.13 to 1.14.3.2 we have started seeing issues with category pages when full page cache is enabled.

We have a infinite scroll implementation where the next page products are loaded in an ajax call without the wrapping page markup, this is injected into the current page below the existing products. This was working fine for 1.13 but after the upgrade to 1.14 the initial page loads fine, however any subsequent page load after an ajax page shows the ajax call result, e.g it doesn't have any page layout, just the products.


texts: Language package in magento2 not reflected

texts:
I have already created language package for fr_FR language and it's working fine. I want to add another text in that French language so I have added my text in that file and I compiled this command it running successfully, but that translated text is not coming please tell me how to add it.

php bin/magento i18n:pack app/i18n/Test/fr_FR/fr_FR.csv -d fr_FR
Successfully saved fr_FR language package.


texts: Adding data to custom module grid using FK relationship

texts:
I've created a new module with a number of foreign keys to base magento db tables, i want to add data from the magento table (customer_entity) into my custom grid.

I have a FK relationship connecting custom_entity "customer_id" to "entity_id" in customer_entity. I would like to show both the Name and Email address of the user in the custom entity grid, how do i do this?

I understand in Magento 1 you would override prepareCollection(), how do i do this in Magento 2?

I've added the following

    protected function _renderFiltersBefore() {
    $joinTable = $this->getTable('customer_entity');
    $this->getSelect()->join($joinTable.' as customer','amrita_practitioner.customer_id = customer.entity_id', array('*'));
    parent::_renderFiltersBefore();
}

and i'm trying to add the column as follows

<column name="email">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="filter" xsi:type="string">text</item>
                <item name="label" xsi:type="string" translate="true">Email</item>
            </item>
        </argument>
    </column>

Can anyone shed any light on this, i'm having a number of problems using multiple models in one module, and any help would be greatly appreciated.

Thanks,

Sophie


texts: Removing the Billing Step from Onepage checkout

texts:
I've read a number of other questions related to removing steps, and even one about removing the billing step, but all I do is end up with errors. I want to simply remove the Billing Information step altogether.

This is what I've done so far:

app/code/etc/Sneakypixel_Checkout.xml:

<?xml version="1.0"?>
<config>
<modules>
    <Sneakypixel_Checkout>
        <active>true</active>
        <codePool>local</codePool>
        <depends>Mage_Checkout</depends>
    </Sneakypixel_Checkout>
</modules>
</config>

app/code/local/Sneakypixel/Checkout/etc/config.xml:

<config>
<global>
    <blocks>
        <checkout>
            <rewrite>
                <onepage_abstract>Sneakypixel_Checkout_Block_Onepage_Abstract</onepage_abstract>
            </rewrite>
        </checkout>
    </blocks>
</global>
</config>

app/code/local/Sneakypixel/Checkout/controllers/OnepageController.php:
Commented out

$result['allow_sections'] = array('shipping');
$result['duplicateBillingInfo'] = 'true';

from

<?php

require_once Mage::getModuleDir('controllers', "Mage_Checkout").DS."OnepageController.php";

class Sneakypixel_Checkout_OnepageController extends Mage_Checkout_OnepageController

/**
 * Save checkout billing address
 */
public function saveBillingAction()
{
if ($this->_expireAjax()) {
    return;
}
if ($this->getRequest()->isPost()) {
    $data = $this->getRequest()->getPost('billing', array());
    $customerAddressId = $this->getRequest()->getPost('billing_address_id', false);

    if (isset($data['email'])) {
        $data['email'] = trim($data['email']);
    }
    $result = $this->getOnepage()->saveBilling($data, $customerAddressId);

    if (!isset($result['error'])) {
        if ($this->getOnepage()->getQuote()->isVirtual()) {
            $result['goto_section'] = 'payment';
            $result['update_section'] = array(
                'name' => 'payment-method',
                'html' => $this->_getPaymentMethodsHtml()
            );
        } elseif (isset($data['use_for_shipping']) && $data['use_for_shipping'] == 1) {
            $result['goto_section'] = 'shipping_method';
            $result['update_section'] = array(
                'name' => 'shipping-method',
                'html' => $this->_getShippingMethodsHtml()
            );

//                  $result['allow_sections'] = array('shipping');
//                  $result['duplicateBillingInfo'] = 'true';
        } else {
            $result['goto_section'] = 'shipping';
        }
    }

    $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
}
}

app/code/local/Sneakypixel/Checkout/Block/Onepage.php:

<?php

class Sneakypixel_Checkout_Block_Onepage extends Mage_Checkout_Block_Onepage
{
/**
 * Get 'one step checkout' step data
 *
 * @return array
 */
public function getSteps()
{
    $steps = array();
    $stepCodes = $this->_getStepCodes();

    if ($this->isCustomerLoggedIn()) {
        $stepCodes = array_diff($stepCodes, array('login'));
    }

    foreach ($stepCodes as $step) {
        $steps[$step] = $this->getCheckout()->getStepData($step);
    }

    return $steps;
}

/**
 * Get active step
 *
 * @return string
 */
public function getActiveStep()
{
    return $this->isCustomerLoggedIn() ? 'billing' : 'login';
}
}

app/code/local/Sneakypixel/Checkout/Block/Onepage/Abstract.php:

<?php

class Sneakypixel_Checkout_Block_Onepage_Abstract extends Mage_Checkout_Block_Onepage_Abstract
{

  protected function _getStepCodes()
  {
    return array('login', 'payment', 'review');
  }
}

All I get are errors.  I feel as though I'm missing something in my config.xml, or that I've touched too many files. This is my first time dipping into the waters of overwriting core blocks and controllers via custom modules.


texts: Please wait when I try to add some category

texts:
I kind of 'inherited' a Magento 1.9.3.1 installation. Unfortunately I'm not very experienced with it and have a problem:
I can not add a category.
Everything else works OK except this.
While I try to add the category Magento shows Please wait message and that's it.

  This is what it put in Apache logs when I try:

PHP Fatal error:  Uncaught Error: Call to a member function addSingleNotification() on boolean in /var/www/html/app/code/local/Plugincompany/Easymenu/Model/Observer.php:26
Stack trace:
#0 /var/www/html/app/code/local/Plugincompany/Easymenu/Model/Observer.php(41): Plugincompany_Easymenu_Model_Observer->_addNewMenuItemNotification()
#1 /var/www/html/app/code/core/Mage/Core/Model/App.php(1358): Plugincompany_Easymenu_Model_Observer->catalogCategorySaveAfter(Object(Varien_Event_Observer))
#2 /var/www/html/app/code/core/Mage/Core/Model/App.php(1331): Mage_Core_Model_App->_callObserverMethod(Object(Plugincompany_Easymenu_Model_Observer), 'catalogCategory...', Object(Varien_Event_Observer))
#3 /var/www/html/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('catalog_categor...', Array)
#4 /var/www/html/app/code/core/Mage/Core/Model/Abstract.php(466): Mage::dispatchEvent('catalog_categor...', Array)
#5 /var/www/html/app/code/core/Mage/Core/Model/Abstract.php(319): Mage_Core_Model_Abstract->_afterSave()
#6 /var/www/html/app/code/cor in /var/www/html/app/code/local/Plugincompany/Easymenu/Model/Observer.php on line 26, referer: https://www.xyzxyzxyz.com/index.php/mysiteadmin/catalog_category/index/key/f15830589560f5f0c1ec46f2214ba30a/


texts: Can you run a command to re-size only certain image types in Magento2?

texts:
The below command will re-size all images based on new specified dimensions:

php bin/magento catalog:images:resize

Is there a variable to add to run for a certain image type only? For example, swatch or thumb only?


texts: Magento2 - How to customise Magento modal styling?

texts:
How to give css to Magento modal popup.
I want to edit the title styling and other styling on the popup.


texts: Magento 2: Including External JS - Uncaught Error: Mismatched anonymous define() module

texts:
Trying to include an external JS file on a specific page.  Currently using the following in my layout:

<?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">

I now see the following script tag the head of my page:

But I'm now seeing the following error:

  Uncaught ReferenceError: braintree is not defined


texts: How to create and add Backend form to Custom admin grid in magento 2

texts:
I have created admin grid for Image Slider in backend and need to add backend form for that grid.

If I click Add New slide or edit button, it needs to show a form. So Suggest me, how to create a backend form and how to link it with the grid?


texts: Page doesn't contain HIT in cache header

texts:
I am publishing my magento extension but in the revision I was notified of the issue:

Does anyone have any useful help?


texts: google search result error after removing store name

texts:
I have developed an e-commerce site using Magento 1.9.

And it is working very fine. But the problem is when the site was live google crawled all the pages and products with the store name such as ...english5/allopathy..html etc.

Recently I removed the store name from the URL and now it's showing not found from the webmaster tool. If it is few links I might be able to redirect it using .htaccess but there are more than 6000 URLs being crawled. Now users coming from google clicking on the links are redirected to the home page by default since the URL does not contain the store name. Can anyone guide how to solve this issue? Thank you in advance.


texts:
Can anyone help me to for the below error while updating from default mode to production mode in magento2 I get the below error .

  Error: Command returned non-zero exit code

Thanks in advance


texts: What BI systems work with Magento in terms of extended recommendations for users?

texts:
I am looking for a solution that gives our BI team AND our Magento system better insights into user behavior and user needs. Actually we use GA for our webshop and something else for our ERP system/online stores.

In terms of big data it would be very helpful to combine such data or even better, have one solution.

But I did not find any good solutions on market where even Magento could 'ask' the system for user specific data to present him best products that fit to the users needs (online and offline stores).

Actually I thought (from a high point of view) every shop has SKUs and users that buy SKUs with some extra parameters. So I expected that I can find tools or extensions that support something like "that might be interesting for you too" on a point of view from the customer and not "other people bought this too".
Or a better example would be "you bought this product a year ago, do you need another one, don't you?".

I know there are large shops, that have such data and they use it - and I guess they all invented it by themselves, while I think 90% of such application should be the same on each shop system - so why is there no extension that can do such things?

Or are there such extensions but I can not find them?

E.g. Spryker has such BI system closely implemented to their shopping system and use Mondrian as tool to view the BI data - but I guess you have to develop the shopping part by yourself too.


texts:
I got a few warnings today on my site which I assume is some sort of attack on the website.  Some sort of XML injection.

Is this something I need to be worried about for a Magento installation. Does it indicate a missing security patch or something else?

Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: I/O warning : failed to load external entity "file:///etc/passwd" in ......./Request.php on line 308


texts: Magento 2.1. How to display select box instead of box in checkout shipping address?

texts:
As checkout page layout is mostly build in knockout.js and I have zero knowledge of knockout.js.

I want to show shipping address in select box <select> instead of Box (ref to image - section 1) on the checkout page.

In Billing address it is showing as select box (ref to image - section 2), but I want same display for shipping address.

any help is appreciable.


texts: Recommendation solution for Magento Community edition

texts:
It's my first time discovering Magento so please forgive me if the question is kind of stupid,
My client wants to go with Magento Community version and wants to have a recommendation system as a part of the shop,
I've discovered that recommendation functionality is something shipped with Magento Commerce,
But I'm wondering is there any free open source alternatives that could be used with Magento Community version?
Thanks, Cheers


texts:
A week ago my transactions email were working just fine, but today they aren't. Since they were working I changed the email address they are being sent from, I've created my own templates and assigned them, and I got a new paymentgateway Epay.
I think the problem may be the paymentgateway. I if look into my system.log i find the following error;

2014-09-28T11:23:25+00:00 CRIT (2): Not valid template file:adminhtml/base/default/template/epay/standard/email.phtml

Can this be the problem?


texts:
I'm working in Module/Block/Adminhtml/Sqlreport/Edit/Form.php

I have some code like this:

$fieldset->addField("columnHeader", 'text', array(
    'name'      => 'columnHeader',
    'label'     => 'Header',
));

How can I add CSS styling to this field?


texts: Magento 2.2.5 - Javascript intermittent loading errors when FPC cache enabled

texts:
I have been debugging my Magento 2 build and I have found that when cache is enabled I see intermittent JS loading errors.
If I disable the FPC cache the errors stop and the page works correctly (consistently).

No code changes are implemented, just a simple page reload.

Good page load:

Bad page load:

The errors happen approx every 3-4 page loads. Then goes away again for the next couple of page loads but then reappears.

If I disable FPC cache I do not see any errors ever (tested with approx 50 page reloads).

I have of course cleared cache, deleted pub/static/* deployed static content etc

Anyone have any ideas?

Thanks


texts: Magento 2 404 page is redirecting to catalog search page

texts:
Magento 2 404 page is redirecting to the catalog search page.
Example-
www.abc.com/test123
it will redirect to the 404 page
but it is redirecting to www.abc.com/catalogsearch/result/?q=test123
How to stop this so that it will not redirect to the catalog search page?


texts: Setup Advance bundling with Basic merging in magento2

texts:
I have setup the advance bundling correctly but I also want to setup basic merging with advance bundling.
I tried to setup it on default Magento setup but I'm getting lot's of JS error after enable merging and also advance bundling is not working after enable merging.
Does any one know is it possible to setup Advance bundling with merging in Magento2?
If yes then please share the steps.
Thanks in advance.


texts: Move page title using local xml - only on Homepage

texts:
i would like to unset the pagetitle only on the Homepage of Magento. The Answer on how to unset on all pages i found in here: Move page title using local xml
But how do i need to write the local.xml to only remove the pagetitle on the Homepage?

Thank you!


texts: how to force collection to include attribute value in select?

texts:
This code

Mage::getResourceModel('customer/customer_collection')
     ->addAttributeToSelect('username', 'password_hash')
     ->addFieldToFilter('username', 'name')->getSelect()->__toString();

gives me:

SELECT `e`.*, `at_username`.`value` AS `username` FROM `customer_entity` AS `e` INNER JOIN `customer_entity_varchar` AS `at_username` ON
(`at_username`.`entity_id` = `e`.`entity_id`) AND
(`at_username`.`attribute_id` = '134')
WHERE (`e`.`entity_type_id` = '1') AND (at_username.value = 'name')

how can I include password hash value into collection to get its select query ?


texts:
I can do this to get all attributes for a product:

$parentProduct = /* shirt (configurable) */;
$childProduct = /* shirt: blue, medium (simple) */;

$attributes = $childProduct->getAttributes();
foreach ( $attributes as $attribute ) {
    echo $attribute->getFrontend()->getLabel($childProduct) . ': ' . $attribute->getFrontend()->getValue($childProduct) . '<br />';
}

How can I limit this to just the attributes used to configure this product? (e.g. colour and size)


texts: Magento Setting Up Cron "cron.sh: line 26: $'\r': command not found"

texts:
Recently i setup a fresh install of Magento 1.9.2 upon configuring cron i get the following error when i try to execute

bash /path/to/my/magento/root/cron.sh

ERROR :cron.sh: line 26: $'\r': command not found

I also get the same result with:

php cron.php

I can't change the cron.sh to :

chmod -x cron.sh

because i am not part of sudo. My option is limited with cron.sh. I am using Webfaction hosting if this can be of any help.

Can anyone help me with this ? Thanks


texts:
I'm trying to change the layout handle for specific CMS pages in the back end.

To do this I'm trying to use the following in Design->Page Layout->Layout Update XML

<update handle="store_page" />

My aim is to write a specific layout in the local.xml, pulling in other blocks just for those CMS pages marked as a Store Page.

However when I put this code in it does not update the handle for the CMS page - is anyone able to offer any help on where I may be going wrong or if this is possible? Is there a better way to achieve this?


texts: Magento 1.9 - Varnish, nginx and redirects (http -> https and non-www to www)

texts:
trying to redirect all non-www traffic to www and all http traffic to https.

Environment is Magento 1.9 with Varnish and nginx. We also have Cloudflare (fully SSL enabled). Using the code below in vhosts, it doesn't redirect correctly - anybody see anything wrong?

Many thanks

server {
  listen 80;
  server_name www.example.com example.com;
   return 301 https://www.example.com$request_uri;
}
server {
  server_name example.com;
  {{ssl_listener}};
  {{ssl_certificate}};
  {{ssl_certificate_key}};
  ssl_session_cache  builtin:1000  shared:SSL:10m;
  ssl_session_timeout  10m;
  ssl_protocols TLSv1.1 TLSv1.2;
  ssl_ciphers 'ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384';
  ssl_prefer_server_ciphers on;
  ssl_stapling on;
  ssl_stapling_verify on;
  return 301 https://www.example.com$request_uri;
}


texts: Creating an across-the-board discount price based on one attribute

texts: On our Magento site at http://www.onos.com, we are needing to quickly provide a discounted sales price all sunglasses that offer the Lens Color Option of Green Mirror over Amber lenses from the ONOS Sunglasses Category.  We are going to offer any frame with this particular "Green Mirror over Amber" lens for a price like $59.95.  What is going to be the easiest way to create this discount?


texts: Magento 2.2.4 Unable to unserialize the value

texts: I'm trying to import products with CSV programmatically and getting following error on update some product. I tracked down issue and only one thing which I know - all products returns JSON encoded string like {"category_id":"393"} but failed product returns this: a:1:{s:11:"category_id";s:3:"257";}. Where can I find this value in DB? Or how can I fix this issue?