texts: Unable to create plugin for Magento\Framework\App\Request\Http

texts:
I am trying to create a plugin for Magento\Framework\App\Request\Http class for setPathInfo(). However I am unable to do so. I am getting error

  [InvalidArgumentException]
      There are no commands defined in the "cache" namespace

However I am able to create plugin for other classes.
There is no error in module, rest of the code is working fine.

My 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\Framework\App\Request\Http">
    <plugin name="testExample" type="\Vendor\PluginExample\Plugin\TestExample"/>
</type>
</config>

My plugin file -

namespace Vendor\PluginExample\Plugin;

class TestExample {

protected $logger;

public function __construct(
\Psr\Log\LoggerInterface $loggerInterface
) {
    $this->logger = $loggerInterface;
}

public function afterSetPathInfo(Magento\Framework\App\Request\Http $pathInfo = null) {
    $this->logger->debug("works);

}

}

What am i doing wrong?? Can't we create a plugin for Framework classes ?


texts: How to save the data for customer custom attribute in magento 2

texts:
I created a custom customer attribute using an install script.

$customerSetup -> addAttribute(\Magento\Customer\Model\Customer::ENTITY,
        'is_mpowersync',
        [
        'label' => 'Is Mpowersync',
        'system' => false,
        'position' => 120,
        'sort_order' =>120,
        'visible' =>  true,
        'type' => 'int',
        'input' => 'select',
        "source" => "\Magento\Eav\Model\Entity\Attribute\Source\Boolean",
        'required' => false,
        'default' => '0',
        'group' => 'Account Information',
        ]
        );

    $customerSetup -> getEavConfig() -> getAttribute('customer', 'is_mpowersync')->setData('is_user_defined',1)->setData('is_required',0)->setData('used_in_forms', ['adminhtml_customer', 'customer_account_create', 'customer_account_edit']) -> save();

I want to set a value the above created custom attribute programmatically creating the customer.
I tried below 3 methods, but data is not saving.

1 . $newcustomer->setData('is_mpowersync','1');

2 . $newcustomer->setCustomAttribute('is_mpowersync',1);

3 . $newcustomer->setIsMpowersync(1);

Both method not saving the data, if I save from backend admin customer creation it saving the data for the custom attribute.

How can I save custom customer attribute in Magento 2 programmatically?


texts: Magento 2 Call breadcrumbs on Category & Product pages

texts:
I have my site running on Magento CE 2.0.2 version and I have breadcrumbs block code handy.

But I don't get how to call those breadcrumbs on Category and Product pages.

I tried putting the code into my theme's default.xml file like below:

<referenceContainer name="page.top">
            <block class="Magento\Theme\Block\Html\Topmenu" name="catalog.topnav" template="html/topmenu.phtml" ttl="3600"/>
            <container name="top.container" as="topContainer" label="After Page Header Top" htmlTag="div" htmlClass="top-container"/>
            <block class="Magento\Theme\Block\Html\Breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>
</referenceContainer>

Any help greatly appreciated.


texts: Magento 2 : Add To Cart Product Ajax Success is Can't Working On Home Page

texts:
we have one issue about some add to cart product ajax success working
in all page but homepage when adding to cart product then can't working.

Home page ajax success can't be working in Magento 2
so please tell me guys how can I sort this issue.
please give suggestion ASAP

Thank you.


texts: How to show products with the most quantity sorted first

texts:
Prior to my store allowing back orders, when browsing all products that were "In Stock" were displayed with a higher priority over products that were "Out of stock".

Since allowing back orders on my website, now the logic for this functionality is flawed. Now products with 0 stock are mixed with products with stock making it difficult for visitors to find products that are available for immediate purchase.

What I would like to do is show products with the most quantity first and not just "In Stock"

I'm finding plenty of information about sorting products by "in stock" but nothing about product quantities.

What is the best method to achieve sorting products by the largest quantities first when browsing?


texts: Magento 2 - How to override footer phtml

texts:
I want to customize my website footer. To do this I need to update footer, I don't want to customize vendor phtml as this is not recommended.

Current template is

vendor\magento\module-theme\view\frontend\templates\html\footer.phtml


texts:
I want to measure add and remove products from the cart using tag manager
Enhanced Ecommerce.

I refered https://developers.google.com/tag-manager/enhanced-ecommerce#cart.

How to add this script.

Thanks.


texts: Where Should End Users Go for Magento Connect Support?

texts:
Every so often I'll get an email like this

  I tried installing your extension via magento Connect on my store running Magento 1.8.1.0 but received the following error:

  CONNECT ERROR: Package file is invalid
  Invalid version, should be like: x.x.x
  Invalid stability
  Invalid channel URL
  Empty authors section
  Empty package contents section

A Magento user tried installing one of my extensions, but Magento Connect has failed for some reason.  This, despite my being able to install the package locally without issue.  It's usually a network related problem on their end, or a hacked core, and is occasionally the dreaded "that file extracted as a folder" issue, but is always something out of my control.

Where should I send users for support with this sort of thing?


texts: Adding javascript to head in certain pages

texts:
I'm trying to add some javascript scripts to the head of certain pages of my magento store (now I need one script in the product pages and other script in checkout, but I will need it in other different pages in the future: homepage, categories...).

I'm new to Magento and read quite a bit about it, but still not sure how to do this in Magento (I've done it successfully in Drupal for example).

It seems that page.xml (or local.xml) would be the right place to put the scripts for the head, but I don't know in those xml files allow "conditionals" (only show this script in this kind of pages...).

Another option seems to be putting the code in head.phtml of the template. This should work, because it accepts php ifs, but I don't know what code and variables should be used for each case (for showing in product pages, or checkout, or homepage, etc.)

What is the best/cleanest option for this? Could you please give me a code example of how would it be implemented or point to me to the relevant documentation page?

Thanks a lot!

