texts: email magento testimonial link not redirect admin custom module edit page

texts:
I Sent a email to Admin and email contains some text and testimonial link and link url is http://example.com/index.php/admin_test/adminhtml_testimonial/edit/id/1/key/91c0259ce0f94dda2cf0467d4f0bba97/ and Admin already logged in and when Admin click on above link from gmail account it redirects dashboard page rather then testimonial edit form page. I am using Magento 1.9.2 with all security patches.
I used this code for link url Mage::helper('adminhtml')->getUrl('admin_test/adminhtml_testimonial/edit', array('id'=> $testimonialId)

Why it redirect dashboard page ?


texts:
How to install the following theme from Magento Connect:

https://www.magentocommerce.com/magento-connect/free-theme-women-fashion-by-pagayo.html

there is install click there but when click it, it give just a link... what should I do with that ?!

detailed steps and full path to the configuration ta.


texts: Collection of all configurable products (which has children) and simple products ( not belonging to configurable product)

texts:
How to get a collection of all configurable products and simple products ( not belonging to configurable product) in Magento custom module?

I have a custom code for getting all simple product which does belong to configurable product:

$collection = Mage::getResourceModel('catalog/product_collection')
    ->addAttributeToFilter('type_id', array('eq' => 'simple'))
    ->addAttributeToSelect('*'); //or just the attributes you need

$collection->getSelect()->joinLeft(array('link_table' => 'catalog_product_super_link'),
    'link_table.product_id = e.entity_id',
    array('product_id')
);
$collection->getSelect()->where('link_table.product_id IS NULL');

And also have code for getting all configurable products:

$result = array();
$collectionConfigurable = Mage::getResourceModel('catalog/product_collection')->addAttributeToFilter('type_id', array('eq' => 'configurable'))->addAttributeToSelect('*');
foreach($collectionConfigurable as $configurProduct)
{
    $Title=$configurProduct->getName();
    $id=$configurProduct->getId();
    $result[] = array('value'=>$id,'label'=>$Title);
}
return $result;

I want to get a collection of above both.

How to do that?

Thanks in advance.


texts: How do I bypass Adobe Flash absence while uploading "images for Attribute"?

texts: I want to upload little squares that show the colors of the products in my e-commerce. Since there was Adobe Flash I could do it without any problem, using flash buttons. Now I need an alternative way to upload these files or maybe a fix.


texts: Magento 2.3 inventory index gives The product that was requested doesn't exist. Verify the product and try again

texts:
The inventory index doesn't get re-indexed, it gives this message:

  The product that was requested doesn't exist. Verify the product and try again.

In other questions I found that there could be products without SKU, but there aren't any in my database.

I have read here that the re-indexation process generates a table with virtual stock based (among others) on quantity from assigned stocks.
Now I found that there are SKU's in my inventory source (default source) for items I deleted, so products with these SKU's do not exist. Could this cause this issue?

If this causes the issue, what should I delete/update? I do not know in what table this inventory is stored. Or if there are any other sources/tables that need these items deleted.


texts: Change category name position in URL on Magento 1.9

texts:
In Magento 1.9, I have installed Manadev seo extension. In that I need small  correction.

Current URL: https://domain.com/category-name/filter1/filter2/filter3.html

Expected URL: https://domain.com/filter3/filter2/filter1/cagegory-name.html.

Always category name should come in the last.


texts:
Following the post:

  https://magento.com/security/best-practices/protect-your-magento-installation-password-guessing-new-update

I am not able to whitelist two public IPs of mine, while blocking other IPs for Magento admin panel. I have custom path set up for admin panel.

I have tried both:

# Whitelist an IP address for the admin panel
RewriteCond %{REMOTE_ADDR} !^xx.xx.xx.xx
RewriteCond %{REMOTE_ADDR} !^xx.xx.xx.xx
RewriteRule ^(index.php/)?admin/ - [L,R=403]

and:

# Whitelist an IP address for the admin panel
RewriteCond %{REMOTE_ADDR} !^xx.xx.xx.xx
RewriteCond %{REMOTE_ADDR} !^xx.xx.xx.xx
RewriteRule ^(index.php/)?custom-path-to-admin/ - [L,R=403]

But none of them seem to work, am I missing anything? (obviously xx.xx.xx.xx have been replaced with my public IP).


texts: M2 - commerce edition - Task "Update attributes for 12 selected products": 1 item(s) have been scheduled for update

texts: How to solve this error, product not visible on frontend, one day over still getting this notification.


texts:
I m trying to setup magento 2 MAGETWO-40129: M2 GitHub Update. but get error when
Installing... 70%

In  php.ini i'm trying to set values

xdebug.max_nesting_level=50000,

memory_limit=256M,

but it's not working.


texts: want to add custom module in magento 2 admin panel

texts:
Created folders and added code for the custom module but nothing gonna work in my way please help, nothing shown up in the admin panel.
Here's my code and folders that I created:

public_html/testing2/app/code/Test

public_html/testing2/app/code/Test/Banners

public_html/testing2/app/code/Test/Banners/registration.php

<?php
/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */

\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Test_Banners',
    __DIR__
);

/home1/dukaania/public_html/testing2/app/code/Test/Banners/composer.json

{
    "name": "test/banners",
    "description": "Test Banner For test",
    "require": {
        "php": "~5.5.0|~5.6.0|~7.0.0",
        "magento/framework": "100.0.*"
    },
    "type": "magento2-module",
    "version": "1.0.0",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "autoload": {
        "files": [
            "registration.php"
        ],
        "psr-4": {
            "Test\\Banners\\": ""
        }
    }
}

/home1/dukaania/public_html/testing2/app/code/Test/Banners/etc/module.xml

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Test_Banners" setup_version="2.0.0">

    </module>
</config>

what steps I would take to show this module in the admin panel?


texts:
In my Magento 2 website adding to cart takes about 10 sec.
Caching is OK. Redis is configured. Merging/minimizing for CSS/JS is enabled.
I'm noticed that after first adding an item to the cart, adding to cart of this item takes a few seconds (Looks like caching), but after 5 minutes it's taking too much time again. Maybe there is a way to reduce time or cache "add to cart" for a long time?
Great thanks and sorry for my English.


texts: Magento 2 Failing to migrate from domain to local server

texts:
I'm trying to migrate my magento 2 from a domain to my local server, but i'm having some weird error. I alrealy follow a lot of instructions but still got nothing.

Ubunut server 16.04
Magento 2.2.0

Working:
- Website main page, loads and workes properly.

Not Working:
- Admin page says not found and there is no errors on the apache error.log
- Any other location on the website other than the main page, without any error on the error.log.

Note: I do have some "caught SIGTERM, shutting down".


texts: How to place customer orders through Admin Token API Magento2

texts:
I have to place an order through API REST on behalf of a customer like the Magento admin panel.
Sales >> Order >> Create New Order
I can see on the Doc that an Admin Can create a CART but I don't see APIs and params to achieve this.

Can we achieve this through the existing APIs, Any other workaround.
Need Help.


texts: Add Expires headers load from third party url

texts:
I am using Magento 1.9.3. I have an issue GT Metrix says "add expire headers" for third party URL.

Looks like bellow in GT Metrix.

There are 4 static components without a far-future expiration date.

    https://fonts.googleapis.com/css?family=Oswald:300,400,700
    https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900
    http://connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.4
    https://www.facebook.com/impression.php/f1e65db1bc67ed8/?lid=115&payload=%7B%22source%22%3A%22jssdk%22%7D

any help how to add expires header for on-line/third party js/css files.


texts: How to recharge customer with updated order price after editing order?

texts:
In the backend under Sales -> Orders, I can cancel and reorder the order.

Once I reorder, I edit the product price, and I click "Update Item and Quantities".

Once I do that, I would like to charge the customer using the same payment method with the updated charge, just like as if nothing but a price change happened to the order.

However, when I try to reorder the order, the payment method is blank.

How can I reorder while keeping the original payment method so that I can simply recharge the card with the updated amount?

If this is not something that can be done with standard Magento, is there an extension out there that can do this?


texts: uncaught typeerror cannot read property 'dialog' of undefined magento 2

texts:
I am getting this error on checkout page every time and checkout not working any idea how to solve it.
uncaught type error cannot read property 'dialog' of undefined Magento 2


texts: customer name is not showing in header after customer programatically logged in

texts:
I am trying to log in customer automatically when user redirects to the website from different website. I am able to log in customer but after customer logged in automatically customer name is not showing in header.
code to login customer
use Magento\Customer\Model\Session;
use Magento\Customer\Model\Customer;
use Magento\Framework\App\Action\Context;
use Magento\Framework\App\RequestInterface;
use Magento\Framework\HTTP\Client\Curl;
Use Magento\Store\Model\StoreManagerInterface;
use Magento\Customer\Api\CustomerRepositoryInterface;

class Login extends \Magento\Framework\App\Action\Action
{

public function __construct(
        Context $context,
        Session $customerSession,
        RequestInterface $request,
        Curl $curl,
        StoreManagerInterface $storeManager,
        Customer $customer,
        \Magento\Customer\Api\CustomerRepositoryInterface $customerModel,
        \Magento\Customer\Model\CustomerFactory $customerFactory,
        \Psr\Log\LoggerInterface $logger
    )
    {
        $this->session = $customerSession;
        $this->request = $request;
        $this->_curl = $curl;
        $this->_storeManager = $storeManager;
        $this->_customerModel = $customerModel;
        $this->_customer = $customer;
        $this->customerFactory = $customerFactory;
        $this->logger = $logger;
        parent::__construct($context);
    }

 public function execute()
    {
...
$customerObj = $this->customerFactory->create()->load($custID);
$this->session->setCustomerAsLoggedIn($customerObj);
...

$resultRedirect = $this->resultRedirectFactory->create();
 $resultRedirect->setPath('/');
   return $resultRedirect;

}
}


texts: Find payment success or order success js in magento 2

texts:
This is the file where I am :
/vendor/magento/module-checkout/view/frontend/templates/success.phtml

In that file I'm sending some js with gtag, but the issue is the user isn't always waiting to reach that page.
So I want to call my js before I reach that page.
The best location I can imagine for that is the place where the order is created, or may be the place where the payment is accepted.
But I can't find where in the magento core these are located in front side.
Thanks for your assistance


texts: Magento 2 - How to remove/unset all categories from a product using plugin?

texts:
I am trying to remove/unset all categories from a product using below code. It's working with Magento 2.1 but not with Magento 2.2.

How can we do this?

app/code/Vender/Module/etc/di.xml

