texts: I am running magento on VM and i have set it up on my neatbean in save on FTP mode. However whenever i make changes it is getting saved into server rightly which i verified by opening file on filezilla as well. however modification is not visible on site untill i restart my virtual machine. It is becoming very hard for me to debug like this as for every echo, print_r i have ot restart my VM to see changes. Can anybody point out what is going wrong?


texts: Magento 2.2.7 sequence_order_1 after removing database prefix error creating orders

texts:
I'm using Magento 2.2.7, I had a prefix on my tables, e.g: ab_, I've removed the prefix on all my database tables via phpmyadmin, and I'm unable to now create orders due to the following error:

[2019-02-26 11:52:17] main.CRITICAL: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'site_db.ab_sequence_order_1' doesn't exist, query was: INSERT INTO `ab_sequence_order_1` () VALUES () {"exception":"[object] (Zend_Db_Statement_Exception(code: 42): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'site_db.ab_sequence_order_1' doesn't exist, query was: INSERT INTO `ab_sequence_order_1` () VALUES () at /Applications/MAMP/htdocs/MY-SITE/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:235, PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'site_db.ab_sequence_order_1' doesn't exist at /Applications/MAMP/htdocs/MY-SITE/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:228)"} []

Any suggestions?


texts: Getting products count and products per page

texts:
I'm using this code getting products. And also using some addAttributeToFilter method for filter.

$collection = Mage::getResourceModel('reports/product_collection')
    ->addAttributeToSelect('*')
    ->addStoreFilter()
    ->setOrder('created_at', 'desc')
    ->setVisibility(Mage::getSingleton('catalog/product_visibility')->getVisibleInCatalogIds());

Also I'm using $collection->count() code to get products count.

I'm trying to write my own pagination. (My products page is really complicated.)

Then I use this code setPage($pageNumber, $productsPerPage) to paginate.

But if I'm gonna paginate $collection->count() function return $productsPerPage number.

For example:

setPage(1, 6) // 6 product per page
$collection->count() // return 6 (but I have 16 products!)

If I use only $collection->count() code, it return 16!

What I'm missing?

I hope you guys understand me.


texts: Magento2: How to show error message if customer is LoggedIn?

texts: I have created custom form and create custom controller if customer is LoggedIn, then if anyone try to do registration then it requires to show the error message, how can i do that?


texts: Related Products are not visible in Product view page

texts:
I am facing an issue that related products are not visible in product view page. I have called related products in view page like below,

In template/catalog/product/view.phtml,

<?php echo $this->getChildHtml('related_products') ?>

In catalog.xml,

<block type="catalog/product_list_related" name="catalog.product.related" before="-" template="catalog/product/list/related.phtml"/>

Still why related products are not shown in my product details page ?


texts: Magento 1.9 payment_method_is_active event obsserver is not seeing my new payment method


texts:
I am using magento 1.7. i am faceing strange problem. magento making duplicate product url with random number with wrong url key please my attached screenshot

I also empty table rewrite_urls and reindex urls but still i am getting wrong urls. please help me to solve this problem. if you are unable to view images in question then please click on links duplicate product urls and Product in admin panel

,

Let me make understand u with example

Like i have one product named "example" and url key is "example" Url will be

www.example.com/example

and now i have created new product "xyz and  url key is "xyz" and url should be

www.example.com/xyz

but magento generating url

www.example.com/example-123


texts: I need to create place order using REST API. I want to help someone to create API. If you have any reference URL for perfect code please let me know.


texts:
Can anyone tell me where is the code written for Compare page Print https://prnt.sc/vmmvgr.
The print page is totally messed up.Can anyone help me on this. I need to remove header and footer from the print page.


texts: Is Handles tag name allways a full action name point to controller action?

texts:
Despite <default> is Handles tag name allways a full action name point to controller action or it's just a unique name register somewhere else?

<helloworld_index_index />

app/code/.../Helloworld/controllers/IndexController.php::indexAction


texts: Magento 2 opposite of deployment (setup develpment environment)

texts:
Situation:

I have got access to a live server that runs Magento 2 that was deployed with capistrano, so the structure looks like following:

- releases
   - 20160311115120
   - 20160325080754
- repo
   - branches (empty)
   - hooks
   - info
   - objects
   - refs
     config
     description
     FETCH_HEAP
     HEAD
     packed-refs
- shared
   - app
   - pub
   - var
   current
   revisions.log

and I have got access to bitbucket repository, that only holds custom code (no core) and the structure is following:

- app
- bin
- dev
- lib
- pub
- setup
- var
- vendor
.gitignore
.htaccess
.php_cs
.travis.yml
.user.ini
CONTRIBUTING.md
composer.json
composer.lock
index.php
package.json
+ a few others

Problem:

I need to setup a development environment that is exatcly as live, so that I could contribute to repo and then deploy changes, but I cannot find information on how to do that.

I have tried to install a fresh Magento 2 on a new dev server and then pull from the repo, however, not all of the files are there and Magento 2 version differs.

Question is: how to do the opposite of deployment - setup a development version from live environment?

Any help or guidance is much appreciated.


texts: Magento 2 - Admin Layout XML - Update Template and change block type for specific category

texts:
What I thought to be an easy update, well at least in Magento 1, has turned into a huge adventure. Simply updating a template and a block type for a single category via the Magento admin, an out of box feature for Magento 1... Now I'm stumped. :(

Originally I tried the below:  Note: I used the blocktype of  Magento\Catalog\Block\Navigation as it contained access to the current categories children and other logic I needed, why duplicate something that already exists right?  In the admin panel I am editing a category and have set the "Custom Layout Update" to:

<referenceBlock name="category.products.list">
    <arguments>
        <argument name="template" xsi:type="string">Magento_Catalog::product/subcat-list.phtml</argument>
    </arguments>
    <block class="Magento\Catalog\Block\Navigation"/>
</referenceBlock>

Then I got the error: Please correct the XML data and try again. Element 'referenceBlock': This element is not expected. Expected is one of ( referenceContainer, container, update, move ). Line: 1

Why do you need to target a reference container inside of the Admin panel, and can't just reference the desired block? In my adventures, I believe I tried this exact xml inside module layout file and I remember it working as expected.

Common Magento, How do you reference a block nested two levels deep from the container without duplicating everything?

Let's start being crazy, begin by using methods that are supposedly deprecated by Magento. I then tried the following with visual success... Feels so dirty:

<referenceContainer name="content">
    <referenceBlock name="category.products">
        <block name="product_list" class="Magento\Catalog\Block\Navigation">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">Magento_Catalog::product/subcat-list.phtml</argument>
            </action>
        </block>
    </referenceBlock>
</referenceContainer>

Well, this worked but now I get an exception in the logs of: Magento\Framework\Exception\LocalizedException: The element 'category.products' already has a child with alias 'product_list' in /var/www/signatureneedle_magento/html/vendor/magento/framework/Data/Structure.php:611

I know, because I'm redeclaring it Magento....   Can anyone tell me what I'm doing wrong? Am I crazy, or does this ability not exist anymore... or am I doing this completely wrong?   Any help would be greatly appreciated.

Thank you,

Robert


texts: Get all orders of customer by email id Magento 2

texts:
How can I get all orders of a customer via his/her email id who is logged in,
I am using current session to get user's email id

public function getCustomerData() {
    if ($this->_customerSession->isLoggedIn()) {
        return $this->_customerSession->getCustomerData();
    }
    return false;
}

In phtml

  $customerData = $block->getCustomerData();
  if($customerData) {
    echo 'Customer Email: ' . $customerData->getEmail() . '<br/>'; }

Earlier I was getting my orders information by order id

public function getOrderInformation($orderid)
{
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $order = $objectManager->create('Magento\Sales\Api\OrderRepositoryInterface')->get($orderid);
    return $order;
}

How can I get all orders by customer email id


texts: Add attribute to bundle pre order product