P.S.: I don't think it makes any difference for this matter, but the javascript codes that I'm trying to implement are for using the Google Analytics Content Experiments API (https://developers.google.com/analytics/solutions/experiments-client-side)


texts: Magento 2 : Quantity Counter in Product Listing Page

texts:
I have a problem in product listing quantity counter, sometimes it will work and sometimes it will not. I want to create custom JQuery script to enable product counter increment and decrement, But the problem is that, it is a listing page so if I create script others will be affected. Please correct me if I'm wrong.

Below attached is screenshot.

Here's my script that is working in product detail page only.

 var $currentQTY=parseInt($('#qty').val());

    $(".qty-inc").click(function(){
        $currentQTY=$currentQTY+1;
        $('#qty').val($currentQTY);
        // console.log($currentQTY);
    });

    $(".qty-dec").click(function(){
        $currentQTY=$currentQTY-1;
        if ($currentQTY<1){
            $currentQTY=0;
        }
        $('#qty').val($currentQTY);
        // console.log($currentQTY);
    });

Thanks


texts: magento 2 product only show in category when changing pagination

texts:
I have a products that doesn't show up in a category called "News". But when I change products shown per page from 60 to 80 it will show up. The product is number 7 on the list and therefore should be show on the first page and not first when I change to 80 products per page (see example of pagination drop down below).

I have tried reindexing and flush cache with no luck.

I use Magento 2.1.8


texts:
It seems to be impossible to override the template vendor\magento\module-checkout\view\frontend\templates\cart\item\renderer\actions\edit.phtml from your own module e.g. by using layout updates.
(The template shows the edit button near quote items in the cart)
Preconditions:
Magento 2.3.5-p2
Steps to reproduce:

Create own module (In my case: Company_Configurator)

Create Template file: app\code\Company\Configurator\view\frontend\templates\cart\item\renderer\actions\edit.phtml and change content.

Create layout update file app\code\Company\Configurator\view\frontend\layout\checkout_cart_item_renderers.xml with following content:

<?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="checkout.cart.item.renderers.simple.actions.edit">
            <arguments>
                <argument name="template" xsi:type="string">Company_Configurator::cart/item/renderer/actions/edit.phtml</argument>
            </arguments>
        </referenceBlock>
    </body>
</page>

Attempt 2:
I even tried to extend the block class, override it with dependency injection and then set the template:
app/code/Company/Configurator/etc/frontend/di.xml:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\Checkout\Block\Cart\Item\Renderer\Actions\Edit"
                type="Company\Configurator\Block\Cart\Item\Renderer\Actions\Edit" />
</config>

app\code\Company\Configurator\Block\Cart\Item\Renderer\Actions\Edit.php
namespace Company\Configurator\Block\Cart\Item\Renderer\Actions;

class Edit extends \Magento\Checkout\Block\Cart\Item\Renderer\Actions\Edit
{
    protected $_template = 'Company_Configurator::cart/item/renderer/actions/edit.phtml';

    function __construct(\Magento\Framework\View\Element\Template\Context $context, array $data = [])
    {
        parent::__construct($context, $data);
    }

    ...

}

Expected result:
Template should get changed to own template.
Actual result:
Old template is still loading.
Please Help


texts: Why this happaning product to cart but price getting 0 or NULL in magento API


texts: URL redirect for a customer referral / rewards program with pretty urls and redirect

texts:
I am pretty new to Magento ... I just can't figure out what to search for I am developing a site with this very specific requirement...

I am setting up a customer referral program... there are a lot of extensions for that online.
however, there is a trick to it...

most referral URL is like
www.foo.com/refercode=bar (or something close to it)

and then the system knows what to do...

in my case, it has to be set up in this way...
www.foo.com/bar

so now my question is how to redirect that bar to foo.com/customer/account/create/bar (or any other module to get the code and do the job) without it conflicting with the actual redirects that are being done for a mage to work normal....???

any comments would be appreciated or if there is a complete module or extension that will do that job


texts: Product with image adding on magento2 using curl php. it shows error '{"message":"Specified request cannot be processed."}

texts:
json data body datas are..

"entry": {
        "id": 0,
            "media_type": "image",
            "label": "Image",
            "position": 1,
            "disabled": false,
            "types": [
                "image",
                "small_image",
                "thumbnail"      ],
            "content": {
                "base64_encoded_data": "'.$productimage.'",
                 "type": "image/png",
                "name": "tshirt.png"
            }
        }


texts: magento get all configurable options with products id

texts:
i want to show color swatches from products id ( product object)

i tried below code

$product->getTypeInstance()->getConfigurableAttributesAsArray($product);

gives output like

Array
(
    [0] => Array
        (
            [id] => 2
            [label] => Filter Name
            [use_default] => 0
            [position] => 0
            [values] => Array
                (
                    [0] => Array
                        (
                            [product_super_attribute_id] => 2
                            [value_index] => 220
                            [label] => Topaz
                            [default_label] => DEF
                            [store_label] => DEF
                            [is_percent] => 0
                            [pricing_value] => 210.0000
                            [use_default_value] => 1
                            [value_id] => 1
                        )

                    [1] => Array
                        (
                            [product_super_attribute_id] => 2
                            [value_index] => 217
                            [label] => Quartz
                            [default_label] => ABC
                            [store_label] => ABC
                            [is_percent] => 0
                            [pricing_value] => 195.0000
                            [use_default_value] => 1
                            [value_id] => 2
                        )
                )

            [attribute_id] => 1171
            [attribute_code] => filter1name
            [frontend_label] => Filter Name
            [store_label] => Filter Name
        )

)

i want product is also with each value array option , how can i get that


texts: Get attribute label by attribute code without load by product id

texts:
Is it possible to get the attribute label (depending on the storeview) only by the attribute code?
I don't want to enter any product or product id.

This is my code to get the attribute label:

<?php $_attribute = $_product->getResource()->getAttribute($attribute_name); ?>
<?php $attribute_label = $_attribute->getStoreLabel(Mage::app()->getStore()->getName()); ?>

I want to get rid of the $_product.


texts: Magento 1.9: CSS style in webpage inherits parent theme

texts:
I'm new to Magento and feel stuck with custom css not applying correctly to a webpage I create.
I need to make a dropdown list, but the final result is a mess, check this link for example: https://eurogsm.ro/preccc
How can I overwrite the default css with my internal css?


texts:
In Magento1 we can get translated string by

  _getTranslatedString() from app/code/core/Mage/Core/Model/Translate.php

but in Magento2 there is not such methods. Is there any alternative method available for this?


texts: Magento 2: Question about set reindex (update on schedule or update on save)

texts:
I have a script that is responsible for automatic updating of states with an external storage (automatically adds products and automatically updates states) every 15 minutes.

How to set index? Please reply me

***Should by:***

 - Update on schedule or
 - Update on save?


texts:
I've seen a few other questions about this with similar issues, but I can't seem to duplicate their fixes with my structure and Namespace/Moduel name etc.

I've got the following files:

Namespace/PendingCancellation/etc/config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Namespace_PendingCancellation>
            <version>0.1.0</version>
        </Namespace_PendingCancellation>
    </modules>
    <global>
        <models>
            <pendingcancellation>
                <class>Namespace_PendingCancellation_Model_Observer</class>
            </pendingcancellation>
        </models>
    </global>
    <crontab>
        <jobs>
            <PendingCancellation_Update>
                <schedule><cron_expr>*/5 * * * *</cron_expr></schedule>
                <run>
                    <model>pendingcancellation/observer::cancelPendingOrders</model>
                </run>
            </PendingCancellation_Update>
        </jobs>
    </crontab>
</config>

Namespace/PendingCancellation/Model/Observer.php

class Namespace_PendingCancellation_Model_Observer
{
    public function cancelPendingOrders()
    {
        Mage::log('Cron run', null, 'test.log');
    }
}

I know I'm likely doing something very obvious and or stupid but would very much appreciate the help after staring at this for a while.


texts: Code for sending order confirmation and its working

texts:
I have a data ware house running in PostgreSQL server ,i'm loading data using PYTHON to the DWH from Magento, I want to consolidate all the mailing process from my DWH , for which i have devised a mailing mechanism using python.

Now my issue is how to get the order confirmation details from Magento to my DWH as I need to send an order confirmation email to users as soon as they places an order(Time period is not an issue).

So i need to understand how the mail sending mechanism in Magento is working in case of Order confirmation? Is there a trigger for that or an event? Does anyone have the SQL code for checking this?

Any ideas/suggestions will be heartily welcomed.

Using Version Magento 1.9

Thanks in advance


texts: How to move product from Magento to other framework(like .net)?

texts: How to create an API or some things to move the product from the Magento site to another platform in magento 1.x?


texts:
We want to offer promotion (e.g. $10 off) as long as customer uses a specific payment type (e.g. COD).

I can easily set up the rule for the $10 off in the “Shopping Cart Price Rule” and select “Payment Type” under “Cart Attribute” for the “Condition”. But get error when entering “Promotion Code” on the Cart page.  If I remove the “Payment Type” condition then the “Promotion Code” works.

Even though “Payment Type” is available for Shopping Cart Price Rules, is this functionality working?


texts:
I am getting

  Warning: Illegal offset type in
  vendor/magento/module-catalog/Model/CategoryRepository.php on line
  133

on product details page in Magento 2.1.8 Which is caused by

  vendor/magento/module-catalog/Block/Product/ListProduct.php(114)

Please refer screenshot - code from ListProduct.php

Code from CategoryRepository.php


texts: what is container1 and container2 in product view page in magento

texts:
I need to know what  is this container1 and container2 in magento product view page. i am talking about the file view.phtml in the location app/design/frontend/<package>/<theme>/catalog/product/view.phtml

upadate question:

I have asked this question because.. I came to know  that, these sections are responsible for displaying the options in the product view page.

Actually my problem is I have 3 bundle product and I want to display their custom  options in my own phtml file. I have these codes with me..

<?php
$id=Mage::getModel('catalog/product')->getIdBySku(123456);
$prod = Mage::getModel('catalog/product')->load($id);
$x=$prod->getOptions();
foreach($x as $y)
 {
echo $y->getTitle();
print_r($y->getValues());
}
?>

I need to get the product through it's sku.That is why I coded like this.now I am getting the title correctly. but there values not displaying.(note: I added two dropdown options as my custom options)

Thanks in advance.


texts: how dependency injection makes testing easier?

texts:
i read so many articles regarding di ,but there are no proper examples to understand in terms of testing.

i think so many developers don't have idea on usage of di in magento2.
anyone give one example testing with and without di.


texts: Find all salesrules (shoppingcart price rules) for a given product

texts:
I would like to find all salesrules for a given product without the need to add it to the cart. I've been trying to find a solution for this all day but I can't come up with anything usefull/working.

Doing this for the catalogrules is pretty simple by using Mage_CatalogRule_Model_Resource_Rule::getRulesFromProduct.
But there is no such method anywhere for the salesrules.


texts: How to ignore clickjacking protection for specific route?

texts:
Background: I'm integrating an external CMS into Magento, and using a module in Magento to render the preview for the CMS. This happens within an iFrame.

In Magento 1.9.0.0 the core/domainpolicy observer was added which allows for the X-Frame-Options header to be set for admin and frontend.

In my instance, this header is preventing me from using my preview route (/my/content/preview for example) from being loaded within an iFrame from the CMS>

How can I disable this functionality for a specific controller?

It's observing the controller_action_predispatch event.


texts: Magento 2 how to add image upload from product page as a attribute

texts:
How to add product attribute which is a image uploader. I have tried few methods none of them are working.
I have tried this following code which didn’t get me anywhere it doesn’t show up in my product page in admin area.
  $eavSetup->addAttribute(
            \Magento\Catalog\Model\Product::ENTITY,
            'color_image',
            [
                'type' => 'varchar',
                'label' => 'color_image',
                'input' => 'media_image',
                'required' => false,
                'sort_order' => 30,
                'frontend' => \Magento\Catalog\Model\Product\Attribute\Frontend\Image::class,
                'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE,
                'used_in_product_listing' => true,
                'user_defined' => true,
                'visible' => true,
                'visible_on_front' => true
            ]
        );


texts: how to work on getFinalPrice() in magento?

texts: I want to change the product price to custom price through getFinalPrice() in product.php is there any way i am not getting how to do it ?


texts: Magento 2: Customer session not getting on enabling cache in backend

texts:
This is my XML file.

<referenceBlock name="category.products.list">
  <action method="setTemplate">
    <argument name="template" xsi:type="string" cacheable="false">Company_Module::product/list.phtml</argument>
  </action>
</referenceBlock>

In the list.phtml file.

I have displayed a pop-up on the basis of customer session value (customer logged in/not). On enabling cache in the backend, I am not getting customer session value (customer logged in) hence pop up is not coming. The module is working fine if a cache is disabled. How can we set cacheable=false for overwritten template files in XML?


texts: magento redirect to custom url after login

texts:
i there any way i can add reffer like, so user can be redirected to that url after login, something like below

http://example.com/customer/account/login?u=product-page-url

i have already set below from admin


texts: Account registration: let store owner confirm

texts:
I'm tweaking a magento store for a wholesale company. Because this is a wholesale company, we only want to allow companies, not privates/individuals, to create a new account. We want to do that by letting the store owner check the VAT number (which is a required field in the registration form) of the company, then let him manually set the account to 'confirmed'.

The preferred way is to have a confirmation e-mail sent to the store owner (and a different notification mail to the customer saying that the confirmation is pending). However, letting the store owner set the customer's account to 'confirmed' in the admin panel is fine too.

So, my problem is this. For as far as I can find, it's only possible to choose whether you want to send a confirmation link before 'activating' the account or not, but this confirmation link will always get sent to the customer. It seems to me you can't change this in the Admin panel, but how can I change this in the code? Any tips, code snippets, or even telling me what file I would have to change, would be quite welcome.


texts: Overridden phtml files disappear in Magento 2. Works fine with symbolic link to new folder

texts:
Whenever I override a phtml file in Magento 2.1.2, the block simply disappears from the page. I've successfully copied over the files from:

vendor/magento/module-theme/view/frontend/templates/html/

over to my custom theme (copy of magento-blank) folder

/vendor/me/new-blank/Magento_Theme/templates/html/

I turn on template hints and every block that's overridden (showed up as module-theme) does not show up anymore. As an experiment, I renamed the original html folder and replaced it with a symbolic link pointing to the new folder in my theme and the blocks show up just fine and can be edited without a problem. I've tried the upgrade, compile and static-content:deploy command lines and I still have no luck.

Thank you for any assistance in advance.


texts: Error when saving product: "Duplicate website group price customer group."

texts:
I get this error message when I try to save a product, which reads to me like a random sequence of nouns (the German translation is even weirder but I am used to that...)

Traced it down to this method in Mage_Catalog_Model_Product_Attribute_Backend_Groupprice:

/**
 * Error message when duplicates
 *
 * @return string
 */
protected function _getDuplicateErrorMessage()
{
    return Mage::helper('catalog')->__('Duplicate website group price customer group.');
}

The weird thing is, the article does not contain any group price. And even if i don't change anything, the message appears. What could possibly be broken here?

Update: Actually there is a group price definition, I did not notice it because it had been moved to the "general" tab:


texts: Admin area issue - Best Sellers, Most Viewed Products etc tabs on Dashboard do not update

texts:
on the Dashboard within the Admin area there are some tabs on the right hand side which allow you to view Bestsellers, Most Viewed Products, New Customers etc.

The info here is completely wrong and has not changed for about a year.

If I click on the tabs, it just starts to load indefinitely and does not bring up any results.

Can anyone tell me why this would be happening and what I can do to fix it?

Many thanks

Magento 1.6


texts: Anybody know what the Magento API v2 SOAP XML call is to assign an attribute set to a product?

texts:
How do I assign an attribute set to products via XML? Presently products are all created and assigned to the default attribute set..Here is the XML that I am using to create configurable products:

    <soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:Magento" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<soapenv:Header />
<soapenv:Body>
<urn:catalogProductCreate soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
  <sessionId xsi:type="xsd:string">93de69dab0c0ba19b00a328808ce3dasd8a</sessionId>
  <type xsi:type="xsd:string">configurable</type>
  <set xsi:type="xsd:string">4</set>
  <sku xsi:type="xsd:string">0001</sku>
  <productData xsi:type="urn:catalogProductCreateEntity">
    <name xsi:type="xsd:string">Example Product</name>
    <description xsi:type="xsd:string">Example Description.</description>
    <short_description>Example short description</short_description>
    <weight xsi:type="xsd:string">0.50</weight>
    <status xsi:type="xsd:string">2</status>
    <price>39.99</price>
    <visibility xsi:type="xsd:string">4</visibility>
    <tax_class_id xsi:type="xsd:string">2</tax_class_id>
    <category_ids xsi:type="urn:ArrayOfString" soapenc:arrayType="xsd:string[]">
      <key>category_id</key>
      <value>60</value>
      <key>category_id</key>
      <value>7</value>
      <key>category_id</key>
      <value>0</value>
    </category_ids>
    <additional_attributes xsi:type="urn:catalogProductAdditionalAttributesEntity">
      <single_data xsi:type="urn:associativeArray" soapenc:arrayType="urn:associativeEntity[]">
        <associativeArray>
          <value>color</value>
        </associativeArray>
        <associativeArray>
          <value>size</value>
        </associativeArray>
      </single_data>
    </additional_attributes>
    <associated_skus xsi:type="urn:ArrayOfString" soapenc:arrayType="xsd:string[]">
      <value>9214018662</value>
    </associated_skus>
    <associated_skus xsi:type="urn:ArrayOfString" soapenc:arrayType="xsd:string[]">
      <value>9214018664</value>
    </associated_skus>
    <associated_skus xsi:type="urn:ArrayOfString" soapenc:arrayType="xsd:string[]">
      <value>9214018658</value>
    </associated_skus>
    <associated_skus xsi:type="urn:ArrayOfString" soapenc:arrayType="xsd:string[]">
      <value>9214018665</value>
    </associated_skus>
    <associated_skus xsi:type="urn:ArrayOfString" soapenc:arrayType="xsd:string[]">
      <value>9214018663</value>
    </associated_skus>
    <associated_skus xsi:type="urn:ArrayOfString" soapenc:arrayType="xsd:string[]">
      <value>9214018660</value>
    </associated_skus>
    <associated_skus xsi:type="urn:ArrayOfString" soapenc:arrayType="xsd:string[]">
      <value>9214018659</value>
    </associated_skus>
    <associated_skus xsi:type="urn:ArrayOfString" soapenc:arrayType="xsd:string[]">
      <value>9214018657</value>
    </associated_skus>
    </productData>
    <storeView xsi:type="xsd:string">1</storeView>
    </urn:catalogProductCreate>
   </soapenv:Body>
    </soapenv:Envelope>


texts: Direct use of $_FILES Superglobal detected. In magento 2

texts:
Direct use of $_FILES Superglobal detected.

I have Used for get image file in backend.

 protected function getTmpFileName()
{
    $tmpName = null;
    if (isset($_FILES['groups'])) {
        $tmpName = $_FILES['groups']['tmp_name'][$this->getGroupId()]['fields'][$this->getField()]['value'];
    } else {
        $tmpName = is_array($this->getValue()) ? $this->getValue()['tmp_name'] : null;
    }
    return $tmpName;
}


texts:
I am trying to figure out these multi store in sub directories deal.  I am using version 1.8.1.
Here is what one of my sub-stores looks like: http://hypeforce.com/lab/shirts/   I feel like I am getting close but for some reason its not picking up on the formatting.
The edits I made to the subdir index.php were:

$mageFilename = MAGENTO_ROOT . '/../app/Mage.php';

and

$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ?
$_SERVER['MAGE_RUN_CODE'] : 'shirts1';

^^ That was for my sub store code
I am not sure what else to post.    I did all the steps outlined here:
http://www.templatemonster.com/help/magento-how-to-set-up-and-manage-multiple-stores.html
Please help!   I am even willing to send some paypal bucks to understand why this is happening so I don't do this moving forward.


texts: Magento 2 - Issue on override of Multishipping checkout model

texts:
With this question I want to go further and to exactly know if it's possible to override:

  vendor/magento/module-multishipping/Model/Checkout/Type/Multishipping.php

so far I've experienced some complications performing this override, I had to override also PlaceOrderDefaulr, PlaceOrderFactory and PlaceOrderInferface

I've added preferences tags in ../etc/di.xml of my module to include above mentioned classes, but now the error prompted is:

  Fatal error: Uncaught TypeError: Argument 2 passed to
  Magento\Multishipping\Model\Checkout\Type\Multishipping\State::__construct()
  must be an instance of
  Magento\Multishipping\Model\Checkout\Type\Multishipping, instance of
  Vendor\MyModule\Model\Checkout\Type\Multishipping given,
  called in
  /var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php
  on line 111

I've cleared /generated folder and also /var/cache, view_preprocessed, page_cache, session/

and the error is still the same.. as a second parameter in constructor the follwing is called:

  \Magento\Customer\Model\Session

Then used to retrieve logged-in customer information to get addresses, etc.

Any ideas? will be appreciated.


texts: Magento 2.4.2: Is it possible to store the vendor addresses in Magento admin?

texts: Just wanted to know if it is possible to store the list of vendors in Magento. These vendors are the ones who ship the products ordered on my Magento site.


texts:
I have an extension that do layout update to push something to all pages headers.
It worked so far for several clients and versions, but suddenly we got a client that just don't get the layout update.

We know the extension works because routes we added work.
We already checked with the client that extension output is not disabled in admin panel.
The client assured us they did clear cache in admin.
Its probably not because some full-page cache extensions (like varnish), because we tried accessing the pages with "?aaa=bbb" added to the URL and it still didn't work, and usually full-page caching solutions are URL-based.

And important point to note: this client manage two sites/stores on the same server (from the same admin), if that might affect anything...

Anyway... here's our layout xml:

app\design\frontend\base\default\layout\vendor\core.xml

<!-- Layout updates to inject vendor headers to all pages (include vendor js and page metadata). -->
<layout version="0.1.0">
    <default>
        <reference name="head">
                <block type="vendor_core/injectjs" name="vendor_js" as="vendor_js" template="vendor/injectjs.phtml" />
        </reference>
    </default>
</layout>

And here's the config.xml that apply this update:

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

  <modules>
    <Vendor_Core>
      <version>1.0.0</version>
    </Vendor_Core>
  </modules>

  <global>
<models>
  <vendor_core>
    <class>Vendor_Core_Model</class>
  </vendor_core>
</models>

<helpers>
  <vendor_core>
    <class>Vendor_Core_Helper</class>
  </vendor_core>
</helpers>

<blocks>
  <vendor_core>
    <class>Vendor_Core_Block</class>
  </vendor_core>
</blocks>
  </global>

  <frontend>
    <layout>
      <updates>
        <vendor_core>
          <file>vendor/core.xml</file>
        </vendor_core>
      </updates>
    </layout>
    </frontend>
</config>

Note that the company name was replaced with "vendor", so if you notice any typos there ignore them :)

