texts:
For certain reason, i have to prevent the users to add the product into the cart.

here is the event in config.xml

<events>
    <controller_action_predispatch_checkout_cart_add>
        <observers>
            <abc_findp>
                <type>model</type>
                <class>Abc_Findp_Model_Observer</class>
                <method>searchStock</method>
            </abc_findp>
        </observers>
    </controller_action_predispatch_checkout_cart_add>
</events>

Observer:

public function searchStock($observer) {

    //how to prevent a product be added to a cart?
    Mage::getSingleton('core/session')->addNotice('This product can't be added to shopping cart.');

}

Or i need to use checkout_cart_product_add_after event, to remove the quote item after added into a cart?

Thanks.!


texts: How to get collection that Filter by layer navigation?

texts:
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$category = $objectManager->get('Magento\Framework\Registry')->registry('current_category');
$rows = explode('&', $_SERVER['QUERY_STRING']);
echo "Total Parameter : ".count($rows);
print_r($rows);
$para = count($rows);
if ($para == 2)
{
     $arr1 = $rows[0];
     $arr_first_param = explode("=",$arr1);
     $arr2 = $rows[1];
     $arr_second_param = explode("=",$arr2);
     $ProductCollection = $category->getProductCollection()->addFieldToFilter($arr_first_param[0],['eq' => $arr_first_param[1]])->addFieldToFilter($arr_second_param[0],['eq' => $arr_second_param[1]]);
}
$products=$objectManager->create('\Magento\CatalogInventory\Helper\Stock');
$products->addInStockFilterToCollection($ProductCollection);
$count = count($ProductCollection);
echo $count;


texts:
just to check if the download file is correct.
The name of the patch for CE 1.9.1.0 is:

PATCH_SUPEE-8167_EE_1.14.1.0_1.14.3.2_v1-2017-05-08-02-42-22

Is that correct? Because it seems that it is a patch for Enterprise Edition (EE).
Thanks in advance
francesco


texts: Adding HTML5 Input Attribute to Registration Form

texts:
Since, my theme does not handle form validation such as preventing symbols in text fields. I decided to use html5 input validations such as min/max for numbers and pattern for text as simple workaround.

I edited register.phtml template at /persistent/customer/form and added html5 validation attributes to email, telephone, pincode etc.

However, I was unable to find input fields of First Name and Last name. They were being generated probably by this snippet :

echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getFormData())->setForceUseCustomerAttributes(true)->toHtml();

How do I add a pattern such as pattern="[a-zA-Z0-9\s]+" to First Name and Last Name input fields


texts: What is the purpose of catalog_category_view handle in bundle.xml file?

texts:
I know that magento process catalog_category_view handle (category action handle) before processing catalog_category_default or catalog_category_layered (category layout definition handles ).

Magento is using category layout definition handles for defining category layouts. Especially these handles actually defines product_list block. But if you look on bundle.xml file, you can see this code snippet

<catalog_category_view>
    <reference name="product_list">
        <action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/catalog/product/price.phtml</template></action>
    </reference>
</catalog_category_view>

Since product_list block is not existing when magento process catalog_category_view, then what this code actually stands for !!!!

For me, it seems that they are doing nothing...


texts:
Just went to upgrade my Magento2 installation by going to System > Web Setup Wizard and all I got was this:

I know I can upgrade via the command line from this excellent answer here, but I was wondering if this error I am experiencing is normal? Or does it indicate something else has gone horribly wrong somewhere?


texts: Online Customers with 0.0.0.0 IP address?

texts:
We are seeing "online customers" in Magento with a 0.0.0.0 IP address !?

I know that isn't a valid IP address, so I'm curious what that indicates?


texts: Magento 2: how to Add New Table in database

texts: Magento2:how to Add New Table in database using code.


texts: should I upgrade the version to 1.9 or should I write a custom extension?

texts:
I am new to magento and using magento 1.7 .A custom theme is used currently which is not showing any features of a configurable product.

I tried to add the configurable product but it doesn't show up in the front-end like a configurable product would show with its features (user select option, corresponding price,image etc.).

I got to know that magento 1.9 version has this feature which can be easily handled.  So I am confused. What should I do ?

Should I upgrade the version ?   or
should I spent time towards writing an extension which will fulfill the requirement of a configurable product ?


texts:
I have created a custom module and set a cronjob, like this:

Mymodule/Sales/etc/config.xml

<crontab>
    <jobs>
        <mymodule_sales_synch_orders>
            <schedule>
                <cron_expr>*/10 * * * *</cron_expr>
            </schedule>
            <run>
                <model>s1sales/schedule::synchOrders</model>
            </run>
        </mymodule_sales_synch_orders>
    </jobs>
</crontab>

In Mymodule/Sales/Model/Schedule.php:

class Mymodule_Sales_Model_Observer extends Mage_Core_Model_Abstract
{
    public function synchOrders(){
        Mage::log('synchOrders() start', null, 'Mymodule.log');
        if (Mage::helper('s1sales')->isSynchEnabled()){
            Mage::getModel('s1sales/order_synch')->synchOrders();
        }
        return $this;
    }
}

Seems out that synchOrders() function is never executed.
I'm struggling to find a solution but can't see what's wrong with this. Any ideas?

*I have checked that log is enabled and Mymodule.log file is writable, in case someone asks.


texts:
I want to show a horizontal sorting options in magento product category page. I found many extensions in magento extension store. But non of them have horizontal feature. All of them have drop down sorting system.

Here you can see a screenshot of my requirement - http://awesomescreenshot.com/0b357leyed

If anyone know how to do it, or any third party extension, please do let me know


texts:
So what i want to do is have domain.com as a main domain. static.domain.com (that uses the files of domain.com) as my static view url and media.domain.com (that also uses the files of domain.com) for all my media files.

Now everything seems to work on the DNS side of things.

If i would go to static.domain.com/path/to/css/file.css then this works fine and i see the css in the browser.

But if i would browse to domain.com suddenly static.domain.com/path/to/css/file.css becomes domain.com/path/to/css/ which ofcourse is not correct and i have a console full with 'not found'

Any idea why this is happening? What Magento settings can cause this? Anyone any experience with these kind of things?

Thanks in advance!

Update

This is an example :
Url static -> https://static.domain.com/frontend/vendor/theme/nl_NL/mage/calendar.css

Redirect -> 302 Found
Url it redirects too ->
https://domain.com/nl/frontend/Designit/Multistore/nl_NL/mage/?SID=j828jng8krgjjemm5n37hn5u32

Redirect -> 404 Not Found


texts:
I'm trying to add the Discount Field in the Total section of the cart, but I don't understand where i can find the value.

I'd like to see in the cart page:

Subtotal    €2,297.00
Discount  ????
Shipping & Handling €0.00

Where can i take this information?

thanks in advance


texts: Check if attribute that is not specific value

texts:
I want to create a php if rule, that checks if a attribute got data and is not "zaterdag 1 januari 2000".

If it is not empty or does not have the value "zaterdag 1 januari 2000", it should display some text.

I currently display the attribute with this line:

<?php if($_product->getData('nieuwe_voorraad')) : ?>

How can I achieve that?


texts: 'changefreq' => 'weekly' is not showing in xml after generated xml in Custom URL Magento 2

texts:
use Magento\Framework\App\ObjectManager;
use Magento\Framework\DataObject;
class Sitemap extends \Magento\Sitemap\Model\Sitemap
{

    public function getCustomurlCollection()
    {
        $siteMapcollection = array();
        /* if want to add multiple url then load your custom collection and set  */

           /*foreach ($siteMapcollection as $custom) { */
        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $storeManager = $objectManager->get('\Magento\Store\Model\StoreManagerInterface');
        $baseurl = $storeManager->getStore()->getBaseUrl();

                    $siteMapcollection[] = new DataObject([
                        'id'         => "test",
                        // 'url'        => $baseurl,
                        'updated_at' => date("Y-m-d h:i:s"),
                    ]);
             /*     } */
            return $siteMapcollection;

    }
    public function _initSitemapItems()
    {
        parent::_initSitemapItems();

        array_unshift($this->_sitemapItems,$this->_sitemapItems[] = new DataObject([
            'changefreq' => 'daily',
            'priority' => '0.1',
            'collection' => $this->getCustomurlCollection(),
        ]));

    }

}


texts: Made a mistake in module.xml rectified it but not able to use the same module again

texts:
While creating a custom module if you gave the wrong module name, When you try to run any terminal command you will get an error like

  There are no commands defined in the “setup” namespace

Now I understand the solution from one of the answer in this question.But when I try to change the module again, I am always end up in the same error even after I update everything Or I also tried removing other files. If I keep the registration.php it shows error If I delete the registration file, it works. How can I use the same module again.


texts:
I got confused while reading Magento License page:
http://www.magentocommerce.com/license/

The sentence that made me confused is: "all contributions made to the software by you and others must be made available under the same OSL 3.0 license."

This means that, if I find an eCommerce that uses magento and they had customized one thing that I liked, I can require their source code? Is it right?

Thanks!


texts: Set transcriptional temaplate for SMTP emails in Magento 2

texts:
I want to send email using SMTP in Magento2 I tried following code

 public function execute()
{

      $smtpHost = '***.*****.***';
      $to = 'email.com' ? 'email.com' : 'test';
    $smtpConf = array(
        'auth' => 'login',
        'port' => '25',
        'ssl' => 'tls',
        'username' => 'email.com',
        'password' => '123456'
    );
    $transport = new \Zend_Mail_Transport_Smtp($smtpHost, $smtpConf);
    $from = trim('email@gmai;l.com');
    $mail = new \Zend_Mail();
    $mail->setFrom($from, 'test');
    $mail->addTo($to, $to);
    $mail->setSubject('Hello from MagePal');
    $mail->setBodyText('Thank you for choosing MagePal extension.');
    $result = __('Sent... Please check your email') . ' ' . $to;
    try {
        //only way to prevent zend from giving a error
        if (!$mail->send($transport) instanceof \Zend_Mail){echo $result;}
    } catch (\Exception $e) {
      echo   $result = __($e->getMessage());
    }

  }

And its working but I want to call transcriptional template how I can call? I have create 1 email template in admin with id 2.

Please let me know how I can call transcriptional email template of SMTP emails.


texts: Cannot upgrade from 2.3.4 to 2.3.5 because of Temando