texts:
I have a pre order extension that gives me an attribute "Preorder Product Availability" that responsible for the time date of Availability of the products ,
and I have bundle products.
Then I put in this bundle some simple preorder products and that's makes this bundle an pre order bundle,
the problem is that when the date time passes and I want to extend the date (that I'm doing by updating the simple preorder products of this bundle) I have this error that says:
"Preorder date should not be a previous date."
and I can't update this bundle because of that .
so I notice that this problem can be fixed when I making bulk edit to all this bundle products and in the bulk section I can see that I can change the "Preorder Product Availability" attribute .
so my question is how can I add this("Preorder Product Availability") attribute to bundle products that are preorder?
The problem is that the bundle becomes pre order when I'm adding to him preorder simple products.
but when I try to update the date of the preorder the bundle give the error :
"Preorder date should not be a previous date."
I don't think someone can help me but I can try Lol


texts: Struggling with capital letters and xlm namespace while creating a block for a new module

texts:
I am trying to create a block containing a method callable on my template

I believe i doing something wrong with capital letters or declaration conventions in my xml files.
I did not manage to declare properly my block in the layout file.

can anyone help ?

local/Maticode/WebLog/etc/config.xml :

        <?xml version="1.0"?>
         <config>
           <modules>
              <Maticode_WebLog>
                 <version>
                 0.1.0
                 </version>
              </Maticode_WebLog>
           </modules>

           <frontend>

               <routers>
                   <weblog>
                      <use>standard</use>
                      <args>
                       <module>Maticode_WebLog</module>
                      <frontName>weblog</frontName>
                      </args>
                 </weblog>
               </routers>

                 <layout>
         <updates>
                <weblog>
                     <file>webloglayout.xml</file>
                </weblog>
                 </updates>
         </layout>

                </frontend>

                     <global>
                          <blocks>
                             <weblog>
                                <class>Maticode_WebLog_Block</class>
                            </weblog>
                          </blocks>
                       </global>

                 </config>

local/Maticode/WebLog/Block/monblock.php:

         <?php
           class Maticode_WebLog_Block_Monblock extends Mage_Core_Block_Template
          {
             public function methodblock()
             {
               return 'informations de mon block !!';
             }
           }

design/frontend/base/default/layout/webloglayout.xml:

         <layout version="0.1.0">
           <weblog_index_index>
             <reference name="root">
               <!--http://localhost/magento/weblog/ outputs : 'here'-->

               <!--  <block type="page/html" name="root" output="toHtml" template="weblog.phtml" />-->

               <!--this does not display the template  -->
         <block type="weblog/monblock" name="afficher_monbloc" template="weblog.phtml" />
             </reference>
           </weblog_index_index>
         </layout>

design/frontend/base/default/template/weblog.phtml:

        <?php
      echo 'here';
      echo $this->methodblock();
         ?>


texts: Magento 2 how to lock a customer account when it's in an specific group?

texts:
I have been searching how to lock a customer account but had no luck.
My idea is to create a customer group called Locked, and every customer that is assigned to that group will be locked.

I was thinking that a Plugin or Observer might work everytime I switch a customer to this group, but then how do I lock the account? is there something like
$customerStatus = $customer->isLocked(); or a method that I can use to lock the customer?

Greetings!


texts:
good morning !
I have a problem in my store. When the client will complete the purchase and choose the shipping method , the action is not completed. The Pagania of a small loaded and no longer does anything . In the default theme it works normal. Already looked at the console and does not have any error in JS ...
Someone ?

This are the Errors (added from comments)

2015-01-06T11:23:09+00:00 ERR (3): Warning: include(LogPagSeguro.php): failed to open stream: No such file or directory in /home/storage/8/7b/b4/arcanusmarket1/public_html/store/lib/Varien/Autoload.php on line 93
2015-01-06T11:23:09+00:00 ERR (3): Warning: include(): Failed opening 'LogPagSeguro.php' for inclusion
 (include_path='/home/storage/8/7b/b4/arcanusmarket1/public_html/store/app/code/local:/home/storage/8/7b/b4/arcanusmarket1/public_html/store/app/code/community:/home/storage/8/7b/b4/arcanusmarket1/public_html/store/app/code/core:/home/storage/8/7b/b4/arcanusmarket1/public_html/store/lib:.:/usr/share/pear')
in /home/storage/8/7b/b4/arcanusmarket1/public_html/store/lib/Varien/Autoload.php on line 93
2015-01-06T11:23:09+00:00 ERR (3): Warning: include(LogPagSeguro.php): failed to open stream: No such file or directory in /home/storage/8/7b/b4/arcanusmarket1/public_html/store/app/code/core/Mage/Core/functions.php on line 68


texts: Add Custom Header Link in Magento 2 - Not Working

texts:
Here's my code:

default.xml file in app/code/Demo/Mymodule/view/frontend/layout

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

        <referenceBlock name="header.links">
            <block class=”Demo\Mymodule\Block\Link" name="custom-header-link" >
                <arguments>
                    <argument name="label" xsi:type="string" translate="true">test</argument>
                    <argument name="path" xsi:type="string" translate="true">Test</argument>
                </arguments>
            </block>
        </referenceBlock>

</page>

Link.php in app/code/Demo/Mymodule/Block:

<?php

namespace Demo\Mymodule\Block;

class Link extends \Magento\Framework\View\Element\Html\Link
{
/**
* Render block HTML.
*
* @return string
*/
protected function _toHtml()
    {
     if (false != $this->getTemplate()) {
     return parent::_toHtml();
     }
     return '
getLinkAttributes() . ' >' . $this->escapeHtml($this->getLabel()) . '
';
    }
}

But it's not showing!


texts: Reorder tabs in Magento 2 mobile menu, in the navigation-sections group

texts:
I have added a new section to the navigation-sections block in the header, so that I can include it in the mobile menu. The element is displayed correctly, but I cannot change the order of the tabs, to have a new "Welcome" tab show first (by default it shows last). Is there a way of ordering group items?

<block class="Magento\Framework\View\Element\Template" name="store.mobile-welcome" group="navigation-sections" template="Magento_Theme::html/container.phtml" before="store.menu">
    <arguments>
        <argument name="title" translate="true" xsi:type="string">Welcome</argument>
        <argument name="priority" xsi:type="string">1</argument>
    </arguments>
    <block class="Magento\Framework\View\Element\Template" name="store.mobile-welcome-message" template="Magento_Theme::html/mobile-welcome.phtml" />
</block>

I have tried using before="store.menu" and passing a priority argument, and neither are working.


texts: Using searchCriteria with condition_type operators "from" and "to" in Magento 2.0

texts:
I'm trying to use the Get Orders API with searchCriteria to filter Orders with base_subtotal range between two values. But I have only been able to use the lt and gt. I'm unable to use both in the same query.

I can see the Magento documentation mentioning that I can do that using the from and to operators. However, I can't figure out how to get it to work or what is its syntax.

The current request I'm using to get the Orders with base_subtotal less than 50:

http://{magento_host}/magento/rest/default/V1/orders?searchCriteria[filter_groups][0][filters][0][field]=base_subtotal&searchCriteria[filter_groups][0][filters][0][value]=50&searchCriteria[filter_groups][0][filters][0][condition_type]=lt

What I'm trying to do is getting the orders where base_subtotal < 50 AND base_subtotal > 20.

Any idea how to do this using searchCriteria?


texts: How to disable automatic selection of default shipping address in oneStepCheckout page

texts:
Here am trying to make shipping address select manually. In One step checkout it selecting the default address ad default.
I modified in the below file

/var/www/html/app/code/Mageplaza/Osc/view/frontend/web/js/view/shipping.js

/**
                 * Solve problem when customer has more than 1 addresses but no one is default shipping address
                 * Shipping address will not auto select the first one, so billing address throw error when trying to
                 * calculate isAddressSameAsShipping variable
                 */
                if (!quote.shippingAddress() && addressList().length >= 1) {
                    // selectShippingAddress(addressList()[0]);  Here i commented this line****
                }

and executed below commands

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
php bin/magento setup:di:compile
php bin/magento cache:clean
php bin/magento cache:flush

but still no change in the checkout page

Where am doing wrong? can I get help. Thank you in advance.


texts: Manage unique encryption key in module for every installation

texts:
I am working on Payment Gateway. for data encryption and decryption I want to write encryption key for particular extension at the time of installation.

My question is which is the better way to manage key specific to particular extension ?

can I write key in module config.xml file ?   Or Can i write one new file in module to generate key ?

Please help


texts: Files uploaded through Manage Attachments changes filename - how to keep original name?

texts:
Is it possible to deactivate the auto renaming of file uploaded through manage attachments?

e.g. test.PNG is getting saved as File-1540823510.png on the webserver.

Is there a way to deactivate this in the backend, or do I have to change the code?


texts: Switching from Luma to Blank not working

texts:
I tried to switch default theme from Luma to Blank by going to Content > Configuration and editing the 3 records to Blank theme as you can see :

Then I erased Browser cache, restarted apache and mysql, and reload the Home page, but it still the Luma Theme:


texts: How to create a nonce / secure hash in Magento 2?

texts:
I want a simple link to activate a customer out of an email that gets sent to the admin on registration.

I am using this module: https://github.com/enrico69/magento2-customer-activation for the registration / activation workflow.

My idea is to add a link to that email, and add a nonce / secure hash to that email which I can decrypt in a custom controller to get the customer-id. My custom controller will simply call the methods from the named module and I am set.

The question is: how do I get such a secure hash? WordPress has the wp_create_nonce() method for this. Is there a similar thing in Magento 2?


texts: I just updated a CMS page, which of the numerous caches should I flush to see the changes?

texts: As the title suggested I have made some updates to a CMS page and was trying to avoid clearing all of my caches and indexes. I googled but did not find a clear concise explanation for which caches cleared what.. any help appreciated.


texts:
I have magento 1.9.1 with the theme "trego". On the home page I have black background, there I want to use a logo with white color, the product pages have white background, there I require a logo with black color.

how can I use different logos for different pages?

Example logo code:


texts:
buddy:

I have a Magento 1.9.1 version website, I feel it running slower, how to do it can make it run faster?

I hope you help!

thank you very much!


texts: Height and width options image css magento

texts:
$h= (int) Mage::getStoreConfig('mw/news/h_image');
 $w =(int) Mage::getStoreConfig('mw/news/w_image');
 <div class="post-items" style="height: $h; width: $w">

I know it don't work but I don't know what to do to it work


texts: Solved - Magento 1.9 - IWD OPC - How can I display Base Grand Total on the checkout page?

texts:
I am running a Magento 1 website with version 4.2.2 of IWD One Page Checkout.

I have just modified the website to display a currency selector.

What this module does not appear to display is the Base Grand Total on the checkout page i.e.

  Your credit card will be charged for £00.00

I have looked at modifying the following file but cannot find a variable to add in

  \app\design\frontend\ultimo\xxx\template\opc\wrapper.phtml

The Grand Total is displayed by:

<?php echo Mage::helper('opc')->getGrandTotal()?>

Anybody?


texts: Magento 2 create invoice for igst rest api

texts: I am trying to add IGST and SGST and CGST in invoice rest api , please help me ,in Magento2.


texts: How to activate a "retry" in case of no payment status receive from Payment gateway to Magento?

texts:
In 90% of case everything goes well but sometime magento can't get the payment status from our Cybersource payment gateway.
I would to activate a retry in this case, in order to know if payment has been placed or rejected.

Someone know hos to do ? Or maybe there is another solution like increase the timeout ?


texts: Can´t add Emojis in Meta Title, Description - Help

texts:
I can't add emojis in meta titles or meta description.

On save, Magento erases emoji and text below.

My Magento version is 1.9 community


texts:
What is the difference between <action method=”unsetChild”> and <remove name=""/>?

Both functions are used to remove a block from the layout.

Could someone explain with an example?


texts: Paypal standard does not show as payment  for users ( it is enabled ). I saw something one of the Patch Notes that  it was a fix  for  Paypal not showing on checkout  for certain merchant countries , in this case is about Romania.


texts: Magento 2 error "No such entity with cartid =xxxx"

texts: I'm frequently getting this" No such entity with cartId =xxxxx " When I try to edit order by set order status to another status or assign order to customer. I've taken a look at the database and there is no row in "quote" with an entity_id of cartid that shows on the browser. I guess for some reason when I edit order, it try to retrive order quote id then when it is not found, gave me that error. I know some quotes deleted from quote table by magento cron every 30 days. Please How do I fix this?


texts: Magento2: contact page - issue with captcha "incorrect' not showing

texts:
After enabling captcha for the contact form the captcha is not shown on the form. If submitted an "Incorrect CAPTCHA" error is displayed. Tried in production and development modes. No Javascript errors in the console.

Preconditions

Magento 2.1.6

PHP 7.0.12

MYSQLl 15.1 10.0.27-MariaDB

Varnish 4.1.3

Redis 3.2.3

Steps to reproduce

Select stores->Configuration->Customers->Customer Configuration->Captch->Forms->Contact us and save

captcha

Refresh caches

Clear varnish cache

We check links:
https://github.com/magento/magento2/issues/9635

Magento 2 CAPTCHA not showing when enabled

But I think that there is not completely understood how to solve this problem. Can anyone give an answer here?


texts: How to get the credit card details in Magento 2 using authorize.net method?

texts:
Does default Magento2 authorize.net payment method save the credit card details?

If yes, then How can we retrieve the credit card details used by authorize.net?

If not, please suggest the best way to achieve so.


texts:
Hello where trying to build magento 2 website from shopify 10k sku
It is better to use a dedicated server with Intel Xeon E5-1650V3 64GB ram with 512 SSD Drive(Datacenter)
Or Use Cloud Hosting with a setup of
2 Frontend Server with 1 Backend Server , 1 Server for Redis , 1 Server for Elasticsearch , 2 Server for Database
Looking forward for your help
Thanks


texts:
I use this code for get products :

public function getProducts()
{
    $product = Mage::getModel("catalog/product")
                    ->getCollection()
                    ->addAttributeToSelect('*')
                    ->addAttributeToFilter('star', ['gt' => 0])
                    ->addFieldToFilter('visibility', Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH)
                    ->addAttributeToFilter(
                        'status',
                        ['eq' => Mage_Catalog_Model_Product_Status::STATUS_ENABLED]
                    )
                    ->setPageSize(self::NB_PRODUCTS)
    ;
    return $product;
}

I want to add a filter, for get only category id #3 products per exemple.
I try to add :

// ...
->addAttributeToFilter('category_id', array('in' => array('finset' => 3)))
//...

But it dont works :

Fatal error: Call to a member function getBackend() on boolean in mylocalserver\app\code\core\Mage\Eav\Model\Entity\Abstract.php on line 816


texts: How to uninstall sample data with database from magento2?

texts:
Is there a way to remove sample data in Magento2 without uninstalling/re-installing Magento?

because I have changed settings in my back-end. and that I don't want to be removed.

But need to Remove all sample data also from back-end Like products categories  and customers Etc.


texts: CSS error in Safari 8.0.8 but not in 9.1.1

texts:
What are the main differences for writing CSS for Magento 1.9.2.4 in both versions of Safari? I searched the Internet but can't get proper documentation.

The reason I ask this is because of the following issue:

When I visit the site in Safari 8.0.8 I see:

When I am in Safari 9.1.1 the same page looks like:

The second image is the correct view. Size of the screen has no influence in the view. It works correct on my iPad. Not checked on iPhone.


texts: Magento 1.9.2 and php7 - image upload error

texts:
I'm just testing Magento 1.9.2 with Php 7. All seemed to work, but suddenly I tried to upload image for the product. I got error like below:

Fatal error</b>:  Uncaught Error: Function name must be a string in /home/admin/domains/store.com/public_html/dev/lib/Varien/File/Uploader.php:259
Stack trace:
#0 /home/admin/domains/store.com/public_html/dev/lib/Varien/File/Uploader.php(180): Varien_File_Uploader-&gt;_validateFile()
#1 /home/admin/domains/store.com/public_html/dev/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/GalleryController.php(46): Varien_File_Uploader-&gt;save('/home/admin/dom...')
#2 /home/admin/domains/store.com/public_html/dev/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_Catalog_Product_GalleryController-&gt;uploadAction()
#3 /home/admin/domains/store.com/public_html/dev/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action-&gt;dispatch('upload')
#4 /home/admin/domains/store.com/public_html/dev/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard-&gt;match(Object(Mage_Core_Controller in <b>/home/admin/domains/store.com/public_html/dev/lib/Varien/File/Uploader.php

Anybody know how to fix it?

Function affected in upload.php at line around 259

protected function _validateFile()
    {
        if ($this->_fileExists === false) {
            return;
        }

        //is file extension allowed
        if (!$this->checkAllowedExtension($this->getFileExtension())) {
            throw new Exception('Disallowed file type.');
        }
        //run validate callbacks
        foreach ($this->_validateCallbacks as $params) {
            if (is_object($params['object']) && method_exists($params['object'], $params['method'])) {
                $params['object']->$params['method']($this->_file['tmp_name']);
            }
        }
    }


texts:
The Mini-Cart has a problem on my Magento 2 project. When I request the following URL:

/customer/section/load/?sections=cart

I get the following Response:

{
   "cart":{
      "summary_count":2,
      "subtotalAmount":438,
      "subtotal":"CHF\u00a0438.00<\/span>",
      "possible_onepage_checkout":true,
      "items":[
         {
            "product_type":"configurable",
            "options":[
               {
                  "label":"Gr\u00f6sse",
                  "value":"",
                  "option_id":659,
                  "option_value":""
               }
            ],
            "qty":2,
            "item_id":"253",
            "configure_url":"http:\/\/example.com:8000\/checkout\/cart\/configure\/id\/253\/product_id\/15828\/",
            "is_visible_in_site_visibility":true,
            "product_id":"15828",
            "product_name":"Damen, Herren Anh\u00e4ngerkette Basic",
            "product_sku":"738529101742",
            "product_url":"http:\/\/example.com:8000\/damen-herren-anh-ngerkette-basic-7612690509546-configurable.html",
            "product_has_url":true,
            "product_price":"\n    \n            \n            CHF\u00a0219.00<\/span>        <\/span>\n\n        <\/span>\n\n",
            "product_price_value":203.35,
            "product_image":{
               "src":"http:\/\/example.com:8000\/media\/catalog\/product\/cache\/f485795eb4b45ff97c82d72651274f10\/7\/6\/7612690509546_2d_0001.jpg",
               "alt":"Damen, Herren Anh\u00e4ngerkette Basic",
               "width":78,
               "height":78
            },
            "canApplyMsrp":false
         }
      ],
      "extra_actions":"",
      "isGuestCheckoutAllowed":true,
      "website_id":"1",
      "subtotal_incl_tax":"CHF\u00a0438.00<\/span>",
      "subtotal_excl_tax":"CHF\u00a0406.69<\/span>",
      "data_id":1541069457
   }
}

The problem with this response is that the "Option Value" and the "value" are empty and as such are not shown in the cart. In the Backend the Option exists and has a value.


texts: Magento error after clicking Place order

texts:
I get this error when trying to place an order:

  Fatal error: Call to undefined method
  Mage_Core_Model_Email_Template_Filter::getInlineCssFile() in
  /.../app/code/core/Mage/Core/Model/Email/Template.php
  on line 313

I updated Magento to the latest version (1.9.2.4) and cleared cache but I still get this error.

The function getInlineCssFile() is in /app/code/core/Mage/Core/Model/Email/Template/Filter.php file.

How can I fix this?


texts: Decimals in Minimum Qty Allowed in Shopping Cart

texts:
I have a special setup where we have some products that are sold on exact sizes (like 3.14 sq m).

In order to comply with local invoice regulations the base price needs to be provided in 1 sq m, so in order to achieve this all products of this type have the surface size in the qty field and in the Minimum Qty Allowed in Shopping Cart I have the amount again.

On the front end the qty field is hidden so when somebody wants to add a product to cart the exact size is added without the possibility to change the qty.

The problem is that when I specify a decimal in the Minimum Qty Allowed in Shopping Cart field this is saved to the database, but when I reload the product in the backend the number is rounded down and on the next save the decimals are lost.

Anybody else facing this issue and where can I look for a solution?


texts:
I try to get all active products with a quantity less then 5. I getall active products via

V1/products/?searchCriteria[filter_groups][0][filters][0][field]=status&searchCriteria[filter_groups][0][filters][0][value]=1&searchCriteria[filter_groups][0][filters][0][condition_type]=eq

But how do I add a filter to a quantity <5 ? I added this criteria, but it didnt work:

&searchCriteria[filter_groups][0][filters][1][field]=extension_attributes[stock_item[qty]]&searchCriteria[filter_groups][0][filters][1][value]=5&searchCriteria[filter_groups][0][filters][1][condition_type]=lt

Can somebody explan how to create a searchCriteria for nested fields? Because I think this seems to be the problem here...


texts: Magento 1: Relationship Between `qty` in Stock Item, and Stock Status Tables

texts:
In Magento 1, Inventory information is stored in a Stock Item object.  Each Stock Item object is associated with a product object.  Magento persists Stock Item objects to the cataloginventory_stock_item table.

However, each Stock Item object has a related Stock Status object.  Stock Status appears to be an (index|cache|de-normalized) table that stores a product's stock status as in integer constant, and allows you to associate multiple stock items and products with a different website_id. Magento persists stock status objects to the cataloginventory_stock_status.  The class constants and table schema for this are below.

class Mage_CatalogInventory_Model_Stock_Status extends Mage_Core_Model_Abstract
{
    const STATUS_OUT_OF_STOCK       = 0;
    const STATUS_IN_STOCK           = 1;
}

mysql> describe cataloginventory_stock_status;
+--------------+----------------------+------+-----+---------+-------+
| Field        | Type                 | Null | Key | Default | Extra |
+--------------+----------------------+------+-----+---------+-------+
| product_id   | int(10) unsigned     | NO   | PRI | NULL    |       |
| website_id   | smallint(5) unsigned | NO   | PRI | NULL    |       |
| stock_id     | smallint(5) unsigned | NO   | PRI | NULL    |       |
| qty          | decimal(12,4)        | NO   |     | 0.0000  |       |
| stock_status | smallint(5) unsigned | NO   |     | NULL    |       |
+--------------+----------------------+------+-----+---------+-------+
5 rows in set (0.01 sec)

However, for reasons that aren't entirely clear, there is also a qty column in this table.

What is the relationship between these two qty columns?

Which is the source of truth for qty and which is the indexed/cached value?  Is the value in stock_status simply a cached version of what's in the stock item table?  Or is there a way to configure Magento to manage stock on a website level?  Or is the relationship something other than what I've described?


texts: Magento 2.3.3 Fatal error: Uncaught Error: Call to a member function getReviewsCount()

texts:
I have upgrade Magento version from 2.3.1 to 2.3.3 and now I am getting an error on the product

Fatal error: Uncaught Error: Call to a member function getReviewsCount()

My code for getting review count

$_product = $block->getProduct();
$reviewCount = $_product->getRatingSummary()->getReviewsCount();

in one custom module, I have got product review and now it's said that getReviewsCount() function is not found anyone has an idea how to get product review count in 2.3.3


texts:
I have 2 questions, I am new to Magento but not to programming in general.

Where do i change html content like H1, H2 in home page, products
page, etc. I noticed the difference between cms and category but what
i see inside the panel are either xml or references to Phtml? Where
do i find common Html structure with footer, header, etc?
Where do i setup code like the one requiered in Google Search Console
to function?

Thank you and regards :)