Any ideas why the layout update might not work or how can I figure it out? I might get like an hour at the client's office to test things, but right now I don't have any access, just the code.

EDIT:

Added the phtml file:

app\design\frontend\base\default\template\vendor\injectjs.phtml

<?php if( $this->isEnabled() ): ?>

    <script type="text/javascript" id="vendor-src" <?php echo $this->getAsyncMode(); ?> src="<?php echo $this->getJsUrl(); ?>"></script>

<?php else: ?>

    <!-- Note: Vendor (<?php echo $this->getVersion(); ?>) is temporarily disabled via admin panel. -->

<?php endif; ?>


texts: How to enable Store Pickup as a shipping method in Magento2?

texts:
Is it already possible via the configuration or do we have to implement the code from this commit?

https://github.com/amenk/magento2/commit/80a2fa4cdce7d968a995f8f64cae9de73891713a


texts:
I try to run an import with about 9000 products in it. When I run it it only creates 250 products

PHP.ini

; This file is for CGI/FastCGI installations.
; Try copying it to php5.ini, if it doesn't work

; adjust memory limit

memory_limit = 64M

max_execution_time = 18000

; disable magic quotes for php request vars

magic_quotes_gpc = off

; disable automatic session start
; before autoload was initialized

flag session.auto_start = off

; enable resulting html compression

zlib.output_compression = on

; disable user agent verification to not break multiple image upload

suhosin.session.cryptua = off

; turn off compatibility with PHP4 when dealing with objects

zend.ze1_compatibility_mode = off

; PHP for some reason ignores this setting in system php.ini
; and disables mcrypt if this line is missing in local php.ini

extension=mcrypt.so

; Disable PHP errors, notices and warnings output in production mode to    prevent exposing sensitive information.

display_errors = Off

Import script

include_once "../app/Mage.php";
include_once "../downloader/Maged/Controller.php";

Mage::init();

// Set the store id
$app = Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);

if(($handle = fopen("simple.csv", "r")) !== FALSE){
fgetcsv($handle);
while(($data = fgetcsv($handle, 1000, ';')) !== FALSE){
  try{
    $Simpleproduct = Mage::getModel('catalog/product');
    $Simpleproduct
      ->setWebsiteIds(array(1))
      ->setAttributeSetId(4)
      ->setTypeId('simple')
      ->setCreatedAt(strtotime('now'))
      ->setName($data[4])
      ->setWeight(4.0000)
      ->setStatus(1) //(1 - enabled, 2 - disabled)
      ->setTaxClassId(2) //(0 - none, 1 - default, 2 - taxable, 4 - shipping)
      ->setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_NOT_VISIBLE)
      ->setPrice($data[3]);

     if($Simpleproduct->save()){
        echo "product ".$sku." Was created
";
        $row++;
     }
  }catch(Exception $e){
    die();
    echo "
";
    echo $e;
    echo "

";
    echo $data[4];
  }
  }
}else{
    echo "Handle == false";
 }


