texts: Debug problems on Mage::getSingleton('checkout/cart')->getQuote()

texts:
I'm investigate a compatibility problem with two m1 extensions.

For this I need a simply output of any information I can get about Mage::getSingleton('checkout/cart')->getQuote().

I have tried following (single, not all together):

$cart = Mage::getSingleton('checkout/cart')->getQuote();
file_put_contents(__DIR__ . '/debug.txt', var_export($cart, 1), FILE_APPEND);
file_put_contents(__DIR__ . '/debug.txt', print_r($cart, 1), FILE_APPEND);
file_put_contents(__DIR__ . '/debug.txt', print_r(get_object_vars($cart), 1), FILE_APPEND);

But this leads to a crash while the execution (From the checkout submit (after clicking order), I fall back to the cart page). This is strange, because I use Information out of $cart, at the same place. Examp: $checkoutCartQuote->getAllItems(); gives me the articles. Just 1 line above the file_put_contents. So why does it just crash when I try var_export/print_r it?

But more important: How do I now get an Output like var_dump or print_r on this object? I need to see any properties with any values.

As I work on a shop of a client, I only have limited FTP access and no access to apache log. The exception Log of M1 didn't got new lines since I started working today.


texts: Magento 2 How to reload Order Summary Section

texts:
I have some custom discount applied through custom ajax after ajax completion I want to reload Order summary section on checkout page.

  mysite.com/rest/default/V1/carts/mine/shipping-information

After debugging I observe that The above link when called the Order Summary section reloads but how to reload it with my custom ajax request

=> section.xml :

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2013-2017 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:module:Magento_Customer:etc/sections.xsd">

<action name="http://127.0.0.1/grocebee_dev/loadSummary">
        <section name="checkout-data"/>
</action>

ajax request

// baseurl return 'http://127.0.0.1/grocebee_dev'
    var newUrl = baseUrl+'/loadSummary';

                                $.ajax({
                                    type : 'post',
                                    url : newUrl,
                                    success:function(newData)
                                    {
                                        console.log(newData);
                                    }
                                });

but it shows 404 error


texts: Changed base url, website not working after

texts:
I changed base url from magento and now backend/frontend isnt working almost at all.
I can get to the page where i can change it back but "save config" button does nothing saying "Refused to apply style from 'https://www.audiocity.ee/electronics-home/?___store=default/media/css_secure/3b139e1b7b1c24f568e33943a188f95e.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled."

Any ideas if its possible to fix without ftp/server access

I have no FTP or server access.


texts: All stores updated automatically in mass status update in grid

texts:
I have this custom module which allows mass status update from admin grid. There is a field of stores as well. So when i update the status, it works fine the status gets changed but the store views all change to "All store views" instead of their previous custom stores applied to each row of data. here is my mass status change function in the controller:

 public function massStatusAction() {
    $testimonialIds = $this->getRequest()->getParam('testimonial');
    if(!is_array($testimonialIds)) {
        Mage::getSingleton('adminhtml/session')->addError($this->__('Please select item(s)'));
    } else {
        try {
            foreach ($testimonialIds as $testimonialId) {
                $current_status= $this->_getTestimonial()->load($testimonialId)->getStatus();
                $updated_status= $this->getRequest()->getParam('status');
                if ((Mage::getStoreConfig('testimonial/email_configuration/send_email_after_approve_testimonial', Mage::app()->getStore())=="1")and ($current_status=="3" and $updated_status=="1") ) {
                    $to = array('email'=>$this->_getTestimonial()->load($testimonialId)->getEmail(), 'name'=>$this->_getTestimonial()->load($testimonialId)->getName());
                    $this->sendemailAction($to, $templateConfigPath=self::XML_PATH_EMAIL_SELECT_TEMPLATE_AFTER_APPROVE,$testimonialId);
                    Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Admin has just sent the email to customer for approving their testimonials'));
                }

                $testimonial = Mage::getModel('testimonial/testimonial')->load($testimonialId);
                $testimonial
                    ->setStatus($this->getRequest()->getParam('status'))
                    ->setStores('')
                    ->setIsMassupdate(true)
                    ->save();
            }
            $this->_getSession()->addSuccess(
                $this->__('Total of %d record(s) were successfully updated', count($testimonialIds))
            );
        }catch (Exception $e) {
            $this->_getSession()->addError($e->getMessage());
        }
    }
    $this->_redirect('*/*/index');
}

Can you please guide me where I am going wrong?


texts: Magento 1 datepicker issue selecting date for current month

texts:
This is my js code for my datepicker:

    Calendar.setup({
        inputField : 'scheduled_ajax_update',
        ifFormat : '%d-%m-%Y',
        button : 'scheduled_ajax_update_trig',
        align : 'Bl',
        singleClick : true,
        disableFunc: function(date)  {
            var now = new Date();

            if(date.getFullYear() < now.getFullYear()) { return true; }
            if(date.getFullYear() == now.getFullYear() && date.getMonth() < now.getMonth()) { return true; }
            if(date.getMonth() == now.getMonth() && date.getDate() < now.getDate()) { return true; }
        }
    });

It disables of the past days. My weird issue is that I cannot select any values from the current month, if my selected day is in the past. See img:

In this case I cannot select 27 or 28 .

If I click on the next month and then I go back to my current month I can choose 27 or 28.

No error messages in the console. Do you know why is this happening :) ?

Thank you!


texts: We need to change the meta title tag into the product page programmatically

texts:
In the di.xml file, we have added the below code.
<preference for="Magento\Catalog\Helper\Product\View" type="Ghanda\Seo\Helper\Product\View" />
Overridden helper file code.<?php
namespace Ghanda\Seo\Helper\Product;

use Magento\Catalog\Helper\Product\View as ProductView;
use Magento\Framework\View\Result\Page as ResultPage;

class View extends ProductView
{

    private function preparePageMetadata(ResultPage $resultPage, $product)
    {
        $pageLayout = $resultPage->getLayout();
        $pageConfig = $resultPage->getConfig();

       // $metaTitle = $product->getMetaTitle();
        $metaTitle = $product->getName().' '. $product->getSku().' | '.'Ghanda Clothing';
        $pageConfig->setMetaTitle($metaTitle);
        $pageConfig->getTitle()->set($metaTitle ?: $product->getName());

        $keyword = $product->getMetaKeyword();
        $currentCategory = $this->_coreRegistry->registry('current_category');
        if ($keyword) {
            $pageConfig->setKeywords($keyword);
        } elseif ($currentCategory) {
            $pageConfig->setKeywords($product->getName());
        }

        $description = $product->getMetaDescription();
        if ($description) {
            $pageConfig->setDescription($description);
        } else {
            $pageConfig->setDescription($this->string->substr(strip_tags($product->getDescription()), 0, 255));
        }

        if ($this->_catalogProduct->canUseCanonicalTag()) {
            $pageConfig->addRemotePageAsset(
                $product->getUrlModel()->getUrl($product, ['_ignore_category' => true]),
                'canonical',
                ['attributes' => ['rel' => 'canonical']]
            );
        }

        $pageMainTitle = $pageLayout->getBlock('page.main.title');
        if ($pageMainTitle) {
            $pageMainTitle->setPageTitle($product->getName());
        }

        return $this;
    }

}
?>

But, meta title does not change into the product detail page, It is calling from the vendor module.


texts: How to resize product images in recently viewed widget

texts:
How can I resize the images rendered via the recently viewed product widget?

I have tried editing multiple values inside

  app/design/frontend/VENDOR/THEME/etc/view.xml

but none updated the recently viewed image sizes.

They are currently rendering at 135px in height and width, the only values set at 135 is shared_wishlist_email and product_small_image. Neither of those changed the image size.


texts: Apply global attribute variants of a configurable product?

texts:
Can Magento CE 1.8.1.0 apply global attribute variants of a configurable product?

Size: My global attribute for configurable product
For example: Test (Default configurable product)
Test-small (Different size, simple product associated of test)
Test-medium (Different size, simple product associated of test)
Test-large (different size, simple product associated of test)

My problem is if I filter small size I want to "test" product returned, not "test-small"

Please help me.


texts: Best setup for Multi-Warehouse Stock per store level? MAGENTO 1.9

texts:
we are updated our site to have two store levels/ website (1.oceania - 2.Europe).
We use the same SKU but have different inventory.

What is the best way to set up this store?
Oceania Warehouse links to Oceania site only
Europe Warehouse links to Europe site only.

Duplicate products and change SKU (OC-00000 / ER-00000)
Host two different Magento site and geoIP customers to the right site

the issue is we use this extensions appjetty (biztech) inventory that doesn't have store level inventory.

Any help would be great. Thanks


texts:
I have an option inside the cart to add a product to the wishlist which works fine.

   onclick="jQuery.get('<?php echo $this->getUrl('myaccount/checkout/wishlist') ?>', { product: <?php echo $_item->getProductId() ?> }).done(function(data) { location.reload(true); });

But if you are not logged in you are first taken to a log in page. After this I set up a redirect using the same url that is submitted from the cart to add a product to you wishlist.

   https://temperley.localhost/shop/myaccount/checkout/wishlist/product:25192

Problem is this url does not work in this situation. I've tried using http instead of https and vice versa which isn't working. I would appreciate if anyone could describe how exactly I can add a product to the wishlist from a redirect off the login page or add a product by id to the wishlist


texts: Is there a way to show only images selection on google recaptcha?

texts: My client wants to show only images selection on google recaptcha. He thinks only clicking a checkbox is not secure.


texts: Magento 2 : What template engine is used for email templates?

texts: What template engine is used for Magento2's email templates? I've not been able to get confirmation on this.


texts: Where's the order item custom options labels in the REST API?

texts:
I'm trying to retrieve orders from the REST API in Magento Enterprise 2.3.1, and that's easy enough with endpoints like /rest/default/V1/orders, but while I can see the values for custom options of the items in the order, I can't see their labels. For example:

"product_option": {
    "extension_attributes": {
        "custom_options": [
            {
                "option_id": "3730",
                "option_value": "Some text value."
            },
            {
                "option_id": "3731",
                "option_value": ""
            }
        ]
    }
}

It's great that I can see that for one of the custom options, the customer said "Some text value.", but I'd really like to know what it was they were responding to. What I'd expect to see for each custom option is something like:

{
    "option_id": "3728",
    "option_label": "What's your favorite Star Trek ship?"
    "option_value": "U.S.S. Excelsior"
}

