texts: Helper class to check all URLs for query string

texts:
I have a custom module which involves the user submitting a form to an external URL then being redirected to the page on my site from which they submitted the form, with the idea that they are shown the success feedback message and can continue from where they left off. Given that the URL the user can be redirected to is any URL on the site, I think I need to add some form of helper class to my module which checks all URLs for the relevant query string, then adds the success message into the page template.

I'm fairly new to magento so how I actually do this via a helper class in my module, I'm not entirely sure - and also then how the helper should interact the template to show the success message. Grateful if anyone could point me in the right direction? Old school way to do it would be just to check for the query string in the main template used by all pages on the site, but I realise that would be bad practice!


texts: How to log Magento2 interceptors (plugins)

texts:
I want to get a list of interceptors and the order that they are dispatched. I also need to get the module name of each interceptor. I'm thinking of logging straight from the Magento\Framework\Interception\Interceptor.php class, however this doesn't seem like the best way. Is there another, better approach to do this?

Thanks.


texts: Get email and dob for guest checkout in magento2

texts:
I'm creating an extension which limits the Paymentmethodes in the checkout.
For this I have craeted the PlugIn MethodListPlugIn with the Methode afterGetAvailableMethods.

When I try to catch the dob or email in an guest checkout, (with getQuote() (examp. getQuote()->getDob()) of \Magento\Checkout\Model\Session) I just get null.

So my question is: How can I fetch the dob and email of an guest in the checkout?


texts: Magento2: How to display out of stock product in wishlist

texts:
How to display out of stock products only in the wishlist.

How to do that.

Thanks.


texts: Adding Product Programmatically to Cart Issue

texts:
I am on the product page. I have a bundle product and when I press the add to cart button I want to add a simple product programmatically to cart.
I'm using this event: checkout_cart_product_add_after for my observer.

This is my code:

    public function cartProductUpdateAfter($observer)
    {
        $this->cartProductAddAfter($observer);
    }
    public function cartProductAddAfter($observer)
    {
        $productToAdd = Mage::getModel('catalog/product');
        $productToAdd->load(1745);

        $this->_addProductToCart($productToAdd, 1);
    }
    protected function _addProductToCart($product, $qty)
    {
        $cart = Mage::getSingleton('checkout/cart');
        if ($product->getId()) {
            // infinite loop probably
            $cart->addProduct($product, $qty);
            return true;
        }
        return false;
    }

I'm getting a maxium execution time exceeded error message, problably because it calls itself. Can you give me some ideas how to fix that ?


texts: Magento 2.2.5 New Products and Blocks crashing

texts:
I am currently in the process of testing Magento 2.2.5 and am planning to move off PrestaShop to Magento but a few issues are preventing me to move:

When I add a new product our "New Product" block comes up with "We're sorry, an error has occurred while generating this content."
When I search for the product it doesn't show up, on the layered navigation it says the category and then the amount of products, by clicking this nothing still comes up.
and now my Admin Panel doesn't open the side menu.

Clicking on a category causes a 503 error the permissions have been set as: 0777, 0755, 0660.

Our Theme was created by Blue Sky Tech Co/Rokan Themes (on Theme Forest)

Modules:

Webkul POS
Accordion FAQ
Webkul Preorder

Things done:

Re-Compiled
Moved to Developer Mode & Back
Cleared Cache
Rebuilt Index


texts: Magento2 - How to created cart with product and quantity and billing address and after that assign to any customer?

texts:
Magento2 - I want to create cart from frontside or backend by specify product and its quantity and adding shipping and billing address to cart.
And after I create specific link for customer and send that link to customer so when that customer open that link then that cart assign to that customer, so that customer only have to do payment only.


texts: Helper's scope (when getting via Mage::helper())

texts:
I'm trying to understand couple of things about helper classes scope and lifetime. I think I got it but it's critical for me to be sure.

So can you please tell me if I'm right about the following assumptions about helper's scope?

a helper is a singleton by default (eg when calling Mage::helper() it's the same as calling getSingleton()).
a singleton only live in the scope of the http request, eg next http request will no longer have those singletons. same rule applies to helpers.
it's possible to use session storage for a helper, which will make the helper instance live through the entire user session, but by default it's not session based.
calling the same helper from different modules (while handling the same request) will return the same instance. eg a helper singleton instance can be used to transfer data between modules? (I'm not asking if it's the right way, just if its possible :))
calling the same helper from different events that are triggered from the same http request will return the same helper instance.
calling helper from cron job callback will always instantiate a new instance (because cron job is equivalent to an http request scope?)

So am I correct about the points above? Can someone confirm it? I did some testing and found some info here and there, but I want to make sure it's the expected defined behavior, and not just random behavior that might change between versions and systems.


texts: How can I design separate invoice email template for buyer and seller and email gets send them accordingly?

texts: Currently, when customer place the order, buyer and site admin gets the same order/invoice email design. I want different design of email template for customer and admin. I am not sure whether we can do that in Magento or not. Can anyone help me out how can I do that? Thanks in advance.


texts: Is this possible to link a image to magento 2.2 filter result page, the page is such as you filter price amount (100$ - 500$), I just want to link a image to this filter result page, is this possible?


texts: Magento pagination not working (1.7.0.2)

texts:
I made an online-shop for a friend of mine. It works very well and everything is fine and so on.

But some days ago the Pagination stopped working. It worked fine for some months. Since then I haven´t changed something in the Code or elsewhere.

Google Chrome is showing me some errors on the online shop. Maybe they help you :)

Errors:

Uncaught TypeError: undefined is not a function www.historia-outlet.de/anhanger.html:885

Uncaught TypeError: undefined is not a function www.historia-outlet.de/skin/frontend/default/theme152k/js/scripts.js:135

Uncaught TypeError: undefined is not a function www.historia-outlet.de/skin/frontend/default/theme152k/js/vpager.js:73

Uncaught TypeError: undefined is not a function www.historia-outlet.de/skin/frontend/default/theme152k/js/scripts.js:135

I´m not a Magento Expert but I have a litte experience.

Thanks for your help :)

PS: This is the shop I was talking about: [Online Shop][1]

[1]: http://www.historia-outlet.de/anhanger.html#%21___SID=U&p=3enter preformatted text here


texts: How to override particular function of javascript in Magento2

texts: I need to override the particular function (for example : accountFieldsBind) of vendor/magento/module-sales/view/adminhtml/web/order/create/scripts.js


texts: How to deal with Magento Malware attack?

texts: Has Magento shared any update regarding how you should to deal with the malware attack?


texts:
I'm trying to get in the home page 12 bestseller products with this code:

$_productCollection = Mage::getResourceModel('reports/product_collection')
                                                    ->addAttributeToSelect('*')
                                                    ->addOrderedQty()
                                                    ->setStoreId($storeId)
                                                    ->addStoreFilter($storeId)
                                                    ->setOrder('ordered_qty', 'desc');

The problem is that with this code I have the bestsellers of all stores.

The parameter ->setStoreId() and ->addStoreFilter don't work.

Any idea?

EDIT

With the code of Rakesh Donga get the next list:

These products have the status "disabled" in backend.

In the backend go to Reports -> Products -> Products ordered and get this products:


texts:
when I make a request for a link to reset an admin password, the URL is sent to the email without params, like this:

    https://url_magento/index.php/customer/account/resetpassword/

So, without params, obviously the users can't reset their passwords.

The function sending the email is this:

public function forgotpasswordAction()
{
    $email = (string) $this->getRequest()->getParam('email');
    $params = $this->getRequest()->getParams();

    if (!empty($email) && !empty($params)) {
        // Validate received data to be an email address
        if (Zend_Validate::is($email, 'EmailAddress')) {
            $collection = Mage::getResourceModel('admin/user_collection');
            /** @var $collection Mage_Admin_Model_Resource_User_Collection */
            $collection->addFieldToFilter('email', $email);
            $collection->load(false);

            if ($collection->getSize() > 0) {
                foreach ($collection as $item) {
                    $user = Mage::getModel('admin/user')->load($item->getId());
                    if ($user->getId()) {
                        $newResetPasswordLinkToken = Mage::helper('admin')->generateResetPasswordLinkToken();
                        $user->changeResetPasswordLinkToken($newResetPasswordLinkToken);
                        $user->save();
                        $user->sendPasswordResetConfirmationEmail();
                    }
                    break;
                }
            }
            $this->_getSession()
                ->addSuccess(Mage::helper('adminhtml')->__('If there is an account associated with %s you will receive an email with a link to reset your password.', Mage::helper('adminhtml')->escapeHtml($email)));
            $this->_redirect('*/*/login');
            return;
        } else {
            $this->_getSession()->addError($this->__('Invalid email address.'));
        }
    } elseif (!empty($params)) {
        $this->_getSession()->addError(Mage::helper('adminhtml')->__('The email address is empty.'));
    }
    $this->loadLayout();
    $this->renderLayout();
}

Is the same of the core on:

app/code/core/Mage/Adminhtml/controllers/IndexController.php

This only happens with de administrator users, the customers from the stores are working fine.

The Magento version is: 1.9.1.0

The url code on the email template is:

{{store url="customer/account/resetpassword/" _query_id=$customer.id _query_token=$customer.rp_token}}

Any ideas?

Thanks a lot.


texts: How to create product attribute and assign it to specific attribute set and attribute set group? Magento 2.3

texts:
I have an attribute set with name Gold and attribute set group with name Ring, i want to add a boolean product attribute with name biodynamic like this:

namespace Vendor\Module\Setup\Patch\Data;

use Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface;
use Magento\Eav\Setup\EavSetup;
use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Framework\Setup\Patch\DataPatchInterface;
use Magento\Framework\Setup\Patch\PatchRevertableInterface;

class AddBiodynamicProductAttribute implements DataPatchInterface, PatchRevertableInterface
{

    /**
     * @var ModuleDataSetupInterface
     */
    private $moduleDataSetup;
    /**
     * @var EavSetupFactory
     */
    private $eavSetupFactory;

    /**
     * Constructor
     *
     * @param ModuleDataSetupInterface $moduleDataSetup
     * @param EavSetupFactory $eavSetupFactory
     */
    public function __construct(
        ModuleDataSetupInterface $moduleDataSetup,
        EavSetupFactory $eavSetupFactory
    ) {
        $this->moduleDataSetup = $moduleDataSetup;
        $this->eavSetupFactory = $eavSetupFactory;
    }