texts: Filtering error when using custom Varien object collection in admin grid

texts:
I have created a custom Varien object collection for my admin module (because the data is not from a db) and have got it successfully to show in an admin grid. I built the collection by using the following code:

$collection = new Varien_Data_Collection();

Inside loop:

$object = new Varien_Object();
$object->setFileName($filename);
$collection->addItem($object);

It's all working perfectly except when I try to filter using the grid filtering system, it returns this error:

  Fatal error: Call to undefined method Varien_Data_Collection::addFieldToFilter() in /data/www/vhosts/adammoss.co.uk/httpdocs/magento/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php on line 472

I know that addFieldToFilter() is only used on EAV objects, which my collection obviously has none of. My question is whether anybody knows of any way around this?

Can I append that method to my object in some way or would I have to create a model for this to work?

******UPDATE 08/02/2012 ******

OK, so I've slightly changed the way I do this. I'm still using my custom class which is an exact duplicate of Filesystem.php

My grid collection now looks like this:

protected function _prepareCollection()
{
    $collection = new MyNamespace_MyModule_Model_Csv_Collection();
    $collection->addTargetDir('my/target/path');
    $this->setCollection($collection);

    return parent::_prepareCollection();
}

It loads in all my Files into the grid as expected, and it now Paginates! However for some reason it still won't filter or sort, even though I'm literally just using the exact same class as Filesystem.php.

I'll check Mage_Backup class as you suggested.


texts: How to show only all store views on default store view

texts:
How to show all store views on default store view and on other store views only the current store view shows.
my code is

<?php

namespace PME\Hideprice\Model\Config\Source;
/**
* @api
* @since 100.0.2
*/
class Stores implements \Magento\Framework\Option\ArrayInterface
{
    public function __construct(
        \Magento\Store\Model\StoreManagerInterface $storeManager
    )
    {
        $this->_storeManager = $storeManager;
    }

    /**
    * Options getter
    *
    * @return array
    */
   public function toOptionArray()
   {
       $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
       $storeManager = $objectManager->get('Magento\Store\Model\StoreManagerInterface');

       $storeManagerDataList = $storeManager->getStores();
       $options = array();
       foreach ($storeManagerDataList as $key => $value)
       {
           $options[] = ['label' => $value['name'],  'value' => $key ];
       }
       return $options;
   }

}

it shows all the store views on every store view I want to show all the store views only on default store view. Thanks in Advance


texts:
After applying patch SUPEE-6285 on Magento 1.9.1.0, I am seeing the following error in system.log several times a day:

  Undefined index: form_key  in ... downloader/Maged/Model/Session.php on line 252

I haven't found any other references online so I'm posting this question to see if anybody else is getting this error message.


texts: How installer script extends `Mage_Core_Model_Resource_Setup`?

texts:
Lot of time, I heard that installer script, upgrade script, and data script files are extending Mage_Core_Model_Resource_Setup (default case). When we make a look on any of these file, there is no hint for this. For example, an installer script somewhat look like this.

#FILE : app/code/<any_code_pool>/<AnyNameSpace>/<AnyModuleName>/sql/<any_script_setup>/install-x.x.x.php
$installer =  $this;
$installer->startSetup();

//some stuffs here

$installer->endSetup();

As you can see, the file does not specify any class or not extending any class explicitly. And then also several tutorial says that $this is an instance of resource setup class.  How it is possible?

Can you guys give some hints about this ?


texts: How overwrite product price in plugin but not taking the cached price?

texts:
I have a plugin to change the product price, but when the plugin is called again, it's render the cache product price in the frontend. Any way to take the plugin info instead of the cache?
This is my etc/frontend/di.xml
<type name="Magento\Catalog\Model\Product">
    <plugin name="Vendor_Module_Plugin_Magento_Model_Product" type="Vendor\Module\Plugin\Model\Product" sortOrder="10" disabled="false"/>
</type>

And the plugin:
public function afterGetPrice(\Magento\Catalog\Model\Product $subject, $result)
{
    $result = $this->helper->calculatePrice($subject->getId());
    return $result;
}


texts: Onestep checkout console : POST domain.com/rest/default/V1/rewards/mine/update 401

texts:
I am getting console errors in checkout page when i am filling shipping form :
POST https://www.domain.com/rest/default/V1/rewards/mine/update 401 (Unauthorized)

I am getting these errors mutiple time check this screeen : https://prnt.sc/sn6lnb
can anyone have any idea about this ?


texts: Magento 2 - Configurable product with multiple price attributes

texts:
I'm facing a dead-end with my configurable product and my simple products.

Right now, i am struggling setting up my configuration prices in a way that make sense for my products.

Since Magento 2 , the simple product prices 100% overrule the configurable one. That makes perfect sense, but if the price is depending on more than one attribute, its getting useless.

Example product: A Chair.

Attribute 1 - Fabric:

Leather (300$)
Regular Fabric (100$)

Attribute 2 - Color

Blue: (50$)
Black (100$)

Out of the box Magento only allow me to base my price on one of the above attributes.
If i base my price on "Fabric" - my two product would then cost:
300$ and 100$ - and my color prices are not taken into account.

So therefore, i am looking for a way to achieve my prices getting based on both of my attributes, so my prices instead will be:

Leather & Blue = 350$
Leather & Black = 400$
Regular Fabric & Blue = 150$
Regular Fabric & Black = 200$

Are there any way? Or suggestions for a work around?

(Only workaround so far that came to my mind, was to export every of variant to a csv-file, update the price on every variant (sometimes +200), and then import my new prices again. But again, this would never work in practice.)

Kindly regards.


texts: How to send Payment Transaction Failed Email copy to customers in Magento 1

texts:
There is a setting in Magento

Admin > System > Configuration > Checkout (from sales section) > Payment Failed Emails

where you can add custom email id to receive it. But I want our customers to receive Payment Transaction Failed Emails too.

Any help reg this would be highly appreciated. Thanks in advance !!


texts: Solved! - Error when printing invoices only in one of our store views

texts:
We are using Magento 1.8.1.0.

We have one store with two store views, english and spanish. Everything worked well in MAMP. But, after migrating the store to our live server and getting one order from each view, we found out in the spanish store we get an error when trying to print the invoices.

This is the latest log generated.