So far, any time I can find a way to load an order via the REST API, it is returned this way, and I don't see any other way to get the custom option label.

It's hard to believe I'm the first person to come across this - am I just missing something obvious?


texts: Setting Product Images for Products not Displaying image

texts:
I have many products that have an image uploaded and set for them, but there is no specification made for base small or thumb. The result is I have many more products displaying my no-image backup image than necessary.

Would there be a way to programmatically instruct Magento to take all products without a base specification, but having an image uploaded for them, and make a specification for those products to use thir image as the base image?


texts:
Are there any extensions which would provide basic CMS editing for community?

I know bluefoot isn't available - is there a plan to add it?

Can anyone help me?


texts: Magento keeps redirecting to main domain

texts:
We have two domains, one for the german shop and one for the shop in switzerland.

The urls are like:
    www.mycompany.de and www.mycompany.ch

But if I open www.mycompany.ch then I get redirected to www.mycompany.de!

What might be the cause?


texts: I want to list all the categories in footer. Need the solution for both with and without sub-categories. something like this.


texts: Is it safe to change the language ISO code on a "Production" Magento installation?

texts:
We are required to migrate a Magento site to OpenCart and to do so, the tool requires that both sites' multilingual implementation have the same ISO codes.

It seems though that for some reason in the Magento installation, instead of the ISO code for the setting they used the full language name. (i.e. instead of "en_US" they used "english")

The question is, should we correct this on the the Magento production installation, and if we do, what problems should we expect?

Any suggestion is welcomes.


texts: Magento 2: product not showing up in category unless it has certain attribute

texts:
I notice that products will only be visible in category page unless it has a certain attribute, for example, say "organic" == yes. I bought this template of templatemonster so I'm wondering if there is way to get rid of this?  thank you.
Alex


texts: Magento extremely slow when activating SSL

texts:
we have a Magento 1.9 site wich ran quite fine (we integrated it into a Joomla-site with Magebridge, but the performance-problem is not related to that, why, i explain afterwards).
If we try to activate SSL in Magento, the site runs extremely slow, the main request takes about a minute).
I tried to access the magento-page without magebridge, its exactly as slow.
I already deleted all magento caches and checked the htaccess for redirects.
The magento administration is fast however...
Is there any way to debug what magento is doing whilst loading?

Thanks in advance


texts: Magento 2: How to get a customer by Telephone attribute?

texts:
I'd like to filter my collection using something like:

$collection->setField('telephone')
  ->setConditionType('eq')
  ->setValue('(555) 229-3326')

But the telephone attribute is an attribute on Default Billing Address, how can I do that?


texts:
Maybe it's just me, but in Chrome browser inline translate does not work. The red boxes are shown and if I hover the mouse the book icon appears but if I click it nothing happens. I had the same problem on different servers.

Other browser like Firefox and IE are fine.

Is there a bugfix for this?


texts: Magento 2 load dynamic values to select field in XML

texts:
i am new in Magento development. I am trying to create a new module for adding dynamic fields for product edit page.

Now I was able to add the fields in admin's product edit page. now I want to show a select box filed there with dynamic values which should be loaded from my table.

   <?xml version="1.0" encoding="UTF-8"?>
   <form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
   <fieldset name="magenest">
   <argument name="data" xsi:type="array">
       <item name="config" xsi:type="array">
           <item name="label" xsi:type="string">Material Price Calculation Fields</item>
           <item name="collapsible" xsi:type="boolean">true</item>
           <item name="dataScope" xsi:type="string">data.magenest</item>
           <item name="sortOrder" xsi:type="number">10</item>
       </item>
   </argument>
   <field name="status">
       <argument name="data" xsi:type="array">
           <item name="config" xsi:type="array">
               <item name="label" xsi:type="string" translate="true">Status</item>
               <item name="dataScope" xsi:type="string">status</item>
               <item name="sortOrder" xsi:type="number">10</item>
               <item name="componentType" xsi:type="string">field</item>
               <item name="dataType" xsi:type="string">text</item>
               <item name="formElement" xsi:type="string">select</item>
               <item name="options" xsi:type="array">
                   <item name="0" xsi:type="array">
                       <item name="value" xsi:type="number">0</item>
                       <item name="label" xsi:type="string">Inactive</item>
                   </item>
                   <item name="1" xsi:type="array">
                       <item name="value" xsi:type="number">1</item>
                       <item name="label" xsi:type="string">Active</item>
                   </item>
               </item>
           </item>
       </argument>
   </field>

</fieldset>
</form>

You can see currently I am hardcoded values here. now I have to display values from my table materials.

can you please help me how can i do this?


texts:
I am having difficultly learning how to do a case statement in magento 2. Most what i see is magento one and few of the examples the function they say to use does not exist.

All i am trying to do is the follow

CASE WHEN DATEDIFF(NOW(),public_date)  <= 30 THEN 1 ELSE 0 END AS new_video

I tried to use something like the following but nginx fails out.

->addExpressionAttributeToSelect('new_video', 'CASE WHEN DATEDIFF(NOW(),public_date)  <= 30 THEN 1 ELSE 0 END','')

I get that i can use addExpressionFieldToSelect for functions but for case i am unsure since magento whats to tack on the alias main table to everything that i use.

addExpressionAttributeToSelect, nginx kicks back saying that function cant be found. Whats the proper way to do this case statement

Thank you, Hopefully the magento community doesnt fail me.


texts: Debugging: Sorry, no quotes are available for this order at this time

texts:
I'm getting the dreaded

  Sorry, no quotes are available for this order at this time

error message on the Shipping section of the One Page Checkout.  The only shipper is FedEx.  Is there known science for debugging these sorts of issues without doing a deep dive on how Magento renders the Shipping Step, and how that kicks off API requests for rates?

In other words — what tools exist in the UI for debugging these issues, and if not tools exists what are the best classes to add temporary debugging tools to?


texts: Magento 2.2.1 Bug price by customer group not working after add to cart

texts:
Magento 2.2.1 Bug price by customer group not working after add-to-cart

I have set product price based on customer group so if wholesalecustomer is logged in then price will be 20$ and the general customer is logged in then price will be 25$.

Thing is due to Magento 2.2.1 bug when I add to cart product then product price gets a change to Actual price 25$ for the wholesale customer as well.  It means when customer logged in and land on category page they can see customer group price but when they add to cart then Magento accepts the actual price 25$ also it turns category page pricing to general customer pricing.

So wholesale customer sees the same price as the general customer.

Really strange issue.  Did try catalog promotion rule as well but that's not working as well.  How can I fix this issue?  What's the solution?

Any help would be appreciated.


texts: Magento + RequireJS - How to use non-AMD custom javascript with jQuery?

texts:
First off, I made a custom javascript file, main.js. Quite simple; it's just this:

$("#testp").text("Hello!");

#testp is in one of my phtml files, with just
Hello World!
.

Beforehand, just to let you know: jQuery is imported automatically by RequireJS because jquery.js is under the baseURL already. In the Chrome Firebug console, I can confirm this by typing jQuery and an object is sent back. However, the commonly used $ which I need to access jQuery is undefined. This is a problem because I have plenty of other libraries that use $ in place of jQuery keyword.

My questions are:

How would I import main.js into RequireJS so that the script can be executed? If main.js runs successfully, I would expect the paragraph to show "Hello!" instead of "Hello World!"
Main.js is dependent on jQuery. How would I make sure that jQuery will be accessible in main.js?
The jQuery keyword returns an object while $ does not. How can I configure jQuery to let $ be a global variable?


texts: How to get only out of stock products in magento 2

texts:
How to get out of stock product collection using object manager.
I retrieve product collection
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();

$productCollection = $objectManager->create('Magento\Catalog\Model\ResourceModel\Product\CollectionFactory');
$collection = $productCollection->create()
            ->addAttributeToSelect('*')
            ->addAttributeToSort('created_at', 'DESC')
            ->setPageSize(8)
            ->load();

but how to add out of stock condition to it.

I have tried this solution here but it does not work.

EDIT
Executing Below code gives following error:
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();

$productCollectionFactory = $objectManager->create('Magento\Catalog\Model\ResourceModel\Product\CollectionFactory');
$productCollection = $productCollectionFactory
    ->create()
    ->addAttributeToSelect('*')
    ->addAttributeToSort('created_at', 'DESC')
    // use this if you want to filter by quantity = 0
    ->joinField('qty', 'cataloginventory_stock_item', 'product_id=entity_id', 'cataloginventory_stock_item.qty=0')
    // use this if you want to filter by is_in_stock = false
    ->joinField('is_in_stock', 'cataloginventory_stock_item', 'product_id=entity_id', 'cataloginventory_stock_item.is_in_stock=0')
    ->setPageSize(8)
    ->load();

Error
PHP Fatal error:  Uncaught PDOException: SQLSTATE[42S22]: Column not found: 1054
 Unknown column 'at_qty.cataloginventory_stock_item.qty' in 'on clause' in D:\xa
mpp\htdocs\projects\magentoSite\vendor\magento\zendframework1\library\Zend\Db\State
ment\Pdo.php:228
Stack trace:
#0 D:\xampp\htdocs\projects\magentoSite\vendor\magento\zendframework1\library\Zend\
Db\Statement\Pdo.php(228): PDOStatement->execute(Array)
#1 D:\xampp\htdocs\projects\magentoSite\vendor\magento\framework\DB\Statement\Pdo\M
ysql.php(95): Zend_Db_Statement_Pdo->_execute(Array)
#2 D:\xampp\htdocs\projects\magentoSite\vendor\magento\zendframework1\library\Zend\
Db\Statement.php(303): Magento\Framework\DB\Statement\Pdo\Mysql->_execute(Array)