texts:
After running this command:
composer require magento/product-community-edition 2.3.5
I get the following error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Can only install one of: temando/module-shipping[1.6.2, 2.0.0].
- Can only install one of: temando/module-shipping[2.0.0, 1.6.2].

- Can only install one of: temando/module-shipping[2.0.0, 1.6.2].

- magento/product-community-edition 2.3.5 requires temando/module-shipping 2.0.0 -> satisfiable by temando/module-shipping[2.0.0].

- Installation request for magento/product-community-edition 2.3.5 -> satisfiable by magento/product-community-edition[2.3.5].

- Installation request for temando/module-shipping (locked at 1.6.2) -> satisfiable by temando/module-shipping[1.6.2].

Also without any extra extensions in composer.json and app/code
Also after manually removing /vendor/temando
Also after removing composer.lock


texts: Looking for inspiration/module meant for guiding customers step-by-step

texts:
I'm looking for a module, or inspiration for creating a module that can do the following:

I would like to create a page inside my Magento 2 store which is named "Wizard". This Wizard can guide customers through a step-by-step process into finding exactly what it is after at the end of the process.

What do I need to go forth? Is there a module I can use for inspiration or any other source?

Example of what I am after - https://mkfresh.pl/front/wizard/

Thanks!


texts: Magento 2 redirect to external URL from controller

texts:
I want to redirect to a external URL in my controller but not in the execute() function.

This code works fine and the result is a redirect to google:

public function execute()
{
    $resultRedirect = $this->resultRedirectFactory->create();
    if ($this->session->isLoggedIn()) {
        $resultRedirect->setUrl('https://www.google.co.uk');
        return $resultRedirect;
    }
 )

However, this code is not working:

public function execute()
{
    $this->testRedirect();
 )

public function testRedirect(){
    $resultRedirect = $this->resultRedirectFactory->create();
    if ($this->session->isLoggedIn()) {
        $resultRedirect->setUrl('https://www.google.co.uk');
        return $resultRedirect;
    }
}

This code doesn't redirect and leave the page blank.

What am I doing wrong?


texts: Porto 2.1.0 in Magento 2.1.2 minicart error

texts: Hello Guys I'm having problem with my magento 2.1.2 installation in the minicart section. I have porto 2.1.0 theme installed. The problem is the minicart and this is the error in the console.


texts:
How to add more column to "category product" grid of categories admin in Magento 2.0.

If can, please show me step by step!


texts: Editing the print all button in Magento to ship orders?

texts:
My Magento install has a handy "print all" button that lets me print all my PDF  invoices and order confirmations. This is super handy, however would there be a way to extend this so that it ships the order too (and therefore marked as completed)
I don't know where to look. Thanks


texts: Badly coded module - how to explain this to other stakeholders

texts:
A client wants to integrate with a 3rd party that already have a freely available module. The only issue is the code in the module is pretty bad so I don't want to integrate it but the other stakeholders e.g. PM, Boss man and the client are struggling to understand why.

The module doesn't work out the box on vanilla magento but im sure a few fixes here and there will fix those issues - my main problem is the state of the code in the module which is always a difficult thing to convey to the stakeholders.

My question - what is the best way to communicate that the modules code is bad and full of code smells and bad practices so I don't want to integrate it to the stakeholders?


texts:
I add a custom module , it has a backend manager,when i add a menu in backend,302 errors
menu.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
    <menu>
        <add id="Magezoom_Adminmenu::adminmenu" module="Magezoom_Adminmenu" title="Magezoom" translate="title"  sortOrder="999"  resource="Magezoom_Adminmenu::adminmenu"/>
        <add id="Magezoom_Navigation::setting" title="Design" translate="title" module="Magezoom_Navigation" sortOrder="20" parent="Magezoom_Adminmenu::adminmenu" resource="Magezoom_Adminmenu::adminmenu"/>
        <add id="Magezoom_Navigation::navigation" title="Navigation" translate="title" module="Magezoom_Navigation" sortOrder="20" parent="Magezoom_Navigation::setting" resource="Magezoom_Adminmenu::adminmenu"  action="adminhtml/navigation" />
    </menu>
</config>

routes.xml

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

controller Index.php

<?php
namespace Magezoom\Navigation\Controller\Adminhtml\Index;

  class Index extends \Magento\Backend\App\Action
  {
    /**
    * @var \Magento\Framework\View\Result\PageFactory
    */
    protected $resultPageFactory;

    /**
     * Constructor
     *
     * @param \Magento\Backend\App\Action\Context $context
     * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
     */
    public function __construct(
        \Magento\Backend\App\Action\Context $context,
        \Magento\Framework\View\Result\PageFactory $resultPageFactory
    ) {
         parent::__construct($context);
         $this->resultPageFactory = $resultPageFactory;
    }

    /**
     * Load the page defined in view/adminhtml/layout/exampleadminnewpage_helloworld_index.xml
     *
     * @return \Magento\Framework\View\Result\Page
     */
    public function execute()
    {
         return  $resultPage = $this->resultPageFactory->create();
    }
  }
?>

debug.log

about 10 times

main.DEBUG: Request validation failed for action "Magento\Framework\App\Action\Forward\Interceptor" [] []

url become this:

http://magento-dev.com/admin/admin/navigation/index/key/a94a1b0e9c7dfd64a3f6cf422d5381deac7111115166375a4107dbd10c71c773/adminhtml/adminhtml/adminhtml/adminhtml/adminhtml/adminhtml/adminhtml/adminhtml/adminhtml/adminhtml/adminhtml/adminhtml/adminhtml/adminhtml/adminhtml/adminhtml/adminhtml/adminhtml/adminhtml/dashboard


texts: Why do the Magento 1 setup scripts still have to be prefixed with 'mysql4'?

texts:
MySQL4 is largely obsolete now, even Magento 1 latest versions send a warning if you use Mysql4 prefixed classes. I searched if the setup file names also had this deprecation but couldn't find a thing.

Is this a choice from the Magento team and is there a reason behind it ?


texts: Product type to use when simple product can be sold either as a unit or in a case

texts:
I have a situation where I have a product that fits the profile for a bundled product in that this product can either be sold in gallons (5 and 55 gal) and quarts (1 quart or a case containing 4 individual quarts).  The product has separate skus for both 5 and 55 gal but not for the quarts.  So I have this kind of situation:

ABC Product

sku   name                qty                            price
123   ABC Product  5 gal                            $10
321   ABC Product  55 gal                        $150
456   ABC Product  1 Quart                        $50
456   ABC Product  Case (4 Quarts)        $200

Because 456 have same sku I don't have the option to use a configurable product. I know that I can use bundled product but the problem there is I can not increase the quantity for the case as it needs to be set where user can not change quantity due to 4 quarts = 1 case.

Has anyone faced this issue before or know how it can be solved?

Thanks


texts:
I just learned about how the cron job works in Magento 2. I have created a simple job and i put * * * * * (at every minute) in <schedule> tag in crontab.xml. I enter bin/magento cron:run in terminal, my job is saved into cron_schedule table. But my job is not working. Then i tried to run the job again after a while, my job is works.

What i want to ask, isn't my job should automatically run every minute? Why i should run it manually in terminal?


texts:
I have written a js file which is like.

 $(document).ready(function(){  $('#test').click(function(){
>      Alert('coming'); }) })

I have created a custom theme which is based on luma and I have added that js file under namespace/theme/web/js and also included that js in Magento_Theme layout default_head_block.xml but it gives error $ is undefined.

Can someone suggest me how can I include that file


texts: Parse error: syntax error, unexpected '$servername' (T_VARIABLE), expecting function (T_FUNCTION) or const (T_CONST) php

texts:
I am trying to connect to a MySQL database usign PHP but am currently facing this error : Parse error: syntax error, unexpected '$servername' (T_VARIABLE), expecting function (T_FUNCTION) or const (T_CONST) in line 4.

Here is my code :

    $servername = "localhost";
    $username = "root";
    $password = "anything";

    try {
        $bdd = new PDO('mysql:host=$servername;dbname=myDB;charset=utf8', $username, $password); //connexion à MySQL
        // set the PDO error mode to exception
        $bdd->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
        echo "Connected successfully";
        $stmt = $bdd->prepare("SELECT Place, Address, Date FROM MyDB");
        $stmt->execute();
        }
    catch(Exception $e)
        {
        die('Connection failed:' . $e->getMessage()); //En cas d'erreur, on affiche un message et on arrete tout
        }
    }

        $reponse = $bdd->query('SELECT * FROM myDB'); //récupération de tout le contenu de la table MyDB
        // On affiche chaque entrée une à une
while ($donnees = $reponse->fetch())
{
?>

    Name : <?php echo $donnees['Place']; ?>

<?php
}

$reponse->closeCursor(); // Termine le traitement de la requête

?>

I've been googling this mistake already but could not find anything relatable. Thank you all for your help.


texts: How to Solve: "Could not acquire lock for cron job: X" in Magento var/log/cron.log

texts:
With my M2 instance indexers in "Update on Schedule" mode... var/log/cron.log receives this warning near constantly:

Could not acquire lock for cron job: indexer_update_all_views [] []

The cron process in the process list terminates... plus I have a constant "X in the backlog" message for a few indexes.

I cannot figure out what this problem is about... I've tried truncating all *_cl tables and rebuilding the index... but still the site eventually goes back to items permanently stuck the backlog, a cron job not terminating, and this log message always appearing.

The only solution I have right now to restore the site's performance is to leave the indexer in Update on Save mode.

Thoughts?


texts: Magmi - No profile saved yet - Run disabled

texts:
yesterday I imported several csv files into our shop with my predefined profile.
This morning I wanted to continue but Magmi tells me:

No Profile saved yet, Run disabled!!

That comes from magmi_config_setup.php around line 30:

$eplconf=new EnabledPlugins_Config($profile);

$eplconf->load();

if(!$eplconf->hasSection("PLUGINS_DATASOURCES"))
{
    $conf_ok=0;
}

But how can this happen over night without anybody touching it?
I already upgraded from 0.7.18 to 0.7.19a (Magento is 1.8.1) but got the same result.

I found something similar only in Spanish: http://foros.mgnt.es/threads/importacion-10000-productos-mas-rapida.4792/ but can't read it .. something with look it up in the Wiki?
But I couldn't find anything about this problem in the wiki :(