a:5:{i:0;s:143:"Cannot send headers; headers already sent in /homepages/40/d504285318/htdocs/app/code/local/Excellenceredsys/Redsys/Model/Payredsys.php, line 2";i:1;s:1505:"#0 /homepages/40/d504285318/htdocs/lib/Zend/Controller/Response/Abstract.php(115): Zend_Controller_Response_Abstract->canSendHeaders(true)
#1 /homepages/40/d504285318/htdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(1065): Zend_Controller_Response_Abstract->setHeader('Pragma', 'public', true)
#2 /homepages/40/d504285318/htdocs/app/code/core/Mage/Adminhtml/Controller/Sales/Invoice.php(121): Mage_Core_Controller_Varien_Action->_prepareDownloadResponse('invoice2014-10-...', '%PDF-1.4\n%\xE2\xE3\xCF\xD3\n...', 'application/pdf')
#3 /homepages/40/d504285318/htdocs/app/code/core/Mage/Adminhtml/controllers/Sales/Order/InvoiceController.php(489): Mage_Adminhtml_Controller_Sales_Invoice->printAction()
#4 /homepages/40/d504285318/htdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_Sales_Order_InvoiceController->printAction()
#5 /homepages/40/d504285318/htdocs/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('print')
#6 /homepages/40/d504285318/htdocs/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#7 /homepages/40/d504285318/htdocs/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#8 /homepages/40/d504285318/htdocs/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#9 /homepages/40/d504285318/htdocs/index.php(88): Mage::run('', 'store')
#10 {main}";s:3:"url";s:93:"/index.php/admin/sales_order_invoice/print/invoice_id/1/key/e8c732175322411fbbf4d923978aa674/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:9:"store_spa";}

I tried other solutions offered in these forums, like this one and this one, but none of them worked.

Any help will be much appreciated. As I said, it only happens in one store view.

Thank you very much.


texts: EncryptorInterface in alphanumeric format only

texts:
Hi is there a way to tell EncryptorInterface to only output an ALPHANUMERIC result? I don't want a special character to be added but instead I only want either 0-9 or A-Z. Is it possible using the EncryptorInterface?
I have a sample of
<?php
namespace Vendor\Module\Controller\Download;
use Magento\Framework\App\Action\Action;
use Magento\Framework\App\Action\Context;
use Magento\Framework\Encryption\EncryptorInterface as Encryptor;

class File extends Action
{
    public function __construct(
        Context $context,
        Encryptor $encryptor
    ) {
        $this->_encryptor = $encryptor;
        parent::__construct($context);
    }

    public function execute()
    {
        $encrypt = $this->_encryptor->encrypt("56938");
    }
}


texts: Magento 2.3 : How to add code that will throw an error when developer mode is on not on Production mode

texts:
I would like to add code in try and catch block that will throw an error in case of developer mode.

If deployment mode founds developer mode then it will throw an error in try and catch block.

If deployment mode founds production mode then it will not throw an error.


texts: Always 404 error on my front-end magento 1.9.3.4

texts:
I put my site online in a hidden directory www.mydomain.or/test/magento/
with .htacces on my folder test

I put the url not secure = mydomain.or/test/magento/
And url secure = mydomain.or/test/magento/
with http:// before :)

I re-index my magento afterwards.
When I access the admin part of magento with
 http://mydomain.or/test/magento/index.php/admin, it works

By cons for the front-end I always page not found (404) while I type
 http://mydomain.or/test/magento/.
I also tried it mydomain.or/test/magento/index.php

thank you for helping me


texts: Author page based on Attribute - Magento 2

texts:
I am trying to make the author page based on the attribute created in Magento 2. Attribute ( author ) has allot of values, and each value is assigned on each product. I am trying to make a module and able to create an initially installed version of the Magento module but need some suggestions on how to make it based on the attribute. Here is login for a full understanding

Products: Digital books
list of products: ABC title, Mr hero, an American journey, health business
author: Mr Magento ( this author value is assigned when the added list of products mentioned above )

Frontend call: www.domain.com/author/mr-magento/

once called this URL, it must show a list of all products attached to this author attribute.

Same as that any author that is created must be accessible in the same above URL example with its own name and show list of products connected to author.


texts: Magento 2, error 'unserialize value' when using Ajax in phtml in admin page

texts:
Using Magento 2, Ajax in phtml, Admin. I got an error while trying to request API by ajax from template of sale order page.

AJAX

<script type="text/javascript">
require(['jquery', 'domReady!'], function($){
    changeDriver = function () {
        var driverBase = 'https://127.0.0.1:445/index.php/rest/V1/driver'
        var data = {"orderId": "58", "driverId": "20"};
        $.ajax({
            showLoader: true,
            url: driverBase,
            type: "POST",
            data: data,
            dataType: 'json',
            contentType: "application/json; charset=utf-8"

        }).done(function (data) {
            console.log(data);
            $('#driver_detail').html('Driver chnaged.');

        }).fail(function (jqXhr) {
            console.log(jqXhr);
            $('#driver_detail').html('Cannot change driver.');
        });
    }
});
</script>

Header

**General**
Request URL: https://127.0.0.1:445/index.php/rest/V1/driver/?isAjax=true
Request Method: POST
Status Code: 400 Bad Request
Remote Address: 127.0.0.1:445
Referrer Policy: no-referrer-when-downgrade

**Request Payload**
orderId=58&driverId=20&form_key=AKlwzR4oQvfmyhzL

Error

  {"message":"Decoding error: \nUnable to unserialize value.\n#0 /home/dev/Work/Web_Application/SVN/driver-mage/esh_www/vendor/magento/framework/Webapi/Rest/Request/Deserializer/Json.php(64): Magento\Framework\Serialize\Serializer\Json->unserialize('orderId=58&driv...')\n#1 /home/dev/Work/Web_Application/SVN/driver-mage/esh_www/vendor/magento/framework/Webapi/Rest/Request.php(141): Magento\Framework\Webapi\Rest\Request\Deserializer\Json->deserialize('orderId=58&driv...')\n#2 /home/dev/Work/Web_Application/SVN/driver-mage/esh_www/vendor/magento/framework/Webapi/Rest/Request.php(199): Magento\Framework\Webapi\Rest\Request->getBodyParams()\n#3 /home/dev/Work/Web_Application/SVN/driver-mage/esh_www/vendor/magento/module-webapi/Controller/Rest/InputParamsResolver.php(97): Magento\Framework\Webapi\Rest\Request->getRequestData()\n#4 /home/dev/Work/Web_Application/SVN/driver-mage/esh_www/vendor/magento/module-webapi/Controller/Rest.php(322): Magento\Webapi\Controller\Rest\InputParamsResolver->resolve()\n#5 /home/dev/Work/Web_Application/SVN/driver-mage/esh_www/vendor/magento/module-webapi/Controller/Rest.php(239): Magento\Webapi\Controller\Rest->processApiRequest()\n#6 /home/dev/Work/Web_Application/SVN/driver-mage/esh_www/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))\n#7 /home/dev/Work/Web_Application/SVN/driver-mage/esh_www/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Webapi\Controller\Rest\Interceptor->___callParent('dispatch', Array)\n#8 /home/dev/Work/Web_Application/SVN/driver-mage/esh_www/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Webapi\Controller\Rest\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))\n#9 /home/dev/Work/Web_Application/SVN/driver-mage/esh_www/generated/code/Magento/Webapi/Controller/Rest/Interceptor.php(39): Magento\Webapi\Controller\Rest\Interceptor->___callPlugins('dispatch', Array, Array)\n#10 /home/dev/Work/Web_Application/SVN/driver-mage/esh_www/vendor/magento/framework/App/Http.php(135): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))\n#11 /home/dev/Work/Web_Application/SVN/driver-mage/esh_www/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http->launch()\n#12 /home/dev/Work/Web_Application/SVN/driver-mage/esh_www/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))\n#13 {main}","trace":null}


texts: Magento not using URL rewrites in product display or for incoming links

texts:
All the links on my Magento 1.14.2 site are showing up as (literally):

".../catalog/product/view/id/1234/s/my-really-cool-product" instead of ".../my-really-cool-product"

Reindexing seems to build the rewrites in the database, but they don't seem to be acted upon at all. When traffic comes in to the site from ".../my-really-cool-product" it results in a page not found error.

I copied the files of the site to another directory and am using an older version of the database, and the issue does not seem to be replicated, so I'm thinking that the problem lies somewhere in the database, but I haven't been able to find it yet.

Any ideas what might be going on here and how to fix it?


texts: I am created custom login page. But i used same default login in different page. if i enter wrong password it redirect to default login. How i fix that? or please suggest me how to create custom login


texts: Upload Magento 1 Extension to Marketplace

texts:
I'm uploading a Magento 1 extension to the Marketplace and I get the following error.

I included the "package.xml" file in the root of my directory and got that error.

It was possible to get the approval from Magento and actually have the extension published if I upload a .tgz with only the package.xml file inside, but I'm never asked for the actual code of my extension.

What is it supposed to be inside the package .tgz file?


texts: Product page modification for specific products

texts:
I would like to make some product modifcations; change qty position to move in the top, add total price (qte* unit_price) in /vendor/magento/module-catalog/view/base/templates/product/price/amount/default.phtml.
The problem is that the block is modified in the catalog page also.
I need to make some change to the custom options block also.
So my question how to make those changes for specific products only (i can add a product attribute for that)
Thanks.


texts: Magento 2 - Set a custom external link in footer

texts:
How can I set a custom external link in the footer?

Something like blog.example.com with the label of "Blog"
Blog

I have added other links to my footer via this way.

<referenceBlock name="footer">
            <block class="Magento\Cms\Block\Block" name="footer_social_links_block">
                <arguments>
                    <argument name="block_id" xsi:type="string" translate="true">dth_footer_social_links</argument>
                </arguments>
            </block>
</referenceBlock>

I am using Magento 2.0.7 right now.

What if I use this block instead?  How could I link externally from this?  I setup a returns-policy link already - but it is internal.

                        Returns and Exchanges
                        returns-policy


texts: How to debug handle in transaction email templates?

texts:
How can I debug a transaction email template?
In the admin panel I select in configurations -> sales the email template for shipment. It has the template-id 75. So far everything is totally normal.

Next I call sendMail with that templateId 75 and Magento sends that email template but the handler I defined there seems not to be called.
When I debug the defined template files in my handle the debugger ignore my breakpoints in that file. So it seems that this handle was not called.
How can I debug this? Or how can I check if in my sales.xml this handler will be called?

UPDATE:
It seems that I cann call the standard handle 'sales_email_order_items' but not my new handle in the same 'sales.xml'.
First guess it could be the wrong store but after debugging the storeId (1) is correct.

UPDATE 2: SOLUTION
Never copy paste code, always try to write just a little "Test output" to see, if that Template is called.
My mistake because I had some conditions that should never pass.


texts: How can I modify my cart form page to complete https

texts:
I am working on my client's website https://gerrykeane.ie/ and when I add a product to the cart I get promoted a warning  message that the form page is not secure. I have updated the security certificates to my domains , but that page that is throwing error is https://gerrykeane.ie/checkout/cart/. There is a link being used in the form redirection that is not secured as I am trying to find a way to edit that to https (http://gerrykeane.ie/checkout/cart/updatePost/)
Any help will be welcome.
Thanks
Nipun


texts: Where I can file the layout file  in Magento 2

texts:
In /magento2/vendor/magento/module-theme/view/frontend/page_layout/1column.xml I see this tag update handle="empty"

Can you please explain what this mean? I thought it's an "include" tag but where is this empty.xml file?


texts: Magento2 Mass Action to Sales Order Grid

texts:
I am trying to apply a mass action to sales_order_grid but there is nothing happening. I have done so for is:

vendor_name/module_name/view/adminhtml/ui_component/sales_order_grid.xml

<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<container name="listing_top">
<massaction name="listing_massaction">
  <action name="nameofaction">
          <argument name="data" xsi:type="array">
              <item name="config" xsi:type="array">
                  <item name="type" xsi:type="string">testing</item>
                  <item name="label" xsi:type="string" translate="true">My Label</item>
                  <item name="url" xsi:type="url" path="multiorderinvoice/index/massorder"/>
              </item>
          </argument>
      </action>
</massaction>
</container>
</listing>

And vendor_name/module_name/Controller/Adminhtml/Index

<?php

namespace Vendor_Name\Module_Name\Controller\Adminhtml\Index;

use Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection;
use Magento\Backend\App\Action\Context;
use Magento\Ui\Component\MassAction\Filter;
use Magento\Sales\Model\ResourceModel\Order\CollectionFactory;

class MassOrder extends \Magento\Sales\Controller\Adminhtml\Order\AbstractMassAction
{
/**
 * Authorization level of a basic admin session
 */

/**
 * @param Context $context
 * @param Filter $filter
 * @param CollectionFactory $collectionFactory
 */
public function __construct(Context $context, Filter $filter, CollectionFactory $collectionFactory)
{
    parent::__construct($context, $filter);
    $this->collectionFactory = $collectionFactory;
}

/**
 * Cancel selected orders
 *
 * @param AbstractCollection $collection
 * @return \Magento\Backend\Model\View\Result\Redirect
 */
protected function massAction(AbstractCollection $collection)
{
    $countCancelOrder = 0;
    print_r($collection->getAllIds()); //to check the ids
    foreach ($collection->getItems() as $order) {

        //do your logic here
        $countCancelOrder++;
    }
    $countNonCancelOrder = $collection->count() - $countCancelOrder;

    if ($countNonCancelOrder && $countCancelOrder) {
        $this->messageManager->addError(__('%1 order(s) cannot be done it .', $countNonCancelOrder));
    } elseif ($countNonCancelOrder) {
        $this->messageManager->addError(__('You done it  the order(s).'));
    }

    if ($countCancelOrder) {
        $this->messageManager->addSuccess(__('We done it %1 order(s).', $countCancelOrder));
    }
    $resultRedirect = $this->resultRedirectFactory->create();
    $resultRedirect->setPath($this->getComponentRefererUrl());
    return $resultRedirect;
}
}

Actually I want to get print of specific fields from all order invoices as a single invoice for admin but my first concern is triggering some action, for this I am using above code for now.

And in Vendor_Name/Module_Name/etc/adminhtml/routes.xml

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
<router id="admin">
    <route id="abc" frontName="abc">
        <module name="VendorName_ModuleName" before="Magento_Backend" />
    </route>
</router>

Any help will be appreciated.


texts: Magento2: Need to get customer detail after guest checkout when enter the email

texts:
I need to get customer details(first name, last name so on) after guest checkout when submitting the email and without creating an account.

For more detail please check secreenshot:

After placing the order


texts:
I want to get RMA returns details by current registry or by order id.

How can i load RMA by registry or order id?

Any help or hint will be appreciated.


texts: Magento 1.9 :Product images missing in backend but not in the frontend

texts:
I am Facing an issue,that product images are missing from ‘Images’ tab of product edit form, but they are displaying fine in the front-end.

Screenshort:


texts:
I want SKU value of product's selected custom option on onepage.

Can somebody help me on this ?

Thank you.


texts: Invoice PDF Not supports Arabic characters : Magento 2.1.7

texts:
I have a problem in Arabic encoding in invoice pdf print ( alaways appears like squares), but I found this library :
https://github.com/rossmc/SalesPdfFonts

But Arabic characters are separated and reversed

Can any body help


texts: Blank page after searching for keywords for products magento 2

texts:
I am trying to search for products using keywords for the products to be rendered in frontend using my custom plugin.
After i search for the keyword, i get a log for the products searched but it shows blank page,without any debug or exception logs.

How to i find out the errors or which module ?


texts: how to load phtml in static block with loading data from custom module block for fetching current logged in information magento 2?

texts:
Actually i am trying like this

  mage\app\code\Inkind\Navdata\Block\Index\Current.php

<?php
namespace Inkind\Navdata\Block\Index;
class Current extends \Magento\Framework\View\Element\Template
{
    private $_objectManager;
    protected $_customerSession;
    protected $_customer;
    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Framework\ObjectManagerInterface $objectmanager,
        \Magento\Customer\Model\Session $customerSession,
        \Magento\Customer\Model\Customer $customer
    ){
        $this->_objectManager = $objectmanager;
        $this->_customerSession = $customerSession;
        $this->_customer = $customer;
        parent::__construct($context);
    }

   public function getCurrentCustomer()
    {
    echo "Test";die;
        $context = $this->_objectManager->get('Magento\Framework\App\Http\Context');
        $isLoggedIn = $context->getValue(\Magento\Customer\Model\Context::CONTEXT_AUTH);
        $customerSession = $this->_objectManager->create('Magento\Customer\Model\SessionFactory')->create();
        echo "1";
        if ($isLoggedIn == 1) {
        echo "2";
            $customer_id = $customerSession->getCustomer()->getId();
            $customerData = $this->_customer->load($customer_id);
            $data['name'] = $customerData->getName();
            $data['email'] = $customerData->getEmail();
            //return $data;
        }
    }

        /* public function getCustomerName(){
        return $this->_customerSession->getCustomer()->getName();
    } */

}

  mage\app\code\Inkind\Navdata\view\frontend\templates\content.phtml