texts:
Is there a graph (or any other visual "thingy") to see how the core modules depend on each other in Magento 2?
(Yes, I tried Google, but he doesn't want to tell me.)


texts:
I am currently developing a new module for my company on Magento 2.1.8.
The module requires the use of AJAX on the front end to send a receive data.

This is what i currently have in one of my controllers with the file path:

  Forum/Controller/Post/Message.php

<?php

namespace VendorName\Forum\Controller\Post;

class Message extends \Magento\Framework\App\Action\Action
{
    public function execute()
    {

        $this->_view->loadLayout();
        $this->_view->getLayout()->initMessages();
        $this->_view->renderLayout();
        echo "Message returned from Controller Post/Message";
    }
}
?>

This does not seem to be returning anything other than a 404 error when I try to hit the page

www.mywebsite.com/forum/post/message

What am i doing wrong here?

thanks.

EDIT:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd">
    <router id="standard">
        <route id="forum" frontName="forum">
            <module name="VendorName_Forum" />
        </route>
    </router>
</config>


texts: API working but doesn't return any data?

texts:
For testing purposes I've setup a REST Guest role with "All" access across the Catalog in my store, so I can throw some queries at the API whilst I find my feet.

Using Simple REST client in Chrome I can issue a GET request to http://www.mystore.co.uk/api/rest/products/1/categories which in theory should return the name of the category(ies) that product ID 1 has assigned to it?

I'm getting a success (200 - OK) response but the only actual data I get returned in Simple REST Client is "[[]]" rather then the name of the category that product ID 1 is in.  I've verified that the product definitely has a category assigned.

Any ideas where I'm going wrong?

Thanks.


texts: I have Magento 1.9.2.3 installed and i can't checkout, after complete all fields in the Billing Information section and press continue, i don't have any errors but appear something like this, and in the back of the image I see that State/Province is not select now, take a look at the image:


texts: Magento 2 - Auto login with specific URL

texts:
I have a custom module, I want to auto login a customer on it when the customer comes with an specific url like:

  www.example.com/myModule/?k=2sadf23wasdfde3wefsd34ss43545sdgasdfg/

I have the email address stored in the database against the key that is in URL string.

How can I auto login that particular customer?


texts:
We can disable Compilation in Magento 1 in the admin.
But there is no settings in Magento 2 in the admin.
Also compile is something different compare with m1.
Its depending on the mode (default,developer,production) we are running app.
Anyone have in-depth knowledge on compile?

devdocs contains limited info.


texts: How to remove sku and add another column from configurable product detail page

texts:
I need to edit configurable product grid view.
Dashboard -> Catalog -> Product-> Add product(configurable product) or Edit(configurable product) ->Create Configuration or Edit Configuration -> Grid view.

Here i need to remove sku column and add another column instead of this one.

How to edit these fields.


texts: How can I add a static block in product page before reviews?

texts:
I'm using default RWD theme. I'm trying to add my static block in product page between additional information tab and product reviews tab.

I tried to add something like this in my local.xml file but it doesn't work:

<catalog_product_view>
    <reference name="product.info">
      <block type="cms/block" name="my_block_name" before="reviews">
        <action method="setBlockId"><id>my_block_name</id></action>
      </block>
    </reference>
</catalog_product_view>


texts: Magento2 Payment Methods Not Showing at Checkout

texts:
Using latest version 2.1.6 of Magento2. Payment methods are enabled in admin but not showing on our checkout page. They are showing fine when we manually process an order from the sales > orders area of Magento dashboard. Shipping methods show fine. All they obvious settings are in place and cache cleared etc. Any ideas where to start on establishing why this issue occurs?

First line of system.log file entry I think is related is below:

  [2017-05-11 13:06:07] main.INFO: Item Magento_Backend::system_currency
  was removed [] []

But the currency is set as it should be in Magento settings.


texts: How to Remove Categories Filter from the Sidebar

texts:
in Magento 2.1, I would like to have the Category filter removed from the sidebar when in the shop category page, leaving the price filter untouched.

So far I have tried unsetting the category as anchor, which doesn't change anything. I am able to remove the whole sidebar with XML, but that's not ideal because I want to keep using the price filter.


texts:
I want to show the category-listing on a custom module-page.
For example: [url]/brandstore/index/listing/brand/1/category/10

I tried to copy the content of the catalog_category_view.xml to my custom
brandstore_index_listing.xml but i get an exception because the current_category is not defined in the registry.

Any suggestion for this issue?


texts: Magento 2 - change default category product grid settings

texts:
Magento 2 has four products displayed per row in the category view (grid) by default.

How can i change that so it shows 9 products per page (3x3) in grid view? Currently it shows 9 products, but 4x2 + 1 product at third row.

Demo fiddle with current and wanted grid setup.


texts: How to Add Video/Audio to Products in Magento Admin

texts:
I want to add some new functionality on the administration product edit page; providing the ability to upload videos and audio.

How can I achieve this?


texts: How to display categories in menu in the same order as in admin category tree?

texts:
I wonder if there way to have same sort order of categories in frontend menu as in admin panel category tree.

I thought position attribute should be used for this goal, but I've found that categories from level 3 and deeper have same position value as a parent, number on the screenshot is a position value


texts: Redirect to checkout on add to cart click

texts:
I need to have two buttons on my product page one with title buy now and second  add to cart

On click of  "add to cart" it needs to follow the normal add to cart process while on click of buy now it needs to add product to cart and redirect to checkout page.

Is it possible to achieve this???/


texts: Magento2 provide customer specific PDF document in customer account

texts:
In my Magento2 I want to provide a customer specific PDF document for registered customers who purchase certain articles.

The customer purchases an article which is actually like a coupon for a  service.
After the vendor receives order and payment, he processes the
service.
After the service is done (after a couple of days), the customer should get his personal PDF document for download in his account.

I hope I explained my issue. Can anybody give a hint how to approach this?


texts:
I'm working in Magento 2.3 EE.

Very recently I got one issue related to order summary.

I have purchased one product and again order the same product, then the order summary shows 0. Please refer to the below image.

But this also happened very randomly.

I'm trying to figure out the root cause and solution for this issue.

Please give some suggestion to solve the issue.

Thanks in advance.


texts: Customize sales_order_grid ONLY IN custom module

texts:
I have created a custom module and admin path. I set my layout file to render "sales_order_grid".  Here is the content of
view/adminhtml/layout/custommodule_layout_index.xml
<body>
    <referenceContainer name="content">
        <uiComponent name="sales_order_grid"/>
    </referenceContainer>
</body>

I copy paste "sales_order_grid.xml" to view/ui_component and updated some fields. But it is affecting to original sales -> orders grid also. (I do understand how this happens. I just don't know how to differentiate grid showing in my module from global orders grid)
And I want to remove some columns and add some filters to this grid in my module. And it should not affect to sales_order_grid globally. How can I achieve this?
I briefly considered copy pasting entire module_sales content and removing unnecessary files. But the original module seems little hefty to edit.


texts: I want to debug which api is called.Any tool is available for debugging in magento 2.1.12?Anybody help me.


texts: Magento2: How to add custom section below the order total on the checkout page?

texts: I want to add a custom section below the order total on the checkout page.


texts: The meaning of "files dispertion" in Magento 2

texts:
In the Magento\Framework\File\Uploader, there is a variable name $_enableFilesDispersion:

/**
 * If this variable is set to TRUE, files dispertion will be supported.
 *
 * @var bool
 * @access protected
 */
protected $_enableFilesDispersion = false;

My mother tongue is not English, so I do not understand the "files dispertion", what's the meaning of "files dispertion"?

If I set $_enableFilesDispersion = true;, what will happen?


texts: Cannot do shipment for the order. on Magento 2.3.3

texts:
After Upgrade from Magento 2.3.2 to 2.3.3 we have an error on order's shipping confirmation.

Sending Shipping and Tracking Information after adding any Shipping and Tracking Information we get blank page  Shipped By ...

In system.log

  [2019-10-23 08:42:52] main.WARNING: Broken reference: The element with
  the "header.links" ID wasn't found. Verify the ID and try again. [] []
  [2019-10-23 08:42:52] main.WARNING: Broken reference: The element with
  the "customer" ID wasn't found. Verify the ID and try again. [] []

Anyone have a solution to fix?

Thanks,
Piero.


texts: Use custom Admin URL redirects to login screen

texts:
I have the following problem:
My webshop is available from 2 different URL. One that works only in the company network and an external URL. The base URL is set to the internal URL. Now to get the webshop accessible from the internal and the external URL I turned off the auto-redirect to base url option. This works wonderful for the frontend. But if I try to access the backend from the external URL, I get redirected to the base URL (which is the internal URL) after pressing the login button. Because of that I can't access the backend if I am not in my companies network.

Is there a possibility to turn of the base url redirection for the backend?

Update:
Well I've found the "Use Custom Admin URL" option. After turning it on and set the URL to my external URL I can access the backend from outside of the companies network. But it didn't solve my problem. Now if I login to the backend and click on a link I get to the login screen. Although the URL changes to the clicked link. eg. I wan't to access the System -> Configuration the URL changes to: http://externalURL/admin/system_config/index/key/ANAUTOGENERATEDKEY/
And I get displayed the login screen but not the System -> Configuration interface. If I reload the page the login screen disappears and the system -> configuration interface gets displayed.
To sum up: after changing "Use Custom Admin URL" I need to reload the page after every link I try to open to get rid of the login screen and get to the clicked link.

Is this a common magento error?


texts: Custom configurable product pricing property

texts:
Is it possible to have a product attribute like 'custom price' that is global and can be set on a configurable product in a way that the price for the item itself can be pulled from that field and override all the other places price can be set?

Right now I'm basically trying to avoid having to update the price for all of the simple products on a given configurable product.  I'd really like to find a way to pull it from just one field.


texts: Console command waiting for input from user

texts: It is possible in PHP to create console command waiting for an input from user like this or like this. Is there any 'magento-way' or above approaches can be used?


texts: Magento 2.4: upload bulk product images failing due to dashes in filename?

texts: It seems I'm having an issue with importing product images using csv. Just so you know, all images are in /var/import/images/. In the csv no path is written, just filenames (Using Magento 2.4). The only images that did import were the ones without a dash. The rest shows "Imported resource (image) could not be downloaded from external resource due to timeout or access permissions in row(s)" which is a standard message when an import fails. For example, just a simple image with filename vibes-black.jpg fails. Anyone know how this could happen? We need to keep those dashes for SEO purposes.


texts: Get the about to be refunded qty in credit memo (partials refunds)

texts:
I am trying to generate an xml with the refunding data when the credit memo is generated.

The issue is that I cannot find any updated information for products if the qty has changed, I still get the original qty.

For example, in the credit memo, I change for 1 product the qty to 0, press the update qty button, but if I check it like this:

var_dump(Mage::getModel('sales/order_creditmemo_item/')->load($order_id)->getData('qty'))

I still get qty 1 for both. I want to get the qty about to be refunded.

Thanks!


texts:
We have upgraded our Magento installation to 2.3.2 from 2.1.16 and the password validation when creating a customer account in the frontend doesn't work.

When I enter the following password " Qwerty12! " so it has all the requirements it says and keeps on saying password: Weak:

Minimum length of this field must be equal or greater than 5 symbols. Leading and trailing spaces will be ignored.

Here is a screenshot to make it more clear:

Also in the console, I see the following error when I type:

$.validator.methods[method] is undefined

The error is located in ValidateSingelElement in the validations.min.js and in the _calculateStrength in the password-strength-indicator.min.js


texts:
Below is the code which i am using right now, but it not working.
  <?php
    define('MAGENTO', realpath(dirname(__FILE__) . "/.."));
    require_once MAGENTO . '/app/Mage.php';
    umask(0);
    Mage::init();
    Mage::app()->addEventArea('global');
    Mage::getSingleton('core/session', array('name' => 'frontend'));

    $orders = Mage::getModel('sales/order')->getCollection()
        ->addFieldToFilter('created_at', array(
            'from'     => strtotime('-1 day', time()),
            'to'       => time(),
            'datetime' => true,
        ))->load();
    $orders_to_check = array();
    foreach ($orders as $order) {
        $order_id = $order->getRealOrderId();
        foreach ($order->getAllItems() as $item) {
            echo $item->getSku();
            if($item->getSku() == 'S343697'){
               $item->delete();
               $orders->save();
            }
        }
    }
    print_r($orders_to_check);exit;

any thoughts how to remove item from order ?


texts: How can i configure products in wishlist

texts: When a user adds a configurable product in wishlist and when he visit the wishlist, he should be able to make changes to the product like size and color.


texts: Magento 2 Creating Order for new customer Throws Exception "The value of attribute Account No must be set"

texts:
When I create a new order for new customer and submit the order it shows the exception

  The value of  attribute "Account No" must be set

account_no is the required attribute for customer table that means It needs to be filled so I added the custom field in the customer account Information section on order create page so that the user can give the account_no

Now I'm stuck on how to pass the new customer account number so that it creates the customer with account_no and save the order . I tried using the events

sales_order_place_before
sales_order_save_before
adminhtml_sales_order_create_process_item_before

<event name="adminhtml_customer_prepare_save">
    <observer name="account_num_customer_save_before" instance="Vendor\Module\Observer\CustomerSaveBefore" />
</event>

<?php

    namespace Vendor\Module\Observer;

    use Magento\Framework\Event\Observer;

    class CustomerSaveBefore implements \Magento\Framework\Event\ObserverInterface
    {

        protected $_helper;

        public function __construct(
            \Vendor\Module\Helper\Data $helper,
            \Magento\Framework\App\Request\Http $request,
            \Magento\Customer\Model\CustomerFactory $customerFactory,
            \Magento\Store\Model\StoreManagerInterface $storeManager
        ) {

            $this->_helper= $helper;
            $this->request = $request;
            $this->storeManager = $storeManager;
            $this->customerFactory = $customerFactory;
        }

        public function execute(\Magento\Framework\Event\Observer $observer)
        {
            /**
             * @var $customer \Magento\Customer\Model\Customer
             */

            $quote = $observer->getQuote();
            $customer = $observer->getCustomer();
            echo "<pre>";
        }

    }


texts: Change order of columns in tab "Products" of category

texts:
I would like to change the order of columns in tab "Products" of the categories, "SKU" should be after "ID".
I have put a local.xml in app/design/adminhtml/default/default/layout/local.xml containing the following code:

<?xml version="1.0"?>
<layout>
    <adminhtml_catalog_category_tab_product>
        <reference name="category.grid">
            <action method="addColumnsOrder">
                <columnId>sku</columnId>
                <after>entity_id</after>
            </action>
        </reference>
    </adminhtml_catalog_category_tab_product>
</layout>

It works, but when I click on the SKU to sort then the SKU jumps back to its orignal place.


texts: CPU issues after upgrading from Magento 2.2.4 to Magento 2.4

texts:
We recently upgraded our site from Magento 2.2.4 to Magento 2.4.
Done the upgrade on a copy of our site on a test server and everything was fine.
When we upgrade on our live server, the page load time increased dramatically when 4+ people were on the site at the same time. This also crashed EleasticSearch, so we moved that to it's own VPS and ES works fine now. Before the upgrade, 15-20+ users online at the one time wouldn't have been uncommon and the server handled it fine.
With 2.2.4, we had a VPS with 6GB RAM, 4 CPU's. Our hosting provider suggested we increase this when we ran into issues after the upgrade. We're now at 8CPU's, 12GB RAM and although that improved performance, load times from server were very long.
We now have Varnish running on a separate VPS and while that has sped up load times, it's still not good enough. Varnish has been running for the last 24 hours and we've been getting 503 and 504 errors and our Magento developer has told me these are due to Varnish waiting so long for our Magento server to respond.
Our hosting company is now telling us we need to get a dedicated server, is this necessary? Our Magento developer has said our VPS, if there's no issues with the server, should be fine. Our hosting company is telling us that the server is fine.
We're unsure what to do as we haven't much confidence in our hosting company as they have just been telling us to increase our package, without really investigating why we're having these issues.


texts: I edit lib varien file Multiselect.php working perfect in local not working in live

texts:
/lib/Varien/Data/Form/Element/Multiselect.php

I recently edited Multiselect file. its working fine in localhost but doesn't work on live. Is there any other Multiselect which is used in magento.

Also I debug the code ( Multiselect ). I added exit in localhost, but its not exit-ing on live. There is some ambiguity.


texts: Can you add the current Currency Symbol to a CMS Block

texts:
I would like to add a the currency symbol to a CMS block on a category page or in the category description.

It would be something like under €50 or under $50.

Is there a simple way to do this with a CMS directive? i.e.

  {{store_currency}}

Perhaps it's possible with a widget?

Otherwise I was thinking of using a custom variable but this would only work on a store view level and not if the customer changes currency within the store view.

Another option I thought of was to add a CSS class to the  tag depending on what currency is selected and use that to hide and display the right currency symbols.

But is there an more straight forward way of doing this? with a cms directive or widget?


texts: Magento 2 : Uncaught Error: cannot call methods on modal prior to initialization; attempted to call method 'show'

texts:
I am using below code to show modal, I am using semantic UI, I get below error

**

Uncaught Error: cannot call methods on modal prior to initialization; attempted to call method 'show'
    at Function.error (jquery.js:259)
    at HTMLDivElement.<anonymous> (widget.js:186)
    at Function.each (jquery.js:376)
    at jQuery.fn.init.each (jquery.js:142)
    at jQuery.fn.init.$.fn.<computed> [as modal] (widget.js:182)
    at <anonymous>:4:32
    at Object.execCb (require.js:1650)
    at Object.context.execCb (resolver.js:145)
    at Module.check (require.js:866)
    at Module.enable (require.js:1143)

**

My code

 require([
            'jquery','semantic/minjs'
            ], function($,semantic) {
                $('.ui.modal').modal('show');
            }
        );

I do not want to use magento 2 default modal , instead i want to use semantic-ui modal,
while debugging i tried to change jquery version in magento from jquery 1.x to jquery 3.x then above code worked fine but i am getting error on payment pages , is there any fix for it.


texts: Adding request params to observer redirect

texts:
I have an observer catching sales_quote_add_item to do various things when adding to cart.

One of those things is to redirect to my own controller if a products needs further customization, deferring add to cart and allowing the user to add from a customization page.

I would like to pass my form params from the first page through the redirect to the customization page; however, these params will be fairly extensive and I don't really want to pollute my URL so I'd like to just pass them as params on the request.

Currently:

class My_Module_Model_Observer
{
    // From product page, user can add to cart or "customize"
    // if they customize, we need to catch params and forward to customize controller
    public function myEventMethod($o)
    {
        // custom form fields from product page
        $params = Mage::app()->getRequest()->getParams();

        if (isset($params['needs_customize'])) {
            // redirect to '/customize'
            Mage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl('customize'));
            // This will pass params along, but they will be appended to URL, which I want to avoid.
            // Mage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl('customize'), $params);
            Mage::app()->getResponse()->sendResponse();
            exit;
        }
        // .... other code that handles some add to cart logic. If customized, they never get here.
    }
}


texts: Magento Left Side Menu On Cart Page (Display Previously Removed Sidebar Block)

texts:
I have menu on left side area. When product is add to cart it will redirect me to the cart page. On cart page the menu is not shown. I have added $this->getChildHtml('left'); into the 1column.phtml as it is showing on all page but on cart page but it is still not showing.

How can I add the menu to the left side of the cart page?


texts: What `null` size means in Framework/DB/Ddl/Table.php?

texts:
I refer to this file, function addColumn

I need to confirm whether I have understood correctly or not the null value of field size. When I set size null , does this mean that the index's size will be set by the maximum size of the current table's data?
If not, please explain. Thank you


texts: Magento 2 how to get all categories of a product in controller

texts:
I am trying to get all categories with their levels of a product through it's ID in my controller which is overriding default magento controller.

Can I get product's category path url through it's id in controller ?

How can I do this?


texts: cataloginventory_stock_item_save_commit_after event fired only once when place order? (CLOSED)

texts:
I have observer the stock item when order placed:

<global>
    <events>
                    ...
        <cataloginventory_stock_item_save_commit_after>
            <observers>
                <mymodule_stock_item_save_after>
                    <class>mymodule/observer_stockItem</class>
                    <method>afterSaveStockItem</method>
                </mymodule_stock_item_save_after>
            </observers>
        </cataloginventory_stock_item_save_commit_after>
    </events>
</global>

The code handle the event:

public function afterSaveStockItem($observer) {
    $productId = $observer->getEvent()->getItem()->getProductId();
    Mage::log($productId, null, "stockItemOrder.log");
}

I try place an order with two products, but the log out only one product id.

what is the problem? Could I have a bug in my magento install(ver. 1.13.0.2)?

  Update:
  After some check the stock event is not fired when order is created. So I marked my question to CLOSED, many thanks to everyone.


texts: rename or change the about-magento-demo-store URL breaks on the left side bar

texts:
I changed the URL key for "about-magento-demo-store" to be simply "about-us". I figured out that I then needed to edit the "footer_links_company" so that the appropriate
 looked like this...
About Us
About the time I thought how clever I was I noticed that while that works fine if I click on the "About Us" I get that page to pull just fine EXCEPT I see on that page there's a new menu area on the left hand column. If I click on that "About Us" I get a 404 error.Where is the file that is still referencing the original "about-magento-demo-store" URL?Thanks!


texts: How to load module specific css or js only to that specific page?

texts:
I want to add one css file to the home page but not to the contact us page.
I added like this on default.xml but it load on all pages.

<head>
  <css src="css/app.css"/>
</head>

How to do it?


texts: Getting custom attribute value from simple product load based on product collection

texts:
I have built a collection (includes ->addAttributeToSelect('*')) to generate a CSV and then from this collection, I need to fetch the associated simple products so that I can load different sizes, colours etc:-
$associatedProducts = Mage::getModel('catalog/product_type_configurable')->getUsedProducts(null,$product);

And I can then load each simple product in a foreach loop:-
foreach ($associatedProducts as $simple) {
        //load product
        $simple_product = Mage::getModel('catalog/product')->load($simple->getId());
}

I have a custom attribute (dropdown) and I need to only load simple products if this dropdown value is set to 'Yes' but I can only seem to be able to fetch this value for a configurable product:-
$product->getAttributeText('attribute_code'); <-- this works

Trying to get the attribute from the simple product doesn't work:-
$simple->getAttributeText('attribute_code'); <-- this doesn't work

And it returns bool(false) rather than a string.
There is obviously lots more of this script but I am hoping I have just pulled out what is relevant above.
Can anyone shed any light as to what I need to do differently for me to get the attribute value from the simple product loading?
Edit
Here is a sample SQL output for one of the simple products as per the comments in @Richard's answer below:-
SELECT 1 AS `status`, `e`.`entity_id`, `e`.`type_id`, `e`.`attribute_set_id`, `cat_index`.`position` AS `cat_index_position`, `e`.`entity_id`, `e`.`attribute_set_id`, `e`.`type_id`, `e`.`cost`, `e`.`created_at`, `e`.`gift_message_available`, `e`.`has_options`, `e`.`image_label`, `e`.`is_recurring`, `e`.`links_exist`, `e`.`links_purchased_separately`, `e`.`links_title`, `e`.`msrp`, `e`.`msrp_display_actual_price_type`, `e`.`msrp_enabled`, `e`.`name`, `e`.`news_from_date`, `e`.`news_to_date`, `e`.`price`, `e`.`price_type`, `e`.`price_view`, `e`.`recurring_profile`, `e`.`required_options`, `e`.`shipment_type`, `e`.`short_description`, `e`.`sku`, `e`.`sku_type`, `e`.`small_image`, `e`.`small_image_label`, `e`.`special_from_date`, `e`.`special_price`, `e`.`special_to_date`, `e`.`tax_class_id`, `e`.`thumbnail`, `e`.`thumbnail_label`, `e`.`updated_at`, `e`.`url_key`, `e`.`url_path`, `e`.`visibility`, `e`.`weight`, `e`.`weight_type`, `e`.`product_teaser`, `e`.`manufacturer`, `e`.`manufacturer_value`, `e`.`product_size_women`, `e`.`product_size_women_value`, `e`.`image`, `e`.`colour`, `e`.`colour_value` FROM `catalog_product_flat_1` AS `e` INNER JOIN `catalog_category_product_index` AS `cat_index` ON cat_index.product_id=e.entity_id AND cat_index.store_id='1' AND cat_index.category_id = '3' WHERE (e.type_id = 'configurable') AND (e.visibility IN(4, 3, 2))


texts: Magento 1.9.2.4 shortcode blocks no longer work

texts:
I have two blocks currently on my cms pages  and they were working fine in magento 1.9.2.1 but neither want to display now after upgrading to 1.9.2.4 could someone please guide me to get them to work ?

I know 1.9.2.2 update patch requires them to be whitelisted via their name. I have added various names to this list via admin -> permissions-> block permissions. But, no luck.

current permissions:


texts: Redirect admin user to system configuration in custom module

texts:
I don't know is it possible or not.

I want to redirect user to system configuration when user logged in to admin.

Is it possible ?


texts: I have an extension foomen and there is observer exsist i want to rewrite that observer how can i do that?.


texts: How to get rid of Base table or view not found: 1146 Table 'catalog_category_flat_store_1' doesn't exist?

texts:
Base table or view not found: 1146 Table
  'catalog_category_flat_store_1' doesn't exist

I have see some answer for this question but its quick fix after some time I have same issue. But I get this error frequently. We can't say customer always to try again or refresh page. If I refresh page or do re-index I can see table available.

As part of debug I tried to DROP table manually and then visit pages but I can't see any error but I found that when table is not exits Magento will disable Flat table option in admin. so here I am not sure when this error occurs and what is the best solution to get rid of this.

If anybody found any solution to get rid of this problem permanently?
For your information I have repair database as well as I replace flat table with fresh Magento table but still no luck I get error again after 2 days.


texts: How can I show wish list product in dashboard on account pages?

texts: I want to add wishlist block of customer on My Dashboard after Account Information. How can I do this ?


texts: Add to product collateral tabs RWD theme

texts:
I have the following code in the RWD theme product view page - it currently displays the long description and 'reviews' tab. How can I add additional tabs? For example, I'd like to add the 'dimensions' attribute as a separate tab.

                <?php if ($detailedInfoGroup = $this->getChildGroup('detailed_info', 'getChildHtml')):?>

                        <?php foreach ($detailedInfoGroup as $alias => $html):?>

<?php echo $this->escapeHtml($this->getChildData($alias, 'title')) ?>

<?php echo $html ?>

                        <?php endforeach;?>

                <?php endif; ?>


texts:
<reference name="head">
<block type="fabric_tool/tool" name="js" template="fabric/tool/global.phtml"/>

<action method="addItem"><type>skin_js</type><file>js/fabric/tool/men_default.js</file></action>
</reference>

in global.phtml file, I have code like

<script>
     var BASE_URL='<?php echo Mage::getBaseUrl();?>';
</script>

in men_default.js, I have taken BASE_URL. But When application is loaded, JS is appended before global.phtml is appended. so that, I can not access BASE_URL variable in men_default.js. So What do I have to do? Is there any solution?


texts: Magento 2: How to add additional custom rate in shipping method?

texts:
I am not getting here that how can we add additional rate in any shipping method. Do anyone have solution for it?
I have tried to do it with below link's logic but it is not working. Referred link - Override Shipping Price in Magento 2


texts: Magento 2.0: Exception printing is disabled by default for security reasons

texts:
I was able to login into Admin and see the website albeit without any data or graphics.

shortly I received this message:

  Exception printing is disabled by default for security reasons

I don't have a /errors folder in my Magento root directory.


texts:
From within an observer, I can use

 Mage::getSingleton('core/layout')->getBlock('some_block')

to get a block for manipulation.

This method uses the block's name as a reference to identify and retrieve it from the layout. In most cases this is OK, but if Mage_Core_Model_Layout's createBlock method is called without a name, which it is in some core code, the block is given the name ANONYMOUS_n, where n is the number of blocks in the layout object.

Is there any way I can retrieve the anonymous block within my observer?


texts: Magento 2 : Create product attribute with select box install script

texts:
I'm having issues while creating product attribute with Install Data.php with my custom module.

Attribute is crated also with options what i have defined in source but i am facing weird check below screenshot.

  Vendor/Module/Setup/InstallData.php

 public function install(
    ModuleDataSetupInterface $setup,
    ModuleContextInterface $context
) {
    $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);

    $eavSetup->removeAttribute(\Magento\Catalog\Model\Product::ENTITY,'brands');

    $eavSetup->addAttribute(
             \Magento\Catalog\Model\Product::ENTITY, 'brands', [
            'type' => 'int',
            'backend' => 'Magento\Eav\Model\Entity\Attribute\Backend\ArrayBackend',
            'frontend' => '',
            'label' => 'Brands',
            'input' => 'select',
            'group' => 'General',
            'class' => 'brands',
            'source' => 'Vendor\Module\Model\Brands\Values',
            'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL,
            'visible' =>    true,
            'required' => false,
            'user_defined' => false,
            'default' => '1',
            'searchable' => false,
            'filterable' => false,
            'comparable' => false,
            'visible_on_front' => false,
            'used_in_product_listing' => true,
            'unique' => false
                ]
    );

  Vendor/Module/Model/Brands/Values.php

<?php
namespace Vivek\ShopAsGroup\Model\Brands;

use Magento\Eav\Model\ResourceModel\Entity\Attribute\OptionFactory;
use Magento\Framework\DB\Ddl\Table;

class Values extends \Magento\Eav\Model\Entity\Attribute\Source\AbstractSource
{

protected $optionFactory;

public function getAllOptions()
{

    $this->_options=[ ['label'=>'Select Options', 'value'=>''],
                      ['label'=>'Nike', 'value'=>'1'],
                      ['label'=>'Puma', 'value'=>'2'],
                      ['label'=>'Adidas', 'value'=>'3']
                     ];
    return $this->_options;
}

public function getOptionText($value)
{
    foreach ($this->getAllOptions() as $option)
    {
        if ($option['value'] == $value) {
            return $option['label'];
        }
    }
    return false;
}

public function getFlatColumns()
{
    $attributeCode = $this->getAttribute()->getAttributeCode();
    return [
        $attributeCode => [
            'unsigned' => false,
            'default' => null,
            'extra' => null,
            'type' => Table::TYPE_INTEGER,
            'nullable' => true,
            'comment' => 'Custom Attribute Options  ' . $attributeCode . ' column',
        ],
    ];
}
}

Please help me with this, What i am missing ??

Thanks in Advance.


texts: Shouldn't catalog price rule calculation always happen 3 days in advance?

texts:
We have simple catalog price rule which is valid indefinitely.

In our Google Shopping feed which is generated at midnight, the price rule does not apply.

My theory is, that there is a small time frame, where the calculated prices are not available.

I have checked catalogrule_product_price - there seem to be only prices calculated until today (2013-04-22), so they would expire at midnight:

mysql> select distinct rule_date from catalogrule_product_price;
+------------+
| rule_date  |
+------------+
| 2013-04-20 |
| 2013-04-21 |
| 2013-04-22 |
+------------+
3 rows in set (0.05 sec)

Is this normal?
cron_schedule has recent entries so I think the cron system is generally running.

I was having in mind, that price rules are always generated several days in advance, just to avoid such time spans with wrong prices - was I wrong with this assumption? What is going on here?

EDIT: checked it again today (2013-04-25) - same problem.
I wish I checked it yesterday to see if also 23.,24. and 25. where existing and so the prices are generated always in bunches or tree of if the prices are always generated until today and three days back.

mysql> select distinct rule_date from catalogrule_product_price;
+------------+
| rule_date  |
+------------+
| 2013-04-23 |
| 2013-04-24 |
| 2013-04-25 |
+------------+
3 rows in set (0.00 sec)


texts: Magento showing default images after moving to a new server

texts:
I have a magento store with version 1.9 hosted on http://bandsawblades.co.uk

which I move to 1and1 server on a subdomain called

http://test.bandsawbladedirect.co.uk

The images are not showing on the home page on the new server but the images are there in the media folder. For example if you take the following featured product

http://test.bandsawbladedirect.co.uk/index.php/featured-products/mps-3742-bi-metal-air-saw-blade-with-1-2-mm-cutting-depth-and-ober-pneutec-chikago-pneumatic-shank.html

The images are there at

http://test.bandsawbladedirect.co.uk/media/product/7c6/morse-hef-band-saw-blades-1385-mm-54-1-2-long-various-widths-and-tpi-morse-hef-band-saw-blades-1385-mm-54-1-2-long-a4a.jpg

Which I derived from this page

http://bandsawblades.co.uk/index.php/featured-products/mps-3742-bi-metal-air-saw-blade-with-1-2-mm-cutting-depth-and-ober-pneutec-chikago-pneumatic-shank.html

I have set the media folder permission to 777, cleared var folder and set the permission to 777 there too but no luck. Can anyone help me on this?


texts: Magento multi store copy content from one website to another

texts:
I am new to magento and I have multi store setup in magento 1.9.2.1 where I have retail and Wholesale website setuped. There are data on Wholesale website where user can login and see products. Product prices are set as per users, i.e. If user A login then he see different price and if user B login then he see defferent price then user A.

So how I copy all data of user A to retail website.
Both website share same dashboard. (one dashboard)


texts: Sign Up For Newsletter checkbox in guest checkout?

texts:
I'm looking for a way to get a Newsletter Signup checkbox in Magento 2 onestep  guest checkout, just the same way it is when you create a new account. What is the easiest way to do this?
Any ideas are appreciated!


texts:
How to remove /home after  baseUrl ?

  www.baseurl.com/home

I want to redirect www.baseurl.com/home to www.baseurl.com (301)


texts: Magento 2 - REST API filter order data from shipping and billing address name and telephone number

texts:
I need to filter order data based on shipping and billing address name and telephone through rest api

For example In order to filter data through status my request url would be something like this:

https://example.com/index.php/rest/V1/orders?searchCriteria[filter_groups][0][filters][0][field]=status&searchCriteria[filter_groups][0][filters][0][value]="processing"&searchCriteria[filter_groups][0][filters][0][condition_type]=eq

let say this is my json decoded response from api, I only take the relevant part of response.

[billing_address] => Array
      (
                   [address_type] => billing
                   [city] => Karachi
                   [country_id] => PK
                   [customer_address_id] => 20
                   [email] => test@gmail.com
                   [entity_id] => 718
                   [firstname] => Test
                   [lastname] => User
                   [parent_id] => 360
                   [postcode] =>
                   [region] => Azad Kashmir
                   [region_code] => JK
                   [region_id] => 569
                   [street] => Array
                          (
                            [0] => Dha phase 5 , near anees Hussain phase 6
                          )

                   [telephone] => `1234567890
    )

Now I need to firstname, lastname and telephone in search criteria filter. So What would be my request url in order to filter data shipping and billing address name and telephone number

Any help, experience and knowledge sharing would be appreciated


texts:
When i need to retrieve config values, i usually inject Magento\Framework\App\Config\ScopeConfigInterface to use.

But i have a concern about the core_config_data table getting too big and at one point, loading the whole table will decrease performance?

I believe the config object will construct from the whole table when it is loaded, is this correct? If it is so, has there been any concerns about performance when the table gets too big or if a few of the records have huge values?


texts: Magento 1 only one observer being overridden

texts:
I am trying to override two observers from the Zaius extension, but only one of them is being overridden. Here is what I have so far:
config.xml:
    <config>
        <modules>
            <DBCustom_Zaius>
                <version>0.4.0</version>
            </DBCustom_Zaius>
        </modules>
        <global>
            <models>
                <dbcustom_zaius>
                    <class>DBCustom_Zaius_Model</class>
                </dbcustom_zaius>
                <zaius_engage>
                    <rewrite>
                        <observer>DBCustom_Zaius_Model_Rewrite_Observer</observer> //This one is not overridden
                        <observer_newsletter>DBCustom_Zaius_Model_Rewrite_Observer_Newsletter</observer_newsletter> //This one is overridden
                    </rewrite>
                </zaius_engage>
            </models>
        </global>
            ...
    </config>

Path to base observer I am trying to override:
"app/code/community/Zaius/Engage/Model/Observer.php"
Path to my custom observer:
"app/code/local/DBCustom/Zaius/Model/Rewrite/Observer.php"
My Custom Observer:
<?php

class DBCustom_Zaius_Model_Rewrite_Observer extends Zaius_Engage_Model_Observer{
    ...
}

The Zaius extension has a base observer and a directory of other observers it is using. I have successfully overridden the newsletter observer, but the same method isn't working on the base observer. I have flushed the cache multiple times and I have tried moving the base observer into it's own rewrite block like this:
            <zaius_engage>
                <rewrite>

                    <observer_newsletter>DBCustom_Zaius_Model_Rewrite_Observer_Newsletter</observer_newsletter>
                </rewrite>
                <rewrite>
                    <observer>DBCustom_Zaius_Model_Rewrite_Observer</observer>
                </rewrite>
            </zaius_engage>

Either way, only the newsletter observer is being overridden. Not sure what else to do.


texts: Which JavaScript file is used on page Customer -> Addresses?

texts:
On the following page:

Customers -> Manage Customers -> Click on a customer -> Addresses

If there are 2 or more addresses, you can click on an address and the address appears in the "Edit Customer's Address" box.

I can tell this is done in JavaScript, but which file contains the code for this?


texts:
Is it possible in Magento to use table rate for each category products?

I need each of the catergory products use different table rates with different prices and destinations
If possible let me know how I can do this?

Very Thanks


texts: Magneto 2.3 - How to redirect when customer click add to cart button with out logged in

texts:
I want to redirect the customer when they click Add to Cart without logged in. I had done some action or event with this below code but it is not working.I had tried it is showing oly the error message is there any suggestion to get solution for this.

app\code\Vendor\AddtoCartRedirction\etc\frontend\event.xml

<?xml version="1.0" encoding="UTF-8" ?>
<config xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
        xsi:noNamespaceSchemaLocation='urn:magento:framework/Event/etc/events.xsd'>
        <event name="controller_action_predispatch_checkout_cart_add">
            <observer name="restrict_cart_add_before" instance="Vendor\AddtoCartRedirction\Observer\ForceCustomerLoginObserver" />
        </event>
</config>

app/code/Vendor/AddtoCartRedirction/Observer

<?php

namespace Vendor\AddtoCartRedirction\Observer;

use Magento\Framework\Event\ObserverInterface;

class ForceCustomerLoginObserver implements ObserverInterface
{
    protected $responseFactory;

    private $scopeConfig;

    private $customerSession;

    private $context;

    private $contextHttp;

    public function __construct(
        \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
        \Magento\Framework\App\Action\Context $context,
        \Magento\Customer\Model\Session $customerSession,
        \Magento\Framework\App\Http\Context $contextHttp,
        \Magento\Customer\Model\Url $customerUrl,
        \Magento\Framework\App\ResponseFactory $responseFactory,
        \Magento\Framework\UrlInterface $url
    ) {
        $this->scopeConfig     = $scopeConfig;
        $this->context         = $context;
        $this->customerSession = $customerSession;
        $this->contextHttp     = $contextHttp;
        $this->messageManager = $context->getMessageManager();
        $this->responseFactory = $responseFactory;
    }

    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $isLoggedIn = $this->contextHttp->getValue(\Magento\Customer\Model\Context::CONTEXT_AUTH);

        if (!$isLoggedIn) {
                $this->messageManager->addError(__('Please Login to add the product in to cart'));
                //set false if you not want to add product to cart
                $observer->getRequest()->setParam('product', false);
                return $this;
         }

    }
}

The code shows the Error message after the page loads, but i want to show when clicking the add to cart button.

Thanks in Advance :)


texts: How to fix error in Web Setup Wizard - Command "show" failed: [Composer\Downloader\TransportException]

texts:
This is the error when I click on Extension Manager:

Command "show" failed: [Composer\Downloader\TransportException] The
'https://repo.wyomind.com/packages.json' URL required authentication.
You must be using the interactive console to authenticate show [--all]
[-i|--installed] [-p|--platform] [-a|--available] [-s|--self]
[-N|--name-only] [-P|--path] [-t|--tree] [-l|--latest] [-o|--outdated]
[-m|--minor-only] [-D|--direct] [--strict] [-f|--format FORMAT] [--]
[<package>] [<version>]

https://snag.gy/ew2k1K.jpg

https://snag.gy/5qvThA.jpg

I have added the credentials to the Wyomind entry but I'm still getting this error. I'm pretty much stuck until I can fix this.

Thanks


texts: Magento 2.4 alter contact form post values using plugin afterExecute

texts:
I am trying to use a plugin to alter the contact form post data by using the afterExecute method:
    public function afterExecute(\Magento\Contact\Controller\Index\Post $subject, $result)
    {
        $comment =  $subject->getRequest()->getParam('comment', false);
        $subject->getRequest()->setParam('comment', 'testing: '.$comment); // <--- this is not working and not changing the comment post value
        return $result;
    }

I just want to append/prepend a string to the comment (message) that is posted.
But the above does not work and the comment post value is not changed.
Thanks


texts: So I am using the inline translation. But for some reason everytime I change things it doesn't update. I refresh the page, I delete the cache,... Non of it is working. How can I fix this?


texts: Magento 2 - check if customer password is set to a specific value

texts:
I have a live site with customer details imported manually. At the time of import no customer passwords were provided so I set the email address as the password.

Now I need to be able to prompt users to change their password if it is still set to their email address.

I have an observer running on customer login but I can't seem to extract the existing password hash to compare.
I have tried a couple of solutions:

1) Creating a new hash from the email address and comparing:

\Magento\Framework\Encryption\EncryptorInterface $encryptor
$this->encryptor->getHash("aaa@bbb.com");

However the hash this generates is nothing like the hash that is stored in the customer_entity table (same password though) - although the hash changes each time even when I set the same password.

2) "Fake" authenticating the user to see if password is still email:

try{
    $cust = $this->customerAccountManagement->authenticate($customer->getEmail(), $customer->getEmail());
    //die("1"); // authenticated correctly - change password!
}catch(\Exception $e){
    //die("2"); // failed authentication - password different from email address - that's good.
}

Method 2 ..kind of.. works but for some reason when testing it logs the customer out.

I guess my real question is: How can I check if the logged in customers password is still set as their email?

Thanks


texts: Magento 2: New added products not showing

texts:
I need some help I have added new products in the Backend and they are showing in the DB but not showing on the front page.
Also, previously out of stock products are not showing as well after enabling them to be back in stock.
I flushed cache and reindex as well without any success.

Has this got something to do with the Cron Job?
If yes can someone guide me in the right direction on how to set up multiple cron jobs in cPanel?

I've one cron job running already isn't that enough?


texts: Deadlock on checkout, works after clear log in database

texts:
Hope you guys can help me out, I've a webshop on magento 1.9.0.1 that is giving me problems recently.

When a customer wants to order and he clicks on "Process order" it sometimes take up to 30 seconds before the customer is redirected to the payment provider. Most people then click multiple times on the checkout button off course and that results into a Deadlock error.

I've read that I need to remove the log tables on the databases and yes indeed that works! But now is the question... How can I prevent this kind of error? I don't think it is a solution to clear the log tables in the database 2 times a day..

Hope you guys can help me out!


texts: Get post data, in Checkout success observer

texts:
I have added custom field on checkout page.

I want to get all the post data, in Checkout success observer,

Here is my observer code

<?php
/**
 Author : Disha
 **/
 namespace Neo\OrderComment\Observer;

 use Magento\Framework\Event\ObserverInterface;
 use Magento\Framework\App\RequestInterface;

 class Orderneo implements \Magento\Framework\Event\ObserverInterface
 {
    /** @var \Psr\Log\LoggerInterface **/
    protected $_logger;
    /** @var \Magento\Sales\Model\Order\Status\HistoryFactory **/
    protected $_historyFactory;
    /** @var \Magento\Sales\Model\OrderFactory **/
    protected $_orderFactory;
    /**
     * @param \Psr\Log\LoggerInterface
     * @param \Magento\Sales\Model\Order\Status\HistoryFactory
     * @param \Magento\Sales\Model\OrderFactory
     **/
    public function __construct(
        \Psr\Log\LoggerInterface $logger,
        \Magento\Sales\Model\Order\Status\HistoryFactory $historyFactory,
        \Magento\Sales\Model\OrderFactory $orderFactory){
        $this->_logger = $logger;
        $this->_historyFactory = $historyFactory;
        $this->_orderFactory = $orderFactory;
    }
    /**
     * Add order comment, to the last placed order
     * @param \Magento\Framework\Event\Observer
     **/
    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        // Get order id, of last placed order
        $orderIds = $observer->getEvent()->getOrderIds();
        foreach($orderIds as $orderId){
            $order = $this->_orderFactory->create()->load($orderId);
        }
        echo "<pre>"; print_r($this->getRequest()->getPost());
        exit;
    }
}

But I am getting this error, as unknown method getRequest(),

Fatal error:  Uncaught Error: Call to undefined method Neo\OrderComment\Observer\Orderneo::getRequest() in /var/www/html/magento2/app/code/Neo/OrderComment/Observer/Orderneo.php:42
Stack trace:
#0 /var/www/html/magento2/vendor/magento/framework/Event/Invoker/InvokerDefault.php(73): Neo\OrderComment\Observer\Orderneo->execute(Object(Magento\Framework\Event\Observer))
#1 /var/www/html/magento2/vendor/magento/framework/Event/Invoker/InvokerDefault.php(61): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Neo\OrderComment\Observer\Orderneo), Object(Magento\Framework\Event\Observer))
#2 /var/www/html/magento2/vendor/magento/framework/Event/Manager.php(66): Magento\Framework\Event\Invoker\InvokerDefault->dispatch(Array, Object(Magento\Framework\Event\Observer))
#3 /var/www/html/magento2/var/generation/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch('checkout_onepag...', Array)
#4 /var/www/html/magento2/vendor/magento/module-checkout/Controller/Onepage/Success.php in /var/www/html/magento2/app/code/Neo/OrderComment/Observer/Orderneo.php on line 42


texts: How to set logo in admin configuration tab in Magento 2?

texts:
I want to add my company logo to my custom module configuration tab in admin.

Here is code of tab:

<tab id="mytab" translate="label" sortOrder="110">
    <label>My Label Here</label>
</tab>


texts: add complete address in default columns in order grid

texts:
I want to add complete address in default "Bill to Name" and "Ship to Name" columns in order grid in Magento admin.
I am attaching screen-shot for more explanation.

Please suggest me how can I achieve this?


texts: Google trusted store checkout customization

texts:
I am using the code below to get the delivery date for trusted store badge

 <?php echo $deliveryDate=Date('Y-m-d', strtotime("+7 days")); ?>

I need to replace the static number 7 with this code

 <?php
    $order_items = $order->getAllItems();
    $maxDelivery = 0;
    foreach($order_items as $item) {
        $product = Mage::getModel('catalog/product')->load($item->getProductId());

        if ($product->getAttributeText('estdelivery') > $maxDelivery) {
            $maxDelivery = $product->getAttributeText('estdelivery');
        }

    }
    echo $maxDelivery;
?>

what would the merged code be


texts: Magento 1.X: _afterSave function for stock item

texts:
I am trying to change "Stock Availability" tab inside "Inventory" tab for configurable product by calling Magento Rest API with standard url.

I see that while calling PUT option to change "Stock Availability", it realized that it calls $stock-save() which in-turn calls _afterSave().

When I see inside this _afterSave function, I see that if I run API for simple product, it run through but if it is configurable product, it struck at parent::_afterSave();.

Just for test purpose, when I commented "parent::_afterSave();" line, it worked beautifully.

Can someone please advise on what am I missing because the same function must be called when we manually save product by going to Magento Dashboard -> Catalog -> Products

[EDIT] : I thought to put code available inside _afterSave():

    protected function _afterSave()
{

parent::_afterSave();

/** @var $indexer Mage_Index_Model_Indexer */
$indexer = Mage::getSingleton('index/indexer');
if ($this->_processIndexEvents) {
$indexer->processEntityAction($this, self::ENTITY, Mage_Index_Model_Event::TYPE_SAVE);
} else {
$indexer->logEvent($this, self::ENTITY, Mage_Index_Model_Event::TYPE_SAVE);
}
return $this;
}

Your help is really appreciated.

Ashish


texts:
I am not sure its happening with me because i am a newbie in magento2. Every time i try to override a constructor i end with an error. Tried to find out a lot but nothing helps. So at last decided to post here.

I want to override the execute method of Magento\Catalog\Controller\Category\View file. Basically category view page.

What i am doing is

namespace namespace\module\Controller\Magento\Catalog\Category;

class View extends \Magento\Catalog\Controller\Category\View
{
    protected $_coreRegistry = null;
    protected $_catalogSession;
    protected $_catalogDesign;
    protected $_storeManager;
    protected $categoryUrlPathGenerator;
    protected $resultPageFactory;
    protected $resultForwardFactory;
    private $layerResolver;
    protected $categoryRepository;

    public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Magento\Catalog\Model\Design $catalogDesign,
        \Magento\Catalog\Model\Session $catalogSession,
        \Magento\Framework\Registry $coreRegistry,
        \Magento\Store\Model\StoreManagerInterface $storeManager,
        \Magento\CatalogUrlRewrite\Model\CategoryUrlPathGenerator $categoryUrlPathGenerator,
        PageFactory $resultPageFactory,
        \Magento\Framework\Controller\Result\ForwardFactory $resultForwardFactory,
        Resolver $layerResolver,
        CategoryRepositoryInterface $categoryRepository
    ) {
        $this->_storeManager = $storeManager;
        $this->_catalogDesign = $catalogDesign;
        $this->_catalogSession = $catalogSession;
        $this->_coreRegistry = $coreRegistry;
        $this->categoryUrlPathGenerator = $categoryUrlPathGenerator;
        $this->resultPageFactory = $resultPageFactory;
        $this->resultForwardFactory = $resultForwardFactory;
        $this->layerResolver = $layerResolver;
        $this->categoryRepository = $categoryRepository;
        parent::__construct($context,$storeManager,$catalogDesign,$coreRegistry,$categoryUrlPathGenerator,$resultPageFactory,$resultForwardFactory,$layerResolver,$categoryRepository);
    }

    public function execute()
    {
       // DO your code here.
    }

}

Now i am getting an error. Which says

  Fatal error: Uncaught TypeError: Argument 7 passed to
  namespace\module\Controller\Magento\Catalog\Category\View::__construct()
  must be an instance of
  namespace\module\Controller\Magento\Catalog\Category\PageFactory,
  instance of Magento\Framework\View\Result\PageFactory given

I think this happens each time if its a factory class. Not sure though. Do you guys have any idea why it shows.
Any help will be appreciated.


texts: With multi-store how do I ensure only one set of cache images are created?

texts:
In a multi-store Magento build each store view will have a corresponding cache folder in /media/catalog/product/cache, e.g. '1' for store '1'.

In the website I am currently working on we have an ever-growing list of store views and I can't help but thinking I need to do something about the ever expanding list of cache image folders. The images are always the same regardless of the store view, so the extra cache folders really are duplicates. I would prefer just the one set of cached images, in part because this will make the product quicker and the bandwidth lower (a customer swapping a store view will not require an extra set of images to be loaded).

So far I have done little to 'fix' the per-store product image cache. I have also not found any other writing online about this 'problem' and how to fix it. Does anyone have any idea?


texts: How do I remove the action of a menu.xml item?

texts:
Using Magento 2.2.5.

I have an 3rd party extension admin menu item that should be a header, but has an action so is rendering as a link (which 404s). Is there a way to override the menu.xml item and remove the action property?

In my custom module I have basically the same definition but removing the action property:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
    <menu>
        <update id="Third_Party::menu" title="Succesfully overriding the title" module="Third_Party" sortOrder="101" parent="Magento_Catalog::catalog" resource="Third_Party::menu" />
    </menu>
</config>

While my custom module's menu.xml update is being picked up and the title is changing, the xml is inheriting the action property from the Third_Party/etc/adminhtml/menu.xml file.