    /**
     * {@inheritdoc}
     */
    public function apply()
    {
        $this->moduleDataSetup->getConnection()->startSetup();
        /** @var EavSetup $eavSetup */
        $eavSetup = $this->eavSetupFactory->create(['setup' => $this->moduleDataSetup]);
        $eavSetup->addAttribute(
            \Magento\Catalog\Model\Product::ENTITY,
            'biodynamic',
            [
                'type' => 'int',
                'label' => 'Biodynamic',
                'input' => 'boolean',
                'source' => '',
                'frontend' => '',
                'required' => false,
                'backend' => '',
                'sort_order' => '9996',
                'global' => ScopedAttributeInterface::SCOPE_GLOBAL,
                'default' => null,
                'visible' => true,
                'user_defined' => true,
                'searchable' => false,
                'filterable' => false,
                'comparable' => false,
                'visible_on_front' => false,
                'unique' => false,
                'apply_to' => 'simple',
                'attribute_set' => 'Gold',
                'group' => 'Ring',
                'used_in_product_listing' => true,
                'is_used_in_grid' => true,
                'is_visible_in_grid' => false,
                'is_filterable_in_grid' => false,
                'option' => array('values' => array(""))
            ]
        );

        $this->moduleDataSetup->getConnection()->endSetup();
    }

    public function revert()
    {
        $this->moduleDataSetup->getConnection()->startSetup();
        /** @var EavSetup $eavSetup */
        $eavSetup = $this->eavSetupFactory->create(['setup' => $this->moduleDataSetup]);
        $eavSetup->removeAttribute(\Magento\Catalog\Model\Product::ENTITY, 'biodynamic');

        $this->moduleDataSetup->getConnection()->endSetup();
    }

    /**
     * {@inheritdoc}
     */
    public function getAliases()
    {
        return [];
    }

    /**
     * {@inheritdoc}
     */
    public static function getDependencies()
    {
        return [

        ];
    }
}

but the above code will not put the product attribute to the Gold attribute set


texts:
On my webshop I don't want the customers to use the customer dashboard.
I'm looking for a simple way(for a non-developer) to redirect to a custom CMS page.

Therefore when the customers signs in I want to transfer them to a page named employee-logged-in.html.
Is there any easy way to do that?


texts: Mangeto2 create custom product attributes in different languages

texts: What is the right approach to create a custom required attribute to a product like "Volume" in English and  "Volym" in Swedish. The attribute has to be required and the product will be used not only in different Store Views, but also in Different Web Stores ?


texts: how to show recently viewed product after main content

texts:
i am want to show recently viewed product on all pages after main content.

i have added new widget from Widgets option its working fine but its showing before main content on all pages:

But i am want to show it after main content.

Admin setting screenshot

Please help


texts: Different redirection for two login forms

texts: I have same login form of magento in two different phtml pages(one is default login page and other is my custom phtml page but the login code is same since i copied from default login page). Now what I want is when user is logging with default login page redirection is to dashboard(which is by default) and when user is logging with my custom login form page, I want him to redirected to other page other than the dashboard.Is it possible?If yes then please elaborate how?


texts: How do you configure a dynamic block for a customer segment in M2C?

texts:
Using Magento Commerce (nee EE) 2.3.1, how do you configure a Dynamic Block to render for a specific customer segment?

The stock Magento documentation:

https://docs.magento.com/m2/ee/user_guide/cms/dynamic-blocks.html

does not give you much to work with if it's not working.

I have a Customer Segment set up for any customer that has placed an order (which has 1 customer record - using the sample data). I have a Cart Rule for 20% off, I want to show a Dynamic Block to that customer segment to promote the Cart Rule.

I have the Dynamic Block set up, and dropped into a CMS page:

but when I log in as the customer in the customer segment, no promo Dynamic Block appears on the CMS page.

Customer segment, showing the 1 customer in the segment I'm logging in as:

I've reindexed and cleared the cache.


texts: In my current project in about us page I need to add tabs to switch between different section I know this can be done by Jquery tabs but I don't know how to do this when integrating with magento.


texts: Magento: Fatal error: Class 'Mage_Categorygroup_Helper_Data' not found in /app/Mage.php on line 547

texts:
im new in magento. i got this error in Magento backend right after reindexing and clearing the cache:

Fatal error: Class 'Mage_Categorygroup_Helper_Data' not found in /app/Mage.php on line 547

my backend is not working. what should i do?


texts: Where can I change the texts in the customer account?

texts:
I'm trying to update the label for Account Dashboard on the image above. I found the template located at app/design/frontend\rwd\default\template\customer/account/navigation.phtml.

How do i edit the label?


texts: Magento which model is correct for getting the quote in the cart?

texts:
I have tried every different combo of model that returns a quote in order to try and find the one that has the quote for the current customer's cart.

So far none of them work, and I can't figure out why this might be.

Essentially I'm running an external script in the misc directory that sets a generated coupon code on the current cart, but none of the following set the code correctly and I have to default to redirecting to /checkout/cart/coupon/post or whatever the correct url is for that.

Here are the different models I have tried for getting the session:

$session = Mage::getSingleton("customer/session");
$session = Mage::getSingleton('checkout/session');
$session = Mage::getSingleton('core/session');
$session = Mage::getSingleton("core/session",  array("name"=>"frontend"));

And these are the different method's I've tried to run on the quote:

$quote->getShippingAddress()->setCollectShippingRates(true);
$quote->setCartCouponCode($coupon);
$quote->setCouponCode($coupon);
$quote->collectTotals();
$quote->save();

They don't fail but they also do not set the code correctly.


texts: Magento 2 how to filter product collection on category page with custom filters

texts:
I have one category in system... For example EMT. There are many products assigned to it. Now I want to filter some products for particular customers for that category. I mean only specific products should be display in that category for some customers. It should display all the products to guest users.

How can I do that so all the collection should filter with proper layered navigation and toolbar collection.

Can anyone suggest the way to do this with files I need to override?


texts: Magento 2.2.5: Overriding Admin Controller sales/order

texts:
I need to override Admin sales/order/index controller, but still getting 404. Below the Steps I take to override -

Created My Custom Module
app/code/A2bizz/Order/registration.php

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

app/code/A2bizz/Order/etc/module.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="A2bizz_Order" setup_version="2.0.0" schema_version="2.0.0">
        <sequence>
            <module name="Magento_Sales"/>
            <module name="Magento_Rule"/>
            <module name="Magento_Catalog"/>
            <module name="Magento_Customer"/>
            <module name="Magento_Payment"/>
            <module name="Magento_SalesSequence"/>
        </sequence>
    </module>
</config>

app/code/A2bizz/Order/Controller/Adminhtml/Order/Index.php

<?php

    namespace A2bizz\Order\Controller\Adminhtml\Order;

    class Index extends \Magento\Sales\Controller\Adminhtml\Order\Index
    {
        public function execute()
        {
            $this->messageManager->addSuccess('Message from new admin controller.');
            // Do your stuff here
            return parent::execute();
        }
    }

app/code/A2bizz/Order/etc/adminhtml/di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\Sales\Controller\Adminhtml\Order\Index"
                type="A2bizz\Order\Controller\Adminhtml\Order\Index" />
</config>

if anyone can help me on what I am doing wrong.
Thanks


texts: Does Magento merge all .xml file in the `etc` folder of a module?

texts: I am wondering if It is possible for me to move XML content from di.xml to config.xml.


texts: Indexer always getting stuck processing when using the admin GUI

texts: When completing a reindex via the admin GUI it always gets stuck and never completes. If I reindex via the command line it completes rather 3 minutes. Could anyone advise the best way to make the GUI work without getting stuck


texts: Is this coupon possible? Get fixed amount off for each 5 items from a specific category

texts:
I want my customer to have a coupon code where they get $4 off for every 5 items they buy from a certain category. For example:

0-4 items from cat A   = no discount

5-9 items from cat A   = -$4

10-14 items from cat A = -$8

15-19 items from cat A = -$12

etc..

I've been trying all different condition and action rules for over an hour now and can't get this logic right, which I thought should be pretty straight forward.


texts: Could anyone tell me the effective way to migrate from osCommerce to Magento?

texts: I opened e-commerce store that used osCommerce and now I want to migrate it to Magento with 30000 entities.


texts:
In Magento2 module-customer webapi.xml file, the API GET "/V1/customers/me" has codes below:

<route url="/V1/customers/me" method="GET">
    <service class="Magento\Customer\Api\CustomerRepositoryInterface" method="getById"/>
    <resources>
        <resource ref="self"/>
    </resources>
    <data>
        <parameter name="customerId" force="true">%customer_id%</parameter>
    </data>
</route>

My question is what is the function of the <parameter name="customerId" force="true">%customer_id%</parameter> and how it work?

I tested and found it could pass the customerId to the API method, I need more details about it, so I could use it with confidence in my API, thanks for any explanation :)


texts:
It always Return 0 only I can't understand

<?php $emi = Mage::helper('core')->currency($this->helper('tax')->getPrice($_product, $_product->getFinalPrice()),true,false);// 5000?>
<?php $mnth = 12;
echo $emi_value = $emi/$mnth;?>


texts: Google Adwords dynamic value is not showing the right value

texts:
I'm using Magento 2.1.4 and configured google adwords data for my magento store like this :

the google adwords code generated successfully, but the problem is the price value at checkout success always shows 39.6, even though i already set it to dynamic and my total order is always more than 1 million

i already  deleted cache, did setup:upgrade, and static content deploy after finish setting the configuration


texts: Reindexing catalog_product_flat causes Mysql error 1117 Too many colums

texts:
We are building a Magento 2 website with 60K products and 1 website, 64 stores with 64 store views.

Now we try to enable catalog_product_flat and catalog_category_flat (this works fine) for production mode. When we run:

php current/bin/magento indexer:reindex catalog_product_flat

it gives the following error:

General error: 1117 Too many columns (see below for the complete error)

We have about 2585 attributes in the total website, but for some reason we can't assign 10 attributes for store 1 and the next 20 for store 2. Instead all of the 2585 attributes are assigned to each store. Could somebody explain how this works in big Magento 2 stores with millions of products?

Server setup:

Apache version: Apache/2.4.29
PHP version: 7.1.10
MySQL version: 10.1.26-MariaDB
Magento2 version 2.2.1

Error:

SQLSTATE[HY000]: General error: 1117 Too many columns, query was:
CREATE TEMPORARY TABLE `catalog_product_entity_text_tmp_indexer` (
      `entity_id` int NULL COMMENT 'Entity_id' ,
      `type_id` text NULL COMMENT 'Type_id' ,
      `attribute_set_id` int NULL COMMENT 'Attribute_set_id' ,
      `description` longtext NULL COMMENT 'Description' ,
      `short_description` longtext NULL COMMENT 'Short_description' ,
      `meta_keyword` longtext NULL COMMENT 'Meta_keyword' ,
      .................................
      `reserve_onderdeel` longtext NULL COMMENT 'Reserve_onderdeel' ,
      `reparatieset` longtext NULL COMMENT 'Reparatieset' ,
      `overdraagbaar_vermogen` longtext NULL COMMENT 'Overdraagbaar_vermogen'
) COMMENT='catalog_product_entity_text_tmp_indexer' ENGINE=innodb charset=utf8 COLLATE=utf8_general_ci


texts: Magento 2 : Forget Passsword - Don't allow customer to set old password as new password

texts: I have to add a feature where while resetting the password by forget password, when user tries to set already set password previously. I should give error message. Can you please help me with that


texts:
I have three categories like CAT-A, CAT-B, CAT-C and I want the product collection from these by the order CAT-A products, CAT-B products, CAT-C products.

When I trying to get the product collection without any filter, I get the random products from these categories.

I'm trying to filter the product collection by category like

$collection = Mage::getModel('catalog/product')->getCollection()
->addAttributeToSort('category_id', 'ASC')

but it's not working.


texts: Event to trigger when admin Hold an order

texts:
I would like to send intimation to other third party tool if admin hold any order.

Is there any Event observer available to trigger?


texts: There is a problem on my website checkout page M2

texts:
zip code Field

  not show in check out page, Anyone knows what the problem is this,

Thanks in advance:


texts: I have a module for download file, and have a button "Download", now I  want when I click on "Download", button will disable and when finish button will enable. How can I do that?


texts: Magento 2.1.0 Paypal checkout gives server error when returning from paypal

texts:
I've configured paypal payments standard in payment methods. When I go to checkout it goes to paypal website, I click pay and tries to return to my website but it throws and error (HTTP 500). I enabled paypal debugging and captured the response and it looks ok to me. I checked cpanel errors and I do see an error every time I try to pay with paypal.

  Sat Dec 03 05:00:58.755401 2016] [access_compat:error] [pid 26474:tid
  140193401718528] [client 216.172.xxx.xxx:37462] AH01797: client denied
  by server configuration:
  /home/mywebsite/public_html/app/etc/config.php

I looked into this post
Client denied by server configuration /app/etc/config.php

I disabled the .htaccess to see if that was the issue but I'm still getting the error 500. The error didn't show in my cpanel though. I've since re-enabled .htaccess.

I've looked in the exceptions log and there isn't any useful info in there regarding my issue.

Is there any place else to check for troubleshooting this issue?

I've troubleshot a few more settings and found if I set "Skip Order Review Step" to No, It will come back from paypal ok. Then when I click the button to place order I get the 500 error.

This also happens both when trying to check out as guest and a registered user.


texts: Jquery To get substring from a long string within two specific sub strings

texts:
I have a long string as - " https://example.com/js-form-name-62682.html?ref=https%3A%2F%2Fstaging.example.com%2sample%3Fsku%3D40567&referrer=embeddedtype-and-somemortext "

I want to get the value 40567 i.e the test which comes up withing sku%3D and &_referrer with jquery.

How can I get this ?

Please provide a solution.


texts: Different Coupons for Different Products in same cart

texts:
I have 5 items in my cart, say A, B, C, D and E. and I want to apply 10 % discount of Item A and 5 % discount on item B and no discounts on the rest.
How can this be achieved?


texts:
I don't want to use any commercial module for hiding price.and i don't want hide by using templates.
is there any way to hide price from entire site using plug-ins or rewrites?


texts:
I'm trying to modify my registration form on Magento removing the firstname, lastname and the password confirmation.

At the moment I've changed the "is_required" in the "eav_attribute" table for FirstName and LastName (not sure if there is something also for the password confirmation).

I've updated the code here

  public_html/ec/app/design/frontend/typologancee/default/template/customer/form
  register.phtml

in order to remove the 3 fields from the UI

I've removed the code

['validate-cpassword', 'Please make sure your passwords match.', function(v) {
    var conf = $('confirmation') ? $('confirmation') : $$('.validate-cpassword')[0];
    var pass = false;
    if ($('password')) {
        pass = $('password');
    }
    var passwordElements = $$('.validate-password');
    for (var i = 0; i < passwordElements.size(); i++) {
        var passwordElement = passwordElements[i];
        if (passwordElement.up('form').id == conf.up('form').id) {
            pass = passwordElement;
        }
    }
    if ($$('.validate-admin-password').size()) {
        pass = $$('.validate-admin-password')[0];
    }
    return (pass.value == conf.value);
}],

from

  /public_html/ec/js/prototype/validation.js

I removed

  if (!Zend_Validate::is( trim($this->getFirstname()) , 'NotEmpty')) {
              $errors[] = Mage::helper('customer')->__('The first name cannot be empty.');
          }

    if (!Zend_Validate::is( trim($this->getLastname()) , 'NotEmpty')) {
        $errors[] = Mage::helper('customer')->__('The last name cannot be empty.');
    }

in

  /public_html/ec/app/code/core/Mage/Customer/Model/Customer.php

Now I'm still getting an error during the registration:

  Please make sure your passwords match.

Also changing

  $confirmation = $this->getPasswordConfirmation();
          if ($password != $confirmation) {
              $errors[] = Mage::helper('customer')->__('Please make sure your passwords match.');
          }

with

  $confirmation = $this->getConfirmation();
          if ($password != $confirmation) {
              $errors[] = Mage::helper('customer')->__('Please make sure your passwords match.');
          }

nothing happen.
Do you have idea on how to solve this?

Thanks!!


texts: How can i rewire the language url in mahgento2

texts:
How Can i Rewrite the Language Switcher URL in magneto 2
i used that language switcher in that the URL with

"___store=fr&___from_store=en"

so how can i rewire for all place


texts: I want to override mage/adminhtml/controller/Action.php?

texts:
I want to override in adminhtml controller action.php

I tried this

config.xml

<args>
                    <modules>
                        <Medma_MarketPlace before="Mage_Adminhtml">Medma_MarketPlace</Medma_MarketPlace>
                    </modules>
                </args>

Medma/Marketplace/controllers/adminhtml/action.php

My code is

require_once "Mage/Adminhtml/controller/Action.php";

class Medma_MarketPlace_Adminhtml_ActionController extends Mage_Adminhtml_Controller_ActionController
{
do somthing

}

but nothing happen I think i do something wrong.


texts: Simple Configurable Products Extension Bugs

texts:
I have used the SCP extension by Organic Internet for a while now and it has always served me well. However I have found today when I run the price indexer it is no longer picking up the max and min prices for the simple products.

Along with this when I go into a configurable product and look in the associated products section the products are showing as expected, however the titles for the products are missing. When I disable the SCP extension then the product titles come back again.

I am running magento 1.9.3.3 with SCP 0.8.2, any help would be much appreciated.


texts: Magento2: How to get custom_name on product page

texts:
Currently our product page display product title from attribute: name
https://prnt.sc/t8p3so
I want change and display above title: Brand name from attribute: newbrand_name and under brand Name I want display title (product name) from custom attribute custom_name
Here I see similar question:
Magento 2 - Override title.phtml with custom attribute value
Can any one help customization code?


texts: Magento 2 add block with js then call it from cms

texts:
I have simple code

count

and try to show this counter in front-end . I create count.phtml in app/design/frontend/vendorname/module/Magento_Theme/templates/html

Test

then edit layout file default_head_blocks.xml and add

after that I call this block from CMS:

{{block class="Magento\Framework\View\Element\Template" name="count_file" template="Magento_Theme::html/count.phtml"}}

script not run, I understand i cant run script from .phtml file directly so what i should do ? thanks


texts: Address Book - "Add New Address" button issue for Magento 2.2.2

texts:
I have issue in Address Book when "Add New Address"
Steps to reproduce:

Go to "My Account" page
Navigate to "Address Book"
Click "Add New Address" button

Expected result

On "Add New Address" button click should prompt a new form to create an additional address

also I have discovered that the "Delete Address" button that shows after you have successfully added an additional address to your address book has an href="#" and therefore doesn't do anything.


texts:
When updating products attributes to visible on Main Page, server doesn't save the settings.

That might be the problem that the products do not show on homepage.

I added this to the homepage:

{{block type="catalog/product_list" name="home.catalog.product.list"
    alias="products_homepage" template="catalog/product/list.phtml"}}

Any help?

Magento 1.9.0.1
portuguese-brazil language


texts: Getting HTTP ERROR 500 only on homepage, Magento 2.3.2

texts:
Hello, guys!

I get weird behavior Magento 2.

I get a 500 error only on the home page, and on all other pages everything works correctly.

How can this be fixed? Please, help)


texts: How do I add select options with eval()?