texts: Magento 2.3 migration - How to solve Duplicate entry error after data migration?

texts:
Note: I did data migration couple of times, during data migration max_allowd_packet issue then update and again run the data migration.
How to solve the php bin/magento setup:upgrade error,  If i try to run upgrade command i am getting following error,

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate
entry  '21' for key 'PRIMARY', query was: INSERT INTO
eav_attribute_set  (entity_type_id, attribute_set_name,
sort_order,  attribute_set_id) VALUES (?, ?, ?, ?)

Queries :

SELECT * FROM  eav_attribute_set WHERE attribute_set_id = '21';

SELECT * FROM eav_attribute_group WHERE attribute_set_id = '21';

Table : eav_attribute_set

What value should i delete?


texts: get order issue in observer in magento 2

texts:
I want to get last order id in observer after place order. My code like this:

<?php

namespace Vendor\Module\Observer;

use Magento\Framework\Event\ObserverInterface;

class AfterOrder implements ObserverInterface
{
    private $orderFacory;

    public function __construct(
        \Magento\Quote\Model\QuoteFactory $quoteFactory
    ) {
        $this->orderFacory = $orderFacory;
    }

    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        echo $this->orderFacory->getOrderId(); exit;
    }
}

But I cannot get last order id.


texts: Hide filter options with 0 products in Magento2

texts: I am using Magento 2.3 and need to hide filters in the layered navigation that contain zero products. What files should I modify to complete this?


texts:
I'm trying to find out why Magento won't display the "TIME" field for the date picker in the back end. We regularly create new attributes.

Ideas on how to show the time? I need an attribute to schedule product visibility on the website and the time HAS to be there.

Thanks


texts:
Is there a way to get the SKU of the option of my product ?

Can't make anything works
Tried this :

$customOptions = $objectManager->get('Magento\Catalog\Model\Product\Option')->getProductOptionCollection($_product);

foreach($customOptions as $optionKey => $optionVal):
               foreach($optionVal->getValues() as $valuesKey => $valuesVal) {
                      echo $valuesVal->getId().' '.$valuesVal->getTitle();
                }
endforeach;

but $optionVal->getValues() is

  Invalid argument supplied for foreach()


texts:
I am working on magento 2.2.6  sale extension and I want to change the price of the product by subtracting the sales price from it.As you know a single product is shown on multiple pages and categories on a store i.e(product-page,categories,search).
I'm looking for a way to change product prices as per sales.Please Guide me about from where I should Start ...?


texts: Add to Cart Button Not Working Magento 2

texts:
I have put together a custom product list page for special offer products. Mostly working except ive just noticed the add to cart button is failing.

Once clicked the process starts but hangs on adding... on cart button and the mini cart in top right corner just starts a spinning animation which never ends.

Everything looks fine except the UENC value is empty on the form for the product.
This is currently using below code however nothing is showing:

echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED];

The add to cart code is:

<form data-role="tocart-form" action="<?php /* @escapeNotVerified */ echo $postParams['action']; ?>" method="post">
                                            <input type="hidden" name="product" value="<?php /* @escapeNotVerified */ echo $postParams['data']['product']; ?>">
                                            <input type="hidden" name="<?php /* @escapeNotVerified */ echo Action::PARAM_NAME_URL_ENCODED; ?>" value="<?php /* @escapeNotVerified */ echo $postParams['data'][Action::PARAM_NAME_URL_ENCODED]; ?>">
                                            <?php echo $block->getBlockHtml('formkey')?>
                                            <button type="submit"
                                                    title="<?php echo $block->escapeHtml(__('Add to Cart')); ?>"
                                                    class="action tocart primary">
                                                <?php /* @escapeNotVerified */ echo __('Add to Cart') ?>
                                            </button>
                                        </form>

So the main bit going wrong seems the uenc code and action from postparams and my block not having logic for getting this data. I have botched it in using some code on phtml file to get this data however had further issues with products not redirecting to product pages if required options were present and instead just reloading the current page with the warning.


texts: How to get the Admin code of an option from an attribute? REST API

texts:
I have a problem, and I want you to give me a light at the end of the tunnel.
I am doing an integration REST and need to get some information from the options of an attribute, in the admin panel I have 4 options being them. Among them Admin, I am using the following method to return the options.
rest/V1/products/attributes/{attributeCode}/options
rest/V1/products/attributes/tamanho/options
Was the only method I found in https://devdocs.magento.com/swagger/index.html which made sense, but the return only comes the option code and the Default Store View, the Admin does not appear, how I get the code Admin?
I would like to receive in return for example:
{
   "label": "L/XL descr",
   "value": "519",
   "admin_code": "LXL",
   "is_default": true
}

Prints


texts: Magento 2.3.5 - Change all attributes to searchable no by scrip

texts: Is there a way, maybe by using a script, to set the searchable value of all attributes to no?


texts: get folder structure for a magento extension

texts: I have added many extensions in my mangento.  Now i want to retrieve the folder structure of each extensions, if file exists in app/design/frontend folder also.  How to get the file structure?


texts: How to add steps before checkout page Magento 2?

texts:
I want to add 2-3 steps before checkout form user needs to fill those and then come on checkout page.
And, on that checkout page if success then save those data, How to do this.
Any help is useful.


texts:
I started having a 500 Server Error in Magento's configuration page. The rest of the website works ok. I turned DeveloperMode on and I got the following message:

Method "addJqueryLibrary" is not defined in "Magentothem_Upsellslider_Model_Layout_Generate_Observer"

#0 /home/webiste/public_html/app/code/core/Mage/Core/Model/App.php(1340): Mage::throwException('Method "addJque...')
#1 /home/webiste/public_html/app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Magentothem_Upsellslider_Model_Layout_Generate_Observer), 'addJqueryLibrar...', Object(Varien_Event_Observer))
#2 /home/webiste/public_html/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#3 /home/webiste/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(351): Mage::dispatchEvent('controller_acti...', Array)
#4 /home/webiste/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#5 /home/webiste/public_html/app/code/core/Mage/Adminhtml/Controller/Action.php(275): Mage_Core_Controller_Varien_Action->loadLayout(NULL, true, true)
#6 /home/webiste/public_html/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php(95): Mage_Adminhtml_Controller_Action->loadLayout()
#7 /home/webiste/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_System_ConfigController->editAction()
#8 /home/webiste/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('edit')
#9 /home/webiste/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#10 /home/webiste/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#11 /home/webiste/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#12 /home/webiste/public_html/index.php(87): Mage::run('', 'store')
#13 {main}

Any body seen this before of know how to fix it?


texts: How to fix My Account menu link in Magento 2.1 after migration from 1.9

texts:
We have upgraded our store from Magento 1.9 to Magento 2.1. the My Account is link to /index.php/account it should link to /index.php/customer/account/

We are using Solwin FreeGo theme for Magento 2. Please do let me know how to fix this issues so that My Account will link through /index.php/customer/account/


texts: Magento 2 - How to allow livereload in CSP whitelist?

texts:
I can't use livereload anymore, because I get

Refused to load the script 'http://www.company.de:35729/livereload.js' because it violates the
following Content Security Policy directive ... Note that
'script-src-elem' was not explicitly set, so 'script-src' is used as a
fallback."

Im not sure why I get this error even though the script is hosted on my own server.
I tried to allow it like this in my
app\code\Company\Csp\etc\csp_whitelist.xml
<?xml version="1.0"?>
<csp_whitelist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Csp/etc/csp_whitelist.xsd">
    <policies>
        <policy id="script-src">
            <values>
                <value id="livereload" type="host">www.company.de*</value>
                ...

But it does not work this way.

Notes:
<?php

namespace Company\Csp\Plugin;   // <-- in my real script, Company is replaced by my vendor name

use Magento\Csp\Model\Collector\CspWhitelistXmlCollector;
use Magento\Csp\Model\Policy\FetchPolicy;

class Csp
{

    /**
     * @inheritDoc
     */
    public function afterCollect(CspWhitelistXmlCollector $cspWhitelistXmlCollector, $defaultPolicies = []): array
    {
        $ip = dns_get_record($_SERVER['HTTP_HOST'],DNS_A)[0]['ip'];
        $port = "35729";
        $hostUrl = $ip . ':' . $port;

        $defaultPolicies[] = new FetchPolicy(
            "connect-src",
            false,
            [$hostUrl, "ws://" . $hostUrl],
            [],
            false,
            false,
            false,
            [],
            [],
            false,
            false
        );
        $defaultPolicies[] = new FetchPolicy(
            "script-src",
            false,
            [$hostUrl],
            [],
            false,
            false,
            false,
            [],
            [],
            false,
            false
        );
        return $defaultPolicies;
    }
}


texts: Onepage Checkout error - Review is not defined

texts:
I'm using Magento CE 1.9.0.1 with a custom theme purchased from ThemeForest, and I've enabled the necessary payment methods.

On the onepage checkout, if I click on Place Order in the final step (Order Review), nothing appears to happen. When I then checked in Firefox console, I see that the error ReferenceError: review is not defined shows whenever I click on Place Order.

I cannot for the life of me figure this out or troubleshoot what the problem could be. I've tried:

Copying /skin/frontend/base/default/js/opcheckout.js into my theme's skin folder.
Copying all of the files in /app/design/frontend/base/default/template/checkout/onepage/review into my theme's templates folder

The last point there was kind of redundant as the theme I'm using does not override any of the base onepage templates. I'm certain something is causing the review variable to not be defined, but cannot seem to find where this could be occurring.

Has anyone experienced something similar or can share any insight into how I can troubleshoot this? Many thanks!

EDIT: Additionally note that I have disabled the other 2 plugins I am using (Geolocation Currency Converter by Webkul, and Gift Voucher by Magestore) just so that I can try to eliminate what the problem could be. After disabling these, I still cannot proceed past checkout.


texts: Load a phtml file in category/view.phtml file

texts:
I have done following thing:-

In catalog.xml I have added a block for all.phtml just above the list.phtml block.

<block type="catalog/category_sidebar_all" name="category_sidebar_all" as="category_sidebar_all" template="catalog/category/sidebar/all.phtml"/>
<block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">

calling this block like

<?php echo $this->getChildHtml('category_sidebar_all'); ?>
<?php echo $this->getProductListHtml() ?>


texts: Alias field with addAttributeToFilter and HAVING

texts:
I build a query with an alias field and need to include this alias field value inthe query condition.

