texts: Bespoke attribute filters for each category pages

texts:
By default Magento will display every attribute with a status of 'Filterable' on layered navigation. I want to be able to decide which filterable attributes appear on each category page.

It's important to note that I need the same product to display different filterable attributes on different category pages. It's also important to note that a category may contain products from several different attribute sets, so I cannot do this via Attribute sets.

For example, let's say I have attributes A, B and C and I have two category pages, CAT1 and CAT2. By default the filters would appear:

CAT1

A (option 1, 2 etc)
B (option 1, 2 etc)
C (option 1, 2 etc)

CAT2

A (option 1, 2 etc)
B (option 1, 2 etc)
C (option 1, 2 etc)

I want the option to be able to say CAT1 should only display attribute B and C whilst CAT2 should display A and C; thus it would appear:

CAT1

B (option 1, 2 etc)
C (option 1, 2 etc)

CAT2

A (option 1, 2 etc)
C (option 1, 2 etc)

Again, it's important to note that the two categories could contain exactly the same products...it's just that I want to be able to decide which attributes can be filtered depending on the category.

In the actual site I have > 100 categories and > 3000 products. There's also an admin team so whatever solution I implement can't be hard coded - the users have to be able to amend for each category page.

Anyone heard of any solution like this? Or is this a bespoke bit of development work I'm looking at here?


texts: magento2 build image updater service which run through all created products and add missing images to product

texts:
I have some products created, but they do not have images when i see them in frontend or backend. I have these missing images in one folder with the format of productSku.png.
I want to build image updater service which run through all created products and add missing images to product


texts:
All of Magento order is showing Mixed status in backend. Although the ordered items are shipped, As you can see in the below screenshot.

***What does the 'MIXED' word means here ?***

I found this line of code in Core magento file.

Line 197: app/code/core/Mage/Sales/Model/Order/Item.php

const STATUS_PENDING        = 1; // No items shipped, invoiced, canceled, refunded nor backordered
const STATUS_SHIPPED        = 2; // When qty ordered - [qty canceled + qty returned] = qty shipped
const STATUS_INVOICED       = 9; // When qty ordered - [qty canceled + qty returned] = qty invoiced
const STATUS_BACKORDERED    = 3; // When qty ordered - [qty canceled + qty returned] = qty backordered
const STATUS_CANCELED       = 5; // When qty ordered = qty canceled
const STATUS_PARTIAL        = 6; // If [qty shipped or(max of two) qty invoiced + qty canceled + qty returned]
                                 // < qty ordered
const STATUS_MIXED          = 7; // All other combinations
const STATUS_REFUNDED       = 8; // When qty ordered = qty refunded

const STATUS_RETURNED       = 4; // When qty ordered = qty returned // not used at the moment

I am not able to understand what i need to check. Can anyone help me in it  please ?


texts: Magento2 when site is loading than facing issue