texts:
I have a select like:

    ' <select multiple name="nav_selected_categs[]" style="height:200px;" id="nav_selected_categs" class="required-entry select">
         '.eval('$id = $this->getRequest()->getParam(\'id\');
          if($id){
               $navCategories = array(2,7,4,8);
               foreach ($navCategories as $navCategory) {
                   ?><option value="<?php  echo $navCategory;?>"><?php  echo $navCategory;?></option>;<?php
                        }
                   }
          ').'
   </select>'

I want to add options to select, and I don't know why but I puts me result above the select multimple input.

(I should mention that the code it is in a string because represents value of after_element_html attribute).


texts: Converting query results to actual Product list

texts:
I get some CatalogSearch results, but I need to convert such results to the corresponding Product list.

How do I convert this:

$queryText = Mage::helper('catalogSearch')->getQueryText();

$collection = Mage::getResourceModel('catalogsearch/query_collection')
->setStoreId($storeId)
->setQueryFilter($queryText);

to a collection of the corresponding products? (I mean: get a corresponding product_collection from this query_collection).


texts:
i would like to gather different entities for a given time, serialize them to an array or json and send them to an external API.  Those entities consists are for example buyers, order, transactions

Is it possible to

get objects that represents those entities easily for a timerange
without doing direct database queries (probably supported by an ORM)
is the serialization of those objects into an format like json/array natively supported

does magento version from 1.6 - latest support those operations in the same way?


texts: Magento 2. Use same email templates for emails sent from admin and frontend without duplicating the templates

texts:
I have multiple custom emails that are triggered by events either from admin or from frontend.
I would like to use the same email templates without duplicating the email template files or configuration from etc/email_templates.xml.
I tried putting the emails in view/base/email it does not work.

If additional info is require please ask. Any pointers are highly appreciated.


texts: Magento 2.3 Edit Configuration product added SKU undefined

texts:
I have added Product and parent products save
When I Edit Configurable products

Select Attribute Values and add more parent products
Then next Select Skip image uploading at this time
Step 4: Summary- Product SKU is Undefined please check Screenshot


texts: Magento 1.9 - How to add multiple products to cart at a time through add to cart Rest Api

texts:
I need to forcefully add product Y to cart if product X is add to cart. Both X and Y are individual simple products. The following is what i have done to  achieve this:

try{
    $quote->assignCustomer($customer);
    $quote->addProduct($product, $request);
    $quote->collectTotals()->save();
    **if($productId==25)
    {
        $productModel = Mage::getModel('catalog/product');
        $productCombo= $productModel->setStoreId($store)->loadByAttribute('sku','8903287005350');
        $param=$this->_getParam($productCombo,null,1);
        $request1 = new Varien_Object();
        $request1->setData($param);
        $quote = Mage::getModel('sales/quote')->setStoreId($store)->loadByCustomer($customer);
        $quote->assignCustomer($customer);
        $quote->addProduct($productCombo, $request1);
        $quote->collectTotals()->save();
    }**
    $cartItems  = $this->_getCartItems($store,$quote->getData("entity_id"));
    $cart_data  = $this->getCartItemsData($store,$quote->getData("entity_id"));
    $message['status']              =   'success';
    $message['message']             =   'Product successfully added to shopping cart';
    $message["quote_id"]            =   $quote->getData("entity_id");
    $message['cart_item_count']     =   $cart_data["cart_qty"];
    $message['grand_total']         =   $cart_data["grand_total"];
    $message['items']               =   $cartItems;
}
catch(Exception $e)
{
    // $this->_critical("Product can't be added to shopping cart",Mage_Api2_Model_Server::HTTP_BAD_REQUEST);
    $this->_critical($e);
}

And i am getting the following exception:

NB: Both products X and y are in-stock, qty>10 and status=enabled

Can anyone tell me what i am doing wrong? Any help will be appreciated.


texts:
How to install a custom module in magento from admin panel itself, I don't want to copy module files and paste into local folder.

Is there any UI feature for installation a custom module ?


texts: I'm trying to install an extension with Web Setup Wizard but after clicking Extention Manager the mouse keep spinning with a Please wait statement and hang.


texts: Magento 2.1 - \Magento\Framework\Message\ManagerInterface depricated method alternatives

texts:
With the release of Magento 2.1 some of the MangerInterface methods were marked deprecated.

addError($message, $group = null);
addWarning($message, $group = null);
addNotice($message, $group = null);
addSuccess($message, $group = null);
addException(\Exception $exception, $alternativeText, $group = null);

I was wondering what alternatives for these methods should be used ?


texts: Magento2: MSP ReCaptcha For product Review

texts:
I have added MSP ReCaptcha module its working fine on login etc areas.

now I want to add this on product review page in magento2 I add this code

 <event name="review_controller_product_init">
   <observer name="msp_captcha" instance="MSP\ReCaptcha\Observer\Frontend\ContactFormObserver" />
</event>

but getting this error

Fatal error: Uncaught Error: Call to a member function setRedirect() on null in


texts: Customer login only working in private browsing

texts:
When a customer tries to login to his account, it redirects right back to the login screen. The text on top changes to way "Welcome, ", but the customer can't actually see anything in his account.
Any reason this could be happening? I've cleared and restarted all caches quite a few times, but always with the same result.


texts:
I have been asked to append the website name on the end of all page titles therefore my question is what is the best way to dynamically add "- Example.com" to the end of all titles on all pages including catalogue pages.

I could simply just edited the head.phtml and do the following

<title><?php echo $this->getTitle() ?> - Example.com</title>

But not sure if this is the best way


texts: Import product works but unused tier prices are not removed

texts:
With the import I overwrite existing products. I use the Magento dataflow/batch.
New tiers (price) are added and current tiers are overwritten.
But when an existing tier line is not used it will not remove the line.

As example I have the next tiers:
Qty Price
25 1,84
50 1,70
100 1,60

The import field looks like:
32000=50=1.65|32000=100=1.50

The result is:
Qty Price
25 1,84
50 1,65
100 1,50

But it should be:
Qty Price
50 1,65
100 1,50

Why is the 25 qty not removed during the import?
I'm using Magento 1.6 CE


texts: create category programmatically in magento2

texts:
How to create categories without using id..programmatically in magento2. Can I store these categories without using id

  ID      ParentID      Name

 100          0         Mobile

 106          100       samsung

EDIT

I want to create a category. but it is not running. it is showing page not found error. Any error in this code?

<?php

    use Magento\Framework\App\Bootstrap;
    require __DIR__ . '/app/bootstrap.php';
    $bootstrap = Bootstrap::create(BP, $_SERVER);
    $objectManager = $bootstrap->getObjectManager();
    $state = $objectManager->get('Magento\Framework\App\State');
    $state->setAreaCode('frontend');

    function readCSV($csvFile){
     $file_handle = fopen($csvFile, 'r');
     while (!feof($file_handle) ) {
      $line_of_text[] = fgetcsv($file_handle, 1024);
     }
     fclose($file_handle);
     return $line_of_text;
    }
    // Set path to CSV file
    $csvFile = 'csv/categories.csv';
    $arrResult = readCSV($csvFile);
    echo '<pre>';
    print_r($arrResult);
    echo '</pre>';

    protected function prepareData($row, $id = null)
    {

        // in case you want to user the root category id
        // $rootCat = $this->_objectManager->get('Magento\Catalog\Model\Category');
        // $cat_info = $rootCat->load($rootrowId);
        // $categoryTmp->setPath($rootCat->getPath());

           $data = [
                'data' => [
                    "parent_id" => 2,
                    'name' => $row['category_name'],
                    "is_active" => true,
                    "position" => 10,
                    "include_in_menu" => false,
                ],
                'custom_attributes' => [
                    "display_mode"=> "PRODUCTS",
                    "is_anchor"=> "1"
                ]
            ];

            if($id) {
                $data['data']['id'] = $id;
            }

            return $data;
     }

    protected function createCategory(array $data)
    {
        $category = $this->_objectManager
            ->create('Magento\Catalog\Model\Category', $data)
            ->setCustomAttributes($data['custom_attributes']);

        $repository = $this->_objectManager->get(CategoryRepositoryInterface::class);
        $result = $repository->save($category);

        echo "Created Category " . $data['data']['name'] . "\n";

        return true;
    }

foreach ($arrResult as $row) {
    $data = $this->prepareData($row);
    $this->createCategory($data);
}


texts:
We want to display the add to cart button to our up-sell block on product page.
I tried this code, but that does not work and brake down the page

<button class="button related" type="button" onclick="location.href='<?php echo $this->getAddToCartUrl($_item) ?>'"><?php echo $this->__('Add to Cart') ?></button>

We do use this same code for the related block on the page, maybe that's the problem?

What code do I need to display the add to cart button for the up-sell block?

Thanks


texts: Magento 2 - Set the page layout dynamically based on admin configuration

texts:
I want to know how to set the page layout dynamically based on an extension's admin configuration values.

I found how to change the page layout in the layout xml file, http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/xml-manage.html#layout_markup_columns, but couldn't find to do it based on admin configuration values.

In magento 1.x, I can do it.

<catalog_category_default>
    <reference name="root">
        <action method="setTemplate" ifconfig="settings/category/page_layout" condition="one_column"><template>page/1column.phtml</template></action>
        <action method="setTemplate" ifconfig="settings/category/page_layout" condition="two_column_left"><template>page/2columns-left.phtml</template></action>
        <action method="setTemplate" ifconfig="settings/category/page_layout" condition="two_column_right"><template>page/2columns-right.phtml</template></action>
        <action method="setTemplate" ifconfig="settings/category/page_layout" condition="three_column"><template>page/3columns.phtml</template></action>
    </reference>
</catalog_category_default>

But in magento 2, I couldn't do it.

Anyone know how to do this?


texts: How to send email programmatically and display success message in magento 2

texts: I am new to this magento. I want to send a email and display a success message in magento2. Anyone please give me a solution for sending a mail programmatically.


texts: How to add an option to disable delivery time slot in Magento 2

texts:
I'm pretty new to magento and to get myself on track , I decided to build an entire delivery date module by myself , my module's almost finished but whatever I do , I can't seems to build an option to disable the Time slot. A helping hand would be a lot appreciated. FYI My time period is json encoded and displays like this.

<?php

class DateOff extends AbstractFieldArray
{
protected $elementFactory;
public $_tslotList;

public function __construct(
    Context $context,
    Factory $elementFactory,
    array $data = []
) {
    $this->elementFactory = $elementFactory;

    parent::__construct($context, $data);
}

/**
 * Initialise form fields
 *
 * @return void
 */
public function _construct()
{
    $this->addColumn('date_off', [
        'label' => __('Date'),
        'size' => __('40'),]);
    $this->addColumn('tslot', [
                'label' => __('Time Slot'),
                'size' => __('40'),
                //'renderer' => $this->getTslotList(),
          ]);

    $this->_addAfter = false;

    parent::_construct();
}

public function getTslotList()
{
    $db =$this->db1('core_config_data');
    $sql = "SELECT value FROM core_config_data where config_id=60";
     //AND value LIKE '%[^0-9a-zA-Z() -._/\:=,]%'";
    $result =($db['connection']->fetchAll($sql));
    $res = json_decode($result[0]['value']);

    echo '<pre>';
    print_r($res);
    exit();
    echo '</pre>';

}

public  function db1($tbl_name){

    $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); // Instance of object manager
    $resource = $objectManager->get('Magento\Framework\App\ResourceConnection');
    $connection = $resource->getConnection();
    $tableName = $resource->getTableName($tbl_name);
    return $db = [
        'connection' => $connection,
        'tableName' => $tableName,
    ];
}

/**
 * Render array cell for prototypeJS template
 *
 * @param string $columnName
 *
 * @return mixed|string
 * @throws Exception
 */
public function renderCellTemplate($columnName)
{
    if (!empty($this->_columns[$columnName]) && in_array($columnName, ['date_off', 'tslot'])) {
        switch ($columnName) {
            case 'date_off':
                $element = $this->elementFactory->create('date');
                $element->setForm($this->getForm())
                    ->setName($this->_getCellInputElementName($columnName))
                    ->setHtmlId($this->_getCellInputElementId('<%- _id %>', $columnName))
                    ->setFormat('dd/m/yy');
                return str_replace("\n", '', $element->getElementHtml());
            case 'tslot':
                $element = $this->elementFactory->create('hidden');

                $db =$this->db1('eav_attribute');
                $sql = "SELECT attribute_code FROM eav_attribute";
                $result =($db['connection']->fetchAll($sql));
                echo "<select>";
                //echo "optionsCaption: $t('-- Please select a delivery time--')";
                for($i=1;$i<=24; $i++){
                // I PUT THIS HERE TO CHECK WHETHER I CAN MAKE A DROPDWON USING SQL
                $res[$i] = $result[$i]['attribute_code'];
                echo "<option value=$res[$i]>$res[$i]</option>";

                }
                echo "</select>";
                        $element->setForm($this->getForm())
                        ->setName($this->_getCellInputElementName($columnName))
                        ->setHtmlId($this->_getCellInputElementId('<%- _id %>', $columnName));
                return str_replace("\n", '', $element->getElementHtml());
                break;
            default:
                break;
        }
    }

    return parent::renderCellTemplate($columnName);
}

/**
 * @return string
 */
public function getAddButtonLabel()
{
    return $this->_addButtonLabel;
}

}