The query:

$collection = Mage::getModel('customer/customer')->getCollection();
$collection->getSelect()->join(array('review'=>'flrating'),"e.entity_id = review.reviewed_user_id ",array('total_avg_rating'=>'AVG(review.avg_rating)'));
$collection->getSelect()->having('e.total_avg_rating >= ?', $min)->having('e.total_avg_rating <= ?',$max);
$collection->getSelect()->group('review.reviewed_user_id');

allies name is "total_avg_rating"
but it shows error: "total_avg_rating not exist".

allies filed name result

As per follow your mention way


texts:
I have Magento 1.7.  My customers have recently been receiving this error message when trying to upload photos to our site.  We use a FTP to hold our pictures.  I was wondering if anyone can assist with what to do about the following error.

  Fatal error: Allowed memory size of 268435456 bytes exhausted (tried
  to allocate 7680 bytes) in
  /home1/photofet/public_html/app/code/core/Mage/Catalog/Model/Category.php
  on line 674

Thanks for any assistance you can give us!


texts: Path to import CSS file from Magento template

texts:
In \app\design\frontend\base\default\template\index.php I need to import a JS file from the Magento root.

How do I give the path in the script tag's src attribute?

I have tried the following. I need the same for the CSS.

<head>
<script type="text/javascript" src="<?php echo $this->getSkinUrl(); ?>js/myfolder/script.js"></script>  <!--working-->

<!-- I get style.css not found
CSS path: html/magento/skin/frontend/rwd/default/css/folder/style.css-->

<link rel="stylesheet" type="text/css" href="<?php echo $this->getSkinUrl('css/folder/style.css',array('_secure'=>true));?>" media="all" />

I get a forbidden error when using the above.


texts: How to add custom css and js files after certain default ones

texts:
We know that all css/js files added by page.xml in default handle are global, they're loaded in all pages.

When I add some css and js files in specific handle (eg. catalog_category_default), they're added to the top of head, before all global ones. But I want to add them AFTER.

How to add css/js after global files?


texts: redirect customer to associated website on successful login

texts:
I have a shop with two websites for 2 different currencies:

shop.com/euro
shop.com/gbp

The products on the websites are completely the same. The only reason for creating two different websites within the shop is the 2 currencies.

The customers can login on both websites but now I want to achieve the following:

Redirect customers to the website their account is associated with when
they login at the website their account is not associated with.
Don't allow customers to manually change the url from shop.com/euro to shop.com/gbp to get into a website their account is not associated with.

Is this possible? How should I proceed?


texts: magento 2 too many js call inspite of bundling

texts: i have enabled production mode and bundling also yet i am seeing to many js file call aroun 120 plus that is causing issue with load time


texts: Print Order Error Generated From my Account 'My Orders' Section

texts:
Yesterday we installed a complete theme on our Magento website. We create a demo order by registering itself to test this procedure so we tried to print out the order invoice from my account option 'My Orders' but after click on it a long error is generated and I don't know how to fix it, please help me to fix this error, below we discussed this entire error.

Invalid method Mage_Page_Block_Html_Head::addEMItem(Array
(
    [0] => skin_css
    [1] => css/em_variation.css
    [2] => Mage_Core_Model_Layout_Element Object
        (
        )

    [3] => general_disable_frontend_variation
    [4] => 1
)
)

Trace:
#0 [internal function]: Varien_Object->__call('addEMItem', Array)
#1 [internal function]: Mage_Page_Block_Html_Head->addEMItem('skin_css', 'css/em_variatio...', Object(Mage_Core_Model_Layout_Element), 'general_disable...', '1')
#2 /home4/siraj786/public_html/dattaexpress/app/code/core/Mage/Core/Model/Layout.php(348): call_user_func_array(Array, Array)
#3 /home4/siraj786/public_html/dattaexpress/app/code/core/Mage/Core/Model/Layout.php(214): Mage_Core_Model_Layout->_generateAction(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#4 /home4/siraj786/public_html/dattaexpress/app/code/core/Mage/Core/Model/Layout.php(206): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#5 /home4/siraj786/public_html/dattaexpress/app/code/core/Mage/Core/Model/Layout.php(206): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#6 /home4/siraj786/public_html/dattaexpress/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#7 /home4/siraj786/public_html/dattaexpress/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#8 /home4/siraj786/public_html/dattaexpress/app/code/core/Mage/Sales/Controller/Abstract.php(181): Mage_Core_Controller_Varien_Action->loadLayout('print')
#9 /home4/siraj786/public_html/dattaexpress/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Sales_Controller_Abstract->printAction()
#10 /home4/siraj786/public_html/dattaexpress/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('print')
#11 /home4/siraj786/public_html/dattaexpress/app/code/community/BalkeTechnologies/StoreMaintenance/Controller/Router/Standard.php(91): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#12 /home4/siraj786/public_html/dattaexpress/app/code/core/Mage/Core/Controller/Varien/Front.php(172): BalkeTechnologies_StoreMaintenance_Controller_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#13 /home4/siraj786/public_html/dattaexpress/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#14 /home4/siraj786/public_html/dattaexpress/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#15 /home4/siraj786/public_html/dattaexpress/index.php(87): Mage::run('', 'store')
#16 {main}


texts: Getting "Invalid block type" exception on Magento 1.9.3.7 for custom template inside catalog/product

texts:
I am facing a strange issue. I am getting "Invalid block type" exception for a custom block that I have created. I am using the block like this

{{block type="example/menu" name="product.menu" template="catalog/product/menulist.phtml"}}

But if I use template="catalog/product/list.phtml" no exception is thrown. I get invalid block type exception if I use template="catalog/product/menulist.phtml". I have created the menulist.phtml file in app/design/frontend/rwd/verito/template/catalog/product directory.

Again, this code also works fine without exception.

{{block type="catalog/product_list" name="product.menu" template="catalog/product/menulist.phtml"}}

I have whitelisted example/menu by adding in System/Permissions/Blocks. But I couldn't find out the missing link for the mentioned exception. What am I missing? Do I need to add anything else in catalog.xml or some other xml file?

Here is the log

2018-11-11T13:57:17+00:00 ERR (3):
exception 'Mage_Core_Exception' with message 'Invalid block type: Abcde_Example_Block_Menu' in /home/lowplex/public_html/app/Mage.php:595
Stack trace:
#0 /home/lowplex/public_html/includes/src/__default.php(28794): Mage::throwException('Invalid block t...')
#1 /home/lowplex/public_html/includes/src/__default.php(28736): Mage_Core_Model_Layout->_getBlockInstance('example/menu', Array)
#2 /home/lowplex/public_html/includes/src/__default.php(28771): Mage_Core_Model_Layout->createBlock('example/menu', 'menu')
#3 /home/lowplex/public_html/includes/src/__default.php(28538): Mage_Core_Model_Layout->addBlock('example/menu', 'menu')
#4 /home/lowplex/public_html/includes/src/__default.php(28504): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#5 /home/lowplex/public_html/includes/src/__default.php(14265): Mage_Core_Model_Layout->generateBlocks()
#6 /home/lowplex/public_html/app/code/core/Mage/Catalog/controllers/CategoryController.php(148): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#7 /home/lowplex/public_html/includes/src/__default.php(14339): Mage_Catalog_CategoryController->viewAction()
#8 /home/lowplex/public_html/includes/src/__default.php(18833): Mage_Core_Controller_Varien_Action->dispatch('view')
#9 /home/lowplex/public_html/includes/src/__default.php(18363): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#10 /home/lowplex/public_html/includes/src/__default.php(21319): Mage_Core_Controller_Varien_Front->dispatch()
#11 /home/lowplex/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#12 /home/lowplex/public_html/index.php(85): Mage::run('', 'store')
#13 {main}

app/etc/modules/Abcde_All.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Abcde_Example>
            <active>true</active>
            <codePool>local</codePool>
        </Abcde_Example>
    </modules>
</config>

app/code/local/Abcde/Example/etc/config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Abcde_Example>
            <version>0.1.0</version>
        </Abcde_Example>
    </modules>
    <global>
        <blocks>
            <example>
                <class>Abcde_Example_Block</class>
            </example>
        </blocks>
    </global>
</config>

app/code/local/Abcde/Example/Block/Menu.php

<?php
class Abcde_Example_Block_Menu extends Mage_Core_Block_Template {
}

app/design/frontend/rwd/verito/template/catalog/product/menulist.phtml

<?php
/**
 * Product list template
 *
 * @see Mage_Catalog_Block_Product_List
 */
?>

Hello World!


texts: What is the difference between Collection & Repository & Factory classes?

texts:
I am trying to understand when to is use which according to the best practice.
for exg.
To get some data like (product,customer) what should be used Collection ?
To set some data into product etc what should be used ?
Need some clarity in here.
Thankyou


texts: How can I get a quote id after an order is made?

texts:
Okay the question is how to get a quote id after an order is made.. and I know what people are going to say - why?

Well I have some custom details being inserted into a custom table at checkout (via a module of course) and am tracking the session with the quote id so that data can be later edited by the user (upon reviewing the order and in the 'my account' section).

So imagine the table has 5 columns: 'entry_id', 'quote_id', 'order_id', 'custom_data', 'created_at'.

All of the columns (except order id of course) are filled in before final checkout (order placed) but the quote is no longer accessible after this so I cannot add the order id to the correct entry and therefore lose the ability to edit the details. This post - Is it possible to get the QuoteId that was used once an OrderId has been created - didn't work - perhaps an older version of magento and it's methods seem loose. There must be a standard technique for this that is full-proof.

Suggestions as to an alternative way to go about what I'm doing are also welcome. Thanks


texts: How to Keep From Getting "System Message - Indexers Are Invalid"

texts:
I spent all day yesterday attempting to make sure Magento 2.0.2 cron is setup correctly and working, that I fully disabled cache and that my indexers were working. Thought I was done.

Just logged in this morning to this frustrating message:

What am I doing wrong? How can I get Magento 2.0 to work? How can I get the indexers to index?


texts: How do I get the value of a property in my product on my phtml file?

texts:
Im looking at my
theme/Magento_Catalog/templates/product/price/final_price.phtml
 and I am trying to set up a conditional so that when a custom field that another developer built in as a dropdown is === 1, i want to hide the special price. How can I access these variables? Im having a very hard time dumping the productId variable to see what's in it. I keep getting blank screens