texts:
I have facing issue in magento2 when site is loading.

  Fatal error: Uncaught CredisException: Connection to Redis
  127.0.0.1:6379 failed after 2 failures.Last Error : (1) Connection refused in
  /var/www/magento/vendor/colinmollenhour/credis/Client.php:475 Stack
  trace: #0
  /var/www/magento/vendor/colinmollenhour/credis/Client.php(471):
  Credis_Client->connect() #1
  /var/www/magento/vendor/colinmollenhour/credis/Client.php(784):
  Credis_Client->connect() #2
  /var/www/magento/vendor/colinmollenhour/credis/Client.php(637):
  Credis_Client->__call('select', Array) #3
  /var/www/magento/vendor/colinmollenhour/cache-backend-redis/Cm/Cache/Backend/Redis.php(393):
  Credis_Client->select(1) #4
  /var/www/magento/vendor/colinmollenhour/cache-backend-redis/Cm/Cache/Backend/Redis.php(250):
  Cm_Cache_Backend_Redis->_applyClientOptions(Object(Credis_Client)) #5
  /var/www/magento/vendor/magento/zendframework1/library/Zend/Cache.php(153):
  Cm_Cache_Backend_Redis->__construct(Array) #6
  /var/www/magento/vendor/magento/zendframework1/library/Zend/Cache.php(94):
  Zend_Cache::_makeBackend('Cm_Cache_Backen...', Arra in
  /var/www/magento/vendor/colinmollenhour/credis/Client.php on line 475


texts: How can I replace the minicart icon when using a custom theme?


texts: Can Magmi be installed outwith your site root directory?

texts:
Does Magmi have to be unzipped and installed in the root folder? Experimenting with moving all files to a sub folder for added security really. The theory behind this is it is very easy for somebody to establish your store is Magento, and easy then to navigate to the magmi url and play about with existing import files sitting. I've tried moving it to a sub folder, but receiving numerous errors, managed to work through a few, such as permission issues on some folders/files, but the likes of below I can't work out:

fopen(/var/www/vhosts/domain.com/httpdocs/magmi/state/magmistate) [function.fopen]: failed to open stream: No such file or directory in /var/www/vhosts/domain.com/httpdocs/magmi/inc/magmi_statemanager.php on line 45

or when trying to save the DB details:

Warning: require_once(properties.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/vhosts/domain.com/httpdocs/magmi/inc/magmi_config.php on line 2

Any ideas if I'm flogging a dead horse here?


texts: After Migrate catalog and category some custom attribute for category not saved

texts:
I did migration for catalog and category in fresh Magento1.9.0.1. to Magento2.2.7 migration was successfully completed after lot's of efforts :)

Actual issue here

But after that i have copied catalog_ table to my current site that is already migrated before so i just want to update with newly added product from my old site.

Everything was working perfect but the issue is when try to save some custom attribute it was not saved.

So i have deleted previous attribute and create same with new upgradeSchemaand it is working fine.

So what could be problem here that previously it was not working any relation table is causing this issue?


texts: Add 1 column on All customer page magento admin

texts:
I would like to know where can I find the source for this screenshot?

I tried app/code/company/vendor/view/adminhtml/ui_compoment but no luck. I would like to add a column in this page from the database.

Does someone has an idea on this?

Thanks!

Thanks


texts: Is there a good reference online for Class Methods , depreciation for all versions?

texts:
With so many different versions of magento around , is there a really good reference / tool for classes , methods etc spanning across versions?

I found This page which gives you an overall history of magento and repositories for all versions - but it is cumbersome to wade through everything.

I would even pay for a good book! ( preferably a quick reference ) .  I have alan Storms "No frills layout" book which is very helpful - but looking for something more.

Some of the things I want to do:

know which class methods are deprecated / introduced through versions
know which core attributes are deprecated / introduced over the versions.
Syntax / methods that are synonymous - and if there are performance differences ( e.g. count vs getSize or the different ways of instantiating classes as an object ).

Note:  I don't want the api reference , I think the things I need are more low level. It seems to me that the magento documentation is significantly lacking.


texts: Magento 2 configurable products sale old price not showing

texts:
I've Magento V.2.2.2 running well, except for the configurable product listing dose not show any information about Sale,

no old price showing next to the new special price
no sale label is showing on on-sale configurable product

Please any way to get this issue resolved.


texts: How to include custom block to phtml file

texts:
I have created a block for getting wishlist items, after that i need this list to my custom phtml file,
my block :
app\code\vendor\path\Block\WishlistProducts.php
<?php
namespace Vendor\Path\Block;

    use Magento\Framework\View\Element\Template\Context;
    use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory;
    use Magento\Wishlist\Model\ResourceModel\Item\CollectionFactory as WishlistCollectionFactory;
    use Magento\Customer\Model\Session;

    class WishlistProducts extends \Magento\Framework\View\Element\Template
    {
        protected $_wishlistCollectionFactory;
        protected $_customerSession;
        protected $_productCollectionFactory;

        public function __construct(Context $context,
            CollectionFactory $productCollectionFactory,
            WishlistCollectionFactory $wishlistCollectionFactory,
            Session $customerSessio
        ) {
            $this->_productCollectionFactory = $productCollectionFactory;
            $this->_wishlistCollectionFactory = $wishlistCollectionFactory;
            $this->_customerSession = $customerSessio;
        }

        public function getWishlistProductCollection()
        {
            $collection = [];
            if ($this->_customerSession->isLoggedIn()) {
                $wishlist = $this->_wishlistCollectionFactory->create()
                    ->addCustomerIdFilter($this->_customerSession->getCustomer()->getId());

                $productIds = null;
                foreach ($wishlist as $product) {
                    $productIds[] = $product->getProductId();
                }

                $collection = $this->_productCollectionFactory->create()->addIdFilter($productIds);
                $collection = $this->_addProductAttributesAndPrices($collection)->addStoreFilter($this->getStoreId());
            }
            return $collection;
        }
    }
    ?>

app\code\vendor\path\view\frontend\wishlistitems.phtml
for testing:
<?Php
echo("hello");
?>

How to get this on my custom phtml DropdownDialog widget
app\design\frontend\Zero\my_theme\Magento_Theme\templates\location_link.phtml

        <img class="wishlist-img" src='<?php echo $this->getViewFileUrl('images/Group_5288.png'); ?>' alt="Logo">

                    <?php
                    include($block->getTemplateFile('vendor_path::wishlistitems.phtml'))
                    ?>

page error, if i add

hi
  // when i click my icon hi message working

What is the proper way to call my block into phtml file?
or
FYI - How to get this https://i.imgur.com/VvUXXjR.png into my custom phtml file DropdownDialog widget


texts:
Now my CSS Link are  https://www.vdcprojects.xyz/otabazzar/version1596944524/frontend/Sm/topmart/en_US/css/styles-m.css
Actually CSS are in :
https://www.vdcprojects.xyz/otabazzar/pub/static/frontend/Sm/topmart/en_US/css/styles-m.css
I have also have .htaccess file in pub/static folder and also give pemission 777 to all folder and file.
But css is not loading how to solve that.


texts: Magento generating aprox 20 session files per minute

texts:
I have a problem with a Magento installation. This installation is not live and as such has no traffic etc. I watched in cpanel's file manager and it appears to be generating 15-25 files per minute in the var/sessions directory. I am in the process of searching to see what potential causes there could be but so far I haven't found anything. Does anybody know what I might check?

The reason I discovered this issue ( presumably connected) is that when I browse on the front end I am logged out of the back end.


texts: Magento2 - Add multiple shipping methods to cities within a specific country?

texts:
In Magento2, I see that it lacks flexibility in shipping options so much, because in a different country from America, I don't know specifically which method of shipping Opencart has great flexibility in adding countries and cities and pricing them with shipping at the asking price.

Here in my country 28 provinces or cities for each city at a different freight rate than the other, I am tired of research and many experiences without any benefit, I would like to add multiple shipping methods for each city on the payment page please?

I want a solution, thank you all


texts: Add custom field to IWD One page Checkout Extension

texts:
I am currently using magento 1.9
I am using IWD's one page checkout extension version 4.0.5(latest). I want to add a custom drop down field to the IWD's checkout page e.g. Where did you here about us ?
Customer must select one of the answers. The answer then should be saved to quote and order table. And also must be visible in the order info from the admin panel (sales->orders). I have managed to achieve the similar on magento's default checkout and it is working perfect for me. But now I want to add the similar field to IWD's checkout.

My default magento checkout :

My order :

I want to achieve same for the extension's checkout page.

More than 10,000+ stores are using that extension. Someone must have been able to sort it out. Looking for good support. Thanks
I am a beginner at magento though.


texts:
Currently I understand the system of templates as follows:

[depends layouts]    (page_layout)
↓
layout               (page_layout)
↓
magento default.xml  (page_configuration)
↓
my theme default.xml (page_configuration)
↓
module file super-module-file.xml (page_configuration)
↓ = merge.

I have a 2 layout: narrow_page and wide_page. I want to change block "header-wrapper" depending of the layout. But currently default.xml (in magento/theme) overrides this block. I can not use my default.xml because next time this file apply for both layouts.

How I can solve this problem?


texts:
Need to print all xml layout on frontend(index.php), because we want to check our custom xml handles were added or not.

Any one know technique to print.


texts: Magento 2 is not loading the fontawesome cdn library

texts:
I'm trying to load a css library on a magento 2 from cdn:

<css src="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" type="text/css" src_type="url"/>

and to do this I insert this link into:

/app/design/frontend/theme/themename/Magento_Theme/layout/default_head_blocks.xml

and after deployed, cleared the cache and everything, but still not loading it..


texts: M2 - How to setup schema property for Home page?

texts: I am created custom theme inherit from blank theme, How to setup schema property for home page? How to Mapping notes for organization name, url(homepage url), logo?


texts: Display all colors of configurable products in product listing as separate products

texts:
Imagine that I have a configurable product with the following options:

color: blue, green, orange, pink
size: 1kg, 2kg, 3kg, 4kg

and that I have simple products having some of these attribute combinations (for example Blue/1kg, Green/1kg, etc).

By default, Magento would display it as a single (configurable product) on a category page, and customers can select desired options (color/size) from PDP.

What I am trying to achieve is to display all available colors on category listing as a separate product (in this case 4 products should be displayed as I have 4 different colors in stock). The products should be displayed with an appropriate color image (this is pulled from a simple product). Upon clicking on any of them, the same parent product would be displayed on PDP.

What I tried so far:

Approach #1:

We know that on the category page, Magento executes something like this (for simplicity reasons, I excluded category/price/stock joins):

select *
from catalog_product_flat_1 main_table
where main_table.visibility IN (2,4);

If we want to add color variations, we need to do modify product collection to be like:

select main_table.sku, child_table.color_value as color_variation, main_table.*
from catalog_product_flat_1 main_table
left join catalog_product_super_link cpsl on cpsl.parent_id = main_table.entity_id
left join catalog_product_flat_1 child_table on cpsl.product_id = child_table.entity_id
where main_table.visibility IN (2,4)
group by main_table.entity_id, child_table.color_value;

This gives me exactly what I wanted:

But the problem is that I can't instantiate a collection from it since it would try to add items with an ID that already exists (entity_id = 311 for example).

Approach #2:

My next approach that kind of works, but I am not sure what consequences I may have if I proceed with it.

The idea is to configure simple (children) products to be visible in catalog/search, and group them by color (note how I had to group by a unique string UUID() if color is not set since I will have products without color too):

select *
from catalog_product_flat_1 main_table
where main_table.visibility IN (2,4)
GROUP BY color, IF(color IS NULL, UUID(), color)

This works, but honestly, I don't like the solution that much.

So my question is more about the idea, how this could be done in a good, less-hacky way?

I would appreciate any ideas if someone is willing to share.


texts: Magento 2.1.9 Throwing 501 When User is Logged in And Calling /rest/default/V1/carts/mine/selected-payment-method

texts:
I'm having an issue with my 2.1.9 Magento site where a guest user can checkout with PayPal without any issue but when a logged in user attempts to they're unable to.

During the checkout process there is a call to /rest/default/V1/carts/mine/selected-payment-method after you select PayPal as the payment method you wish to use.

The data sent to the server in this call is:

{"cartId":"10","method":{"method":"paypal_express","po_number":null,"additional_data":null}}

The response is:

{"method":null}

The call also returns a 501 which leads to an exception being thrown in the JS.

The JS that powers this is:

define(
    [
        'jquery',
        'Magento_Checkout/js/model/quote',
        'Magento_Checkout/js/model/url-builder',
        'mage/storage',
        'Magento_Checkout/js/model/error-processor',
        'Magento_Customer/js/model/customer',
        'Magento_Checkout/js/model/full-screen-loader'
    ],
    function ($, quote, urlBuilder, storage, errorProcessor, customer, fullScreenLoader) {
        'use strict';

        return function (messageContainer) {
            var serviceUrl,
                payload,
                method = 'put',
                paymentData = quote.paymentMethod();

            /**
             * Checkout for guest and registered customer.
             */
            if (!customer.isLoggedIn()) {
                serviceUrl = urlBuilder.createUrl('/guest-carts/:cartId/set-payment-information', {
                    cartId: quote.getQuoteId()
                });
                payload = {
                    cartId: quote.getQuoteId(),
                    email: quote.guestEmail,
                    paymentMethod: paymentData
                };
                method = 'post';
            } else {
                serviceUrl = urlBuilder.createUrl('/carts/mine/selected-payment-method', {});
                payload = {
                    cartId: quote.getQuoteId(),
                    method: paymentData
                };
            }
            fullScreenLoader.startLoader();

            return storage[method](
                serviceUrl, JSON.stringify(payload)
            ).fail(
                function (response) {
                    errorProcessor.process(response, messageContainer);
                    fullScreenLoader.stopLoader();
                }
            );
        };
    }
);


texts:
I have a heavily modified instance of Magento 1.9 and it does not show Subtotal in the Checkout.

I have found out that in file app/code/core/Mage/Checkout/Block/Cart/Totals.php
method renderTotals() always returns empty string, while it should return html. For comparison, in clear installation of Magento 1.9 it does return html strings.

How to find out the cause of this?
Is something broken? Is there a setting in the admin section that disables this output?


texts: How to get refunded and canceled orders in one grid

texts: How can I Get Refunded Orders And Canceled Orders ( Without invoice being generated ) in one grid and apply date filter on which the refund/canceled orders will be generated ?


texts: how to get product selectable option via API?

texts: is it  possible to get product selectable option (like : size , color , ...) via API in magento store ?


texts: Disable admin menu items by configuration value Magento 2

texts:
I am trying to disable admin menu when module enable set to No in configuration.

I have tried to use ifconfig="section/group/field" there but that's not working.
Here is my admin menu code.

Vendor\Module\etc\adminhtml\menu.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
    <menu>
        <add id="Vendor_Module::sample" title="Sample" translate="title" module="Vendor_Module" sortOrder="60" parent="Vendor_Module::sample1" action="sample/sample/index/" resource="Vendor_Module::sample"/>
    </menu>
</config>


texts: Creating configurable product with two set of attributes depending on each other

texts:
What I want to do should be possible but I can't figure out how to do it.

Let's say I'm selling shirts, I have two colours of the same shirt, let's say red and blue. now in red I only have sizes S,M,X,XL but for blue we decided to have XXL as well as the sizes available for red, how can I do this? The sizes need to change base on the colour that the customer choose, and I know I can make two different products for red and blue but I want the customer to see everything in a single page.

Thanks in advance for your help


texts: Why there is no option to register for Magento 2 Certified Associate Developer Exam in webassessor account.


texts:
i am having an error on my website.
following is the image :

i've been trying to fix the error but can't find what excatly sould i do?
can anyone give me a solution?


texts: Is there a table in the database or a folder where Magento (1.9 and 2.1) stores Pdf Invoices?


texts: Add Custom Attribute to show on Checkout page

texts:
I would like to add the custom attribute i created (delivery) to show on the shipping method section of the checkout page.

I have the following code working but when more than one item is being purchased it just lists all the delivery times next to each other. like 3 days 5 days 1 week

<?php $cartItems = Mage::getSingleton('checkout/session')
          ->getQuote()
          ->getAllItems();
    foreach ($cartItems as $item) {
        $ean = Mage::getModel('catalog/product')->load($item->getProduct()->getId())->getAttributeText('delivery');
        echo $ean;
    }?>

I would then want to pull the product name so What im looking for is

Product Name:Delivery Time
or if multiple items
Product Name:Delivery Time
Product Name:Delivery Time


texts:
SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'quote' already exists, query was: CREATE TABLE quote

When we run setup upgrade after upgrade code I am getting this error what I do to fix this?


texts:
How to Fix this issue Magento 1

Fatal error: Class 'Cryozonic_Stripe_Helper_Data' not found in /home4/ghg3d1lj/public_html/app/Mage.php on line 547


texts: Exclude products with category id - productCollection

texts:
I am currently trying to run a productCollection to try and get a list of products that are not assigned to one or more categories.

$collection = Mage::getResourceModel('catalog/product_collection');
$catId = [46]; // category id to exclude
$collection->getSelect()->join(array('cats' => 'catalog_category_product'), 'cats.product_id =         e.entity_id'); // Join with category on product/entity id
$collection->getSelect()->where('cats.category_id', array('nin' => array('finset' => $catId))); // exclude category from collection

echo '<pre>';
echo $collection->getSelect(); // See sql query
print_r($collection->getData());

This is what I currently have however it doesn't exclude the fact that these products may be in a child category of the id provided.

Any help would be greatly appreciated,


texts: How to join three custom table in magento 2

texts:
I want join from Table 1 -> Table 2 has id = custom_id

Then join from Table 2 -> Table 3 has Table2.id = Table3.id

And will get table1.id if eligible

My Table

Ex : Table 1 -> Table 2

Table1.id = Table2.custom_id => choose two field

Table 2.id = Table3.id => choose one field

And get data Table 1


texts: Redirect to login page after registration in Magento 2

texts:
I am using Magento 2.1.0 and I am trying to redirect a customer to the login page after successful registration.

I make this "Redirect Customer to Account Dashboard after Logging in" set to no, after that, it redirects to the home page, but customer is also logged in.

How to stop the customer from being logged in after registration, and redirect them to the login page?


texts: How can I override magento/framework/data/structure file in magento2?

texts:
I have created custom module to override this (Magento/Framework/Data/Structure) file.

I have tried this in di.xml file:

<preference for="Magento/Framework/Data/Structure" type="Modulename\Extendfiles\Block\Structure" />
<preference for="Magento/Framework/Data/Structure" type="Modulename\Extendfiles\Data\Structure" />
<preference for="magento/framework/Data/Structure" type="Modulename\Extendfiles\Data\Structure" />

But it doesn't work, can anyone help me to override this file?


texts: I have a modal to show in every page, my modal was created in phtml file which using custom block file. i want to show this modal in every page of magento, is there a way to do this?


texts: Tier Prices with different product options

texts:
We're implementing tier prices in our webshop. We have a simple product with one customizable option 'flavor'. This dropdown has two options: strawberry and banana.

We've added tier prices for this product if you buy 3 or more the price will be € 12,50 instead of € 15,-.

Now, when a customer adds 2 strawberry and 1 banana, the tier price is not applied. It's the same product, so why are we're facing this issue? Is there a known fix or workaround for this issue?

Update:

Special Price settings:
https://www.dropbox.com/s/24c2r62j88ow2lf/Schermafbeelding%202017-11-07%20om%2012.35.40.png?dl=0

Customizable option:
https://www.dropbox.com/s/gbkf1pcnptfapzz/Schermafbeelding%202017-11-07%20om%2012.36.08.png?dl=0


texts:
I am attempting to install the sample data for 1.9 on Magento EE 1.14. I did this when 1.14 came out and I eventually got it to work, but now I can't remember what I did.

After starting the install I come up with this error

app/code/core/Enterprise/WebsiteRestriction/data/enterprise_websiterestriction_setup/data-install-1.11.0.0.php" - A page URL key for specified store already exists.

So I then dropped my database and imported an already running version of 1.9 sample data and attempted to upgrade it with magerun

$ magerun sys:setup:run
Error in file: "app/code/core/Enterprise/WebsiteRestriction/data/enterprise_websiterestriction_setup/data-install-1.11.0.0.php" - A page URL key for specified store already exists.


texts:
I have installed Magento1.9.3.2, I need to create a custom page layout like 1column,2columns,etc... I have tried something but he doesn't work properly.My frontend design displaying a white page.

My codes

app\design\frontend\MyPackage\MyTheme\layout\page.xml

    <page_home translate="label">
        Home Main
        <reference name="root">
            <action method="setTemplate"><template>pages/home.phtml</template></action>

            <action method="setIsHandle"><applied>1</applied></action>
        </reference>
    </page_home>

app\design\frontend\MyPackage\MyTheme\template\pages\home.phtml

test

Any one help.Advance thanks


texts:
I've defined _theme_extend.less and _extend.less. In _theme_extend.less I've had some success overriding values from the parent theme (in my case luma).

I have not been able to affect deeper changes though. I think if I could change something like @active__color defined in ./lib/web/css/source/lib/variables/_colors.less that would take care of a lot of variables I'd have to override individually.

I've been unable to override @active__color from my theme though. I tried creating _colors_extend.less and @import _colors_extend.less in _extend.less, however that doesn't do the trick. How can I override @active_color?


texts: How to integrate PayPal Pro Hosted with custom theme?

texts:
Using Magento CE 1.9 I cannot get PayPal Pro Hosted to work with our custom theme. We use one page checkout. It seems the required template files don't get included.

Here's what I know:

If I revert back to the default theme it works so I know the Payment Method settings are ok.
Using Debug mode of PayPal I can see (in payment_hosted_pro.log) that the call to PayPal is made correctly and the response is received correctly.
Using the javascript console I can see that the request to checkout/onepage/saveOrder/form_key/XXX/ is fired correctly and the response is as I would expect.
Using the default theme with template hints enabled I see that in step 5 of onepage checkout it includesfrontend/base/default/template/paypal/hss/js.phtml, which contains the hidden div and javascript required to make everything work.
Using my custom theme, the above template file is not included.

So, number 5 seems to be the crux of the problem, but I cannot figure out how this is included in the default theme and why it is not being included in my custom theme. Can anyone explain that?

I have looked through the various dafault layout xml files and none of those seem to reference that template file.

Digging deeper I found that app/code/core/Mage/PayPal/Block/Iframe.php file contains the code that sets that template file and renders the HTML, but I cannot figure why that is fired for the default template and not for my custom one.

Can anyone shed any light on this? Ideas and suggestions are much appreciated.

Many thanks


texts: How to change the attribute that a configurable product is configured by

texts:
We want to to migrate our clients product data from M1 to M2. The client has been using one attribute for all of their sizes on all of their products on M1.

In M2 they would like to break this attribute out in to multiple attributes so they can use a different attribute per product type e.g instead of using the "size" attribute for everything they want to use "Size" "Shoe Size" "Waist Size" etc depending on product type.

So... 1 example:
Product is set up via configurable/simple products using the attribute "Size"

How can we change this "size" attribute to use the new attribute "Shoe Size" instead of "size"?

There will only be one size attribute associated per product but the attribute will differ depending on the product.

Can we do this via an import or a DB change? There are over 10,000 products so we want to avoid doing this manually going forwards.


texts: Magento 1.9.2.4 patch 8788 && order view adminhtml malformed

texts:
Magento 1.9.2.4 patch 8788 && order view malformed

After running patch 8788 with -R (and first removing uploaderSingle.swf) succesfully we now see an empty order page.

And nothing in logs ...

Anyone run into this one?

[UPDATE] Instead of clicking order 1 I clicked order 2 .. then got this.

Fatal error: Cannot redeclare Mage_Sales_Model_Resource_Order_Payment_Transaction::_unserializeField() in /var/www/html/myserver/public_html/app/code/core/Mage/Sales/Model/Resource/Order/Payment/Transaction.php on line 86


texts: What does this di.xml file have incorrect?

texts:
I am implementing a custom payment gateway.

To be able to config it, I have created a ConfigProvider this way:

<?php
/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
namespace Desytec\Transbank\Model;

use Magento\Checkout\Model\ConfigProviderInterface;
use Magento\Framework\Escaper;
use Magento\Payment\Helper\Data as PaymentHelper;

class WebpayConfigProvider implements ConfigProviderInterface
{
    /**
     * @var string[]
     */
    protected $methodCode = Webpay::CODE;

    /**
     * @var Webpay
     */
    protected $method;

    /**
     * @var Escaper
     */
    protected $escaper;

    /**
     * @param PaymentHelper $paymentHelper
     * @param Escaper $escaper
     */
    public function __construct(
        PaymentHelper $paymentHelper,
        Escaper $escaper
    ) {
        $this->escaper = $escaper;
        $this->method = $paymentHelper->getMethodInstance($this->methodCode);
    }

    /**
     * {@inheritdoc}
     */
    public function getConfig()
    {
        return $this->method->isAvailable() ? [
            'payment' => [
                'webpay' => [
                    'image' => $this->getImage(),
                    'instructions' => $this->getInstructions(),
                ],
            ],
        ] : [];
    }

    /**
     * Get mailing address from config
     *
     * @return string
     */
    protected function getImage()
    {
        return nl2br($this->escaper->escapeHtml($this->method->getImage()));
    }

    /**
     * Get mailing address from config
     *
     * @return string
     */
    protected function getInstructions()
    {
        return nl2br($this->escaper->escapeHtml($this->method->getInstructions()));
    }
}

And this di.xml file in etc/frontend:

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Checkout\Model\CompositeConfigProvider">
        <arguments>
            <argument name="configProviders" xsi:type="array">
                <item name="transbank_webpay_config_provider" xsi:type="object">Desytec\Transbank\Model\WebpayConfigProvider</item>
            </argument>
        </arguments>
    </type>
</config>

When I upload di.xml file to server, and try to load the checkout, an error 500 occurs. If I delete it, page is shown correctly.

What do you see bad in that file?

Thanks
Jaime


texts: Magento 2 The page isn’t redirecting properly in custom module

texts:
I have created the custom module for custom login.but when i open the below link it's not redirecting properly.

  http://localhost/magento/custommodule/

below is my route file code and path:

  app\code\Vendor\Custommodule\etc\frontend\routes.xml

<?xml version="1.0"?>
 <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="standard">
        <route id="custommodule" frontName="custommodule">
            <module name="Vendor_Custommodule" />
        </route>
    </router>
</config>

layout file path:

  app\code\Vendor\Custommodule\view\frontend\layout\pressroom_index_index.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd" layout="2columns-left">
    <body>
        <referenceBlock name="page.main.title">
            <action method="setPageTitle">
                <argument translate="true" name="title" xsi:type="string">pressroom</argument>
            </action>
        </referenceBlock>
        <referenceContainer name="content">
           <container name="customer.login.container" label="Customer Login Container" htmlTag="div" htmlClass="login-container">
                <block class="Magento\Customer\Block\Form\Login" name="customer_form_login" template="form/mycusromlogin.phtml">
                    <container name="form.additional.info" as="form_additional_info"/>
                </block>
            </container>
        </referenceContainer>
    </body>
</page>

  app\code\Vendor\Custommodule\Controller\Index\Index.php

<?php

namespace Vendor\Custommodule\Controller\Index;

use Magento\Framework\App\Action\Context;
use Magento\Framework\UrlInterface;
use Magento\Framework\App\Action\Action;

class Index extends \Magento\Framework\App\Action\Action
{
    protected $_resultPageFactory;
    protected $urlInterface;

    public function __construct(Context $context,
        \Magento\Framework\View\Result\PageFactory $resultPageFactory,
         UrlInterface $urlInterface,
         \Magento\Customer\Model\Session $session)
    {
        $this->_resultPageFactory = $resultPageFactory;
        $this->urlInterface = $urlInterface;
         $this->_session = $session;
        parent::__construct($context);
    }

    public function execute()
    {
        $url = $this->urlInterface->getUrl('custommodule/index/index');

        // Create login URL
        $login_url = $this->urlInterface->getUrl('custommodule/index/index', array('referer' => base64_encode($url))
                            );
        // Redirect to login URL
        /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */

        if(!$this->_session->isLoggedIn()) {
            //echo $login_url.'<br /> here'; die;
            $resultRedirect = $this->resultRedirectFactory->create();
            $resultRedirect->setUrl($login_url);
            return $resultRedirect;
        }else{
            //echo $login_url; die;
            $resultPage = $this->_resultPageFactory->create();
            return $resultPage;
        }
    }
}


texts: Magento 2 CE maximum numbers of connection supported at same time

texts:
I have a question related to Magento 2 CE.
Because it doesn't support master/slave database do you know how many simultaneously  customers can order at the same time?
Or how many connections support .

We have few products on website and we have few customers (10 .000) but we have a lot of orders.

I don't know if i should recommend CE or EE and my consern is related to the fact that database cannot scale.

Thank You,
Ovidiu


texts: How to share Knockout JS observables between UI Components

texts:
I understand how to use imports: {} and exports: {} to share a UI components properties, such as:

defaults: {
    exports: {
        shouldShowMessage: '${$.component}'
    }
}

Which returns the component name in the exports.

But when I try to export a Knockout observable it is always undefined:

defaults: {
    exports: {
        shouldShowMessage: '${$.shouldShowMessage}'
    }
}

...

setupKoBindings: function() {
    this.shouldShowMessage = ko.observable('Testing');
}

As a workaround I am going to create a storage model as explained here but I would prefer to use the imports and exports.


texts: How to create multiple select Ajax base layerd in magento with color swatch

texts:
In my site layered navigation..when i click on nay one then its ..remove rest selectors...I want to create a multiple select ajax based layered extension.....for this which files i have to be rewrite....I need basic Idea like which file i chose for that...I know extension development....Only i want to know...the which file is responsible for this.....
By which block and models we can rewrite for this task.....


texts: Magento 2: Overiding Admin Theme not working in Production Mode with CDN [SOLVED]

texts:
Magento 2: How to enable newly created admin theme & override module?

After achieving this I have a new issue now.

I'm using CDN & in Production Mode. In the Developer mode, it works fine.

I have below configuration in Admin

Admin -> Stores -> Configuration -> Advanced -> Developer

1] JavaScript Settings
    Merge JavaScript Files -> Yes
    Enable JavaScript Bundling -> Yes
    Minify JavaScript Files -> Yes

2] CSS Settings
    Merge CSS Files -> Yes
    Minify CSS Files -> Yes