texts: how to migrate the CDN affected magento site

texts:
we have a magento site with affected by CDN. ex : www.abc.com

we have to migrate the magento site to one more domain. ex : xyz.com

but after moving still the site is affecting from CDN.

means the css js and images are serving from abc.com only.

please help me how we can remove the cdn from the site and how to migrate that site to new domain.


texts: How to delete attribute sets that are not being used

texts:
I would like to "prune" my attribute sets. That is - I would like to delete all attribute sets that have been setup, but that do not have any products in that attribute set.

Is there a way - some script that has been developed that will identify unused attribute sets? That is no products in the database that use those attribute sets?

Please advise.


texts:
I have been working with Magento2 for a while now (Magento 2.0.9 EE to be specific).

As some of you might already know Magento2 has a lot of bugs (irrelevant of the version you are on), and we have been getting a lot of patches from Magento Support in order to fix those issues (as we used to get in case of Magento1 bug fixes).

Now the problem here is that we have a composer install of Magento2, means no core files are been committed to the GIT repository of the project. So we have to manually apply the patches on the each of the servers (LIVE, STAGING, UAT, DEVELOPMENT etc).

I am looking for any workflow, suggestions, ideas or script that can help me automate this process to that we don't have to manually apply the patches on every server.


texts:
We have a Magento 1.7 with many images in CMS blocks, CMS pages and attributes (like description).
Unfortunately, a lot of these images don't have alt or title tags.
I want to run a script that would:

Get all Images paths that are stored in the database - search for all <img tags.
Check if they already have an alt or title tag.
If they don't, set the image name as the alt and title tag.
If they have just an alt or a title tag, use that value to populate the missing tag

Additional Info

For some unexplainable reason, some images have an empty alt tag <img src="" alt />


texts: How to get root category using store id in magento 2 block file?

texts:
How to get root category using store id.
we get store id using $storeId = $this->getStoreId();
We use below code for get root category using store id; but we get wrong.

$rootCat = $this->_storeManager->getStore($storeId)->getRootCategoryId();

Any one help us for solve this.


texts: Magento 2.1.8 Set up custom price without conversion

texts: I've two store website with a single inventory with different currencies. It doesn't want any currency conversion as I want to have a defined price for each website. I changed the scope of price to Website and updated different prices to my products. When clicked on a category in a storefront, I got the price as a base and when clicking on the product, the product page showed the right currency. For example,  assume my base currency is INR, have another store with USD. In USD website, when I click in a category, the catalog list page showing the price INR and when click a specific product, the price displayed in USD.


texts: Create Multi Websties/Stores issue on Magento 2

texts:
I Have created form backend a new Website with his own Store and Store View

I have already set for my new Store View : Base URLs -  Base URL and  Base Link URL with the new link: for example :  http://clubshop.testwswear.com/ (same value for both fields) and the same thing set for the  Base URLs (Secure)

After this I have followed this steps form this answer: Create Multi Website/Stores in magento 2 accepted one )  and after all, when I try to access my new link it redirect me on the defaul store view link.

Does anyone know what I did  wrong? or why it redirect me all the time?

Thank you in advance!


texts: add 'BackOrdered' status to product page in place of Available or Out of Stock

texts:
i have seen various code snipets to add a 'Back Ordered' status to my product page, but it's not working for me.

my file for product display is:
..../public_html/app/design/frontend/default/MYTEMPLATE/template/catalog/product/view/type/default.phtml

what can i do to the code above to get a 'Back Ordered' Status on the page in place of 'In Stock' when the inventory quantity is 0.   having them go to the checkout page to see this is a waste for customers.


texts: Get product collection for products with default name attribute

texts: How do you get a collection of products that do not have a name attribute set for a specific store?


texts: Magento 1.9.x: Pricing rule is not working for sub products of a configurable product

texts:
I have a configurable product and associated sub products. When I am applying rule for all it is working properly but if I apply rule only for specific category (which is assigned to sub product of that configurable product) the pricing rule is not working in front-end. I am clicking on "Apply Rule" button after creating rule, cleaning cache and re-indexing but not working.

Thanks in advance.


texts: Check if tax is being charged in checkout

texts:
I need a programmatic way to check if tax is being applied in the checkout. The are situations in the store I'm working on where it either will or won't. The situation being that some countries get charged tax and some don't. This may change so I'd prefer not to check the countries.

I know the following code brings back information which possibly answers the question but it just returns numbers so I'm not sure what they represent.

Mage::getStoreConfig(
      'tax/display/type',
      Mage::app()->getStore()
 );

I assume this info can be found somewhere in the quote also because when I use Mage::helper('checkout')->getQuote()->getGrandTotal() it outputs the price with or without tax correctly. I just don't see anything that tells me explicitly - yes this checkout quote has tax applied.


texts: Connection to Redis failed - Magento 1.9

texts:
I am getting this error while browsing to both front and backend of my Magento store :

Connection to Redis failed after 2 failures.Last Error : (111) Connection refused

Trace:
    public_html/lib/Credis/Client.php(439): Credis_Client->connect()
    public_html/lib/Credis/Client.php(725): Credis_Client->connect()
    public_html/lib/Credis/Client.php(599): Credis_Client->__call('select', Array)
    public_html/lib/Cm/Cache/Backend/Redis.php(135): Credis_Client->select(1)
    public_html/lib/Zend/Cache.php(153): Cm_Cache_Backend_Redis->__construct(Array)
    public_html/lib/Zend/Cache.php(94): Zend_Cache::_makeBackend('Cm_Cache_Backen...', Array, true, true)
    public_html/app/code/core/Mage/Core/Model/Cache.php(136): Zend_Cache::factory('Varien_Cache_Co...', 'Cm_Cache_Backen...', Array, Array, true, true, true)
    public_html/app/code/core/Mage/Core/Model/Config.php(1357): Mage_Core_Model_Cache->__construct(Array)
    public_html/app/Mage.php(463): Mage_Core_Model_Config->getModelInstance('core/cache', Array)
    public_html/app/code/core/Mage/Core/Model/App.php(412): Mage::getModel('core/cache', Array)
    public_html/app/code/core/Mage/Core/Model/App.php(306): Mage_Core_Model_App->_initCache(Array)
    public_html/app/code/core/Mage/Core/Model/App.php(348): Mage_Core_Model_App->baseInit(Array)
    public_html/app/Mage.php(683): Mage_Core_Model_App->run(Array)
    public_html/index.php(83): Mage::run('', 'store')
    {main}

Error log record number: 1349533104724


texts: add an option programatically when adding to cart

texts:
I've to build a shop in which the user chooses a variable number of images to be printed on a product that also has options like format, margin style, material, ...

The images come with license fees that need to be added to the total prize and with an uri that identifies the selected image.

I thought to create an instance of Mage_Catalog_Model_Product_Option on the fly and adding it via $product->addOption($option) before adding the $product to the cart. The test looks a bit like:

    $product = $this->loadProductFromDb($productId);
    $option = $this->testAddCustomOptionDynamically($productId, $product);
    $product->addOption($option);

    $cart = Mage::getSingleton('checkout/cart');
    $cart->addProduct($product, array('options' => array(4200 => 'testvalueselected'), 'selections' => array() ));
    $cart->save();

    $return = array();
    $return['redirect'] = Mage::getUrl('checkout/cart', array('_secure'=>true));
    $return['error'] = false;
    echo json_encode($return);

function testAddCustomOptionDynamically($productId, $product) {
    $product->setHasOptions(1);

    $values = array(
            array(
                    'title'     => 'My custom license',
                    'price'     => 42,
                    'price_type'    => 'fixed'
            )
    );

    $data = array(
            'option_id' => 4200,
            'type'      => Mage_Catalog_Model_Product_Option::OPTION_TYPE_AREA,
            'is_require'    => 1,
            'price'     => 0,
            'price_type'    => 'fixed',
            'product_id'    => (int)$productId,
            'title'         => 'license option',
            'values'        => $values
    );

    return Mage::getModel('catalog/product_option')->setData($data)->setProduct($product);
}

My problems/questions are:

Is this a sane approach?
I still need to test whether the added option influences the products total price.
The option is not shown in the cart but it should be.

I already saw that the some option information ends up in the table sales_flat_quote_item_option.


texts:
I have some doubts regarding product rendering.When we add a product from admin how it is displayed from frontend. What Magento does to make their product visible and distinguishable by their type like simple product,configurable.
Thanks in advance


texts: Magento 2.2.6: How to add  on product listing page without override file?

texts:
I want to add custom div on product listing page under class="product-image-container" <span> without override product list.phtml & catalog_category_view.xml file.

And i also want to display dynamic data in to my custom div from database is it possible? if yes then how can i achieve this thing. for more reference check below screen-shoot.

Any help would be Appreciated!


texts: How to add text box in configurable product page in magento 2?

texts: Just like shown in image above.Is this possible with magento dashboard functionality.


texts: Magento 2: Frontend file uploader (jquery)

texts:
I need my users to be able to upload some files from the backend, with the functionality of a preview image, abort button, multiple files uploadable, etc.