#3 D:\xampp\htdocs\projects\magentoSite\vendor\magento\zendframework1\library\Zend\
Db\Adapter\Abstract.php(480): Zend_Db_Statement->execute(Array)
#4 D:\xampp\htdocs\projects\magentoSite\vendor\magento\zendframework1\library\Zend\
Db\Adapter\Pdo\Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT COUNT(
DI...', Array)
#5 D:\xampp\htdocs\proj in D:\xampp\htdocs\projects\magentoSite\vendor\magento\zend
framework1\library\Zend\Db\Statement\Pdo.php on line 235


texts: place order issue in onepage checkout knockout js magento 2

texts: By selecting an existing shipping address in the checkout I am not able to place an order.


texts: Magento 2.3.4 Change date picker to 3 drop down dd/mm/yyyy

texts:
How to change Magento 2 date picker to 3 drop down which allows users to pick date month and year.
Tried to follow this -> DOB Validation with three fields in magento2
But it didn't work and it wasn't explained.
Anyone know or any suggestion


texts: How to extend an adminhtml grid directly?

texts:
I'm trying to extend my admin product grid with a specific column.

What class should I extend for this? Mage_Adminhtml_Block_Widget? In Block/Widget theres also a Grid ( Mage_Adminhtml_Block_Widget_Grid ) file... I'm a little confused.


texts: My admin module yields helper not found error on dashboard page

texts:
I've stripped my module down to try and identify this error. The following are my files. Can you see why I get the error "Fatal error: Class 'Mage_Caitlinhavener_Addschool_Helper_Data' not found in /var/www/DTS_staging/public_html/app/Mage.php on line 546" on dashboard page?

Caitlinhavener/AddSchooltest/etc/config.xml:

<?xml version="1.0"?>
  <config>
    <modules>
        <Caitlinhavener_Addschooltest>
            <version>0.1.0</version>
        </Caitlinhavener_Addschooltest>
    </modules>

    <global>
        <helpers>
            <Addschooltest>
                <class>Caitlinhavener_Addschool_Helper</class>
            </Addschooltest>
        </helpers>
    </global>

    <admin>
        <routers>
           <adminhtml>
                <use>admin</use>
                <args>
                    <modules>
                        <Caitlinhavener_Addschooltest after="Mage_Adminhtml">Caitlinhavener_Addschooltest</Caitlinhavener_Addschooltest>
                    </modules>
                </args>
           </adminhtml>
        </routers>
    </admin>
</config>

Caitlinhavener/AddSchooltest/etc/adminhtml.xml:

<?xml version="1.0"?>
<config>
    <menu>
        <SchoolMenu translate="title" module="Caitlinhavener_Addschooltest">
            <title>Schools</title>
            <sort_order>23</sort_order>
            <children>
                <myitem2 translate="title" module="Caitlinhavener_Addschooltest">
                        <title>Add Schools</title>
                        <action>adminhtml/addschool</action>
                        <sort_order>2</sort_order>
                </myitem2>
            </children>
        </SchoolMenu>
    </menu>
</config>

Caitlinhavener/Addschooltest/Helper/Data.php:

<?php
class Caitlinhavener_Addschooltest_Helper_Data extends Mage_Core_Helper_Data
{
}

Caitlinhavener/Addschooltest/controllers/AddschoolController.php:

<?php

class Caitlinhavener_Addschooltest_AddschoolController extends Mage_Adminhtml_Controller_Action
{
    public function indexAction()
    {
        $this->loadLayout();
        $this->renderLayout();
    }
}


texts:
I keep getting this error when ever i navigate to the login page after i installed my module:

  Invalid method Inchoo\SocialConnect\Block\Login::__ [] []

I don't know what's causing it so i'll link the module github project: https://github.com/CallumBrankin/Magento2-Inchoo-Social-Plugin


texts: Can't get my ajax request to call controller

texts:
I'm trying to send information from the view (js) to the server. I'm trying this with the JS request:

$.ajax({
    type: 'POST',
    url: 'php_file_in_controller/Main_Class_Name',
    data: data,
    dataType: "json",
    success: function(responseData){
        alert(responseData);
    },
    fail: function(error){
        alert(error);
    }
});

This is my controller:

<?php
 namespace Magento\Checkout\Controller;

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

 public function execute(){
 ...some code..
 }

}
and my config.xml of the module:

<?xml version="1.0"?>
<!--
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
<default>
    <checkout>
        <options>
            <onepage_checkout_enabled>1</onepage_checkout_enabled>
            <guest_checkout>1</guest_checkout>
        </options>
        <cart>
            <delete_quote_after>30</delete_quote_after>
            <redirect_to_cart>0</redirect_to_cart>
        </cart>
        <cart_link>
            <use_qty>1</use_qty>
        </cart_link>
        <sidebar>
            <display>1</display>
            <count>5</count>
        </sidebar>
        <payment_failed>
            <identity>general</identity>
            <receiver>general</receiver>
            <template>checkout_payment_failed_template</template>
        </payment_failed>
    </checkout>
</default>

The JS file is in the same module as the php file i am trying to send data to. I don't understand why I receive a 404.
Is there a more convenient way to pass data from view to controller?
If ajax is the way to go (for multiple reasons) what could be my problem? I'm using the checkout module in this situation so routes.xml is not a problem (or is it..?)
Thanks in advance.


texts: Why magento 1.9 not showing newly added categories?

texts:
Hi I am very new Magento frame work.
 I just installed magento 1.9.0.1 and I added the new category through catalog menu. But still its not showing the category in front end.

Category is under default category
Is Active -Yes
Display Mode -Static Block Only

These are the setting I have done with new category. After saving this, When I go to the front end its not displaying the category. How do I make the category should appear in front end.

I followed this Tutorial  for creating category.

Please help me on this.

Thanks in advance.


texts: Determine which login parameter is incorrect

texts:
I have a strange situation where a client has requested their Magento CE 1.8 store alerts the user to know whether it was the email address, or password that was incorrect when attempting to log in

Currently:

Desired: (if email exists but password incorrect) 'Password incorrect'

aside from the huge security flaw this presents

How can I achieve this?


texts: Data Migration Tool [Connection refused] from AWS to Local dockerized enviroment

texts:
I'm trying to migrate my Magento 1 data from a DB located in AWS, to a Magento 2 in a local dockerized enviroment.

When I run

bin/magento migrate:settings -a -r -vvv app/code/Mymodules/Migration/etc/opensource-to-opensource/1.9.3.10/config.xml

The connection is refused

[PDOException (2002)] SQLSTATE[HY000] [2002] Connection refused

I've already opened the 3306 port to my local adding a Inbound rule to the Security Group, like this:

MYSQL/Aurora | TPC | 3306 | MYIPADDRESS/32 | My description

Questions

I'm using the Magento's non-root MySQL credentials, so remote
connection should allowed right?
What else could be blocking the connection?
Is it possible to connect Data Migration Tool to a remote DB using a SSH Tunnel?

Extra details

If I try to connect from my terminal this way, the connection is also    refused:

mysql -hxx.xxx.xx.xx -p3306 -umyuser -pmypassword

Here's my config.xml details:

...
    <source>
        <database host="xx.xxx.xx.xx" port="3306" name="mydb" user="myuser" password="mypassword" />
    </source>
    <destination>
        <database host="127.0.0.1" name="magento" user="magento" password="magento" />
    </destination>
    <options>
        <crypt_key>mymagento1key</crypt_key>
    </options>
</config>


texts: Mageplaza menu does not shown on Sidebar

texts:
I just started to learn how to use Magento 2, I have just installed it on my local laptop. The instalation has been successfully completed and then I decide to install SMTP support for email notification so I decided to use Mageplaza SMTP. I have followed all the instruction from the document https://www.mageplaza.com/magento-2-smtp/user-guide.html, but unfortunately I still unable to get it work, I don't even having this on my sidebar menu.

As you can see I have this extension downloaded and installed (I am using Composer to install it).

Anyone know how to make it work and shown in my sidebar menu?

Any help would be really appreciated.


texts: Remove applied shipping methods and apply free shipping method

texts:
In my development Magento Store I have two shipping methods .. Flat rate and USPS

But there is one condition if logged in user pass that condition I have to remove all the allowed methods and only allow free shipping option as shipping method.

In other case free shipping method will not show to user as option.

Please help.


texts: Show backordered item status after payment?

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 order detail page (e.g. /admin/sales_order/view/order_id/1234/etcetera).

But only as long as the invoice is not yet created!
When invoice is created, the item status automatically changes to invoiced, see image.

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

PS: When payment is received, the invoice is automatically created. We could change that to manual (so that we can still see backordered items) but that is not really a solution, since it forces us to manually generate invoices that are now being done automatically.


texts: getChildHtml inside a foreach with a block name

texts:
I have content inside list.phtml which shows the stock count of each product on the category page. this shows if an Admin is logged in.

The problem I have is that Lesti FPC (Full Page Cache) caches it and then everyone can see it.

I have created a custom block and moved my code into the new PHTML file with block name 'colors' and used this to display it <?php echo $this->getChildHtml('colors') ?>

Unfortunately as this is inside a foreach loop it shows the stock count as 0.

How can I get the getChildHtml to show the correct value?


texts: Where are all the Magento 1 patches since new Magento.com website?

texts:
I see https://magento.com/download has a new design and content. This used to be the place to find Magento 1 Patches. Where are they now? Everything from Magento 1 seems to be hidden (removed?). Does this have to do with EOL status?
I assume there is a place to find the patches and all the information for Magento 1, right?


texts:
I feel like I am missing something. Using the CMS. I am trying to link a img to a product page using variables.

Basically

Is there a button on the TinyMCE that I can use to create this?


texts: Why do I have to use the Resource and not the Model for creating an attribute?

texts:
See the edit please

I'm doing this:

                /* @var $attributeModel Mage_Catalog_Model_Entity_Attribute */
                $attributeModel = Mage::getModel('catalog/entity_attribute');
                $attributeModel->setEntityTypeId($entityTypeId);
                $attributeModel->setAttributeCode($propName);
                $attributeModel->setBackendType('varchar');
                $attributeModel->setName($propName);

                $description = $this->attributes[$propName];
                $attributeModel->setFrontendLabel($description);

                $attributeModel->save();

and I'm getting this nasty error whose origin I can't figure out:

Fatal error: Call to undefined method Mage_Eav_Model_Resource_Entity_Attribute::isUsedBySuperProducts() in /var/www/html/app/code/core/Mage/Catalog/Model/Entity/Attribute.php on line 86

So apparently, this function does not exist. Well, I saw it and my IDE even found it with code completion, so it definitely exists. What could this be?

Maybe I'm missing something while creating the attribute? Can't guess what though, I'm really stuck...

EDIT: Okay, I was using the model catalog/entity_attribute, but I'm supposed to use catalog/resource_eav_attribute, then it works.

Well, why do I have to use a resource there, though? Shouldn't a model be able to create the attribute and use the resource rather than me using the resource directly? Is it me or is this not really consequent behavior? I don't get it


