texts: How to style transactional email with email-inline.css

texts:
I am using Magento 1.9.1. I want to customize my Magento Transactional Emails. To do so, I duplicated email-inline.css and email-non-inline.css from base package into my customized package (into this path: \skin\frontend\mypackage\default\css ).

I made the necessary changes and I uploaded the updated css but the emails arrive with the same design as before, as if the system was unaware of my custom css.

What do I have to do?


texts:
This file path is listed for the product title on the product details page when I turn on the developer hints:
/public_html/vendor/magento/module-theme/view/frontend/templates/html/title.phtml

But there is no file under vendor/magento/theme-frontend-blank....

How do you find the phtml file without doing a folder & sub-folder search for every file you want to locate?


texts: How can i run function when the checkout page is opened?

texts:
I am using Magento 1.9.2 and i am working on a custom extension.

My question is:
How can i run custom php function when the checkout page is opened?

I know i have to mess around with the events of the extension config file but i am not exactly sure how i can point the function in the observer which i want to run when the checkout page is opened.

Here is events part of my config:

    <events>
        <sales_order_place_before>
            <observers>
                    <class>opc/observer</class>
                    <method>checkitemsincartv</method>
            </observers>
        </sales_order_place_before>
        <controller_action_postdispatch_opc_json_saveOrder>
            <observers>
                <hss_save_order_onepage>
                    <class>paypal/observer</class>
                    <method>setResponseAfterSaveOrder</method>
                </hss_save_order_onepage>
            </observers>
        </controller_action_postdispatch_opc_json_saveOrder>
        <sales_order_place_before>
            <observers>
            <custom_ads>
                    <class>opc/observer</class>
                    <method>checkitemsincartv</method>
            </custom_ads>
            </observers>
        </sales_order_place_before>
        <sales_order_place_after>
            <observers>
                <newsletter_order_place_after>
                    <class>opc/observer</class>
                    <method>newsletter</method>
                </newsletter_order_place_after>
            </observers>
        </sales_order_place_after>

         <checkout_submit_all_after>
            <observers>
                <opc_checkout_submit_all_after>
                    <class>opc/observer</class>
                    <method>applyComment</method>
                </opc_checkout_submit_all_after>
            </observers>
        </checkout_submit_all_after>

    </events>

And in the observer i have added this:

public function checkitemsincartv($observer)
{
    Mage::getSingleton('core/session')->setItemsInCart("Works");
    $data = $observer->getEvent()->getOrder();
    Mage::log($data->debug(), null, "order.log", true);
}

But it seems to be not working.

How can i achieve that?


texts: Set the shipping of a quote to amount X globally?

texts:
Is there a way to say that if a certain criteria is met, set X EUR shipping for a current quote from the cart globally? Like this:

 if(someCriteriaIsMet) {
     //set the shipping to 5 EUR so that the cart, the OPC review and so on show that amount    $amount = 5;
 }

The question is, is that possible at all and if yes, where would I put that code?

Thanks!


texts: How can I search by remove ' - ' from my SKU?

texts:
I have sku like this '1-83574148-0'.

when I searched  with keyword  '1835741480' . It's no result .

How can I search by remove  ' - ' from my SKU ?


texts: How to add custom entity from admin in magento

texts: I am working on a project where I need to add a custom user from the magento admin panel. This user cannot purchase the products. He can only login to his section and write reviews on products or update his/her profile information. Magento admin should be responsible for creating this user with his username and password and other details. Please, help regarding this I really have no idea of the best practices when it comes to creating entity that is managed from the admin panel. Thanks in advance.


texts:
What is the most efficient way of getting a product url given just it's ID? In a few places in our code we have things such as Mage::getModel('catalog/product')->load($id)->getProductUrl() in order to get the URL of the product, given the amount of events etc associated with a product this seems rather wasteful, is there a simpler method? The ability to also specify a category id would be nice.

Additionally, is there an efficient method for doing the same thing for a single attribute for a product such as name?


texts:
I tried to apply patch 10266 at my Magento version 1.9.0.1. How to test it that is it applied or not?

And one strange thing is that applied.patches.list file in app/etc/ does not exist.