And since Magento already uses the blueimp/jQuery-File-Upload Plugin for the backend, I think it would be the best to use it for my frontend as well.

But when I try to add files I always get this error:

  TypeError: that is undefined

Triggered by the following code in magento/lib/web/jquery/fileUploader/jquery.fileupload-ui.js:

var that = $(this).data('fileupload'),

Here is my implementation:

  uploader.phtml (template file)

<form id="fileupload" action="//jquery-file-upload.appspot.com/" method="POST" enctype="multipart/form-data">

                Add files...
                <input type="file" name="files[]" multiple>

            <button type="submit" class="btn btn-primary start">
                Start upload
            </button>
            <button type="reset" class="btn btn-warning cancel">
                Cancel upload
            </button>
            <button type="button" class="btn btn-danger delete">
                Delete
            </button>
            <input type="checkbox" class="toggle">

</form>

  fileuploader.js (defined in requirejs-config.js)

define([
    'jquery',
    'underscore',
    'jquery/fileUploader/jquery.fileupload-ui',
    'jquery/fileUploader/jquery.iframe-transport',
    'jquery/fileUploader/load-image',
    'jquery/fileUploader/canvas-to-blob'
], function($, _) {
    "use strict";

    return function() {

        $('#fileupload').fileupload({
            url: '/upload/ajaxupload/'
        });
    };

});

Where am I wrong? I gotta admit, I never did that much with jquery widgets.


texts: password in email confirmation of registration

texts:
When a customer signs up on my site, it receives a confirmation of registration which it is  written the username and password.
Is it regular to have the password in plain text in email?


texts: How do I extend css with theme that doesn't call extend?

texts:
sorry if this is obvious or has been answered. I tried looking around and didn't see it. Also I'm getting around Magento okay but by no means an expert.

I have a Magento 2 theme that it was recommended I purchase for work. I have created my own theme that extended that purchased theme and it works and seems properly set up.

I then tried to create less files to extend the styling but none of them worked. I did all the necessary steps and my changes just never showed up. Finally I found that the issue was that the purchased theme does NOT extend Magento Blank or Luma. It's a top level theme. None of the basic extending mechanisms (_extend.less, _widgets.less etc) work. When I updated the theme table to have the custom theme extend Magento/blank, my css changes do appear but then the theme itself is a bit wrecked, presumably because it's including a bunch of Magento stuff that it hadn't before.

So, I don't know where to go from here. First of all, does that diagnosis sound right? It's completely possible that there's some way to do it after all that I haven't thought of. Then, is this normal? Should a purchased theme extend Blank? (and really the question is, if I dropped it and purchased another will I have the same problem).

How can I make my own style changes to this purchased theme? Or should I abandon it and start over?


texts: Shopping Cart Price Rule: Buy Amount X of Product A, Get 1 Product B Free

texts:
Is it possible in the shopping cart price rules to create a rule that gives you a rule like "buy amount X of Product A, get 1 Product B for free"?
For example:
buy 8 of SKUs 123, 124 or 125, get SKU 126 Free


texts: Value showing in Adminpanel but not in DB table

texts:
I'm facing a strange issue or may be i'm not clear about how magento saves values in to DB.

I have created a custom attribute for the product namely "seller_id" its properties are as follows.

Following are the frontend properties

Please read my Edit.

And i'm using a custom code to save product to the DB. Where i use

$product->setSellerId(23);
$product->save();

The code seems to be working properly. After running the code when i check the product details from adminpanel, i can see that value is set for seller_id.

The problem is when i try to access this attribute from the product listing page it is not returning the saved value. So i went to Attribute configuration section and set "Used in Product Listing Page" to "Yes".  You can see this in the second image. But still its not returning the saved value.

As per my understanding since seller_id's input type is "TextField", the value should be saved in "catalog_product_entity_varchar". Querying the  "eav_attribute" table reveled that seller_id's attribute_id is 136. So i executed following sql in the Db.

SELECT * FROM `catalog_product_entity_varchar` WHERE attribute_id=136

To my surprise it returned an empty result set. So i went back to the adminpanel opened a product details page (Catalog->Manage Products) clicked "Edit" and Clicked "Save" button for a product (Please note that i can see value for seller_id in Adminpanel for a product).

After saving the details for product i tried executing the above query once again and now its returning a row for product which i have just saved. And also now i'm able to get the value for seller_id in the product listing page.

So question is why values is not getting saved in "catalog_product_entity_varchar" table even if i'm doing $product->save();. How the value is showing in adminpanel even though its not getting saved table?

EDIT : This particular attribute "seller_id" was created long time ago. While the attribute created the option "Used in Product Listing" was set to "No".
But now i need to access it in the Product Listing page. So i set this option to Yes and did Reindexing. But still seller_id is not accessible in the product listing page.


texts: Magento 2 Migration Tool Error: Destination documents are not mapped: 0

texts:
I used the Data Migration Tool 2.0.2 for Magento 2.0.4.

I started the command line:

php bin/magento migrate:data <source of config.xml>

and get the Error in Step Log Step:

Source documents are not mapped: log_visitor
Destination documents are not mapped: customer_visitor

So I added ignore tags for customer_visitor and log_visitor in map-log.xml:

<source>
    <document_rules>
        <rename>
            <document>log_visitor</document>
            <to>customer_visitor</to>
        </rename>
        <ignore>
            <document>log_visitor</document>
        </ignore>
    </document_rules>
    <field_rules>
        <ignore>
            <field>log_visitor.first_visit_at</field>
        </ignore>
        <ignore>
            <field>log_visitor.last_url_id</field>
        </ignore>
        <ignore>
            <field>log_visitor.store_id</field>
        </ignore>
    </field_rules>
</source>
<destination>
    <document_rules>
        <ignore>
            <document>log_visitor</document>
        </ignore>
        <ignore>
            <document>customer_visitor</document>
        </ignore>
    </document_rules>
    <field_rules>
        <ignore>
            <field>customer_visitor.customer_id</field>
        </ignore>
    </field_rules>
</destination>

After this I still get the error in Step Log Step:

Destination documents are not mapped: 0

What I have to do?


texts:
I am using one step checkout and shipping_method.phtml responsible for showing the shipping methods.so now i have 2 more modules which both have shipping_method.phtml each.so i need to show either shipping_method.phtml from Module A or Module B depending on the shipping country.

so i wanted to update handle called  in that i will be updating the handle with module A or B depending on the condition statfication which just updates the setTemplate file either from A or B.

Please Help me how to achive this.

<a_onestepcheckout>
    <reference name="choose-shipping-method">
        <action method="setTemplate">
            <template>a/l/onestepcheckout/shipping_method.phtml</template>
        </action>
    </reference>
</a_onestepcheckout>

<b_onestepcheckout>
    <reference name="choose-shipping-method">
        <action method="setTemplate">
            <template>b/l/onestepcheckout/shipping_method.phtml</template>
        </action>
    </reference>
</b_onestepcheckout>

// either a_onestepcheckout or b_onestepcheckout depending on condition
<onestepcheckout_index_index>
    <update handle="a_onestepcheckout" /> or <update handle="b_onestepcheckout" />
</onestepcheckout_index_index>


texts: Fatal error: Call to a member function on non-object

texts:
I am developing a custom module where an xml file will be created after order completion for each order.

I have called a function exportOrder on occuring of an event "sales_order_place_after". Following is the code of my function

public function exportOrder($observer) {
    $order = $observer->getEvent()->getOrder();
    Mage::getModel('meteorify_observerexample/export')->exportOrder($order);
    return true;
}

Now In Export.php file i have written the logic of creation of an xml file.Export.php file is placed in the folder Meteorify/Observerexample/Model/ folder.

Here i have called the function exportOrder from the file Export.php using Mage::getModel('meteorify_observerexample/export')->exportOrder($order); but i am getting the error

  "Fatal error: Call to a member function exportOrder() on a non-object
  in
  /home/user_www/aliasgar/magentotesting/app/code/local/Meteorify/Observerexample/Model/Observer.php
  on line 6"

Can anyone help me on this ?


texts:
My Boss has asked my to provide a list of all products that have not sold in the last 3 months listed in order of most stock

I have hunted for some code I can hack already but found very little, I am surprised no one has asked this question.

I have been trying to modify the reports/product_collection but the results are inaccurate, I was thinking it might be as simple as changing the DESC to ASC in the best sellers listing and then add a date range
->setOrder('ordered_qty', 'asc')

however I think the collection is limited to products that have at least sold one of, which is not what we want

This is what I have been using but I am starting to think I should be using the sales/order_item_collection instead?

<?php

require_once 'app/Mage.php';
Mage::app('default');

?>

<?php
$from = date("Y-m-d H:i:s", (time()-2592000));
$to = date("Y-m-d H:i:s", time());

$_productCollection = Mage::getResourceModel('reports/product_collection')
->addAttributeToSelect('*')
->addOrderedQty($from, $to, true)
->addAttributeToFilter('status', 1)
//->addAttributeToFilter('sku', $sku)
->setOrder('ordered_qty', 'asc')
->getSelect()->limit(50)->query();

echo ' 50 Products not sold from '.$from.' until '.$to.'

';

foreach ( $_productCollection as $prod ) :
$_product = Mage::getModel('catalog/product');
$_product->load($prod['entity_id']);

$num = (int) Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty();

($i%2) ? $even = "class='even-li'" : $even = "";
?>
<li <?php echo $even ?>>

<a href="<?php echo $_product->getUrlPath() ?>" title="View <?php echo $_product->name ?>">
<a href="<?php echo $_product->getUrlPath() ?>" title="View <?php echo $_product->name ?>"><?php echo Mage::helper('core/string')->truncate($_product->name, 150) ?> ( <?php echo 'Qty in Stock '.$num ?> )

<?php //echo Mage::helper('core/string')->truncate(strip_tags($_product->description), 130); ?>

<?php
endforeach;
?>

cheers
FireHorse


texts: How can I filter all bundle child products in magento 2?

texts: I'm using the MageWorx autocomplete, but it display the child products from bundles


texts:
I am working in the home page on the theme and it generates empty strong tags

How can I find and remove it

Any helps? Thank in advance.


texts:
I have got below error in email template.when i am adding header

{{template config_path="design/email/header_template"}}

Error:

  Error filtering template: Cannot read contents from file "D:/xampp/htdocs/magento217/" Warning!file_get_contents(D:/xampp/htdocs/magento217/): failed to open stream: No such file or directory

Can any one help me on this problem ? Any references or suggestions are highly appreciated.