<plugin name="Vender-Module-product-model" type="Vender\Module\Plugin\TestPlugin" sortOrder="1" />

app/code/Vender/Module/Plugin/TestPlugin.php

namespace Vender\Module\Plugin;

class TestPlugin
{
    public function beforeSave(\Magento\Catalog\Model\Product $product)
    {
        $product->setCategoryIds("1");
    }

}

Any help would be appreciated!


texts: Code migration install 1.9 to installData 2.0

texts:
I have started learning 1.9 two months ago but i have decided to start learning magento 2 instead because i heard that it is totally different world.

I have followed an Inchoo tutorial how to create a custom entity in 1.9 for blog (i done the same just for slider) but i have started to do it partly in magento 2 way. Module is successfully detected but it reports that i need to upgrade my database with command XY. After running command i get

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

Now i know that old install script does not work with magento 2.0, as far as i am noob to these official non step-by-step documentations i am searching for help here.

Actual install script looks like script for 1.9 magento

https://github.com/erikkubica/Limeslide/blob/master/Setup/InstallData.php

Can someone help me to migrate code and explain everything that i need to change?

Thank you


texts: I have 10,271 attributes in a database I want to add them to magento 1 (inside an attribute group name "specification"), then import all the attribute values in each of the previous attribute fields. (depending on product sku they will be filled.


texts:
I'm having problems with the search in my magento webshop. I have different products in my webshop. An example of the name of a product is like this:

  BODYSOL KIDS DOUCHE 2IN1 WATERMELOEN 250ML

This is my configuration of my catalog search:

This are my case scenarios:

Search type: "Like"

When I search for "BODYSOL KIDS" I'm getting 495 products back.
When I search for "BODYSOL KIDS DOUCHE 2IN1 WATERMELOEN 250ML" I'm getting 876 products back.

Search type: "Fulltext"

When I search for "BODYSOL KIDS" I'm getting 494 products back.
When I search for "BODYSOL KIDS DOUCHE 2IN1 WATERMELOEN 250ML" I'm getting 832 products back.

Search type: "Combine (Like and Fulltext)”"

When I search for "BODYSOL KIDS" I'm getting 495 products back.
When I search for "BODYSOL KIDS DOUCHE 2IN1 WATERMELOEN 250ML" I'm getting 876 products back.

PROBLEM:

When I look for the full string of the product I'm getting to many products back ... . How is this possible? ...


texts: Apply specific catalog price rule to price

texts:
I have the raw product price in a variable and i want to be able to apply only a specific rule to it.

Right now what i am doing is iterating over all the rules, conditioning only the ones i want. What i have today (i simplified the code here):

$productPrice = $product->getPrice();
$catRul = Mage::getResourceModel('catalogrule/rule')-getRulesFromProduct(Mage::getModel('core/date')->date('Y-m-d'), $websiteId, $userGroupId, $data['entity_id']);
if(isset($catRul) && !empty($catRul)) {
    foreach($catRul as $rule) {
        $catalogRulObj = Mage::getModel('catalogrule/rule')->load($rule['rule_id']);
        $ruleData = $catalogRulObj->getData();
        if($ruleData['is_active'] === '1'){ // Here i am conditioning with a couple more stuff
              // Here i want to apply this rule conditioned in $ruleData; only, not all like below \/
              $productPrice = Mage::getModel('catalogrule/rule')->calcProductPriceRule($product, $product->getPrice());
        }
    }
}

Thank you very much.


texts: Magento 2.1 : How to pass variables from PHP to the browser in observer

texts:
What I need to do is: When the event 'checkout_cart_save_after' is dispatched, get the cart data (sent in the event dispatch) with an observer.

Then i need to send this data to the browser (with JS) and be able to read it (get products, quantity and all stuff).

Can anyone help me?


texts: layout handle for add button to newsletter edit template in adminhtml

texts:
I develop module for add new button in newsletter edit template in adminhtml. And don't know which layout handle must use in my layout xml.

I try something like this but did not work:

<layout version="0.1.0">

    <adminhtml_newsletter_template_edit>
        <reference name="adminhtml_newsletter_template_edit">
            <block type="newslettersend/adminhtml_newsletter_template_edit" />
        </reference>
    </adminhtml_newsletter_template_edit>

</layout>


texts: Magento 2 - Add extra column to shipping methods

texts:
I have a custom shipping method. By default, the Shipping Methods show 3 columns -

Price,
Method and
Carrier.

I want to add another column that shows the estimated time of delivery.
How can I add the extra column?

I tried adding this to Vendor/Module/Model/Carrier/Rates.php

$method->setCarrier('customCarrier');
$method->setCarrierTitle('customCarrierTitle');
$method->setMethod('customMethod');
$method->setMethodTitle('customMethodTitle');
$method->setData('foo','customValue');

In the template file,

       <input type="radio"
              class="radio"
              ifnot="method.error_message"
              ko-checked="element.isSelected"
              ko-value="method.carrier_code + '_' + method.method_code"
              attr="'aria-labelledby': 'label_method_' + method.method_code + '_' + method.carrier_code + ' ' + 'label_carrier_' + method.method_code + '_' + method.carrier_code,
                   'checked': element.rates().length == 1 || element.isSelected" />

       <each args="element.getRegion('price')" render="" />

The extra field 'foo' is not shown.

Thanks!


texts: Magento2: Add new field in checkout payment section

texts:
I need to add field on checkout payment section of magento2 in custom extension, check the screenshot for more information.
How can I do it?


texts: How to display Date attribute in layered navigation?

texts: I want to display Date attribute in layered navigation. Magento default  date attribute configuration doesn't allow Show in Layered Navigation in frontend value to be set.How can I do that?


texts: Magento 2: How to include JS on the product page?

texts: I'm trying to get a custom js on the product page, I'm using Magento 2, what's the page I need to edit to do that? I've already tried to create a local.xml into /app/design/frontend/Venustheme/yume/Magento_Catalog/layout , and add the code inside , but it doesn't work..


texts: After static deploy , my website not running properly alignment was changed in magento 2.3

texts:
I want to run the code static deploy for cache problem remove in my website.
But static deploy code compliated successfully, website not working properly, there is a problem in css and design changed collapsed. so, what is the solution for this issue? Please reply as soon as possible.


texts: How do I get all of the attribute name of a specific product using the product id or sku?

texts:
I want to get all of the attributes for a specific product using its id or sku. This is my try:

$prod=Mage::getSingleton('catalog/product')->load(8536);
var_dump($prod->getAttributeText());

but i got this error message: Call to a member function getSource() on a non-object in... What should I do ?


texts:
I have this issue in my Magento 1.9.0.1, when I try to go into Shipping methods I'm getting this message:

  Fatal error: Call to a member function toOptionArray() on boolean in
  /app/code/core/Mage/Adminhtml/Block/System/Config/Form.php on line 463

Are there any of you can help me solve this error?

thanks in advance


texts: Magento 2.2.4 - Add to Cart Not Working after Move Add to Cart Buttons Below Image on Product View

texts:
I have tried the following code to move add to cart buttons below image in catalog_product_view.xml

Button has moved below that element but Add to Cart Button is not Working anymore.

  <move element="product.info.addtocart" destination="product.info.media" after="product.media"/>


texts: Move navigation.sections together within logo, top.search and minicart?

texts:
This is the layout I'm trying to achive

Therefore I created a new container and moved the elements into it.
        <referenceContainer name="page.wrapper">
            <container name="some.container" before="-"/>
        </referenceContainer>
        <move element="logo" destination="some.container" before="-"/>
        <move element="navigation.sections" destination="some.container"/>
        <move element="top.search" destination="some.container" after="navigation.sections"/>
        <move element="minicart" destination="some.container" after="-"/>

But it's a mess unfortunately. This is the result:

I think the biggest problem is the navigation.sections because it takes all the vertical space so there is no place left and right to position something.
How would I achieve my desired layout?
Edit: Ok, got it. I had to add htmlClass and display: flex and some more styling.

Only problem is the logo and the mobile menu. Is it possible to create a complete different layout for mobile? Any help would be appreciated.


texts: Magento : 1 Showing New Products of Particular category on page

texts:
Am working on Magento 1 Store

I want to show only new products of particular category on a page.
Suppose i have category of shirts so i want to show only 8 new products of that category on page.

i tried to use this block to show only category products but its not respecting the product limit.

{{block type="catalog/product_list" column_count="8" category_id="43" template="catalog/product/list.phtml"}}


texts: 404 Error - Unable to add non CMS page in Magento

texts:
I tried creating a non CMS page in Magento 1.9.
I followed these steps :

Created a folder called 'Returns' in app/code/local and within it created another sub folder called 'Returns' with 2 folders 'controller' and 'etc'in it.

Within controller, I created a file called 'ReturnsController.php' and filled it as below -

  <?php class Returns_Returns_ReturnsController extends Mage_Core_Controller_Front_Action{
public function returnsAction()
{
    //Get current layout state
    $this->loadLayout();

    $block = $this->getLayout()->createBlock(
        'Mage_Core_Block_Template',
        'returns',
        array('template' => 'returns/returns.phtml')
    );

    $this->getLayout()->getBlock('root')->setTemplate('page/1column.phtml');
    $this->getLayout()->getBlock('content')->append($block);
    $this->_initLayoutMessages('core/session');
    $this->renderLayout();
}}

?>

Then in 'etc', I created a file 'config.xml' with content as below

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

    <frontend>
        <routers>
            <returns_returns>
                <use>standard</use>
                <args>
                    <module>Returns_Returns</module>
                    <frontName>returns</frontName>
                </args>
            </returns_returns>
        </routers>
    </frontend>

</config>

After this, I created a file in app/etc/modules as Returns_Returns.xml with content

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Returns_Returns>
            <active>true</active>
            <codePool>local</codePool>
        </Returns_Returns>
    </modules>
</config>

Finally, I added a folder called 'returns' in app/design/frontend/et_oxynic/default/template. Created a file called 'returns.phtml' in it with test content

<?php
if(Mage::getSingleton('customer/session')->isLoggedIn()):
  $name = Mage::getSingleton('customer/session')->getCustomer()->getName();
endif;
?>

      <?php if(Mage::getSingleton('customer/session')->isLoggedIn()): echo "Welcome" . $name . "!"; ?>
      <?php else:  echo "Welcome, Guest!"; endif; ?>

We have successfully created a page using a magento module and router!

I cleared the cache from cache management from admin but I still get a 404 error.

Please help me out


texts: How to add customers email to transactional emails content

texts:
How do I add the customers e-mail to the sales transaction e-mail? At the moment I include the shipping and billing details but these only include the address and telephone number. How do I add the customers email address (I can't see the variable on the admin side) - is it something I need to do in FTP?

The current setup is as follows:

  {{template config_path="design/email/header"}}
  {{inlinecss file="email-inline.css"}}

Thank you for your order from {{var store.getFrontendName()}}.

Once your package ships we will send an email with a link to track your order. Your order summary is below. Thank you again for your business.

Order Questions?

                        {{depend store_phone}}
                        Call Us:
                        {{var store_phone}}

                        {{/depend}}
                        {{depend store_hours}}
                        {{var store_hours}}

                        {{/depend}}
                        {{depend store_email}}
                        Email: {{var store_email}}
                        {{/depend}}

Your order #{{var order.increment_id}}

Placed on {{var order.getCreatedAtFormated('long')}}

        {{if order.getEmailCustomerNote()}}

                {{var order.getEmailCustomerNote()}}

        {{/if}}
        {{layout handle="sales_email_order_items" order=$order}}

Bill to:

{{var order.getBillingAddress().format('html')}}

                {{depend order.getIsNotVirtual()}}

Ship to:

{{var order.getShippingAddress().format('html')}}

                {{/depend}}

Email:

{{htmlescape myemail=$order.getCustomerEmail()}}

                {{depend order.getIsNotVirtual()}}

Shipping method:

{{var order.shipping_description}}

                {{/depend}}

Payment method:

                    {{var payment_html}}

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


texts: magento2 Programmatically change theme in runtime

texts:
I have a cookie variable mobile-application = "yes".
I need to set a custom theme depends on this variable in magento2.
I've already created a custom theme. How I can set it programmatically in runtime. In magento1 works this example:

<models>
    <core>
        <rewrite>
            <design>Packagename_Modulename_Model_Design</design>
        </rewrite>
    </core>
</models>

  Rewrite PHP code

  public function loadChange($storeId, $date = null)
    {
        $result = $this->getResource()
            ->loadChange($storeId, $date);

        if (!empty($result)) {
            if (!empty($result['design'])) {
                $tmp = explode('/', $result['design']);
                $result['package'] = $tmp[0];
                $result['theme'] = $tmp[1];
            }

            $this->setData($result);
        }
        // your custom code goes here
        // custom condition
        if(true) {
            $result['package'] = 'default';
            $result['theme'] = 'modern';
            $this->setData($result);
        }

        return $this;
    }

Has anybody experience with this point for magetno2?


texts: Magento 2.2.1 change checkout component sort order

texts:
I added new checkout step using official doc , i need to display my step in between shipping and payment.
As per the documentation To display step content between shipping step and payment step  1 < "sortOrder" < 2 so I have added following code  checkout_index_index.xml
<item name="my-new-step" xsi:type="array">
    <item name="component" xsi:type="string">Amsi_UserManagement/js/view/select-student-view</item>
    <item name="sortOrder" xsi:type="string">2</item>
    <item name="children" xsi:type="array">
    </item>
</item>

Amsi_UserManagement/view/frontend/web/js/view/select-student-view.js
initialize: function () {
    this._super();
    stepNavigator.registerStep(
        'select_student_step',
        null,
        'Select Student',
        this.isVisible,
        _.bind(this.navigate, this),
        15
    );

    return this;
}

this creates my steps like this

when I click NEXT in shipping method it directly taking me to the payment page, that is weird. Any idea?


texts: Magento CE 1.9.1.0 Security Patch SUPEE-1533

texts:
I am using Magento CE 1.9.1.0 and want to install the security patch SUPEE-1533, but the patch process always run in trouble with the following message:

sh ./PATCH_SUPEE-1533_EE_1.13.x_v1-2015-02-10-08-18-32.sh

Checking if patch can be applied/reverted successfully...
ERROR: Patch can't be applied/reverted successfully.

patching file app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php.rej
patching file app/code/core/Mage/Adminhtml/controllers/DashboardController.php
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file app/code/core/Mage/Adminhtml/controllers/DashboardController.php.rej

What can I do to install this patch?


texts: Which method adds products to an order in the admin?

texts:
I want to automatically add products to an order in the backend(!), when a certain quantity of products is reached.

I've been searching in the backend's JS files, but I have no idea which method (must be PHP?) adds the products to the quote when I create an order via the backend.

I'm kind of stuck in these two files:

js/mage/adminhtml/sales.js
js/mage/adminhtml/configure.js

Does anyone has an idea how these products are actually added? Which class/method?

Thanks in advance!


texts:
I found an observer and modified it a bit which should overwrite the standard product layout. This works, however, if I have cache enabled it keeps loading my page from cache.

What I actually need is, that as soon as the GET parameter "template" is set the page should be cached so I don't have any problems.

Normal product ie: http://www.website.com/product.html
Product in popup: http://www.website.com/product.html?template=popup

With cached disabled it works, enabled it doesn't. Hope somebody can help me.

Here's the observer.php

class Unleaded_ForceLayout_Model_Observer
{
    public function changeLayoutEvent($observer)
    {

        $action = $observer->getEvent()->getAction();
        $layout = $observer->getEvent()->getLayout();

        if(($action->getRequest()->getControllerName() == 'product' && $action->getRequest()->getActionName() == 'view'))
        {

            $template = $action->getRequest()->template;

            if (isset($template) && $template != '')
            {

                $cache = Mage::app()->getCacheInstance();
                $cache->banUse('full_page');

                $update = $layout->getUpdate();
                $update->load($template);
                $layout->generateXml();
            }
        }
    }
}

And the XML

<?xml version="1.0"?>
<layout version="0.1.0">
  <default></default>
  <popup translate="label">
    <label>Catalog Product View Popup</label>
    <remove name="right"/>
    <remove name="left"/>
    <reference name="root">
      <action method="setTemplate">
        <template>page/popup.phtml</template>
      </action>
    </reference>
    <reference name="content">
      <remove name="catalog.product.related"/>
      <remove name="product.attributes"/>
      <remove name="product.info.upsell"/>
      <remove name="product.description"/>
        <remove name="product.info.additional"/>
        <remove name="product.description"/>
        <remove name="product.info.container1"/>
        <remove name="product.info.container2"/>
    </reference>
  </popup>
</layout>


texts: Exporting products and categories from 1.7 to 1.9

texts:
I am trying to export the categories and products from magento 1.7.0.2 so that I can import them to another 1.9 installation. I've tried the following

System -> Export ->Dataflow - profiles -> Export All Products -> run profile

This gives an internal server error. I have noticed that sites hosted with this company have these errors all over the place.

Plain export of all category and product tables from first magento database, import to new installation

This resulted in foreign key constraint errors that I couldn't face

Set up Apache virtualbox on vagrant, copied magento installation to run the first option locally

I can't log in to the admin area. This seems a common problem, I have tried all the solutions but its still not working

Set up nginx virtualbox on vagrant, copied magento installation to run the first option locally

I could install the copy of magento and log in without any problems at all but when I run the "Export all products" I run into "504 gateway timeout" and all my efforts to increase execution time made no difference.

What should I try next?


texts: Magento 2 - How to handle POST request with many parameters in Rest API?

texts:
I'm confusing about the correct way to send parameter to POST request in Magento 2 API

For example, now I need to send a request body like this:

{
    "first_name":"test_first",
    "last_name":"test_last"
}

(it's just for example, in real situation, the number of key-value pair may be 20 or even 50)

Now I'm currently doing like this in the method declaration (in Api/NameRepositoryInterface.php, for instance)

/**
  * @param string $first_name
  * @param string $last_name
  * @return boolean
  */
public function createFullName($first_name, $last_name);

This approach is working fine, but what if there are 50 key-value pair in the request?

So I have to search for another approach, and it's here:

Now I can define Api/Data/NameInterface.php class like this

interface NameInterface
{
    const FIRST_NAME = 'first_name';
    const LAST_NAME = 'last_name';

    /**
     * @return string|null
     */
    public function getFirstName();

    /**
     * @param string $firstName
     * @return $this
     */
    public function setFirstName($firstName);

    /**
     * @return string|null
     */
    public function getLastName();

    /**
     * @param string $lastName
     * @return $this
     */
    public function setLastName($lastName);
}

And in in Api/NameRepositoryInterface.php class, I can make it like this:

/**
  * @param \Vendor\Module\Api\Data\NameInterface $name
  * @return boolean
  */
public function createFullName(\Vendor\Module\Api\Data\NameInterface $name);

It works well if in every request to this api, I always send both the first_name and last_name

The situation that I want to ask is:
What if in the request I only want to send the first_name as parameter (in real situation, it maybe 30/50 total key-value of NameInterface class)

How can we handle that case?

Do we have to create a new class called Api/Data/NameRequestInterface.php and copy again 30 fields?

I think there must be some better way for this situation, prevent us from repeating our code

Anyone has idea?
Thank you.


texts: How to install C4B_Freeproduct extension on Magento 1.9 Community Edition

texts:
How do I upload this extension (C4B_Freeproduct) to Magento 1.

Can only find the code on GitHub and I don't know what to do with it for the extension to be installed.

I am really struggling and I have seen that you was involved with the development with it.

I would really appreciate it if you could help me.


texts: Best way to Insert multiple new rows for custom module inside foreach loop

texts:
To insert multiple records inside foreach loop we have two options:

example:

foreach($result as $data):

$_model=>Mage::getModel('');
 $_model->setField1()
 $_model->setField2()
 $_model->setField3()
 $_model->setField4()
 $_model->save()
endif;

or

direct SQL query in foreach loop.

Unfortunately both are time consuming process if the loop executes for 10-30 times.

Anyone have any idea as how to make this process faster.


texts:
I am trying to run custom cron but,
I got below error in system.log while execute cron:run command.

main.WARNING: Could not acquire lock for cron group: default, skipping run [] []

  crontab.xml file

<group id="default">
        <job name="test_cron" instance="Vendor\Module\Cron\Test" method="execute">
            <schedule>* * * * *</schedule>
        </job>
</group>

  Cron/Test.php

namespace Vendor\Module\Cron;

class Test {

    public function execute() {

        $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/customcron.log');
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);
        $logger->info("cron works");
   }
}


texts: Why is my 'magento' directory missing from lib/internal?

texts: Apologies if this is a duplicate, not appropriate, etc. I have just installed Magento 2.0.0 and a lot of the documentation I am reading/watching mentions a 'magento' directory in lib/internal, but I my install does not seem to have this folder. Any ideas on why this might be would be amazing helpful. Thanks in advance.


texts: Customer Customer attribute not appearing in Create new order in magento 2

texts:
I have created a custom attribute for customer https://prnt.sc/tb68lv The values are getting saved in the database. i have cross checked it again after opening the customer for edit and the values were present.
I want this information to be present when admin creates a new order for the customer. See https://prnt.sc/tb8ak7
Here is my code for custom attribute creation
<?php

namespace Vidushi\Customattribute\Setup;

use Magento\Customer\Setup\CustomerSetupFactory;
use Magento\Customer\Model\Customer;
use Magento\Eav\Model\Entity\Attribute\Set as AttributeSet;
use Magento\Eav\Model\Entity\Attribute\SetFactory as AttributeSetFactory;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;

class InstallData implements InstallDataInterface
{
    /**
     * @var CustomerSetupFactory
     */
    protected $customerSetupFactory;

    /**
     * @var AttributeSetFactory
     */
    private $attributeSetFactory;

    /**
     * @param CustomerSetupFactory $customerSetupFactory
     * @param AttributeSetFactory $attributeSetFactory
     */
    public function __construct(
        CustomerSetupFactory $customerSetupFactory,
        AttributeSetFactory $attributeSetFactory
    ) {
        $this->customerSetupFactory = $customerSetupFactory;
        $this->attributeSetFactory = $attributeSetFactory;
    }

    public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
    {
        /*customersetupfactory instead of eavsetupfactory */
        $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);

        // for remove attribute
        //$customerSetup->removeAttribute(\Magento\Customer\Model\Customer::ENTITY,'account_notes');

        $customerEntity = $customerSetup->getEavConfig()->getEntityType('customer');
        $attributeSetId = $customerEntity->getDefaultAttributeSetId();
        /** @var $attributeSet AttributeSet */
        $attributeSet = $this->attributeSetFactory->create();
        $attributeGroupId = $attributeSet->getDefaultGroupId($attributeSetId);
        /* create customer Address book attribute */

        $customerSetup->addAttribute(Customer::ENTITY,'internal_account_notes', [
            'type' => 'varchar', // attribute with varchar type
            'label' => 'Internal Account Notes',
            'input' => 'textarea', // attribute input field is textarea
            'required' => false, // field is not required
            'visible' => true,
            'user_defined' => true,
            'position' => 9999,
            'system'=>0,
        ]);

        $sampleAttribute = $customerSetup->getEavConfig()->getAttribute(Customer::ENTITY, 'internal_account_notes')->addData([
            'attribute_set_id' => $attributeSetId,
            'attribute_group_id' => $attributeGroupId,
            'used_in_forms' => ['adminhtml_customer','customer_account_edit','customer_account_create'],
        ]);
        // more used_in_forms ['adminhtml_checkout','adminhtml_customer','adminhtml_customer_address','customer_account_edit','customer_address_edit','customer_register_address']

        $sampleAttribute->save();
    }

}


texts: How to cancel Magento order programmatically

texts:
I want to change the order status to 'canceled' when payment failed.
I've tried the code below but the order status gets saved as processing:

        $orderId = $number8; //order id
        $order = Mage::getModel('sales/order')->load($orderId); //load order
        $order->setState(Mage_Sales_Model_Order::STATE_CANCELED, true)->save();
        $state = 'canceled';
        $status = $state;
        $comment = "Changing state to $state and status to $status Status";
        $isCustomerNotified = false; //whether customer to be notified
        $order->setState($state, $status, $comment, $isCustomerNotified);
        $order->addStatusHistoryComment("Payment Failed",
            Mage_Sales_Model_Order::STATE_CANCELED);
        $order->setStatus($status);
       $order->save();

        $this->loadLayout();
        $this->_initLayoutMessages('checkout/session')->addError(Mage::helper('checkout')->__($errorMessage));
        $this->renderLayout();

Please assist.
I have a condition in my model if(payment fails) execute code above but the order gets saved as processing instead of canceled.


texts: How to disable the cache for the block in Magento 2?

texts:
protected function _construct()
    {
        $this->addData(
            [
                'cache_lifetime' => false,
                'cache_tags' => array('MY_BLOCK'),
            ]
        );
    }

    public function getCacheKeyInfo()
    {
        return [];
    }

does not work. Why? How to disable the cache for block?


texts: Remove empty categories from xml sitemap

texts: My xml site map is showing categories which contain no products (although some child categories may). Is there a simple way of removing these from the xml or do I need to count products as magento loops through the category tree?


texts: How to make one button for all payment methods

texts:
Each payment method has its own 'pay' button. How to put them in one separate block that will be below the list of payment methods and when changing the payment method, the button will be in one place.

Need to display a button for PayPal and other payment methods below the block.

<div id="checkout-payment-method-load" class="opc-payment" data-bind="visible: isPaymentMethodsAvailable">


texts: How to connect AWS S3 bucket images to my website

texts:
I have installed the extension https://github.com/thaiphan/magento2-s3/ for connect to S3 bucket.

When I proceed to sync button then images not uploaded proper format on AWS S3. Please check the screenshot


texts:
Using the StoreManagerInterface I am getting the current store via $store = $this->storeManager->getStore().

I then want to get the code of the store. However, when using $store->getCode() I get the code of the store view, not the store.

public function __construct(
    \Magento\Store\Model\StoreManagerInterface $storeManager
){
    $this->storeManager = $storeManager;
}

public function foo()
{
    echo $this->storeManager->getStore()->getCode(); // returns store view code
}

Is there any way to just get the code of the store, not the store view?


texts: Delay when downloading Downloadable Products

texts:
I have a client who's selling MP3's on his Mage site. These MP3's are pretty big, around 90MB, and when the download link is click in the account area there can be up to a 2 minute delay before the download actually starts. During the delay, the browser shows "Waiting for www.domain.com...".

I've tried a small file, a couple of kb, and that works quickly, so its obviously something to do with file size.

However, I've replicated the file download outside of Magento and the download starts immediately, even with the 90mb file. Does anyone know what Magento could be doing to cause this delay?

The download script is split between the following 2 files;

Mage/Downloadable/controllers/DownloadController.php::linkAction()
Mage/Downloadable/Helper/Download.php

I can't see it doing anything out of the ordinary though. Obviously, Magento does A LOT of checks, but those shouldn't change depending on file size.

Bit of a vague one, any help though would be much appreciated.

Thanks,


texts: Magento 2 multiple websites. Do i need to set "Add the store code to the base URL" to yes

texts:
Following documentation in admin panel I've added second website. On each website (default and new) I have exactly one unique store and for each store I have exactly one unique view. Like below

website_1 -> store_1 -> view_1
website_2 -> store_2 -> view_2

In apache configuration files, under virtualhost I've added
  SetEnv MAGE_RUN_CODE "website_1"
  SetEnv MAGE_RUN_TYPE "website"

and
  SetEnv MAGE_RUN_CODE "website_2"
  SetEnv MAGE_RUN_TYPE "website"

for each domain respectively.
There is optional step in documentation: "Add the store code to the base URL". Which I left default - No
Everything seems to run properly for now.
In documentation there is an option: "Add the store code to the base URL" with following warning:

Magento gives you the option to add the store code to the site base
URL, which simplifies the process of setting up multiple stores. Using
this option, you do not have to create directories on the Magento file
system to store index.php and .htaccess.
This prevents index.php and .htaccess from getting out of sync with
the Magento codebase in future upgrades.

The question is, if (with my described configuration) I can safely left "Add the store code to the base URL" option set to NO or it's going to cause errors in future.


texts: Magento 2 : How to use Default Menu in Mobile view?

texts:
I would like to use My IBNAB MegaMenu in desktop view but, In Mobile view would like to use default Luma Menu.

How can i achieve that ?


texts: Is UPS Address Verification integrated with Magento

texts: Is there a way to enable UPS address verification in the checkout process?  UPS has a web service that supports this.


texts:
Usually I get the n98-magerun file by executing this command when I need it:
wget https://files.magerun.net/n98-magerun.phar && chmod +x ./n98-magerun.phar on my project .
I used this in the last year, now today did the same thing and from all of the sudden when I executed it, I'm getting this error:

PHP Fatal error:  Uncaught Error: Call to undefined method N98\Magento\Application\Console\Event::setName() in phar:///opt/lampp/htdocs/rebuildnew/httpdocs/n98-magerun.phar/vendor/symfony/event-dispatcher/EventDispatcher.php:43

Stack trace:
#0 phar:///opt/lampp/htdocs/rebuildnew/httpdocs/n98-magerun.phar/src/N98/Magento/Application.php(580): Symfony\Component\EventDispatcher\EventDispatcher->dispatch('n98-magerun.app...', Object(N98\Magento\Application\Console\Event))
#1 phar:///opt/lampp/htdocs/rebuildnew/httpdocs/n98-magerun.phar/vendor/symfony/console/Application.php(122): N98\Magento\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 phar:///opt/lampp/htdocs/rebuildnew/httpdocs/n98-magerun.phar/src/N98/Magento/Application.php(625): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /opt/lampp/htdocs/rebuildnew/httpdocs/n98-magerun.phar(22): N98\M in phar:///opt/lampp/htdocs/rebuildnew/httpdocs/n98-magerun.phar/vendor/symfony/event-dispatcher/EventDispatcher.php on line 43

I believed that somehow composer is to blame so I did a composer update but I'm still getting the error. Any idea why ?

Thank you


texts: How to create custom order status using an extension / module in Magento 2

texts: I was wondering whether there is any way to create custom Orders statuses in Magento 2. I am developing a Magento Extension in which I have to add some custom order status to Magento 2 orders.


texts: How to change currency on checkout with paypal

texts: I am using AED as my base currency and PayPal is not Supporting AED. i want to convert it in to US Dolor while checkout with PayPal.


texts:
I need that, when the user goes to the compare list page it will reset so if he navigates to the products again he will have to choose different products for the list.

How can I do this?


texts: How to Check Delivery Availability depends on zip code on magento?

texts: I would like to develop simple solution for checking availability based on zip codes. If the zip code available in database it should display shipping available for your location else shipping not available. how to do this in magento ?


texts: How to use Baler for JS bundling on Magento Cloud?

texts:
Baler is great for JS bundling comparing to default JS bundling.
It's hard to apply it to a Magento Cloud instance as Magento Cloud is a read-only system. So we can't run npm command directly via SSH access following their document
Is there a way to apply Baler to a Magento Cloud instance?
Thanks


texts: How to load category using url_key and parent catgory_id?

texts:
How to get category using url_key and parent category_id?
If category structure is as follows

-Root
  --Mobile
    ---Android
    ---Windows
    ---iOs
  --Tablet
    ---Android
    ---Windows
    ---iOs

Then using following code if try to load iOs category using url_key it load always load root->Mobile->iOS

$category = Mage::getModel('catalog/category')
    ->setStoreId(Mage::app()->getStore()->getId())
    ->loadByAttribute('url_key', 'cat_urlkey');

How I can modify code so that, sub category load by url_key and respective parent category_id?


texts: There is no error. Magento indexer doesn't index Product categories and Catalog product rule indexes. I have tried both update on schedule and update on save. Any clues please?


texts:
In one of the project i saw  visibility as orphaned as far i know there is no by default functionality to set visibility as orphaned.

I trying to know how this option is created because when we set a product as orphaned its visible in frontend even in configurable associated product.

I found a plugin which override at /app/code/community/GPMD/SEOPack/Model/Product/Visibility.php

const VISIBILITY_ORPHANED = 5;
public function getVisibleInSiteIds()
    {
        return array(self::VISIBILITY_IN_SEARCH, self::VISIBILITY_IN_CATALOG, self::VISIBILITY_BOTH, self::VISIBILITY_ORPHANED);
    }

but i dont know how its affects the search functionality?

What is the use of ( in /app/code/core/Mage/Catalog/Model/Product/Visibility.php )

Do i need to add the  **VISIBILITY_ORPHANED** in these function

     /**
         * Retrieve visible in search ids array
         *
         * @return array
         */
        public function getVisibleInSearchIds()
        {
            return array(self::VISIBILITY_IN_SEARCH, self::VISIBILITY_BOTH);
        }
     /**
         * Retrieve visible in site ids array
         *
         * @return array
         */
        public function getVisibleInSiteIds()
        {
            return array(self::VISIBILITY_IN_SEARCH, self::VISIBILITY_IN_CATALOG, self::VISIBILITY_BOTH);
        }


texts:
When trying to run grunt commands, I get the following error:

  Error: EACCES, permission denied '/home'
      at Object.fs.readdirSync (fs.js:665:18)
      at Glob._readdir (/home/pathto/magento/node_modules/grunt/node_modules/findup-sync/node_modules/glob/glob.js:662:20)
      at Glob._process (/home/pathto/magento/node_modules/grunt/node_modules/findup-sync/node_modules/glob/glob.js:446:15)
      at Glob.iterator (/home/pathto/magento/node_modules/grunt/node_modules/findup-sync/node_modules/glob/glob.js:181:10)
      at Array.forEach (native)
      at new Glob (/home/pathto/magento/node_modules/grunt/node_modules/findup-sync/node_modules/glob/glob.js:179:22)
      at glob (/home/pathto/magento/node_modules/grunt/node_modules/findup-sync/node_modules/glob/glob.js:57:11)
      at Function.globSync [as sync] (/home/pathto/magento/node_modules/grunt/node_modules/findup-sync/node_modules/glob/glob.js:76:10)
      at /home/pathto/magento/node_modules/grunt/node_modules/findup-sync/lib/findup-sync.js:32:19
      at Function.map (/home/pathto/magento/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/dist/lodash.js:3509:27)

I've tried numerous fixes like running:

sudo chown -R $USER:$GROUP ~/.npm

And haven't been able to get it to work. I'm assuming this is a permission problem, but not really sure. I tried running grunt commands w/ sudo but it looks like the grunt command isn't in the path for sudo. Any ideas how to fix this?


texts: Magento custom module not working in sub store

texts:
I have multiple store in magento. I created a custom module but on frontend it's url redirecting me to main store.

For example : in my custom module I have created a testAction() in IndexControllers.php so url https: //mydomain.com/custom/index/test working on main store but from sub store http: //sub.mydomain.com/custom/index/test it is redirecting to main store url. And other module working in sub store.

testAction() code as below :

public function testAction()
{
    $this->loadLayout();
    echo 'hello';
    $this->renderLayout();
}

How to resolve this?


texts: Magento 2 : how to add content on customer dashboard

texts:
On customer dashboard you see this

https://github.com/magento/magento2/blob/ddf42caaf25311f10b23b95a92746f99943e045e/app/code/Magento/Customer/view/frontend/templates/account/dashboard/info.phtml#L23

<?= $block->getChildHtml('customer.account.dashboard.info.extra'); ?>

Can you embed content into the template using this marker in an module?

Just add content to the marker. Not override the entire info.phtml.


texts: What is a good dedicated server for managing magento store with 500+stores and 1000 products?

texts:
I am planning to build a magento installation which will have like 100 multisites at first and then within the next 3 to 5 of months it will reach around 500 sites. Then probably 1000 stores with in an year. The number of products won't increase that much.

So basically I need a good set up on which I can set up this magento store!


texts: Remove ?___store &___from_store=default from the code url of magento 2 in multistore

texts: 'Add Shop Code to URLs' to Yes in System -> Configuration -> Web -> URL options. But show ?___store &___from_store=default. I used magento 2.25. Thanks for help.


texts: How to apply Shipping Restriction to particular products - WebShop Matrix Rate Shipping Extension?

texts:
How to restrict some particular products to the selected shipping method?

My Rate Chart is as follows :

Here, The products of the category ids  4 and 5 are not eligible for India Post.

My Requirement is : The selected products have to be restrict for a selected Delivery type.


texts: Magento 2.2.8 Upgrade Redis Expects string object given

texts:
I have just upgraded from Magento 2.1.9 to 2.2.8.

Redis was previously working fine, however, when I activate it now through my env.php file, I am receiving this error.

  Warning: substr() expects parameter 1 to be string, object given in
  /http/vendor/colinmollenhour/cache-backend-redis/Cm/Cache/Backend/Redis.php
  on line 1188","1":"1 substr() called at
  [vendor/colinmollenhour/cache-backend-redis/Cm/Cache/Backend/Redis.php:1188]

What could be causing this?

When i comment out the Redis configuration in the env.php file, the site works okay but it will not show any updates.

I have tried rm -rf var/generation var/di and all other normally necessary commands but none of them seem to work.

Thanks.


texts: when and how magento load the options.xml

texts:
when and how the magento will load the options.xml? But for now, when i login to the admin, there is a javascript error that caused by the magento do not load the colorpicker.js,

<layout>
    <default>
        <reference name="head">
            <action method="addJs"><script>jquery/jquery.js</script></action>
            <action method="addJs"><script>jquery/noconflict.js</script></action>
            <action method="addJs"><script>colorpicker/colorpicker.js</script></action>
            <action method="addJs"><script>colorpicker/eye.js</script></action>
            <action method="addJs"><script>colorpicker/utils.js</script></action>
            <action method="addJs"><script>colorpicker/layout.js?ver=1.0.2</script></action>
            <action method="addCss"><name>colorpicker.css</name></action>
        </reference>
    </default>
</layout>


texts: Magento2: How to get images inserted in custom theme's media folder?

texts:
I'm trying to get image which is inserted in /app/design/frontend/Mytheme/themename/media folder using following code but it's shows 404 not found. I have also apply cache clean & static content deploy command but still not working. I'm using below code in my phtml file:-

$mediaurl = $this->_storeManager->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA);
$image = $mediaurl."myimg.png";
echo $image;