Magereport.com also not showing the status of patch 10266.
Then how will I confirm that patch installed or not? I run the script by PHP file.

  echo shell_exec("sh
  PATCH_SUPEE-10266_CE_1.9.0.1_v1-2017-09-13-06-31-01.sh") or die("bash
  didn't work");


texts: Hide product price for specific products

texts:
I am using an extension for enable "Add to Quote" option instead of "Add to Cart" for some specific products.

How can I hide price for "Add to Quote" enabled products (attribute ves_enable_quote) and display "Price on request" text?? (as per below image)


texts: Remain on the product page with an upsell add to cart button

texts:
I have added an "Add to Cart" button for the upsell items on the product view page, using the following code:

<button type="button" onclick="setLocation('<?php echo $this->helper('checkout/cart')->getAddUrl($_link) ?>')">
  <?php echo $this->__('Add to Cart') ?>
</button>

The problem is that when adding the product to the cart it then redirects to the home page. I have the After Adding a Product Redirect to Shopping Cart option set to No in the checkout configuration.

How do I get it to stay on the same page?


texts: Magento 2.2 login page Element 'action', attribute 'ifvalue': The attribute 'ifvalue' is not allowed

texts:
In developer mode my login page is displaying the following error:

Magento 2.2.0 login page Element 'action', attribute 'ifvalue': The attribute 'ifvalue' is not allowed

Can anyone guide me in debugging this error? Where to look?

In production mode pages are working fine.

  Update 1:

When checked all the layout files I have found the following lines in different files where this 'ifvalue' attribute is mentioned:

<action method="setTemplate" ifconfig="marketplace/profile_settings/seller_profile_display" ifvalue="1">
<action method="setTemplate" ifconfig="socialsignup/sociallogin/enabled" ifvalue="1">
<action method="setTemplate" ifconfig="socialsignup/sociallogin/enabled" ifvalue="1">

I guess this code is to set template if config value is 1. I am trying to figure out the right way to achieve this.


texts: magento 2 - need to add cart page in checkout step

texts:
I need to add cart page in checkout steps the same as uploaded image, step 1 is cart page step 2 is shipping and step 3 is a payment.
can anyone help me to do this in Magento 2


texts: How can I display all my product names with product links on single page

texts:
I have around of 3000 product in my website. I want to display all product names with product links in a single page in alphabetic order.

How can I do that? Please help.


texts:
I'm getting a good score on desktop but on the mobile very low score. For example
I'm getting Preload key requests 3.18 s in mobile but for desktop just 0.65 ms. Also, server response time in mobile is 9.8s and in desktop 1s.
Why this deviation? Any tips would be helpful.


texts: cms page with download function for customers

texts: I want to make a cms page or just a page where people can download a word document i hope i can make the page so that people can first read what the file is for and then download the specific word document


texts: Magento 1.7: Error create order for quote #15: ProductId is required for OrderItem

texts:
Just recently started getting this error sent via email when trying to place an order in store. done some searching around and cannot seem to find anything about it.

I'm assuming that somewhere in the database the quote number is not incrementing as each time i place the order, it comes up with quote #15?


texts: Negative product prices in Admin Panel order

texts:
We process a lot of B2B orders (mostly by mail and phone) through the Magento Admin Panel, works fine, but what we are missing is an option to give a discount or extra fee to a customer.

In the ideal world we'd like to add an extra order line which has a custom description, custom price and a custom qty. This currently isn't possible because it expects a product.

To work around this we created a dummy product which can be added to the order, we change the price and qty and voila we have an extra order line. I've added a custom option (textfield) to the product which allows us to add a nice description for the customer.

This way we can add extra charges to the order, that's great. We also want to various discount order lines to the order. To do this I need to create order lines with a negative price in the admin panel.

Is there a relatively save modification to make to allow this?

Maybe as an alternative, maybe a custom discount could also be an option, but since this only allows for one discount to be added this isn't ideal. Any suggestions for that?


texts: configurable products are invisible in frontend (out of stock) until I click Catalog > Manage Products > "my configurable product" > save. What may be the reason? Thank you.


texts:
I want to extend Mage_Sales_Model_Resource_Order_Shipment_Item_Collection because it doesn't come with a getIntervals() function.

So I created following files:

MyModule/Modulename/Model/Mysql4/Shipping/Collection:

class MyModule_Modulename_Model_Mysql4_Shipping_Collection
extends Mage_Core_Model_Mysql4_Collection_Abstract {

public function _construct() {
    parent::_construct();
    $this->_init('sales/order_shipment_item_collection');
}

MyModule/Modulename/etc/config.xml

<global>
    <models>
        <modulename>
            <class>MyModule_Modulename_Model</class>
            <resourceModel>modulename_mysql4</resourceModel>
        </modulename>
        <modulename_mysql4>
            <class>MyModule_Modulename_Model_Mysql4</class>
        </modulename_mysql4>
    </models>
</global>

In my order grid I want to call the collection with

$collection = Mage::getResourceModel('modulename/mymodule_modulename_shipping_collection');

But the collection is empty and I can't figure out why. Can anyone point me in the right direction, please?


texts: What I need is to set a pack promotion with a fixed price. eg: Giving a pack with 1 shirt, 1 trouser and 1 skirt for 500


texts:
I want to apply the following shipping rules in the magento:

1-5kg - £5.95
6-10kg - £7.95
11-100kg + £0.21p per kilo on top of the £7.95 price.

I am facing problem with applying 0.21p per kilo in the last rule. Please advise if this is possible in magento or if any 3rd party extension can do this?


texts:
So im trying to get the id from url which look like this "catalog/category/edit/key/3fe130e5c0d9110729ff37ef34801a53362cca59c5b2ce91c0bffc59bf699b51/id/147/"
I want to know if that is possible? I have almost tried everything from google. Nothing works!


texts:
We have a customer where we want to change the payment status after the IPN has been received.

Mostly we want to enable all payment settings for paypal orders. Right now there is only the currently logical payment status in the order overview.

Under System -> Order statuses we've got several statuses that are not linked to any state.

How can I enable them?


texts: Magento prepends script sources with document root after transfer

texts:
I have moved my Magento install from one server to another, and everything seemed to go smoothly, but i am left with an issue...

Any and all scripts that are attempted to be loaded in (both frontend and backend) are prepended to be :

http://example.com/my/document/root/media/js/prototype.js ... which obviously doesn't exist... now i coudl creat a simple symlink in my folder, but i would like to find out how this has occured, since i have more then one magento instance, which i all would like to move to my new server.

I am NOT using combined scripts (yet) so i can see which are "missing" but it simply is all...

I have cleared my cache, and check read/write permissions on the media folder, and they are all correct (owned by webserver) o+w  (777)...

Any thoughts are appreciated


texts: Magento 2 : Integrate DPD Shipping Carrier - Where to find test credentials?

texts:
I am trying to integrate DPD shipping carrier in my Magento UK site. I am creating a custom module for this as the shipping carrier does not come integrated out of the box in Magento.

I'd like to know from where do I get the sandbox/test credentials for authenticating while connecting to the DPD shipping API? The DPD site doesn't let me register for the same.

Any links pointing to resources/guidance regarding this would be most welcome :)


texts:
I need to remove the Mage_Review_Block_Helper block from a product quickview, so I cannot delete the "$this->getReviewsSummaryHtml" string in the product view template.
I tried "remove name="product.info.review", but has no effect.

thanks

Here is the xml layout:

<quickview_index_view_FINAL>
    <remove name="before_body_end" />
    <reference name="root">
        <action method="setTemplate"><template>sns/quickview/product.phtml</template></action>
        <action method="setIsHandle"><applied>1</applied></action>
    </reference>

    <reference name="content">
        <remove name="product.info.upsell"/>
        <remove name="product.info.additional"/>
        <remove name="catalog.product.related"/>
        <remove name="product.info.product_additional_data"/>
        <remove name="product.review.form"/>
        <remove name="product_review_list.toolbar"/>
        <remove name="product.description"/>
        <remove name="product.attributes"/>
        <remove name="product.info.bought"/>
        <remove name="product.info.addto"/>
        <remove name="product.info.review"/>
    </reference>
</quickview_index_view_FINAL>


texts: Ajax Layered Navigation load event to use in jquery

texts:
I integrated lazyload on an magento layered navigation page.
First page load runs well, but when I use navigation no more images are shown.

This is propably due to the ajax call updating instead of reloading the page.

Here's my question:

Is there any event on the end of the ajax load I can use triggering the lazyload function?


texts: How to Redirect a Specific CMS Page (Contact Form) to https?

texts:
I have a contact form, which I'm showing from CMS page. Like described at method:
http://inchoo.net/ecommerce/magento/contact-form-in-magento/

CMS page url is: customer-service-contact. I also redefined standard Mage_Contacts module. Now I need when somebody opens:

http://{website}/customer-service-contact/

he should be redirected to:

https://{website}/customer-service-contact/

I know about trick at xml:

<frontend>
    <secure_url>
        <contacts>/contacts/</contacts>
    </secure_url>
</frontend>

But if I change it to url customer-service-contact, it's not working.

How to implements this?


texts: Magento 2 - Custom Customer attribute in order create select customer grid

texts:
I am trying to add a custom column in sales create order customer grid.
When admin trying to place order from back end ,after create order button click we get a customer grid .

I have added a new column Company Name to this grid using below code in

  sales_order_create_customer_block.xml

<block class="Magento\Backend\Block\Widget\Grid\Column" name="adminhtml.customer.grid.columnSet.company_name" as="company_name">
                        <arguments>
                            <argument name="header" xsi:type="string" translate="true">Company Name</argument>
                            <argument name="index" xsi:type="string">company_name</argument>
                            <argument name="align" xsi:type="string">center</argument>
                        </arguments>
                    </block>

Here Company Name is a custom customer attribute I have created .

After adding this I am getting the company name in this grid.
But the company name does not show at first load.
In the above screenshot for customer Id 66, I have set the company name still its displayed none.When I filter it by clicking on company name header it filters and then the company name is displayed for each customer and properly.

And when I reload the page it again displays nothing and I have to filter it again to display it .
I tried giving a different customer field gender in the xml and I am getting Boolean values as expected and no need of filter needed to display it like in case of my custom customer attribute.
Is there any that I have missed out in configuring this ?


texts: How to return Company Name by Product Id?

texts:
I'm very new on this..

I have this table on my Admin Panel, on tab Catalog > Manage Products, i want to display Attribute "Seller Company Name" how can i display that Attribute on my .phtml file??

i usually used $_productCollection=$this->getLoadedProductCollection(); to display each product

thanks

UPDATE

seller_id with 'Seller' label:

this is my getLoadedProductCollection()

    public function getLoadedProductCollection()
{
    return $this->_getProductCollection();
}

protected function _getProductCollection()
    {
        if (is_null($this->_productCollection)) {
            $layer = $this->getLayer();
            /* @var $layer Mage_Catalog_Model_Layer */
            if ($this->getShowRootCategory()) {
                $this->setCategoryId(Mage::app()->getStore()->getRootCategoryId());
            }

            // if this is a product view page
            if (Mage::registry('product')) {
                // get collection of categories this product is associated with
                $categories = Mage::registry('product')->getCategoryCollection()
                    ->setPage(1, 1)
                    ->load();
                // if the product is associated with any category
                if ($categories->count()) {
                    // show products from this category
                    $this->setCategoryId(current($categories->getIterator()));
                }
            }

            $origCategory = null;
            if ($this->getCategoryId()) {
                $category = Mage::getModel('catalog/category')->load($this->getCategoryId());
                if ($category->getId()) {
                    $origCategory = $layer->getCurrentCategory();
                    $layer->setCurrentCategory($category);
                    $this->addModelTags($category);
                }
            }
            $this->_productCollection = $layer->getProductCollection();

            $this->prepareSortableFieldsByCategory($layer->getCurrentCategory());

            if ($origCategory) {
                $layer->setCurrentCategory($origCategory);
            }
        }

        return $this->_productCollection;
    }


texts: Changing product page "more information tab" view

texts:
Hi im new to the magento 2 development so i need some help here please.

I've managed to replace the more information(product.attributes) tab to the desired place. But i need to edit the view of this block but i cant find his location. Thanks in advance !


texts: Magento 1.9.1 Notifications (Emails, Newsletters) not send

texts:
I am having Magento 1.9.1 with cron setup and triggered fine! When i place a new order i am not receiving any emails (not admin not customer). I have tried all possible commands:

*/5 * * * * /bin/sh MAGENTO_PATH/cron.sh
*/5 * * * * /bin/bash MAGENTO_PATH/cron.sh
*/5 * * * * /usr/bin/php MAGENTO_PATH/cron.php
*/5 * * * * /usr/local/bin/php -f MAGENTO_PATH/cron.php

Do the .sh script need any modification?? Do i miss anything else?


texts: We are using Magento 2.3.4 The order confirmation email is not sent

texts:
the order confirmation email is not sent to customer how to fix this problem....moreover the problem is entirely different,here welcome email,forget password, shipping and invoice mails are delivered
but order confirmation email only not going
please help me someone


texts: Checkout hangs because of: Uncaught TypeError: Cannot read property 'US' of undefined

texts:
Running a Magento 2.1.3 store. The checkout never fully loads as an error is being generated on post-code.js in (Chrome):

Uncaught TypeError: Cannot read property 'US' of undefined
at UiClass.update (post-code.js:32)
at setNested (objects.js:43)
at Object.nested (objects.js:117)
at UiClass.set (element.js:301)
at updateValue (links.js:57)
at setLink (links.js:144)
at links.js:165
at Registry._resolveRequest (registry.js:413)
at Registry._addRequest (registry.js:380)
at Registry.get (registry.js:224)

And in Firefox:

TypeError: options is undefined

The lines that that references are:

var country = registry.get(this.parentName + '.' + 'country_id'),
            options = country.indexedOptions,
            option;

        if (!value) {
            return;
        }

        option = options[value];

I haven't managed to find any similar problems online and have really gotten stock.

Any advise welcome.


texts: How can I get grand total in custom phtml file

texts:
Platform: Magento 1.9
Area: Cart/Quote

I want to get cart grandtotal in my custom phtml file.

Is there any easy way to do it?


texts: Disable selected dates in default Magento2 calendar

texts:
I have successfully added calender and disable previous Date in my custom form by using below code.

<script>
require([
    "jquery",
    "mage/calendar"
], function ($) {

    $("#My_ID").calendar({
        showsTime: false,
        hideIfNoPrevNext: true,
        buttonText: "<?php echo __('Select Date') ?>",
        minDate: new Date(),
        dateFormat: 'yy-mm-dd'
    });
});

How to disable List of dates which is in my database ?


texts: Magento Enterprise Rewards Points Set up rule

texts:
How is possible in magento Enterprise if order value in cart is $xx than customer earn Y rewards points.Means "Points are accrued when orders over £150".
Thanks,


texts: Magento 2.2.7: how to run composer update command under Ampps/Xampp php version instead to base php

texts:
I am using LAMP on which I have PHP 7.2
I install Ampps on which I have PHP 7.1
How I have to run composer update command? If I run it gave me PHP version error (definitely it will give 2.2.7 don't require php7.2)
How I have to run composer using Ampps's PHP version instead of base PHP version.


texts: magento2 admin grid edit form checkbox not checked

texts:
I created magento admin grid form

In my form i am using checkbox
app/code/[vendername]/[modulename]/Block/Adminhtml/Blog/Edit/Tab/Main.php

$fieldset->addField(
        'applies_to_books',
        'checkbox',
        [
            'label' => __('Applies to Books'),
            'name' => 'applies_to_books',
            'data-form-part' => $this->getData('applies_to_books'),
            'onchange'   => 'this.value = this.checked ? 1 : 0;',
        ]
    );
    $fieldset->addField(
        'applies_to_levels',
        'checkbox',
        [
            'label' => __('Applies to Levels'),
            'name' => 'applies_to_levels',
            'data-form-part' => $this->getData('applies_to_levels'),
            'onchange'   => 'this.value = this.checked ? 1 : 0;',
        ]
    );
    $fieldset->addField(
        'applies_to_addons',
        'checkbox',
        [
            'label' => __('Applies to Addons'),
            'name' => 'applies_to_addons',
            'data-form-part' => $this->getData('applies_to_addons'),
            'onchange'   => 'this.value = this.checked ? 1 : 0;',
        ]
    );

While saving values are saved database but it not checked backend admin form


texts: Item status in sales order view not showing backordered after invoice is created

texts:
When we receive an order containing an out of stock item (that's allowed to be backordered) it nicely shows "Backordered" at 'Item status' in the backend sales order view.

magento item status = backordered if the invoice is not yet created! When the invoice is created, the item status automatically changes to invoiced, see image.
magento item status = invoiced, even though still in backorder. This seems not logical to me and is definitely unwanted behavior. Even after the invoice has been created, I'd still like/need to know what products are in backorder.

Any idea how we can keep the message "backordered" on the order view?


texts: How to show session messages at front end in magento 2 beta

texts:
I want to show an error or success message in my magento 2 module. I have extended my front-end controller with the class name \Magento\Framework\App\Action\Action. Then I redirect client to home page using following code

$this->messageManager->addError($SomeMessage);
$resultRedirect = $this->resultRedirectFactory->create();
$resultRedirect->setPath($base_path);

Everything works fine but this line never prints the error

$this->messageManager->addError($SomeMessage);


texts:
We have enable the Use Flat Catalog Category and  Use Flat Catalog Product. After that site is loading while login to myaccount. We checked this, after login in some category page show product compare list around 300 product. So the page page load time increased. Where to remove the Product Compare list product?

Thanks


texts: DIsplay attribute image if it exists in folder

texts:
I'm adding some information to my product page and I'm not very familiar with php.

Can anyone help me and indicate how can I place these two echo in to a valid if. So it should place an image if the image exist's in folder and if it doesn't then put attribute text.

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

<?php $brand=$_product->getAttributeText('gol_marca');
      echo ''?>


texts: Magento 2: How to add attribute flag to quote item?

texts: I want to add an attribute to quote item to know if an item can be deleted or not from a cart. Any help?


texts: Manage Stock - Can't Add Stock after migration

texts:
When I go to Stores->Stocks there is an error message:

The website with code base that was requested wasn't found. Verify the website and try again.

I verified that the table inventory_stock is located in the database and contain the Default Stock which no longer shows up in the admin.

This causes a problem where all products are out of stock. When I try to Add New Stock under Manage Stock Magento says it was added, but no new stock appears.


texts:
I upgraded recently from 1.7 to 1.9.0.1 and I am wondering if this is a bug or if I just missed some new configuration, I am not using tax classes btw.

When creating a shopping cart price rule, (e.g. coupon, sub total equals or greater than 100, fixed discount for the whole cart 15), the discount applied on the subtotal diminishes with every additional product added if and only when setting "Stop further rules processing" to "Yes".

I tested this on a vanilla installation.


texts: Installed SUPE-8788_CE_1.8.1.0_v2 COD redirects back to cart in onepage checkout

texts:
We have a Magento 1.8.1 store running. We installed SUPE-8788_CE_1.8.1.0_v2 and afterwards the COD payment method in onepage checkout is redirecting back to the cart.
Many customers use COD in our store, so that is a bit of a problem. I tested in all browsers and checked if there is any call in HTTP instead of HTTPS through ajax, but couldn't find anything. Also, nothing in Logfiles.
Interesting to note is that the final payment page shows up, but only for a brief second, then redirects to the cart.
Any ideas what causes the redirect?
Thanks so much, Martin


texts: Magento Admin Login Refreshes for correct credentials

texts:
This isn't like the other topics here which complains about the magento admin login refreshes.
The point where it is different is for correct username/password it refreshes but for invalid credentials it actually gives an error message as invalid username or password.

In most cases on both occasions the login just refreshes. But for me just the correct credentials refreshes and wrong gives the error message.

I have tried every other solutions posted on other thread, but no avail. Can anybody help me out? I will be very much obliged, Thank you.

***Note: This is after a server transfer.


texts: Is it possible to drastically reduce the number of JS files being served from Magento without merging/bundling?

texts:
Currently my almost-new Magento 2.3.1-based website with a lightly modified theme is sending 170 JavaScript files to the browser, just to serve the home page. To me, this is not remotely acceptable.

Many of these JS files are useless for my website (e.g. ones relating to Amazon Pay, captcha, etc.) and I would like to remove them completely. Frankly I don't even understand why such files are being sent on the home page, which contains no kind of interactive features (it's just a CMS page).

It seems like Magento is sending lots of unnecessary JavaScript "just in case" it needs to be used for the theme.

Is there a reasonably easy way to identify where this extra bloat comes from, and stop it being sent altogether?

(Please note I don't want to use Magento's JS bundling feature but rather I'm looking for ways to stop these JS files being referenced at all).


texts: How to add custom checkout fields and save them in db?

texts:
I need to add some fields to the shipping address form from checkout page, and then save them in database.
Please tell me how to do this thing?


texts: Fatal error: Call to a member function getChildHtml() on a non-object custom layouts

texts:
I followed this tutorial on making custom page layouts: http://inchoo.net/magento/custom-cms-page-layout/
I then set my home page to that template but I now get an error of

Fatal error: Call to a member function getChildHtml() on a non-object

but I'm not sure why though.. here's my code:

<?xml version="1.0"?>
<config>
    <global>
        <blocks>
            <custom>
                <class>Custom_CustomHomePage_Block</class>
            </custom>
        </blocks>
        <page>
            <layouts>
                <custom_home_page>
                    <label>Custom Home Page</label>
                    <template>page/customHomePage.phtml</template>
                </custom_home_page>
            </layouts>
        </page>
    </global>
</config>

this is the config.xml file found in /app/code/local/Custom/CustomHomePage/etc

and my Custom_CustomHomePage.xml file

<?xml version="1.0"?>
<config>
    <modules>
        <Custom_CustomHomePage>
            <codePool>local</codePool>
            <active>true</active>
        </Custom_CustomHomePage>
    </modules>
</config>

this is found /app/etc/modules/

and my block class

<?php
    class Custom_CustomHomePage_Block extends Mage_Core_Block_Template {
    }
?>

found /app/code/local/Custom/CustomHomePage/Block

I can't for the life of me see what's wrong :(

Thanks in advance!


texts: Magento 2 - Display Configurable Product Option Value with Quantity on Product View Page

texts:
I'm working on a module where I'm attempting to display the configurable product's option values and quantity on the product page in a clean table with two options per table row. However, I'm not sure where to go. I've found a few ideas in these links: Show available inventory on configurable product magento 2 and Magento 2.2 How to show out of stock in configurable product. And they don't quite do what I want and they use the object manager, which I want to avoid.
How can I gather the configurable product's option values and quantity for the simple product IF the configurable has a specific attribute code (in this case, it's 'color') OR if it only has one configurable option instead of two or more.


texts: How to extend ParadoxLabs\Authnetcim\Model\ConfigProvider to add addtional config data to access in authencim.js and related .html template?

texts:
I see following code in authnetcim/view/frontend/web/js/view/payment/method-renderer/authnetcim.js. I understand that it's using cc.html template to display the content. How to know which Block or Helper classes are called to get data for use inside this .js and in cc.html template?
I need to check customer session data and display a message around 'Place Order' button, so trying to understand which back-end code needs to be modified, so that I can get that data into HTML template file.

define(
[
    'ko',
    'ParadoxLabs_TokenBase/js/view/payment/method-renderer/cc'
],
function (ko, Component) {
    'use strict';
    var config=window.checkoutConfig.payment.authnetcim;
    return Component.extend({
        defaults: {
            template: 'ParadoxLabs_Authnetcim/payment/cc'

Wrote custom Model ConfigProvider.php that extends ParadoxLabs\Authnetcim\Model\ConfigProvider, then added below method

public function getCustomerName() {
    if ($this->customerSession->isLoggedIn()) {
        return $this->customerSession->getCustomer()->getFirstname();
    }
    return false;
}

Added below code to getConfig() method:

public function getConfig()
{
    if (!$this->methods[static::CODE]->isAvailable()) {
        return [];
    }

    $config             = parent::getConfig();
    $selected           = null;
    $storedCardOptions  = [];

    $config = array_merge_recursive($config, [
        'payment' => [
            static::CODE => [
                'useVault'                => true,
                'canSaveCard'             => $this->canSaveCard(),
                <few other attributes here>
                'canStoreBin'             => $this->getCanStoreBin(),
        'customerName' => $this->getCustomerName(), -- new custom attribute
            ],
        ],
    ]);
$config['customerName'] = $this->getCustomerName();
    return $config;
}

`$config['customerName'] = $this->getCustomerName();

Overwrote vendor/paradoxlabs/authnetcim/view/frontend/web/js/view/payment/method-renderer/authentcim.js to add new function as below, using requirejs-config.js in my custom module:

getCustomerName: function () {
    return config.customerName;
}

Code in cc.html copied from vendor/paradoxlabs/authnetcim/view/frontend/web/template/paymentcc.html template to access customerName data, inside the custom module:

<!-- ko if: (getCustomerName())-->

I do see it working if I hard code a name inside the authentcim.js getCustomerName() function, so I am guessing it's an issue with getting model data into config object that is of type window.checkoutConfig.payment.authnetcim.


texts: Magento 2 EE : Need to remove one single block from cache

texts:
I just need to remove single block phtml from FPC cache. How can I do that without using cacheable = "false". Because cacheable = "false" has an effect on the whole page.

I am using a .phtml file in the static block and that static block call into header.


texts: Magento2 :owl carousel and other custom extension js not working on first time page load

texts:
I am using owl carousel on my magento 2 website. I have created a custom module for that.

While I am loading my website first time owl carousel slider is not appearing,.

When I move to other page and comeback to home page slider is appearing.

Can anyone help on this.

requirejs-config.js

var config = {
    map: {
        "*": {
            bannerowlcarousel: "Vendor_Banner/js/owl.carousel.min"
        }
    }
};

banner.phtml


texts: Delete a product from the cart when a user log in

texts:
My magento has two warehouses, and the cart cannot have two products with different warehouses. I check this with an observer. But, I have a problem:

A logged user has in his cart a product with the warehouse A. And he logs out. After, a guest user add to his cart a product with the warehouse B. And finally, the first user is logged again and in his cart appears a product with A and other with B.

How can I resolve it? The product B should not appear in the cart in the last step.

Please help.


texts: I want to remove duplicate entry from admin grid in Magento 2

texts:
I have created a custom admin grid using UI Component with created_date filed. the requirement is to show single data per created_date. currently, the grid shows multiple data in created_date.

EX: I have got more than one entry for a single date. I want to show only first entry for that particular date.

<column name="creation_time" class="Magento\Ui\Component\Listing\Columns\Date">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="filter" xsi:type="string">dateRange</item>
                    <item name="component" xsi:type="string">Magento_Ui/js/grid/columns/date</item>
                    <item name="dataType" xsi:type="string">date</item>
                    <item name="label" xsi:type="string" translate="true">Created At</item>
                    <item name="sortOrder" xsi:type="number">140</item>
                </item>
            </argument>
        </column>


texts: Magento 2 : Unable to to get custom image url on list.phtml

texts:
i have created custom image attribute in magento 2 named as background_image screenshot below

i want to show url of background image in my category listing page, i have tried below code but nothing is giving output

$_product->getResource()->getAttribute('background_image')->getFrontend()->getValue($_product);

$_product->getCustomAttribute('background_image');

Please help with what i am missing


texts: Magento2 ui component multiselect selected options on edit

texts:
I'm trying to show the selected options in a multiselect in a custom admin module form.
The data for the multi select field is saved in the database.

What i have as field:

<field name="position_options">
       <argument name="data" xsi:type="array">
           <item name="options" xsi:type="object">{Vendor}\{Module}\Model\Form\Source\OptionsMultiselect</item>
           <item name="config" xsi:type="array">
               <item name="dataType" xsi:type="string">text</item>
               <item name="label" translate="true" xsi:type="string">Positions</item>
               <item name="formElement" xsi:type="string">multiselect</item>
           </item>
       </argument>
   </field>

If i add:

<item name="default" xsi:type="string">0,1,2</item>

Between  it will hightlight fields with corresponding id's.

But how do i get the data from the database in there? Or do i need to do it in another way?

Thanks in advance!

<argument name="class" xsi:type="string">{Vendor}\{Module}\Model\DataProvider</argument>

class DataProvider extends AbstractDataProvider
{
    /**
     * @var ResourceModel\Data\Collection
     */
    protected $collection;

    /**
     * @var DataPersistorInterface
     */
    protected $dataPersistor;

    /**
     * @var array
     */
    protected $loadedData;

    /**
     * @param string $name
     * @param string $primaryFieldName
     * @param string $requestFieldName
     * @param CollectionFactory $pageCollectionFactory
     * @param DataPersistorInterface $dataPersistor
     * @param array $meta
     * @param array $data
     */
    public function __construct(
        $name,
        $primaryFieldName,
        $requestFieldName,
        CollectionFactory $pageCollectionFactory,
        DataPersistorInterface $dataPersistor,
        array $meta = [],
        array $data = []
    ) {
        $this->collection    = $pageCollectionFactory->create();
        $this->dataPersistor = $dataPersistor;
        $this->meta           = $this->prepareMeta($this->meta);
        parent::__construct($name, $primaryFieldName, $requestFieldName, $meta, $data);
    }

    /**
     * Prepares Meta
     *
     * @param array $meta
     * @return array
     */
    public function prepareMeta(array $meta)
    {
        return $meta;
    }

    /**
     * Get data
     *
     * @return array
     */
    public function getData()
    {
        if (isset($this->loadedData)) {
            return $this->loadedData;
        }
        $items = $this->collection->getItems();
        foreach ($items as $page) {
            $this->loadedData[$page->getId()] = $page->getData();
        }
        $data = $this->dataPersistor->get('module_messages');
        if (!empty($data)) {
            $page = $this->collection->getNewEmptyItem();
            $page->setData($data);
            $this->loadedData[$page->getId()] = $page->getData();
            $this->dataPersistor->clear('module_messages');
        }
        return $this->loadedData;
    }
}

Didn't change it in here.
Added

 protected function _getLoadSelect($field, $value, $object)
{
    $select = parent::_getLoadSelect($field, $value, $object);

    $select
        ->joinLeft(
            [
                'rel' => $this->getTable('shirtsbedrukken_overprinttable_data_options_rel'),
            ],
            'shirtsbedrukken_overprinttable_data.sod_id = rel.sod_id',
            ['rel.soo_id']
        )
        ->joinLeft(
            [
                'soo' => $this->getTable('shirtsbedrukken_overprinttable_options'),
            ],
            'rel.soo_id = soo.soo_id',
            ['soo_id']
        );
    return $select;
}

Inside \Model\ResourceModel

Was is in the wrong place?


texts: After Migrating to New Server CSS and JS file not loading, also Backend Admin is not Accessible

texts:
I am using magento 1.9. core_config_data urls I have checked it was right, Deleted the cache folder from var, Permission is 777. Still css js are not loading, admin is not accessible.

In the local server it is working fine.


texts:
I've created a new attribute - GTIN.

All I want to do is import my barcodes into the GTIN field per SKU.

sku,additional_attributes

AM0005930-34,gtin=08033546253915

I've created the above .csv, but the import says all my rows are incorrect.

Can I not import my barcodes this way?
My attribute is a text field.

Surely Magento 2 can support this?


texts: How to add Custom Image in minicart after the Proceed to Checkout button in minicart magento2


texts:
I would like to get all customer shipping address to give shipping selection option in product view page itself.

I created a block to appear inside product view page. And I have below code snippet.

It gives all address including billing address.

if(Mage::getSingleton('customer/session')->isLoggedIn()) {
    $customerData = Mage::getSingleton('customer/session')->getCustomer();

    $address = Mage::getModel('customer/address')->load($customerData->getId());

    echo '<pre>'; print_r($address); echo '</pre>';
}

How to get only shipping address in magento?


texts:
in magento2 Admin cms/page i have call like,

{{block class="Mageaddons\Slideshow\Block\Slideshow" template="slideshow.phtml" slideshow_id="1"}}

but in block i run $this->getData('slideshow_id'); is null.
what wrong?


texts: Display configurable product's price and options several times on the same page?

texts:
Is there a native (strong and simple as a bonus) way to repeat the product prices and options (like sizes, colors, etc.) display on the same page ?

Same question shorter (but maybe there is an other way ?) : can I display both "container1" and "container2" blocks on the same page ?

I tried to echo several times the wanted blocks, but I'm experimenting js conflicts because of duplicate input ids : only the last drop-down list (of each option) is functional, others are empty...

I also tried to use both "container1" and "container2" blocks (removing the unsetCallChild calls in layout) but problem is the same : container1's option drop-down lists are populated, but not container2's lists.


texts:
We are seeing more and more spam in product reviews.

Is there a way to enable a Magento default spam killer. Or can we make something like " 3 plus 7  =" enter in box?

I have tried some recaptcha ones. But not all are compliant with Magento 1.8.1 and I have to start digging into template code.


texts: Magento2 Invalid form key. Please refresh the page

texts: I am getting the error "Invalid form key. Please Referesh the page" while create the customer account.


texts: Magento 2 : Set current store throughout the site

texts:
I want to set currentstore according to geoip of customer.for that i have tried below code:

  MagentoDir/app/code/Shasha/Geoip/Observer/Redirect.php

<?php

namespace Shasha\Geoip\Observer;

class Redirect implements \Magento\Framework\Event\ObserverInterface
{

    protected $_objectManager;

    protected $_storeManager;

    protected $_curl;

    /**
     * @var \Magento\Framework\App\ResponseFactory
     */
    private $responseFactory;

    /**
     * @var \Magento\Framework\UrlInterface
     */
    private $_urlInterface;

    protected $_session;

    public function __construct(
        \Magento\Framework\ObjectManagerInterface $objectManager,
        \Magento\Store\Model\StoreManagerInterface $storeManager,
        \Magento\Framework\HTTP\Client\Curl $curl,
        \Magento\Framework\App\ResponseFactory $responseFactory,
        \Magento\Framework\UrlInterface $urlInterface,
        \Magento\Framework\Session\SessionManagerInterface $session
    ) {
        $this->_objectManager  = $objectManager;
        $this->_storeManager   = $storeManager;
        $this->_curl           = $curl;
        $this->responseFactory = $responseFactory;
        $this->_urlInterface   = $urlInterface;
        $this->_session        = $session;
    }

    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $isChangeStore    = $this->_session->getCustomRedirection();
        if(!($isChangeStore)){
            $visitorIp    = $this->getVisitorIp();
            $visitorIp        = '158.69.121.179';  // for canada
            $apiUrl       = "http://www.geoplugin.net/json.gp?ip=".$visitorIp;
            $this->_curl->get($apiUrl);
            $response     = json_decode($this->_curl->getBody(), true);
            $countryCode  = $response['geoplugin_countryCode'];

            if($countryCode != null && $countryCode == 'CA'){
                $this->_session->setCustomRedirection(true);
                $this->_storeManager->setCurrentStore(2);

            }
        }
    }

    function getVisitorIp()
    {
        $remoteAddress = $this->_objectManager->create('Magento\Framework\HTTP\PhpEnvironment\RemoteAddress');
        return $remoteAddress->getRemoteAddress();
    }

}

but unfortunately it not works throughout the site it only change on the home page. now i am stuck how can i proceed?

Any helps??

Thanks in advance..!!!


texts: Error too many redirects after set developer mode

texts:
I have this error after set developer mode in Magento 2.

I have tried to deploy static content, clean cache, flush cache, etc...

Any idea?


texts: New order email missing product image {{layout handle="sales_email_order_items" order=$order}}

texts:
The new order email template is rendering everything except the product image of the order.

This is how the template was trying to call it by default, which doesn't work:

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

This is the error:

Can anyone advise on what might be the problem.

This is the function i worte:

app/design/frontend/base/default/template/email/order/items/order/default.phtml

if ($_item->getProductType() == Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE) {
    $parentId = Mage::getModel('catalog/product_type_configurable')
                       ->getParentIdsByChild($_item->getProductId());
    $_product = Mage::getModel('catalog/product')
                       ->setStoreId($_item->getOrder()->getStoreId())
                       ->load($parentId);
} else {
    $_product = Mage::getModel('catalog/product')
                       ->setStoreId($_item->getOrder()->getStoreId())
                       ->load($_item->getProductId());
}

?>

this is display code:

<img src="<?php echo Mage::getModel('catalog/product_media_config')
                        ->getMediaUrl($_product->getThumbnail()); ?>"  width="135" height="135" alt="<?php echo $_item->getName() ?>" />


texts: How do I get the country of the delivery address from a shipping rate request?

texts:
From all I know $request->getCountryId() should return the country of the delivery address as a two-digit ISO code.

But for me it always returns DE (the location of the store) instead of the country of the delivery address.


texts: Magento2: Mailchimp abandoncart email and data syncing issue

texts:
Magento data is synching with Mailchimp and abandon cart email is also not working

Any idea?

Thanks


texts:
If I have something like this:

<type name="Magento\Downloadable\Ui\DataProvider\Product\Form\Modifier\Composite">
    <arguments>
        <argument name="modifiers" xsi:type="array">
            <item name="downloadablePanel" xsi:type="string">Magento\Downloadable\Ui\DataProvider\Product\Form\Modifier\DownloadablePanel</item>
            <item name="links" xsi:type="string">Magento\Downloadable\Ui\DataProvider\Product\Form\Modifier\Links</item>
            <item name="samples" xsi:type="string">Magento\Downloadable\Ui\DataProvider\Product\Form\Modifier\Samples</item>
            <item name="usedDefault" xsi:type="string">Magento\Downloadable\Ui\DataProvider\Product\Form\Modifier\UsedDefault</item>
        </argument>
    </arguments>
</type>

and I want to change one of these classes in <item> nodes. Is it possible via di.xml?

I have used <preference> and it worked, but I don't feel as it is best solution. Of course for public methods plugin should work. What in case of protected or private method?


texts: Save custom customer attribute value in observer programmatically | Magento 2

texts:
I can save custom customer attribute value by frontend controller as:
protected $customer;

protected $customerFactory;

public function __construct(
    \Magento\Customer\Model\Customer $customer,
    \Magento\Customer\Model\ResourceModel\CustomerFactory $customerFactory,
    \Magento\Framework\App\Action\Context $context
)
{
    $this->customer = $customer;
    $this->customerFactory = $customerFactory;
    parent::__construct($context);
}

...
...
        $customerId = 1;
        $customer = $this->customer->load($customerId);
        $data = "customer attribute4 value";
        $customerData = $customer->getDataModel();
        $customerData->setCustomAttribute('customer_code',$data);
        $customer->updateData($customerData);
        $customerResource = $this->customerFactory->create();
        //print_r($customerResource);exit;
        $customerResource->saveAttribute($customer, 'customer_code');echo "saved";exit;

But with same, value is not getting saved from observer class. No Value is showing in customer grid as well as in Db table.
I am using observer
<event name="sales_order_save_after">

Also I tried to save value from helper class same issue is from there! Please share the right way to save value.


texts: Difference between catalog_product_save_after and catalog_product_save_commit_after?

texts:
Can anyone explain the difference between these events. Just the quick and dirty please. Thank you.

I have an Observer method like so:

public function detectProductChanges($observer)
    {
        $product = $observer->getProduct();
        $old = $product->getOrigData();
        $new = $product->getData();
        if ($product->hasDataChanges() && $old['status'] == 1 && $new['status'] == 2) {
            $this->_sendStatusMail($product);
        }
    }

It's not getting to the sendStatusMail()

I'm hooking into the event:

        <events>
            <catalog_product_save_after>
                <observers>
                    <productchange>
                        <type>singleton</type>
                        <class>A_ProductNotification_Model_Observer</class>
                        <method>detectProductChanges</method>
                    </productchange>
                </observers>
            </catalog_product_save_after>
        </events>

Should i be using: catalog_product_save_commit_after

GOAL:

Have an email sent after product is disabled.

private function _sendStatusMail($product)
    {
        if (!Mage::getStoreConfig('trans_email/ident_custom3/email')) return false;
        $emailTemplate = Mage::getModel('core/email_template');
        $emailTemplate->loadDefault('elec_productnotification_tpl');
        $emailTemplate->setTemplateSubject('Product has been disabled');
        $emailTemplate->setSenderEmail($salesData['email']);
        $emailTemplateVariables['style_number']   = $product->getElecStyle();
        $emailTemplateVariables['frame_color']    = $product->getAttributeText('frame_color');
        $emailTemplateVariables['size']           = $product->getAttributeText('size');
        $emailTemplateVariables['elec_color'] = $product->getAttributeText('elec_color');
        $emailTemplateVariables['store_name']   = Mage::getModel('core/store')->load($product->getStoreId())->getName();
        $emailTemplateVariables['product_name'] = Mage::getModel('catalog/product')->load($product->getId())->getName();
        $emailTemplateVariables['product_sku']  = $product->getSku();
        $emailTemplateVariables['dates']        = date("F jS Y h:i:sA", strtotime('-7 hours'));
        // Get General email address (Admin->Configuration->General->Store Email Addresses)
        $emails = explode(',', Mage::getStoreConfig('trans_email/ident_custom3/email'));
        foreach ($emails as $email) $emailTemplate->send($email, $product->getStoreId(), $emailTemplateVariables);
    }
}


texts:
I have a magento with 4 languages: spanish, english, french and italian. When a customer does an order, the order email is sent in his language. I mean, if a customer does an order in the English Store, the email send to the customer is in english. Up here all right.

The problem is I need that email that the administrator is sent with every order is always in Spanish.


texts: Magento 1.9 Registration not possible after upgrade

texts:
We upgraded our shop from 1.8.1.0 in several steps to 1.9.3.7.
Now an error occurs.
The checkout will not be forwarded after sending the registration form. No error message appears.


texts: Categories - how to alphabetically sort multiple root categories

texts:
I am successfully using the code provided by Marius (thank you Marius) to sort categories alphabetically.

Categories - how to display in alphabetical order? (Programmatically)

<?php
//set error reporting to see if something is wrong.
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', 1);
define('MAGENTO_ROOT', getcwd());
$mageFilename = MAGENTO_ROOT . '/app/Mage.php';
require_once $mageFilename;
//set developer mode for additional debug functionality
Mage::setIsDeveloperMode(true);
//instantiate Mage_Core_Model_App;
Mage::app();
//set the initial parameters for the function
$root = 1;
$conn = Mage::getSingleton('core/resource')->getConnection('core_write');
//sort categories
orderCategories($root, $conn);

function orderCategories($parentId, $conn){
    //The position field is in the main category table
    //add prefix if you have one
    $table = 'catalog_category_entity';
    //get the children for a specific category id
    $collection = Mage::getModel('catalog/category')->getCollection()
        ->addAttributeToSelect('name')
        ->addFieldToFilter('parent_id', $parentId);
    $categories = array();
    foreach ($collection as $category){
        //in case there are 2 categories with the same name we shouldn't skip them
        //but there shouldn't be
        $categories[$category->getName().'_'.$category->getId()] = $category->getId();
    }
    //sort categories by name
    ksort($categories);
    //set their position
    $position = 1;
    foreach ($categories as $name=>$id){
        $q = "UPDATE {$table} SET `position` = {$position} where `entity_id` = {$id}";
        $conn->query($q);
        $position++;
        //sort the current category children by calling the same function recursively
        orderCategories($id, $conn);
    }
}

I haven't modified the code at all and it works perfectly, but only on the first root category. I have multiple stores, each with it's own root category, so I would like to modify the code to work on all root categories or, preferably, be able to nominate an individual root category for sorting. Any help with achieving this will be much appreciated.

Edit: I have tried changing the value of $root to different category IDs (eg. $root = 5;) but it doesn't make any difference. Is category ID the correct value to be using for $root if I want to specify the root category for this function?


texts: how to configure Consumer_run for async.operations.all?

texts:
I have enabled my custom modules for certain functionality, successfully deployed but magento2 admin portal prompts me "something went wrong" when I click my newly installed module.(the module is not working)

I headed to system.log and I found this,  which are responsible to the error

> main.INFO: Consumer "async.operations.all" skipped as required
> connection "amqp" is not configured. Unknown connection name amqp []
> []

Update

I check (https://devdocs.magento.com/guides/v2.3/config-guide/mq/manage-message-queues.html)
And I m required to add external MQ, thus I followed the guide by adding  line below to my magentoroot/app/etc/env.php

>   'cron_consumers_runner' => array(
>         'cron_run' => false,
>         'max_messages' => 20000,
>         'consumers' => array(
>             'async.operations.all',
>         )
>     ),

I believe i need to somehow include this  'async.operations.all' as consumers.It displayed in my bin/magento consumer:list,yet it still not working ,what did I miss here?

tried re-upgrade ,compile & deploy with sudo chmod -777 on var/www/html and clearing cache.

Update
On magentoroot/vendor/magento/module-webapi-async/etc/queue_consumer.xml

> <?xml version="1.0"?> <!-- /**  * Copyright © Magento, Inc. All rights
> reserved.  * See COPYING.txt for license details.  */
> --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>         xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/consumer.xsd">
>     <consumer name="async.operations.all" queue="async.operations.all" connection="cron_consumers_runner"
>               consumerInstance="Magento\AsynchronousOperations\Model\MassConsumer"/>
> </config>

& queue_topology.xml

> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/topology.xsd">
>     <exchange name="magento" type="topic" connection="cron_consumers_runner">
>         <binding id="async.operations.all" topic="async.#" destinationType="queue" destination="async.operations.all"/>
>     </exchange> </config>

With both updated on connection with 'db' or 'cron_consumers_runner'.I do compile and clear cache, headed to the admin portal.S till the same (Attention, Something went wrong, module not working).

I head back to system.log, now there is no error anymore.


texts: How can i create a custom page for product listing in magento 2

texts: i have created a module and i got the respone in phtml but dont know how to design it same as listing help me to create a custom page for product listing in magento 2


texts:
How to implement backend user registration for buyers who wish to use telephonic service to buy a product from my online shop. How do I go about it? I need backend management of specific user data and inventory management based on the telephonic purchases.
-edit-
For further clarity on question: instead of web interface, if the user wish to buy a product from store using telephone service, then how can an admin add that transaction to user account and maintain store inventory?


texts: Disabling/hiding shopping cart for a logged in customer

texts:
I'd like to set a login for a customer where he/she, can just surf through the products but cannot check out.

Is it possible in Magento ver. 1.8.1.0?


texts:
How can I fetch a list (array) of all defined product attributes? (basically I need the code and label).

edit:

The attributes
I need this to dynamically generate ACLs for all product attributes that exist in the shop. (working on a module for Hide Attributes and Other Fields in Product Edit Backend)


texts: CSS only applies to widescreen devices, not mobile in Magento 1.x

texts: CSS only applies to widescreen devices, not mobile. This isn't reponsive because when I use F12 in the browser and select the reponsive mode, it still has css but when reloading on it it no longer shows that css. I don't know what this is? How to fix it?


texts: AddColumn for Admin Grid - setting default value for values not in array

texts:
I am trying to display values in a column of a admin grid. The typical portion of code is as follows in _prepareColumns() in the class that extends Mage_Adminhtml_Block_Widget_Grid :

$this->addColumn(
    'destination',
    array(
        'type'   => 'options',
        'header' => Mage::helper('clothingcandy_customersort')->__('Customer Group Destination'),
        'width'  => '50px',
        'index'  => 'destination',
        'options'   => $optionarray,
    )
);

While $optionarray contains most values, there might be one or two cases which is missing.

Is there a way to set a "default" label for the values that are not contained in $optionarray?


texts: how can i change length of meta description from 255

texts:
I tried to update the meta descriptions for my products so that they are different to the normal description.

My main problem is, I need to change meta description length of the products is shown as the meta description.

how can I change the length of meta description from 255 to other lengths in products admin page or pages and which file and code?


texts:
was able to create shopping in magento but i am facing 3 issues

1> Encoding problem (double UTF8 encoding) in attribute: description
2> Google category product (how to add it as its google predefined )
3> Invalid or missing required attribute: link

https://support.google.com/merchants/answer/6324436?hl=en
Link provided by google for the predefined product category
 Tried with the below link
How can I add a Google Content Attribute (Google Shopping)

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <rss version="2.0" xmlns:g="http://base.google.com/ns/1.0">
      <channel>
        <title>Magento Store</title>
        <link>{{ context.store.base_url }}</link>
        <description>Products for Magento Store.</description>
        {% for product in context.products %}
        <item>
          <g:id><![CDATA[{{ product.sku }}]]></g:id>
          <g:sku><![CDATA[{{ product.sku }}]]></g:sku>
          <g:title><![CDATA[{{ product.name  }}]]></g:title>
          <g:price>{{ product.finalPrice }} YEN</g:price>
          <g:condition>new</g:condition>
          <g:availability>in stock</g:availability>
          <g:sale_price>{{ product.finalPrice }} YEN</g:sale_price>
          <g:image_link>{{ product.image }}</g:image_link>
          <g:link>{{ product.url }}</g:link>
          <g:product_type><![CDATA[{{ product.category.path }}]]></g:product_type>
          <g:google_product_category><![CDATA[]]></g:google_product_category>
         <g:brand><![CDATA[{{ product.manufacturer }}]]></g:brand>
          <g:description><![CDATA[{{ product.desc_features  }}]]></g:description>
  <g:gtin><![CDATA[{{ product.gtin }}]]></g:gtin>
          <g:mpn>{{ product.parent.sku }}</g:mpn>
          <g:package_height>{{ product.ts_dimensions_height }}</g:package_height>
          <g:package_length>{{ product.ts_dimensions_length }}</g:package_length>
          <g:package_width>{{ product.ts_dimensions_width }}</g:package_width>
          <g:package_weight>{{ product.weight }} kg</g:package_weight>
        </item>
        {% endfor %}
      </channel>
    </rss>


texts: Magento 2 Rest API: Generate Auth Token for guest user

texts:
I need to generate authentication Token for guest user. I have checked in documentation, we can only generate Auth Token for customer and admin. Other resource can be accessed using anonymous role.

But as per application logic we are developing, It is require to save some user specific values to provide data.


texts: Notice: Undefined index: in /RendererFactory.php on line 66

texts:
Getting an Undefined Index error in RendererFactory.php. When dumping out what its looking for string(39) "dev/front_end_development_workflow/type" string(5) "store" is what I get.

Now it's in the database in core_config_data. I'm running out of ideas at the moment!

Thanks


texts:
Am using magento 1.9.2.3. I want to use the same theme but use different categories and products by creating seperate store. I referred  This link

In that I gave the url as http://127.0.0.1/magento/mystore2.com/ in secure and unsecure url option. But when I open the site with this url, I am getting the default category from my old store. And my old store url is http://127.0.0.1/magento
Somebody kindly guide me and tell me where have I went wrong?


texts:
I'm troubleshooting an issue whereby the checkout will not progress past Billing Information. I have checked other similar issues and tried updating payment.phtml to no avail. I notice there is an error saying:

  Error: "throw $continue" is deprecated, use "return" instead

Is this causing the issue and if so, how would I go about fixing it? The page is:
http://www.trenddesignsathome.co.uk/checkout/onepage/

I'm new to Magento, so please bear with me.


texts: tax configuration blank after migration (and upgrade) 2.3.2 -> 2.3.3

texts:
We migrated from magento-1.9.2.4 to magento-2.3.2 without problems so far.
After upgrading to magento-2.3.3 (using composer) the tax configuration (Sotres -> Configuration -> Sales -> Tax) page only shows a white screen.

Therefore we tested to migrate from magento-1.9.2.4 directly to magento-2.3.3 - same outcome.

Sadly there is no error shown in the system.log or any info in the debug.log. No exception.log or reports were created.

We truncated all tax_*-tables - still same outcome.
we remove all %tax% entries from core_config_data table  - still same outcome.

Cache is disabled.

Source code of blank page:

<form action="http://10.0.0.12:8000/magento2/2.3.2/382t9egh/admin/system_config/save/key/f9315ea2f5be58a51fd9aa811d3511d684705a4260a366d5c0854759124fdf24/section/tax/" method="post" id="config-edit-form"
      enctype="multipart/form-data">

<input name="form_key" type="hidden" value="c2Q2qjPKd7aIDSZK" />

That's all we got.
Any idea what causes the problem?
If not: any idea how to investigate or start proper testing?


texts: Magento2: How to add modal inside my module like customer address modal?

texts: How to add modal form inside my module like customer address modal?


texts: Fixture for a product's group price not working

texts:
I'm using EcomDev_PHPUnit on Magento EE 1.14.2.1, and am trying to set up a simple unit test for a configurable and simple product which have group prices associated, but I'm not having any luck getting the fixture to work.

My test:

# File: .../ObserverTest.php
/**
 * @loadFixture stores
 * @loadFixture
 */
public function testGroupPriceExample()
{
    $configurable = Mage::getModel('catalog/product')->load(1);
    var_dump($configurable->getData('group_price'));
}

For now, I just want to output the group_price as happens when I do this through the observer subject class that I want to test.

My fixtures:

# File: fixtures/stores.yaml
scope:
    website:
        - website_id: 1
          code: us_eng
          name: United States
          default_group_id: 1
    group:
        - group_id: 1
          website_id: 1
          name: United States
          default_store_id: 1
          root_category_id: 2
    store:
        - store_id: 1
          website_id: 1
          group_id: 1
          code: us_eng
          name: United States

The stores fixture works fine, and I have used it in plenty of other unit tests.

The product fixture:

# File: fixtures/testGroupPriceExample.yaml
# Set up a configurable with group pricing and a bunch of simples without
eav:
    catalog_product:
        - entity_id: 1
          sku: 12345/RED/
          name: Configurable
          attribute_set_id: 4
          entity_type_id: 4
          type_id: configurable
          group_price: test
        - entity_id: 2
          sku: 12345/RED/S
          attribute_set_id: 4
          entity_type_id: 4
          name: Some simple
          type_id: simple
        - entity_id: 3
          sku: 12345/RED/M
          attribute_set_id: 4
          entity_type_id: 4
          name: Another simple
          type_id: simple
tables:
    # Set up the simple/configurable relationships
    catalog/product_relation:
        - parent_id       : 1
          child_id        : 2
        - parent_id       : 1
          child_id        : 2
    # Set up the customer group
    customer/customer_group:
        - customer_group_id: 4
          customer_group_code: Loyalty Group
          tax_class_id: 3

I've tried a bunch of different ways of getting a group price set, e.g. under tables: catalog/product_group_price (results in fixture load failure), eav: catalog/product_group_price (same), directly as an attribute on the product entity e.g. group_price: 123.00 and still I always get NULL from the var_dump in my unit test.

Has anyone created a group price fixture before and could point me in the direction of how to do it?

FYI the stores fixture is in place so that I can fixture a product's group price to be say "$25.99" for Loyalty Group (group_id 4) and the US website (website_id 1).


texts: .js and .css files suddenly giving 404, making the entire website become without any formatting or functionality!

texts:
This morning I got a call from our client about how their website is no longer loading correctly, showing all text, no formatting, etc.. Even the admin page login wasn't working correctly.

I opened the website and I got this error:

All coming from .js and .css files. Upon clearing the var/cache folder from the command line, it worked again all on its own.

However, I still can't figure out what caused the error to prevent from happening again. Apache and Magento error logs show nothing aside from the 404 for the files.

What could possibly have caused this error? And how to prevent it from happening again?


texts:
I would like to override /vendor/magento/module-catalog/Block/Product/View/Gallery.php file getGalleryImagesJson function

In result I would like to get -

public function getGalleryImagesJson()
{
    $imagesItems = [];
    foreach ($this->getGalleryImages() as $image) {
        $imagesItems[] = [
            'thumb' => $image->getData('small_image_url'),
            'img' => $image->getData('medium_image_url'),
            'full' => $image->getData('large_image_url'),
            'caption' => ($image->getLabel() ?: $this->getProduct()->getName()),
            'position' => $image->getPosition(),
            'isMain' => $this->isMainImage($image),
            'type' => str_replace('external-', '', $image->getMediaType()),
            'videoUrl' => $image->getVideoUrl(),
            'video' => $image->getVideoUrl(), //This is new
        ];
    }
    if (empty($imagesItems)) {
        $imagesItems[] = [
            'thumb' => $this->_imageHelper->getDefaultPlaceholderUrl('thumbnail'),
            'img' => $this->_imageHelper->getDefaultPlaceholderUrl('image'),
            'full' => $this->_imageHelper->getDefaultPlaceholderUrl('image'),
            'caption' => '',
            'position' => '0',
            'isMain' => true,
            'type' => 'image',
            'videoUrl' => null,
            'video' => null, //This is new
        ];
    }
    return json_encode($imagesItems);
}

How can I do that?
I've tried using preference but then thumbnails doesn't show anymore and I've also tried using plugins but can't really understand how to override it using plugin...

Thank you for any help!


texts:
i am on the way to create a custom module for sliding. But always its driving me crazy on jquery issues. Sometime the js will load and everything will be fine. After sometime, jquery wont get loaded.

var config = {
map: {
    '*': {
             'flexslider': 'Slidermodule_Mymodule/js/jquery.flexslider-min'
    }
} };

and the script looks like

require([ 'jquery', 'flexslider', 'domReady!'], function(){   jQuery(document).ready(function () {
jQuery('.flexslider').flexslider();  });  });

Some time there is no error. Sometime there is error on refresh. Please advise.


texts: Cancelling an order programmatically and notify customer

texts:
I'm using an extension which cancels an order after X days old. However, customers are not being notified about it. See my code:

if($order_bis->canUnhold()) {
    $order_bis->unhold()->save();
}
if ($order_bis->canCancel()) {
    Mage::log( '[kinento-reminder] Canceling order '.$order_bis->getIncrementId().' ('.$cancelprepaid->getTimestamp().' > '.$orderdate.')', null, 'kinento.log', true );
    $order_bis->cancel();
    $order_bis->addStatusToHistory($order_bis->getStatus(), 'Cancelado automaticamente', true);
    $order_bis->save();
    Mage::getSingleton( 'adminhtml/session' )->addSuccess( Mage::helper( 'reminder' )->__( 'Order %d canceled', $order_bis->getIncrementId() ) );
}

Is there something wrong here?


texts: Adding a layout update handle in the category backend "XML Layout update" does not work

texts:
I have created the file

frontend/layout/foo_example.xml

in a custom module.

Now I want to "call" this update in the category backend

This does not have any effect.

If I create the file catalog_category_view_id_15.xml in the same module with the contents

<?xml version="1.0" encoding="UTF-8"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <update handle="foo_example" />
</page>

it works fine.

Why is that?


texts:
In magento 1.9

I want to overwrite the function prepareProductCollection($collection) of the catalog/layer model.

Because, I only want to display simple products, so I want to do:

public function prepareProductCollection($collection){

        $collection->addAttributeToSelect(Mage::getSingleton('catalog/config')
        ->getProductAttributes())
        ->setStore(Mage::app()->getStore())
        ->addMinimalPrice()
        ->addFinalPrice()
        ->addTaxPercents()
        ->addStoreFilter()
        ->addUrlRewrite();

    if(Mage::helper('catalogsearch')->getQuery()->getQueryText())
    {
        $collection->addSearchFilter(Mage::helper('catalogsearch')
        ->getQuery()->getQueryText());
    }

    $ids = VF_Singleton::getInstance()->getProductIds();
    if($ids)
    {
        $collection->addIdFilter($ids);
    }

    Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection);
    Mage::getSingleton('catalog/product_visibility')->addVisibleInSearchFilterToCollection($collection);

    return $this;
}

But when I do that, I have this error:

  SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1

See the full error (including trace) here:
http://i.stack.imgur.com/5XO5Z.png


texts: Custom block on success page for my Payment Method

texts:
I'm developing a custom payment method and I'd like it to show some info (related to the payment method) on the success page.

How can I do this?

I've tried appending the block to the checkout_onepage_success content but I got nothing but errors.

<checkout_onepage_success translate="label">
    <reference name="content">
        <reference name="checkout.success">
            <action method="setChild">
                <block type="checkbuy/success" name="checkbuy.success" template="checkbuy/success.phtml" />
            </action>
        </reference>
    </reference>
</checkout_onepage_success>

EDIT:
I also tried using <action method="append"> but it caused big PHP errors.

EDIT 2:
I need the block only to be shown when my payment method is selected, I don't want to override the standard success page if the client uses other payment method.


texts:
So I am working on this export for a SOAP web service, I am currently getting the order information from the following namespace \Magento\Sales\Api\OrderRepositoryInterface but the thing is it doesn't return more specific that to the billing.

How can I get information like, postcode, order email etc? Is there any class for example BillingOrderRepositoryInterface?

Thank you.


texts: Magento 2.4.2: SyntaxError: Unexpected token: name (url)

texts:
I'm following the instructions to get advanced JS bundling done. I have been doing this over a year without much difficulty. This time around, I find the error below and I would like to know if there is a solution to this. Thanks.
SyntaxError: Unexpected token: name (url)

A line appearing after this line seems to give some clue as to what could be done to fix this.
If the source uses ES2015 or later syntax, please pass "optimize: 'none'" to r.js and use an ES2015+ compatible minifier after running r.js. The included UglifyJS only understands ES5 or earlier syntax.

The command below causes this error.
r.js -o build.js


texts: How To Override Core Files In Custom Module

texts:
Hello I Have Created A Custom Module.
In This Module I Have To Override Two Core Files.

And Do Some Changes in This FIles.

Path Is.

C:\xampp2\htdocs\mymagento\app\code\core\Mage\CatalogInventory\Model\Stock\Item.php
C:\xampp2\htdocs\mymagento\app\code\core\Mage\CatalogInventory\Model\Observer.php

How To Do This?
Pls Guide Me..

In The Core Observer File public function checkQuoteItemQty($observer) Function.

That Function I Have To Copy In My Custom module Observer.

Now, How Can I Override This Function in Config.xml?

Using Both The Observer File>


texts: How to add serial number with products in Magento 2

texts: I need to module that is able to attachment a serial number to each product sold in Magento 2


texts: Mega Menu dropdown works only in home page

texts:
The mega menu works right in homepage, but when a customer searches for a product, it doesn't drop down.

As you can see the menu highlights green but it should drop down to this

I change the css for the z-index to 9999999 as advised in the Algolia forums but this didn't work. Any ideas guys as I'm stumped.


texts: Multi-website setup. website code in all generated urls

texts:
I've got several websites running on magento 1.8.1 and I recently noticed something has changed. I have no idea how this change happened, or how long it has been like this. I do know that it was behaving correctly at some point and now it's different.

In the configuration and store management, I set up the following websites with the following website codes:

Website 1:
Name: Site A
Code: site_a
Base URL: httq://site-a,com/

Website 2:
Name: Site B
Code: site_b
Base URL: httq://site-b,com/

Website 3:
Name: Site C
Code: site_c
Base URL: httq://site-c,com/

Now when I visit the sites, the urls that magento is generating look like this:

httq://site-a,com/site_a/product-1.html
httq://site-a,com/site_a/product-2.html

httq://site-b,com/site_b/product-1.html
httq://site-b,com/site_b/product-2.html

httq://site-c,com/site_c/product-1.html
httq://site-c,com/site_c/product-2.html

They should look like this:

httq://site-a,com/product-1.html
httq://site-a,com/product-2.html

httq://site-b,com/product-1.html
httq://site-b,com/product-2.html

httq://site-c,com/product-1.html
httq://site-c,com/product-2.html

Anyone know what might have caused this? Or what I can do to fix it? Maybe just point me in the right direction to start looking and change the code that generates the urls?

ps. sorry the urls look funky, the site wouldn't allow me to post a comment with lots of links. just replace the qs with ps and the commas with periods. you get the idea :)


texts: Magento 2 shows 404 error and front end css crashed

texts:
I have installed Magento 2 successfully.

When i am trying to open front end that looks like this picture and backend shows 404 error. how to solve this?


texts: Remove Duplicate product Images in Magento 2

texts:
I have created a script file to delete all the duplicate product images.

Here is the code I used.

<?php
 error_reporting(E_ALL);
 use \Magento\Framework\App\Bootstrap;
 require __DIR__ . '/app/bootstrap.php';
 $bootstrap = Bootstrap::create(BP, $_SERVER);
 $obj = $bootstrap->getObjectManager();
 $app_state = $obj->get('\Magento\Framework\App\State');
 $app_state->setAreaCode('global');
 ini_set('memory_limit','10240M');
 ini_set('max_execution_time', 0);
 set_time_limit(0);

 $mediaApi = $obj->create('\Magento\Catalog\Model\Product\Gallery\Processor');
 $storeManager = $obj->get('\Magento\Store\Model\StoreManagerInterface');
 $mediaUrl = $storeManager->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA);
 $directoryList=$obj->get('\Magento\Framework\App\Filesystem\DirectoryList');
 $path = $directoryList->getPath('media');
$productCollection=$obj->create('Magento\Catalog\Model\ResourceModel\Product\Collection');
$_products = $productCollection->addAttributeToSelect('*')->load();
$i =0;
$total = count($_products);
$count = 0;
foreach($_products as $_prod)
{
    $_product = $obj->create('Magento\Catalog\Model\Product')->load($_prod->getId());
$_md5_values = array();

$base_image = $_product->getImage();

if($base_image != 'no_selection')
{
    $mediaUrl = $storeManager->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA);
    $filepath = $path.'/catalog/product' . $base_image ;
    if(file_exists($filepath))
        $_md5_values[] = md5(file_get_contents($filepath));
}
$i ++;
 // echo "\r\n processing product $i of $total ";

 // Loop through product images
 $_images = $_product->getMediaGalleryImages();

 if($_images)
   {
    foreach($_images as $_image)
    {
        //protected base image
        if($_image->getFile() == $base_image)
            continue;
        $filepath = $path.'/catalog/product' .$_image->getFile();
        if(file_exists($filepath))
            $md5 = md5(file_get_contents($filepath));
        else
            continue;

        if( in_array( $md5, $_md5_values ))
        {
            $mediaApi->removeImage($_product, $_image->getFile());

            echo "\r\n removed duplicate image from ".$_product->getSku();
            $count++;
        }
        else
        {
            $_md5_values[] = $md5;
        }
    }
  }
  $_product->save();
}

Above script removes if same image file exist for a product, then only it will remove it,

In my case if same image imported multiple times for a product, that is created as image.jpg and image_1.jpg.

I need to remove all duplicate images(which are _1,_2 etc) for all the products.

Please correct me in the above script, to remove duplicate image for the product. Thanks


texts: Magento2 developer mode and fatal errors

texts:
Magento2 is set in developer mode (deploy:mode:set developer and checked env.php file) but it is showing a HTTP ERROR 500 page isn't working screen.

Only if I add this to the index:

error_reporting(E_ALL);
ini_set('display_errors', 1);

I receive the error:

Fatal error: Class '...\Framework\App\Action\Action' not found in /data/web/public/app/code/.../Controller/Index/Index.php on line 15

Is something missing in my apache configuration? I'm using hypernode vagrant box for magento2.


texts: Cart rule is not applied for Euro Currency format

texts:
Below are the cart rule which is working fine for $ currency format but it is not working or Euro currency format,Please help on this
Apply the rule only if the following conditions are met (leave blank for all products).
If ALL  of these conditions are TRUE :
Subtotal  greater than  399


texts: Maintenance Mode is not going to 503 Page

texts:
Normally when you enter maintenance Mode, Magento is supposed to return a 503 Error, and redirect to a customizable page.

Right now, when I enable maintenance mode, Magento returns a 500 error, and displays the following message:

Unable to proceed: the maintenance mode is enabled.
#0 /root/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Bootstrap->assertMaintenance()
#1 /root/index.php(40): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#2 {main}

Nothing shows up in Magento or server logs. How can I fix this?


texts: How to add Home Page url key for all scopes programmatically using Recurring.php magento 2

texts:
I tried to add Home Page URL key programmatically using Recurring.php

Normally from Magento Admin backend:

  STORES -> GENERAL -> Web -> Default Pages -> Default Web URL:

I tried using

  Vendor/Module/Setup/Recurring.php

<?php

namespace Vendor\Module\Setup;

use Magento\Framework\Setup\InstallSchemaInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\SchemaSetupInterface;
use Magento\Framework\App\Config\ScopeConfigInterface;

class Recurring implements InstallSchemaInterface
{
    const default_web_url  = 'cms';
    protected $_configInterface;

        /**
     *  @var \Magento\Framework\App\Config\Storage\WriterInterface
     */
    protected $configWriter;

    /**
     *
     * @param \Magento\Framework\App\Config\Storage\WriterInterface $configWriter
     */
    public function __construct(
        \Magento\Framework\App\Config\Storage\WriterInterface $configWriter
    ) {
         $this->configWriter = $configWriter;
      }

    public function install(SchemaSetupInterface $setup, ModuleContextInterface $context)
    {
       $value = self::default_web_url;
       $this->configWriter->save('web/default/front',  $value, $scope = ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $scopeId = 0);

    }
}

In my local, this value is storing for all store view scopes($scopeId = 0) but in our server, it's setting value for only one store view.

This is the issue I am facing here if anyone having any idea please guide me.

  Thanks in Advance !!!!.


texts: Magento2: how to get customer collection using search functionality?


texts: Listing Random Products from all Subcategories of a Parent Category

texts:
I need some help. I have the following category structure

category>subcagtegory>subsubcategory

The parent is an empty category that serves as a landing page. I need to display a list of random products from all the subcategories and subsubcategories on the parent landing category. Right now I have the following Random.php

class Mage_Catalog_Block_Product_List_Random extends Mage_Catalog_Block_Product_List
{
    protected function _getProductCollection()
    {
        if (is_null($this->_productCollection)) {
            $categoryID = $this->getCategoryId();
            if($categoryID)
            {
              $category = new Mage_Catalog_Model_Category();
              $category->load($categoryID);
              $collection = $category->getProductCollection();
            } else
            {
              $collection = Mage::getResourceModel('catalog/product_collection');
            }
            Mage::getModel('catalog/layer')->prepareProductCollection($collection);
            $collection->getSelect()->order('rand()');
            $collection->addStoreFilter();
            $numProducts = $this->getNumProducts() ? $this->getNumProducts() : 3;
            $collection->setPage(1, $numProducts)->load();

            $this->_productCollection = $collection;
        }
        return $this->_productCollection;
    }
}

and I call it on the parent's category "Custom Layout Update" like this:

<reference name="content">
     <block type="catalog/product_list_random" name="product.list.random" template="catalog/product/random.phtml">
        <action method="setCategoryId"><category_id>3</category_id></action>
        <action method="setColumnCount"><count>5</count></action>
        <action method="setNumProducts"><num_products>20</num_products></action>
    </block>
</reference>

What I need is to be able to specify a category ID in the XML just as I do now. But instead of listing products from one parent category (as it does now), I need to list products from all of its subcategories and subsubcategories. I believe I need an array of some sort but I am a PHP n00b so need help writing clean code.


texts:
Magento Success Message Issue when add product it will displays on different page like when we go to contact page it will display on that page means it will not display on product page and it display on another page.

Please Provide me hints for to resolve it


texts: Getting current customer in custom REST API module

texts:
I'm trying to build a series of custom requests for an Android app. Specifically I need to make use of the current customer Id in several of my requests. I've only been using magento for a few weeks, and I'm completely stumped. How can I get the current customer session if the session is stored as a cookie in the browser?

My request is just a join of a few tables based on the customerId, but I can't get a valid id in the first place. Does anyone have any insight on how I can leverage the oauth token to get the related customerId? That's the only idea I've had, but I don't know how to go about it.

Any help would be immensely useful!


texts: MYSQL ERROR [1045] Acces denied for user 'username'@'localhost' (using password: YES)

texts:
I tried to put my Magento webshop to the godaddy server, but i get this error:

a:4:{i:0;s:97:"SQLSTATE[HY000] [1045] Access denied for user 'username'@'localhost' (using password: YES)";i:1;s:2793:"#0 G:\PleskVhosts\html\httpdocs\lib\Zend\Db\Adapter\Pdo\Mysql.php(111): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 G:\PleskVhosts\html\httpdocs\lib\Varien\Db\Adapter\Pdo\Mysql.php(396): Zend_Db_Adapter_Pdo_Mysql->_connect()
#2 G:\PleskVhosts\html\httpdocs\lib\Zend\Db\Adapter\Abstract.php(460): Varien_Db_Adapter_Pdo_Mysql->_connect()
#3 G:\PleskVhosts\html\httpdocs\lib\Zend\Db\Adapter\Pdo\Abstract.php(238): Zend_Db_Adapter_Abstract->query('SET NAMES utf8', Array)
#4 G:\PleskVhosts\html\httpdocs\lib\Varien\Db\Adapter\Pdo\Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('SET NAMES utf8', Array)
#5 G:\PleskVhosts\html\httpdocs\app\code\core\Mage\Core\Model\Resource.php(179): Varien_Db_Adapter_Pdo_Mysql->query('SET NAMES utf8')
#6 G:\PleskVhosts\html\httpdocs\app\code\core\Mage\Core\Model\Resource.php(110): Mage_Core_Model_Resource->_newConnection('pdo_mysql', Object(Mage_Core_Model_Config_Element))
#7 G:\PleskVhosts\html\httpdocs\app\code\core\Mage\Core\Model\Resource\Db\Abstract.php(320): Mage_Core_Model_Resource->getConnection('core_write')
#8 G:\PleskVhosts\html\httpdocs\app\code\core\Mage\Core\Model\Resource\Db\Abstract.php(350): Mage_Core_Model_Resource_Db_Abstract->_getConnection('write')
#9 G:\PleskVhosts\html\httpdocs\app\code\core\Mage\Core\Model\Resource\Db\Abstract.php(335): Mage_Core_Model_Resource_Db_Abstract->_getWriteAdapter()
#10 G:\PleskVhosts\html\httpdocs\app\code\core\Mage\Core\Model\Resource\Cache.php(53): Mage_Core_Model_Resource_Db_Abstract->_getReadAdapter()
#11 G:\PleskVhosts\html\httpdocs\app\code\core\Mage\Core\Model\Cache.php(478): Mage_Core_Model_Resource_Cache->getAllOptions()
#12 G:\PleskVhosts\html\httpdocs\app\code\core\Mage\Core\Model\Cache.php(520): Mage_Core_Model_Cache->_initOptions()
#13 G:\PleskVhosts\html\httpdocs\app\code\core\Mage\Core\Model\App.php(1202): Mage_Core_Model_Cache->canUse('config')
#14 G:\PleskVhosts\html\httpdocs\app\code\core\Mage\Core\Model\Config.php(414): Mage_Core_Model_App->useCache('config')
#15 G:\PleskVhosts\html\httpdocs\app\code\core\Mage\Core\Model\Config.php(294): Mage_Core_Model_Config->_canUseCacheForInit()
#16 G:\PleskVhosts\html\httpdocs\app\code\core\Mage\Core\Model\App.php(424): Mage_Core_Model_Config->loadModulesCache()
#17 G:\PleskVhosts\html\httpdocs\app\code\core\Mage\Core\Model\App.php(354): Mage_Core_Model_App->_initModules()
#18 G:\PleskVhosts\html\httpdocs\app\Mage.php(684): Mage_Core_Model_App->run(Array)
#19 G:\PleskVhosts\html\httpdocs\index.php(85): Mage::run('', 'store')
#20 {main}";s:3:"url";s:1:"/";s:11:"script_name";s:10:"/Index.php";}

I changed the local.xml file

What do I have to do??


texts:
I'm adding wysiwyg editor in admin custom form

All displays good and working fine, but when I click on Insert variable I have an error: Uncaught ReferenceError: MagentovariablePlugin is not defined
    at HTMLButtonElement.onclick

Thanks.


texts: Help with discount rule Magento (buy x with attribute y and get z discount)

texts:
I am wondering if it is possible to create a rule like this with default Magento.

In my shop i have different brands
I want to create a rule like this:

Buy 2 products of brand A and get 25% discount (only on products with Brand A).

Currently i have this setup:

Condition:

If ALL  of these conditions are TRUE
    If total quantity  equals or greater than  2  for a subselection of items in cart matching ALL  of these conditions:
        Brand is  Triumph

Action:

Apply: Percent of product price discount
Discount amount: 25

Apply the rule only to cart items matching the following conditions (leave blank for all items)
If ALL  of these conditions are TRUE :
    Brand is Triumh

Right now it gives correct discount on only Brand = Triumph, but it gives discount no matter how many products are in cart.

What am i missing here?


texts: How to add attribute for RRP in frontend?

texts:
In Magento 2.1 CE, luma theme, I'm trying to add a product attribute called "RRP" (Recommended Retail Price) and like to display it on the frontend product page and in catalog near the other prices. (Existing MSRP function isn't appropriate because i don't use MAP.)

I've added an price-attribute called "RRP" in backend, and there it's visible. In frontend, it's shown in "more information"-tab, but i like to show it near the other prices.

I've tried to call it in "vendor\magento\module-catalog\view\frontend\templates\product\list.phtml" with following code:

<?php echo $_product->getRrp(); ?>

but it's not visible.

Is this the right file and the right code to call the attribute? Or do i have to add something other to call the attribute in frontend?

But price is shown with 4 decimals, for example 10.0000 instead 10.00, and without currency symbol.

code i've used to show the attribute value:

<?php /* @escapeNotVerified */ echo $_helper->productAttribute($_product, $_product->getRrp(), 'rrp') ?>

to show attribute label also, i've tried following code, but this doesn't work:

<?php /* @escapeNotVerified */ echo $_helper->productAttribute($_product, $_product->getRrp(), 'rrp'); $_product->getResource()->getAttribute('rrp')->getStoreLabel() ?>

How i could add global currency format to the attribute?
And how i could add the attribute label?


texts: Magento 1.9.2.3 isn't finding Data helper in custom extension

texts:
There are at least a half dozen StackOverflow posts with quite similar issues and I've gone through all the comments on them. Eg: A, B, C. I've deleted the cache, turned off the compilation, set permissions, all to no avail. At first, I had some extra whitespace in my XML, but once I deleted that, I am now hitting the Data helper loading issue. It's getting the Mage namespace instead of my extension's Namespace.

I've got some frontend controllers, observers, and models working fine  following these great videos and now going through Alan Storm's admin menu tutorial. I refreshed the admin page and now the header prints, but the entire admin below the header is not rendering due to a warning getting thrown.

In the log I see this:

2016-02-12T23:20:54+00:00 ERR (3): Warning: include(Mage/Namespace/Package/Helper/Data.php): failed to open stream: No such file or directory  in /var/www/magento1/lib/Varien/Autoload.php on line 94
2016-02-12T23:20:54+00:00 ERR (3): Warning: include(): Failed opening 'Mage/Namespace/Package/Helper/Data.php' for inclusion (include_path='/var/www/magento1/app/code/local:/var/www/magento1/app/code/community:/var/www/magento1/app/code/core:/var/www/magento1/lib:.:/usr/share/php:/usr/share/pear')  in /var/www/magento1/lib/Varien/Autoload.php on line 94

Now obviously the Helper class at app/code/community/Namespace/Package/Helper/Data.php is not being autoloaded correctly:

class Namespace_Package_Helper_Data extends Mage_Core_Helper_Abstract
{
    public function test()
    {
        echo 'Helper loaded';
    }
}

Here's the relevant portion of app/code/community/Namespace/Package/etc/config.xml

<config>
    <global>
        <helpers>
            <namespace>
                <class>Namespace_Package_Helper</class>
            </namespace>
        </helpers>
    </global>
</config>

Note: I have frontend controllers, models, and observers already in this extension working fine and I've now started work on the admin side, this is the first time I've tried to add any adminhtml or admin controllers to the custom extension.

I don't even intend to use this Helper per se but it is needed for admin.

If I do this in /test.php:

$helper = Mage::helper('namespace/data');
$helper->test();

the helper is autoloaded and it prints "Helper loaded".


texts:
I want to display different price for same product per store.
Like an attribute.
These stores will have different currency, but will not be based on currency exchange rates.
For eg if  products of 1 USD= 2 Kr
The another product of 10 usd may be of 30 Kr, so it is not dependent on exchange rates, but my own entries.


texts: Google Analytics in Magento Upgrade 1 to 2

texts:
Im trying to find out if its okay to use the same tracking ID from GA in Magento 2.

The customer has a magento 1.9 website now and im upgrading it to Magento 2. So, new website - same tracking codes? I cant find anything on Google Analytics migration on Magento.. Does anyone have any experience with this?

There's no events, and everything in GA is pretty much standard.. Is it ok to just use the same tracking IDs?


texts: Show tax and shipping even if these values are 0

texts:
I want to show tax and shipping rows in cart and checkout pages, even if these values are 0.

Is there an easy and proper way to fulfil this requirement.


texts: Is it necessary to enable developing mode in magento 2 while update magento version

texts: I am going to update magento 2.0.1 to 2.1.6 so it is necessary to enable developing mode while doing this?