texts: Magento 2 : How can I add my custom side bar below Summary side bar in Cart page?

texts: In cart page I want to add custom side bar below Summary side bar. Please give me some suggestions. Thanks!


texts: Adding CSS & Target attribute to custom top links in default.xml Magento 2

texts:
I've searched all over google and I found a few tutorials that seems straight forward but I can't get it to work in my default.xml.

Majority of the tutorials uses local.xml but I'm not sure where to find that.

Basically, I removed all the top links and added my own. Here is what I have below. This works BUT I need to be able to add a css class and a target of blank.

Any help would be appreciated:

    <referenceBlock name="top.links">
        <!-- add ahern access link -->
        <block class="Magento\Framework\View\Element\Html\Link\Current" name="ahern-access-link" htmlClass="ahern-access">
            <arguments>
                <argument name="label" xsi:type="string">Ahern Access</argument>
                <argument name="path" xsi:type="string">http://ahernaccess.com</argument>
                <argument name="title" xsi:type="string">Log In to Ahern Access</argument>
                <argument name="class" xsi:type="string">ahern-access</argument>
            </arguments>
        </block>

        <!-- remove existing blocks -->
        <referenceBlock name="header" remove="true" />
        <referenceBlock name="register-link" remove="true" />
        <referenceBlock name="authorization-link" remove="true" />
        <referenceBlock name="wish-list-link" remove="true" />
        <referenceBlock name="my-account-link" remove="true" />
    </referenceBlock>

Or if there is a way to reference a CMS block in default.xml?


texts: magento mage bridge extension disable is breaking the site

texts:
I have one magento site. Today I just looged in to the admin dashboard and went through the system-> configuration-> Advanced-> advanced -> Disable Modules Output -> Yireo_MageBridge-> and made disable from enable. After that the total site became blank(Magento admin page and home page  completely blank, no errors to be found anywhere) . It did not showed anything. Even after going through some blogs and suggestion I edit mymagento index.php to check some issue I made like this

error_reporting(E_ALL);
ini_set('display_errors', 1);
ini_set('memory_limit', '256M');

But after all the debug I did not find anything. When I logged into my site magentroot/index.php/admin but still it is showing completely blank page. So can you tell me how to solve this issue? Any help and suggestions are welcome.


texts:
I am working on delivering a customized series of messages via static blocks based on certain conditions a customer possesses.

For example, I might like to display one customized offer message vs. an alternate customized offer message depending on whether a customer is logged in, and whether they have made a purchase in the past.

I have created all of the static blocks and they all display where they are supposed to if I manually enable them. What I am wishing to learn, is how/where I can insert the conditional logic that will determine IF a block will be used or not.

I am assuming that I will need to include this or similar conditional logic on each page a customer may navigate to and on which I'd like to deliver offers or messages. Some pages will get this treatment, others will not.

I'm asking mostly about WHERE to implement the code for a non-CMS page for now.

Thanks for any help or comments.


texts: check group product in cart programatically

texts:
how to check the group product is in cart or not. i am adding into with below code.

$cart = Mage::getModel('checkout/cart');
$params = array('super_group' => $pro);
$cart->addProduct($product, $params);
$cart->save();


texts: Adding a post var to my home url (for Adwords campaigns tracking) gives me a blank page

texts:
Any idea why?

www.mymagpage.com/?gclid=iuhgdw287gsdkjna[1]

It has the header and footer, but blank content. How can i debug this?


texts:
Currently when I hit a 404 URL Magento serves the custom 404 page I set up under CMS -> Sites (noRoute) while staying at the 404 URL.

What I want is that instead Magento should redirect to the page www.mydomain.de/404.

How can this be done?


texts:
I have found there is syntax for desktop devices is

  .media-width(@extremum, @break) when (@extremum = 'max') and (@break =
  @screen__m) {  }

But i need media query for 768px to 1240px desktop version only. Any one have idea about min & max condition for that media query.


texts:
I having issue to request token with oauth
https://www.host.com/magento2/oauth/token/request

Error:

  oauth_problem=oauth_consumer_key+is+a+required+field%2C+oauth_signature+is+a+required+field%2C+oauth_signature_method+is+a+required+field%2C+oauth_nonce+is+a+required+field%2C+oauth_timestamp+is+a+required+field


texts:
Just upgraded to 2.2.8. Trying to add something into HTML head section, but it does not go to the front-end. At the same time enabling "Display Demo Store Notice" did work.

Tried cleaning & flushing Magento 2 cache, but that didn't help either.


texts: Magento 2: Is there a way to use the include command into the di.xml?

texts:
Is there a way to merge multiple di.xml files into one main di.xml configuration file?

I would like to split a big di.xml file into five different files. I have seen the include command in the system.xml file into the PayPal module and I am curious to know if I can split the di.xml file too.

Look at:

https://github.com/magento/magento2/blob/develop/app/code/Magento/Paypal/etc/adminhtml/system.xml#L40-L43


texts: Magento coupons and subscriptions extensions

texts:
Following are the requirements:

Subscription for Goody Bag with online payment  2 - Payment
should be one time
Subscription plan should be of 3 Months,6 Months and respective delivery
If the customer is purchasing for the first time then the system should generate discount coupon code to that customer.
Discount coupon code should be generated with Thank you mail (Purchase order final mailEx. This is your purchase.Thank you for subscribing ABC etc. kind of mail)
If That customer does not want to use the coupon code, he can share it with his family/friends etc.But that family member/friend can not share that coupon code.
The coupon should have the expiry date.Coupon can be share via mail or facebook.

How to do this in Magento with cost effective manner?


texts: How do I get all checkout data in a last custom step M2?

texts:
I created a custom step checkout after payment step.

This new step calls "Resume Order".

In that step, I need to show the selected shipping address, selected payment method.

I know that checkout is built with js, so how can I get all the previous selected items from shipping, payment and cart?

The step is already created like magento documentation

So, how to bring previous selected data from previous checkout steps?


texts: Theme based translate.csv and module prefix

texts:
I have a translate.csv file in my theme app/design/frontend/{package}/{theme}/locale/en_GB/translate.csv, which is getting loaded and successfully translating various items on my site. For example I have:

"Maximum words count is %1$s. In your search query was cut next part: %2$s.","Maximum words count is %1$s. The following words were ignored: %2$s."`

Which works perfectly fine. However, it's my understanding that you should be able to prefix the text with the module name in order to only translate for that module. So I can't understand why the following doesn't work:

"Mage_CatalogSearch::Maximum words count is %1$s. In your search query was cut next part: %2$s.","Maximum words count is %1$s. The following words were ignored: %2$s."`

Obviously this is a derived example, the text in question only appears in one place on the site. But there are situations where we have things such as subscribe where it would be nice to translate differently in different places.

Am I mis-understanding it, or is there a bug?


texts:
I want to know some detail in config.xml about rewriting block for exemple, usually when we create a block we need to declare it in a xml like this:

<global>
    <blocks>
        <moduleName>
            <class>moduleNameSpace_moduleName_Block</class>
        </moduleName>
    </blocks>
</global>

But when we rewrite some module we dont declare it :

  We take product_view block rewrite for exemple

    <global>
        <blocks>
            <!--we haven't this-->
        <!--<moduleName>
                <class>moduleNameSpace_moduleName_Block</class>
            </moduleName>-->
            <catalog>
                <rewrite>
                    <product_view>moduleNameSpace_moduleName_Block_Product_View</product_view>
                </rewrite>
            </catalog>
        </blocks>
    </global>

I know that it works but i want to know the explanation.


texts: Theme Configuration is missing in Magento 2.1.5

texts:
I am developing an e-commerce store using Magento 2.1.5, I installed Magento & theme. Everything works fine with Magento default theme, but when I am trying to enable my new installed theme, there is no option to enable them. I have gone through Magento documentation but those steps are not working for me.

http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/themes/theme-apply.html

But in my case the screen is like this.

My themes list here.

Please help me soon.

Thanks


texts: Multiple stores selection not displayed in admin grid

texts: I have added a store selection field in one of my custom modules for testimonials. In which I want to show testimonials store wise specific to that store only. I have added the field and the filter is also working alright. The problem is that in the backend in admin grid where all the testimonials are listed out, there is one column that shows stores as well. Now if there is only one store then it shows up in the field, but if a testimonial is active for more than one stores then the field is blank. The values are set in database table but on the grid it doesn't show up multiple store. Can anyone tell me what am i missing here?


texts:
I am seeing this fatal error on magento admin panel