So is it possible to get images of media folder in M2? Any suggestion should be appreciated. Thanks.


texts:
I've been searching for days without finding any answers for my conundrum.

I  want to make a module that reacts when an item in the cart has changed/updated it's quantity, but I can't find any guide that tells me how to do that.
I know several different ways to get all the items in the cart, I know how to get the item added to the cart, but not how to just get the specific item that has been changed in the cart.

I'm using Magento 2, but due to the similarities a guide for how to do it in Magento 1 could still useful to me.

Is there anyway to get the item that has changed/updated in the cart?


texts: Magento 2 - Get country in billing address

texts:
I'm trying to get the country name from billing address. I have the address object and I see that the attribute country_id is always No but I'm sure the country is existed as it is displayed properly in the My account page. Below I printed all the attributes of the address object in the debug log.

[2016-08-27 06:43:40] main.DEBUG: === Billing Address Attribute Start === {"is_exception":false} []
[2016-08-27 06:43:40] main.DEBUG: entity_id = 9 {"is_exception":false} []
[2016-08-27 06:43:40] main.DEBUG: entity_type_id =  {"is_exception":false} []
[2016-08-27 06:43:40] main.DEBUG: increment_id =  {"is_exception":false} []
[2016-08-27 06:43:40] main.DEBUG: parent_id = 9 {"is_exception":false} []
[2016-08-27 06:43:40] main.DEBUG: attribute_set_id =  {"is_exception":false} []
[2016-08-27 06:43:40] main.DEBUG: created_at = 2016-08-27 05:46:38 {"is_exception":false} []
[2016-08-27 06:43:40] main.DEBUG: updated_at = 2016-08-27 06:28:54 {"is_exception":false} []
[2016-08-27 06:43:40] main.DEBUG: prefix =  {"is_exception":false} []
[2016-08-27 06:43:40] main.DEBUG: firstname = Alex {"is_exception":false} []
[2016-08-27 06:43:40] main.DEBUG: middlename =  {"is_exception":false} []
[2016-08-27 06:43:40] main.DEBUG: lastname =  {"is_exception":false} []
[2016-08-27 06:43:40] main.DEBUG: suffix =  {"is_exception":false} []
[2016-08-27 06:43:40] main.DEBUG: company = ABC Company {"is_exception":false} []
[2016-08-27 06:43:40] main.DEBUG: street = 11 Hoi Shing Road
One Midtown {"is_exception":false} []
[2016-08-27 06:43:40] main.DEBUG: city = Tsuen Wan {"is_exception":false} []
[2016-08-27 06:43:40] main.DEBUG: country_id = No {"is_exception":false} []
[2016-08-27 06:43:40] main.DEBUG: region =  {"is_exception":false} []
[2016-08-27 06:43:40] main.DEBUG: region_id = 0 {"is_exception":false} []
[2016-08-27 06:43:40] main.DEBUG: postcode = 852 {"is_exception":false} []
[2016-08-27 06:43:40] main.DEBUG: telephone = 22233344 {"is_exception":false} []
[2016-08-27 06:43:40] main.DEBUG: fax =  {"is_exception":false} []
[2016-08-27 06:43:40] main.DEBUG: vat_id =  {"is_exception":false} []
[2016-08-27 06:43:40] main.DEBUG: vat_is_valid =  {"is_exception":false} []
[2016-08-27 06:43:40] main.DEBUG: vat_request_id =  {"is_exception":false} []
[2016-08-27 06:43:40] main.DEBUG: vat_request_date =  {"is_exception":false} []
[2016-08-27 06:43:40] main.DEBUG: vat_request_success =  {"is_exception":false} []
[2016-08-27 06:43:40] main.DEBUG: === Billing Address Attribute End === {"is_exception":false} []

