texts: Is there any necessary for patches if i have installed Magento 1.9.2.4

texts:
Currently i have upgrade my Magento from 1.9.2.3 to 1.9.2.4

So should i also need to install patches ?

I have followed these links

(https://www.magentocommerce.com/download?_ga=1.263831883.634541803.1469616061) for Patches there are
patch: SUPEE-6237
patch: SUPEE-5344
patch: SUPEE-1533
patch: SUPEE-4291/4334 these patches are available for 1.9.x but i have tried for patch but getting error.

dev]# sh PATCH_SUPEE-5344_CE_1.8.0.0_v1-2015-02-10-08-10-38.sh
Checking if patch can be applied/reverted successfully...
ERROR: Patch can't be applied/reverted successfully.

patching file app/code/core/Mage/Admin/Model/Observer.php
Hunk #1 FAILED at 44.
Hunk #2 FAILED at 58.
Hunk #3 FAILED at 69.
3 out of 3 hunks FAILED -- saving rejects to file app/code/core/Mage/Admin/Model/Observer.php.rej
patching file app/code/core/Mage/Core/Controller/Request/Http.php
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
2 out of 2 hunks ignored -- saving rejects to file app/code/core/Mage/Core/Controller/Request/Http.php.rej
patching file app/code/core/Mage/Oauth/controllers/Adminhtml/Oauth/AuthorizeController.php
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file app/code/core/Mage/Oauth/controllers/Adminhtml/Oauth/AuthorizeController.php.rej
patching file app/code/core/Mage/XmlConnect/Model/Observer.php
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
2 out of 2 hunks ignored -- saving rejects to file app/code/core/Mage/XmlConnect/Model/Observer.php.rej
patching file lib/Varien/Db/Adapter/Pdo/Mysql.php
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file lib/Varien/Db/Adapter/Pdo/Mysql.php.rej

So should i apply patches or not ?


texts: Magento 2.1.5 eav_entity_attribute doesn't get updated

texts:
Shouldn't the eav_entity_attribute table be updated when you run magento indexer:reindex or is it generated by something else?
The reason I ask is that the table was corrupted during data migration and it is causing multiple issues on the site.

I tried to empty the table (after taking a backup) and then run reindex. Nothing appeared in the table.
There doesn't seem to be anything relevant in any of the logs.


texts: how to position block within category page?

texts:
I am calling a block into a category page using the following code:

<reference name="content">
<block type="cms/block" name="my-grid" as="my-grid" before="-">
<action method="setBlockId"><block_id>my-grid</block_id></action>
</block>
</reference>

This calls in a block (which loads a phtml code) and places it at the top of the category page.

How can I move it down, so it is just below the category header title? So essentially, just one line lower in the page > but not sure how to control that.

Thanks!


texts: Before customer login check condition in magento 2.4

texts:
I want to if customer login and customer cart is not empty so customer redirect checkout page other wise customer login and customer cart is empty customer redirect my account page.
Please help me,
Thanks.


texts: Observer checkout_cart_product_add_after get product quantity in cart

texts:
I have built an observer which fires at checkout_cart_product_add_after. In the observer I set the quantity like this:

$item->setQty($quantity);

I would like to fetch the quantity that is already in the cart for that product, so that the quantity for the product gets updated instead or overwritten. Yet when I try to get the product quantity in the cart (Mage::helper('checkout/cart')), I get the "new" quantity, probably because the update quantity code has already fired.

How could I get the cart quantity for the product?

Thanks in advance,

Joost

EDIT:

This is the full code of the observer:

public function modifyPrice(Varien_Event_Observer $obs)
    {

        $item = $obs->getQuoteItem();
        $item = ( $item->getParentItem() ? $item->getParentItem() : $item );
        $price = $this->_getPrice($item);
        $item->setCustomPrice($price);
        $item->setOriginalCustomPrice($price);

        $quantity = $this->_getQuantity($item);
        $item->setQty($quantity);

        $item->getProduct()->setIsSuperMode(true);
    }

    protected function _getPrice(Mage_Sales_Model_Quote_Item $item)
    {
        $price = 0;

        Mage::app()->getRequest()->getPost();

        $qtydropdownbox = Mage::app()->getRequest()->getParam('qtydropdownbox');
        $prices = $item->getProduct()->getData('qty_dropdownbox_prices');
        $quantities = $item->getProduct()->getData('qty_dropdownbox_quantities');

        $array_prices = explode(';', $prices);
        $array_quantities = explode(';', $quantities);
        $price = $array_prices[$qtydropdownbox] / $array_quantities[$qtydropdownbox];

        return $price;
    }

    protected function _getQuantity(Mage_Sales_Model_Quote_Item $item)
    {
        $quantity = 0;

        Mage::app()->getRequest()->getPost();

        $qty = Mage::app()->getRequest()->getParam('qty');
        $qtydropdownbox = Mage::app()->getRequest()->getParam('qtydropdownbox');
        $quantities = $item->getProduct()->getData('qty_dropdownbox_quantities');

        $array_quantities = explode(';', $quantities);
        $quantity = $array_quantities[$qtydropdownbox] * $qty;

        return $quantity;
    }


texts:
How can I force magento to not to use SSL on hompage?

because I've created a featured product module and now magento is not displaying it and saying insecure content.

It works fine on UAT as there is no ssl certificate.


texts: Custom module not working in magento 2.1.x

texts:
We have created one module through which we can create upload images & from product detail page we can get the list of those images in a grid & whatever images we select those will be seen in front in product page.

This module works fine in Magento 2.0.x but not working in magento 2.1.x the problem is here :-

We have one observer which is being called when we save the product & in that we get the product id & the selected images ids....now the issue is we do not get images ids in 2.1.x

Event is : catalog_product_save_after

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="catalog_product_save_after">
        <observer name="sticker" instance="Els\Sk\Observer\Adminhtml\Product" />
    </event>
</config>

Here is our Observer Code :-

<?php
namespace Els\Sk\Observer\Adminhtml;

use Magento\Framework\Event\Observer as EventObserver;
use Magento\Framework\Event\ObserverInterface;

class Product implements ObserverInterface
{
    protected $resourceConnection;
    protected $eavAttributeFactory;
    protected $request;
    protected $_resources;

    public function __construct(
        \Magento\Framework\App\Request\Http $request,
        \Magento\Framework\App\ResourceConnection $resourceConnection,
        \Magento\Eav\Model\Entity\AttributeFactory $eavAttributeFactory
    ) {
       $this->request = $request;
       $this->resourceConnection = $resourceConnection;
       $this->eavAttributeFactory = $eavAttributeFactory;
    }

    /**
     * Saving product images data.
     *
     * @param EventObserver $observer
     * @return $this
     */
    public function execute(EventObserver $observer)
    {
        $product = $observer->getEvent()->getProduct();

        $product_id = $product->getId();

        /* We are not getting this in 2.1.x so this is the real issue */
        $images_ids = $this->request->getPost("images_id");

        $this->imageInsert($images_ids , $product_id);
    }
?>

Can any one please help with this?

Thank you.


texts: After update to Magento 2.3.1 the visibilty of Products ist wrong

texts:
After I had "stupidly" made an update to Magento 2.31. I have the problem that my configurable child-products are displayed in the frontend.

In the admin-article-overview, the value is shown as "Catalog / Search" but in the detail view is right "not visible"

Overview:

Detail:

I tried everything but without success

rm -rf var/di var/generation
php bin/magento cache:flush
php bin/magento setup:di:compile
php bin/magento indexer:reindex

thanks for your help!


texts: Can I uninstall unnecessary themes installed with a theme suite (Sahara-Plazathemes)?

texts:
I installed a theme pack from Plaza Themes containing several themes on version 2.1.3. Among the collection, the three are installed, the others not. They are just listed in Content / Design / Themes. In addition, the categories and sub-categories of these themes are present in PRODUCTS / CATEGORIES. Can I delete them without causing Magento to malfunction? I would like to remove the fictitious products too.
Thanks for your help


texts: I am importing categories in magento 1.9 . but when i import categories it shows error "Path provided is not a valid one" how can i get exact path of category. URGENT


texts: Set Product Custom Options From Observer Magento 1.9

texts:
I am trying to add custom options to products on save. I want to add or update custom options (not additional options) on before_product save. I am able to access the observer and it is working on save as well but unable to update the custom options. Create option code is working if run from standalone script but not from observer only.
This is my observer code
class Company_Module_Model_Observer{
    public function updateOptions($observer){
        $product = $observer->getEvent()->getProduct();
        $categories= $product->getCategoryIds();
        $currentCategory = '';

        foreach ($categories as $cat_id){
            $cat = Mage::getModel('catalog/category')->load($cat_id);
            $currentCategory = $cat->getName();
        }

        $skuList =['LAPTOP_','DESKTOP_'];
        $upgrades = $optionValues =  [];
        if($currentCategory=='Laptops'){
            $_productCollection = Mage::getModel('catalog/product')
                ->getCollection()
                ->addAttributeToFilter('sku', array('like' => 'LAPTOP_%'));
            $upgrades = $_productCollection;
        }
        $meta = "6 this is product meta with custom plugin ".$product->getName();
        foreach ($upgrades as $products) {
            $_product = Mage::getModel('catalog/product')->load($products->getId());

            $optionValues = array(
                'title' => $_product->getName(),
                'price' => $_product->getPrice(),
                'price_type' => 'fixed',
                'sku' => $_product->getSku(),
                'sort_order' => 0,
            );
        }

        $options = array(
            'title' => 'Upgrades',
            'type' => 'drop_down',
            'is_required' => 0,
            'sort_order' => 0,
            'values' => $optionValues
        );

        $product->setMetaDescription($meta);
        $product->setProductOptions(array($options));
        $product->setCanSaveCustomOptions(true);
        //if uncomment this then save loop continues and site hangs
        //$product->save();
    }
}

No error in logs or anything else. Please guide me how I can achieve this.


texts: Trigger event after an order has been created/saved

texts:
We are currently having a issue with the Observer, most likely we did something wrong, but I have no clue what I've did wrong.

Basically, we created a module with an observer:

namespace Vendor\Customer\Observer;
use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\Event\Observer;
use Vendor\Customer\Model\Customer;
use Vendor;

class SalesOrderSaveAfter implements ObserverInterface {
    /** @var \Magento\Framework\Logger\Monolog */

    protected $logger;
    protected $_customer;

    public function __construct(\Psr\Log\LoggerInterface $loggerInterface,
            \Vendor\Customer\Model\Customer $customer) {
        $this->logger = $loggerInterface;
        $this->_customer = $customer;
    }