texts: Login redirects to previous page even with incorrect info

texts:
I have "Redirect Customer to Account Dashboard after Logging in" set to NO as my intention is to point the customer back to the page they were viewing when they login.

This works for the most part, but unfortunately they still get put back to the previous page even when the user/pass is incorrect, with no indication that their login was incorrect, it is only when they manually go back to the login screen is there an error message shown. Correct logins redirect to previous page as intended.

Is this intentional behavior by Magento? Do I require a custom module or extension to fix this error? The ideal scenario is that the customer does not get punted to the previous page until a successful login is placed.

Any advice is appreciated.


texts:
I have a production site and a test site hosted on the same server (dev.mysite.com and www.mysite.com)
While the performance of product, category and cms pages are equivalent, there is a 1 to 4 (sometimes 1 to 15) ratio between both sites with checkout/cart and checkout/onepage, test site being the fastest.

What is strange is that the code and database are identical (database copied through mysqldump and import).

What i already checked :

htaccess : identical
apache vhost settings : identical
magento profiler : doesn't point to a clear suspect
server activity : performance inconsistency persists even if no visit recorded on the production site
admin operations : performance inconsistency persists when no operations on the backend

I'm running out of idea, what would you check next ?


texts: Order Items Collection in Order Detail Page

texts:
This snapshot of order detail page. I Just want to known that which file or function call for setting this collection in this page.
I want to just get Selected (Filter Row) Items Order.


texts: Magento 2: how to disable zoom using gestures in the whole site?

texts:
Users can zoom in and zoom out on any page using gestures (index finger and thumb).

How can I prevent that behavior?

I'm using custom theme which inherits from Blank theme.


texts: how do add new font in magento2 with custom module in frontend?

texts:
in magento2 we add new font in .xml file .I have idead create module manager fonts in admin magento2. so how to get all font name in core, and set new font in front-end?

I don't know i can edit .xml file with custom block?

any suggestion?


texts: Custom field into Checkout Page Magento 2

texts: How to save custom field of payment section checkout page into database sales_order table in Magento 2.


texts: What's the right way to build a theme in Magento 2?

texts:
I hope this isn't a question too subjective a question for Stack Exchange. If so, feel free to correct me.

I've recently moved on from Magento 1.9 to Magento 2.1. Right now I'm trying to build my own theme. My current setup is as follows:

All blocks are defined within a separate module, done analogously to Magento_Theme
All layouts and parent overrides are defined within the theme

Could anybody tell me if this is the right way to go about it? If not, what would be?

Thanks!


texts:
I am integrating Magento2.3.4 with Vue store front on my local system .I followed https://medium.com/the-vue-storefront-journal/vue-storefront-how-to-install-and-integrate-with-magento2-227767dd65b2 link for magento 2 with Vue store front integration .
After successfully complete all step I am getting the below URL:
http://localhost:3000
But this url is not working it is getting error
ERR_TOO_MANY_REDIRECTS


texts:
I've been chasing a really weird bug for a couple days now.

When adding items to a wishlist the most recently added item is replaced by the new item. This happens even when all local modules are disabled.

The most recently added item is simply removed from the database table, and the new one inserted. Sometimes I can get more than one item onto the list, but it's very rare.

Others have had similar issues (https://stackoverflow.com/questions/28452259/unable-to-add-multiple-products-to-wishlist), but our issue is not related to pricing or store filters - the records are simply deleted from the database.

Watching the flow, it looks like the Wishlist Item Collection is saved within the Wishlists afterSave() function, and the last item is deleted from the collection.

Not sure why.

Any ideas?


texts:
I want to use a custom quote validation doing the same like the validateMinimumAmount() method, just for some volumetric weight calculations. I already wrote the related helper methods, one of it is called isCheckoutDisabled and returns 1 or 0(in case of to low volume).

By calling this method I am disabling the "Proceed to checkout" button in checkout/cart. The next goal would be, to redirect from the mageplaza onestepcheckout if this is called bypassing the cart (f.e. by clicking "Proceed to checkout" button within the minicart or calling the URL directly)

I am asking myself what would be the best way to achive this goal

Writing a plugin for the Index controllers Execute() method
Writing a plugin that extends the validateMinimumAmount() method
Extending the quote with a custom validation method
Creating an extension attribute for quotes

I already tested some stuff without success:

I added a hardcoded redirect to the Index controllers execute() method. This doesn't work cause even if the value is changed, the redirect persists (within the cache)

 $this->_volumeWeightHelper = $this->_objectManager->get(\PackageName\ModuleName\Helper\Disable::class);

    if($this->_volumeWeightHelper->isDisabled() == 1){
        return $this->resultRedirectFactory->create()->setPath('checkout/cart');
    }

So for now I have to rethink the architecture and any hints would be nice!

Cheers,
Jan


texts: How to get available sizes from configurable product using SOAP?

texts:
We created configurable products based on size attribute. say A is configurable product having children of different sizes like S, M, XL.

How to get available size like S,M,XL from parent product using SOAP in Magento CE 1.7.0.2.


texts: Difference between quoted strings and non quoted single words in CSV file

texts:
Can anyone explain why in some CSV's translations are not always in " ".

For example in the tax csv:

Tax,Tax

Shouldn't it be:

"Tax","Tax"


texts: Change configurable products to simple products

texts: I am definitely new to Magento and looking for the way to change the configurable products to simple product. I have 62 Configurable products and each has 3 Associated products by weight 250gms, 500gms, and 1kg now i am trying to change all products to simple. is there any easy way to do this. Thanks


texts: White Page and PHP error when accessing admin

texts:
I receive an error in my log files when I try to access the admin panel:

PHP Fatal error:  Call to a member function getResourceId() on a non-object in /var/www/magento/includes/src/Zend_Acl.php on line 1174

The admin panel stays blank.
I didn't find anything about this error in Google - so it might be even something with my environment?
PHP is talking about that file:
http://www.magentodocs.org/1.7.0.2/d3/db9/lib_2_zend_2_acl_8php_source.php
But I'm not sure whether that helps me alot :-S

Any ideas on this?


texts: Magento 2: How to enable SVG image for category custom image upload

texts:
I need to enable SVG image in upload for custom module.

I have tried all the solution which i have found.

Here is my code:

  /etc/di.xml

<type name="Magento\Cms\Model\Wysiwyg\Images\Storage">
        <arguments>
           <argument name="extensions" xsi:type="array">
                <item name="allowed" xsi:type="array">
                    <item name="svg" xsi:type="string">text/html</item>
                </item>
                <item name="image_allowed" xsi:type="array">
                    <item name="svg" xsi:type="string">text/html</item>
                </item>
                <item name="media_allowed" xsi:type="array">
                    <item name="svg" xsi:type="string">text/html</item>
                </item>
            </argument>
        </arguments>
    </type>

Any idea? Help will be appreciated.


texts: In Magento 2 How to use CSS Grid in CMS pages

texts:
I'm trying to migrate my site casafoca dot ro to M2. And Want my site something like this one - https://banbayu.com/

I especially loved the

Responsiveness,
Full width of the pictures and
css grid wireframe they used in two easily visible sections on the Home Page (cms).

I am using Porto theme which is bootstrap integrated  so using bootstrap I can keep the code as clean as possible while also adapting the layout to my needs. Here is my website URL where I am trying to modify the design/layout.

A friend copied an example of the grid for me in order for me to adapt it and use it and I've been brain-storming ever since. https://jsfiddle.net/8td3hdgL/

I tried using the crappy wysiwyg editor but it doesn't even align two blocks on top of each other, and since I also want to include YouTube embedding in one of the tabs, I've no idea if it will handle it / scale it correctly.

Do you know of a way for the Grid to be implemented in the Wysiwyg editor ?
like adding Grid layout, images , video and slider etc.

Also , how to position grid  in CMS pages like homepage, and using product sliders parallax effect, video or any other content

I want Sequencing the grid like First Images then videos afterward product sliders on home page

And last one how to modify .less files and XML update


texts:
I have button in mini cart header with title - "go to checkout". This button currently links to checkout, (which is correct), however I need to change this link to cart page (not the checkout).

<button
    id="top-cart-btn-checkout"
    type="button"
    class="action primary checkout"
    data-bind="attr: {title: $t('Go to Checkout')}">
    <!-- ko i18n: 'Go to Checkout' --><!-- /ko -->
</button>

File location is:

  Vender/theme/Magento_Checkout/web/template/minicart/content.html

Its obviously built and controlled through knockoutjs - so I had a look inside of:

  Vender/theme/Magento_Checkout/web/js/view/minicart.js

Seems as though there is a function inside of there called, initSidebar this calls the miniCart.sidebar however I can't see where it is generating the url for the button to link through to the checkout.

Any help?


texts:
How to show discount in percentage in product listing and product details section in magento 2.2.5 Like this

Please help. Thank you


texts: Magento 2 pwa Module "Magento_UpwardConnector"

texts:
Module "Magento_UpwardConnector"
Fatal error: Uncaught TypeError: file_get_contents() expects parameter 1 to be a valid path, bool given in /var/www/html/vendor/magento/upward/src/Resolver/File.php on line 94


texts: What is the Best Practices to remove product listing Magento V1.9.3

texts:
I am not a programmer - I am only an back-end user. I am trying to learn the best practices to make changes to my website. It was built by a programmer using Magento 1.9.3.1. and I was given access to the Admin panel, but I am on my own to figure out how it works.

I have access to some files using filezilla but I don't know enough about making changes and don't want to "break" things.

I want to delete a product from my site. I see that I could just hit delete from manageproducts/product listing - My question is should I do more or is this the best way to remove the item? IE should I be changing or removing something in the files as "best practice"

Tks - ChunksHouse


texts: Magento 2 add data to custom column (sales order grid)

texts:
I've created a custom column in the sales order grid and now I want to load some data into it. I need to load a specific table from sales_order_address into the column.

This is what I have

registration.php

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Vendor_Modulename',
    __DIR__
);

di.xml (etc)

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <virtualType name="Magento\Sales\Model\ResourceModel\Order\Grid"
                 type="Magento\Sales\Model\ResourceModel\Grid">
        <arguments>
            <argument name="columns" xsi:type="array">
                <item name="custom_field" xsi:type="string">sales_order.custom_field</item>
            </argument>
        </arguments>
    </virtualType>