Here is how I get the address object

<?php

namespace Vendor\Module\Observer;

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

class CustomerAddressSaveAfterObserver implements ObserverInterface {

    protected $logger;

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

    public function execute(Observer $observer) {
        $this->logger->debug("CustomerAddressSaveAfterObserver execute");

        $customerAddress = $observer->getCustomerAddress();
        $customer = $customerAddress->getCustomer();
        $billingAddress = $customer->getDefaultBillingAddress();
        $shippingAddress = $customer->getDefaultShippingAddress();

    }

}

events.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="customer_address_save_after">
        <observer name="customer_address_save_after_observer" instance="Vendor\Module\Observer\CustomerAddressSaveAfterObserver" />
    </event>
</config>


texts: I want to compress the merged css using Apptrain Minify HTML, CSS, JS, but I have the following problem: as soon as a new session starts (a new user comes in or I get a new request), the merged css is overwritten and again not compressed. How can I solve this problem?


texts: Magento2: Error in data structure: job_id values are mixed

texts:
During import products to magento 2.3.4 after few minutes I get issue:

Configure variations for SKU:98010
Configure variations for SKU:98009

In Data.php line 120:

  Error in data structure: job_id values are mixed

import:job:run [<job>...]

When I run again import products, then again import some products and get the same issue. Any solution?