> Fatal error: Uncaught Error: Class 'Locale' not found in
> /home/qfjn4f2pz2ow/public_html/vendor/magento/framework/Locale/Bundle/DataBundle.php:64
> Stack trace: #0
> /home/qfjn4f2pz2ow/public_html/vendor/magento/framework/Locale/Bundle/DataBundle.php(28):
> Magento\Framework\Locale\Bundle\DataBundle->cleanLocale('en_US') #1
> /home/qfjn4f2pz2ow/public_html/vendor/magento/framework/Setup/Lists.php(92):
> Magento\Framework\Locale\Bundle\DataBundle->get('en_US') #2
> /home/qfjn4f2pz2ow/public_html/vendor/magento/framework/Validator/Locale.php(42):
> Magento\Framework\Setup\Lists->getLocaleList() #3
> /home/qfjn4f2pz2ow/public_html/vendor/magento/module-backend/Model/Locale/Resolver.php(72):
> Magento\Framework\Validator\Locale->isValid(NULL) #4
> /home/qfjn4f2pz2ow/public_html/vendor/magento/framework/Locale/Resolver.php(70):
> Magento\Backend\Model\Locale\Resolver->setLocale(NULL) #5
> /home/qfjn4f2pz2ow/public_html/vendor/magento/module-backend/Model/Locale/Resolver.php(60):
> Magento\Framework\Locale\Resolver->__construct(Object(Magento\Framework\A
> in
> /home/qfjn4f2pz2ow/public_html/vendor/magento/framework/Locale/Bundle/DataBundle.php
> on line 64

and also not able to see the front end which is https://www.ksagaronline.com/
Getting this error on frontend:

> Fatal error: Class 'IntlDateFormatter' not found in
> /home/qfjn4f2pz2ow/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php
> on line 116

Tried doing everything and this happend all of sudden.
Tried contacting godaddy but they are claiming that this fault is in code itself.
Help appreciated.


texts: How to override JS component file used in checkout

texts:
I would like to add my own JS to this file to add a little customization to the checkout in Magento 2.

app/code/Magento/Checkout/view/frontend/web/js/view/shipping-address/list.js

I tried copying it to my theme folder but it Magento doesn't pick it up, it still uses the file above.

app/design/frontend/Holy/mytheme/Magento_Checkout/web/js/shipping-address/list.js

How can I override this file?  I thought I could have easily overriden this in my theme?

Do I need to create a module for it?  And in it's /frontend/layout/checkout_index_index.xml file add something like:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="checkout.root">
            <arguments>
                <argument name="jsLayout" xsi:type="array">
                    <item name="components" xsi:type="array">
                        <item name="checkout" xsi:type="array">
                            <item name="children" xsi:type="array">
                                <item name="steps" xsi:type="array">
                                    <item name="children" xsi:type="array">
                                        <item name="shipping-step" xsi:type="array">
                                            <item name="children" xsi:type="array">
                                                <item name="shippingAddress" xsi:type="array">
                                                    <item name="children" xsi:type="array">
                                                        <item name="address-list" xsi:type="array">
                                                            <item name="component" xsi:type="string">Holy_MyModule/js/view/shipping-address/list</item>
                                                        </item>
                                                    </item>
                                                </item>
                                            </item>
                                        </item>
                                    </item>
                                </item>
                            </item>
                        </item>
                    </item>
                </argument>
            </arguments>
        </referenceBlock>
    </body>
</page>

Then I guess I can create my JS file in

app/code/Holy/MyModule/view/frontend/web/js/view/shipping-address/list.js

But how can I make sure it picks up everything from Magento_Checkout?  Is there something I need to add at the beginning of the file, in define block, Component.extend function, or the child functions like initChildren


texts: Configurable Product Image were not changing by selecting the Color in magento2

texts:
In my PDP Page (Product Discription Page), while I am selecting a color the Product image not changing according to that Color.

Please refer the site below URL: Click Here

https://winecountrymotorsports.com/product_info.php/products_id/1106?osCsid=ed9648b51b311709b24066affe9f6cf8

Please suggest me any solution as soon as possible.


texts:
How do I get the login form to pop up on the same page when I click on login?

In the image is graphically what I need to do.


texts: Magento 2 add new checkout step under Shipping Step

texts:
How to add new step under shipping step not new step progress bar, the same as Shipping Method step is under Shipping Step progress bar?

like the screen shoots:

Magento Doc tells you how to add new step which will also create step progress bar but I need to achive a step inside the shipping Step: ref: https://devdocs.magento.com/guides/v2.3/howdoi/checkout/checkout_new_step.html

NOT This:


texts: Compilation Error when Compiling Kount Extension on Magento 2.1.3

texts:
I've installed the Kount Magento 2 Extension on Magento 2.1.3 and I am running into an RuntimeException when running the compile command:

Compilation was started.
Repositories code generation... 1/7 [====>-----------------------]  14% 1     sec 74.8 MiB
     [RuntimeException]
  Source class "\Kount_Log_Binding_Nop" for "Kount_Log_Binding_NopLogger"     generation does not exist.

setup:di:compile

Any help would be appreciated. I've contacted Kount but they can't seem to pinpoint the error since they use a third party for the extension development.


texts: Creating Custom category Attribute - Magento 2

texts:
I'm trying to find a way to set a custom attribute to my categories so I can use that to show Grid/List mode.

I thought to use a Boolean field: "Force Grid mode: Yes/No" because per default all my categories is in List Mode, however, some specific categories I would like to show grid.

Then I can use that to set the mode in my list.phtml.


texts: Magento 2 - Override core template in own module

texts:
I want to override the template Magento_Customer/templates/form/register.phtml in my own module.

At the moment the override is in my theme:

app/design/frontend/company/base/Magento_Customer/templates/form/register.phtml

but I need it in my module:

app/code/company/customer/???

Is this possible?

I am developing a module which is adding a new field in the customer register form.

I need the override in my module, otherwise users would have to add my module and also modify their theme.


texts:
I'm having this issue below.

Fatal error: Out of memory (allocated 301465600) (tried to allocate 32 bytes) in /home/romanzzino/public_html/lib/Zend/Db/Statement/Pdo.php on line 228

What could it be?


texts: Create Product Programatically with different attribute sets

texts:
Current Feature

Once we Click on Custom button "Button1"  present in Original Product view page [ This original product is created with Attribute set id 1 ] , We are creating new Product Programatically with attribute set id = 2.

  What i need

suppose if that original product is created with Attribute set id 3 , Than I want to create new Product Programatically with attribute set id = 4.

public function saveProduct($type, $doSave = true, $originalProduct)
{
    Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
    $product = Mage::getModel('catalog/product');
    $product->setTypeId($type)
        ->setAttributeSetId(2);

    $product->save();
}


texts: Do you have to use additional_attributes in Magento 2 product import or can you still create a separate field?

texts: Instead of merging a bunch of fields in my import csv can I keep them separate?


texts: Since update to CE 1.9.2.2 Cron throwing error

texts:
After updating, via Connect, to CE 1.9.2.2 from CE 1.9.1.0 I am getting errors from the cron email. The error is:

  PHP Warning:  PHP Startup: Unable to load dynamic library
  '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/mcrypt.so' -
  /usr/local/lib/php/extensions/no-debug-non-zts-20100525/mcrypt.so:
  cannot open shared object file: No such file or directory in Unknown
  on line 0 PHP Warning:  PHP Startup: Unable to load dynamic library
  '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/mcrypt.so' -
  /usr/local/lib/php/extensions/no-debug-non-zts-20100525/mcrypt.so:
  cannot open shared object file: No such file or directory in Unknown
  on line 0 X-Powered-By: PHP/5.4.39

The command in my cPanel crontab is:

*/5 *   *   *   *   /bin/sh ~/www/cron.sh >/dev/null 2>&1

The error is being emailed to me.  The system has mcrypt, but cPanel compiles it into apache, not as a loadable module.  Any ideas as to what would be causing this?  The MAGE exception log shows nothing new since the update, and the MAGE system log is similarly clear.


texts: Using AJAX to call product tabs of a simple product

texts: When I select an option of a configurable product I want to load that specific Part Number's product tabs. I assume AJAX would be the easiest way to do this but I am unfamiliar with using  AJAX. If anyone can point me in the right direction or has a different suggestion on how to accomplish this it will be much appreciated.


texts:
How to get product by name? I have the name of the product in my code and iIwant to get product so I use this code :

$model = Mage::getModel('catalog/product');
$product = $model->load('name-of-product','product_name');

To get product but it return a null object(Mage_Catalog_Model_Product) iIuse this code for other models and it worked but for 'catalog/product' not working. How to get product?


texts:
About magento auto set country in checkout

Question: How can we set the dropdown in Magento checkout with countries to the actual country the customer is coming from (on multicountry frontend).

(ofcourse we can set a default per store view - but alas, we have an english version that works for all countries. It would be nice if the country is then already set to the right country)

ideas: read requested country/language in reques? Geoip database?

What is maybe the simplest way? and the maybe the best way?

thx


texts: Remove specific shipping method based on condition in magento 2

texts:
I have installed a store pick up extension in our website. This extension showing two option as radio buttons

Collect in Store

Yes
No

So if we select 'NO', then in shipping method,

There is an additional shipping method showing like below.

Store pickup 0.00

Can we hide this option from the list if the extension installed is enabled?

In which file we can hide specific shipping method based on condition.

Can anyone help me with the issue?

I need to hide the specific shipping method from the list of options.


texts: For customer token creation by REST Api,Token is been return unknow format or extra length. In magento 2

texts:
For customer token creationby REST Api,Token is been return unknow format or extra length. In magento 2,Can anyone have any idea why it is return unknow length or so.Please find the below screen shot.For more details.

https://prnt.sc/izkji4

thanks in adavance.


texts:
Magento ver. 1.9.2.4
I've got a question.
We have 2 shipping metods, courier and post office
I would like to 'create coupon for free shipping' for post office shipping method.
Is it possible?
Thx a lot.


texts: Price doesn't revert after catalog price rule goes inactive

texts: I set a catalog price rule for a category that had two products in it. Each of those products was also in other categories not part the catalog price rule. I've now inactivated the catalog price rule, removed the products from the category that had the catalog price rule and have reindexed and flushed cache. But the prices of these products in the other categories remains discounted. It's stuck!


texts: Magento : Get Quantity of Added Product in cart_product_add_after Event

texts:
I need to get quantity of product being added NOT quantity of that product in cart.

E.g. I am on product view page and set quantity to 5 and click on "Add to Cart". I need to get that quantity in observer.

How can I do that?

Currently I have this, but it gets quantity of that product in cart. E.g. if I already had 3 of same products in cart and I added 5 more of same product then $qty will be 8 not 5. That is not what I need.

$product = $observer->getEvent()->getQuoteItem();
$qty = $product->getQty();


texts:
I am trying to install Magento 2. In Readiness check , PHP Extension zip is missing. I am getting below error message -

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


texts: Magento 1.8 - Remove Order Review from OnePage Checkout

texts:
I'm trying to skip the order review stage of the onepage checkout process, so once a payment method has been selected it goes straight to the card processing.

There are no terms and conditions to agree to in the checkout.

I've tried to follow this guide:
https://magento.stackexchange.com/a/8232

However I am not sure how to create the observer, or where it goes.

Has anyone got a full solution to this? I've hit a dead end.


texts: How to create filter's UI in magento admin panel

texts:
I want to create something like this in my custom module on admin panel:

Where should I start?


texts: create module and override Magento\Catalog\Model\Layer.PHP

texts:
I want to use 'Display out of stock products at last' solution as module. I changed vendor\magento\module-catalog\Model\Layer.php and it worked.

public function getProductCollection()
{
    if (isset($this->_productCollections[$this->getCurrentCategory()->getId()])) {
        $collection = $this->_productCollections[$this->getCurrentCategory()->getId()];
    } else {
        $collection = $this->collectionProvider->getCollection($this->getCurrentCategory());
        $this->prepareProductCollection($collection);
        $this->_productCollections[$this->getCurrentCategory()->getId()] = $collection;
        $collection->getSelect()->joinLeft(
         ['_inventory_table' => 'cataloginventory_stock_item'],
         "_inventory_table.product_id = e.entity_id", ['is_in_stock']
          );
          $collection->getSelect()->order(['is_in_stock desc']);
        }
    return $collection;
}

then I tried to create a module but I couldn't. could anyone help me for di.xml and model file please?