</config>

module.xml (etc)

sales_order_grid.xml (view/adminhtml/ui_component)

<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <columns name="sales_order_columns">
        <column name="custom_field">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="filter" xsi:type="string">text</item>
                    <item name="label" xsi:type="string" translate="true">Prefix</item>
                </item>
            </argument>
        </column>
    </columns>
</listing>

How can I load the data into the column?


texts: view custom message in product page by category id

texts:
How do I display a message (ex. AVAILABLE IN 30 DAY) in product page only for a specific category id (98, 100 and 101)?

I've created

<?php if($_product->isSaleable()): ?>

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

<?php endif;?>

in view.phtml, and

<?php
$_product= Mage::getModel('catalog/product');
$catIds = $_product->getCategoryIds();
?>

<?php if ($catIds = $_product->getCategoryIds(); == '100')) ?>

AVAILABLE IN 30 DAY

<?php endif;
?>

in chair.phtml but it's not working.
Thanks


texts:
I enabled Default Store mode and merge css enabled after that, I have run all the commands from command line but still css not merged. Any one help me?

Magento Version:2.2.4


texts: Magento 2 : Move to 'MY ORDERS' tab in MY DASHBOARD

texts:
How I can move account  My orders list in Account dashboard ?  As My orders are on top at this time.

block block-dashboard-orders

what will be block name to move this ?


texts: custom api to create customer in Magento2

texts:
I have created custom api to create/update customer in magento2.

This is my webapi.xml file

 <route url="/V1/customer/createUpdate" method="POST">
    <service class="[Vendor]\[Module]\Api\CustomCustomerInterface" method="createUpdate"/>
    <resources>
        <resource ref="anonymous"/>
    </resources>
</route>

Here is my [Vendor]/[Module]/Api/CustomCustomerInterface.php

namespace [Vendor]\[Module]\Api;

interface CustomCustomerInterface
{

/**
 * POST for attribute api
 * @param mixed $param
 * @return array
 */

public function createUpdate($params);

}

Here is the code of [Vendor]/[Module]/etc/di.xml

<preference for="[Vendor]\[Module]\Api\CustomCustomerInterface"
            type="[Vendor]\[Module]\Model\createUpdate" />

Below is the code of [Vendor]/[Module]/Model/createUpdate.php

namespace [Vendor]\[Module]\Model;
use [Vendor]\[Module]\Api\CustomCustomerInterface;
use Magento\Store\Model\StoreManagerInterface;
use Magento\Customer\Api\AccountManagementInterface;

class CreateUpdate implements CustomCustomerInterface
{
protected $_storeManager;
protected $customerRepository;
protected $accountManagement;

public function __construct(
    \Magento\Framework\ObjectManagerInterface $objectManager,
    \Magento\Store\Model\StoreManagerInterface $storeManager,
    AccountManagementInterface $accountManagement,
    \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository

) {
    $this->_objectManager = $objectManager;
    $this->_storeManager = $storeManager;
    $this->accountManagement = $accountManagement;
    $this->customerRepository = $customerRepository;
}

/**
 * {@inheritdoc}
 */
public function createUpdate($params) {
    $resultArr = array();
    $paramArr = array();
    $result =  json_encode($params);
    $resultSet = json_decode($result,true);

    $customer = $this->accountManagement->createAccount($customer,
  $password, $redirectUrl);

    }

}

Below is my json Request

 {
  "params": {
  "Entity_Type": "CreateUpdate_Customer",
  "Entity_Attributes": {
  "Enabled": "No",
  "Phone_No": "123456789",
  "Magento_User_Type": " ",
  "Magento_Customer_ID": "0",
  "Magento_Address_ID": "0",
  "Mobile_Phone_No": "",
  "First_name": "Test",
  "Middle_name": "",
  "Lastname": "Test",
  "EMail": "test@test.com",
  "Registration_date": "",
  "Password": ""
   }
  }
}

Yes i seen, by this link we can create customer,

Magento 2 : how to create customer using REST API?

I am looking for someone help how this can be done using custom api, as per the code i used in my module.

I need to create customer with some custom attributes also. Please anyone help me on this.

Any help will be appreciated.


texts: Fatal error: Class 'Mage_Rms_Helper_Data' not found in C:\wamp\www\app\Mage.php on line 546

texts:
I realize there are questions just like this one, but none of the answers apply to me so far.

I am building a custom module that works, except the helper class won't load. I'm calling it with Mage::helper('rms') and I get

  Fatal error: Class 'NewHope_Rms_Helper_Data' not found in C:\wamp\www\app\Mage.php on line 546

Here's my module config. The observer correctly get triggered after a user successfully registers:

app/code/local/NewHope/RmsUpdate/etc/config.xml

<?xml version="1.0" encoding="UTF-8"?>

<config>
    <modules>
        <NewHope_RmsUpdate>
            <version>0.0.1</version>
        </NewHope_RmsUpdate>
    </modules>
    <global>
        <events>
            <customer_register_success>
                <observers>
                    <newhope_rmsupdate>
                        <class>newhope_rmsupdate/observer</class>
                        <method>import_new_customer_to_rms</method>
                        <type>singleton</type>
                    </newhope_rmsupdate>
                </observers>
            </customer_register_success>
        </events>
        <models>
            <newhope_rmsupdate>
                <class>NewHope_RmsUpdate_Model</class>
            </newhope_rmsupdate>
        </models>
        <helpers>
            <rms>
                <class>NewHope_Rms_Helper</class>
            </rms>
        </helpers>
    </global>
</config>

app/code/local/NewHope/RmsUpdate/Helper/Data.php

<?php

class NewHope_Rms_Helper_Data extends Mage_Core_Helper_Abstract
{
    ...
}

app/code/local/NewHope/RmsUpdate/Model/Observer.php

<?php

class NewHope_RmsUpdate_Model_Observer
{
    public function import_new_customer_to_rms(Varien_Event_Observer $observer)
    {
        $customer = $observer->getCustomer();

        //Fatal Error shows up here, when I try to load the rms helper!
        $rms_updated = !!Mage::helper('rms')->CreateRmsUser($customer);

        Mage::log(
            sprintf('%s (%s) registered. RMS Update: %s',
                $customer->getEmail(),
                $customer->getId(),
                $rms_updated ? 'Successful' : 'Failed'),
            null,
            'user-registration.log');
    }
}

I have these clues:

I experimented with changing the config.xml <rms> tag to something arbitrary that I knew was wrong, and the error still remained identical.
In between every attempt I manually deleted the var/cache folder, so even though the above points seem like a caching issue, I think they are not.
Compilation is disabled already, that's not the issue.


texts:
I have a Magento 2 store running with Elasticsearch 7.x and Litemage.
I’m getting the following error when trying to run an index job on Magento 2:
Design Config Grid index has been rebuilt successfully in 00:00:00
Customer Grid index has been rebuilt successfully in 00:00:00
Category Products index LiteMage purged tags cat_c
has been rebuilt successfully in 00:00:02
Product Categories index has been rebuilt successfully in 00:00:00
Catalog Rule Product index LiteMage purged tags cat_p,BLOCK_HTML
has been rebuilt successfully in 00:00:01
Product EAV index has been rebuilt successfully in 00:00:07
Stock index has been rebuilt successfully in 00:00:01
Inventory index LiteMage purged tags cat_p_2791
<!DOCTYPE html>

<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" >
<title> 400 Bad Request
</title>

400

Bad Request

It is not a valid request!

has been rebuilt successfully in 00:00:14
Catalog Product Rule index has been rebuilt successfully in 00:00:00
Product Price index has been rebuilt successfully in 00:00:01
Catalog Search index has been rebuilt successfully in 00:00:08
Order Attributes Grid by Amasty index has been rebuilt successfully in 00:00:00
Mageplaza Reward Catalog Rule index has been rebuilt successfully in 00:00:00
Mageplaza Reward Product Rule index has been rebuilt successfully in 00:00:00

The issue only started once I did a "Transfer Inventory To Source" on certain products (e.g transferred inventory quantities from one source to another).
I've tried to disable litespeed_litemage module; going back to built-in cache, running the command (which doesn't give any errors) and then turning litemage back on (without success).
I'm stuck and need help.


texts: Create shipment and invoice in mass action

texts:
I want to create shipment + Invoice using mass action in order grid.

Can anyone tell me the approach to do this?
Share code if possible otherwise approach would be good.

Thanks.


texts: Magento 2 Products not Save Once Imported If Products imported using csv

texts:
Products are not Saved Once Imported If Products imported using csv. If created manually It's working. While Importing using csv, save button is not working. Also Save & New, Save & Duplicate and Save & Close also not working.

Sample CSV


texts: Exclude custom options price from sorting

texts:
I'm working on a Magento store where there are lots of products with custom options.
I noticed that when I sort category products by price, the displayed value (e.g. 300,00 EUR) is different from the one Magento uses to sort.

I'll try to explain...

Product 1: price 100 EUR
Product 2: price 90 EUR + 1 required custom option 20 EUR
Product 3: price 130 EUR

I would like to see this sort ordeR:

Product 2: 90 EUR
Product 1: 100 EUR
Product 3: 130 EUR

But I see:

Product 2: 100 EUR
Product 1: 90 EUR
Product 3: 130 EUR

Is this the default Magento behavior? can I configure that from the backend area?

Thanks!


texts: Magento2 - After deletion of product, how to delete /avoid auto generation of placeholder (ghost) pictures?

texts:
we deleted products and its associated images from
/pub/media/import
/pub/media/catalog/product/
Also from
/pub/media/catalog/product/cache/
However, the images re-appear, not the original image, but the placeholder picture.
So the link (e.g.
www.xyz.com/pub/media/catalog/product/cache/99d67668879640f750d07dab82e3559f/3/8/38669-b_1-0.5x.jpg) is still active, and does not generate a 404 page.
Thats a problem, because we want to delete the cache of search engines, e.g. with the removal tool of bing. And, if there is still a working link, the cache of bing and the original picture does not get deleted.
How to get rid of these ghost placeholder images?


texts: How can I integrate jquery-ui-touch-punch into my module (mobile friendly slider)

texts:
So, I created a slider with jquery/ui and it is working so far. But as jquery/ui doesnt support touch events, I am trying to integrate jquery-ui-touch-punch.
I tried to declare it in my requirejs-config:
var config = {
    'paths': {'touchpunch':'Vendor_MyModule/js/jquery-ui-touch-punch'},
    'shim': {touchpunch: ['jquery','jquery/ui']}
}