texts: Shopping cart price rule for child SKU of configurable products does not work

texts:
Im trying un-sucessfully to get a shopping cart price rule to activate
at checkout. OK what I am trying to accomplish is if you buy 2 of any of
the SKU's listed "all SKU's are attribute choices of a configurable
product if that is any help" the buyer will receive a 50% discount on
the second bottle.

CONDITIONS
If ALL  of these conditions are TRUE :
If total quantity equals or greater than  2  for a subselection of items in cart matching
ANY  of these conditions:
SKU  is one of  SKU1, SKU2, SKU3

ACTION
Percent of the Product Price Discounted
25 0, 0, NO NO NO for the rest

If ANY  of these conditions are TRUE : SKU  is one of  SKU1, SKU2, SKU3

I have tried variation of this however nothing whatsoever happens on the checkout.
Cron is active as I believe this has an affect on rules and all attribute choices have promo rules active.
The coupon is also set to no coupon.

MY question is twofold. First can any see any glaringly obvious error in the setup as I was following the Magento price rules recipes which gives this exact instruction for setting up a similar rule.
Secondly is there a way to step through or debug Magento rules as they are activated?

Thank in advance...


texts: I currently have WSDL caching enabled in the store to improve client API performance. However, is there a danger to it. If I change some aspect of the store that affects the WSDL, is the client going to be continuing using the wrong WSDL file or will he/get get an updated one?