<?php
    $block->getCurrentCustomer();

    //echo $block->getCustomerName();
    //var_dump($customerData);
    //echo $customerData->getName();
    //echo $customerData->getEmail();
    /* if($isLoggedIn) {
       $customerSession = $objectManager->get('Magento\Customer\Model\Session');
        $customerSession->getCustomer()->getId();
        $name =   $customerSession->getCustomer()->getName();
        $email=  $customerSession->getCustomer()->getEmail();
        $customerSession->getCustomer()->getGroupId();
        $customer_logged_in = $customerSession->isLoggedIn();

    } */

?>

Now i am calling this block with phtml file like below shown

{{block class="Inkind\Navdata\Block\Index" template="Inkind_Navdata::content.phtml"}}


texts: how to active first menu default without using hover

texts:
I m using this extension mega menu in magento 1

When i click a parent menu how default show a 1st child and 1st sub child

css:

.nocustom ul{
   opacity: 1 !important;
   visibility: visible !important;
   filter: alpha(opacity=100);
   left: 120%;
   top: 30px;
}

script

jQuery('.parentMenu').mouseover(function() {

 jQuery('.subcate:first-child').addClass('nocustom');

});

output

I excepted like this menu


texts: Unique constraint violation found when placing order in magento 2

texts:
I am getting the error of Unique constraint violation found when placing an order in the Magento 2.

  When I checked the log file it shows like this -> main.INFO:
  Reference to undeclared plugin with name
  'stockedProductsFilterPlugin'. [] [].

I followed this article to solve this :

  https://magecomp.com/blog/fix-unique-constraint-violation-found-magento-2-checkout-after-migration/.

It worked for the first time but after that, it again shows Unique constraint violation found. Please help me to solve this.


texts: show all checkout page error in popup or alertbox for mobile device magento 2.2.4

texts:
In magento for mobile device when any error occurs , it is not shown to customer properly and it disappear so quick that the customer has no idea why the checkout is not working , so the client want to add popup message for all types of error that appear on the checkout page for mobile devices .
currently the error messages are displayed in this div

Unable to save shipping information. Please check input data.

i found the similar question https://stackoverflow.com/questions/59147608/magento-2-show-checkout-messages-in-popup , but no solution for it .
i also tried to overwrite Magento_Payment/templates/transparent/iframe.phtml with this
 <?php elseif (isset($params['error_msg'])): ?>
      var require = window.top.require;
      require(
          [
              'jquery',
              'Magento_Ui/js/model/messageList',
              'mage/translate',
              'Magento_Checkout/js/model/full-screen-loader',
              'Magento_Ui/js/modal/alert'
          ],
          function($, globalMessageList, $t, fullScreenLoader, alert) {
              var parent = window.top;
              $(parent).trigger('clearTimeout');
              fullScreenLoader.stopLoader();
              alert({
                  title: 'Payment Failed',
                  content: '<?= /* @escapeNotVerified */ json_encode($params['error_msg'])?>',
                  actions: {
                      always: function(){
                          window.scrollTo(0,0);
                          globalMessageList.addErrorMessage({
                              message: $t(<?= /* @escapeNotVerified */ json_encode($params['error_msg'])?>)
                          });
                      }
                  }
              });
          }
      );

that also did not help much as the messages are still appearing in the checkout-cart-validationmessages-message-error div above the  checkout like this

i want it to appear in popup so it could be visible to the user if he has scrolled down the page .
ps : i know some says that we could stop the disappearing of error message but i need it to be shown in popup as it will ensure the user has seen the error , as he will need to cancel the popup manually  and will not complain that he did not see any message .
please help .


texts: How to override the checkout_cart_configure.xml template file into custom module

texts:
I want to change button text into the update cart.I have add into the my custom code but overriding is not working.please refer the my following code

  vendor\magento\module-checkout\view\frontend\layout\checkout_cart_configure.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
    <link src="Magento_Checkout::js/view/configure/product-customer-data.js"/>
</head>
<update handle="catalog_product_view"/>
<body>
    <referenceBlock name="head.components">
        <block class="Magento\Framework\View\Element\Js\Components" name="checkout_cart_configure_head_components" template="Magento_Checkout::js/components.phtml"/>
    </referenceBlock>
    <referenceBlock name="product.info">
        <block class="Magento\Checkout\Block\Cart\Item\Configure" name="checkout.cart.item.configure.block"/>
    </referenceBlock>
    <referenceBlock name="product.info.addtocart">
        <action method="setTemplate">
            <argument name="template" xsi:type="string">Magento_Checkout::cart/item/configure/updatecart.phtml</argument>
        </action>
    </referenceBlock>
    <referenceBlock name="product.info.addtocart.additional">
        <action method="setTemplate">
            <argument name="template" xsi:type="string">Magento_Checkout::cart/item/configure/updatecart.phtml</argument>
        </action>
    </referenceBlock>
</body>

Into my custom module layout file

  app\code\Vendor\Module\view\frontend\layout\checkout_cart_configure.xml

<?xml version="1.0"?>
 <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceBlock name="product.info.addtocart">
        <action method="setTemplate">
            <argument name="template" xsi:type="string">Cirklestudio_Customproduct::cart/item/configure/updatecart.phtml</argument>
        </action>
    </referenceBlock>
    <referenceBlock name="product.info.addtocart.additional">
        <action method="setTemplate">
            <argument name="template" xsi:type="string">Cirklestudio_Customproduct::cart/item/configure/updatecart.phtml</argument>
        </action>
    </referenceBlock>
</body>

  app\code\Vendor\Module\view\frontend\templates\cart\item\configure\updatecart.phtml

<?php

echo "worked";

Please refer following screenshot:

Please provide me the solution how to override them
Thanks


texts: Garbage characters being saved in Payment method input text fields

texts:
I was playing with one store and noticed some weird behavior.
When I tried to edit the Payment Methods title, it saved as garbage characters. Refer the snapshot.

Garbage characters was saved not only in titles but all the input text fields with some values.


texts:
I'm using Magento's new 1.9.1 theme and I found that the order emails were not send. I found out this was caused because in the new edition you need to schedule a cron to send the mails.

This cron.php was already present in the root

// Change current directory to the directory of current script
chdir(dirname(__FILE__));

require 'app/Mage.php';

if (!Mage::isInstalled()) {
    echo "Application is not installed yet, please complete install wizard first.";
    exit;
}

// Only for urls
// Don't remove this
$_SERVER['SCRIPT_NAME'] = str_replace(basename(__FILE__), 'index.php',
$_SERVER['SCRIPT_NAME']);
$_SERVER['SCRIPT_FILENAME'] = str_replace(basename(__FILE__), 'index.php',
$_SERVER['SCRIPT_FILENAME']);

Mage::app('admin')->setUseSessionInUrl(false);

umask(0);

$disabledFuncs = explode(',', ini_get('disable_functions'));
$isShellDisabled = is_array($disabledFuncs) ? in_array('shell_exec',
$disabledFuncs) : true;
$isShellDisabled = (stripos(PHP_OS, 'win') === false) ? $isShellDisabled : true;

try {
    if (stripos(PHP_OS, 'win') === false) {
        $options = getopt('m::');
        if (isset($options['m'])) {
            if ($options['m'] == 'always') {
                $cronMode = 'always';
            } elseif ($options['m'] == 'default') {
                $cronMode = 'default';
            } else {
                Mage::throwException('Unrecognized cron mode was defined');
         }
     } else if (!$isShellDisabled) {
        $fileName = basename(__FILE__);
        $baseDir = dirname(__FILE__);
        shell_exec("/bin/sh $baseDir/cron.sh $fileName -mdefault 1 > /dev/null 2>&1 &");
        shell_exec("/bin/sh $baseDir/cron.sh $fileName -malways 1 > /dev/null 2>&1 &");
        exit;
    }
}

    Mage::getConfig()->init()->loadEventObservers('crontab');
    Mage::app()->addEventArea('crontab');

    if ($isShellDisabled) {
        Mage::dispatchEvent('always');
        Mage::dispatchEvent('default');
    } else {
        Mage::dispatchEvent($cronMode);
    }
} catch (Exception $e) {
    Mage::printException($e);
    exit(1);
}

I've done some research on Google, and as far as I can understand only the following line has to be added

*/5 * * * * wget -O /dev/null -q http://www.YOURDOMAIN.com/PATH_TO_MAGENTO/cron.php > /dev/null