Developer Mode:

https://cdn.domain.com/pub/static/adminhtml/Alphanova/Theme/en_US/requirejs/require.js

https://cdn.domain.com/pub/static/adminhtml/Alphanova/Theme/en_US/mage/requirejs/mixins.js

Production Mode:

https://cdn.domain.com/pub/static/adminhtml/Alphanova/Theme/en_US/requirejs/require.min.js

Admin is not working due to JS not loading. Above are just a few JS files.

https://cdn.domain.com/pub/static/adminhtml/Alphanova/Theme/en_US/mage/requirejs/mixins.min.js

In Production Mode I'm not able to locate the file on above location.

magento/pub/static/adminhtml/Custom/Theme/em_US // ALL FILES SHOULD BE HERE
magento/pub/static/adminhtml/Magento/backend/en_US // ALL FILES STAYS HERE

Magento 2 - Custom admin theme not working in production mode

https://github.com/magento/magento2/issues/3754


texts: Magento 2.3 issue admin page not rendering

texts:
I tried to install Magento New Release 2.3 , installed successfully
 but here Magento Admin Login Page not rendering even Home page working fine. Some error are i am
 mentioning below please if any solution is please guide me.

Here generated folder deleted,cache,upgrade,deploy,compile everything
is done but no solution.


texts: I added a new module in the app/code directory and activated the module in app/etc/config.php, but when I try to run php bin/magento setup:upgrade I get the following error:


texts: catalog_category_product index corrupts once in a day

texts:
Once in a day, many products are not displayed in our shop anymore. This can be fixed by rebuilding catalog_category_product via command line and flushing all caches.

We found, that the Index table contains only around 4000 lines while it should be around 8000 when all products are displayed properly:

mysql> select count(*) from catalog_category_product_index;
+----------+
| count(*) |
+----------+
|     8586 |
+----------+

This is our index configuration: (Enlarge)

What can be the reason for the index getting corrupted on a regular basis?

edit:

It is not really once in a day. Happened once per day in the past week for three times, but not today.


texts: How to solve 500 internal server error in custom module in magento 2

texts:
My php version is 5.6

  PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20131226/php_curl.dll' - /usr/lib/php/20131226/php_curl.dll: cannot open shared object file: No such file or directory in Unknown on line 0

After each magento2 command i am getting above warning, and in my custom module i am getting 500 internal server error while connecting to controller. But at other system with php version 7, my  module is working fine. Is this error and warning is related to each other? What is the exactly solution of this? Please explain anybody


texts: Problem saving Magento Attribute with modified attribute option label

texts:
I have the following code where I am trying to change a 'color' attribute option label:

<?php

require_once 'app/Mage.php';

Mage::app();

$attributeId = 92; // color

/** @var $attribute \Mage_Catalog_Model_Resource_Eav_Attribute */
$attribute = Mage::getModel('catalog/resource_eav_attribute');
$attribute->load($attributeId);

// Register attribute for the easy use of the existing block
Mage::register('entity_attribute', $attribute);

// Use options tab from edit to easy get values
/** @var $block \Mage_Adminhtml_Block_Catalog_Product_Attribute_Edit_Tab_Options */
$block = Mage::app()->getLayout()
        ->getBlockSingleton('adminhtml/catalog_product_attribute_edit_tab_options');

// Get current labels, easy...

$label = $block->getLabelValues();

// Build options array

$options = array('value' => array());
foreach ($block->getOptionValues() as $optionValue) {
    $storeOption = array();
    foreach (Mage::app()->getStores() as $store) {
        $key = 'store' . $store->getId();
        $storeOption[$store->getId()] = $optionValue->$key;
    }
    $options['value'][] = $storeOption;
}

// Show output

var_dump($label);
var_dump($options);

// Update value 0 for store 2

$options['value'][0][2] = 'New value';

// Update and save data

$attribute->setFrontendLabel($label)->setOption($options)->save();

=====================================================================

When I am launching the script, I get the following Fatal Error:

Fatal error: Uncaught exception 'Mage_Core_Exception' with message 'Default option value is not defined' in C:\xampp\htdocs\mag\app\Mage.php:595 Stack trace: #0 C:\xampp\htdocs\mag\app\code\core\Mage\Eav\Model\Resource\Entity\Attribute.php(353): Mage::throwException('Default option ...') #1 C:\xampp\htdocs\mag\app\code\core\Mage\Eav\Model\Resource\Entity\Attribute.php(198): Mage_Eav_Model_Resource_Entity_Attribute->_saveOption(Object(Mage_Catalog_Model_Resource_Eav_Attribute))
#2 C:\xampp\htdocs\mag\app\code\core\Mage\Catalog\Model\Resource\Attribute.php(61): Mage_Eav_Model_Resource_Entity_Attribute->_afterSave(Object(Mage_Catalog_Model_Resource_Eav_Attribute))
#3 C:\xampp\htdocs\mag\app\code\core\Mage\Core\Model\Resource\Db\Abstract.php(463): Mage_Catalog_Model_Resource_Attribute->_afterSave(Object(Mage_Catalog_Model_Resource_Eav_Attribute))
#4 C:\xampp\htdocs\mag\app\code\core\Mage\Core\Model\Abstract.php(318): Mage_Core_Model_Resource_Db_Abstract->save(Object(Mage_Catalog_Model_Resource_Eav_Attribute))
#5 C:\xampp\htdo in C:\xampp\htdocs\mag\app\Mage.php on line 595

Does anyone know why?

Thanks a lot!

===========================================================================

Here is how the var_dump() of the $options variable looks like:

array(1) {
  ["value"]=>
  array(2) {
    [0]=>
    array(6) {
      [1]=>
      string(0) ""
      [6]=>
      string(5) "GREEN"
      [2]=>
      string(9) "New GREEN"
      [3]=>
      string(5) "GRUEN"
      [4]=>
      string(5) "VERDE"
      [5]=>
      string(5) "VERDE"
    }
    [1]=>
    array(6) {
      [1]=>
      string(0) ""
      [6]=>
      string(4) "BLUE"
      [2]=>
      string(4) "BLEU"
      [3]=>
      string(4) "BLAU"
      [4]=>
      string(3) "BLU"
      [5]=>
      string(4) "AZUL"
    }
  }
}


texts: Limit products for specific category in XML

texts:
I'm trying to limit the output of products on specific categories, i.e. I'd only like to show the first 3 products (no matter how many there actually are).

All solutions I find are to set the pager-size, but I actually need to limit the products in such a way that the layered navigation only renders for those three products.

If I try the below code (in local.xml) to set the pager-size, it does work, but whenever I try to set a limit, it doesn't. Why?

<CATEGORY_229>
  <block type="catalog/product_list">
    <action method="setLimit"><value>3</value></action>
  </block>
</CATEGORY_229>

Note: This is on a 1.6 installation


texts: Where can I find a complete list of Magento events?

texts: I know that Magento has a hook-like system called events. Does anyone have a complete list or a script which can be used to determine which events can be called?


texts: How Elastic search 6 works in magento 2.3.1

texts:
I have following questions

Does the search result page datas are rendering from Elastic search or from Magento, can you explain me briefly?
Does the product listing page datas are rendering from Elastic search or from Magento?
Can you help me which event or model file is responsible to trigger the default product ES indexing method?
Where can I override and customize the default ES index mapping?

It will be more helpful if you answer me the above questions to proceed integrating default ES functionality.


texts: Email Notification On Low stock, Out of stock , Back to stock Magento 1.9

texts:
I want to create a stock alert where user can subscribe

product_alert_stock table in the database store details when user click on subscribe link.

Currently it sends on two conditions : On stock change and Price change.

I want to send email if stock goes below a fixed quantity.

For this i created an custom attribute namely  send_mail_qty

It must send an email to the customer when a product is below a fixed quantity

i created a custom module and using event ``
in config.xml

  <events>
      <cataloginventory_stock_item_save_after> <!-- identifier of the event we want to catch -->
        <observers>
          <cataloginventory_stock_item_save_after_handler> <!-- identifier of the event handler -->
            <type>model</type> <!-- class method call type; valid are model, object and singleton -->
            <class>customalert/observer</class> <!-- observers class alias -->
            <method>stockChange</method>  <!-- observer's method to be called -->
            <args></args> <!-- additional arguments passed to observer -->
          </cataloginventory_stock_item_save_after_handler>
        </observers>
      </cataloginventory_stock_item_save_after>
    </events>