texts: Moving billing address prior to shipping address on Magento 2?

texts:
Used this method to move the billing address form prior to the shipping address form, but it is not fully functional.
The billing address updates on the Update button press - OK.
Internal form validation works, error is shown if the Update is pressed while it is empty - OK.
The billing address is not validated, if the Next button is pressed - not OK.
The billing address can be absolutely empty, but pressing the Next button makes the browser proceed onto the next stage.


texts: Magento 2 theme header - Welcome message

texts:
I've been learning the ropes in theming in magento 2, I've started to get the hang of it with my own theme using Snowdog as my parent and styling in sass.

My question is, I came to remove the welcome message yesterday and couldn't find any xml related to this. So I went in search and found it in the header.phtml file.

 <?php
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

/**
 * @var \Magento\Theme\Block\Html\Header $block
 */
$welcomeMessage = $block->getWelcome();
?>
<?php switch ($block->getShowPart()):
    case 'welcome': ?>

            <span data-bind="text: new String('<?php echo $block->escapeHtml(__('Welcome, %1!', '%1'));?>').replace('%1', customer().firstname)">

            <span data-bind="html:'<?=$block->escapeHtml($welcomeMessage) ?>'">

    <?php break; ?>

    <?php case 'other': ?>
        <?php echo $block->getChildHtml(); ?>
    <?php break; ?>

<?php endswitch; ?>

But then i realised there isn't any other php or html inside of this file, the whole of the header is built with xml.

Why is it built with xml? Are there any benefits to this? Should I continue to use xml, or should i look at doing it with php - html?

Thanks.


texts: magento 2 layered navigation price without tax

texts:
I add products to my catalog and in the tax section I select a tax of 21%
When I select the category and display the price filter I notice that it makes me the filter with the price without tax.

If you look at the image on the left side the price ranges show the prices without tax.
While in the catalog the prices include the tax.

How can you show the price ranges with tax?

Thanks for the help


texts: How can I add a static block to the top header in Luma theme (see screenprint) ?


texts:
I'm writing a callback module and when i try to insert image like following:

        a#popup-button{
        display: block;
        width: 50px;
        height: 50px;
        background: url("../images/phone-icon.png") no-repeat;
        background-size: contain;
        background-position: center center;
        font-size: 0;
    }

I get


texts: Magento2.3.2: Class Magento\Backend\Controller\Adminhtml\Dashboard\Index\Interceptor does not exist

texts:
I am working on magento2.3.2.

When I access my admin panel's any components, I am getting the following error

Class Magento\Backend\Controller\Adminhtml\Dashboard\Index\Interceptor does not exist

Log is as follows:

  {"0":"Class
  Magento\Backend\Controller\Adminhtml\Dashboard\Index\Interceptor
  does not exist","1":"#1
  Magento\Framework\Code\Reader\ClassReader->getConstructor('Magento\Backend\...')
  called at
  [vendor/magento/framework/ObjectManager/Definition/Runtime.php:49]\n#2
  Magento\Framework\ObjectManager\Definition\Runtime->getParameters('Magento\Backend\...')
  called at
  [vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:48]\n#3
  Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\Backend\...',
  array()) called at
  [vendor/magento/framework/ObjectManager/ObjectManager.php:56]\n#4
  Magento\Framework\ObjectManager\ObjectManager->create('Magento\Backend\...')
  called at [vendor/magento/framework/App/ActionFactory.php:44]\n#5
  Magento\Framework\App\ActionFactory->create('Magento\Backend\...')
  called at [vendor/magento/framework/App/Router/Base.php:306]\n#6
  Magento\Framework\App\Router\Base->matchAction(&Magento\Framework\App\Request\Http#0000000025bdc7d1000000003a4419c4#,
  array('areaFrontName' => 'admin', 'moduleFrontName' => 'admin',
  'actionPath' => 'dashboard', 'actionName' => 'index', 'variables' =>
  array('key' => '720c1261e72c04f8...'))) called at
  [vendor/magento/framework/App/Router/Base.php:167]\n#7
  Magento\Framework\App\Router\Base->match(&Magento\Framework\App\Request\Http#0000000025bdc7d1000000003a4419c4#)
  called at
  [vendor/magento/framework/App/FrontController.php:95]\n#8
  Magento\Framework\App\FrontController->dispatch(&Magento\Framework\App\Request\Http#0000000025bdc7d1000000003a4419c4#)
  called at
  [vendor/magento/framework/Interception/Interceptor.php:58]\n#9
  Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch',
  array(&Magento\Framework\App\Request\Http#0000000025bdc7d1000000003a4419c4#))
  called at
  [vendor/magento/framework/Interception/Interceptor.php:138]\n#10
  Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Request\Http#0000000025bdc7d1000000003a4419c4#)
  called at
  [vendor/magento/framework/Interception/Interceptor.php:153]\n#11
  Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch',
  array(&Magento\Framework\App\Request\Http#0000000025bdc7d1000000003a4419c4#),
  array(array('default_store_se...', 'page_cache_from_...',
  'storeCookieValid...', 'install', 'configHash'))) called at
  [generated/code/Magento/Framework/App/FrontController/Interceptor.php:26]\n#12
  Magento\Framework\App\FrontController\Interceptor->dispatch(&Magento\Framework\App\Request\Http#0000000025bdc7d1000000003a4419c4#)
  called at [vendor/magento/framework/App/Http.php:137]\n#13
  Magento\Framework\App\Http->launch() called at
  [generated/code/Magento/Framework/App/Http/Interceptor.php:24]\n#14
  Magento\Framework\App\Http\Interceptor->launch() called at
  [vendor/magento/framework/App/Bootstrap.php:261]\n#15
  Magento\Framework\App\Bootstrap->run(&Magento\Framework\App\Http\Interceptor#0000000025bdc7af000000003a4419c4#)
  called at
  [index.php:39]\n</pre>","url":"/admin/admin/dashboard/index/key/720c1261e72c04f8304c8497ebc2bed31baa2d8388ab3087acd79d30fc880fc3/","script_name":"/index.php"}


texts: Magento 1.8.1.0 Google Checkout missing - comparing to 1.8.0.0

texts:
I got errors in logs related to Google Checkout, I found that Magento 1.8.1.0 doesn't have Google Checkout in configuration, also file app/design/frontend/base/default/layout/googlecheckout.xml is missing from ZIP installation files. Comparing to 1.8.0.0 they have removed it or they broken it. I don't know - but Gomage Lightcheckout is triggering errors trying to load Google Checkout block.

How to fix it ? I dont; plan to use google checkout - but like to avoid errors in Gomage Lightcheckout related to Google Shopping Cart ? should I re-copy app/design/frontend/base/default/layout/googlecheckout.xml from Magento 1.8.0.0. to 1.8.1.0 ?
I don;t know because changelogs shows that they were fixing some Google Checkout issues

Thanks for help


texts: Possible to run a cron task using external script?

texts:
i want to run product alert using external script, by default, the product alert run once a date, so i can't test the email (transactional template)

<crontab>
    <jobs>
        <catalog_product_alert>
            <run>
                <model>productalert/observer::process</model>
            </run>
        </catalog_product_alert>
    </jobs>
</crontab>

is it possbile to run this job using external script?


texts: NewRelic + Magento1 - how to rewrite Mage::logException in a Magento-way

texts:
I'm trying to rewrite the original Magento Mage.app-Function logException so that it'll push catched exceptions to a custom function.

I already changed the default error handler with an early-catching observer, now I want to add my custom logic to the method named above.

Technically I could just edit the original Mage.app-File but I figure that I don't really want to do this.

So the question is, do I rather "deal with it" or rewrite all existing functionality inside my (huge custom, but team maintained) to another custom function that behaves like logException?

What possibilities does a Magento Developer have when trying to rewrite those methods declared inside Mage.php?


texts: How to get values of custom attribute in magento

texts:
I need to get the value custom attribute that i have created as 'brands'

$products=Mage::getModel('catalog/product')->getCollection();

$products->addAttributeToSelect(array('name', 'thumbnail', 'weight' ,'price','description'));

  foreach ($products as $product) {
    $p['products'][] = array(
            'id'        => $product->getId(),
            'sku'       => $product->getSku(),
            'name'      => $product->getName(),
        'description'   => $product->getDescription(),
          'weight'      => $product->getWeight(),
        'created at'    => $product->getCreatedAt(),
            'pirce'     => Mage::helper('core')->currency($product->getPrice(), true, false), //." ".$currencyCode,

        );
}


texts:
Whats the best way to rerun an extensions SQL files for example

mysql4-install-0.1.0.php
mysql4-install-0.1.1.php
mysql4-install-0.1.2.php
mysql4-upgrade-0.1.0-0.1.1.php
mysql4-upgrade-0.1.1-0.1.2.php


texts: Magento2 credit card form is not populating with cvv and date filed

texts:
Am Trying To Create A New Online Payment Gateway Module In Magento.

To Get Started Am Using Sample Payment Module Form Git Hub,
My Stripe.html

        <input type="radio"
               name="payment[method]"
               class="radio"
               data-bind="attr: {'id': getCode()}, value: getCode(), checked: isChecked, click: selectPaymentMethod, visible: isRadioButtonVisible()"/>

        <form class="form" data-bind="attr: {'id': getCode() + '-form'}">

        </form>

                <button class="action primary checkout"
                        type="submit"
                        data-bind="
                        click: placeOrder,
                        attr: {title: $t('Place Order')},
                        css: {disabled: !isPlaceOrderActionAllowed()},
                        enable: (getCode() == isChecked())
                        "
                        disabled>

                </button>

stripemethod.js

define(
    [
        'Magento_Payment/js/view/payment/cc-form',
        'jquery',
        'Magento_Checkout/js/action/place-order',
        'Magento_Checkout/js/model/full-screen-loader',
        'Magento_Checkout/js/model/payment/additional-validators',
        'Magento_Payment/js/model/credit-card-validation/validator'
    ],
    function (Component, $) {
        'use strict';

        return Component.extend({
            defaults: {
                template: 'Gssi_Icanpay/payment/stripe'
            },

            getCode: function() {
                return 'stripe';
            },

            isActive: function() {
                return true;
            },

            validate: function() {
                var $form = $('#' + this.getCode() + '-form');
                return $form.validation() && $form.validation('isValid');
            }
        });
    }
);

Now I Need Help On Showing Credit Card From In Checkout Page, Which Is By Default Not Available. I Have Used CC-Form But It is Not Showing cvv,Months And Year field.

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


texts: Dispatch event of product tag save from admin

texts:
Is there any dispatch event available for product tag save from admin

I want to do save that tag in my table when its status change pending to approve


texts: Question about the Merge layout.xml - Magento 1.9

texts:
Question: If a layout handle exists in the "base/default" package, your custom design package, and the custom package's
  "local.xml", wich handles can be merged ?

1) All of the handles can be merged.

2) Only the handles in "base/default" can be merged.

3) Only the handles in your design package can be merged.

4) Only the handles in "local.xml" can be merged.

5) Only the handles in "base/default" and "local.xml" can be merged.