and I am calling the script in my phtml file like this:
require(['jquery','jquery/ui','touchpunch'], function($){
    $( "#slider" ).slider();
});

and I put the script to view/frontend/web/js/jquery-ui-touch-punch.js
But still, the slider isnt functional on mobile devices.
I know, that the script depends on jquery and jquery/ui, so I declared them in the phtml file, too.
What am I missing?
or is there an even better solution with the knockout library?


texts: How to notify admin user after cronjob finished?

texts:
I have a cronjob that imports product data. This can take up to 40 minutes.
Is there a way to notify the admin user who is logged in?
I don't want the admin users to manually edit products during the import.
The notification messages require a page refresh or new login, so they are not suitable.
The admin user should be able to navigate around the admin area or leave the configuration area of the module and still be notified.


texts: Magento : How to Change Attribute Label For Configurable Product

texts:
I want to change attribute label of products. For that I have changed its label in backend like as shown in below image,

I want to change an attribute name from Flavour to Flavour Options but it still shows Flavour at frontend.

I checked further and found on product edit page, under associated products tab, it still showing Flavour and it doesn't use default value. If I use its default value then it works fine and show correct attribute name at frontend. see image--

There are hundreds of products, so I can't change them manually.

How can I use default value for all products for that store or can edit the value of attribute name ?


texts: Magento : After upgrading to PHP7.0 the shipping rates return zero in checkout page

texts:
Recently I have upgraded my server with PHP7.0 and checked all the functionalities. Everything seems to be working except the shipping rates on the one-page checkout page.

Once I choose the shipping & billing address it populates the available shipping methods with the zero values.

Also, the shipping rates are not reflected in the orders details page, admin area.

Guide me on this issue.


texts: hide product tabs based on the product and user while

texts:
I am using magento 1.8
I have multi store magento application.

I am adding custom attribute to the product, code is product_creator_id, Its nothing but a store id, that define the product is belongs to that store. I mean the product is created in that store.

I need to hide the product tabs while editing the product which is not belongs to that store.

For example
If product-A is created in store-A then product-A is belongs to store-A.
If product-A is editing in store-A only then it has all the product Tabs visible.

If product-A is editing in store-B then only General tab visible rest of the tabs are hidden.

I have searched lot for this I got some event obsrever

controller_action_layout_generate_blocks_after
core_block_abstract_prepare_layout_after

etc.
I dont want to use these events because they executing for both front and backend event. Is their any event that execute observer method only when admin event call.
or else
any other idea to make it work.
Help me.

Thanks Lot.


texts: How to add multiple products to cart magento 2

texts: I have a problem in magento 2, I wish to customize the product details page for adding multiple proucts to cart, which means "product-options-wrapper" div(configurable.phtml) along with option to add quantity(addtocart.phtml) should be generate dynamically on add new item button click. is it possible using custom module ?


texts: can not find product information stored in index table

texts: what is table names where product infromation stored in database.Like product_name,description,short_description,sku because I can not find index tablr where product all information stored in table. please anyone tell me table name ?


texts: JavaScript Change in custom module not refreshed by deployment

texts:
I am going crazy right now. I made a change in a JavaScript file in a custom module which is installed via composer from my own repo. But I can't, under any circumstances, get those changes reflected in the frontend. I also use Cloudflare, but it is paused right now to not store any files in cache. I tried the following:

static:content:deploy (and yes I deployed for my specific language as well)
rm -R pub/static/* & static:content:deploy & cache:flush
rm -R var/view_preprocessed & rm -R pub/static/* & static:content:deploy & cache:flush
Disabling Varnish & cache:flush
setup:upgrade & setup:di:compile & static:content:deploy & cache:flush

The only possibility to see my changes is when I copy my changes to the already deployed and minified file in the pub/static directory... .

I have merging & minification for JavaScript enabled in Magento backend and static file signing is also active. But I can't, under any circumstances, get my changes be respected in the deployed files. I have no more ideas to try...


texts:
How can I programmatically build this url: http://127.0.0.1/magento2/sales/order/view/order_id/61/?
Im in a custom controller with the current Order object.


texts: In Magento 2, Can we use bootstrap 3 on Ves Need theme?

texts: Is that fine to use Bootstrap on Magento 2?.


texts: How to add dropdown for product qty in update cart page in magento 2?

texts:
I added dropdown for product qty box in addtocart.phtml like below:

        <?php /* @escapeNotVerified */ echo __('Qty') ?>
        <select name="qty" id="qty" title="<?php /* @escapeNotVerified */ echo __('Qty') ?>"
               class="input-text qty" data-validate="<?php echo $block->escapeHtml(json_encode($block->getQuantityValidators())) ?>">
               <?php $i = 1 ; ?>
                <?php
                 while( $i < 500) { ?>
                    <option value="<?php echo $block->getProductDefaultQty() * $i; ?>"><?php echo $block->getProductDefaultQty() * $i; ?></option>
                    <?php $i++; ?>
                 <?php } ?>
        </select>

But I also want to implement same in updatecart.html in magento 2. How to do that?


texts: What is difference between JavaScript minify and merge?

texts:
I go through http://devdocs.magento.com/guides/v2.1/frontend-dev-guide/themes/js-bundling.html document to optimize JS. But bundle.js is not generating. Only file.min.js is there.

Also third party extension not merged.


texts: Adding Additional Messages to Authorize.net Responses

texts:
I am attempting to add some more useful messages for various error codes that are returned from Authorize (Using the AcceptJS) as the error configuration only has four out of the box.

I have added the authorizenet_acceptjs_error_mapping.xml file under a custom module in the following manner, but my updated responses/codes are not being utilized.

-VENDOR
--MODULE
---etc
----authorizenet_acceptjs_error_mapping.xml

Do I need to do something else in order for Magento to utilize my error mapping file instead of the default?


texts:
i recently changed the theme on my commerce.

When i try to open a product in frontend, magento give me this error

a:5:{i:0;s:69:"Invalid method Mage_Catalog_Block_Product_View::_isSecure(Array
(
)
)";i:1;s:2898:"#0 /home/www/app/design/frontend/em0131/default/template/catalog/product/view.phtml(62): Varien_Object->__call('_isSecure', Array)
#1 /home/www/app/design/frontend/em0131/default/template/catalog/product/view.phtml(62): Mage_Catalog_Block_Product_View->_isSecure()
#2 /home/www/app/code/core/Mage/Core/Block/Template.php(241): include('/home/www/app/d...')
#3 /home/www/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/em0131...')
#4 /home/www/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#5 /home/www/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Template->_toHtml()
#6 /home/www/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#7 /home/www/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Text_List->_toHtml()
#8 /home/www/app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#9 /home/www/app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('content', true)
#10 /home/www/app/design/frontend/em0131/default/template/page/2columns-right.phtml(72): Mage_Core_Block_Abstract->getChildHtml('content')
#11 /home/www/app/code/core/Mage/Core/Block/Template.php(241): include('/home/www/app/d...')
#12 /home/www/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/em0131...')
#13 /home/www/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#14 /home/www/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Template->_toHtml()
#15 /home/www/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#16 /home/www/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#17 /home/www/app/code/core/Mage/Cms/Helper/Page.php(137): Mage_Core_Controller_Varien_Action->renderLayout()
#18 /home/www/app/code/core/Mage/Cms/Helper/Page.php(52): Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController), 'no-route')
#19 /home/www/app/code/core/Mage/Cms/controllers/IndexController.php(75): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), 'no-route')
#20 /home/www/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Cms_IndexController->noRouteAction()
#21 /home/www/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('noRoute')
#22 /home/www/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#23 /home/www/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#24 /home/www/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#25 /home/www/index.php(70): Mage::run('', 'store')
#26 {main}";s:3:"url";s:37:"/it/622av-pettini-avorio-0020002.html";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:2:"it";}

What should i do?


texts: How can we increase WYSIWYG Editor max character limit in Magento 1.9?

texts: I need to increase WYSIWYG Editor max character limit in Magento 1.9.


texts:
My Magento version is 2.1.3 and i need to upgrade it to latest version which is currently 2.1.7

Should i upgrade to 2.1.7 directly or should i upgrade version by version like 2.1.3 to 2.1.4 then 2.1.4 to 2.1.5 likewise

will it create any errors if i directly upgrade to latest version?


texts: Magento 2 REST API get all product details

texts:
I cannot seem to retrieve description, meta_title, meta_description etc. when using the REST API.

I have tried the below API call with no luck:

https://domain.com/rest/all/V1/products/123456

{
    "id": 41314,
    "sku": "123456",
    "name": "Some product name",
    "attribute_set_id": 10,
    "price": 500,
    "status": 2,
    "visibility": 4,
    "type_id": "simple",
    "created_at": "2017-06-06 01:34:08",
    "updated_at": "2017-06-06 01:34:08",
    "weight": 1,
    "extension_attributes": {
        "website_ids": [
            1,
            2,
            3,
            4
        ],
        "category_links": [
            {
                "position": 1,
                "category_id": "483"
            },
            {
                "position": 1,
                "category_id": "307"
            },
            {
                "position": 1,
                "category_id": "434"
            },
            {
                "position": 1,
                "category_id": "534"
            }
        ],
        "stock_item": {
            "item_id": 46746,
            "product_id": 41314,
            "stock_id": 1,
            "qty": 0,
            "is_in_stock": false,
            "is_qty_decimal": false,
            "show_default_notification_message": false,
            "use_config_min_qty": true,
            "min_qty": 0,
            "use_config_min_sale_qty": 1,
            "min_sale_qty": 1,
            "use_config_max_sale_qty": true,
            "max_sale_qty": 10000,
            "use_config_backorders": true,
            "backorders": 0,
            "use_config_notify_stock_qty": true,
            "notify_stock_qty": 1,
            "use_config_qty_increments": true,
            "qty_increments": 0,
            "use_config_enable_qty_inc": true,
            "enable_qty_increments": false,
            "use_config_manage_stock": true,
            "manage_stock": true,
            "low_stock_date": "2017-11-23 15:33:03",
            "is_decimal_divided": false,
            "stock_status_changed_auto": 1
        }
    },
    "product_links": [],
    "options": [],
    "media_gallery_entries": [],
    "tier_prices": [],
    "custom_attributes": [
        {
            "attribute_code": "special_price",
            "value": "0.0000"
        },
        {
            "attribute_code": "special_from_date",
            "value": "2017-06-06 00:00:00"
        },
        {
            "attribute_code": "special_to_date",
            "value": "2017-06-07 00:00:00"
        },
        {
            "attribute_code": "news_from_date",
            "value": "2017-06-05 00:00:00"
        },
        {
            "attribute_code": "news_to_date",
            "value": "2017-06-07 00:00:00"
        },
        {
            "attribute_code": "custom_design_from",
            "value": "2017-06-06 00:00:00"
        },
        {
            "attribute_code": "custom_design_to",
            "value": "2017-06-08 00:00:00"
        },
        {
            "attribute_code": "category_ids",
            "value": [
                "483",
                "307",
                "434",
                "534"
            ]
        },
        {
            "attribute_code": "options_container",
            "value": "container2"
        },
        {
            "attribute_code": "required_options",
            "value": "0"
        },
        {
            "attribute_code": "has_options",
            "value": "0"
        },
        {
            "attribute_code": "url_key",
            "value": "some-url"
        },
        {
            "attribute_code": "msrp_display_actual_price_type",
            "value": "0"
        },
        {
            "attribute_code": "tax_class_id",
            "value": "2"
        },
        {
            "attribute_code": "gift_message_available",
            "value": "2"
        }
    ]
}