In observer.php

        public function stockChange(Varien_Event_Observer $observer)
        {

             $arg_attribute          = 'send_mail_qty';
$attribute_model        = Mage::getModel('eav/entity_attribute');
$attribute_options_model= Mage::getModel('eav/entity_attribute_source_table') ;

$attribute_code         = $attribute_model->getIdByCode('catalog_product', $arg_attribute);
$attribute              = $attribute_model->load($attribute_code);

$attribute_table        = $attribute_options_model->setAttribute($attribute);
$options                = $attribute_options_model->getAllOptions();

            Mage::log( 'start');
            Mage::log( $options );
            // Mage::log( print_r($val) );

            Mage::log( 'end');

        }

}

But it gives me

2017-10-13T06:26:42+00:00 DEBUG (7): start
2017-10-13T06:26:42+00:00 DEBUG (7): Array
(
    [0] => Array
        (
            [label] =>
            [value] =>
        )

)

2017-10-13T06:26:42+00:00 DEBUG (7): end


texts: Reindex doesn't work (but shows success message)

texts:
I have a local environment and an online environment. Reindexing works locally but not online.

In the backend I'm getting the message:

  One or more of the Indexes are not up to date: Product Attributes, Product Prices, Catalog URL Rewrites, Category Products, Catalog Search Index, Stock Status, Tag Aggregation Data. Click here to go to Index Management and rebuild required indexes.

If I try to do this on the Index Management Page like this:

Then I get a success message but as you can see Updated at is still at an older date and Status is still REINDEX REQUIRED. (also refreshed the page but no difference)

I also tried to do this through the command line like this:

And then the following:

But no difference .. What could be the problem of this?


texts: It's possible to migrate only products on Magento 1 to 2?