6) Only the handles in your design package and "local.xml" can be merged.


texts: on custom button click magento redirects to admin start page

texts:
in magento i have created a custom button in admin area that opens new pop up window, in this window i have form very similar like this in this post
 Actually i want to do the same thing, like in that post, so here is my code:

class MyCompany_MyModule_Adminhtml_LabelController
extends Mage_Adminhtml_Controller_Action
{
    public function setlabelAction()
        {
           if (!isset($_POST['submit']))
           {
                 ?>

Select label size:

                        <form action="LebelController.php" method="POST">

                            <select name="SIZE">
                             <option value="1x1">1x1</option>
                              <option value="2x2">2x2</option>
                              <option value="3x3">3x3</option>
                              <option value="4x4">4x4</option>
                            </select>

                            <input type="submit" name="submit" value="Go">
                        </form>

           <?php
           }
           else
           {
                echo ($_POST);
           }

when i click on my custom button the new popup window with form inside appears, but the problem is that if i choose value from this combobox and click on this form button "Go", magento opens admin start page(grid page?) in this popup window. I wonder why is this happening? why it goes there, and just not relods my popup window  where the choosed value is echoed?


texts: Magento 2.0 check if customer exists by name or number

texts:
I updated my Magento to a newer version, now the old custom php code to check if a user exits by email does not work anymore

my old code

require_once '../app/Mage.php';

//first check if user with same email and number exists
function customerExists($email, $websiteId = null)
{
    $customer = Mage::getModel('customer/customer');
    if ($websiteId) {
        $customer->setWebsiteId($websiteId);
    }
    $customer->loadByEmail($email);
    if ($customer->getId()) {
        return $customer;
    }
    return false;
}

has stopped working can you please guide me how to make this work


texts: add to cart button without going to the check out page

texts:
I want plugin or button that makes things like this.

Example : When user clicks on "add to cart" the items should go the cart without loading the current page. like crazydeals.


texts: Magento cookie bug with WebKit based browsers

texts:
There is a reasonably common & well documented cookie-related bug/issue with Magento and Chrome (looking at the others' issues - possibly WebKit and IE at times). Whether this is due to a common Chrome extension/setting or incorrect web server setting - I do not know.

I'm on OS X 10.8.2 running CentOS 5.8 via VirtualBox. More often than not, for me to login to a Magento admin, I need to set the HTTP Only setting in the Magento admin to 'No'. Before I do this, I am not able to login via Chrome - other browsers do not seem to have this issue for me.

Now I've come across a new (but probably the same) issue while making an extension - I am able to read cookies via Chrome but not set them. There were no issues with using Firefox. To make sure it's not my Chrome, I've performed a fresh install by deleting all user data and profiles but the issue persists. Perhaps I should set the cookies via JS only for this extension.

Nothing out of the norm with the cookie setting code:

$cookie = Mage::getModel('core/cookie');
$cookie->set('cookiename','cookievalue',99999);


texts: On which Magento 1 CE version is the Professional version 1.9 base on?

texts:
We run a deprecated Magento Professional version 1.9.1 and would like to upgrade to any other, supported version.

I think to know that both Magento EE and the Professional versions is/were forked off an existing community version.

Which CE version would come closest to the Professional version 1.9.1 in the regards to the code base (which implicitly means easiest upgrade path)?


texts: Subcategories are not being displayed in the backend

texts:
I have a website named vintagecarradio that runs on Magento.
It has been great to manage such a large store on this platform. However, everything was fine a while back but from a few days I have observed that the product subcategories are not getting displayed anymore in the back-end. They do not appear in the general category tree and neither they appear when I try to edit a particular product. However, they seem to be at their place and work fine when the website is browsed from the front end. Please help and advise.

Regards
Brad


texts:
So I'm still learning the programming side of Magento, but I thought if I copied everything that has anything to do with the Bundle product type, rename it to a new product type name (Assembly), that would get me close where I could then modify my new product type for the behavior I want. It almost worked, but obviously I'm doing something wrong.
I created a new namespace under local. (MyNewNamespace)
I copied every file that had anything to do with bundle into respective new files with everything changed to assembly and MyNewNamespace/Assembly for the classes.

Everything almost works, except I get Fatal error: Class 'Mage_Assembly_Helper_Data' not found.

I traced this to app/code/core/Mage/Core/Model/Config.php line 1213 in

public function getGroupedClassName($groupType, $classId, $groupRootNode=null).

On line 1253 it hardcodes mage_ to come up with the class name.

What am I missing? Can I not do what I did in my own namespace?


texts:
I'm trying to display product_image on the custom_page :

Please Check my Code.and help me.

  namespace\app\code\Magento\History\Block\HistoryData.php

I have:

<?php
 namespace Magento\History\Block;

 class HistoryData extends \Magento\Framework\View\Element\Template
 {

  public function __constructor(
      ..../Magento/Sales/Model/Order/Item $item....)
 {
      ...
      $item = $item;
      ...
 }

  public function getOrderData() {
     $item = $this->item()->create()->getCollection()-
   >addFieldToSelect('*');
   return $item;
  }
}

And in this file

  namespace\app\code\Magento\History\view\frontend\templates\history.phtml

    <?php
      $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
      $orders = $objectManager->create('Magento\Sales\Model\Order\Item')-
     >getCollection();
     $orders->addFieldToSelect('*');
    ?>

       <table class="data table table-order-items" id="my-orders-table"
      summary="<?=__('Items Ordered') ?>">

<?=__('Items Ordered') ?>

             <?=__('Product Image') ?>
             <?=__('Product Name') ?>
             <?=__('Qty') ?>
             <?=__('Price') ?>
             <?=__('Subtotal') ?>

           <?php foreach($orders as $item): ?>

                  <?php echo
                      $item->getImage(); ?>
                 <?php echo
                     $item->getName(); ?>
                 <?php echo $item-
                     >getQtyOrdered(); ?>
                 <?php echo $item-
                     >getPrice(); ?>
                <?php echo
                     $item->getBaseRowTotalInclTax(); ?>

             <?php endforeach; ?>

Can anyone help the next step to display image?? Thanks.


texts:
Magento2 is successfully installed on localhost using composer

when i open localhost/magento2/setup.. This is opened

<?php
/**
 * Copyright Â© 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */

if (PHP_SAPI == 'cli') {
    echo "You cannot run this from the command line." . PHP_EOL .
        "Run \"php bin/magento\" instead." . PHP_EOL;
    exit(1);
}
try {
    require __DIR__ . '/../app/bootstrap.php';
} catch (\Exception $e) {
    echo <<getMessage()}

HTML;
    exit(1);
}

// For Setup Wizard we are using our customized error handler
$handler = new \Magento\Framework\App\ErrorHandler();
set_error_handler([$handler, 'handler']);

\Zend\Mvc\Application::init(require __DIR__ . '/config/application.config.php')->run();

Please advise

Edit1  - app/etc/env.php was missing.

Edit2 - I have given the following permissions

cd /var/www/html/magento2
find var vendor pub/static pub/media app/etc -type f -exec chmod u+w {} \;
find var vendor pub/static pub/media app/etc -type d -exec chmod u+w {} \;
cd /var/www && sudo chown -R www-data:www-data .
chmod u+x bin/magento


texts: addAttributeToSelect() does not work for newly created attributes

texts:
I had to create a product collection that contains some newly created attributes. It was not possible to add these attributes to the collection ('inner' doesn't make a difference). Even reindexing didn't help.
Example code:
require_once('./app/Mage.php');
error_reporting(E_ALL);
ini_set('display_errors', 1);

umask(0);
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);

$attributes = array(
    'name',
    'new_attribute'
);
$products = Mage::getResourceModel('catalog/product_collection')
    ->addAttributeToSelect($attributes, 'inner');

Query for that collection:
SELECT `e`.*, `at_name`.`value` AS `name`, `at_new_attribute`.`value` AS `new_attribute`
FROM `catalog_product_entity` AS `e`
INNER JOIN `catalog_product_entity_varchar` AS `at_name`
    ON (`at_name`.`entity_id` = `e`.`entity_id`) AND (`at_name`.`attribute_id` = '71') AND (`at_name`.`store_id` = 0)
INNER JOIN `catalog_product_entity_varchar` AS `at_new_attribute`
    ON (`at_new_attribute`.`entity_id` = `e`.`entity_id`) AND (`at_new_attribute`.`attribute_id` = '514') AND (`at_new_attribute`.`store_id` = 0)

If i check for that attribute_id 514 in catalog_product_entity_varchar I get also an empty result. So neither null nor the "default value" is set.
SELECT *
FROM `catalog_product_entity_varchar`
WHERE attribute_id = 514

MySQL returned an empty result set

After using workaround from below I get 750 correct results (with value null).
Even when you set a "default value" for this newly created attribute, it is not populated to products when you add it to attribute set. The "default value" is only used if you create new products.
Steps to reproduce:

add new attribute (use in product listing doesn't matter)
assign attribute to attribute set
reindex attributes/flat tables
run code

Expected result:
Get a collection where $item->getNewAttribute() is null or empty string.
Current result:
Get an empty collection. ($products->getSize() is 0)

Workaround:
Fortunately i found an answer here: When setting a product attribute programmatically, can't retrieve it from a collection

open product grid
select all
update attributes
submit
check "change" checkbox for "attributecode" attribute but leave input field empty
save

For my understanding attribute values (null or "default value") should be added to DB when assing a attribute to a set, but it doesn't happen. Products only appear in product collection, if:

product is saved manually, or
workaround is used (for multible products)

Any ideas where to fix this in code?


texts:
Given Scenario:

For learning and understanding the Magento 2 Theming Stuff better and get a closer look i woud like to create my own theme from scratch. I want to create a basic one, no backend options like all the fancy ones out there. To begin i want to use the utility framework tailwindcss and expand from there. Since im new to all this, especially with magento i'm looking for a few good resources to start reading / watching ( videos prefered since i can understand stuff better with a visual representation ).

Are there any resources out besides the Magento docs where i can get a good look? I want everything indepth to get as much infos as possible, probably explained in an easy path.

Things im looking especially for are the following:

Understanding the xml files
Change the column layouts in order to use tailwinds grid
Change templates to use with tailwind
custom functionality ( for example: hide all "special prices" on a toggle switch )


texts: newsletter subscription field not showing in Magento 2

texts: my newsletter subscription field is not showing on the main page but it is showing in on the other pages. the top screen shot is of the home page and the other one is from the products page. Please guide be on this problem. I'm using magento 2.3.5


texts:
in /pub/static/frontend/Magento/luma/ro_RO/css .

I can see all the files but the document inside  no. so there is no way I can make changes.  What am I doing wrong ?

magento 2- filezilla


texts: Magento2 import product csv permission denied error

texts:
Why am i getting this warning all of a sudden!

var/importexport/catalog_product.csv" cannot be deleted Warning!unlink

during the product csv import

I have full write permission for var folder


texts: $fieldset->addType() show extra textbox in admin form Magento 2

texts:
I used this code for add custom field type on admin form

$fieldset->addType('uploadedfile', '\Vendorname\Modulename\Block\Adminhtml\filerenderer\Renderer\FileIconAdmin');

$fieldset->addField(
    'Uploaded File',
    'uploadedfile',
    [
        'name'  => 'uploadedfile',
        'label' => __('Custom Div'),
        'title' => __('Custom Div'),

    ]
);

But it's display extra textbox field in admin Form, How we remove this extra textbox?

File: Vendorname\Modulename\Block\Adminhtml\filerenderer\Renderer\FileIconAdmin.php

namespace Vendorname\Modulename\Block\Adminhtml\filerenderer\Renderer;

class FileIconAdmin extends \Magento\Framework\Data\Form\Element\AbstractElement
{
    public function getAfterElementHtml()
    {
        // here you can write your code.
        $customDiv = '

Custom Div

';
        return $customDiv;
    }
}


texts: Exception: Type Error occurred when creating object: Magento\Framework\Mail\EmailMessage

texts:
Getting error when trying to send email via controller

 $email_Template = 'hello_template';
    $email_Subject = 'Customer Registration Success';

    $transport = $this->transportBuilder
        ->setTemplateIdentifier($email_Template)
        ->setTemplateOptions(['area' => \Magento\Framework\App\Area::AREA_FRONTEND, 'store' => $this->storeManager->getStore()->getId()])
        ->setTemplateVars([
            'name'  => 'aaaa',
            'email'  => $data['email'],
            'subject'  => $email_Subject
        ])
        ->setFrom(['name' => 'test','email' => 'test@gmail.com'])
        ->addTo([$data['email']])
        ->getTransport();
    $transport->sendMessage();

How to debug the error.

I have already tried by removing generated folder & re run all magento2 compilation commands

I am using Magento2.3.3


texts:
What event fires when the user clicks 'Reorder'? We are making an observer module that will execute after the user clicks 'Reorder' - we want to remove deprecated products from the order and replace them with current products.

The events I've tried are below and they don't fire when the user clicks reorder:

sales_order_place_before
adminhtml_customer_orders_add_action_renderer

PS: An alternative solution would be an observer that watches 'Cart Summary' page and lists what products are in the cart. Maybe you know of the event name for this event?


texts: getting New and Reconditioned price using php in magento

texts: Hello everyone! So I have been tasked with creating a php function for the details listed above, I know that I want to do this in the view.phtml file, yet I'm a little unsure as how to start the If, else statements for the function and how to display the New product price, the reconditioned price and as well as the repair message, please help!


texts:
I have this magento code :

$subquery = new \Zend_Db_Expr('SELECT DISTINCT value from catalog_product_entity_int where  row_id in (select row_id from catalog_product_entity_int where attribute_id = 97 and value = 1)');
$brandCollection->getSelect()->join( array( 't' => '('.$subquery.')' ), 'main_table.brand_id = t.value', array());

It generates the following query :

SELECT `main_table`.* FROM `prd_brand`
AS `main_table`
INNER JOIN `(SELECT DISTINCT value from catalog_product_entity_int where row_id in (select row_id from catalog_product_entity_int where attribute_id = 97 and value = 1))` AS `t`
ON main_table.brand_id = t.value

This query when executing it in phpmyadmin it gives me the following error :

Identifier name '(SELECT DISTINCT value from catalog_product_entity_int where row_id in (select row_id from catalog_p' is too long

The problem is on the two single quotes between the SELECT DISTINCT value from..., when removing them, it passes without any problems and this quotes are generated with the join method.

Is there anyway to bypass those single quotes ?


texts: purchase a downloadable product as guest checkout it does not appear in my downloadable products section

texts:
When I purchase a downloadable product as a guest and create account after that. The downloadable products  does not appear in the my downloadable products section after completed purchase but invoice is appear in My Orders.

I got an answer that the fix for this issue has already available in 2.2-develop branch.
Where I can get that.

My magento ver is 2.2.6

https://user-images.githubusercontent.com/33385380/45645670-32319500-ba8f-11e8-8966-0979b54273e7.jpg


texts:
We have a dropdown attribute named product_dimmable which is set to a value of "Yes" for a product.

When we import the following CSV file the product_dimmable value gets reset to the default value of "No" for no apparent reason:

sku,price
80179,29.99

We are using the standard import method for Magento CE 1.7.0.2.

Does anyone know why this happens and how it can be prevented?


texts: How to display customer name instead of My Account in header

texts:
I would like to display the customer name when they are logged in. I know that I have to use something like the below code but I don't know how to implement it.

<?php if(!Mage::getSingleton('customer/session')->isLoggedIn()){ ?>
    <?php echo $this->__('Account'); ?>
    <?php }else{ ?>
    <?php echo 'Hi, '.Mage::getSingleton('customer/session')->getCustomer()->getFirstname(); ?>
<?php } ?>

My customer xml and header files are as follow:

customer.xml

<default>
    <reference name="top.links">
        <action method="addLink" translate="label title" module="customer">My Account<url helper="customer/getAccountUrl"/><title>My Account</title><prepare/><urlParams/><position>10</position>
class="top-link-myaccount"</action>
    </reference>
</default>

header.phtml

echo $this->getChildHtml('topLinks');

top.links.phtml

<?php if($toplinks && is_array($toplinks)): ?>

    <?php echo $this->getChildHtml() ?>
    <?php foreach($toplinks as $_toplink): ?>
    <li<?php if($_toplink['first']||$_toplink['last']): ?> class="<?php if($_toplink['first']): ?>first<?php endif; ?><?php if($_toplink['last']): ?> last<?php endif; ?>"<?php endif; ?> <?php echo $_toplink['liParams'] ?>><?php echo $_toplink['beforeText'] ?><a <?php echo $_toplink['aParams'] ?>><?php echo $_toplink['innerText'] ?><?php echo $_toplink['afterText'] ?>

    <?php endforeach; ?>

<?php endif; ?>


texts: I have color swatches on my products. I want to add the swatch name next to my swatch. I see in the tooltip when hovering over a swatch, the name does come up with the swatch color, all I want to do is show this information next to my swatch without having to hover over it, please can anyone help, I am using the community version of Magento 2.4


texts: Count only business days, without weekend and holidays

texts:
I have the current date, in the format I need: Y/m/d

And I need to calculate what date will be in X days excluding weekends and holidays.
X - because this value is dynamic and can be set in the admin panel (For example: X = +2 days).

Can you help with your ideas or examples, how can this be implemented?

How calculate the date excluding weekends and holidays, and count only business days?

Thanks.