Does this line need to be added to cron.php? And is that all it takes to send the emails?


texts: How get new installed product attribute in magento (using helper) on category pages

texts:
I've installed new product attribute using my module script - mysql4-install-1.0.0.php:

<?php
$installer = $this;
$installer->startSetup();
$setup = new Mage_Catalog_Model_Resource_Eav_Mysql4_Setup('core_setup');
$setup->addAttribute('catalog_product', 'product_display_price', array(
'group'             => 'Prices',
'label'             => 'Webdevelop Extensions - Display Price',
'type'              => 'int',
'input'             => 'select',
'backend'           => '',
'frontend'          => '',
'source'            => 'eav/entity_attribute_source_boolean',
'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
'visible'           => true,
'required'          => false,
'user_defined'      => false,
'searchable'        => false,
'filterable'        => false,
'comparable'        => false,
'visible_on_front'  => false,
'visible_in_advanced_search' => false,
'unique'            => false,
));
$installer->endSetup();

This attribute ('product_display_price')

I can take on product pages, using var_dump(getProductAttributeValueDisplayPrice()) on my rewrite block.
But when I take it on category pages I get null. the problem is that I can not catch the product on category page to read your attribute.

I use helper file Data.php:-

public function getProductAttributeValueDisplayPrice()
{
$currentProduct = Mage::registry('current_product');
if ($currentProduct) {
    $product_id = $currentProduct->getId();
    $product = Mage::getModel('catalog/product')
        ->load($product_id);
    $attribute = $product->getData('product_display_price');
    return $attribute;
}else null;
}


texts: How to get helper instance on Magento 2.1?

texts: I tested all methods that I found that were reported here all about Magento 2.0, but seems like Magento 2.1 is different, how can I do that?


texts:
One strange thing is happing in my application, I have one custom link in my email. On development server everything works fine, but on production server when I clicked the link nothing happens,

Blank page, I tried to die inside controller,  but my looks like my page is not reaching the controller .

Does anyone face this before


texts:
I completed my website and before launch, I needed to transfer my website to another domain. As soon as I transferred the files, and opened the new website, it started showing me

Fatal error : Class Varien_Autoload not found in mage.php on line 54

I don't know where it went wrong, and am really in a helpless state right now. I searched on internet, but everywhere they say to disable compilation. The website already had compilation disabled. I also checked for the include path by putting the below code in mage.php above Varien_Autoload::register();

var_dump(get_include_path());

And I got this path as in result:

string(81) "/home/pavaiyacart/public_html/main/includes/src:.:/usr/lib/php:/usr/local/lib/php"


texts: I got 700 Newsletter subscribers per day for my site, the subscriber name and email id not relevant. What is the possible way to prevent. I think these are all spam accounts.


texts: Magento2 - Add new field to new step in magento 2!

texts:
I'm doing "add new field to new step" in checkout page in magento2, i've added new step to chekout page in magento 2 with name "Pharmacy Questions"

Now, i'd like "add a new field form with input type is text to step "Pharmacy Questions". Add a new field same field "Email address" in step "Shipping" .
Please, help me, give me a hint! Thank you!


texts:
I'm just wondering if anybody has figured out how to list the output of:

magento module:status

in alphabetical order?  Right now it seems to output them in some random order that doesn't make sense to me.


texts: Magento 2 where is app/code/magento pool

texts:
In the RC candidates and the CE available via GitHud app/code/magento pool is included. In the distro from magento's website the pool is missing, where is the pool stored? I ask because I am getting messages saying that the Massgenerator does not exist:

a:4:{i:0;s:72:"Class Magento\Salesrule\Model\Coupon\MassgeneratorFactory does not exist";i:1;s:13600:"#0 /chroot/home/html/mag2a/vendor/magento/framework/ObjectManager/Definition/Runtime.php(44):

However the exact same code run on the CE distro containing the code/magento pool handles the code just fine.


texts: Validation for zip code field on checkout page in magento 2

texts:
I try to apply validation for postal code on checkout like 4 numbers and 2 characters(A-Z) ex: "9999AA".

Now, by default, if I press an invalid postal code on checkout page, I receive a message likes the screen-shot below: But even If I don't change the postal code, I press next and finish my order.
Does anyone know how to solve this problem?
I found this link for javascript validation in magento 2 magento2 validator but I don't know where I can apply  this validation validate-zip-international and then to modify this validation rule base on my format.
Or is there another way to create a validation rule on zip code?


texts: Which Magento modules allow to set tiered pricing depending on category?

texts: May I ask for a recommendation for a module to offer tiered pricing across a category?  We have a sale coming up.  We want tiered pricing but have a couple hundred products.


texts: reindex failure - Class 'Magento_Db_Adapter_Pdo_Mysql' not found

texts:
I recently upgraded our shop to Magento 1.9.3.2
but we've had indexing issues since.

when I run the reindex command:-

php -f /var/www/shell/indexer.php reindexall

I get this error:-

  PHP Fatal error:  Class 'Magento_Db_Adapter_Pdo_Mysql' not found in /var/www/app/code/core/Mage/Core/Model/Resource.php on line 175

I get the exact same error for these commands:-

php -f compiler.php clear
php -f compiler.php disable

we tried changing the permissions to 775 on this file (where the class id defined)

/var/www/lib/Magento/Db/Adapter/Pdo/Mysql.php

but it didn't help.

Can anyone suggest how we can resolve this?


texts: Unknown directory type while generate file in custom folder : Magento 2

texts:
I am generating packing slip of an order. its directly generate successfully in Media directory. but we need to generate inside "packingslip" folder. (media/packingslip).

While we change directory media to custom we are getting below error.

Unknown directory type: 'pub\/media\/packingslip\

packing slip directory generated successfully but still, we are getting an error.

Can anyone know how we can resolve an issue?

$this->fileFactory->create(
            $fileName,
            $pdfFileData['filestream'],
            DirectoryList::MEDIA.'/packingslip',
            'application/pdf'
        );

Thanks,


texts:
How to show Show out product atlast in Magento 2

I followed this

<?php

namespace Company\Module\Model\Plugin;

class Layer
{

    /**
     * @param \Magento\Catalog\Model\Layer $subject
     * @param $collection \Magento\Catalog\Model\ResourceModel\Product\Collection
     * @return mixed
     */
    public function afterGetProductCollection(\Magento\Catalog\Model\Layer $subject, $collection)
    {

            $collection->getSelect()->joinLeft(
                ['_inventory_table' => 'cataloginventory_stock_item'],
                "_inventory_table.product_id = e.entity_id",
                ['is_in_stock']
            );

            $collection->setOrder('is_in_stock', 'DESC');
            $collection->setOrder('created_at', 'DESC');
       //echo $collection->getSelect();
        return $collection;
    }
}

but it's not working


texts:
I am having image url as

http://www.yakshinfotech.com/wp-content/uploads/2016/03/Laptop-Repair.jpg

which I need to set for my products. I have tried by setting product image url:

$productId = 1;
$product = $this->_product->load(1);
$existingMediaGalleryEntries = $product->getMediaGalleryEntries();
foreach ($existingMediaGalleryEntries as $key => $entry) {
    unset($existingMediaGalleryEntries[$key]);
}
$product->setMediaGalleryEntries($existingMediaGalleryEntries);
$this->_productRepository->save($product);

public function saveImg()
{
   $imageUrl = 'http://s6.favim.com/610/150425/adorable-animal-cat-cute-Favim.com-2680526.jpg';
   $product->addImageToMediaGallery($imageUrl, array('image','small_image', 'thumbnail'), false, false);
   $product->save();
}

But this code displays error as image not found.
What I need to do to set product image as url?


texts: How to get access from another store in magento?

texts:
Still i have been maintaining a single store on world wide in Magento.Now I have created an new store for UK folks. Hereafter they will redirected to UK store, when they open Main store.

Still here, All are working good. But My doubt is, already being customer can access their account from UK store? If change the store Id of the customer, Its possible, I think. But Its too hard to find who is UK customers. Is there any possible way to access their account from another store?

Please Help me guys. Awaiting for your suggestion.

Thank you

EDIT

Is there any extension with this feature? or could we get IP address of customer when they create an account?

I have found a way to change the customer's website by editing in app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php

as follows

 `$this->_setFieldset($customer->getAttributes(), $fieldset);

    if ($customer->getId()) {
        $form->getElement('website_id'); // ->setDisabled('disabled');
        $form->getElement('created_in')->setDisabled('disabled');
    } else {
        $fieldset->removeField('created_in');
    }`


texts: CSS files not update with _extend.less rules

texts:
I has installed magento 2 version 2.0.7-0, I trying to create my own theme but I can get archive that styles in _extend.less work correctly.

This is my path theme:

/app/design/frontend/<vendor>/<themeName>

Inside the themeName I has created this folder structure:

.../<themeName>/web/css/source/

and put two files in source folder: _extend.less and _slider.less, _extend.less file import _slider.less as follow:

/* _extend.less file */

@import '_slider.less';

And in _slider.less file I include this rules:

/* _slider.less file */

#slider-home {
    .owl-carousel {
        list-style: none;
        padding: 0;
    }
}

I have done magento in developer mode, I trying compile less files in browser instead server php less compiler, I deleted all files in static folder except .htaccess and regenerated with

magento setup:static-content:deploy

and nothing work, rules inside _slider.less not found in any css file generated in static folder.

Any ideas?


texts: Express checkout API authentication fields in magento-1.9 disappeared

texts: Paypal express checkout API authentication field box not showing. Here is the image http://i.stack.imgur.com/NovsO.jpg (marked box is not showing from magento-1.9 admin )


texts:
How can I write custom query in Magento 2 format
I need following query in Magento 2 format,

SELECT * FROM ( SELECT * FROM TABLE_NAME WHERE customer_id IN ( 0, 5 ) ORDER BY feed_id DESC ) AS t1 GROUP BY position limit 0,5


texts: Magento turn off URL rewrites for invisible products

texts:
I have my products made as "configurable products" and it's around 300 of them. And they have around 10-20 simple products associated (each). But 2 of my configurable products have around 3000 simples.
So it is around 10.000 simple products that are set to 'not visible individually'. And of course magento creates for them url rewrites, and reindexing it takes too long.
Is it possible to turn off url rewrites for 'not visible' products?


texts: Upgrade Extension from 1.9 to 2.0 - Code Refactoring

texts:
I have my extension developed in CE 1.9.2. What are the requisites to upgrade it  to 2.0.

Is there any tool available that converts the directory structure of
1.9 into 2.0 ?
If I do it manually, what are the steps involved to convert upgrade
it to 2.0 ?