    /**
     * fires when sales_order_save_after is dispatched
     *
     * @param Observer $observer
     */
    public function execute(Observer $observer) {
        $order = $observer->getEvent()->getOrder();
        $result = (array) $this->_customer->getOrderData($order);
    }
}

The problem is, that the module fires the action when the customer clicks on "Place order" in the frontend.

When the customer clicks on "Place order" he will be redirected to a third party payment provider, and after the customer is finishing his payment there, he comes back to the Success-Page, where this Observer triggeres AGAIN.

The result of this is that the observer is triggered twice in one payment process. This seems buggy.

So the question is: how can I tell the Observer to only fire once and only if the payment is successfully done (= when reaching the Success-Page)?


texts:
I have managed to change the title of the Register page with the following code in local.xml

<customer_account_create>
  <reference name="head">
    <action method="setTitle"><title>Create New Customer Account - Bomber Jacket</title></action>
  </reference>
</customer_account_create>

How can I do something similar for a page like www.example.com/about-us.html ?


texts:
I've been working on a Magento website: satcogrowlight.com

I am very new to working with Magento in the back end.

My problem is that once I've added an item to my cart, I cannot change the quantity in the cart. I enter in the new quantity, click "Update Shopping Cart", the page refreshes, and everything remains the same.

I have no idea where to start troubleshooting. I haven't made any changes to the code, as far as I remember.


texts: Magento 2 image helper with category image url

texts:
I want to use helper for category image.

Right now I,m getting category image like this :

$image = $cat->getImageUrl();

But I want to keep frame to false so how can I do it with category images?


texts: How to get the payment method used to save in order Magento 2

texts:
I've built a custom payment method, everything works.
but when I check the order on dashboard the payment method information is not saved.

How do I go about this?


texts: Magento2: Category id not showing at backend

texts:
I've installed Magento version 2.1.1 on my localhost. Then created few categories at backend. The issue is when I click on the category, it doesn't show ID of that category after the name of that category as it is showing in Magento1 (http://prntscr.com/e2z79c).

Is this a issue in Magento2? How can I show the ID of category?
Any help would be appreciated. Thanks in advance!


texts:
I have been reading a couple of tutorials and am now trying to create my own observer.

The way I understand observers, is that when you observe an event a parameter will be automatically passed to it, but how do I know what is being passed?

I thought the below example would pass Mage_Catalog_Model_Product as a parameter. But when I try to implement this in my code I get the following error
..._Model_Observer::_generateDiscount() must be an instance of Mage_Catalog_Model_Product (I have added my code below)

I'm trying to use the dispatchEvent() in getFinalPrice()

Mage_Catalog_Model_Product_Type_Price.php

 /**
 * Retrieve product final price
 *
 * @param float|null $qty
 * @param Mage_Catalog_Model_Product $product
 * @return float
 */
public function getFinalPrice($qty = null, $product)
{
    if (is_null($qty) && !is_null($product->getCalculatedFinalPrice())) {
        return $product->getCalculatedFinalPrice();
    }

    $finalPrice = $this->getBasePrice($product, $qty);
    $product->setFinalPrice($finalPrice);

    Mage::dispatchEvent('catalog_product_get_final_price', array('product' => $product, 'qty' => $qty));

    $finalPrice = $product->getData('final_price');
    $finalPrice = $this->_applyOptionsPrice($product, $qty, $finalPrice);
    $finalPrice = max(0, $finalPrice);
    $product->setFinalPrice($finalPrice);

    return $finalPrice;
}

My observer

class Mdeprojects_Discount_Model_Observer
{
    public function applyDiscount()
    {
        $this->_generateDiscount();
    }

    protected function _generateDiscount(Mage_Catalog_Model_Product $product)
    {
        $discount = $product->getFinalPrice() / 100 * 50;
        return $discount;
    }
}

I have also tried

protected function _generateDiscount(Varien_Event_Observer $product)
{
    $discount = $product->_data['final_price'] / 100 * 50;
    return $discount;
}

I am misunderstanding how observers work could someone please point out where my error(s) is/are?


texts:
I have used \Magento\Checkout\Model\Session for get quote id and store my custom value in this. but its return every time empty session. when FPC on or customer not logged in.

I have found out some solution but no luck with this. My block is placed in header section so its not good to used cacheable="false". Because its turn off all my pages cache.

Any other solution?

Edited

$checkoutSession = $objectManager->create('Magento\Checkout\Model\Session');
$resultPageFactory = $objectManager->create('Magento\Framework\View\Result\PageFactory');
$quoteId = $checkoutSession->getQuoteId();


texts:
When ever i run bin/magento setup:static-content:deploy it outputs the following error:

  PHP Fatal error:  Uncaught TypeError: Argument 15 passed to
  Magento\Deploy\Model\Deploy\LocaleDeploy::__construct() must be of the
  type array, null given, called in
  /vagrant/project-community-edition/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php
  on l ine 93 and defined in
  /vagrant/project-community-edition/vendor/magento/module-deploy/Model/Deploy/LocaleDeploy.php:177

with the stack trace of:

  0
  /vagrant/project-community-edition/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(93):
  Magento\Deploy\Model\Deploy\LocaleDeploy->__construct(Object(Symfony\Component\Console\Output\ConsoleOutput),
  Object(Magento\Translation\Model\Js\Config), Object
  (Magento\Framework\View\Asset\Minification),
  Object(Magento\Framework\View\Asset\Repository),
  Object(Magento\Framework\View\Asset\RepositoryFactory),
  Object(Magento\RequireJs\Model\FileManagerFactory),
  Object(Magento\Framework\RequireJs\ConfigFactory), Object(Magento\Fra
  mework\App\View\Asset\Publisher),
  Object(Magento\Framework\View\Asset\Bundle\Manager), Object(Ma in
  /vagrant/project-community-edition/vendor/magento/module-deploy/Model/Deploy/LocaleDeploy.php
  on line 177

This is with Magento 2.1.7.

Update:
I did a fresh install and it turns out if you run php bin/magento setup:di:compile before you run setup:static-content:deploy it causes the error.


texts: Cart price roles - Discount 20% on a cheaper product - Magento 2

texts: I am trying to set in Cart prices roles discount 20% on a cheaper product and I can't find a way.


texts: Using local helper to get thumbnails in minicart

texts:
This is my code that imports the images from the server

<?php
 class Bundle_LocalHelpers_Helper_Basic extends Mage_core_Helper_Abstract {

   public function getImageUrl($product)
{

   $storeId = Mage::app()->getStore()->getId();
   $sku = Mage::getResourceModel('catalog/product')->getAttributeRawValue($product->getId(), 'sku', $storeId);

    $asin = substr($sku,0,10);

    if ($sku != null) {

        return "http://productimages.shop.com/images/$asin.jpg";
    }
    else
    {
        return "http://productimages.shop.com/images/$sku.jpg";
    }
 }
 }

And from this I am trying to include them in minicart/default.phtml to get the thumbnails however when I try to add the localhelper class the php crashes.

This is the code for the default.phtml

    <?php if ($this->hasProductUrl()): ?>
    <a href="<?php echo $this->getProductUrl()?>" title="<?php echo $this->escapeHtml($this->getProductName()) ?>" class="product-image"><img src="<?php echo $localHelper->getImageUrl($product)->resize(50, 50)->setWatermarkSize('30x10'); ?>" width="50" height="50" alt="<?php echo $this->escapeHtml($this->getProductName()) ?>" />
<?php else: ?>
    <img src="<?php echo $this->getProductThumbnail()->resize(50, 50)->setWatermarkSize('30x10'); ?>" width="50" height="50" alt="<?php echo $this->escapeHtml($this->getProductName()) ?>" />
<?php endif; ?>

Any suggestions how to add it ?


texts:
I have tested my module2 module with https://github.com/magento/marketplace-eqp

I execute the following command

$ vendor/bin/phpcs /var/www/my/module --standard=MEQP2

I got the following warnings

Use of protected class members is discouraged.
Property name "$_pageFactory" should not be prefixed with an underscore to indicate visibility

My code is

protected $_pageFactory;

What should i do to remove those warnings?

I also got warning

Line exceeds 120 characters; contains 129 characters

How do i remove this warning?

Also got

"resource" is a reserved word in PHP 7

Code is namespace Blaze\Intely\Model\Resource\Myorders;
I create folder Resource inside model so i use Resource in namespace
I also search some examples they use Resource in namespace


texts: How can I add a column to an existing model in Magento after an existing field?

texts:
I am creating a Magento module that makes use of a new column in sales/quote.

I know how to use addAttribute and addColumn respectively, but I can't figure out how to put the SQL equivalent of AFTER column from the entity model classes.

Also, do I need to always addAttribute to the corresponding model after addColumn to a table?


texts: how to configure tax settings for usa only store?

texts: when a shop is sending items from New York and only sells in the USA, do i still need to configure all different taxes for every state? Or just the state where items will be shipped from? Is there a csv available to import that contains all necessary settings?


texts: Hi i want to import product on magento 2.2.9 if can any one help me with a good tutorial Also all my pictures are on externe server. I use Builderall platforme wich has magento 2 already installed tank you


texts: Getting the header(or a custom block) for API use

texts:
I want to generate the header and serve it via API for displaying outside of the Magento website.

I've found a working example for Magento 1 but I couldn't figure out how to do it for Magento 2.

/*
         * Add specific layout handles to our layout and then load them.
         */
        $layout = Mage::app()->getLayout();
        $layout->getUpdate()
            ->addHandle('default')
            ->addHandle('ixcbadv_header')
            ->addHandle('facebook');

        if ($magento_logged_in) {
            $layout->getUpdate()->addHandle('customer_logged_in');
        } else {
            $layout->getUpdate()->addHandle('customer_logged_out');
        }

        $magento_google_analytics = $layout->createBlock('googleanalytics/ga')->setTemplate('googleanalytics/ga.phtml')->toHtml();

        $layout->getUpdate()->load();

        /*
         * Generate blocks, but XML from previously loaded layout handles must be
         * loaded first.
         */
        $layout->generateXml()->generateBlocks();

Any ideas?
Thanks!


texts: magento 1.x admin reports are stored in which table?

texts:
Magento admin generated reports are stored in which table.

https://prnt.sc/g5dr84


texts: Magento 2: What is the best way to observe cart change to modify cart item in magento 2?

texts:
I'm using Magento v2.3.4 and i want to modify the cart item, if there is an update on the cart (add to cart, update cart item, and remove cart item). Currently I'm using plugin for quote collectTotals() function.
Is this the correct way to do it, or is there any other method that i can use ?
etc/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">
    <type name="Magento\Quote\Model\Quote">
        <plugin disabled="false" name="Vendor_Module_Plugin_Magento_Quote_Model_Quote" sortOrder="10" type="Vendor\Module\Plugin\Magento\Quote\Model\Quote"/>
    </type>
</config>

Vendor/Module/Plugin/Magento/Quote/Model/Quote.php
public function beforeCollectTotals(\Magento\Quote\Model\Quote $subject)
{
    $quote = $this->getQuote();
    foreach($quote->getAllItems() as $item){
       $price = $this->getCustomPrice($item->getProductId());
       if($price){
          $item->setCustomPrice($price);
          $item->setOriginalCustomPrice($price);
       }
    }
    return [];
}

the problem with this plugin is, i got this error after i placed an order:

Please check the billing address information. "firstname" is required.
Enter and try again. "lastname" is required. Enter and try again.
"street" is required. Enter and try again. "city" is required. Enter
and try again. "telephone" is required. Enter and try again.
"postcode" is required. Enter and try again. "countryId" is required.
Enter and try again.

i check the quote address in the database and those field column is empty


texts: Magento2 Hide/Show VAT field based on Country

texts:
Can someone guide me on how to keep VAT field visible and required for non-USA countries and hide and not require for USA country on checkout page add address ?

I tried this way but its not working

require(['jquery'],function($){
jQuery( document ).ready(function() {
    jQuery('#co-shipping-form div[name="shippingAddress.country_id"] select').change(function(){
        var cnt = jQuery(this).val();
        if ( cnt == 'US'){
            jQuery('#co-shipping-form [name="shippingAddress.vat_id"]').hide();
        }else{
            jQuery('#co-shipping-form [name="shippingAddress.vat_id"]').show();
        }
    });
});
});

Thanks


texts: Integrity constraint violation: 1062 Duplicate entry 'XXX-XXX' for key 'EAV_ENTITY_ATTRIBUTE_ATTRIBUTE_SET_ID_ATTRIBUTE_ID'

texts:
Preconditions

Migrating from Magento 1.9.3.10
Migrating to Magento 2.3.5-p1 using Data Migration Tool

Steps to reproduce

Run Settings migration as usual
Run Data migration as usual

Expected result

Migration with no errors or integrity step failing with details

Actual result

Integrity constraint violation: 1062 Duplicate entry 'XX-XXX' for key 'EAV_ENTITY_ATTRIBUTE_ATTRIBUTE_SET_ID_ATTRIBUTE_ID'

Additional notes

I have 44 attribute sets in my M1 database. This error only comes up with 2 of those (Attribute set IDs 9 and 12).

I've already checked my M1 & M2 databases and there are no duplicated entries as the error says. Also, this was recognized as a bug on a previous version of Data Migration Tool.

The suggested solution was comment/remove remove a method at Migration/Step/Eav/Data.php and add the attributes manually to the sets.

Is there a official / tested fix for this or somebody knows what it means? (Again, there are no duplicated entries)

Note: Here is a list with some of the attribute_set_id / attribute_id combination which fails.

Integrity constraint violation: 1062 Duplicate entry '9-110' for key 'EAV_ENTITY_ATTRIBUTE_ATTRIBUTE_SET_ID_ATTRIBUTE_ID'
Integrity constraint violation: 1062 Duplicate entry '9-503' for key 'EAV_ENTITY_ATTRIBUTE_ATTRIBUTE_SET_ID_ATTRIBUTE_ID'
Integrity constraint violation: 1062 Duplicate entry '9-863' for key 'EAV_ENTITY_ATTRIBUTE_ATTRIBUTE_SET_ID_ATTRIBUTE_ID'
Integrity constraint violation: 1062 Duplicate entry '12-111' for key 'EAV_ENTITY_ATTRIBUTE_ATTRIBUTE_SET_ID_ATTRIBUTE_ID'

(The same happen to almost all attributes assigned to attribute sets 9 and 12).


texts: magento2: conditional rewrite the template

texts:
I am rewriting the search block but i want it to conditional based on system configuration. If module is enabled then it will rewrite the template otherwise default will be loaded.

<referenceBlock name="top.search">
    <action method="setTemplate">
        <argument name="template" xsi:type="string">Spacename_Moduelname::form.mini.phtml</argument>
    </action>
</referenceBlock>


texts:
I have created a module to disable user registration (mostly following guide here https://stackoverflow.com/questions/2959131/how-to-disable-frontend-registration-in-magento/25186894).

Unfortunately, I have a strange problem in that the rewrite works if the url is "/customer/account/create" but not if it is "/customer/account/create/" - the trailing slash causes strange behaviour, in that not only is the registration form loaded, but also a 404.

My config.xml consists of:

<?xml version="1.0"?>
<config>
<modules>
    <Company_DisableRegistration>
        <version>0.1.0</version>
    </Company_DisableRegistration>
</modules>
<global>
    <rewrite>
         <company_disableregistration_customer_account_create>
                  <from><![CDATA[#^/?customer/account/create/#]]></from>
                  <to>/disableregistration/customer_account/create</to>
             </company_disableregistration_customer_account_create>
             <company_disableregistration_customer_account_createPost>
                 <from><![CDATA[#^/?customer/account/createPost/#]]></from>
                 <to>/disableregistration/customer_account/createPost</to>
             </company_disableregistration_customer_account_createPost>
       </rewrite>
</global>

<frontend>
    <routers>
        <customer>
            <args>
                <modules>
                    <Company_DisableRegistration before="Mage_Customer">Company_DisableRegistration_Customer</Company_DisableRegistration>
                </modules>
            </args>
        </customer>
    </routers>
</frontend>
</config>

This is the first time I've attempted this sort of thing, so I'm not sure what the issue is or how to fix it.


texts: Sending order confirmation email in magento 2 programmatically

texts:
Normally I would do something like

<?php

use \Magento\Sales\Model\Order\Email\Sender\OrderSender;
use \Magento\Sales\Model\Order;

class MyClass
{
    private $orderSender;
    private $order;

    public function __construct(
        OrderSender $orderSender,
        Order $order
    ) {
        $this->orderSender = $orderSender;
        $this->order = $order;
    }

    public function sendEmail($import, $orderItems)
    {
        $this->order->load($orderId);
        $this->orderSender->send($order, true);
    }
}

I have noted $this->order->load() has been deprecated but $this->orderSender->send() expects \Magento\Sales\Model\Order

Therefore my question is how would I send order confirmation emails without using deprecated methods.

Also as a note "Asynchronous sending" for is disabled Sales Emails


texts: Magento1.9 - Model Cache argument error PHP7

texts:
I've been trying to get my Magento1.9.3.0 shop running on PHP7.
After applying the patch, I keep getting to error below and the website is not running anymore.
I did try to disable all the extensions but the problem persists.
Can someone point me where I can get more info about this? The below error is from the Magento log file.
No other info is present there.
 Warning: array_merge(): Argument #1 is not an array  in \app\code\core\Mage\Core\Model\App.php on line 411
 Recoverable Error: Argument 1 passed to Mage_Core_Model_Cache::__construct() must be of the type array, null given, called in app\code\core\Mage\Core\Model\Config.php on line 1357 and defined  in \app\code\core\Mage\Core\Model\Cache.php on line 117
 Recoverable Error: Argument 1 passed to Mage_Core_Model_Cache::_getBackendOptions() must be of the type array, null given, called in \app\code\core\Mage\Core\Model\Cache.php on line 132 and defined  in \app\code\core\Mage\Core\Model\Cache.php on line 154
 Recoverable Error: Argument 1 passed to Mage_Core_Model_Cache::_getFrontendOptions() must be of the type array, null given, called in \app\code\core\Mage\Core\Model\Cache.php on line 133 and defined  in \app\code\core\Mage\Core\Model\Cache.php on line 316
 Recoverable Error: Argument 1 passed to Mage_Core_Model_Store::setWebsite() must be an instance of Mage_Core_Model_Website, null given, called in \app\code\core\Mage\Core\Model\App.php on line 645 and defined  in \app\code\core\Mage\Core\Model\Store.php on line 453
 Recoverable Error: Argument 1 passed to Mage_Core_Model_Store_Group::setWebsite() must be an instance of Mage_Core_Model_Website, null given, called in \app\code\core\Mage\Core\Model\App.php on line 665 and defined  in \app\code\core\Mage\Core\Model\Store\Group.php on line 275


texts:
I have installed Magento 2.3.5-p1, and to test the default order/checkout. I added an item to the cart, however, the shopping cart button shows nothing but a blank popup as shown in the image below.

Moreover, if I go manually on the cart page, I can see the order, and when I click checkout I get nothing but a blank page. https://www.domain.com/checkout/#shipping
Logs:
-bash-4.2$ tail -40 connector.log
[2020-07-12 06:17:00] dotdigital.INFO: ERROR Creditmemo Order not found :2, quote id : 2, store id 1 [] []

Nginx error logs have nothing with regard to this. I have also given correct permission i.e.
find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} +
find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} +
chmod u+x bin/magento


texts: How to use USPS and UPS PHP API for getting tracking Information

texts: I want to find the shipping dates from USPS and UPS, How do I find it. Is there any API so I can pas a tracking number and returns me these details.


texts:
By default, Magento 2 doesn't allow you to give a product a negative quantity:

2 questions:

Why is this?
How can I change this core functionality and what other things might it affect?

I've already looked at where this limit is set, but I can't find it. If I look at module-catalog-inventory/view/adminhtml/ui_component/product_form.xml, I see some configuration about this field, but nowhere a limit set.


texts: How to add Varnish VCL rule in Magento Cloud?

texts:
I need to add a new VCL rule in my Magento Cloud 2.4, I'm using Fastly to have Varnish.
How could I customize my Varnish configurations in Magento?


texts: How to call customerData js in phtml on a specific page after page load

texts:
I need to call some js in a phtml file only on product details page. I need to check some customer attribute there and show a popup accordingly.

The issue I am facing is that somehow I am unable to get details from customerData on page load and it seems as if my js is loaded before the page loads.

I added setTimeout and after that everything works perfectly.

catalog_product_view.xml

<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceContainer name="before.body.end">
        <block name="trail.user.info" template="Test_TrialuserRestriction::trialuserinfo.phtml" />
    </referenceContainer>
</body>

trialuserinfo.phtml

<script type="text/javascript">
require(['jquery', 'domReady!', 'Magento_Customer/js/customer-data'], function($, domready, customerData){
    'use strict';

     // Uncommenting this not works for me
    // var customer = customerData.get('customer');
    // console.log(customer().firstname);

    //This works for me when I add timeout
    setTimeout(function(){
        var customer = customerData.get('customer');
        console.log(customer().firstname);
    }, 5000);

})

[Edit]

Also tried including the js file using require-config.js but still same.

Any help please.


texts: getCreatedAt() is not turning the date and time format

texts:
I want a date and time format as this

$aWebOrder->OrderCreationDate  = '2012-11-08 12:00:00';

what i am doing is this:

$aWebOrder->OrderCreationDate    = $order->getCreatedAt();

I have tried to fix this but no success i just get a weird value which looks like is stamping only the seconds. Anyone experienced same issue? Thank you


texts: Created a custom attribute via setup, but it only appears to new products

texts:
Hello i have the next setup code:

$installer = new Mage_Catalog_Model_Resource_Setup('core_setup');

$installer->addAttribute('catalog_product', 'shipping_city', array(
    'group'             => 'General',
    'type'              => Varien_Db_Ddl_Table::TYPE_VARCHAR,
    'backend'           => '',
    'frontend'          => '',
    'label'             => 'Envio p/ Cidade',
    'input'             => 'text',
    'class'             => '',
    'source'            => '',
    'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
    'visible'           => false,
    'required'          => false,
    'user_defined'      => true,
    'default'           => '',
    'searchable'        => true,
    'filterable'        => true,
    'comparable'        => false,
    'visible_on_front'  => true,
    'unique'            => false,
    'apply_to'          => 'simple,configurable,virtual',
    'is_configurable'   => false ));
$installer->endSetup();

Then i debug the products with de " and " event:

$product = $observer->getEvent()->getProduct();
Zend_Debug::dump($product->debug());die;

The problem is that if i try to save an already existing product, it gets the event and my debug brings not my attribute shipping_city. In a new product it appear in my debug but only in de save_after event, in the save_before doesnt appear aswell...

Any thoughts guys?


texts: Storing Menu Items causes time-outs and premature ending of headers

texts:
I am by all means a Magento beginner so please bear with me. A magento setup I am working on and took on from another developer is very slow. When I try to store Magento Mega Menu extension items I often get a premature end of header.

[Tue Sep 15 02:26:29 2015] [error] [client xx.xxx.xxx.xxx] client denied by server configuration: /home/user/prelaunch.domain.com/app/etc/local.xml

This seems to be a general security message that access to local.xml was denied. See https://stackoverflow.com/questions/4360574/magento-client-denied-by-server-configuration

[Tue Sep 15 02:33:35 2015] [error] [client xx.xxx.54.211] Premature end of script headers: index.php, referer: http://prelaunch.domain.com/index.php/megamenuadmin/adminhtml_megamenu/new/key/7cf1b32b81e34985672110ff82385750/
    [Tue Sep 15 02:52:11 2015] [error] [client xx.xxx.54.211] Premature end of script headers: index.php, referer: http://prelaunch.domain.com/index.php/megamenuadmin/adminhtml_megamenu/new/key/7cf1b32b81e34985672110ff82385750/

This is often when there is another error or lack of RAM and this .phprc

; {{{ The following lines were automatically added by DreamHost
extension=xcache.so
; }}} That's all from DreamHost
max_execution_time = 18000
max_input_time = 120
memory_limit = 512M

. I do have plenty of RAM.. Perhaps another configuration change needed?

I turned on error logging and this error came to my attention:

2015-09-15T09:52:42+00:00 ERR (3): Recoverable Error: Object of class

Mage_Catalog_Model_Resource_Product_Collection could not be converted to string  in

/home/user/prelaunch.domain.com/app/design/frontend/rwd/default/template/page/custom.phtml on line 20

On that line I have

echo '&emsp;' . 'getUrl() . '"' . $bold . '>' .  $_categoryChild->getName() . '' . $_categoryChildModel->getProductCollection() . '';

Working out what the data being echoed is at the moment. Full code here https://gist.github.com/jasperf/5ed4a6d835c876b1c0e8

Other notices/warnings I see are:

2015-09-15T09:56:22+00:00 ERR (3): Notice: Undefined variable: cookieParams  in
/home/user/prelaunch.domain.com/includes/src/__default.php on line 7693

referring to this block of code with some commented out data:

// session cookie params
/* $cookieParams = array(
        'lifetime' => $cookie->getLifetime(),
        'path'     => $cookie->getPath(),
        'domain'   => $cookie->getConfigDomain(),
        'secure'   => $cookie->isSecure(),
        'httponly' => $cookie->getHttponly()
    );
  */

        if (!$cookieParams['httponly']) {
            unset($cookieParams['httponly']);
            if (!$cookieParams['secure']) {
                unset($cookieParams['secure']);
                if (!$cookieParams['domain']) {
                    unset($cookieParams['domain']);
                }
            }
        }

and this warning

2015-09-15T09:56:22+00:00 ERR (3): Warning: call_user_func_array() expects parameter 2 to be array, null given  in

/home/user/prelaunch.domain.com/includes/src/__default.php on line 7707

referring to

call_user_func_array('session_set_cookie_params', $cookieParams);

Not sure if these errors are directly related to the issue at hand with the site being really slow in storing data and loading frontend, but would love to debug this error and or sort the notices and warnings and could use some help.


texts: How can I install Magento freshly without sample data?

texts:
I followed the steps here to install a fresh magento - Installing Magento With The Full Download: http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/installing_magento_via_shell_ssh

I created an empty database, then went to the web interface (http://www.mydomain.com/magentoroot/) for the initial setup.

During the setup process, after I input the database information, the next page always gave me an error like the following:

a:5:{i:0;s:221:"Error in file: "***/app/code/core/Mage/Catalog/sql/catalog_setup/install-1.6.0.0.php" - SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'catalog_product_entity' already exists";i:1;s:1036:"#0 ***/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
#1 ***/app/code/core/Mage/Core/Model/Resource/Setup.php(421): Mage_Core_Model_Resource_Setup->_modifyResourceDb('install', '', '1.6.0.0.8')
#2 ***/app/code/core/Mage/Core/Model/Resource/Setup.php(327): Mage_Core_Model_Resource_Setup->_installResourceDb('1.6.0.0.8')
#3 ***/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 ***/app/code/core/Mage/Core/Model/App.php(412): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 ***/app/code/core/Mage/Core/Model/App.php(338): Mage_Core_Model_App->_initModules()
#6 ***/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#7 ***/index.php(80): Mage::run('', 'store')
#8 {main}";s:3:"url";s:36:"/index.php/install/wizard/installDb/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}

If I imported the sample data before going to the web interface for the initial setup, there would be no error.

But I don't want the sample data, I just want a clean Magento. Below is some more information:

Trying to install 1.9.1 and 1.9.0.1
This is a dedicated server. I created a clean development account---neither Magento nor anything else installed there before.
Run on PHP 5.5 and MySQL 5.5
CGI/FastCGI


texts: How to determine when custom layout XML is being used

texts:
I'm working on a site running Magento CE 1.9.2.2. In the process of applying a new theme and as I'm clicking through the site, I'm running into an anomaly.

Every page on the site is using the new, correct theme however when I attempt to view a category page, it falls back to the base theme. The layout XML calls for the file 3columns.phtml so I then proceed to verify there is a 3columns.phtml file located in the template/page directory of my new theme. There is and all permissions are correct but it still won't load.

I then proceed to the Magento admin panel to see if that specific category or parent categories has a specified custom design - they don't. I then go through my page.xml and local.xml files for my theme, clear all cache, try new browsers and still the category page on my site loads the base theme.

So to take a more diagnostic approach, I would like to know what is happening that makes the theme fallback to Magento's base theme JUST FOR THE CATEGORY PAGE. Is there a way to log what is happening or not happening? I'm hoping to potentially catch the error or even the call for custom XML that I just can't seem to find.


texts: Grouped Product - force same quantity for all products

texts:
I am using Magento 2.3.
I have defined 4 different simple products with a price of 3.99 each.

I want to create a grouped product to allow the user to purchase 1 of each product, with a total price of 15.00 (i.e. 3.50 each). I don't want the user to edit the single quantities of each product so that I am sure he buys the same quantity of each product.

This same quantity must also be handled in the cart, so that the user cannot edit the quantities from the cart. Probably a grouped product is not the correct choice.

How can I define the product ?


texts: How to add markup percentage to cost price in Magento?

texts:
Our customer is looking to supply only costs prices and markup percentage for products on Magento. For example if the product cost price is £100 and markup is 20%. He would like to import £100 and 20% into Magento rather than £120.

Is it possible? If yes, how do we import markup in Magento import CSV?


texts: Magento Multi domain & country specific domain endings

texts:
I'm new on Magento and in this time I'm studying how build an e-commerce site with Magento CE.

I read some guides and wiki, but there is a thing I don't understand.
When we say that magento can manage the multi site, and multi domain in configuration we put the name and domain for all the stores domain.

I ask you, Can I create the structure of all magento sites in one magento installation based on different domain name?

For example:

site one: italian language and domain .it;
site two: english language and domain .uk;
site three: french language and domain .fr;
site .... etc.

Please answer my question it's very important for me and if possible please tell me the correct way to do it.


texts: No credit memo button available if the end price if 0

texts:
I'm trying to convert a magento instance from a b2c platform to a b2b platform.
I'm having issues with a particular part of magento.

When an order with the final price of 0 is issued, i have no credit memo button available.
The order is issued from the back-end and in the Payment Method Field the massage is

  No payment Methods.

This is actually logical because there is no amount of payment to be refunded. But the thing is that the product, although it does not cost the customer anything to buy, it actually leaves my stock.

The first question is, if this is a normal behavior for magento of is something broken on my end?

The end goal is not to refund my customer's money but to get the product in my stock again.

If this in normal for a magento instance, is there any other way to force a payment method when the order is issued so that the credit memo button will be available and later down the refund process, will let me get the product back in stock?


texts: Since Magento is planning on using Zend Framework 2, does that mean that all the current extensions that utilize ZF1 are going to break? From what I know about ZF2 and ZF1 is that they are very different in some ways. Especially with namespaces. Wouldn't this hurt them a little? Or, do you think they are anticipating that ZF2 will be a hit?


texts: Magento 2 Inline translate for script strings

texts:
I had spent more than 3 hours, but did not find solution.
If subscribe field on home page empty we will get JS message 'This is a required field.' How it may be translated by inline translate (using book on FE). When I inserted to the table TRANSLATE (by sql) string manually, it's working. So, how show book for inline translation for js popups errors?

I try use this in my subscribe.phtml, but this not work correctly (translated data added to DB, but original string "This is a required field." is empty. why?)

<script>
    require([
        'jquery',
        'jquery/ui',
        'mage/translate'
    ], function ($) {
        $(window).load(function () {
            $.mage.__(<?php echo json_encode(__('This is a required field.'))?>);
        });
    });
</script>


texts:
I'm importing configurable items with Magmi 0.7.23 and I want the price of the options to pull from the price of the underlying simple item.

In the Magmi documentation, they say

  Set price to 12 for option value L & 15 for option value XL for
  attribute size
  size::L:12;XL:15

I cannot build my spreadsheet this way without manually typing all these values in and for the same price, I can go into all the config items in the Magento admin and change the price manually.

1) Is there a way to "force" Magmi to use the price of the simple product?

2) I know there's an extension to use the underlying simple pricing, but I'd rather not use an extension, I would prefer building the product properly.

3) Can I write a script to loop through the configurable products and for each simple product grab it's price and set it as the price for that configuration?


texts: Magento 2 - Disable caching of prices on category view

texts:
I have a Magento 2.2.4 store where prices are automatically updated every 10 minutes from an stock management system. This works fine on product pages and any custom 'featured products' sections etc, but on category pages the prices are stuck and not updating.

Any way I can change this so the prices are not cached on category pages?


texts: Open a link(blog) with categories in Magento

texts:
I created a category with the name blog, now I want to open my Wordpress blog(Fishpig Wordpress extension) in Magento shop.

I tried to change the category url to the Wordpress blog url but it will just open a blank site instead of my blog.

I want: If I click on the category link , it will open my wordpress blog. What can I do?


texts: Magento 2 - Create customer programmatically from order

texts:
What is most optimized way to create customer programmatically from order ?
As i need to create customer for a guest user, what will be the better way of implementing it ?


texts:
After entering the all details in checkout page order review empty,

May I know the possibilities error?


texts: Data lost in Progress bar on moving to new tab in magento checkout

texts:
My requirement is to customize the Onepage checkout process and adding a new step between the “Payment Information” and “Review” Steps.

So I followed the following instruction.

http://www.fontis.com.au/blog/magento/adding-step-onepage-checkout

But after following this,  my new tab is displayed on One Step Checkout Page. But When i click to my custom tab, the Side Bar that display Checkout progress is not showing any information it showed previously.

Please Help me.


texts: Product Tags feature is not included in Magento 2

texts:
First, I'm confused whether this question will fit the requirements of a question expected on this site, if that's the case, please indicate that.

Just installed a fresh version of Magento 2 to get the feel of the new system. When going through modules, I noticed that the Product Tags feature is not there. Also, couldn't find any admin page for the same. Looked around the web but couldn't find any relevant information on that.

Has Magento dropped that feature in the new release, if yes, does anyone know why? That happened to be one of some awesome features of Magento right out-of-the-box.


texts:
after adding button on cart page have the error if i click on checkout page

Invalid method Mage_Core_Block_Template::isPopup(Array (
)
)
with trace :


texts: SUPEE8788 and Wishlist (view.phtml) file

texts:
When I was installing supee 8788, it threw a HUNK error on the following line

app/design/frontend/base/default/template/wishlist/view1.phtml

basically it was looking to modify view.phtml but in my case I for some reason had view1.phtml as a file.

I renamed the file as view.phtml and SUPEE 8788 installed perfectly

app/design/frontend/base/default/template/wishlist/view.phtml

Now, I am browsing frontend of magento ( especially wishlist section) and everything is working fine even when the file is called view.phtml. I want to make sure I am not missing anything, usually when you rename a file there expected some sort of error, but in my case everything is working properly.

Anyone could suggest what does this file do ? Maybe I am looking for errors in wrong areas of frontend website.


texts: Category tree by default folded out when adding new product

texts:
i am using magento 1.8.1 CE.

Is it possible to have the category tree expanded while when adding new products?
Now i have to fold it out myself every time untill the right category.

Thanks in adavance.


texts: 1.9 - Adding Image To Media Gallery Using Import Behavior

texts:
I'm currently writing a module which in its essence applies a pre-defined set of images to a product media gallery. It basically loops through a delimited list of filenames and uses addImageToMediaGallery to add the images to the product.

The code in the observer is:

        $ourProduct = $observer->getEvent()->getProduct();

        $importDir = Mage::getBaseDir('media') . DS . 'import';

        $tID =  $this->_getRequest()->getPost('template_id');
        $productsData = Mage::helper("imageimport")->getMedia($tID);

        $k=0;
        foreach($productsData as $fileName){

            $k++;
            $filePath = trim($importDir. DS . $fileName);
            if($fileName!="") {
                if (file_exists($filePath)) {
                    $ourProduct->addImageToMediaGallery($filePath, array('image', 'small_image', 'thumbnail'), false, true);
                    $ourProduct->save();
                    Mage::log('Adding image '. $filePath .' to ' . $ourProduct->getSku(), null, 'imageimport.log');

                } else {
                    Mage::log('File does NOT exist: ' . $filePath, null, 'imageimport.log');
                    echo "<br>";
                }
            }
        }

The problem I have with this is that it just creates another image in the media/catalog folder. This site has a buttload of products so having this feature will create needless duplicates of the same image.

So the question I'm posing is - within the confines of addImageToMediaGallery, am I able to simply reference an image instead of duplicating it?

If not, am I somehow able to utilize Magento's import dataflow behavior within an extension?

Hopefully I've titled this correctly - it's a strange question to ask.

Thanks


texts:
I'am using this code to get the shipping rates of the products, in the view.phtml, but I wish to only show the first item in the collection, not all of them. How could I achieve this?

The code: Link

<?php
if($_product->isSaleable())
{
$quote = Mage::getModel('sales/quote');
$quote->getShippingAddress()->setCountryId('*');
$quote->addProduct($_product);
$quote->getShippingAddress()->collectTotals();
$quote->getShippingAddress()->setCollectShippingRates(true);
$quote->getShippingAddress()->collectShippingRates();
$rates = $quote->getShippingAddress()->getShippingRatesCollection();

foreach ($rates as $rate)
{
echo $rate->getPrice();
}
}
?>


texts: magento multiple domain installation help

texts:
I really need some help in order to setup multiple domain with single installation setup.
I followed all i could find throughout web but yet it seems i am missing something.

This is regarding magento CE 2.1 clean install .using 2 domain with 2 store. I followed all the information i could find on the net .. i added needed code to index.php of root installation and htaccess . site works ok but when i use second domain , i get redirected back to my main domain


texts: magento 2.1.6 email template after save 404 not found

texts:
I am trying to create new email template with loading existing one By navigating

Marketing => Email Template => Add New Templates and load "new invoice" email

and without changes anything.After save i got 404 error: Page not found.

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


texts: order confirmation email format PDF magento 1.9

texts:
i need to send order confirmation By PDF format. Is there any way to do this.
thank you


texts: Updating product name/description (that has group prices) via model causes Integrity constraint violation (in catalog_product_entity_group_price)

texts:
I have this simple code, which tries to update the product's name & description like this:

$productID = Mage::getModel('catalog/product')
    ->getIdBySku($product->Sku);

if ($productID)
{
    $p = Mage::getModel('catalog/product');
    $p->load($productID);
    $p->setName($product->Name);
    $p->setDescription($product->Description);
    $p->save();
    $p = null;
}

This causes the following error to occur:

  SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
  '3596-0-1-0' for key 'CC12C83765B562314470A24F2BDD0F36', query was:
  INSERT INTO catalog_product_entity_group_price (entity_id,
  all_groups, customer_group_id, value, website_id) VALUES (?,
  ?, ?, ?, ?)

I've noticed this error only occurs IF the product has group_price set on it (even though I am not updating this).

Any ideas? I am on magento 1.9.x


texts: How to make Magento2 development environment fast?

texts:
I was trying to make changes on frontend but the site load very slow Whenever I disabled the cache. Please help, How could i make it faster like in 2-3 sec?

I even trying to setup docker environment with Magento2. But still very slow whenever i clear cache. I refer to this article setup https://www.magemodule.com/all-things-magento/magento-2-tutorials/docker-magento-2-development/

My laptop Spec are
1) window 10 Home
2) i7 , 8Gb Ram
3) SSD


texts: magento aws can t connect RDS database ipv 6 issue

texts:
I move to AWS our website on magento 1.9 . There is 3 differents sites.
My database is on RDS and run correctly .
When i connect a magento instance outside of aws EC2, for example on a OVh server , it works correctly.
But if i connect my EC2 magento 1.9 to my rds database i have this issue :

a:4:{i:0;s:119:"SQLSTATE[HY000] [2002] Failed to parse IPv6 address
"[XXXXXXXX.eu-west-3.rds.amazonaws.com:3306"";i:1;s:1606:"#0
/var/www/ami_prod_mg/lib/Zend/Db/Adapter/Pdo/Mysql.php(111):
Zend_Db_Adapter_Pdo_Abs$
#1 /var/www/ami_prod_mg/lib/Varien/Db/Adapter/Pdo/Mysql.php(396): Zend_Db_Adapter_Pdo_Mysql->_connect()
#2 /var/www/ami_prod_mg/lib/Zend/Db/Adapter/Abstract.php(460): Varien_Db_Adapter_Pdo_Mysql->_connect()
#3 /var/www/ami_prod_mg/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SET NAMES utf8', Array)
#4 /var/www/ami_prod_mg/lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('SET NAMES utf8', Array)
#5 /var/www/ami_prod_mg/app/code/core/Mage/Core/Model/Resource.php(179):
Varien_Db_Adapter_Pdo_Mysql->query('SET NAMES utf8')
#6 /var/www/ami_prod_mg/app/code/core/Mage/Core/Model/Resource.php(110):
Mage_Core_Model_Resource->_newConnection('pdo_mysql', Array)
#7 /var/www/ami_prod_mg/app/code/local/Amasty/Fpc/Model/Fpc/Front.php(999):
Mage_Core_Model_Resource->getConnection('core_read')
#8 /var/www/ami_prod_mg/app/code/local/Amasty/Fpc/Model/Fpc/Front.php(107):
Amasty_Fpc_Model_Fpc_Front->getDbConfig('web/url/use_sto...')
#9 /var/www/ami_prod_mg/app/code/core/Mage/Core/Model/Cache.php(703): Amasty_Fpc_Model_Fpc_Front->__construct()
#10 /var/www/ami_prod_mg/app/code/core/Mage/Core/Model/Cache.php(685): Mage_Core_Model_Cache->_getProcessor('Amasty_Fpc_Mode...')
#11 /var/www/ami_prod_mg/app/code/core/Mage/Core/Model/App.php(351): Mage_Core_Model_Cache->processRequest()
#12 /var/www/ami_prod_mg/app/Mage.php(686): Mage_Core_Model_App->run(Array)
#13 /var/www/ami_prod_mg/index.php(125): Mage::run('KEYYYYYYY', 'store')
#14 {main}";s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";}

I have nowhere on aws something activated for IPv6. it should work only with ipv4!
Thanks for your help
Cheers


texts: Dangerous URL blocked on Magento checkout by Kapersky Internet Security Scanner

texts:
Iam running a website on Magento 1.9.2.2 and I've spotted that checkout pages of this website are being blocked by Kaspersky Internet security Software.
This issue happened to myself and also was reported by several customers.

When going trough the checkout from Selecting delivery method to Payment method Iam kicked out by my Kaspersky Internet security with pop-up message "Dangerous URL blocked.
and Iam redirected back to shopping cart unable to complete check out.

When I turn off Kaspersky Internet security I can check out OK.

The Kaspersky does not give much details in report, here is all I get:
26.01.2016 11.43.55;Dangerous URL blocked;https://www.domain.com/checkout/onepage/saveShippingMethod/;https://www.domain.com/checkout/onepage/saveShippingMethod/;Heuristic Analysis;Google Chrome;01/26/2016 11:43:55

David


texts: FedEx Shipping that handles residential and commercial addresses

texts:
We have ported our site to Magento 2.1.2 and from my best understanding the Magento standard FedEx Shipping Method can not properly handle shipping to both residential and commercial addresses.

In the Magento back end you can select Residential or leave it blank (Commercial).  If you check it, it sets the Recipient.Address.Residential field.  When residential is set, FedEx returns HomeDelivery rates.  When it is not set, it returns Ground rates.  These rates are not the same.  Home Delivery costs more.  So if I don't check it I will undercharge residential customers and if I do check it I will over charge commercial customers.

Is there a work around ?
Is there a 3rd party shipping extension that handles this?

What the module should do is perform an address check, and based on what kind of address it is, show Commercial or Residential rates.
The way the current module handles also has problems because there is only one "Free Shipping Method" so you can not choose Ground and Home Delivery.

I see that this question was asked in Dec-2016 (about Magento 1.9) but no one answered.


texts: Magento not showing the right version in footer

texts:
My magento installation is showing ver. 1.7.0.2 in the footer, but /downloader is showing:
Mage_All_Latest 1.8.0.0 (stable)

I have cleared var/cache, var/session and var/tmp but it's still showing 1.7.0.2.
How can I confirm which one of them that is showing the wrong version and how do I solve it if it isn't upgraded?


texts: How to get custom attribute value of ordered product?

texts:
I have a Custom attribute name ( product string ) on Product in which i have save a string i want to get that custom attribute value for ordered product.
I have getting the ordered product by this code
 $orderId = 32;
 $order = $block->getOrderData($orderId);
 foreach ($order->getAllVisibleItems() as $_item) {
 echo $_item->getId();
    echo $_item->getSku();
    echo $_item->getName();
    echo $_item->getProductType();
    echo $_item->getQtyOrdered();
 echo "<pre>";print_r($_item->debug());
}


texts: I want to export product from magento in xml file. I don't know how to write a xml file using magento lib. Please assist me for this.


texts: Magento 2 - HTML on the tag Comment in the custom module

texts: How to add html on the tag comment in my module like this image?


texts: How to disable the categories sidebar in the product detail page in Magento 2?

texts: Is there an option in the admin area of Magento 2, to disable the sidebar on the left with the list of categories in the product detail page of the frontstore?


texts: Collection getconnection Convert to multilevel query

texts:
Right now I have this code
public static $table = 'customer_entity';
public static $leftJoinTable = 'customer_address_entity';

public function afterSearch($intercepter, $collection)
{
    if ($collection->getMainTable() === $collection->getConnection()->getTableName(self::$table)) {
        $leftJoinTableName = $collection->getConnection()->getTableName(self::$leftJoinTable);

        $collection
            ->getSelect()
            ->joinLeft(
                ['co'=>$leftJoinTableName],
                "co.entity_id = main_table.default_shipping",
                [
                    'shipping_city' => 'co.city'
                ]
            );

        $where = $collection->getSelect()->getPart(\Magento\Framework\DB\Select::WHERE);
        $collection->getSelect()->setPart(\Magento\Framework\DB\Select::WHERE, $where);
        echo $collection->getSelect()->__toString();die;
    }
    return $collection;
}

And in turn it produces this query when I do a filter
SELECT `main_table`.*, `co`.`city` AS `shipping_city` FROM `customer_entity` AS `main_table`
LEFT JOIN `customer_address_entity` AS `co` ON co.entity_id = main_table.default_shipping
WHERE `shipping_city` LIKE '%HIGHBRIDGE%'

But this produces an error as shipping_city is unknown. But is there a way so that this code will produce an output something like below
select * from (SELECT `main_table`.*, `co`.`city` AS `shipping_city` FROM `customer_entity` AS `main_table`
LEFT JOIN `customer_address_entity` AS `co` ON co.entity_id = main_table.default_shipping ) as a WHERE (`shipping_city` LIKE '%HIGHBRIDGE%')

So basically it just wraps the first query and then do a second query. The top level query is where the WHERE filter be added. If this is achieved it will also solve the unknown column error. Is there a way to do that?


texts:
I am getting following error on Magento 2.2 after upgrading from 2.1.9

1 exception(s):
Exception #0 (InvalidArgumentException): Unable to unserialise value.

The string on which this error is occurring is as below

a:6:{s:4:"type";s:44:"Amasty\Xlanding\Model\Rule\Condition\Combine";s:9:"attribute";N;s:8:"operator";N;s:5:"value";s:1:"1";s:18:"is_value_processed";N;s:10:"aggregator";s:3:"all";}

Any help will be appreciated!


texts: Missing options for some attributes like 'SKU' or 'NAME'

texts:
I found that sku is not being displayed in product listing nor product view page. I checked and found that the template is checking whether to display the attribute by using:

$_product->getResource()->getAttribute('sku')->getUsedInProductListing()

Which results with null for sku but not for, lets say, description. I found out that more attributes have very short list of options (name also has this problem).

I have dumped the $_data in Varien_Object and for sku it is suprisingly short:

array (
  'attribute_id' => '68',
  'entity_type_id' => '4',
  'attribute_code' => 'sku',
  'attribute_model' => 'catalog/resource_eav_attribute',
  'backend_model' => 'catalog/product_attribute_backend_sku',
  'backend_type' => 'static',
  'backend_table' => NULL,
  'frontend_model' => NULL,
  'frontend_input' => 'text',
  'frontend_label' => 'SKU',
  'frontend_class' => NULL,
  'source_model' => NULL,
  'is_required' => '1',
  'is_user_defined' => '0',
  'default_value' => NULL,
  'is_unique' => '1',
  'note' => NULL,
  'store_label' => 'Product code',
)

However, the same dump for description attribute has much more options:

array (
  'attribute_id' => '66',
  'entity_type_id' => '4',
  'attribute_code' => 'description',
  'attribute_model' => 'catalog/resource_eav_attribute',
  'backend_model' => NULL,
  'backend_type' => 'text',
  'backend_table' => NULL,
  'frontend_model' => NULL,
  'frontend_input' => 'textarea',
  'frontend_label' => 'Description',
  'frontend_class' => NULL,
  'source_model' => NULL,
  'is_required' => '0',
  'is_user_defined' => '0',
  'default_value' => NULL,
  'is_unique' => '0',
  'note' => NULL,
  'frontend_input_renderer' => NULL,
  'is_global' => '0',
  'is_visible' => '1',
  'is_searchable' => '1',
  'is_filterable' => '0',
  'is_comparable' => '1',
  'is_visible_on_front' => '0',
  'is_html_allowed_on_front' => '1',
  'is_used_for_price_rules' => '0',
  'is_filterable_in_search' => '0',
  'used_in_product_listing' => '0',
  'used_for_sort_by' => '0',
  'is_configurable' => '1',
  'apply_to' => NULL,
  'is_visible_in_advanced_search' => '0',
  'position' => '0',
  'is_wysiwyg_enabled' => '1',
  'is_used_for_promo_rules' => '0',
  'entity_type' =>
  Mage_Eav_Model_Entity_Type::__set_state(array(
     '_attributes' => NULL,
     '_attributesBySet' =>
    array (
    ),
     '_sets' => NULL,
     '_eventPrefix' => 'core_abstract',
     '_eventObject' => 'object',
     '_resourceName' => 'eav/entity_type',
     '_resource' => NULL,
     '_resourceCollectionName' => 'eav/entity_type_collection',
     '_cacheTag' => false,
     '_dataSaveAllowed' => true,
     '_isObjectNew' => NULL,
     '_data' =>
    array (
      'entity_type_id' => '4',
      'entity_type_code' => 'catalog_product',
      'entity_model' => 'catalog/product',
      'attribute_model' => 'catalog/resource_eav_attribute',
      'entity_table' => 'catalog/product',
      'value_table_prefix' => NULL,
      'entity_id_field' => NULL,
      'is_data_sharing' => '1',
      'data_sharing_key' => 'default',
      'default_attribute_set_id' => '4',
      'increment_model' => NULL,
      'increment_per_store' => '0',
      'increment_pad_length' => '8',
      'increment_pad_char' => '0',
      'additional_attribute_table' => 'catalog/eav_attribute',
      'entity_attribute_collection' => 'catalog/product_attribute_collection',
    ),
     '_hasDataChanges' => true,
     '_origData' => NULL,
     '_idFieldName' => 'entity_type_id',
     '_isDeleted' => false,
     '_oldFieldsMap' =>
    array (
    ),
     '_syncFieldsMap' =>
    array (
    ),
  )),
)

Any ideas why this happens? I am using Magento 1.9.1.0


texts:
We're working on several Magento projects with CE 1.9.X and we're looking for a testing framework to do unit and functional testing. I've done a little research and I've seen posts talking about Magento 1.X problems with unit testing due to its design.

So I'm not sure if unit testing it's possible on Magento 1.X projects. If unit testing it's possible, can you suggest me a framework you use? I'm also interested in integration testing and maybe functional testing. So far, I've seen this options:

Magento TAF (marked as depreacted..)
Magento Testing Framework (updated but seems to work only with Magento 2)


texts: Magento2 - How to install extension when it contain composer.json file

texts: I have an extension It contain composer.json file. How should I install this extension. I am using Magento2.3.3 and Window 10 OS. If there is any command to install. Please let me know.


texts: Upload and Browse button missing in CMS WYSIWYG on Magento v1.9.21

texts:
I have an issue where you upload an image via the CMS Pages and the Browse and Upload buttons are missing.

I have tried following without any success ;

added back in the SWF files that are removed by patch 8788
changed the folder permissions to 777
clearing Magento cache and reindexed
Tried in another browser and Incognito

Any ideas that I have not thought of?


texts: export csv file from magento 1.9 to import product csv in magento 2.3.0

texts:
I have a task to import products from m1 to m2.

I having the csv file with products(from magento 1 export) at the moment. When i try to "Check Data" on import page - it always loading.

How can i import products from m1 to m2 via csv file or another approach except data-migration-tool.

P.S magento 1 -  1.9.3.1, magento 2 - 2.3.0


texts: M2.2.4 - Category page listing all products (when products per page set to 24)

texts:
I am experiencing an odd and troubling problem.

On our production environment, all product pages are listing all products on the single page, in which some pages will have north of 2-300 products, which obviously causes incredible load times for the page and the like (even with lazy loading on the images and such).

The peculiar part is with the exact same settings and environment placed on our staging server, it works as expected, and has the paging with only 24 products per page. That is where I am lost as to why/how this is happening.

I have tried all the common methods of having this corrected:

Configuration > Catalog > Catalog > Storefront
---> Setting `Products per Page on Grid Default Value`
     to the desired value (which is a value given in
     `Products per Page on Grid Allowed Values`

---> Allow All Products per Page set to `No`

I also have tried using XML updates within the categories design themselves, using:

<referenceContainer name="content">
   <referenceBlock name="product_list_toolbar">
      <action method="setDefaultGridPerPage">
             <argument name="limit" xsi:type="string">24</argument>
      </action>
</referenceBlock>

Again, all these changes and testing them with other numbers work on the staging environment but alas on the production, it continues to always stay displaying all products on a single page.

I assume somehow, somewhere be it with messing with different extensions or what, something got hardcoded somewhere or something, but I am at a loss.

Any ideas??


texts: How to show all the products on search result page in Magento 2?

texts:
I'm getting strange results from the search engine. For instance on "sk4072" if you search "4072" nothing comes up.

Thankyou


texts: I'm searching for a way to add a minimum shipping fee to a Shopping Cart Price Rule. I've set up free shipping for most items in the store. For heavy and truck freight items, they are excluded. I have the rule working just as I want. However, when all items in the cart qualify for free shipping, I want there to be a $5 minimum charge for handling. I have not yet found a solution for this. Discounts yes, adding a fee through the rules, no. I have searched for solutions and for extensions to do this but come up empty. Any help will be greatly appreciated.


texts: Magento 2 add telephone number in to the customer account creation form

texts:
I want to add telephone number into customer registration form. I get the telephone number field out of if($this->getShowAddressFields()) section and put it outside. Then the field displayed in front end form. But after I submit to create the customer telephone number it is not saving.

Anyone can give me a suggestion?


texts:
Custom data saved in sales_order table but not saved in sales_order_grid table in magento 2

  etc/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">
    <virtualType name="Magento\Sales\Model\ResourceModel\Order\Grid" type="Magento\Sales\Model\ResourceModel\Grid">
        <arguments>
            <argument name="columns" xsi:type="array">
                <item name="bootsgrid_order_custom_attributes" xsi:type="string">sales_order.bootsgrid_order_custom_attributes</item>
            </argument>
        </arguments>
    </virtualType>
</config>

sales_order table

sales_order_grid table


texts: Magento 1.9 - problem with librabries conflict - nouislider.js and prototype.js

texts:
I have in code following libraries:

<script type="text/javascript" src="http://localhost/js/lib/jquery/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="http://localhost/js/lib/jquery/noconflict.js"></script>
<script type="text/javascript" src="http://localhost/js/prototype/prototype.js"></script>
<script type="text/javascript" src="http://localhost/js/mage/cookies.js"></script>
<script type="text/javascript" src="http://localhost/js/mage/translate.js"></script>
<script type="text/javascript" src="http://localhost/js/lib/lodash/lodash.min.js"></script>
<script type="text/javascript" src="http://localhost/js/lib/momentjs/moment.min.js"></script>
<script type="text/javascript" src="http://localhost/js/lib/slick/slick.min.js"></script>
<script type="text/javascript" src="http://localhost/js/lib/noUislider/nouislider.js"></script>

And I have a problem with a slider on mobiles. On PC's it works well but on mobiles, touching doesn't work (on the phone and on PC dev tools also). When I touch some point on slider button moves to this position but I get the error message (one time) in the console:

  Uncaught TypeError: this.each is not a function
      at TouchList.findAll (prototype.js:883)
      at fixEvent (nouislider.js:1473)
      at HTMLDivElement.method (nouislider.js:1387)

When I try to drag button and slide it to side, button doesn't move but in consolthe e I get error above but two times (same error).

It looks like the problem is somewhere libraries nouislider.js and prototype.js. If I disable prototype.js for moment, slider working fine. Because prototype.js is necessary in project to other feature I need to solve this problem. Any idea how to do it?

I am not best in JS but job must be done so I really need help.

Thanks in advance.


texts:
I've created a button in my Magento 1.9 admin that when pressed, will submit the order to our printing company (once complete). Here's how it looks at the moment:

<?php
include_once Mage::getModuleDir('controllers', 'Mage_Adminhtml') . DS . 'Sales' . DS . 'OrderController.php';

class MG_Dropship_Adminhtml_Sales_OrderController extends Mage_Adminhtml_Sales_OrderController {

public function dropshipAction() {

  $orderID = $this->getRequest()->getParam('order_id');
  $order = Mage::getModel("sales/order")->load($orderID);
  $customer = $order->getShippingAddress()->getData();
  $items = array();

  $orderItems = $order->getAllVisibleItems();
  foreach ($orderItems as $item) {

    var_dump($item->sku);

At this point, it does provide me with the correct SKU. The SKU returned is for a simple product (that is linked to a configurable product). Now I'm trying to load the product model of this SKU:

$product = Mage::getModel('catalog/product');
$product->load($product->getIdBySku($item->sku));

var_dump($product);

This returns the following:

object(Mage_Catalog_Model_Product)#358 (32) {
  ["_cacheTag":protected]=>
  string(15) "catalog_product"
  ["_eventPrefix":protected]=>
  string(15) "catalog_product"
  ["_eventObject":protected]=>
  string(7) "product"
  ["_canAffectOptions":protected]=>
  bool(false)
  ["_typeInstance":protected]=>

I won't bother listing it all, but everything I'm trying to gain access to seems to be protected. Do I need to somehow allow access to the product model in my module?

UPDATE: I'm now able to access data such as $product->getName() - but other data I need access to includes $product->getColor, $product->getSize() (these are custom attributes, but just return NULL).


texts: Magento 2: How to use 2 minicarts with same knockout template?

texts:
In my site are use 2 minicarts (in header and sidebar) with same knockout template:

app/design/frontend/Vendor/Theme/Magento_Checkout/web/template/minicart/content.html

I want to adjust small fixes, for sidebar minicart (only remove one button), and I don't want to create another one template.

How I can to check in knockout that it's exactly sidebar?

Something like that:

<button data-bind="visible: isSidebar()" />

It is possible? May I get root element in knockout template? If yes - I could to check sidebar html class.


texts:
I am extending magento 1 category edit page, adding tab and fields. What is the best approach for this?
Using built in EAV system or save the values in a custom table?


texts: Show/Hide the Configuration grid/list/field in magento 2

texts:
I am trying to show/hide the password text configuration filed based on the dropdown field and it's working fine & the code as follow.
 <depends>
                            <field id="integration">1</field>
                        </depends>

It will work based on depends property right.

   <group id="general" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
      <field id="integration" translate="label" type="select" sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1">
         Integration Type
         <source_model>TinyXSolution\Integration\Model\Config\Source\Integration</source_model>
         <comment>Please Select Integration Type</comment>
      </field>
      <field id="custom_pwd" translate="label" type="obscure" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1">
         Password
         <backend_model>Magento\Config\Model\Config\Backend\Encrypted</backend_model>
         <depends>
            <field id="integration">1</field>
         </depends>
      </field>
   </group>

The same way I tried to show/hide the grid/list/field based on dropdown field which is in the custom_general section & the code as follow.

   <group id="custom_customer_api" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
      <field id="custom_customer_general" translate="label" type="obscure" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1">
         Custom Configu.
         <frontend_model>TinyXSolution\Integration\Block\Adminhtml\Form\Field\Customer\Customerheader</frontend_model>
         <backend_model>Magento\Config\Model\Config\Backend\Serialized\ArraySerialized</backend_model>
         <depends>
            <field id="custom_general/general/integration" separator=",">0,1</field>
         </depends>
      </field>
   </group>

But it is still showing. for this I tried below condition.
<depends>
                <field id="custom_general/general/integration" separator=",">0,1</field>
             </depends>

Grid/List/field will show when 0 or 1 right. But I have selected the 2 still the grid/list/field showing.
Can you please help on this i.e where I went wrong?


texts:
While installing new version of SUPEE 9767 v2 patch I receive the below error

patching file app/code/core/Mage/Checkout/etc/system.xml
patching file app/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage.php
patching file app/code/core/Mage/Core/Controller/Front/Action.php
patching file app/code/core/Mage/Core/Controller/Request/Http.php
can't find file to patch at input line 433
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git app/code/core/Mage/Core/Model/File/Validator/Image.php app/code/core/Mage/Core/Model/File/Validator/Image.php
|index 7f7b9d0..8618bca 100644
|--- app/code/core/Mage/Core/Model/File/Validator/Image.php
|+++ app/code/core/Mage/Core/Model/File/Validator/Image.php
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
2 out of 2 hunks ignored
patching file app/code/core/Mage/Core/etc/config.xml
patching file app/code/core/Mage/Core/etc/system.xml
patching file app/code/core/Mage/Core/sql/core_setup/upgrade-1.6.0.2.1.1-1.6.0.2.1.2.php
patching file app/code/core/Mage/Customer/Model/Session.php
patching file app/code/core/Mage/Customer/controllers/AccountController.php
Hunk #1 FAILED at 340.
Hunk #2 FAILED at 607.
2 out of 2 hunks FAILED -- saving rejects to file app/code/core/Mage/Customer/controllers/AccountController.php.rej
patching file app/code/core/Mage/Dataflow/Model/Convert/Adapter/Zend/Cache.php
patching file app/code/core/Mage/Dataflow/Model/Convert/Container/Abstract.php
patching file app/code/core/Mage/Dataflow/Model/Convert/Parser/Csv.php
patching file app/code/core/Mage/Dataflow/Model/Convert/Parser/Xml/Excel.php
patching file app/code/core/Mage/ImportExport/Model/Import/Uploader.php
patching file app/code/core/Mage/Sales/Model/Quote/Item.php
Hunk #1 FAILED at 502.
1 out of 1 hunk FAILED -- saving rejects to file app/code/core/Mage/Sales/Model/Quote/Item.php.rej
patching file app/code/core/Mage/Widget/Model/Widget/Instance.php
patching file app/code/core/Mage/XmlConnect/Helper/Image.php
patching file app/code/core/Mage/XmlConnect/controllers/Adminhtml/MobileController.php
patching file app/design/adminhtml/default/default/layout/main.xml
patching file app/design/adminhtml/default/default/template/notification/formkey.phtml
patching file app/design/adminhtml/default/default/template/notification/symlink.phtml
patching file app/design/adminhtml/default/default/template/oauth/authorize/head-simple.phtml


texts: After payment successful on paypal show error

texts:
After complete transaction when redirect on site then show error like this

How I can remove this error


texts: Get product details by product id in Magento 2

texts:
Hi i have a product id 22 . I want to get the product details by this id . in this page

  default/Magento_Catalog/templates/category/Products.phtml

Example :

$product=get_product_details(22);

I want to create an object `$products using this id so i can call the built in functions like

$product->getProductUrl()
$product->getName()

Is there any built in function available ?


texts: $product->getPrice() override for configurable products

texts:
I would like to recode $product->getPrice() of a simple product, in case it's based on a configurable product, to get its attribute setup and prices and add to base price.

I thought about maintaining the above invocation so same method call is used for simple products not based on configurable too.

What would be a good way to do that regarding files to change ?

Thanks.


texts:
Is there any way to override core XML file like this
vendor/magento/zendframework1/library/Zend/Locale/Data/fa.xml

at this file, we have some hidden characters that should be removed or replaced because that, I need a way to override the XML file or help me to find a class that loaded fa.xml


texts: Magento soap api version1 get list of closed orders

texts:
We would like to get the list of closed orders by passing from and to date filter in magento soap api.

Help me great.

Thanks


texts: Unable to change product status - for "All store views" (Global Store)

texts:
I am in need to disable a list of SKUs. For that I have created a console command, read the CSV and then setting product as disabled.
I am facing an issue that I am not able to make product disabled for global store.
Whereas my code is working fine for specific store only i.e. if I switch store, product status is disabled else it is enables.
    \Magento\Catalog\Model\ProductRepository $productRepository,

             try {
                    $product = $this->_productRepository->get(
                        $sku[0],
                        true/* edit mode */,
                        0/* global store*/,
                        true/* force reload*/
                    );
                    //$product = $this->_productRepository->get($sku[0]);
                    $product->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_DISABLED);
                    $this->_productRepository->save($product);
                } catch (\Exception $exception) {
                    echo $exception->getMessage();exit;
                }

Any idea what I am doing wrong ?
[Edit]
I figured out the cause - in configuration for status attribute I am having scope set to website.
If I set it to global and then try it is saving for default value as well.
But as I can not change the scope of attribute on production site, any idea how I can save it for default value as well even if attribute has "website" level scope.
Thanks.


texts:
In My website checkout tax price not included but it showing correctly in shopping cart page

Shopping Cart:

Checkout


texts: don't set value to field of \Magento\Framework\Data\Form

texts:
i try set value to custom file

$fieldset->addField('custom_id', 'hidden', ['name' => 'custom_id', 'value' => '112' ]);

in frontend input it not value. what wrong?


texts: Percentage Tier Pricing for Configurable Products

texts:
I'm setting up a store to sell photographs that the user uploads.  They click on the product page and select a size (price increases as the size does) and a paper type.  I would like to add tier pricing so that if the user orders 10 they would get 10% off etc. but can't find a way that Magento will discount a percentage from each of the print size options.

Can anyone help?

Thanks


texts: Magento 2 Rest API return multiple interface class

texts:
On the Magento 2, I want to custom return object on my custom rest API, I have code like this on the Hz\Clients\Api\TransactionInterface.php

<?php

namespace Hz\Clients\Api;

interface TransactionInterface
{

    /**
     * Get List Data by Client Id
     *
     * @param string $clientId
     *
     * @return \Hz\Clients\Api\Data\FirstOptionDataInterface|\Hz\Clients\Api\Data\SecondOptionDataInterface
     * @throws \Magento\Framework\Exception\NoSuchEntityException
     * @throws \Magento\Framework\Exception\InputException
     */
    public function getTransaction($clientId);
}

here is my FirstOptionDataInterface.php :

<?php

namespace Hz\Clients\Api\Data;

interface FirstOptionDataInterface
{
    const INFO_MESSAGE = "info_message";

    /**
     * @param mixed $infoMessage
     * @return $this
     */
    public function setInfoMessage($infoMessage);

    /**
     * @return mixed
     */
    public function getInfoMessage();

}

and this is for SecondOptionDataInterface.php :

<?php

namespace Hz\Clients\Api\Data;

interface SecondOptionDataInterface
{
    const TRANSACTIONS = "transactions";

    /**
     * @param mixed $transactions
     * @return $this
     */
    public function setTransactions($transactions);

    /**
     * @return mixed
     */
    public function getTransactions();

}

so when on the rest API method I select the first option then it will return \Hz\Clients\Api\Data\FirstOptionDataInterface object and if I select the second option then it will return \Hz\Clients\Api\Data\SecondOptionDataInterface, is it possible to do that in rest API Magento 2?

  note: I cannot use throw exception for it since the format of throw
  exception output is different from my requirement.


texts: How to combine Register and Login forms (Magento 1.9)

texts:
How to combine Register and Login form (Mangeto 1.9)

I am trying to merge fields of Registration form

from the template

persistent/customer/form/register.phtml

to the template

persistent/customer/form/login.phtml

But the copid fields (from register.phtml) are not getting displayed in login.phtml


texts: move prices block to another block by layout.xml

texts:
How can I move price block in catalog category?

I tried it using this code:

<move element="product.price.final" destination="product.info.main" before="-">

in catalog_category_view.xml but nothing does not changed


texts: Magento - SQLSTATE[23000]: 1452 Cannot add or update a child row: a foreign key constraint fails

texts:
I get the following error when I try to reindex product Flat Data.
This error happened after I deleted all products using SQL query.

 Exception message: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`development2`.`#sql-197b_2aaac`, CONSTRAINT `FK_CAT_PRD_FLAT_6_ENTT_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON U)


texts:
Currently on my site when I visit a top level category from the sidebar the URL is: http://example.com/top-level-category

Then when I click a sub-category in the resulting sidebar the URL is: http://example.com/top-level-category?cat=123.

I would expect the URL to be the URL of the sub-category, i.e.: http://example.com/top-level-category/sub-category

Is there a way to get the category sidebar to use the SEO friendly-url instead of cat=123 for subcategories?


texts: How to get tracking id in USPS shipping method

texts:
I have integrated USPS in my website and able to order with this method successfully. Order is visible in admin part but I did not get any tracking id with this order to track USPS shipping.

Can you please help me out to get tracking id.


texts:
I have no clue what is the purpose of time_condition field in admin page.

Class File:

Mage_Adminhtml_Block_System_Config_Form_Field_Import ... {
    public function getElementHtml() {
        ...
        $('time_condition').value = '_' + conditionNameElement.value + '/' + Math.random();
        ...
    }
}

I tried to search all *.php, *.phtml, *.js files for this string "time_condition", the result seems no server or client codes using this field. Is this field useful?


texts: how to get cms block value from display settings of a category

texts:
in the manage category page I have cms block which I want to update it programatically
I guess that the attribute id to set for this is landing_page

unfortunatley I don't know the function to get the landing page or get the cms block value

for example in this case Category Listing
how can I get that by collection?

$category = Mage::getModel('catalog/category')->load(17048);

also

echo $cat->getAttributeText('landing_page');

it doesn't show me anything

fortunately I did this!:

echo $cat->getlanding_page();

fortunately I solved part of the problem:

<?php include '/var/www/lenmar/mage_classes.php';?>
<?php $_helper = Mage::helper('catalog/category');
$cat = Mage::getModel('catalog/category')->load(17048);
$cat->setlanding_page('11');
$cat->save();
?>

so I can set it and show that but how I can get the value for that? I mean instead of Id I want to get Category Listing value


texts: Get product inventory before and after saving

texts:
I want to log each time someone changes the qty of in stock products in magento. I hooked into the catalog_product_prepare_save event, but can't seem to figure out how to access the values after save (for the inventory).
Currently in my controller I have:

public function logProductSave(Varien_Event_Observer $observer)
{
    //info about logged in admin user
    Mage::log("reached logProductSave");
    $userArray = Mage::getSingleton('admin/session')->getData();
    $user = Mage::getSingleton('admin/session');
    $userId = $user->getUser()->getUserId();
    $userEmail = $user->getUser()->getEmail();
    $userFirstname = $user->getUser()->getFirstname();
    $userLastname = $user->getUser()->getLastname();
    $userUsername = $user->getUser()->getUsername();
    $userPassword = $user->getUser()->getPassword();
    //Product changes
    $product = $observer->getProduct();
    if ($product->hasDataChanges())
    {
    $newValues = array_diff($product->getData(), $product->getOrigData());
    $oldValues = array_diff($product->getOrigData(), $product->getData());
    $added = array_diff_key($product->getData(), $product->getOrigData());
    $unset = array_diff_key($product->getOrigData(), $product->getData());

    //before save qty
    $qtyStock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product)->getQty();

    //after save qty

    return $this;
}


texts:
TL;DR: Is there any way in Magento 2 to make the method getTable from a resource collection model to return the same table name for 2 different parameters?

Detailed Explanation
I will start with an example from Magento 1.
Let's say I have a table called module_entiti1_entity2.
I needed to declare this table in my config.xml like this

<module_resource>
    <class>....</class>
    <entities>
         <entity1_entity2>

module_entiti1_entity2

         </entity1_entity2>
    </entities>
</module_resource>

Then I can get the table name from a resource collection model for example like this:

$collection->getTable('module/entity1_entity2');

But if I want I can use multiple aliases for the same table.
If my config.xml section becomes

<module_resource>
    <class>....</class>
    <entities>
         <entity1_entity2>

module_entiti1_entity2

         </entity1_entity2>
         <entity2_entity1>

module_entiti1_entity2

         </entity2_entity1>
    </entities>
</module_resource>

I can retrieve my table in 2 ways:

$collection->getTable('module/entity1_entity2');
$collection->getTable('module/entity2_entity1');

In Magento 2 there is no more table declaration like above.
I can get my table name like this $collection->getTable('module_entity1_entity2').
Is there a way to tell magento that for the parameter module_entity2_entity1 to return the same table name as for the parameter module_entity1_entity2?


texts: What are the ways one can get products to show up in a certain order on website without changing SKU numbers?

texts:
Example:
Product A:  SKU# 15
Product B:  SKU# 18

Now on the front end of our website, Product A would show up first because the SKU number is lower than Product B.

Is there any way to get Product B to show up first without making its SKU number lower than Product A's?


texts:
The official study guide for the Magento Frontend Developer Certification states that the exam is based on Magento CE 1.7, and that the questions "test skills that apply to both CE 1.7 and EE 1.12". These versions are obviously getting pretty old now and there have been changes to the Magento theme layer in the newer versions. Improved theme fallback and RWD theme for example.

The study guide is copyright 2013 x.commerce so is clearly a bit out of date. Does anyone who has sat the exam recently know if it has been updated to include questions related to CE 1.9 and EE 1.14.


texts: .less file not complied in .css file in magneto2

texts:
File Path In App Folder

  /app/design/frontend/Vendor/Theme/web/css/local-l.less

File Path Must Be In Pub Folder

  /pub/static/frontend/Vendor/Theme/en_US/css/local-l.min.css

But local-l.min.css Not Generating In Pub Folder.

Also Error showing on browser

  (index):1 Refused to apply style from 'local-l.min.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.


texts: How I can change class in messages in Magento 2?

texts:
I want to replace magento default alerts to bootstrap alerts.

I try add template for messages in design/frontend/templates/messages.phtml. Buy I cannot change class of type message from message-error to message-danger.

How I can change message class in all system in frontend?


texts: Magento Catalosearch not working properly

texts:
I have Magento1.9 store and have above 30000 products, all products was coming on frontend when searching by keyword, but suddenly for some specific keyword catalog search return "No products matching selection", I reindexed all indexes but still products are not showing on search page.

When I save any product from admin panel (for matching keyword) then it started to come in search result. But when I save product (for matching keyword) from frontend using product object like

Mage::getModel('catalog/product')->load(13500)->save()

then that product should be display on search page, but this is not happening.

I didn't get what's wrong with the magento products.

Please suggest.


texts: Magento 1.8.1 shipping and payment method

texts:
I just upgrade Magento to 1.8.1 version, and have problem with my shipping and payment method. In my previous 1.6.2 version i used to use this modules:

CashOnDelivery
Auctionmaid_Matrxrate
Mymonki_Ship2pay

On 1.8.1 the only working ext is Auctionmaid_Matrxrate.

Is there any modules who can do that:

Shipping:

Multiple Table Rates
Store pickup
Free delivery

Payment:

Bank transfer
No option (if someone want to pick the product from store)
Cash on delivery

Now the only shipping and payment things I have are: multi table rate, free delivery and bank transfer


texts: How to Customize Breadcrumbs in Magento2?

texts:
I want to customize Magento\Theme\Block\Html\Breadcrumbs class in magento 2.
How can i change some text and style of breadcrumbs with custom module?