texts: How to insert a PDF link in a FAQ widget?

texts:
I'm new so I don't know how things really work here but I'm going to give it a try :

I would like to know if there's a way to insert a PDF link in an FAQ widget. I used HTML coding in the WYSIWYG (am I correct?) with the code "<"a href='' >" but it did not work out.

Could you help me, please?

Thanks.

Adrien.


texts: product images are broken magento ver. 2.3.4

texts:
I have moved Magento website form demo to live server ! now looks like product page images are broken , in all pages some static image is coming , category listing pages images are working fine !

my website link is product page link is
I didn't find any solution in online! any one please let me know where I am wrong !


texts: Magento 1.6- Where did Order Archive section go?

texts:
I am looking into this guide:
http://www.magentocommerce.com/knowledge-base/entry/archiving-orders

However, I cant find Order Archive section anywhere in Magento 1.6...

Can anyone tell me where is it?


texts: Magento 2: How to truncate companies table

texts: I want truncate all tables of companies in Magento 2


texts: Magento 2: I want to show customer ui component grid in my custom module

texts:
I want to show customer ui_component grid in my custom module and set collection according to customer attribute value.

I have test yes/no customer attribute. I want to show only those particular customer in my custom grid whom test value is set to yes


texts:
How can i remigrate data to new database after one migration?
Workflow:

Migrate data from M1 => M2. In M1 database new m2_cl tables created.
Delete M2 table and try to migrate data from M1 one more time.

Is it safe to migrate settings and data one more time, when m2_cl tables exists in M1 db? Or should i delete something (m2_cl tables) first, and then do the migration?
Thanks in advance


texts: using event after catalog collection load doesn't get the count right

texts:
I'm trying to modify items in a collection on page load (catalog) and using the event: catalog_product_collection_load_after

and the code for the event is :

$observer->getCollection()
            ->addFieldToFilter('entity_id', array('nin' => array_keys($_excludeProducts)))
            ->clear()
            ->load();

this does exclude product(s) but the count is wrong. like there're 5 products in the collection and on the grid as well but the count is 6 items.
How can i correct this?


texts: magento 1.9.1.1 permission error - 403 forbidden

texts:
I tried to install the latest magento 1.9.1.1 at my cpanel host. But it occurred a 403 forbidden error when I visited my site to install...

I checked that some files with 640 permission, but not 644.  So I think there is little error with this official 1.9.1.1 zip file. Is anybody came across this issue?


texts:
I have a product list like this:

my checkbox value is product id, how to click button request more info and add product id in checkbox to cookie.

Any help? Thank in advance.


texts:
We are using Marketplace in my website also some product have more then one seller. Even every seller have unique SKU How to get that Sku?

If i use this $products->getSku() base sku only came not assign seller sku how to get that?

One more thing i got it if product is assigned it have mpassignproduct_id it's like unique id so how to get based on that?

<?php $name = $name."
getUrlPath())."' target='blank'>".$orderdproname." ".$products->getSku()."  X ".intval($res['magequantity'])."&nbsp;
";?>

It display base Sku Only

Assign Product Table Name marketplace_assignproduct

Product Id name :mpassignproduct_id

public function getpronamebyorder($mageorderid){
        $customerid=Mage::getSingleton('customer/session')->getCustomerId();
        $name='';
        $_collection = Mage::getModel('marketplace/saleslist')->getCollection();
        $_collection->addFieldToFilter('mageorderid',$mageorderid);
        $_collection->addFieldToFilter('mageproownerid',$customerid);
        foreach($_collection as $res){
                $products = Mage::getModel('catalog/product')->load($res['mageproid']);
               /*Restrict Character length*/
                $orderdproname = $res['mageproname'];
                $orderdproname = substr($orderdproname,0,20)."..";
                /*Restrict Character length*/
                $name = $name."
getUrlPath())."' target='blank'>".$orderdproname." ".$products->getSku()."  X ".intval($res['magequantity'])."&nbsp;
";
                //$name = $name."
getUrlPath())."' target='blank'>".$orderdproname.""." X ".intval($res['magequantity'])."&nbsp;
";
    }
        return $name;
    }


texts: Decoupled Frontend Architecture and Magento

texts:
Is there anyway we can utilize Decoupled Frontend Architecture in Magento. I would like to know if I can utilize this architecture to create Magento modules or convert my existing extensions?

Is it possible to use this with REST and GraphQL Protocol?

Here is the information on architecture

If anyone gets an idea to utilize it with Magento 2, please post your answer here.


texts: Table weigh shipping inspite of Show Method if Not Applicable

texts: I have 3 shipping methods, Flat Rate for U.S. only, Free Shipping for U.S. only and a Table Rate for International select countries. When in the cart if you enter an international location the Flat Rate and Free shipping options do not display as I have set "Show Method if Not Applicable" to No. However, if placing an order to be shipped to a U.S. location the International option (table rate) still displays even though I have set "Show Method if Not Applicable" to No and United States is not selected in the "Ship to Specific Countries" list.


texts:
$quote = $this->quoteFactory->create()->load($quote_id);
 $quote->setSubtotalWithDiscount(number_format((float)0, 4, '.', ''));
 $quote->setBaseSubtotalWithDiscount(number_format((float)0, 4, '.', ''));
 $quote->setGrandTotal(number_format((float)0, 4, '.', ''));
 $quote->setBaseGrandTotal(number_format((float)0, 4, '.', ''));
 if($quote->save())
 {
     echo 'Done';
 }

    It echos data but data is not inserting....


texts: Quantity increments in list.phtml and Ajax cart

texts:
I have a requirement to add a quantity box for each product in the list.phtml file and have it only accept multiples of quantity increments. All of our products are sold with quantity increments!!

I've added the box and +- buttons to affect the quantity however I have no idea how to get the Javascript to:

Pull the quantity increment from Magento for each product in the list
Have the +- buttons multiply the quantity increments (eg: 5,10,15,20 etc...)

We are employing Ahead Works' AjaxCartPro extension to add Ajax "add to cart" functions but no matter what I do it's not recognizing the quantity field even if we enter the correct multiplier properly.

Can anyone offer some assistance?  Ahead Works declined to help.


texts: How can I update the mini-cart without refreshing the page?

texts: After I have programmatically added an item to the cart, without reloading the cart page is possible to update the mini-cart, and, if so, how?


texts:
Magento 2.3.3

I want to display the mini search form form.mini.phtml in a template. In Magento 1 I did it like this:

$this->getLayout()->createBlock('core/template')->setTemplate('catalogsearch/form.mini.phtml')->toHtml();

How would I do that in Magento 2?

Thanks!


texts: error on homepage: Notice: Undefined variable: percentage

texts:
We are having an error on the homepage  by

 Notice: Undefined variable: percentage  in /var/www/vhosts/live/kg-electronics/htdocs/app/design/
 frontend/kg/default/template/catalog/product/price.phtml on line 277


texts: Get customer details in backend admin panel order

texts:
What I have done:

I have few custom calculations to be done after placing an order for the customer in magento admin panel. I have hooked on to sales_order_save_after event inside tab inside my module's config.xml .

The Problem:

I need to get the customer_id of the actual customer for whom the order is been placed on the backend. How can this be done?

$_customer = Mage::getSingleton('customer/session')->getCustomer();
$customer_id=$_customer->getId();

The above will give me the customer_id in case of front end, I need a way to get the customer's id when ordering from backend.

In case, the event "adminhtml_sales_order_create_process_data", is what I need to hook on, do let me know. because I am also kind of confused about which event to hook on.

Help me out.


texts: Custom static blocks in magento 1.9.0.1 home page

texts:
I am converting an HTML template into Magento theme. Here I have to separate each blocks into custom static block files such as footermenu.phtml, tweet.phtml and copyright.phtml to call like,

<?php echo $this->getChildHtml('footermenu'); ?>
<?php echo $this->getChildHtml('tweet'); ?>
<?php echo $this->getChildHtml('copyright'); ?>

After reading this blog tutorial, added a new block like the following but it is not appearing with my Magento 1.9.0.1

app/design/frontend/base/default/layout/local.xml

<?xml version="1.0"?>
    <layout>
        <reference name="root">
            <block type="core/text_list" name="newreference" as="newreference" translate="label">
                New Reference
            </block>
        </reference>
        <reference name="newreference">
            <block type="core/template" name="newreferenceblock" template="newreference.phtml" />
        </reference>
    </layout>

In app/design/frontend/base/default/template/page/2columns-right.phtml

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

app/design/frontend/base/default/template/page/template/newreference.phtml

Hello New Reference!


texts:
In XML layouts, is there a way of ensuring a block you are adding goes last?

I am aware of before="" and after="" for positioning a block relative to other blocks.

I was wondering if there was a way of forcing a block to be the last one rendered?


texts: Unable to override Braintree PayPal button view

texts:
We use the PayPal integration made available through the built-in Braintree support. I want to override the following template so I can change the button URL.

  \vendor\magento\module-braintree\view\frontend\templates\paypal\button.phtml