texts:
Our situation it's next, I have a Magento 1.9 store live and we are developing a new store in Magento 2. New store it's a new clean versión of site and we only have to migrate products, categories and attributes (we don't need orders, for example).

We only have Amasty layered navigation module installed, but if it's a problem we can restore a clean installation.

There's a tool to do this? I can't find if Magento official Data Migration Tool has this option.


texts: Is there a way to automatically select the first colour swatch on the product page?

texts:
My store is built on a collection of configurable products. Some have many size options but only one colour. I have noticed people have been selecting the size and adding to cart and not realising they have to select the colour option (because there is only one)

My question is, is there any way to automatically select an attribute on the product page, for example... automatically select the first attribute of colour as people are finding it hard to make a purchase and not noticing it is a required field.


texts: Equivalent class for Mage_Core_Helper_Abstract in magento2

texts:
Helpers in Magento2,

What is the equivalent class for the Magento 1 Mage_Core_Helper_Abstract

class Vendor_Module_Helper_Data extends Mage_Core_Helper_Abstract{
  ...
 }


texts: Error in salesOrderRepositoryV1;content type application/soap+xml;

texts:
I am using Magento EE 2.1.1 version.

While using web service salesOrderRepositoryV1 to get the order details. I'm getting error as below:

System.ServiceModel.ProtocolException was unhandled
  HResult=-2146233087
  Message=The content type application/soap+xml; charset=UTF-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: '<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:m="https%3A%2F%2Fint-en.ctv-it.net%2Fsoap%2Fen%3Fservices%3DsalesOrderRepositoryV1%26wsdl%3D1">
   <env:Body>
      <env:Fault>
         <env:Code>
            <env:Value>env:Receiver</env:Value>
         </env:Code>
         <env:Reason>
            <env:Text xml:lang="en">Invalid XML</env:Text>
         </env:Reason>
         <env:Detail><m:GenericFault><m:Trace>&lt;![CDATA[#0 /var/www/magento2-fastest/vendor/magento/module-webapi/Model/Soap/Server.php(121): Magento\Webapi\Model\Soap\Server-&gt;_checkRequest('')
#1 /var/www/magento2-fastest/var/generation/Magento/Webapi/Model/Soap/Server/Proxy.php(95): Magento\Webapi\Model\Soap\Server-&gt;handle()
#2 /var/www/magento2-fastest/vendor/magento/module-webapi/Controller/Soap.php(145): Magento\Webapi\Model\Soap\Server\Proxy-&gt;handle()
#3 /var/www/magento2-fastest/vendor/magento/framework/Interception/Interceptor.php(146): Magento\Webapi\Controller\Soap'.
  Source=mscorlib
  StackTrace:

Below is the C# code:

private void GetSalesorderId()
        {
            var salesOrderRepositoryV1GetRequest = new SalesOrderRepositoryV1GetRequest()
            {
                id = "5066613153"
            };
            var client = new salesOrderRepositoryV1PortTypeClient();
            var response = client.salesOrderRepositoryV1Get(salesOrderRepositoryV1GetRequest);

        }

Code in Web.Config

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <startup>
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
    </startup>
    <system.serviceModel>
        <bindings>
            <customBinding>
                <binding name="salesOrderRepositoryV1Binding">
                    <textMessageEncoding messageVersion="Soap12" />
                    <httpTransport />
                </binding>
            </customBinding>
        </bindings>
        <client>
            <endpoint address="http://baseurl/soap/ar?services=salesOrderRepositoryV1"
                binding="customBinding" bindingConfiguration="salesOrderRepositoryV1Binding"
                contract="ServiceReference1.salesOrderRepositoryV1PortType"
                name="salesOrderRepositoryV1Port" />
        </client>
    </system.serviceModel>
</configuration>

Please someone help in resolving this. I have tried multiple solutions from forums, but nothing is working for me.

Any help is appreciated?


texts: How to get attribute "option label/attribute text" having "attribute value" (option_id)?

texts:
Suppose I have an attribute that is a collection of option (dropdown/multiselect).

I can retrieve the attribute value for a given product:

$store_id = [something];
$productId = [something];
// this is a select/multiselect
$attribute_code = [something];

$option_id = Mage::getResourceModel('catalog/product')->getAttributeRawValue($productId, $attribute_code, $store_id );
$option_label = ???

Now, I got the attribute option_id which is a numeric value ...

... What is the best way to load the frontend attribute label for my attribute value ? (without loading the full product)

Solution thanks Marius:

// Not loading the product - just creating a simple instance
$product = Mage::getModel('catalog/product')
->setStoreId($store_id)
->setData($attribute_code,$option_id);
$option_label = $product->getAttributeText($attribute_code);


texts: Where does Magento calculate the "Average Orders" value from the dashboard?

texts: Looking at the dashboard, I see the "Average Orders" value on the left side. I want to exclude orders from that calculation. Where do I have to look to make that change?


texts: Magento 1.9 : Slow order creation from backend

texts:
One of our Magento clients has reported that creating orders from the backend (manually eg customer ordering over the phone) is intermittently very slow.

Each checkout step (whenever the spinning 'Please wait' wheel appears) can take anywhere from 5-20s to load:

To check/confirm this we have installed AOE Profiler and have set it to profile the requests made to the /index.php/admin/sales_order_create URL.

The profiler has identified that the most common source of slowness is the Mage_Core_Model_Session_Abstract_Varien::start/start event. We have seen that event take between 5-40s as shown in the screenshot below:

Saving an order can take anywhere from 10-40 seconds (10s is normal whereas anything greater than 15s is excessive). MySQL slow query logging is enabled and it has not logged any slow queries so the slowness does not appear to be due to database queries.

The system has 12,000 products and approx 10,000 orders. Most orders only have 2-3 order items.

The site is running Magento 1.9.3.8 on dedicated hardware and the system load is always low (eg < 0.5). The site gets low traffic and there is rarely more than 1 customer browsing at a time so there does not appear to be a bottleneck as far as resource allocation is concerned.

Additional information requested:

MySQL server is hosted locally on same dedicated server as web server
MySQL version is 5.1.73 (most recent version supported by CentOS 6.10)
RAM is 64GB (~40GB currently free)
my.cnf: https://pastebin.com/Dq2jYKDa
SHOW GLOBAL STATUS result: https://pastebin.com/Bmy7B8n5
SHOW GLOBAL VARIABLES result: https://pastebin.com/fghk0UkL
MySQLTuner output: https://pastebin.com/xqKzCSxd
Other commands: https://pastebin.com/D3TFMae9

How can we troubleshoot/fix the slow session start which is causing the slowness?


texts: Configurable swatches - keep correct image proportions

texts:
The images created for the configurable swatches are stretched to fit the square div and image proportions are ignored. Images that are rectangle shaped will end up being distorted.

This is what the image should look like (taken from the thumbs view in magento 1.8.1.0):

This is what it looks like for the actual swatch:

[Moderator edit: adding relevant comment to body]

There is a template located at catalog\product\view\type\options\configurable\swatches.phtml and the code responsible for the swatch images is as follows:

 <img src="<?php echo $_swatchUrl; ?>" alt="<?php echo $_option->label; ?>" width="<?php echo $_swatchInnerWidth ?>" height="<?php echo $_swatchInnerHeight ?>" />

Changing this will have no effect on the image proportions however.


texts: So I have a grouped product available on my site everything is working fine but when I add a grouped product in my wishlist and edit it. My changes in catalog_product_view_type_grouped are not rendering, the layout is all over the place. Can you guys explain why this is happening?


texts: Magento 2: How to call phtml file after meta description in head tag?

texts:
Magento 2, How to call phtml file which contains the of tags after meta description in head tag?
I tried used head.additionals but it is getting added after css & js are called.
I need this tags before css & js.


texts: How do I exclude a promo code to a free shipping shopping cart rule?

texts: I am trying to exclude a specific promo code from receiving free shipping. The free shipping is also a shopping cart rule.


texts: Deleted cron lock files makes the magento unresponsive

texts:
We truncated the table core_url_rewrite and deleted the files in var/locks/*. What happened next is our server keeps using high CPU usage. See the high CPU usage below:

I restarted apache and it keeps coming back.I don't have any idea what's happening right now.

EDIT

Every year we cleaned up data by creating new website instance and we keep the old instance. Each user has a unique associated product and we have thousands of users on every year/website.

I already reindex all indexes, down the site and wait to complete the indexes. It was completed around 40 minutes because it recreates all core_url_rewrite. I was thinking that it was completed successfully, but this high CPU usage keeps coming back.


texts: Unable to delete address from Address Book , My Account (Magento 2)

texts:
I am not able to delete the additional address from the address book.

Code for script


texts: "general/region/state_required" core data returns nothing!

texts:
This is driving me crazy! The general/region/state_required data from system->configuration cannot be retrieved by Mage::getStoreConfig() function. In the database, this value is presented, and data persistence works OK as well, i.e. changing the value in the CMS will take the change the database. The following is a abstraction from system.xml of Magento default Directory module.

<general>
        <groups>
            <country>
                <fields>
                    <optional_zip_countries translate="label">
                        Postal Code is Optional for the following countries
                        <frontend_type>multiselect</frontend_type>
                        <sort_order>3</sort_order>
                        <source_model>adminhtml/system_config_source_country</source_model>
                        <show_in_default>1</show_in_default>
                        <show_in_website>0</show_in_website>
                        <show_in_store>0</show_in_store>
                        <can_be_empty>1</can_be_empty>
                    </optional_zip_countries>
                </fields>
            </country>
            <region translate="label">
                States Options
                <frontend_type>text</frontend_type>
                <sort_order>4</sort_order>
                <show_in_default>1</show_in_default>
                <show_in_website>0</show_in_website>
                <show_in_store>0</show_in_store>
                <fields>
                    <state_required translate="label">
                        State is required for
                        <frontend_type>multiselect</frontend_type>
                        <source_model>adminhtml/system_config_source_country</source_model>
                        <sort_order>1</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>0</show_in_website>
                        <show_in_store>0</show_in_store>
                    </state_required>
                    <display_all translate="label">
                        Display not required State
                        <frontend_type>select</frontend_type>
                        <source_model>adminhtml/system_config_source_yesno</source_model>
                        <sort_order>8</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>0</show_in_website>
                        <show_in_store>0</show_in_store>
                    </display_all>
                </fields>
            </region>
        </groups>
    </general>

In fact, general/region/display_all returns null as well while it has a non-empty value. This is really weird, I have no idea about it now, can anyone please help?!

--Update--

Is it possible that this value is being overridden somewhere? Like some code hardcode this value to be null, it overrides the value in the db.

I tried a couple of methods suggested below, unfortunately they don't solve the problem here. Any more input from people?


texts: Magento2 How To Read Data From Excel File

texts:
I want to read data from excel file (Not from .csv file but from excel file) .

Does anyone know how can i get data from excel file ?


texts: How to connect Magento admin to Venia theme PWA storefront?

texts:
I setup vue storefront venia theme and working fine. Now I am trying to connect magento admin to venia storefront but not working.
Note: Venia theme working fine and I want to connect Magento admin.
Please guide me if anyone setup this before and have proper solution for it.


texts: my-collection.php is not called when add column to customer list grid

texts:
i want to add custom column to customer listing grid. i could add header to grid but there is no data related my custom table. the reason why this occurs is because my Collection.php is not called when customer page loaded. how can i fix it? also does this has relation to customer_eav_attribute?
```app/code/MyCompany/MyModule/

├── Model
│   └── ResourceModel
│       └── Customer
│           └── Grid
│               └── Collection.php
├── etc
│   ├── Adminhtml
│   │   └── di.xml
│   ├── db_schema.xml
│   └── module.xml
├── registration.php
└── view
    └── adminhtml
        └── ui_component
            └── customer_listing.xml

my collection is

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

namespace MyCompany\MyModule\Model\ResourceModel\Customer\Grid;

use Magento\Customer\Ui\Component\DataProvider\Document;
use Magento\Framework\Data\Collection\Db\FetchStrategyInterface as FetchStrategy;
use Magento\Framework\Data\Collection\EntityFactoryInterface as EntityFactory;
use Magento\Framework\Event\ManagerInterface as EventManager;
use Psr\Log\LoggerInterface as Logger;

class Collection extends \Magento\Customer\Model\ResourceModel\Grid\Collection
{
    /**
     * @inheritdoc
     */
    protected $document = Document::class;

    /**
     * Initialize dependencies.
     *
     * @param EntityFactory $entityFactory
     * @param Logger $logger
     * @param FetchStrategy $fetchStrategy
     * @param EventManager $eventManager
     * @param string $mainTable
     * @param string $resourceModel
     */
    public function __construct(
        EntityFactory $entityFactory,
        Logger $logger,
        FetchStrategy $fetchStrategy,
        EventManager $eventManager,
        $mainTable = 'customer_grid_flat',
        $resourceModel = '\Magento\Customer\Model\ResourceModel\Customer'
    ) {
        parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $mainTable, $resourceModel);
    }

    protected function _initSelect()
    {
        parent::_initSelect();

        $this->getSelect()->join(
            ['secondTable' => $this->getTable('custom_table')],
            'main_table.entity_id = secondTable.entity_id',
            ['want_to_add as custom_column']
        );
    }

    /**
     * Modify for website_id code same in location type and location list
     */
    public function addFieldToFilter($field, $condition = null)
    {
        if ($field === 'custom_column') {
            $field = 'secondTable.want_to_add';
        }

        return parent::addFieldToFilter($field, $condition);
    }
}

etc/Adminhtml/di.xml is

<type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory">
    <arguments>
        <argument name="collections" xsi:type="array">
            <item name="customer_listing_data_source" xsi:type="string">MyCompany\MyModule\Model\ResourceModel\Customer\Grid\Collection</item>
        </argument>
    </arguments>
</type>


texts: magento 2 how to get object from selected product (then get attributes)

texts:
When a product gets clicked on -> the product details page opens and shows detailed information and images of the product. I want to display (programmatically) some custom product attributes(which I created via admin panel) on this page under the 'SKU#: sku123' section.

What I have done:

1.edit  'vendor/magento/module-catalog/view/frontend/layout/catalog_product_view.xml'

<block class="Magento\Catalog\Block\Product\View\Description" name="product.info.demo" template="product/view/warranty.phtml" after="product.info.price">   <arguments>
                        <argument name="at_call" xsi:type="string">getWarranty</argument>
                        <argument name="at_code" xsi:type="string">warranty</argument>
                        <argument name="css_class" xsi:type="string">warranty </argument>
                        <argument name="at_label" xsi:type="string">warranty </argument>
                        <argument name="add_attribute" xsi:type="string">itemprop="warranty "</argument>
                    </arguments>
            </block>

2.create warranty.phtml

<?php
$_helper = $this->helper('Magento\Catalog\Helper\Output');
$_product = $block->getProduct(); // get current(selected) product object ?
$_code = $block->getAtCode();
$_className = $block->getCssClass();
$_attributeLabel = $block->getAtLabel();
$_attributeType = $block->getAtType();
$_attributeAddAttribute = $block->getAddAttribute();

if ($_attributeLabel && $_attributeLabel == 'default') {
$_attributeLabel = $_product->getResource()->getAttribute($_code)-   >getFrontendLabel();
}
$_attributeValue =$_product->getResource()->getAttribute($_code)->getFrontend()->getValue($_product);
?>
<?php if ($_attributeValue): ?>
<div class="product attibute <?php echo $_className?>">
<?php if ($_attributeLabel != 'none'): ?><?php echo     $_attributeLabel?>:<?php endif; ?>
&ensp;<?php echo "test ". $_attributeValue; ?>

<?php endif; ?>

Code in Description.php:

    /**
 * @return Product
 */
public function getProduct()
{
    if (!$this->_product) {
        $this->_product = $this->_coreRegistry->registry('product');
    }
    return $this->_product;
}

This solves my problem, I can display my custom attribute 'warranty'.

What I understand: With registry-object we can set and get global variables. Here we get the global variable ('product'). And in phtml file we get the attribute value(from 'warranty') via this product-object.

What I dont understand: Who did set this global variable('product') ? How does _coreRegistry->registry('product'); magically give us the object of the currently (by the user) selected product ?

Also: Is there another way of getting the product-object (which corresponds to the currently selected product by the user) ?

I'm a little bit confused. Thanks in advance !


texts:
I am getting the following error on stage site when I try to place order using check/money order.

The order gets placed but the user doesn't get redirected to success page.

It throws following error


texts:
I want to add extra amount to the total cart value depending on the customers pincode in magento 1.9.x.
Kindly help.


texts:
So I've read numerous reports that mage_rss can sometimes lead to slow shopping carts. I know it's handled through app>code>core>rss, but which file do I need to disable to completely disably mage_rss?

I know that I can disable it from configuration>advanced>advanced, but I know that just stops it's output on the screen and doesn't completely disable it.

Thanks.


texts: How to use 'catalog/image' helper class features and Magento cache for non product images?

texts:
I know image helper class in catalog module serves good features for image related options like aspectratio, resize, frame etc.. .

My Question is i have images like customer profile image and store image and category images. So, I have to resize these images in various places and to keep its aspectratio for better image quality.

How can i use these functionalities(catalog/image helper class methods) for various images used in magento?

EDIT

I would  like to store these resized images to cache. how can i store this image into cache like product images stored temporarily.


texts: magento2.1 Problem with shipping address on checkout page

texts:
I have a customer with 3 addresses.

In address 1 street is blank. When I am going to place order i am selecting other 2 address which has proper address but it check always 1 record and gives Error.

  Error ::

  "Street Address" is a required value. "Street Address" length must be
  equal or greater than 1 characters.

Is there any solution.


texts: Magento 1.9.10 Multistore view give 404 only 4 of 6 website

texts:
i have a strange errors i have magento not installed by me.

This Magento have 6 website with this mage run code: base, uk, de, es, fr, us

this magento is setup to lauch the index in subfolder with same code example /uk have an index lauch this command:

Mage::run('uk','store');

and this work but if i change any other language not working for example if i lunch

Mage::run('de','store');

i give a 404 not found.
in configuration have this set {{unsecure_base_url}}uk/
same in de store but not work {{unsecure_base_url}}de/

base (italian) and uk store work, why the other 4 not work? it's a bug? i can solve this upgrade 1.9.22?
the strange is this site language change work one week ago but now don't work i try to server rewind but have the same error. no sense about this i recover all past db and all past files
i try to disable rewrite, and set store url after address option but nothing, i try to setup de store as main store but not solve. i try all i know but i can't understand.

any one have an idea about? i try to search every where i can find many guide about this but nothing about this problem. I can't solve this. thanks.


texts: Step selection for migration from magento1 to magento2

texts:
How to perform magento 1 to magento 2 migration step by step. Like first I want to migrate eav attributes only, Then products and so on.. But one at a time.

So, How should I configure the etc/ce-to-ce//config.xml in the data migration tool to achieve the same. If there is a need to modify other files as well please suggest.


texts: Update Product QTY right before place order from external remote API

texts:
We want to update and check product quantity when user clicks on "Place Order" button. If product is outofstock in remote API and get 0 qty then user should not able to "Place Order" and display default error message.

Default Magento works that way and show message if we update qty through backend while customer is on "Place Order".

Please suggest.


texts: Magento2 shop with 2 store views, each view displays same category different

texts:
I have 2 store views (english and german) associated with 1 store. I want the same Category called 'Kaschmir' to be displayed differently on both store views
-> english store view 'Kashmir'
-> german store view 'Kaschmir'

Is that possible ?


texts: including external js library showing error in console in magento 2

texts: I am getting error in the console after including the external js file like this in default_head_block.xml


texts: How to programatically add a product tag to a specific product?

texts:
I would I am creating an import script. I would like to know how to programatically add a product tag via php script?

Any experience doing this?


texts: Magento 2 : how to change order status processing to complete using Rest Api

texts: Any option to update order status processing to complete in Magento 2 using Rest API.


texts: Magento 2 : Manually delete a design config from mysql

texts:
What tables would I remove rows from if I needed to manually remove design configuration rows from the content > design > configuration page in the Magento 2.2.3 admin panel

We had themes manually removed from the themes table in the database which of course is not the magento way so now I just need to get back on track and fix this so wanted to figure out how to fully remove the entries in the design configuration page.


texts: How to compare value inside array in magento 2 join query?

texts:
$this->getSelect()->join(
["address" => "sales_order_address"],
'main_table.entity_id = address.parent_id AND address.address_type = "shipping"',
array('region')
)->joinLeft(
["so" => "sales_order_tax"],
'main_table.entity_id = so.order_id',
array('sgst' => strcmp('address.region','Maharashtra') == 0 ? new \Zend_Db_Expr('SUM(amount)/2') : new \Zend_Db_Expr(0),'cgst' => strcmp('address.region','Maharashtra') == 0 ? new \Zend_Db_Expr('SUM(amount)/2') : new \Zend_Db_Expr(0),'igst' => strcmp('address.region','Maharashtra') != 0 ? new \Zend_Db_Expr('SUM(amount)') : new \Zend_Db_Expr(0),'amount' => new \Zend_Db_Expr('SUM(amount)'))
)
->group('so.order_id');

I need to compare the region in the shipping address and based on that i need to  set the sgst, cgst and igst value in the sales order grid. what is the correct syntax to compare.


texts: Pass varibles to my custom email template magento

texts:
How to pass the objects from observer to my email template.

\app\code\local\Magenshop\Recipe\Model\Status.php

private  function _sendStatusMail($currentStatus)
{
    $emailTemplate  = Mage::getModel('core/email_template');

    $emailTemplate->loadDefault('recipe_admin_approval');
    $emailTemplate->setTemplateSubject('Your order was holded');

    $salesData['email'] = Mage::getStoreConfig('trans_email/ident_general/email');
    $salesData['name'] = Mage::getStoreConfig('trans_email/ident_general/name');

    $emailTemplate->setSenderName($salesData['name']);
    $emailTemplate->setSenderEmail($salesData['email']);

    //Here i need to pass the 'title' value to my email template
    $emailTemplateVariables['title']  = $currentStatus->getTitle();
    Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
    $emailTemplate->send($previousStatus->getCustomerEmail(), $order->getStoreName(), $emailTemplateVariables);
}

public function statusChangedApproved(Varien_Event_Observer $observer)
{

    $admin = Mage::helper('adminhtml')->getCurrentUserId();

    if($admin !='')
    {
        $previousStatus=Mage::getSingleton('core/session')->getApproveStatus();
        if($previousStatus !==false)
        {
            $currentStatus=$observer->getDataObject()->getStatus();
            if($previousStatus !==$currentStatus)
            {
                //Here instead of currentStatus, i need to pass the value of a common variable which can be reused by multiple templates
                $this->_sendStatusMail($currentStatus);

            }
        }
    }
    else
    {
        //notification when the recipe is submitted for approval

    }

}

im getting Fatal error: Call to a member function getTitle() on string in Status.php


texts:
I have moved my Yotpo reviews on the product page to be shown in the tabs.
Everything works but i have to click twice on the star rating to open my review tab. I should only click once for the tab to open. Here is the code i use.
 isRenderBottomline()) : ?>
    <div class="yotpo bottomLine bottomline-position"
        data-product-id="<?= $block->getProductId() ?>"onclick="jQuery('.yotpo.bottomLine').on('click' , function(){jQuery('#tab-label-custom-1-title').trigger('click');});"
        data-url="<?= $block->getProductUrl() ?>">
    </div>