texts: How to get the view count for product per storeview?

texts:
I'm currently getting the product views like this:

$product_views = Mage::getResourceModel('reports/product_collection');
$product_views = $product_views->addViewsCount($fromDate->format('Y-m-d'), $toDate->format('Y-m-d'));

The collection Mage_Reports_Model_Resource_Product_Collection has two methods that are almost what I'm looking for: addStoreFilter($store) and addStoreRestrictions($storeIds, $websiteIds).

However with these methods I can filter per store or website and not per storeview.

I know this should possible because you can see the views per storeview in Magento in Reports -> Products -> Most Viewed.


texts: how to create PWA magento 2.4 custom theme?

texts:
I am new for PWA magento but can't understand full structure yet I have installed PWA Venia and want to create custom theme of venia like in magento we know we create a child theme and can override LUMA theme there, How can we achieve same thing in PWA?
Thanks in advance


texts: Magento2- How to validate coupon code to cart before apply

texts:
How to validate Coupon Code to Cart before apply in Magento 2?
Is it possible?


texts:
I am using below code to show price in Email template magento 2.X

$this->priceFormatter($_item->getPrice()

Instead in price coming 0.73 it is coming 8, Can anyone have suggetion, Please share.


texts: How do I remove jQuery Conflict in prototype.js with 1.11.1.jquery.min.js

texts:
I have a conflict between jQuery and another library. I added the code below to the local.xml file as per answers found here.

<?xml version="1.0"?>
<layout>
    <default>
             <reference name="head">
    <action method="addJs" name="jquery" as="jquery">
        <script>jquery-1.11.1.js</script>
    </action>
    <action method="addJs">
        <script>noconflict.js</script>
    </action>
</reference>
</default>
</layout>

The answer said that the noconflict.js file should simply contain the following code.

$j = jQuery.noConflict();

I do not understand where I have to add the noconflict.js file. Is it to the js folder on the server? If the answer is yes, how do I create a JavaScript file?


texts: Magento 2: Install Extension over Web Setup Wizard error

texts:
Install Extension over Web Setup Wizard gives an error that you see below.

I checked my cron and its working
I set the files permission to 777 for testing and it's still not working.

Could you please advise me what could be the problem and what are the possible causes for this?


texts:
Could someone share a link where to download magento version 1.8?
Google search did not give any working links.


texts: What is '-c' in the command ./vendor/bin/phpunit -c dev/tests/unit/phpunit.xml app/code/Vendor/Module/Test/Unit?

texts: I just know I can execute my test file with this command through PHP-Unit framework but haven't figured out what '-c' is for.


texts: Adding data under price for each product in product listing

texts:
I want to add some data under the price for each product in a product listing. To show an example I would like to add static data where the blue lines are:

I've made modifications to frontend/company/mytheme/Magento_Catalog/templates/product/listing.phtml as this seemed to be the correct place to make the edits. But, after making changes and flushing cache, the product listings are not updated.
The template helpers I enabled do not seem to show where this template is stored.
How can I get this to work?


texts: Access Denied Error in Admin Panel Custom Moduel

texts:
I am getting access denied error for 3 Tabs in admin panel.

Custom module config is under

<acl>
        <resources>
            <admin>
                <children>
                    <vendor>
                        <title>Vendor</title>
                        <children>
                            <orders>
                                <title>Orders</title>
                            </orders>
                            <transaction>
                                <title>Transactions</title>
                            </transaction>
                            <review>
                                <title>Reviews</title>
                            </review>
                        </children>
                    </vendor>
                    <system>
                        <children>
                            <config>
                                <children>
                                    <cartmart>
                                        <title>Cart Mart Section</title>
                                    </cartmart>
                                </children>
                            </config>
                        </children>
                    </system>
                </children>
            </admin>
        </resources>
    </acl>


texts: getResource is deprecated, what is the alternative?

texts:
getResource() is deprecated so my question is what do I need to use instead to be future proof for next updates.

I use this function like below in the catalog list.phtml

$seedBank = $_product->getResource()->getAttribute('brand')->getFrontend()->getValue($_product);


texts: How to Add Seller Information into invoice pdf in magento without using extension

texts: For each product we have different seller so how to get that seller information on the invoice pdf and packing slip?


texts:
Having some difficulty implementing this answer: How to override or disable core Plugins in Magento2?

I have this vendor plugin I need to override the afterToHtml method...

Vendor DI entry:

<type name="Magento\Catalog\Block\Product\AbstractProduct">
    <plugin name="Amasty_Stockstatus::Addstatus" type="Amasty\Stockstatus\Plugin\Product\Status" />
</type>

Vendor plugin class:

namespace Amasty\Stockstatus\Plugin\Product;

class Status
{
    CODE

    public function afterToHtml(
    \Magento\Catalog\Block\Product\AbstractProduct $subject,
    $result
    ) {
        $name = $subject->getNameInLayout();

        if ( in_array($name, array('product.info.configurable', 'product.info.simple', 'product.info.type_schedule_block6', 'product.info.bundle',  'product.info.virtual',  'product.info.downloadble')) ) {
            $status = $this->_helper->getCustomStockStatusText($subject->getProduct());
            if ($status) {
                $tmp = $this->_helper->showStockStatus($subject->getProduct(), 1, 0);
                if ($tmp != '') {
                    $result  = $tmp;
                }
            }
        }

        return  $result;
    }
}

My DI entry:

<type name="Amasty\Stockstatus\Plugin\Product\Status">
    <plugin name="Amasty_Stockstatus::Addstatus" type="Vendor\ExtensionName\Plugin\Product\Status" sortOrder="1" />
</type>

My plugin class:

namespace Vendor\ExtensionName\Plugin\Product;

class Status extends \Amasty\Stockstatus\Plugin\Product\Status
{
    public function afterToHtml(
        \Magento\Catalog\Block\Product\AbstractProduct $subject,
        $result
    ) {
        NEW CODE
    }
}

My extension is already installed and I have a class override working for a Helper. We are in developer mode. I've also tried a few other variations such as these:

1.

<preference for="Amasty\Stockstatus\Plugin\Product\Status" type="Vendor\ExtensionName\Plugin\Product\Status"/>

2.

<type name="Magento\Catalog\Block\Product\AbstractProduct">
    <plugin name="Amasty_Stockstatus::Addstatus" disabled="true" />
</type>

3.

<type name="Magento\Catalog\Block\Product\AbstractProduct">

4.

<plugin name="Addstatus" type="Vendor\ExtensionName\Plugin\Product\Status" sortOrder="1" />

5.

<plugin name="Vendor_ExtensionName::Addstatus" type="Vendor\ExtensionName\Plugin\Product\Status" sortOrder="1" />

What am I missing?


texts: Add a static block(widget) before the breadcrumbs

texts:
I'm using Magento 2.3.0, and I'm trying to add a block before the breadcrumbs, without any padding or margin.

I've created a block from the back-end, then my widget using this block, and then placed the widget on Catalog Category, as I want it only on category pages, and as container I picked After Page Header, but that places me the block/widget right after the breadcrumbs, and it also has the padding from the block class, that I don't want, I would like to have it 100% width.


texts: CMS pages linked to from 2nd level category pages include category path in url and give 404

texts:
CMS pages (such as about-us, privacy-policy etc) link fine from root domain (such as domain.co.uk) and from domain.co.uk/category1.html.  In this instance then the correct URL is domain.co.uk/about-us and the about-us page is displayed.

However when navigating to CMS pages from 2nd level category URL's (domain.co.uk/category1/category2.html), the link is domain.co.uk/category1/category2/about-us, and this generates a 404 page as the page doesn't exist.

What is the solution to this?

I'm using Magento 2.1.5.


texts: How to create a url to start session in magento 2 (customer)

texts:
The URL should be something like this:
http://mymagento.store/customer/1dsd24343sd34
Pasting this url in any browser the customer should log in automatically


texts: We have been fraudes many times by the same persons under different names and billing adress , but always same shipping adress. How can we block some adress or postal codes so we don’t get caugh again and again ?


texts: How to create a Varnish compatible theme in Magento 2?

texts:
Since Magento 2 now supports Varnish out of the box, is there anything in particular to have in mind while creating themes regarding compatibility with Varnish?
Is there any mechanism to use for hole punching?
Is there any official guide to follow?


texts:
I'm having a problem, I've placed an ajax Request in my cart, and she's doing what she has to do that is adding the product to the cart, but she does not redirect to the next page, she stands in the same place, so I added A submit function, but then add 2 products which would be what the functions has to do, how do I redirect to next screen without the submit?

view.phtml

            productAddToCartForm.submit = function(button, url) {
            if (this.validator.validate()) {
                var form = this.form;
                var oldUrl = form.action;

                if (url) {
                   form.action = url;
                }
                var e = null;

                if(!url){
                url = jQuery('#product_addtocart_form').attr('action');
                }
                url = url.replace("checkout/cart","ajax/index");
                var data = jQuery('#product_addtocart_form').serialize();
                data += '&isAjax=1';
                jQuery('#ajax_loader').show();
                try {
                    jQuery.ajax({
                          url: url,
                          dataType: 'json',
                          type : 'post',
                          data: data,
                          success: function(data){
                                jQuery('#ajax_loader').hide();

                                if(jQuery('.block-cart')){
                                    jQuery('.block-cart').replaceWith(data.sidebar);
                                }
                                if(jQuery('.header .links')){
                                    jQuery('.header .links').replaceWith(data.toplink);
                                }
                          }
                    });
                } catch (e) {
                }

If I add this here it redirects the page, but adds 2 items

                this.form.submit();
                } catch (e) {
                }


texts: Magento 2 new home page template not working

texts:
I can't get a custom page template to work in my custom theme. All I'm getting is a blank page. No header, footer, page content, nothing. I have created the following files in my custom theme:

  /Magento_Theme/layouts.xml

<?xml version="1.0" encoding="UTF-8"?>
<page_layouts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:noNamespaceSchemaLocation="urn:magento:framework:View/PageLayout/etc/layouts.xsd">

    <layout id="custom_home">
        <label translate="true">Custom Home</label>
    </layout>

</page_layouts>

  /Magento_Theme/page_layouts/custom_home.xml

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

I can see the new page template in the admin area and have assigned it to my page. I can also see the template name added as a class in the body, but other than that it's just a blank white page.

I'm using Magento 2.2.5. Parent theme is Blank.


texts: Pass array of data from email template to phtml in Magento 2.2.5

texts:
In magento 2.2.5, I need to pass data from mail template to phtml file. I did this using this link. But I cannot pass array of data in it. only text it is accepting.

I am getting this error:

  Error filtering template: Warning: htmlspecialchars() expects parameter 1 to be string, array given in /root/vendor/magento/module-email/Model/Template/Filter.php on line 703


texts: Where is the autogenerated password generated?

texts:
In the admin area, there is the "Send auto-generated password" checkbox in the customer area. Where is the corresponding function for that so I can modify it?

Thanks!


texts: magento 2 get value of selected select box in custom module

texts:
I have created a form using UI component, I want to retrieve value selected select box option on change.
I have created a requirejs-config.js file

var config = {
map: {
    '*': {
        customAdmin: 'Namespace_Modulename/js/customAdmin'
    }
},
deps: ["jquery"]
};

A custom js file

require(["jquery"], function ($) {
//your js code here
$(document).ready(function () {
alert('js loaded');
    $('select[name="custom_attr_name"]').change(function () {
        alert($(this).val());
    });
   });
});

I am getting an alert but not getting any value for the change of select box. When I run the same code on the console, everything works fine. I don't know whats wrong going on in this?
Please help me in identifying the issue.


texts: How do I add my own icon for my magento site?

texts: I created my own icon for my website that I want to use.  I hate having that Magento logo for my site.  How do I do it?


texts:
Product image issue when upgrade magento 2.2.7 to magento 2.3.0.

I have two stores (id_1) and (id_2).

Issue (id_1): Category page is only Magento 2 default product image for all products. No anything real product images for products. How fix this issue?

Tested and doesn't work:

Command: bin/magento catalog:images:resize
Clean image cache, var and static folder content
Pub and media folder added permission 777


texts: One Page checkout Submit Order redirects customer to empty shopping cart

texts:
Strange issue after migrating to a new server. Everything was working fine on the other server. Now new customers that get to one page checkout and fill out registration, choose shipping rate and payment method and then click submit order are being redirected to an empty shopping cart.

The order is placed in admin and the customer account is created, however the redirect issue and the fact that they cant login (they get invalid email or password). When they are redirected to empty shopping cart, they are also not logged in on the store. I assume this would be a server issue as we magento was behaving fine and we have not edited or added anything since the server change.


texts: Configurable Product Display Issue From Backend

texts:
Guys needs help/suggestion fixing issue for configurable product with variations products approx 20, We are facing error in back-end

PHP Fatal error: Out of memory (allocated 1755320320) (tried to allocate 268435464 bytes) in /vendor/magento/module-configurable-product/Model/Product/Type/VariationMatrix.php on line 46

This seems to be known issue & also raised in Github issue page but can't see any working solution

Tried below solution :

Increase Memory limit: - Not worked
Increase max_input_var: Not worked
Code update as shown in Github issue fix : Not worked


texts: Incorrect captcha error message not showing on previous means form page magento 1.9

texts:
Here i am using captcha in products view page but in this page captcha error message not showing this captcha error message is showing in home page magento 1.9.

  app/code/local/Ifuturz/Questionanswer/Model

Below code i accessed the session which is started in view.phtml where we are calling directly this form.here session is working fine and it is redirectting to the previous page but error message not showing.

public function checkQuestions($observer){
        $formId = 'vendor_form';
        $captchaModel = Mage::helper('captcha')->getCaptcha($formId);
        if ($captchaModel->isRequired()){
            $controller = $observer->getControllerAction();
            $word = $this->_getCaptchaString($controller->getRequest(), $formId);
            if (!$captchaModel->isCorrect($word)) {
                $controller->setFlag('', Mage_Core_Controller_Varien_Action::FLAG_NO_DISPATCH, true);
                $sessionaccess= Mage::getSingleton('core/session', array('name' => 'frontend'));
                $url = $sessionaccess->getData("access_value");
                /* $data = explode("index.php/",$url);
                $url =  Mage::getUrl($data[1]); */
                //$url =  Mage::getBaseUrl();
                //$currentUrl = $this->helper('core/url')->getCurrentUrl();
                //$currentUrl = Mage::helper('core/url')->getCurrentUrl();

                Mage::getSingleton('customer/session')->addError(Mage::helper('captcha')->__('Incorrect CAPTCHA.'));
                $controller->getResponse()->setRedirect($url);
            }
        }
        return $this;
    }

protected function _getCaptchaString($request, $formId)
    {
        $captchaParams = $request->getPost(Mage_Captcha_Helper_Data::INPUT_NAME_FIELD_VALUE);
        return $captchaParams[$formId];
    }


texts: How to get product's ID after add to cart

texts:
I'm observing the event checkout_cart_product_add_after, and I need to get the product's ID. I'm not sure how to do that.

My current code so far is something like this:

public static function stockUpdate(Varien_Event_Observer $observer)
{
    # Get event
    $order = $observer->getEvent();

    # Do stuff
}

The point of this is to verify if that product is still available in a third-party webservice.


texts: Magento 2 - Get all options from a quote item

texts:
I need to get all the configurable items related to an item in the cart. For example, if the cart item is of a size "XL", then I need to get all the other options like "S", "M" and "L" together with their attributes.

I get all the cart items using the following method:

$items = $cart->getQuote()->getAllVisibleItems();

And then I try:

foreach( $items as $item ) {
  foreach ($item->getOptions() as $option) {
    // Here I need to get the attributes for each option but I'm not sure how to go about that
  }
}

Is getOptions() the way to go?

Thanks!


texts: I have a problem with the system sending Magento . Do not want to send e -mail order confirmation (e- mails about the account is sent ) . When you refresh a cron job in my web browser , these emails are sent , but I wish it would happen automatically. I installed the program sheulder which shows that the e- mails are stuck in the queue and do not want to leave. I would ask you to explain the process of how to fix this for a beginner .


texts: How to inject class with passing into it some argument

texts:
When we are injecting some class into another using constructor we are making this:

protected $someClass

public function __construct(SomeClass $someClass)
{
    $this->someClass = $someClass;
}

But what if we need to pass some argument into this SomeClass?

Magento has following implementation:

  Magento\Catalog\Model\Layer\FilterList

$this->filters = [
    $this->objectManager->create($this->filterTypes[self::CATEGORY_FILTER], ['layer' => $layer]),
];

I wan't to inject my own filter into plugin and pass into it ['layer' => $layer]

Please advice.


texts: Auto-select and apply whichever offers higher discount: Special Price/Catalog Price Rule or Cart Price Rule (coupon)

texts:
I have seen some of the shopping websites which run promotions across the site and offer base-discount. They then also give coupon code to all kind of users via dm on social media sites.
For example:

Product 'A1' has original price: $100 , special price: $80 - discount: 20%
Product 'B1' has original price: $100 , special price: $50 - discount: 50%

Discount code: (Sale) offers 30% discount on the original price: A1 will be $70 , B1 will be $70.
Condition: Now when applied at the checkout: the system will check the % of [Discount code: Sale] against Special Price. If Discount Code offers higher discount then it will be applied and if Special Price offers higher discount then it will be applied.
So,
in case of Product 'A1' , Discount code will be applied.
in case of product 'B1' , Special price will be applied.
Is there anyway to achieve this in Magento 2? If not then how to achieve this and are there any available extension?


texts: How I add Category chooser in custom module in backend magento 2

texts: Anyone Help me please how I create category chooser in custom module in magento 2


texts:
Someone knows the location of the files important for Export and import?

Like for an example:

mywebsite/app/....

Because I want to repair it, because files are missing and I don't know where to put them.


texts: Magento 2: Save custom shipping method's custom attribute in IWD one page checkout

texts: I have enabled IWD one page checkout and then added my storepickup shipping method (as another extension) with custom shipping attributes like delivery date and store fields. But I could not set those custom attributes to quote and so in order object.


texts: Remove CSS file from installed extension?

texts: I am using theme254k Package of default Theme of Magento 1.8.1.0. I installed an extension. This extension added a CSS file. I would like to remove this CSS file. How can I do that ?


texts: Magento 2 override shipping module to call api from backend

texts:
I have been developing magento 2 extension for custom shipping method, I have developed it where I calculate the shipping amount with some certain scenarios, everything is working on frontend.

Now I need to call courier api when shipping is shipped from admin side, I am done with this part as well in observer but I don't think it sounds sensible to ship item through api in observer because I need to send customer an email for successful shipment.

Is there any process in magento where I can specify my shipping request code and then the shipping is done and tracking number is added? The default email will be sent to customer with tracking code.

PS: I want to send shipment tracking number to customer as well.


texts: Taking over a Magento site, old developer added a 'newest' sort by feature for categories, where to look for code?

texts:
Pretty new to Magento.

The old dev added a sort by feature for 'newest', however, whatever he did locks sorting to 'newest' on all categories and I need to either remove or change it. It does not appear to be an extension, where is a good place to start looking for the code he may have added?

Thanks


texts: Magento 2.3 - eWay payment gateway Decoding failed: Syntax error

texts:
How to solve the error Decoding failed: Syntax error
I am using this eWay magento extension : https://marketplace.magento.com/eway-eway-rapid-magento2.html
If click place order page redirect to cart and return error Decoding failed: Syntax error


texts:
how can i add a default title automatically. I have just one carrier in the list.

public function getCarriers()    {

    $carriers = parent::getCarriers();

    $carriers['Swiss_Post'] = $this->__('Swiss Post');
    return $carriers;
}

}


texts: How to Upload multiple images of 1 product using System > Import/Export > Dataflow - Profiles

texts:
I want to upload multiple images of 1 product using System > Import/Export > Dataflow - Profiles,

My question is about

System > Import/Export > Dataflow - Profiles

Not About

System > Import/Export > Import

I have uploaded a product with single image, but don't know what csv format to use for multiple image of one product ?

Please Help, Regards.


texts: How to create dropdown for shipping method. Magento 1.9.*

texts:
How to create dropdown for shipping method, i want to create like this:

How to create it without override checkout\onepage\shipping_method\available.phtml , or it's imposible without changes in template?
My Model_Carrier.php :

My shipping method now:


texts: Magento2 : Base table or view not found: 1146 Table 'magento_mymodule.catalog_category_entity_textarea' doesn't exist

texts:
I have created a custom module to create attribute for categories in Magento 2.2.4. When I run the setup upgrade command then it gave me this error.

1146 Table 'magento_mymodule.catalog_category_entity_textarea' doesn't exist

Please suggest me if any other way to create category attribute in magento 2.2.4.


texts: Magento 2 error : Incompatible argument type: Required type: \Magento\Framework\Registry. Actual type: array; File:

texts:
Code
use Magento\CustomerBalance\Helper\Data;
use Magento\Framework\App\ObjectManager;
use Magento\Framework\Registry;
use Magento\Framework\View\Element\Template;
use Magento\Framework\View\Element\Template\Context;

/**
 * Refund to customer balance functionality block
 *
 * @api
 * @since 100.0.2
 */
class Controls extends Template
{
    /**
     * Core registry
     *
     * @var Registry
     */
    protected $_coreRegistry = null;

    /**
     * @param Context $context
     * @param Registry $registry
     * @param array $data
     * @param Data|null $customerBalanceHelper
     */
    public function __construct(
        Context $context,
        Registry $registry,
        array $data = [],
        Data $customerBalanceHelper = null
    ) {
        $data['customerBalanceHelper'] =  $customerBalanceHelper ?? ObjectManager::getInstance()->get(Data::class);
        $this->_coreRegistry = $registry;
        parent::__construct($context, $data);
    }


texts: Is there a way to update a eav custom attribute?

texts:
My eav is:

$eavSetup->addAttribute(\Magento\Catalog\Model\Product::ENTITY,'bid_target',
        [
            'type' => 'int',
            'backend' => '',
            'frontend' => '',
            'label' => 'Bid Target',
            'input' => 'text',
            'class' => '',
            'source' => 'Magento\Eav\Model\Entity\Attribute\Source\Boolean',
            'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL,
            'visible' => true,
            'required' => false,
            'user_defined' => false,
            'default' => 0,
            'searchable' => false,
            'filterable' => false,
            'comparable' => false,
            'visible_on_front' => false,
            'used_in_product_listing' => true,
            'unique' => false,
            'sort_order' => 0,
            'group' => 'Informazioni Bid',
            'apply_to' => ''
        ]
    );

I get it with:

        $bid_prodotto = $prodotto->getResource()->getAttribute("bid_target")->getFrontend()->getValue($prodotto);

but i'm not able to update this value. Some tips? Thanks :)


texts: How to fetch order details using order id in magento 2

texts:
I need to fetch comment field which is present in core table named sales_order_status_history using order id. And how to add comment programmatically in sales\order page in Backend.Please provide me a solution.

Image for reference.


texts:
Fatal error: Uncaught Error: Cannot instantiate interface Magento\Framework\Cache\FrontendInterface in /home/chicpla1/public_html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:50
Stack trace:
#0 /home/chicpla1/public_html/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...')
#1 /home/chicpla1/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(160): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Framewo...')
#2 /home/chicpla1/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(246): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\\Framewo...', NULL, 'cache', 'Magento\\Framewo...')
#3 /home/chicpla1/public_html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime('Magento\\Framewo...', Array, Arr in /home/chicpla1/public_html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php on line 50


texts: how to programmatically trigger credit card payment on order in magento2?

texts:
I need to build an api method which should receive customer's payment information (credit card info) along with product details and place an order with it further processing.

Right now I faced that braintree payment facade requires credit card tokenization which is made via javascript during checkout process, as well as authorize.net method is connecting to transact.dll endpoint.

Is this actually possible, to trigger order processing only in backend ?

Can I refer somewhere in existing magento2 code to see how it is made, maybe in some adminhtml area ?

The code i use to create an order:

    // prepare adresses, products in quote, shipping method - skipped
    $quote->setPaymentMethod('authorizenet_directpost');
    $quote->setInventoryProcessed(false);
    // Set Sales Order Payment

    $quote->getPayment()->importData(
        [
            'method'      => 'authorizenet_directpost',
            'card_type'   => $payment->cardType,
            'cvv'         => $payment->cvv,
            'expire_year' => $payment->expireYear
        ]
    );

    $customer = $this->customerRepository->get($contact->email);
   // prepare customer
    $quote->setCustomer($customer);

    // Collect Totals & Save Quote
    $quote->collectTotals()->save();
    $order = $this->quoteManagement->submit($quote);


texts:
My magento 2.2 site has stopped running because the server instance it is hosted on has run out of storage space, I have looked into what is causing this and found that the pub/media/catalog/product/cache folder is over 40GB large, I am unable to run a catalog reindex as the is no writing space available on my instance. Varnish has been returning a 503 error since.

I have over 20,000 products with each 2-3 images attached to them.

I have disabled cron and have been running manual reindexing and cache clearing.

Is it safe to delete that folder and assume that the cache would be regenerated, or would you have a better approach to handling this? I don't want to lose recent data.


texts: No taxes calculating in fresh magento 2 shop with migrated data

texts: I installed a fresh magento 2.3.5 enterprise, and migrated the data and products from a magento 1 shop with the official migration tool. However, there are no taxes calculating:


texts: Magento 2 : Retreiving Data From Database, Use it in Knockout UI Component in Checkout

texts:
I have been developing a module for Magento2 Checkout that fills some information, not important what, this data resides in Magento's db, and I am able to access it via Magento database access layer.

My question is, how do I get this retrieve this data and use it in a Knockoutjs UI Component in Checkout?


texts: how to debug large object in Magento 2 without var_dump?

texts:
I usually var_dump($object->getData()); in my module to see what data it contains. Because of the injection dependencies , it looks like I can't do that anymore.
When I try it, nothing is printed out, which is likely because the amount of data connected to it is too large???
Can someone suggest an easy way to debug an object in Magento 2?
Thank you


texts:
User dashboard where customer can login and can see all his information about ordered product and other information. In dashboard navigation menu, I added one more tab to redirect to external url. In controller, i am using $this->__redirect($url); bt is showing the error as :
"Cannot send headers; headers already sent"

I used a code in controller as :

    public function fooAction(){

$url = "http://example.com/bar/"; // this is external url
$this->_redirect($url);
// Mage::app()->getResponse()->setRedirect($url);

}

It might be very easy but as I don't know, how to debug this in magento.

Thanks..


texts:
I'm having trouble displaying links within my navigation from a static block.

I have included the following code at the top of my "home.phtml" file:

<?php $storeId = Mage::app()->getStore()->getStoreId();
if($storeId == '14')
{
    echo $this->getLayout()->createBlock('cms/block')->setBlockId('home-center-contact')->toHtml();
    echo $this->getLayout()->createBlock('cms/block')->setBlockId('top_menu_beacon')->toHtml();
    echo $this->getLayout()->createBlock('cms/block')->setBlockId('footer_links_beacon')->toHtml();
}
if($storeId == '19')
{
    echo $this->getLayout()->createBlock('cms/block')->setBlockId('home-center-contact')->toHtml();
    echo $this->getLayout()->createBlock('cms/block')->setBlockId('top_menu_cashino')->toHtml();
    echo $this->getLayout()->createBlock('cms/block')->setBlockId('footer_links_cashino')->toHtml();
}
if($storeId == '16')
{
    echo $this->getLayout()->createBlock('cms/block')->setBlockId('home-center-contact')->toHtml();
    echo $this->getLayout()->createBlock('cms/block')->setBlockId('top_menu_tanexpress')->toHtml();
    echo $this->getLayout()->createBlock('cms/block')->setBlockId('footer_links_tanexpress')->toHtml();
}
if($storeId == '18')
{
    echo $this->getLayout()->createBlock('cms/block')->setBlockId('home-center-contact')->toHtml();
    echo $this->getLayout()->createBlock('cms/block')->setBlockId('top_menu_merkur')->toHtml();
    echo $this->getLayout()->createBlock('cms/block')->setBlockId('footer_links_merkur')->toHtml();
}
?>


texts:
I have enabled multilple wishlists from Magento EE Admin. When a private wishlist is been shared through wishlist share, products are removed from that wishlist after completing the process. While the products don't vanishes on public wishlist. Any one experienced this behaviour before?
Thanks


texts: Magento Install Problem - no core config data

texts:
Struggling to get a magento install up and running - i've been using magento for years and never had this issue before.

Running ubuntu 16.04 on a vagrant box with php 5.6, trying to install either CE or EE, install appears to run correctly, all tables created etc, but no data is being added to core_config_data so any attempts to log in are getting an 'invalid form key' error.

I've checked apache and mysql logs and there's nothing in there to help.  What am i missing?


texts: Magento 2.1: Order of the columns in BackOffice grid

texts:
I just created a grid in the backoffice to list elements of custom tables of the database.

For two of them, the checkbox is the first column, but the last one, the checkbox is juste before the "Action" column, at the right end.

I checked my xml files, they have the same configuration. I try to use the balise sortOrder, like in a core ui file, but without success

selectionsColumn name="ids">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="resizeEnabled" xsi:type="boolean">true</item>
                    <item name="resizeDefaultWidth" xsi:type="string">55</item>
                    <item name="indexField" xsi:type="string">id</item>
                    <item name="sortOrder" xsi:type="number">0</item>
                </item>
            </argument>
        </selectionsColumn>

Does anybody know how to define the order of the columns?


texts:
Need to Create Rest API for Contact Us form. Submit contact us form via rest API and send an email.

API Name: Contact Us API

Method: POST

API URL:  {baseurl}/rest/V1/contactus


texts: What is reverseMetadataMerge in UI Components?

texts:
When I look at the documentation of UI Components, I notice the following:

<item name="reverseMetadataMerge" xsi:type="boolean">true</item>

Now, most arguments are pretty self-explaining in what they do, or I already know it, but what does reverseMetadataMerge do?


texts:
All of a sudden, I cannot view orders any longer.  Shipments, invoices, credit memos work, but Orders returns an error:

**There has been an error processing your request
Exception printing is disabled by default for security reasons.

Error log record number: 1931180224**

The log says:

2014-11-14T01:32:08+00:00 ERR (3): Notice: Undefined variable: _items  in \app\design\frontend\default\theme000\template\catalog\product\view.phtml on line 173

and line 173 is:

<?php if (count($_items)):?>

What could have gone wrong?  I haven't touched the site in weeks, no upgrades, no changes, so I am wondering why is it giving me the error now. Any ideas?


texts: Call to a member function getTemplate() on boolean in

texts:
After activate cache I got this error in controller:

  Fatal error: Call to a member function getBlock() on string

Below is my controller action code:

public function loginAction()
{

if ($this->_getSession()->isLoggedIn()) {
    $this->_redirect('*/*/');
    return;
}
$this->getResponse()->setHeader('Login-Required', 'true');

$this->loadLayout();

$update = $this->getLayout()->getUpdate();
$update->addHandle('customer_account_login');
$this->loadLayoutUpdates();
$this->generateLayoutXml();
$this->generateLayoutBlocks();
$this->_isLayoutLoaded = true;

$blockList = $this->getLayout()->getBlock('customer_form_login');
$template = $blockList->getTemplate();
$blockChildBlock = $blockList->getChild();

$this->getLayout()->unsetBlock('customer_form_login');
$parentBlock = $this->getLayout()->createBlock('vendorpos/customer_form_login','customer_form_login')->setTemplate($template);

if($blockChildBlock){
    foreach($blockChildBlock as $childBlock){
        $this->getChildBlockLogin($parentBlock,$childBlock);
    }
}

$this->_initLayoutMessages('customer/session');
$this->_initLayoutMessages('catalog/session');
$this->renderLayout();
}


texts: Magento 2.3.1 Product EAV index throws error with GTID consistency

texts:
when I run reindex Command After Below type error showing

  SQLSTATE[HY000]: General error: 1787 Statement violates GTID
  consistency: CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can only
  be executed outside transactional context.  These statements are also
  not allowed in a function or trigger because functions and triggers
  are also considered to be multi-statement transactions., query was:
  CREATE TEMPORARY TABLE IF NOT EXISTS catalog_product_index_eav_temp
  LIKE catalog_product_index_eav_tmp


texts: Customer registration form layout update (store view)

texts:
I have a multi-store set up on v1.7.0.2.

I'm looking to display the extra address fields (available in base/default/template/persistent/customer/form/register.phtml) for the customer registration route `customer_account_create on my "trade" store only.

I've added the following to the "trade" store layout handle with no luck.

<STORE_trade>
    <reference name="customer_form_register">
        <action method="setShowAddressFields">
            <value>true</value>
        </action>
    </reference>
</STORE_trade>

I can get both stores to display the extra fields if I reference the route layout handle, however this is not what i'm looking for :(

<customer_account_create>
    <reference name="customer_form_register">
        <action method="setShowAddressFields">
            <value>true</value>
        </action>
    </reference>
</customer_account_create>

I'm not sure if I have referenced my update handle wrong or I'm going about it the wrong way.

Don't really want to use a template store hack...


texts: Magento 2 - Update modules without shop throwing exception

texts:
I upgraded my modules by calling composer update, then my shop was going offline with the message:

  Please upgrade your database: Run "bin/magento setup:upgrade" from the
  Magento root directory.

Is this showing because my magento is in "developer" mode? Will this exception also show if I am in "production" mode?

I fear that I can only update my modules in 4:30 o'clock in the morning when there is almost no traffic on my shop.


texts: Magento 1: update custom option price value programmatically

texts:
I'm trying to update the option values of an existing product custom option.

This is the code I've developed:

$product = Mage::getModel("catalog/product")->load($productId);
$titolo = 'Test';
$prezzo = 123.00;
foreach ($product->getOptions() as $custom_option) {
    if (self::CUSTOM_OPTION_TITLE == $custom_option->getTitle()) {
        $custom_option_values = $custom_option->getValues();
        $values = array();
        foreach($custom_option_values as $custom_option_value)
        {
            if($custom_option_value["sku"] == $skuOpzione) {

                $values[$custom_option_value->getId()]['option_type_id']= $custom_option_value->getId();
                $values[$custom_option_value->getId()]['option_id']= $custom_option_value->getOptionId();
                $values[$custom_option_value->getId()]['default_title']= $titolo;
                $values[$custom_option_value->getId()]['store_title']= $titolo;
                $values[$custom_option_value->getId()]['title']= $titolo;
                $values[$custom_option_value->getId()]['default_price']= floatval($prezzo);
                $values[$custom_option_value->getId()]['default_price_type']= 'fixed';
                $values[$custom_option_value->getId()]['store_price']= floatval($prezzo);
                $values[$custom_option_value->getId()]['store_price_type']= 'fixed';
                $values[$custom_option_value->getId()]['price']= floatval($prezzo);
                $values[$custom_option_value->getId()]['price_type']= 'fixed';

                $custom_option_value->setValues($values);
                $custom_option_value->saveValues();
            }
        }

        $product->save();
    }
}

All seems to work fine but when I check the product I see 'Title' updated but not the 'Price'.
Why?


texts: Left layered navigation for the custom product collection in the custom page

texts:
I have a custom product collection (i.e) list of products which is based on the two attributes's values.
Page is replicating the catalog page by the below xml

<?xml version="1.0"?>
<layout version="0.1.0">
    <customization_index_index>
        <reference name="root">
            <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
        </reference>
        <reference name="content">
            <block type="customization/product_searchbycity" name="searchbycity" as="searchbycity" template="catalog/product/list.phtml">

            </block>
        </reference>
        <!--<reference name="left">
            <block type="catalog/layer_view" name="catalog.leftnav" before="-" template="catalog/layer/view.phtml"/>
        </reference>-->
        <reference name="left">
            <block type="customization/citysearch_layer" name="citysearch.leftnav" after="currency" template="catalog/layer/view.phtml"/>
        </reference>
    </customization_index_index>
</layout>

Now I need the layered navigation in the left for the same collection. Below is the block.

<?php

class Probytes_Customization_Block_Citysearch_Layer extends Mage_Catalog_Block_Layer_View
{

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

        /* To get picked up by Mage_Catalog_Product_List::getLayer() */
        Mage::register('current_layer', $this->getLayer(), true);
    }

    public function getLayer()
    {
        return Mage::getSingleton('customization/citysearch_layer');
    }
    protected function _getProductCollection()
    {

       if (is_null($this->_productCollection))
        {
            $layer = $this->getLayer();
            $productCollection = $layer->getProductCollection();
            $this->_productCollection = $productCollection;
        }
        return $this->_productCollection;
    }

}

It's the model

class Probytes_Customization_Model_Citysearch_Layer extends Mage_Catalog_Model_Layer
{

    public function prepareProductCollection($collection)
    {
            //parent::prepareProductCollection($collection);
            //Mage::getModel('customization');
            $data['address'] = Mage::app()->getRequest()->getParam('city-to-search');
            $model = Mage::getModel('customization/citysearch');
            $collection = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*');
            $collection->addAttributeToFilter('status',1)
                        ->addFieldToFilter('visibility', Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH);
            //$collections = Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($collection);
            $collection = $model->searchResult($data,$collection);
            return $this;
    }
    public function getProductCollection()
{

    if (isset($this->_productCollections[$this->getCurrentCategory()->getId()])) {
        $collection = $this->_productCollections[$this->getCurrentCategory()->getId()];
    } else {

        $data['address'] = Mage::app()->getRequest()->getParam('city-to-search');
            $model = Mage::getModel('customization/citysearch');
            $collection = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*');
            $collection->addAttributeToFilter('status',1)
                        ->addFieldToFilter('visibility', Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH);
            //$collections = Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($collection);
            $collection = $model->searchResult($data,$collection);
    }
    return $collection;
}

}

I tried like this
layered navigation for custom product collection on custom page

But not working, I am getting empty array in the left navigation.


texts: I need to use the Magento REST API to create an order.Which API(s) should I use to achieve this Or what are the steps to be followed to create an order with complete billing,shipping,payment details?


texts: Is it safe to disable Temando_Shipping & Dotdigitalgroup_Email?

texts:
There's a couple of Modules that are packaged with Magento Open Source these days that promote Magento Partners. I know that disabling Magento_Signifyd can be done safely without any collateral.

However, can Temando_Shipping, Shopial_Facebook & Dotdigitalgroup_Email be disabled safely without interfering with anything?

EDIT: 2.3.4. adds Dotdigitalgroup_Chat. So, both Dotdigitalgroup modules need to be either enabled or disabled in pairs. Otherwise this results in an Exception error when attempting to access the backend.

I've included a source to an article I maintain, in case I forgot to make further edits here in the future.


texts: Unable to Create admin user from cli Magento2

texts:
Hi am trying to create an admin user from the cli while running the commands i get the following error:-
# php bin/magento admin:user:create --admin-user=pramod --admin-password=pramod@123 --admin-email=pramod.mishra@netsmartz.net --admin-firstname=pramod --admin-lastname=mishra

In AdminAccount.php line 262:
No Administrators role was found, data fixture needs to be run
how to fix it any idea thankss
Update:- new error now while logging in admin
More permissions are needed to access this.


texts:
I am running a Magento 1.9.3.1 store and the agreements are not shown in the checkout. I tried going back to the default theme, checked if there are any agreements and if they are enabled. Nothing helped, they are never shown, not even in the default theme.

Any ideas what might be wrong?


texts: I just want to be able to remove the "Filters" button from Catalog > Products page

texts:
I just have this button
here in the Catalog > Products page

I just want to be able to remove/hide it programmatically.


texts:
How do I get all the products in an E-Commerce website developed in Magento?

Note: I am not the developer of the website, I am a student who is wondering if i can get all the products in that site listed at one place.

Edit 1:
Lot of Answers have given me solutions from the backend, but I want to know if it is possible from the front-end, for example, for websites built with OpenCart if you go to the search bar and type a single space and search, it will list all the products sold by that E-Commerce Website, I want to know if such a hack exists for Magento Websites.

Another example would be websites built with WooCommerce, if you enter the domain-name/products or domain-name/shop it will take you to the page which lists all the products, I am asking if there is such a method in Magento too. Lot of people put this question on hold siting the question was too general hope this edit gives them an idea about what I am exactly looking for.


texts: Update Cart Item quantity by customer quote id in custom API

texts:
I want to Update Cart Item quantity by customer quote_id in custom API.
I have tried below code but it's not work with Magento 2.3

$quote = $this->quoteRepository->getActive($quoteId);
                 $quoteItem = $quote->getItemById($itemId);
                $quoteItem->setQty((double) $qty);
                $quoteItem->save();
                $this->quoteRepository->save($quote);

It's not working.