I have created the following file to override this:

  \app\design\frontend\Company\Theme\Magento_Braintree\view\frontend\templates\paypal\button.phtml

This has no effect though, and the old file is used. This is also demonstrated with the template hints switched on:

The first button has also been overridden, and this works as expected.

I have cleared cache, deployed static content etc.

Have I missed something? Do you have to have more than just a view to an override work?


texts: Magento 1.9 creating a widget ends with adding layout update

texts:
I'm trying to create a widget via admin panel.

Created first a static block, via widget selected the right theme/store etc, but at the bottom to select add layout update it ends there. No reaction.

Is there something disabled? Do I have to turn something on in the backend?

Why is the add layout update button disabled?


texts:
I am trying to install Magento 2.4 in my localhost. I am using Linux Mint 19.1 as my OS. First I downloaded Magento 2.4 using below command.
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition magentotest

I tried to install Magento 2.4 using below command.
php bin/magento setup:install --base-url=http://127.0.0.1/magentotest/ \
--db-host=localhost --db-name=magentotest --db-user=root --db-password=root \
--admin-firstname=Magento --admin-lastname=User --admin-email=user@example.com \
--admin-user=admin --admin-password=admin123 --language=en_US \
--currency=USD --timezone=America/Chicago --use-rewrites=1 \
--search-engine=elasticsearch7 --elasticsearch-host=es-host.example.com \
--elasticsearch-port=9200

I am getting below error while trying to run above command.
Could not validate a connection to Elasticsearch. No alive nodes found in your cluster

I installed JDK and elastic search.

But I am getting below screen while trying to browse Magento 2.4

What is the solution ? How to install Magento 2.4 in Linux Mint ?


texts:
I have Magento 2.2.8 and I'm not able to install MailChimp in ANY way. I tried the manual installation, but it said:

[ReflectionException] Class Mailchimp does not exist

I tried the installation with the composer in a lot of ways, but it retrieved a lot of warning/exceptions.
If I try to install the latest version compatible with my version (101.2.34), the installation goes through, but at the end, I got this error:

The following modules are outdated:
Ebizmarts_MailChimp db schema version: defined in codebase - 101.2.34, currently installed - 102.3.37
Ebizmarts_MailChimp db data version: defined in codebase - 101.2.34, currently installed - 101.2.37 [] []

So I tried to install the version 101.2.37 (which it should be compatible only with Magento 3). Indeed, the installation doesn't go through and I got this error from the composer:

  Problem 1
    - mailchimp/mc-magento2 102.3.37 requires magento/framework 102.0.* -> no matching package found.
    - mailchimp/mc-magento2 102.3.36 requires magento/framework 102.0.* -> no matching package found.
    - mailchimp/mc-magento2 102.3.35 requires magento/framework 102.0.* -> no matching package found.
    - mailchimp/mc-magento2 102.3.34 requires magento/framework 102.0.* -> no matching package found.
    - Installation request for mailchimp/mc-magento2 ^102.3 -> satisfiable by mailchimp/mc-magento2[102.3.34, 102.3.35, 102.3.36, 102.3.37].

I tried to install ALL the previous versions via composer, but it always tells me that the modules are outdated.
I tried to run composer update as well, but it didn't fix the problem.

This thing is very annoying and I really don't know how to figure this out. I really need to install MailChimp.

Please, help me!
Thanks


texts: color swatches won't swap images on custom theme magento 1.9.1

texts:
After following the tutorial from "format" to apply the color swatches on an custom theme in magento.

Everything shows nice and neat, even the zoom works.

However I can't get the product image to swap when a customer would click the color swatch...

Does someone have a tip or idea where to find the error?

I've setup a test site where I'm making the changes:
www.fietsenwinkelonline.be

Any tips are welcome!


texts: Is it possible to rewrite protected method in helpers?

texts:
Is it possible to rewrite protected method like this in helpers?

class Fishpig_Wordpress_Helper_Filter extends Fishpig_Wordpress_Helper_Abstract
{
 ...
    protected function _applyShortcodes(&$content, $object, $context) {


texts: Console error on pages with col2-left-layout

texts:
I am making my mobile site and our navigation is a bar at the top which when you click expands and shows the categories. However on any pages with the layout class col2-left-layout the navigation doesn't expand, i have checked the console and it say there is an error in my script.js saying  Uncaught TypeError: undefined is not a function

and it is referring to this line

if ($('.col-left').length) $('.col-left').masonry({itemSelector : '.block', isResizable:true, isAnimated:true});

I dont understand why this is happening on only pages with certain layouts, could anyone shed some light on the situation please?

Is there a way of changing the page layout depending on the screen size, for example if viewing on a mobile device the layout changes from col2_left_layout to col1_layout??


texts: Where can I find all blocks/elements related to Newsletters in Magento 2?

texts:
I need to disable or hide all elements/blocks related to Newsletter.
As of the moment, I knew only 2 places on where these things exist:

Footer (subscribe by entering your email address)
Create Account Page (sign up for newsletter checkbox)

Thanks in advance!


texts: Is there a way I could retrieve all the custom options and their values? (not from a specific product, but just all of the options)


texts: Translate Filter button layered nav sidebar Magento 1.9

texts:
could anyone tell me how can I translate the value "FILTER" for button price in layered navigation?

I have a multilingual site all translated except that label, always appear in English as you can see in the image below.

I tired everything, the inline translation doesn't work, the tranlsate.csv doesn't work too and I can't find the right .phtml file or a js file.

Thanks in advance


texts: Call Same Function with Diffent Parameters

texts:
I am using 1.9.3.6. In Namespace_MOdule_Model_Catalog_Layer, calling the Same function with different Parameters as below at the same time.

 public function attributeCollection($colln = "", $query = "",$type = "")
{

    $labelArray = $valueArray = $resultArray = array();

    $productModel = Mage::getModel('catalog/product');
    $attribute = $productModel->getResource()->getAttribute($type);
    $attributeOptions = $attribute->getSource()->getAllOptions();
    foreach ($attributeOptions as $attributeOption) {
        if ($attributeOption["label"] != "") {
            array_push($labelArray, $attributeOption["label"]);
            array_push($valueArray, $attributeOption["value"]);
        }
    }
    $combinedArray = array_combine($valueArray, $labelArray);

    foreach ($combinedArray as $key => $value) {
        if (false !== stripos($value, $query)) {
            array_push($resultArray, $key);
        }
    }

    $colln->addAttributeToFilter($type, array('in' => $resultArray ));

    return $colln->getData();
}

        $brandCollection = $this->attributeCollection($collection, $query, $type="brand");
        $modelCollection = $this->attributeCollection($collection, $query, $type="model");

        echo "<pre>";

        print_r($brandCollection);
        print_r($modelCollection);

If the $query is in $brandCollection then it is prints fine.
Otherwise, if the $query is in $modelCollection it is empty.

How to fix it.


texts: How to change the amount of products shown in related products programatically?

texts:
I want to display more than 4 products in the related products block. I've tried some solutions like overriding the core Related.php class and using methods:
$this->_itemCollection->setPageLimit(6),
$this->_itemCollection->getSelect()->limit(6).

Also, changed the $limit variable to 6 in the related.phtml file, but none of these worked.I want to increase the products count here:
Any kind of help would be appreciated


texts:
I'm trying to add a new customer address using Magento 2 REST API in C#. I'm using POST /V1/customers/:id. I keep getting the below error. Where do I find the regionId? Is there another API I can use to get it because I can't easily query the Magento database everytime.

{
   "message":"%fieldName is a required field.",
   "parameters":{
      "fieldName":"regionId"
   }
}

Here is the JSON request:

{
"customer":{
    "email":"customer@example.com",
    "firstname":"John",
    "lastname":"Doe",
    "websiteId":"1",
    "addresses":[
        {
            "customer_id":"1",
            "firstname":"John",
            "lastname":"Doe",
            "company":"ABC Manufacturing",
            "telephone":"555-555-5555",
            "city":"Boston",
            "region":"Massachusetts",
            "postcode":"02115",
            "country_id":"US",
            "street":[
                "123 Main Street",
                "PO Box 321"
            ]
        }
    ]
}
}


texts: I would like to know how to hide my ip address I often go on my website and it is not very good for my statistics


texts: How to make categories and sub-catgeories vary by region

texts:
I want to change the categories & sub-categories according to region.
e.g. I have category FOOD for US & category ELECTRONICS for UK so when I select US it should display FOOD & vice versa. Please suggest me any extension or any idea how t do it.
Thanks in advance!!


texts: Observers are not triggering in REST API

texts:
We have developed an website in Magento EE using REST API. From User registration to Order place , we have exposed as REST API.

In that we have used Amasty Special promotion pro extension for Discounts. When a cart level discount is applying , salesrule_validate_process event is triggering from the SalesRule Module. But Discounts (created by the Amasty extension) is not applying ?

Can anyone let me know what will be the issue


texts: Magento 2 Adding Blocks to Custom Page Layouts

texts:
I have created a new custom page layout in Magento 2.

Here is the code:

<?xml version="1.0"?>
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
    <update handle="empty"/>
    <referenceContainer name="page.wrapper">
        <container name="header.container" as="header_container" label="Page Header Container"  htmlTag="header" htmlClass="page-header" before="main.content"/>
        <container name="page.top" as="page_top" label="After Page Header" after="header.container"/>
        <container name="footer-container" as="footer" before="before.body.end" label="Page Footer Container" htmlTag="footer" htmlClass="page-footer" />
    </referenceContainer>
</layout>

I have also created a Block in the backend.

My question is...How can I call the block content into my layout, in other words I want to reference the Block I made in my Layout so that the content of my block will be should in this layout.

Have can I do that?

Tried this - Suggested by krishna:

<referenceContainer name="content">
        <block class="Magento\Cms\Block\Block" name="topmostMessage">
            <arguments>
                <argument name="topmostMessage" xsi:type="string">quickblock</argument>
            </arguments>
        </block>
</referenceContainer>
<referenceContainer name="page.wrapper">
    <container name="header.container" as="header_container" label="Page Header Container"  htmlTag="header" htmlClass="page-header" before="main.content"/>
    <container name="page.top" as="page_top" label="After Page Header" after="header.container"/>
    <container name="footer-container" as="footer" before="before.body.end" label="Page Footer Container" htmlTag="footer" htmlClass="page-footer" />
</referenceContainer>