texts: Get highest en lowest value from attribute

texts:
On the category page I have an attribute showing values, that attribute can have multiple values and will show all the values separated by commas. Is there a way to get the highest value from the attribute and also the lowest?

What is have to display the values:

<?php if ($_product->getResource()->getAttribute('scherm_breedte')->getFrontend()->getValue($_product)): ?>
    Breedte: <?php echo $_product->getResource()->getAttribute('scherm_breedte')->getFrontend()->getValue($_product); ?>
<?php endif; ?>


texts: Magento EE1.14 Order View not showing order details PHP 7.4

texts: I just updated my PHP version from 5.6 to 7.4. I didn't apply a security patch for Magento because most of the core code has been customized to work for our websites. I have made changes in all the files mentioned by the patch though. Now the problem I am facing is that whenever I click on an order it opens an empty page. Does not display any errors on system or exception log even after Magento backend debugging was enabled. Any help would be appreciated.thanks!


texts:
How we can run cron through magento without cpanel?

I want to run directly through the magento without using capnel.


texts: Adding a custom attribute to magento backend category pages on second category levels

texts:
I am trying to display a custom attribute in the backend of magento on the category pages where the category levels are 2nd level.

I found an tutorial online which enabled me to add a custom attribute to the category pages. The code that I am currently using is:

require_once "app/Mage.php";

Mage::app()->setCurrentStore(Mage::getModel('core/store')->load(Mage_Core_Model_App::ADMIN_STORE_ID));

$installer = new Mage_Sales_Model_Mysql4_Setup;

$attribute  = array(
    'type' => 'text',
    'label'=> 'Out of stock msg',
    'input' => 'text',
    'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
    'visible' => true,
    'required' => false,
    'user_defined' => true,
    'default' => "",
    'group' => "General Information"
);

$installer->addAttribute('catalog_category.level', 'out_of_stk', $attribute);

$installer->endSetup();

Any ideas as to how I go about only applying this to second level categories? Thanks


texts: Magento 2 "we can't find products matching the selection" page cache invalidates

texts:
Update: I believe this issue may have been caused by a crossover between the cron:run & indexer:reindex cron jobs running every minute, I have changed the reindex job to run every hour instead of every minute and so far the FPC has not invalidated

Magento 2.1.7 installation

Cron jobs set to run every minute (cache clear, reindex etc)
Using either built-in or Varnish (TTL attribute removed from XML due to disappearing navbar)

It seems that the something is causing the "no products" message regardless of whether the full page cache is enabled or disabled, as soon as the cache is cleared (manually or by cron) then the products will reappear upon refresh.

But it is not good for the customers to be browsing pages and then be shown an empty page.

The cache is invalidating regardless of whether changes are made to the catalog or not. Perhaps one of the other cron jobs is invalidating the cache?

List of cron jobs:

/public_html/update/cron.php > /dev/null
/public_html/bin/magento cron:run > /dev/null
/public_html/bin/magento indexer:reindex > /dev/null
/public_html/bin/magento cache:clean > /dev/null
/public_html/bin/magento setup:cron:run > /dev/null

Hoping someone has suffered a similar issue with a fix

RM


texts:
I found it is hard to show the attributes in Description.phtml,it is hard to me.

i wish to show some attributes as Brand,Color,Name in Description.phtml ,i copied the attributes.phtml and change some code,but i got Blank ...

anyone help ?

Description.phtml is :

 <?php $_description = $this->getProduct()->getDescription(); ?>
    <?php if ($_description): ?>

<?php echo $this->__('Details') ?>

             <?php echo $this->helper('catalog/output')->productAttribute($this->getProduct(), $_description, 'description') ?>

     <?php endif; ?>


texts: Add data to Mage_Shipping_Model_Rate_Request

texts:
I need to add a value to Mage_Shipping_Model_Rate_Request depending on user selection.

To be more detailed: the frontend shows a checkbox depending on the selection (or not) of the checkbox my shipping model (extends Mage_Shipping_Model_Carrier_Tablerate) should recalculate different rates in the overloaded public function collectRates(Mage_Shipping_Model_Rate_Request $request).

Question.

Where can i inject the value of the user input from?
Which class should i overwrite/observe?


texts: How can I erase the "also please add" text in this website

texts:
I'm trying to edit the home page of this website and until now I have been able to find most of the .phtml files but I haven't been able to find the file or menu that has this text at the end of the website (screen print https://snag.gy/jCcpgo.jpg ). Please help!

I already went to CMS/Pages/"home page". I found the Home.phtml file and the footer.phtml file and non of them have the text


texts: Add extra wysiwyg block to cms page form

texts:
I've been trying to work out how to add a new wysiwyg block on my cms page form as I need 2 different blocks on each page.

I've been looking into the Cms module and I guess I need to extend view/adminhtml/ui_component/cms_block_form.xml in some way, but I'm not sure how, can someone point me in the right direction please?


texts: Magento Editor showing Denied Message in image

texts: I am using magento version 1.9.2.4 and trying to insert image using editor. when press the add/insert image from editor a popup shows me "Denied" Message instead of image uploading option. please check the below screen.


texts: How to apply product filters from homepage

texts:
I want a functionality in which I want a filter form in homepage. When a customer submit that form it should redirect to a category page with the products filtered by their selection in from.

Suppose

  we have 2 attributes: Player level & Gender. When customer select their option from form and submit form, then customer should
  redirect to the category with filtered products.

Till now I have prepared a form with required attributes in homepage. And on its submission I am getting its value in separate controller.

Please let me know the solutions for it.


texts: How to get payment form data in my observer execute method

texts:
i am trying to save the payment method custom field in magento2 to payment related table. my observer is triggering but i am not able to get the custom field data.
observer class

namespace Vendor\Module\Observer;
use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\Event\Observer;

class PaymentAssignData implements ObserverInterface {

    /**
     * @var ObjectManagerInterface
     */
    protected $_objectManager;

    /**
     * @param \Magento\Framework\ObjectManagerInterface $objectManager
     */
    public function __construct(
    \Magento\Framework\ObjectManagerInterface $objectManager,
            \Psr\Log\LoggerInterface $logger
    ) {
        //die(__METHOD__);
        $this->_objectManager = $objectManager;
        $this->logger = $logger;
    }

    public function execute(Observer $observer) {
        $quoteId = $order->getQuoteId();
         $payment = $order->getPayment()->getData('additional_data','custom_field');;
         $quote = $this->quoteFactory->create()->load($quoteId);

    }

}

my custom field are added thhrough LayoutProcessor.


texts: How to know if simple product is associated with a grouped product?

texts:
Excuse me for my english.

I want to know if there are a possibility to know on backend  if a simple product have associated with a grouped product. Also if there is an option to know how many grouped products have this simple product associated and their ID's.

All this questions are related with admin Panels magento panel admin. It is possible to make it with catalog grid with filters and attributes.

Any ideas?

Thank you!


texts: Magento 2 - Best practice to modify third party extension

texts:
I need to modify a template from a third party extension to match my current theme. In the extension layout xml file

  app\code\IWD\Opc\view\frontend\layout\checkout_index_index.xml

<action method="setTemplate" ifconfig="iwd_opc/general/enable_in_frontend">
    <argument name="template" xsi:type="string">IWD_Opc::onepage.phtml</argument>
</action>

I can either change the template path in the layout xml file, or edit the onepage.phtml. But I don't want to change the original file. How to do it the right way?


texts: Tax showing twice in cart and invoice etc but calculating correctly

texts:
Tax is calculated correctly but it is showing twice in shopping cart and invoices. See an example in the below image GST and Tax is shown which is the same (10% GST).

How can I show just one, preferably GST?


texts: Get all simple products of a category including not visible individually products - Magento 2

texts:
I need to get all simple products of a category. By using the following code, I'm getting only products which has visibility of Catalog, Search but not Not Visible Individually products.

$categoryId = 12;
$categoryFactory = $objectManager->create('Magento\Catalog\Model\CategoryFactory');
$category = $categoryFactory->create()
    ->load($categoryId)
    ->getProductCollection()
    ->addAttributeToSelect('*')
    ->addAttributeToFilter('type_id', 'simple');

I need all simple products regardless of its visibility. How can I achieve this?


texts: Getting 302 redirect issue by adding a product to wishlist

texts:
This is the url for the wishlist:

<?php echo $this->helper('wishlist')->getAddUrl($item) ?>

It works. It puts the product to the wishlist. But instead of redirecting me to the wishlist list. It shows me that "The page isn't redirecting properly" and the firebug displays the 302 error message. What should I check/change to make this work ?


texts: How to run the this code for Magento 2.3 version

texts:
I run the following code in magento2.3 but it's showing  Class \Mastering\Itdesire\Setup\Mastering\Itdesire\Setup\InstallData does not exist error.
Content of InstallData.php:
<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace Mastering\Itdesire\Setup;

/**
 * Description of InstallData
 *
 * @author pramod
 */
namespace Mastering\Itdesire\Setup;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;

class InstallData implements InstallDataInterface
{
    /**
     * {@inheritdoc}
     */
    public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
    {
        $setup->startSetup();

        $setup->getConnection()->insert(
            $setup->getTable('mastering_itdesire_item'),
            [
                'name' => 'Item 1'
            ]
        );

        $setup->getConnection()->insert(
            $setup->getTable('mastering_itdesire_item'),
            [
                'name' => 'Item 2'
            ]
        );

        $setup->endSetup();
    }
}


texts: Sku field null in category_product_flat tables

texts:
We have a store, Magento 1.6 with circa 4500 products. Half of the products approx are having this issue:

Symptoms...

Admin Product Grid -> sort by SKU causes a fatal error.

Admin Product Grid -> searching for some products by sku yields no result (but they are in the grid and have a numeric sku set)

Frontend -> the products look and work fine, but cannot be found by searching the sku

Edit...

It seems that the products that are not working dont have an entry in:
catalog_product_entity_varchar

If I edit a product, change the sku, save, then re-edit and restore the original sku its all back to normal and working again. dont want to do that 2500+ times. Do you think I can programatically rebuild the missing sku entries in catalog_product_entity_varchar ? is there a better route?

Looking in the category_product_flat tables, the sku field for the broken products is set to null. Why would the sku data not carry over from the main catalog_product_entity table?

any help or pointers greatly appreciated, im out of ideas!

Final Edit....

I wrote a simple script that went through each product, looked for a matching sku entry in the _entity_varchar table, and if one did not ecist it inserted a row. Then I ran the indexing process fully and the problem seems to be resolved. Searching for those skus in the frontend and backend is now working as expected, and the flat tables have sku values.

Something went wrong, but hopefully its ok now.