Can someone see what the problem is?


texts:
If I place an order via Admin and set a "Custom Price", when I go back to edit that order in the admin the price then reverts back to the normal price and doesn't keep the Custom Price that has been set.

I found this: http://www.fetchdesigns.com/blog/magento-custom-price-lost-on-order-edit/
But it doesn't seem to fix the problem for me, in Magento 1.9.1


texts: How to add country field in contact form in magento 1.9

texts:
We want to add a country field in the contact form in Magento 1.9
We need country option as drop down.
Also, we want to send the selected country in contact mail.

My code

<?php $_countries = Mage::getResourceModel('directory/country_collection')->loadByStore()->toOptionArray(false) ?>
<?php if (count($_countries) > 0): ?> <select name="billing[country_id]" id="billing:country_id" class="validate-select">
<option value="">Please choose a country...</option>
<?php foreach($_countries as $_country): ?>
<option value="<?php echo $_country['value'] ?>">
<?php echo $_country['label'] ?>
</option>
<?php endforeach; ?>
</select>

Any help me how to send this country field data in contact us mail?


texts: Magento 2.3.4 images:resize massive inode count

texts:
on our site, many image links seemed to be broken, when you clicked on the image it did not show or showed a broken link even in the product grids, but when you refreshed the browser after trying to click on it.. it shows fine, like it had to be woken up.  The admin page always worked and shows the image in the product.
To try to fix this we ran php -f bin/magento  catalog:images:resize
but while it is STILL running it has blown the inode count through the roof.. to well over 500,000 can counting.  This puts us WAY past our limit and we can't afford to upgrade to a better hosting option.

What is the cause of this crazy inode count?
Can I reduce it in any way and still have the images show?

******* UPDATE
The resize completed... created over 500k files in the /pub/media/catalog/product/cache directory
We refreshed the caches and all images work fine on the site.
We blew out our inode limits ... we ran these steps:

Run images:resize (took 6 hours)
Click on Flush Catalog Images (deleted /pub/media/catalog/products/cache)
Click on FlushMagento Cache
Refresh browser for front end

I am back where I started, the images have broken links on front end.. back end is fine.

If I click on a broken link and go to the product page the picture still is not there.. if I go back to this page and refresh the product image will show again, as it has created a \cache file. So basically unless there is a file in the cache folder the image will not show..
I have tried 3 computers and 3 different browsers with same effect.  The Siteground caches are all off...

I suspect that there could be an issue with the .htaccess file?  is that possible?

-Ken
-Ken


texts: Limit import/export module to specific entity for an specific user group

texts:
I want to allow an specific admin user group to import/export just products, but they can do the same for users too. What are the solutions for my problem?

The import/export default module of magento seems fine to me, I couldn't find any proper limitation for it.

Should I just create a new module or is there any module helping me?


texts: How change Magento2 config cache behavior

texts:
In my project with 100's of websites in multi-store mode, several seconds on every request are used to unserialize the config cache.
It appears that Magento builds and compiles the config-cache from all config scopes on initial load and includes all store scopes into that.
Does anyone have experience in changing the config loader in such a way that it would only compile the config for a given store (the one currently being requested) and caching that set individually.
This would permit invalidating config caches for a specific store as well drastically cut back on unserialization of configs that aren't even part of the request.


texts: Dependency Injection with dynamic constructor values

texts:
Is there a way to pass constructor arguments for dependencies when using the automatically generated factory classes?

I have an object structure that I would instantiate like this without the object manager:

new A(
  new AA(
    new AAA(
      'xyz'         <-- value determined at runtime
    )
  ),
  new AB(
    new ABA(),
    new ABB()
    [1,2,3]         <-- value determined at runtime
  ),
  new AC(
    ...
  )
);

Now I could replace this with a mix of factories and constructor injected arguments1, but I'm wondering if there is another way, something like this:

$aFactory->create(
  [
    AAA::class => ['param1' => 'xyz'],
    AB::class => ['param3' =>  [1,2,3]],
  ]
);

Alternatively it would also be useful if I could define a constructor argument to be fetched from a certain method with the type definition in di.xml.

Is there anything like this?

1) like this

$aFactory->create(
  [
    'aa' => $aaFactory->create(
      [
        'aaa' => $aaaFactor->create(
          [
            'param1' => 'xyz'
          ]
        )
      ]
    ),
    'ab' => $abFactory->create(
      [
        'param3' => [1,2,3]
      ]
    )
  ]
);

But what I'm trying to avoid is having to depend on all these factories


texts: How to add custom tab in custom module in magento 2.3.1

texts:
How to add Fields Tab custom module in magento 2.3.1 ui component.

Please check screem short


texts: set payment method to paypal in magento with magento soap api

texts:
I configured the paypal express on magento site and it works. But  When i want to place an order programmatically and set the payment method to paypal_express in php then it shows the following error.

  Uncaught SoapFault exception: [1008] PayPal gateway has rejected request. Invalid token (#10410: Invalid token)

I will successfully get the payment list and get paypal_express but unable to proceed with payment method.
I m sending the following parameters  in payment method:

$paymentMethod = array(
    "method" => paypal_express,

    "last_trans_id" => "7............",

"paypal_payer_id" => "W......B.6",

"paypal_payer_email" => "l........gh@gmail.com",

"paypal_payer_status" => "verified",

"paypal_address_status" => "Confirmed",

"paypal_correlation_id" => "4.....f...d",

"paypal_express_checkout_payer_id" => "W.....B..6",

"paypal_express_checkout_token" => ".....................",

"paypal_payment_status" => "Completed",

"paypal_protection_eligibility" => "Eligible"

);

So, Help me to place an order with paypal_express


texts: Magento 2 - How does require know where jquery is defined?

texts:
You can use jquery in phtml like this:
require([
    'jquery'
],function($) {
     $(document).ready(function() {
        /* Your logic */
     });
 });

But how does the require know where to find jquery.
I searched the whole codebase, but the path to the jquery file is nowhere defined in no requirejs-config.js file, so how does it know where the file is located?


texts: Magento 1.9.3 Load Different Layered Navigation Filter Selection

texts:
We have layered navigation items like Window Width, Window Height etc.

Upon Selecting Door Height, Magento bring the results of Window Width and also show "Window Width" instead of "Window Height" in Shop By area.

We have checked that $filterItem->getFilter()->getRequestVar() in Catalog/Model/Layer also show "Window Width" instead of "Window Height" attribute.

This is only with Window Height attribute. However all other filters are working perfectly.


texts: Magento 1 php script product in stock sent email

texts:
I would like a php script that when specific products, which I define, have a qty of higher than 0. I automatically receive an e-mail from this.

Anyone have an idea how I can easily make a script out of this? My current script looks like this, but this will always sent a email.

I would only like to sent a email when the foreach got products.

<?php

ini_set('display_errors', 'On');
error_reporting(E_ALL);
ini_set('memory_limit', '4G');

require('app/Mage.php');
Mage::app();

$productIds = array(500004,540603,529536,513045);

$products = Mage::getModel('catalog/product')->getCollection()->addAttributeToFilter('entity_id', array('in' => $productIds))->joinField('qty','cataloginventory/stock_item','qty','product_id=entity_id','{{table}}.stock_id=1','left');

$message =
        "

                        Productname
                        Qty

";
                    foreach($products as $product){
                    if ($product->getQty() > 0){
                        $message .="

                            " .$product->getSku()."
                            ".round($product->getQty())."

";
                     }
                     }
                $message .= "

        ";

$to      = 'test@test.com';
$subject = 'Subject';

$headers = 'From: test@test.com' . "\r\n" .
    'MIME-Version: 1.0' . "\r\n".
    'Content-type:text/html; charset=iso-8859-1' . "\r\n".
    'Reply-To: test@test.com' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);


texts: unable to get product attribute from product collection

texts:
i have tried so many times to get a custom attribute called 'c_color' from a product collection

here is my product collection code:

$searchstring = 'test';
$productCollection = Mage::getModel('catalog/product')
                        ->getCollection()
                        ->addAttributeToSelect('*')
                        ->addAttributeToSelect('name')
                        ->addAttributeToSelect('c_color')
                        ->addAttributeToFilter('type_id', array('configurable','simple'))
                        ->addAttributeToFilter('name', array('like' => '%'.$searchstring.'%'))
                        ->joinField('qty',
                 'cataloginventory/stock_item',
                 'qty',
                 'product_id=entity_id',
                 '{{table}}.stock_id=1',
                 'left');

foreach ($productCollection as $_product){

        echo 'Color: '.$_product->getResource()->getAttribute('c_color')->getFrontend()->getValue($_product).'
';
        echo 'Color: '.$_product->getData('c_color').'
';
        echo 'Color: '.$_product->C_color().'
';

}

$_product->getResource()->getAttribute('c_color')->getFrontend()->getValue($_product) and getData, and getC_color() are also able to get the attributes, any idea? Is the problem related to the visibility of the c_color?

update 1

  ["_data":protected] => array(35) {
    ["entity_id"] => string(6) "172358"
    ["entity_type_id"] => string(1) "4"
    ["attribute_set_id"] => string(2) "80"
    ["type_id"] => string(6) "simple"
    ["sku"] => string(14) "skuuu"
    ["has_options"] => string(1) "0"
    ["required_options"] => string(1) "0"
    ["created_at"] => string(19) "2016-08-23 06:20:54"
    ["updated_at"] => string(19) "2016-08-23 06:20:54"
    ["ordered"] => string(1) "0"
    ["viewed"] => string(1) "0"
    ["parent_id"] => string(6) "172256"
    ["c_color"] => string(4) "1478"
    ["size"] => string(3) "183"
    ["name"] => string(49) "asfsafafsafa"
    ["image"] => string(35) "abc.jpg"
    ["small_image"] => string(35) "abc.jpg"
    ["thumbnail"] => string(35) "abc.jpg"
    ["url_key"] => string(15) "yikatiyi-at0831"
    ["style"] => string(3) "904"
    ["price"] => string(8) "199.0000"
    ["cost"] => string(7) "89.7000"
    ["price_retail"] => string(8) "199.0000"
    ["brand"] => string(4) "2008"

i can getData('brand'), but i can't get getData('c_color'), any ideas?


texts: How to add a class to an admin form input?

texts:
I'm building my own add/edit form in the backend for a Magento 2 module using ui-components.
I have one simple thing to do... add a class to an input/select/textarea.
Here is my element definition:

<field name="name">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="dataType" xsi:type="string">text</item>
            <item name="label" xsi:type="string" translate="true">Name</item>
            <item name="formElement" xsi:type="string">input</item>
            <item name="source" xsi:type="string">author</item>
            <item name="sortOrder" xsi:type="number">10</item>
            <item name="dataScope" xsi:type="string">name</item>
            <item name="notice" xsi:type="string" translate="true">Enter full name here</item>
            <item name="validation" xsi:type="array">
                <item name="required-entry" xsi:type="boolean">true</item>
            </item>
        </item>
    </argument>
</field>

This is rendered as

        Name

<input class="admin__control-text" data-bind="
        event: {change: userChanges},
        value: value,
        hasFocus: focused,
        valueUpdate: valueUpdate,
        attr: {
            name: inputName,
            placeholder: placeholder,
            'aria-describedby': noticeId,
            id: uid,
            disabled: disabled
    }" name="name" aria-describedby="notice-LLKEGUU" id="LLKEGUU" type="text">

            Enter full name here

I want to add a class my-custom-css-class to the field itself or the element wrapping it (the one with the class admin__field-control) or even the wrapper of the wrapper (the one with the class admin__field _required)


texts: Product edit form savebutton is not working in magento backend

texts:
Steps to reproduce.

1.Go backend -> Catalog -> Products

2.Edit and save the product

3.While clicking the save button throws console error like below

Can anypone please guide me and solve my issue.


texts: Changing the grid setup, but what about the list view?

texts:
I want to use a modified version of the Mobile Shoppe theme for one of our magento stores. I edited the app/design/frontend/default/mobileshoppe2/template/catalog/product/list.phtml file. In this file most code for displaying products is used twice, once for the grid, once for the list view. Whether grid or list is used is based on the following code:

<?php if($this->getMode()!='grid'): ?>

We use grid view for all sites. Can I ignore the list view entirely, leave the code as it is? I can't think of a situation where it is used, but maybe it is used somewhere that I don't know of.


texts: How to get Each product's import starttime and import end time in magento2?

texts:
I want to get each product's import start time and import end time  in magento2.

How to get it?


texts: Magento2: Show subcategory as a grid with images

texts: I need to display all the sub categories under every category as a grid in relevant pages with linked images. Is there a way to do it ? I am using magento 2.2.4


texts: Magento 1.9 - Newsletter email can't sent to customer

texts:
I was using magento 1.9, newsletter email can't sent to customer. I was tried many times in my newsletter queue. I have 200+ customer in my store. I need to sent offer products & Coupon codes via newsletter.

Note: I didn't touch any core files & mail related files.


texts: 2.1.8 You have no items in your shopping cart

texts:
When I add the items into cart, I'm getting the message saying

  "You have no items in your shopping cart".

I can see the following error in my browser console:

  undefined is not an object (evaluating 'route.indexOf')

in section-config.js. I can see the below function returning empty.

  getAffectedSections: function (url) {

Not sure what exactly I'm missing. There are no references to localhost. Admin has got all the necessary Base/Secure BASE URLs.


texts: Magento Custom Product Page Price template conflict upsell products price

texts:
using below xml i'm overriding product page's default price.phtml,

<catalog_product_view translate="label">
     <reference name="catalog_product_price_template">
        <action method="addPriceBlockType"><type>simple</type><block>catalog/product_price</block><template>catalog/product/productpageprice.phtml</template></action>
     </reference>

     .......

</catalog_product_view translate="label">

It's affecting my upsell products price template. Is there any way to solve this conflict and to use default price.phml ?


texts:
I am adding new options to some existing attributes using the method below.

$option['attribute_id'] = $attribute->getId();
$option['value'][$value][0] = $value;
Mage::getModel('eav/entity_attribute')->addAttributeOption($option);

This is working fine but how can I insert a position/sort value for the option.


texts: Interceptor error in Controller magento2

texts:
Vendor\Module\etc\di.xml

<preference for="Magento\CatalogSearch\Controller\Result\Index" type="Vendor\Module\Controller\Result\Index" />

Vendor\Module\Controller\Result\Index.php

namespace Vendor\Module\Controller\Result;

class Index extends \Magento\Framework\App\Action\Action
{
   public function __construct(
    Context $context,
    Session $catalogSession,
    StoreManagerInterface $storeManager,
    Http $request,
    LayoutInterface $layout,
    ScopeConfigInterface $scopeConfig,

    \Magento\Catalog\Model\CategoryFactory $catalogCategoryFactory,
    \Magento\Framework\Registry $registry,
    \Vendor\Module\Model\Client\Connector $tglssearchClientConnector
) {
    $this->catalogSession = $catalogSession;
    $this->storeManager = $storeManager;
    $this->request = $request;
    $this->layout = $layout;
    $this->scopeConfig = $scopeConfig;
    $this->catalogCategoryFactory = $catalogCategoryFactory;
    $this->registry = $registry;
    $this->tglssearchClientConnector = $tglssearchClientConnector;

    /* $this->resultPageFactory = $resultPageFactory;
     $this->layerResolver = $layerResolver;
     $this->_queryFactory = $queryFactory;
     $this->_storeManager = $storeManager; */
    parent::__construct(
        $context
    );
}
public function execute()
{
   ....

   $rootCategory = $this->catalogCategoryFactory->create()
        ->load($rootCategoryId)
        ->setName($this->__('Sale'))   //ERROR HERE
        ->setMetaTitle($this->__('Sale'))
        ->setMetaDescription($this->__('Sale'))
        ->setMetaKeywords($this->__('Sale'));
     ....

In the line ->setName($this->__('Sale'))

Why do i get Interceptor error...What does this mean?

Fatal error: Call to undefined method Vendor\Module\Controller\Result\Index\Interceptor::__() in C:\xampp\htdocs\magento2x_3\app\code\Vendor\Module\Controller\Result\Index.php on line 143


texts: How to lowercase the words in the front end products page?

texts:
so I have made the products in the admin page of magento 2 like below picture.

but on the frontend it look like this

so my question is how to make Mm lowercase into mm in the products page on the frontend. any idea?