texts:
After installing the last patch 1.9.2.3 i can't send order notifications. When i run the cron it tries to send the E-Mail but i get the following error.

exception 'Zend_Mail_Transport_Exception' with message 'Unable to send mail. ' in /xxxxxxx/lib/Zend/Mail/Transport/Sendmail.php:156
Stack trace:
#0 /xxx/lib/Zend/Mail/Transport/Abstract.php(348): Zend_Mail_Transport_Sendmail->_sendMail()
#1 /xxx//lib/Zend/Mail.php(1194): Zend_Mail_Transport_Abstract->send(Object(Zend_Mail))
#2 /xxx/app/code/core/Mage/Core/Model/Email/Queue.php(241): Zend_Mail->send()
#3 [internal function]: Mage_Core_Model_Email_Queue->send(Object(Mage_Cron_Model_Schedule))
#4 /xxx/app/code/core/Mage/Cron/Model/Observer.php(326): call_user_func_array(Array, Array)
#5 /xxx/app/code/core/Mage/Cron/Model/Observer.php(72): Mage_Cron_Model_Observer->_processJob(Object(Mage_Cron_Model_Schedule), Object(Mage_Core_Model_Config_Element))
#6 /xxx/app/code/core/Mage/Core/Model/App.php(1358): Mage_Cron_Model_Observer->dispatch(Object(Varien_Event_Observer))
#7 /xxx/app/code/core/Mage/Core/Model/App.php(1337): Mage_Core_Model_App->_callObserverMethod(Object(Mage_Cron_Model_Observer), 'dispatch', Object(Varien_Event_Observer))
#8 /xxx/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('default', Array)
#9 /xxx/cron.php(78): Mage::dispatchEvent('default')
#10 {main}

I have looked around and i know that this is a problem when you don't set the path to sendmail in backend back that is all correct. The mail function is active, too.

If i send an Email not over the queue so directly an forgotten Password its working well. Only the Queue functionality is broken. I have debugged a lot. The function _sendMail() in SendMail.php is called i write a text to the log files before and after but only the mail function isn't called its very strange.

Anyone an idea or have the same problem with that patch? I have seen in the other thread that there are a lot of problem with the new Patch.

Update:

The interesting thing is that my emails are queued in the core_email_queue with processed_at NULL. When i run the cron the processed date is set but the E-Mail isn't send. In the same Moment i get the error on top.

I have that problem only on my managed server. On my local machine the Email is sent what is very strange and i have no problems and no exception.


texts: Creating a 2 product kit for a specific combined price

texts: We want to be able to offer our customers kits. If you buy one of the following top SKU and one of the following bottom SKU you get the kit for a set price. How do we setup this in our promotions.


texts: Export multiple tierprices of single product

texts:
I'm export/importing products including the tier price to a CSV file:

foreach($products as $productid) {
    $existingTierPrice = $product ->load($productid)->tier_price;

    foreach($existingTierPrice as $key=>$value) {
        $tierarray = array("all","all",$value['price_qty'],$value['price']);
        print stripslashes(implode('^',$tierarray)) . "\n";
    }
}

This works great but what to do when a product has multiple tier prices?

So in other words, how can i use the above code and make sure multiple tierprices of a product get exported and the tierprices can be edited and imported again into Magento.


texts:
In production mode , I tried to deployed the application.
Deployment was completed successfully but the changes in js file seems to be old. Static Signing is enabled in admin

I checked the pub/static/deployed_version.txt , but it shows previous deployment's timestamp.

In our application redis is also configured. I cleared the redis cache but nothing happend.


texts: Is it possible to sell not-in-stock products on Magento?

texts:
I would like to make it possible to order items which I don't have in stock, but it seems if I want to allow backorders, I must have the item listed as "in stock", which looks weird if people order it and then get the message that it's not in stock anyway.

Is there a solution to this problem? I would like to make it possible to add out-of-stock items to the basket and list them as as either "in stock" or "not in stock - delivery time 5-6 days". But I can't find a way to 1) allow not-in-stock goods to be put in the basket and 2) change "not in stock" to "delivery time 5-6 days".


texts: how to remove 403 forbidden error in magento server

texts:
I'm new in magento. I installed magento in sub folder on server.

created db sucessfully.

But, when I run url on browser it give error that

  You don't have permission to access / on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.


texts: How to get custom category attribute value in front end in Magento 2?

texts:
I am using Magento 2.3

I have Created one custom attribute "Popular Category" for categories. Now I am trying to get the value of this attribute in front end but I am not getting it.

I have tried this using below code:

<?php
     $cid = 3131;
     $c = $objectManager->create('Magento\Catalog\Model\Category')->load($cid);
     echo $c->getResource()->getAttribute('popular_category')->getFrontend()->getValue($c);
?>

But I am not getting any values at all.Please check my logic for custom attribute in below file.

  app/code/Myvendor/CategoryAttributes/Setup/InstallData.php

<?php

namespace Rootways\CategoryAttributes\Setup;

use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Eav\Setup\EavSetup;
use Magento\Eav\Setup\EavSetupFactory;
use Magento\Catalog\Model\Category;
use Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface;

/**
 * @codeCoverageIgnore
 */
class InstallData implements InstallDataInterface
{
    /**
     * @var EavSetupFactory
     */
    private $eavSetupFactory;

    /**
     *
     * @param EavSetupFactory $eavSetupFactory
     */
    public function __construct(EavSetupFactory $eavSetupFactory)
    {
        $this->eavSetupFactory = $eavSetupFactory;
    }

    public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
    {
        /** @var EavSetup $eavSetup */
        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
        $eavSetup->addAttribute(
            Category::ENTITY,
            'popular_category',
            [
                'type' => 'int',
                'label' => 'Popular Category',
                'input' => 'select',
                'required' => false,
                'sort_order' => 100,
                'global' => ScopedAttributeInterface::SCOPE_STORE,
                'group' => 'General Information',
                'visible_on_front' => true,
            ]
        );
    }
}
?>

I want to display images of those categories in which popular category is set to YES. So How can achieve this?


texts: Connection error while sending the mail form local?

texts:
I'm getting this error while sending the mail from the local in Magento.

2018-06-01 06:10:50 Connection: opening to ssl://smtp.gmail.com:587, timeout=300, options=array()
2018-06-01 06:10:51 Connection failed. Error #2: stream_socket_client(): SSL: The operation completed successfully. [C:\xampp\htdocs\Mailer\vendor\phpmailer\phpmailer\src\SMTP.php line 326]
2018-06-01 06:10:51 Connection: opened
2018-06-01 06:10:51 SERVER -> CLIENT:
2018-06-01 06:10:51 SMTP NOTICE: EOF caught while checking if connected
2018-06-01 06:10:51 Connection: closed
SMTP Error: Could not authenticate.
SMTP Error: Could not authenticate.
Message could not be sent. Mailer Error: SMTP Error: Could not authenticate.


texts:
Is there an event in the backend that I can Observe when Add Product button is clicked?
I need to limit a vendor from adding products (20 products maximum), but I don't find a way to override or catch the Add Product functionality on backend.
There is just catalog_product_save_after method, but It does not fit my requirement.
Thanks!


texts: How to override checkout cart page in custom theme magento 2?

texts:
I am trying to override checkout page some text using custom theme
  magento 2??


texts: Creating additional stores on same server in Magento 2

texts:
I'm very new to Magento, so it's all so confusing.

How can i make a multistore domain specific store with diffrent prices, but same inventory?

eg. b2b.domain.com for wholesalecustomers, and domain.com for regular customers.


texts:
We have created the product programmatically and we want to use the image from external link instead of default magento way but we are unable to load the images from external link in magento2.

Is there any way to do so?

Thanks


texts: Magento 2 remove zoom/full screen image link

texts:
We have a Magento 2.1 based website we want to remove the image zoon feature on the product detail page. we were able to get the magnifying glass removed from the image but can not figure out how to actually remove the ability to click on the image and have it open full screen.

In the Magento_Catalog/layout/catalog_product_view.xml we added

<remove src="Magento_Catalog::js/jquery.zoom.min.js" />

However that doesnt do the trick because you can still click on the image and it opens in a full screen?


texts: Transaction has been declined. Please try again later. - Error when invoicing

texts:
We're using Braintree to process payments (MCE 2.1.7) and are running into issues where on the braintree/paypal side of things, everything gets processed and goes through fine, and we've been able to authorize, process and submit for settlement via the Braintree admin panel, however, when we attempt to create an invoice and capture the payment from the Magento admin, we keep receiving the following error:

  Transaction has been declined. Please try again later.

Has anybody experienced similar issues?


texts: How to make separate success page for a specific product ordering in magento 1.9.3.1?

texts:
how to add new separate success page for a single product .

Any help would be appreciated..!

Thanks in advance..!


texts: Getting Error while trying to Retrieve Magento 2 orders using Rest API

texts:
I am trying to retrieve the Orders using REST API.
I want to retrieve all the processing orders for that i am using search criteria.
Below is what i have tried , but it is not working
https://auto1.online/rest/V1/orders?searchCriteria[filterGroups][0][filters][0][field]=status&
searchCriteria[filterGroups][0][filters][0][value]=processing&
searchCriteria[filterGroups][0][filters][0][conditionType]=eq
I am getting error, see


texts: Force List view mode (exclude Grid Mode) if mobile detected

texts: Can somebody advise how to exclude Grid Mode category view on mobile devices? Magento 1.9.1.0


texts: how we can place order with REST API Magento 2?

texts:
Anyone know how we can place an order with Magento web API?

I need to place an order with Payflow pro and payflow express.

Can you please send me request parameter for Web API?


texts: I installed a theme  on my computer but it does not work properly, Please check with below attachment css return 304.


texts: Inserting additional entries after migrating from 1.9.1.0 to 2.1.6

texts:
I have already successfully migrated the contents of a site from 1.9.1.0 to 2.1.6 using the official migration module but the old site hasn't been taken down and the new site hasn't gone live so new entries are still being added to the old site. I tried resuming the migration but if I use the -r option, I keep getting one of the following errors alternately:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-Migration_Default' for key 'EAV_ATTRIBUTE_SET_ENTITY_TYPE_ID_ATTRIBUTE_SET_NAME'

Notice: Undefined offset: 1 in /var/www/html/peppy/smappliance/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php on line 283

and if I don't use -r, the migration completes but nothing gets added. How can I resume migration? Thanks.


texts:
In one of my .phtml file I got below line. How can I edit the ChildHtml ?

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


texts: Magento 1.8 Customer login Confirmation key not receiving by the customer

texts:
While Creating a new account as new customer, I gave in the

  System->Configuration->Customer->Customer Configuration

Send

  Confirmation Key= Yes

But Account is getting created but the Confirmation key is not been sent to the mail which was given at the time of registration guyz please me


texts: Magento1: I need to get multiselect dropdown values in grid listing in custom module

texts:
I need to get multiselect dropdown values in grid listing in custom module.

Please suggest for this.

Code
form.php

$topics = Mage::getModel('abc/category')->getCollection();
        $topics->setOrder('name', 'ASC');
        $topicsArray = array();
        foreach ($topics as $topic) {
            $topicsArray[] = array(
                'label' => $topic->getData('name'),
                'value' => $topic->getData('category_id')
            );
        }
        $selectedTopicsArray = array();
        if($model->getId()) {
            $selectedTopics = Mage::getModel('abc/event_topic_link')->getCollection();
            $selectedTopics->addFieldToFilter('event_id', $model->getId());
            foreach ($selectedTopics as $topic) {
                $selectedTopicsArray[] = $topic->getData('topic_id');
            }
        }
        $infoFieldset->addField('topics', 'multiselect', array(
            'name'      => 'topics',
            'label'     => Mage::helper('abc')->__('Topics'),
            'title'     => Mage::helper('abc')->__('Topics'),
            'required'  => false,
            'onclick'   => 'return false;',
            'onchange'  => 'return false;',
            'value'     => $selectedTopicsArray,
            'values'    => $topicsArray
        ));


texts: how to set default color configurable product

texts: When I go to a product page, it does not have the default color - but I want to set the default color for a configurable product.


texts: Magento 2 - Dimensional Weight Confusion

texts:
I am having a very difficult time finding some clear answers on using dimensional weight in Magento 2. Dimensional weight is generally an option with different shipping providers but all of the articles I have found online imply that dimensional weight is just default in Magento 2 when using a major shipping provider. Every article also sounds like it has just been optimized for SEO but are not actually useful because they don't fully make sense. Here are several examples:

https://bsscommerce.com/blog/how-to-set-up-shipping-methods-in-magento-2-part-2/

Four main carriers supported in Magento 2 Dimensional Weight shipping
method includes:

...

Although the configuration of each carrier may differ, all shipping
service providers require you to have a shipping account which provides
you with essential information like user ID, gateway URL to complete
the setup of each shipping method.

Because these 4 shipping methods share some major similarities, I will
only focus on the configuration of United Parcel Service.

The article goes on to not mention how to actually enable or configure dimensional weight. Other similar articles:

https://www.mconnectmedia.com/blog/magento-2-dimensional-weight-shipping-method-part-4/

https://amasty.com/knowledge-base/how-to-configure-magento-2-shipping-methods

https://www.magestore.com/magento-2-tutorial/magento-2-shipping-methods-tuts/#4magento_2_dimensional_weight

There is a guide for Dimensional Weight from Magento directly but it is for 1.9.x and states that it is not supported and you need to use a third party service/module (http://docs.magento.com/m1/ce/user_guide/shipping/weight-dimensional.html).

Let's assume that is supported (even though I have not seen hard evidence of it), how could dimensional weight be supported with dimensions being part of the Magento product set up. We could set custom attributes to products but width, length and height would need to be present for a true dimensional weight to be calculated.

I'm basically just looking for a hard yes or no and to be pointed in the direction of a solution if there is one.

Thank you!


texts: I am using community edition, recently know commerce edition has the feature like Flash Sale, what are all the options available any docs related to this please welcome.


texts: Prepend table alias to sort by column name?

texts:
I am using the sales_order_grid_collection_load_before event in order to append a filter to the collection.
However, in my case, I need to JOIN sales_flat_order table.
The problem is that the ordering is of the form ORDER BY created_at, and both sales_flat_order_grid and sales_flat_order have this column name..

How can I change/modify it to main_table.created_at, for instance?
I'm looking for a systematic method to prepend the table aliases to ORDER statements regardless of the specific column used, and, maybe to GROUP statements to.

How can I achieve this?


texts:
I want to store values in the PHP session in magento2.
So is it fine to do that or its not fine?
Actually, I have tried it through the JS session. But whenever I tried to get values from JS session in the PHP file by using the below code.
$catValue="sessionStorage.getItem("catId");";
it shows me an error.
It is also better if anybody please tell me how to receive session value from JS in PHP file using the above method.


texts:
I want to have a cms page where I will list all products that have special_offer dropdown attribute with yes value. I found something here but this is work only with the Yes/No attribute. I need to use dropdown attribute because I want to use this attribute in the layered navigation too.

So how I can display dropdown special_offer attribute where options are Yes and No?

This is the public function where the products are sorted:

public function getFeaturedProducts()
{
    $resource = Mage::getSingleton('core/resource');
    $read = $resource->getConnection('catalog_read');
    $productEntityIntTable = (string)Mage::getConfig()->getTablePrefix() . 'catalog_product_entity_int';
    $eavAttributeTable = $resource->getTableName('eav/attribute');
    $categoryProductTable = $resource->getTableName('catalog/category_product');

    $select = $read->select()
        ->distinct(true)
        ->from(array('cp'=>$categoryProductTable), 'product_id')
        ->join(array('pei'=>$productEntityIntTable), 'pei.entity_id=cp.product_id', array())
        ->joinNatural(array('ea'=>$eavAttributeTable))
        ->where('pei.value=1')
        ->where('ea.attribute_code="special_offer"');

    $res = $read->fetchAll($select);

    return $res;
}

Thank you


texts: Product search showing in google search for magento development site

texts:
I am facing an problem in my development site,when I am searching a product in Google the product search are showing result for the development site. This I want to disable it.

anyone has any idea regarding this?

Thanks


texts: Can an Attribute be used more than once in an attribute set?

texts: How to reuse an attribute in the same set?  I have a product that has multiple items and I'd like to use "description" (attribute) several times.


texts: I have added custom grid on admin side and all columns are displayed correctly. Filters are also working fine. But when I export to CSV, all records are exported and filters are ignored. Please suggest what to do?


texts:
I am trying to rewrite Mage_SalesRule_Model_Rule_Condition_Product_Subselect but it seems like my changes are not being picked. Below is what i've done trying to rewrite the Model.

app/code/local/Invent/SalesRule/etc/config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Invent_SalesRule>
            <version>0.0.1</version>
        </Invent_SalesRule>
    </modules>
    <global>
        <models>
            <salesrule>
                <rewrite>
                    <rule_condition_product_subselect>Invent_SalesRule_Model_Rule_Condition_Product_Subselect</rule_condition_product_subselect>
                </rewrite>
            </salesrule>
        </models>
    </global>
</config>

app/etc/modules/Invent_SalesRule.xml

<config>
    <modules>
        <Invent_SalesRule>
            <active>true</active>
            <codePool>local</codePool>
        </Invent_SalesRule>
    </modules>
</config>

app/code/local/Invent/SalesRule/Model/Rule/Condition/Product/Subselect.php

<?php
class Invent_SalesRule_Model_Rule_Condition_Product_Subselect extends Mage_SalesRule_Model_Rule_Condition_Product_Subselect
{
    public function validate(Varien_Object $object)
    {
       // the code
    }
}


texts: Variables and Buy Now options not appearing for configurable products

texts:
Okay, so I'm in a very weird situation.

I migrated my website to a faster server and suddenly the options of Add to Cart & Add to Wishlist along with the configurable options, upsell products are not appearing on the product page of configurable product, however everything is working fine for simple products.

The problem is only with the configurable products. Product images, descriptions, title & price are appearing, but not the above cited things.


texts: How to create a dynamic generated admin fields with Image upload?

texts:
This is XML :

<field id="threesegmentimages" translate="label"  sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1">
                     <field id="threesegmentimages" translate="label"  sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1">   <label>Add Segment Detail</label>
                         <frontend_model>Namespace\Module\Block\Adminhtml\Form\Field\ThreeSegmentImage</frontend_model>
                        <backend_model>Namespace\Module\Config\Backend\SegmentImage</backend_model>
                        <base_url type="media" scope_info="1">namespage/module</base_url>
                        <comment>Maximum 12 Segment Allowed</comment>
                   </field>

  this is Namespace/Module/Block/Adminhtml/Form/Field/ThreeSegmentImage.php

namespace Namespace\Module\Block\Adminhtml\Form\Field;

use Magento\Config\Block\System\Config\Form\Field\FieldArray\AbstractFieldArray;

class ThreeSegmentImage extends AbstractFieldArray
{
protected $renderer = [];
 private $_imageRenderer;
protected function _geImageColumnRenderer() {
if( !$this->_imageRenderer ) {
  $this->_imageRenderer = $this->getLayout()->createBlock('Namespace\Module\Block\Adminhtml\Form\Field\SegmentImageField','',['data' => ['is_render_to_js_template' => true,]]);
    }
    return $this->_imageRenderer;
}
protected function _prepareToRender()
{
    $this->addColumn('three_segmentimage',['label' => __('Segment Image'),'size' => '50px', 'class' => 'required-entry', 'renderer' => $this->_geImageColumnRenderer()]);
    $this->_addAfter = false;;
    $this->_addButtonLabel = __('Add New Segment');
}
}

  This is BackendModel :

namespace Namespace\Module\Config\Backend\;

class SegmentImage extends \Magento\Config\Model\Config\Backend\Image
{
    /**
     * The tail part of directory path for uploading
     */

    const UPLOAD_DIR = 'namespage/module';

    /**
     * Upload max file size in kilobytes
     *
     * @var int
     */
    protected $_maxFileSize = 2048;

    /**
     * Return path to directory for upload file
     *
     * @return string
     */
    protected function _getUploadDir()
    {
        return $this->_mediaDirectory->getAbsolutePath($this->_appendScopeInfo(self::UPLOAD_DIR));
    }

    /**
     * Makes a decision about whether to add info about the scope
     *
     * @return boolean
     */
    protected function _addWhetherScopeInfo()
    {
        return true;
    }

    /**
     * Save uploaded file before saving config value
     *
     * Save changes and delete file if "delete" option passed
     *
     * @return $this
     */
    public function beforeSave()
    {
        $value = $this->getValue();
        $deleteFlag = is_array($value) && !empty($value['delete']);
        $fileTmpName = $_FILES['groups']['tmp_name'][$this->getGroupId()]['fields'][$this->getField()]['value'];

        if ($this->getOldValue() && ($fileTmpName || $deleteFlag)) {
            $this->_mediaDirectory->delete(self::UPLOAD_DIR . '/' . $this->getOldValue());
        }
        return parent::beforeSave();
    }
}

I want result like this :

but not working can anyone help me to do this?


texts: Get Shipment Id while creating Shipment in Magento 1.9

texts:
I am creating shipment programmatically. I want to get shipment id what shipment currently creating. See my code,You can understand my question.

$shipment = $order->prepareShipment($qty);
if ($shipment) {
$shipment->register();
$shipment->addComment($history_comment, $email && $includeComment);
$shipment->getOrder()->setIsInProcess(true);
try {
    $transactionSave = Mage::getModel('core/resource_transaction')
            ->addObject($shipment)
            ->addObject($shipment->getOrder())
            ->save();
            }
catch (Mage_Core_Exception $e) {
    Mage::getSingleton('adminhtml/session')->addError("Cannot create an empty shipment for ".$order->getIncrementId());
}

I want to get shipment id of this shipment.
Anyone knows how to get..?


texts: Display CMS Static Block At Shipping Step Outside Order Summary

texts:
I want to display a cms-static block outside summary at shipping & payment step in side bar please check below attachment of output

Shipping Step

Payment Page

Find checkout_index_index.xml code below

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceBlock name="checkout.root">
        <arguments>
            <argument name="jsLayout" xsi:type="array">
                <item name="components" xsi:type="array">
                    <item name="checkout" xsi:type="array">
                        <item name="children" xsi:type="array">
                            <item name="sidebar" xsi:type="array">
                                <item name="children" xsi:type="array">
                                    <item name="summary" xsi:type="array">
                                        <item name="children" xsi:type="array">
                                            <item name="cms-block-discount" xsi:type="array">
                                                <item name="component" xsi:type="string">Vendor_CheckoutBlockProvider/js/view/cms-block</item>
                                            </item>
                                        </item>
                                    </item>
                                </item>
                            </item>
                        </item>
                    </item>
                </item>
            </argument>
        </arguments>
    </referenceBlock>
</body>
</page>


texts: Removing newsletter subscription "checkbox" at onepage checkout page

texts:
I have just migrated my store to a new domain.

But I have an error at the one-page checkout page with "2" newsletter subscription checkboxes...supposedly still referring to the old domain name.


texts: Change Checkout template based on products in cart

texts:
This is a weird request from a client, the products can be purchased with or without logos adding on to them. However, when a product which requires a logo is added to the cart the checkout process needs to be slightly different as additional costs will be added afterwards.

I've tried setting a new session in order to store whether the cart has a product which requires a logo in it and using various if statements to overcome this request, example:

            <?php foreach($this->getItems() as $_item): ?>
                <?php
                    $get_attributes = $_item->getProduct()->getTypeInstance(true)->getOrderOptions($_item->getProduct());
                    $attributes = $get_attributes['attributes_info'];
                    foreach($attributes as $attribute) {
                        if($attribute['value'] == 'Has Logo') {
                            $logo_cart = TRUE;
                        }
                    }
                ?>
                    <?php echo $this->getItemHtml($_item) ?>
                <?php endforeach ?>

Using the $logo_cart variable I set it in the core/session, then use:

Mage::getSingleton('core/session')->getLogoCart();

within if statements to change aspects of the checkout.

This is obviously not an ideal way of achieving this, especially since I am currently only setting the session once the customer hits the cart page so it's quite buggy if they're already on the checkout page.

Are there any suggestions on how I can achieve the above? I'm currently using the One Page Checkout module found here: http://www.magentocommerce.com/magento-connect/express-checkout-one-step-checkout.html

One method I've thought about is switching the entire template depending on what's in the cart, but I'm unsure which files I'd need to change within the module to achieve this.

EDIT:
Just to clarify, the entire process is to remain the same. I just need to remove a few options from the checkout, such as the shipping method, the review your order section, and display a new area, which are just template changes anyway.


texts: Magento 2: Short Description label shown as "none" on product page

texts: For some reason the label of the short description is shown as "none" in frontend's product page just before the short description.


texts: Magento 1.9.1 Blank checkout/onepage/success after purchase virtual and/or downloadable products

texts:
I'm using Magento ver 1.9.1 checkout/onepage/success  gives a blank page without errors after confirming purchase virtual products and/or downloadable products. I can see the order in the backend.

After purchasing simple products the success page gives a normal confirmation and redirect.

Unfortunately I am not able to solve this. Can anyone help please? Thanks!

Ok, this is what I found out:

I use a third party extension.

This is in the config.xml:

    <events>
        <checkout_onepage_controller_success_action>
            <observers>
                <checkout_onepage_controller_success_action_marketplace>
                    <type>singleton</type>
                    <class>Medma_MarketPlace_Model_Observer</class>
                    <method>notifyVendor</method>
                </checkout_onepage_controller_success_action_marketplace>
            </observers>

This is in the Observer.php:

public function notifyVendor($observer)
{
    $orderIncrementId = Mage::getSingleton('checkout/session')->getLastRealOrderId();
    $orderObject = Mage::getModel('sales/order')->loadByIncrementId($orderIncrementId);

    $vars['billing_address'] = $orderObject->getBillingAddress()->format('html');
    $vars['shipping_address'] = $orderObject->getShippingAddress()->format('html');
    $vars['get_is_not_virtual'] = $orderObject->getIsNotVirtual();
    $vars['customer_name'] = $orderObject->getBillingAddress()->getName();
    $vars['order_no'] = $orderIncrementId;

    $head = '

            Product
            Original Price
            Price
            Qty
            Row Total

';

    $orderItems = $orderObject->getAllItems();
    $orderDetails = array();
    foreach($orderItems as $item)
    {
        $attribute = '';
        if($options = $item->getProductOptions())
        {
            if(isset($options['attributes_info']))
            {
                foreach ($options['attributes_info'] as $option)
                    $attribute .='
' . $option['label'] . ': ' . $option['value'] . '
';
            }
        }

My questions are:

    $vars['get_is_not_virtual'] = $orderObject->getIsNotVirtual();

causing the blank success page?

How can I solve this? Please help. Thanks a lot!


texts: Restrict administrator to one store view

texts:
I have installed and configured a Magento Community edition v1.8 according to a few requirements. Part of the requirements is the setup of a few stores.

For completion though, it is necessary to configure "administrators" per se for each of these stores. This administrator, when (s)he logs in to the admin portal, would be viewing data, configuration and settings only for their respective store, and the rest(of the stores) is not shown (As is the case when one configures an admin role via System -> Permissions -> Roles).

When the main administrator logs in to the back-end portal, they should view options for assigning these smaller (so to speak) administrators to their respective admin website sites. This list should be updated when stores are added/deleted (and hence the excellent Alan Storm's blog is not of much help)

I have been looking at various tutorials that enable and manipulate ACL, although none of them specifically tackle allowing such specific administrator access.

Can someone kindly point the right resources for achieving such a functionality? Any help is very much appreciated and will be repaid with karma points :)

(I forgot to mention that I am not looking for a turnkey solution, but rather a direction to proceed, so that I may configure it myself. Any resource in this regard will be very helpful!)


texts:
I need some help, my websites are showing the key after the url. So i thought it is still in developer mode and need to be turned into production mode.

I checked the magento file in folder bin, but can't find a thing. Please check:

#!/usr/bin/env php
<?php
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
if (PHP_SAPI !== 'cli') {
echo 'bin/magento must be run as a CLI application';
exit(1);
}
try {
require __DIR__ . '/../app/bootstrap.php';
} catch (\Exception $e) {
echo 'Autoload error: ' . $e->getMessage();
exit(1);
}
try {
$handler = new \Magento\Framework\App\ErrorHandler();
set_error_handler([$handler, 'handler']);
$application = new Magento\Framework\Console\Cli('Magento CLI');
$application->run();
} catch (\Exception $e) {
while ($e) {
    echo $e->getMessage();
    echo $e->getTraceAsString();
    echo "\n\n";
    $e = $e->getPrevious();
}
exit(Cli::RETURN_FAILURE);
 }


texts: Magento 2: How to Add product type to cart price rule condition programmatically?

texts: I'm using Magento v2.4.1. , Is there a way to add the product type as a condition in cart rule ?


texts: How to create page with left sidebar In magento 2.1.15?

texts:
I want to create page or block with sidebar. if I click customer service then I want to see customer service info etc.

2nd Image :

3rd Image:


texts: Remove custom category attribute from observer

texts:
I m removing custom category attribute from the form for second level category.

I m using magento observer for it and the event is adminhtml_catalog_category_edit_prepare_form

I m using below code to remove but it does'n work.

public function removeAttribute(Varien_Event_Observer $observer)
        {
            $form = $observer->getForm();

                if (Mage::registry('current_category')->getLevel() == 2) {

                    $form->removeField('menu_type');
                }
        }


texts: I have used Magento 1.9.2.2. Any Magento mail is not sending. I already set a cron on the server-side but my issue still exists. please give proper solution.


texts: How To Automatically Check For Available Magento Extension Updates

texts:
Is there any way how I can automatically check for available Magento extension updates on the CLI? I thought about the mage tool as well as about n98-magerun, but both options do not seem to work.

With mage:

./mage install
./mage list-upgrades

Tells me No upgrades available, although updates are available. Maybe this is because I use a modman environment and mage does not like symlinks? Or do I use it in a wrong way or do I have wrong expectations?

n98-magerun does not seem to have such an option at all.

I would love to have an output similar to that one:

Namespace1_Extension1: no update available
Namespace1_Extension2: installed version: 1.0.0 ; available version: 1.1.0
...

I would expect this to work with extensions from Magento Connect, but it would be cool if it also worked with extensions from GitHub (difficult, but possible: get GitHub link from README, and check GitHub page for the current version).

Edit:
Since it is rather bad practice to install via MC manager, the solution should also work for extensions which have been installed manually.


texts:
In Magento 2 we can show all the modules and check whether they are active or not using
php bin/magento module:status

What is the alternative in Magento 1.
Thanks in advance


texts:
I'm looking for a solution to show my configurable options as radio buttons instead of select field on a product page for a configurable product.

show the options
add class="disabled" for options out of stock
add class="selected" for chosen option

There are a couple of extensions that solve my issue... partly solve my issue... and most of all provide lot of extra unneeded code.
example: http://www.bullsandbirds.com/sneaker-internationalist-leather-blue-195944


texts: Custom module does not get its classes loaded

texts:
I'm trying to create a module for my Magento 2 installation because I need to change some behaviours.
I followed this guide to build a module which basically (at the moment) just wants to override a method for GroupManagement class in Customer Model. The matter is that when I run the setup:upgrade command everything seems to be ok, but then every request to the site gets an exception.
I looked into logs and found that my class is not found (there is a ReflectionException "class does not exist"). What it seems to me is that something is missing telling the autoloader to load my module's namespace. Should I manually update some autoloader.php file? I don't think that's intended as a solution, but what am I missing?


texts: Magento1.9 : Few questions about Magento

texts:
Can I create a full system backup and expect the site to still be running efficiently ? I know there is an option to not disable the site while backup is in progress, But what will happen if leave the site open?
I have no contact with the previous developers so I don't know of the changes that have been done to the site such as js, CSS customization. So I'm a little afraid to upgrade the modules. Could it override current custom settings? And where can I expect these to located?
When I try to customize js files(scripts.js in public_html/js), the changes are not shown. I guess this is a caching issue. I've tried to flush both the Magento cache and cache storage, even updated/disabled/enabled the cache types and also entered the site in private mode so that the browser cache is reset. Nothing. However, it does seem to show after a couple of hours.
I am not receiving order confirmation emails and this includes invoices and everything else. No one is receiving anything. What could be the cause of this?


texts: Getting an error when trying to log into Admin when `twofactorauth` is enabled

texts:
When I have create a user via the CLI, I am unable to log into the Magento Admin because there is an error.
Fatal error: Uncaught TypeError: Return value of MSP\TwoFactorAuth\Model\ResourceModel\UserConfig::decodeConfig() must be of the type array, null returned in vendor/msp/twofactorauth/Model/ResourceModel/UserConfig.php on line 96


texts:
We have any issue with load more products (no load photo product).

Please on down page click "load more".

https://gerris.pl/new-arrivals

Any solution?


texts: How does Magento figure out shipment speed detail?

texts:
When I update a shipment in the admin with a tracking number, Magento will automatically figure out what kind of "speed" it is.

For example, I log on to admin -> Orders -> open an unprocessed order -> click to create a shipment. I would select "UPS", enter a tracking number, and submit the shipment. Once this is complete, Magento displays the following, even though I did not specify Next Day Air, nor is there any shipping rate request from UPS, as far as I can see on the admin side. The price is what the customer already paid during checkout.

Shipping & Handling Information
Track Order
United Parcel Service - *Next Day Air* $69.10

How or where does it figure out that this is a Next Day Air shipment?

UPDATE: made some clarifications.

UPDATE 2: In sales_flat_order.shipping_method, you'll find the shipping code responsible for the order.


texts: Magento 2. How to get every single Product ID

texts: I'm trying to get Category ID and as well Product Id Like I want to get it for to show all 'add to cart' button for specific category if you can help me that how can I hide 'add to cart' button for specific category or if at least tell me that how can I get the every single Product ID. Thanks in Advance


texts: How to Modify the JOIN Clause in a Collection, Varien_Db_Select, or Zend_Db_Select

texts:
I need to modify this:

$select = clone $filter->getLayer()->getProductCollection()->getSelect();

query is:

INNER JOIN `catalog_category_product_index` AS `cat_index`
    ON cat_index.product_id=e.entity_id
        AND cat_index.store_id=1
        AND cat_index.visibility IN(2, 4)
        AND cat_index.category_id='14'
INNER JOIN `catalog_product_index_price` AS `price_index`
    ON price_index.entity_id = e.entity_id
        AND price_index.website_id = '1'
        AND price_index.customer_group_id = 0
INNER JOIN `catalog_product_index_eav` AS `brand_idx_5`
    ON brand_idx_5.entity_id = e.entity_id
        AND brand_idx_5.attribute_id = '139'
        AND brand_idx_5.store_id = 1
        AND brand_idx_5.value = '5'

how to remove this INNER JOIN?:

INNER JOIN `catalog_product_index_eav` AS `brand_idx_5`
    ON brand_idx_5.entity_id = e.entity_id
        AND brand_idx_5.attribute_id = '139'
        AND brand_idx_5.store_id = 1
        AND brand_idx_5.value = '5'


texts:
magento 2 multistore  issues Warning:

Cannot modify header information - headers already sent path is ( /home/y2way/public_html/microzu2/app/bootstrap.php:1)


texts: Magento 2 Merge CSS only works on homepage

texts:
I've configured Merge and Minify CSS and Javascript in Magento 2 config (Advanced > Developer). At the homepage, it does merge and minify.
However, at all other pages, it does NOT merge CSS. (minify css and minify+merge js is performed correctly) I can't figure out why.

Does anyone have an idea what it might be?

Magento ver 2.1.9


texts: Magento 2: Override XML file from vendor folder to app folder doesn't work/update

texts:
I tried to override the XML file by copying the file from

  vendor/magento/module-catalog/view/frontend/layout/catalog_category_view_type_default.xml

to

  app/design/frontend/Infortis/base/Magento_Catalog/layout/catalog_category_view_type_default.xml

However, it is still loading the file from the vendor folder. I have tried clear & flush the cache, redeploy static content, but doesn't work.

below is the change i made ( comment out the container)

<?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <!--<referenceContainer name="sidebar.main">
            <block class="Magento\Catalog\Block\Navigation" name="catalog.leftnav" before="-" template="Magento_Catalog::navigation/left.phtml"/>
        </referenceContainer>--> <!--remove shop by category from category listing page -->
    </body>
</page>


texts:
i have written custom code to display all product by their category id now i want to add name filter which searches and show name matching with product

1: my category code works fine
2: when i add like filter to sort name i get null result please help me find out issue
i had used addAttributeToFilter which does not seems working

$category_id = $_GET['category_id'];
$catagory_model = Mage::getModel('catalog/category')->load($category_id);
$collection = Mage::getResourceModel('catalog/product_collection');
$collection->addCategoryFilter($catagory_model); //category filter
$collection->addAttributeToFilter('status',1); //only enabled product

$collection->addAttributeToSelect(array('id','name','url','small_image','price')); //add product attribute to be fetched

if($_GET['keyword']!=''){
    $needle= $_GET['keyword'];
    $collection->addAttributeToFilter('name', array(
        array('like' => '% '.$needle.' %')
    ));
}

$collection->addStoreFilter();


texts:
How to configure FirePHP with Magento to log response headers, dump objects to the browser console?

How to utilize FirePHP to reduce debugging time?


texts: Magento 2 - Nginx does not rewrite media with alias

texts:
I had a problem, with Nginx using the configuration from default nginx.conf.sample. When a client is accessing yet not existing cached product image, Nginx should rewrite the request to script /pub/get.php which would generate the image. However, Nginx was calling script /pub/errors/404.php, and instead of showing 404 error page, FastCGI was printing error "No input file specified.".

Related nginx logs:

2019/08/21 10:38:41 [error] 4044247#4044247: *1 open() "/home/user/public_html/pub/media/catalog/product/cache/9cdfca90d1ebe369f1fdfde371137e98/r/g/rg-bb-dun-snsn-gy.jpg" failed (2: No such file or directory), client: xxx.xxx.xxx.xxx, server: user.com, request: "GET /pub/media/catalog/product/cache/9cdfca90d1ebe369f1fdfde371137e98/r/g/rg-bb-dun-snsn-gy.jpg HTTP/1.1", host: "user.com"
2019/08/21 10:38:41 [error] 4044247#4044247: *1 FastCGI sent in stderr: "Unable to open primary script: /home/user/public_html/pub/errors/404.php (No such file or directory)" while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: user.com, request: "GET /pub/media/catalog/product/cache/9cdfca90d1ebe369f1fdfde371137e98/r/g/rg-bb-dun-snsn-gy.jpg HTTP/1.1", upstream: "fastcgi://unix:/opt/cpanel/ea-php71/root/usr/var/run/php-fpm/6dd0db392f3aad14ca8dbafdc008594ac456e169.sock:", host: "user.com"

After some time trying to fix the issue, i changed root $MAGE_ROOT/pub; to root $MAGE_ROOT;, fully removed directive location /pub/ {
    location ~ ^/pub/media/(downloadable|customer|import|theme_customization/.*.xml) {
        deny all;
    }
    alias $MAGE_ROOT/pub/;
    add_header X-Frame-Options "SAMEORIGIN";
} and changed paths in pub locations so that they were written relative to root instead of pub alias:

location /pub/media/ {
    try_files $uri $uri/ /pub/get.php$is_args$args;

    location ~ ^/pub/media/theme_customization/.*\.xml {
        deny all;
    }

    location ~* \.(ico|jpg|jpeg|png|gif|svg|js|css|swf|eot|ttf|otf|woff|woff2)$ {
        add_header Cache-Control "public";
        add_header X-Frame-Options "SAMEORIGIN";
        expires +1y;
        try_files $uri $uri/ /pub/get.php$is_args$args;
    }
    location ~* \.(zip|gz|gzip|bz2|csv|xml)$ {
        add_header Cache-Control "no-store";
        add_header X-Frame-Options "SAMEORIGIN";
        expires    off;
        try_files $uri $uri/ /pub/get.php$is_args$args;
    }
    add_header X-Frame-Options "SAMEORIGIN";
}

And it started to work propely. But I don't understand why it don't work with alias.


texts: “We can't save the customer” error while creating new customer after migration to magento 2.3.3

texts:
I followed this answer(https://magento.stackexchange.com/a/114480/79909) to solve this error but it is showing -> Content must be string or resource; received "Magento\Framework\Phrase".

I don't know how to solve this. Can anyone help me.


texts: Data Migration not procceds after Map Step

texts:
ubuntu@ip-172-31-32-129:/var/www/magento$ sudo php bin/magento migrate:data -r vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.3.1/config.xml
Reset the current position of migration to start from the beginning

[2019-04-08 07:04:28][INFO][mode: data][stage: integrity check][step: Data Integrity Step]: started
100% [============================] Remaining Time: < 1 sec
[2019-04-08 07:06:10][INFO][mode: data][stage: integrity check][step: EAV Step]: started
100% [============================] Remaining Time: < 1 sec
[2019-04-08 07:06:13][INFO][mode: data][stage: integrity check][step: Customer Attributes Step]: started
100% [============================] Remaining Time: < 1 sec
[2019-04-08 07:06:15][INFO][mode: data][stage: integrity check][step: Map Step]: started
100% [============================] Remaining Time: < 1 sec
[2019-04-08 07:06:48][INFO][mode: data][stage: integrity check][step: Url Rewrite Step]: started
100% [============================] Remaining Time: < 1 sec
[2019-04-08 07:06:48][INFO][mode: data][stage: integrity check][step: Log Step]: started
100% [============================] Remaining Time: < 1 sec
[2019-04-08 07:06:49][INFO][mode: data][stage: integrity check][step: Ratings Step]: started
100% [============================] Remaining Time: < 1 sec
[2019-04-08 07:06:49][INFO][mode: data][stage: integrity check][step: ConfigurablePrices step]: started
100% [============================] Remaining Time: < 1 sec
[2019-04-08 07:06:49][INFO][mode: data][stage: integrity check][step: OrderGrids Step]: started
100% [============================] Remaining Time: < 1 sec
[2019-04-08 07:06:49][INFO][mode: data][stage: integrity check][step: Tier Price Step]: started
100% [============================] Remaining Time: < 1 sec
[2019-04-08 07:06:49][INFO][mode: data][stage: integrity check][step: SalesIncrement Step]: started
100% [============================] Remaining Time: < 1 sec
[2019-04-08 07:06:49][INFO][mode: data][stage: integrity check][step: Inventory Step]: started
100% [============================] Remaining Time: < 1 sec
[2019-04-08 07:06:49][INFO][mode: data][stage: setup triggers][step: Stage]: started
100% [============================] Remaining Time: < 1 sec
[2019-04-08 07:07:19][INFO][mode: data][stage: data migration][step: EAV Step]: started
100% [============================] Remaining Time: < 1 sec
[2019-04-08 07:07:30][INFO][mode: data][stage: volume check][step: EAV Step]: started
100% [============================] Remaining Time: < 1 sec
[2019-04-08 07:07:46][INFO][mode: data][stage: data migration][step: Customer Attributes Step]: started
100% [============================] Remaining Time: < 1 sec
[2019-04-08 07:08:02][INFO][mode: data][stage: volume check][step: Customer Attributes Step]: started
100% [============================] Remaining Time: < 1 sec
[2019-04-08 07:08:03][INFO][mode: data][stage: data migration][step: Map Step]: started
12% [===>------------------------] Remaining Time: 18 mins

Magento not showing any kind of error only waiting time increase in map steps. Only customer migrate properly not any product etc
Any one have idea how to debug this error.

Source Magento have 9000 customer and 100 product and 13000 orders still it taking to much time process never terminated at map step only time increase not even showing any error.

If i check at admin and database only customer record and attributes are migrated..... not anything else... like orders...

Source Magento : 1.9.3.1
Destination Magento : 2.3.1


texts: I'm new to magento I'm adding new products in homepage it display 3 products in a row I want to display more than 3 product in a row

texts:
<reference name="content">
<block type="catalog/product_new" name="home.catalog.product.new" alias="product_new" template="catalog/product/new.phtml" after="cms_page">
<action method="addPriceBlockType"><type>bundle</type><block>bundle/catalog_product_price</block><template>bundle/catalog/product/price.phtml</template></action>
<action method="setColumnCount"><columns>6</columns></action>
<action method="setProductsCount"><count>6</count></action>
</block>
</reference>

Below is how I am trying to call via cms:

{{block type="catalog/product_list" category_id="5" column_count="4"" product_count="9" template="catalog/product/new.phtml"}}


texts: General Question regarding the data migration tool of Magento

texts:
I know Magento recommends Data migration in below order:

Settings
Data
Changes

  http://devdocs.magento.com/guides/v2.0/migration/migration-migrate.html

First, we need to migrate the settings, then data and delta.

Suppose I need to migration customer data only from Magento 1 to Magento 2. After successfully installing and configuring the Data migration tool, is it OK to proceed with data migration avoiding the first step(settings migration)?

Magento says settings need to be done first. But my concern is i have already configured settings in Magento 2 and if i do setting migration all that i have done will gets lost!!

So what is the best possible way for me to proceed here? Please advise me those who already done data migration successfully.

P.S: I prefer default data migration tool provided by magento. I am not interested in third party tools. So please dont suggest me those in answer :)


texts: Products are not showing When i search through REST client plugin

texts:
This is the XML content I got when I search in the browser/REST client Firefox plugin...

<magento_api>
    <data_item/>
    <data_item/>
    <data_item/>
    <data_item/>
    <data_item/>
    <data_item/>
</magento_api>

I have 6 items in the Magento store... But the product_id, description, sku and etc are not showing...

Please help me


texts: Magento 2 works too slow on local system in development environment

texts:
Magento 2 works very slow on local desktop system. This affects development speed. I am using wamp server. Works fine with Magento 1.

Is there anything which can make Magento 2 run faster in my local system?

Or Anyone have suggestions for Magento 2 development on local system?


texts: Include a .phtml file on One Page Checkout (billing.phtml)

texts:
I need to add some complex information to 'one page checkout', in billing.phtml. As it requires a lot of php code I need to put it in a separate phtml file. How do I insert this file after billing form(address details)?

I've tried putting this code into custom .xml layout file:

<layout version="0.1.0">
 <checkout_onepage_index translate="label">
  <reference name="checkout.onepage">
   <block type="core/template" name="checkout.onepage.dealer" after="checkout.onepage.billing" template="checkoutfields/search.phtml" as="checkout_dealer_search" />
  </reference>
 </checkout_onepage_index>
</layout>

and then calling this in username/persistent/checkout/onepage/billing.phtml (the one that was being used):

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

but nothing was added under address details form. My search.phtml contains a test string.

Update

When I change reference in checkoutfields.xml to

<reference name="checkout.onepage.billing">

it doesn't work but when I paste my block into base layout file persistence.xml in

<checkout_onepage_index>
 <reference name="checkout.onepage.billing">

it works. I have a feeling that I am missing something simple. Do I have to register this custom xml file somehow(it's not a part of a module)?


texts: Display stock status on product detail page

texts:
I have searched a lot and since I am new to magento I would like your help.
I want to display my stock quantity on my product details page. Can someone please give me a step by step configuration including files to modify?


texts: Help to change configurable product description, sku dynamically?

texts:
How to change product name dynamically in configurable product when click swatches Magento 2.3
I followed the provided code in above link with help of a programmer by mistake I deleted etc folder  I managed to get env.php and. rest of the file from backup  which I had  before  adding  the above code but my website was not working
then I deleted 'custom_layout_update_file' now website working but I can't see configurable product any help
would appreciate


texts:
I made a customization to the TopMenu and want to run an integration test.

I have the following code:

/**
 * Check if menu items have the right URL
 */
public function testUrlInMenu()
{
    \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\Framework\App\State')
        ->setAreaCode(Area::AREA_FRONTEND);
    \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
        'Magento\Framework\View\DesignInterface'
    )->setDesignTheme(
        'Magento/blank'
    );

    /**
     * @var $layout \Magento\Framework\View\LayoutInterface
     */
    $layout = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get(
        \Magento\Framework\View\LayoutInterface::class
    );

    $block = $layout->addBlock(\Magento\Theme\Block\Html\Topmenu::class, 'test');

    $result = $block->toHtml();
    $this->assertContains('http://localhost/index.php/', $result);
}

This test fails with

BadMethodCallException : Missing required argument $debugHintsPath of Magento\Developer\Model\TemplateEngine\Plugin\DebugHints.
/foo/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:45
/foo/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:82
/foo/vendor/magento/framework/ObjectManager/ObjectManager.php:71
/foo/vendor/magento/framework/Interception/PluginList/PluginList.php:233
/foo/vendor/magento/framework/Interception/Interceptor.php:151
/foo/var/generation/Magento/Framework/View/TemplateEngineFactory/Interceptor.php:26
/foo/vendor/magento/framework/View/TemplateEnginePool.php:44
/foo/vendor/magento/framework/View/Element/Template.php:254
/foo/var/generation/Magento/Theme/Block/Html/Topmenu/Interceptor.php:167
/foo/vendor/magento/framework/View/Element/Template.php:279
/foo/vendor/magento/framework/View/Element/AbstractBlock.php:659
/foo/var/generation/Magento/Theme/Block/Html/Topmenu/Interceptor.php:479
/foo/vendor/mestrona/magento-module-categoryredirect/Test/Integration/CatalogAttributesTest.php:110

How can I fix this?


texts:
I need to understand this new Magento 2 patches.

So I see that security patches are released as 2.3.3-p1.

Let's say my version is Magento 2.3.2. And Magento has released 2.3.2-p1, 2.3.3-p1, 2.3.4-p1, 2.3.5-p1 so far. Is that mean I need to apply only one patch ie. 2.3.2-p1 or all of these?

Also,

I see that for composer installation they have introduced a new way of getting the patch. https://devdocs.magento.com/guides/v2.3/install-gde/composer.html#example---security-patch .

composer create-project --repository-url=https://repo.magento.com/ magento/project-enterprise-edition=2.3.2-p1 <install-directory-name>

Just trying to understand how it will work on the already installed instance? Will it create a new project (create-project)?

I believe I need to apply the patch with this instead:

composer require magento/product-enterprise-edition=2.3.3-p1 --no-update

Update

So is this the process of applying patches after 2.3.3?

composer require magento/product-community-edition=2.3.3-p1 --no-update
composer update
bin/magento setup:upgrade //do I need to run this on security only patch/updates
bin/magento setup:di:compile
bin/magento setup:static:content:deploy

Especially do I need to run bin/magento setup:upgrade on security only patches/updates?


texts: Graceful degradation of module dependance

texts:
Short background: We're using a third party extension so send mail with Mandrill. This extension accomplishes this by overriding the method core/email_template::send(). I have to implement an e-mail filter to stop all e-mails to be sent to certain fake e-mail addresses, which I would do by also overriding core/email_template::send(). Simple enough, I would just make sure my module depends on the third party extension using <depend> in my module configuration.

The problem: If we decide to to inactivate or remove the third party Mandrill extension, my e-mail filter module would stop working since it depends om the third party extension. What I would like is for it to continue working without having to do any modification to it.

Possible solution: Remove the <depend> and the order of magentos module loading resolv it.

As far as I understand magento, modules are loaded in the order core, community and last local, and then alphabetically within these pools? Since the third party extension is placed in the community pool and my module resides in the local pool, my module will always override and things will work as expected. However, I don't feel this is a very solid solution. If modules gets moved to other pools or get renamed, things could stop working correctly without anyone noticing.


texts: How to build a custom image gallery in an admin form in magento2?

texts: I'm in the process of building a custom module  to best implement the image management portion.What I want is this:


texts:
I'm running a store which is not configured to handle recurring payment profiles. This morning I receive (for the first time every) the following payment transaction failed reminder:

Quote totals must be collected before this operation

The only instance I could find where this error is generated is within Mage_Sales_Model_Quote under the following method:

public function prepareRecurringPaymentProfiles()
{
    if (!$this->getTotalsCollectedFlag()) {
        // Whoops! Make sure nominal totals must be calculated here.
        throw new Exception('Quote totals must be collected before this operation.');
    }

    $result = array();
    foreach ($this->getAllVisibleItems() as $item) {
        $product = $item->getProduct();
        if (is_object($product) && ($product->isRecurring())
            && $profile = Mage::getModel('sales/recurring_profile')->importProduct($product)
        ) {
            $profile->importQuote($this);
            $profile->importQuoteItem($item);
            $result[] = $profile;
        }
    }
    return $result;
}

I'm not familiar with recurring payment profiles whatsoever, and am struggling to understand how this error occurred? Would appreciate any insight.

Edit: I have read the following resources:

Quote totals must be collected before this operation…. Blah, Blah, Blah… What a PITA You are Magento!

This approach did not work for me

How to properly implement this snippet of code

We have been using our theme & not made any recent design changes for over 2 years which leads me to believe this is not the problem. We have never seen this error pop up before.


texts: Overriding Mage_Customer_AccountController and adding a custom function?

texts:
I am overriding the forgotPasswordPostAction function in Mage_Customer_AccountController. This works well, I can call the function with a URL like that:

http://domain.com/whatever/index.php/customer/account/forgotpasswordpost/

Now I added a testAction function to the same controller, but I cant call it by URL, I always get forwarded to the login page (http://domain.com/whatever/index.php/customer/account/login/). Why? Can I define exceptions from that behaviour?

Thanks!


texts:
We’re currently finishing off our Magento site.
We need to apply a series of promotion rules at cart level based on the total value of the items in the cart.
We’ve discovered that Magento applies the promotion rule to the total WITHOUT VAT and not to the total with VAT. We need the promotion rule to be applied to the total WITH VAT. We’ve found this article,
http://www.speedking.eu/2012/01/how-to-subtotal-including-taxes-promotion-coupons/
which explains the problem and a solution, but with Magento 1.9 this doesn’t seem to work. Can anyone help?


texts: How to get Review for products collection magento 2?

texts:
Actually i want to get Review Rating and summary count.Please check below code

<?php
error_reporting(0);
use \Magento\Framework\App\Bootstrap;

include('../app/bootstrap.php');
$bootstrap = Bootstrap::create(BP, $_SERVER);
$objectManager = $bootstrap->getObjectManager();
$listBlock = $objectManager->get('\Magento\Catalog\Block\Product\ListProduct');

$addToCartUrl =  $listBlock->getAddToCartUrl($product);
$reviewFactory = $objectManager->create('Magento\Review\Model\Review');
$storeManager  = $objectManager->create('\Magento\Store\Model\StoreManagerInterface');
$storeId = $storeManager->getStore()->getStoreId();
$reviewFactory->getEntitySummary($product, $storeId);

$ratingSummary = $product->getRatingSummary()->getRatingSummary();
$reviewCount = $product->getRatingSummary()->getReviewsCount();

?>


texts: How to install Twig in Magento2 (and make it work)?

texts:
I've followed the steps highlighted in this tutorial:
Tuto webkul

Basically, install twig package v2.2.0 (easy), set template engine in my di.xml file (easy) then use webkul's Twig php class (easy but.).

Problem: as of version 2, Twig no longer uses the Twig_Autoloader class, and now relies on composer for that. But I have no idea how to make it work correctly so far...how to implement a correct setup.


texts: Adding a custom register page, changes the page title - Magento 2

texts:
I am adding a custom register pop-up to all pages by adding the following block in the default.xml file in my custom theme:

<block class="Magento\Customer\Block\Form\Register" name="customer_form_register_pop" template="Magento_Customer::form/register.phtml"></block>

But it cased all the pages to have the title: Create new customer account. The method works fine and the register form works well, but all the pages now have their titles replaced, is there any way around it without making too many changes? I am very green in Magento and am not very familiar with the tool. Any help is greatly appreciated.

Magento version: 2.2


texts: Where and what is the best way to create utility function in Magento?

texts:
I would like to ask for example I have a function doSomething() which will be used by one or more other files, where is the best place to put it?

As of now, I put everything in Data.php (helper class) and everything is public.

I've read here that using helper class is not a good idea.

If these functions are important and I want them to be secured, what is the best way to achieve this?

Thank you.


texts: How can I set the product attribute to Use To Create Configurable Product "Yes" programmatically?

texts: I've created an  product attribute by using a script. Now in my Model I want to set that attribute's Use To Create Configurable Product property to  "Yes" based on some conditions. How can I achieve this?


texts: folder system owner is getting changed in case of checkout of var/cache and var/session folder

texts:
I have set mage: mage user for my project it's working fine but whenever I am doing checkout then every time folder owner is getting changed to root: root for only var/cache/ & var/session/ folder.

Due to this every time I am getting file permission error on the frontend.

anyone can tell me how to keep the same folder owner when the file is regeneration in the system.

I know, during checkout some new files are generating in var/session folder and permission getting changed for the new file so it's happening.

I am using following command to change folder owner

chown -R mage:mage var/

but every time when does any file generate owner is getting change to root:root
Thanks for the support in advance.


texts: How to custom option allow multiple files uploaded on product detail page magento 2

texts: How to front side allow multiple file upload via product custom option.


texts: Having new Magento 2 theme developed, is child theme best way?

texts:
We are currently having a Magento 2 theme developed, they are starting in a few days. I know nothing about theme development so I am trying to make sure it is being done in the best way.

Should they develop the theme as a parent theme or a child theme of blank or luma?

Which is a more common way of doing it?

Since M2 is still fairly new and still working out different issues, we plan on keeping it updated with future releases as the bugs get corrected. Any advantages or disadvantages of creating a theme as a parent theme with these plans?

Looking for some experienced thoughts on this. Thanks for the input!


texts: Overwrite input.html in Magento UI in my module

texts:
I'm trying to overwrite input.html in module-ui > view > frontend > web > templates > form> element in my module.

Somehow it isn't working whatever I try.

I currently got this in my requirejs-config.js.

var config = {
config: {
    mixins: {
        'Magento_Checkout/js/view/shipping': {
            'BB_Checkout/js/mixin/shipping-mixin': true
        }
    }
},
'map': {
    '*': {
        'Wezz_Postcode/js/view/postcode': 'BB_Checkout/js/view/postcode-overwrite',
        'Magento_Ui/templates/form/element/input': 'BB_Checkout/templates/form/element/input-overwrite'
    }
}
 };

I also already tried clearing my M2 cache en browser cache.

Thanks in advance.


texts:
Synopsis

So I wanted to confirm my understanding of the cron configurations with Magento; under the admin console System > Configuration > Advanced > System > Cron:

  Generate Schedules Every #

I am unsure as to what this setting is about.

  Schedule Ahead for #

I am assuming this will schedule # minutes ahead of crons.  If the cron scheduler is configured in the cron tab to run every 5 minutes should this number also be configured to 5 or would Magento not reschedule jobs already scheduled?

  Missed if Not Run Within #

This appears to me as if to say when a cron is scheduled to run and is not executed within # minutes it is set as 'missed'.

  History Cleanup Every #

I imagine this should run through the cron_Schedule table and clear out all missed and executed schedules # minutes after they were executed/missed?

  Success History Lifetime #

In regards to the previous configuration I assume this is going to clear out all successful schedules after # minutes?

  Failure History Lifetime #

I assume this would clear out all missed schedules after # minutes? and then the history cleanup every #, success history and failure history settings are all entirely ambiguous.


texts:
I want to change the layout of the Product Page in Magento 2.
I want 3 equal columns and then to move the cart and price contents into the 3rd column.
so the layout would be
Image | Short Descroption and Title | and then price, cart and available addons if chosen. I have attached a picture as an example.
can someone tell me what file(s) I need to change?

rob.


texts: Magento - Filtering Configurable products on simple product attribute

texts:
I have an issue in Magento 1.9.

We have a list of configurable products. Like ex. Shoes
We filter the products by attribute: Manufacturer [NIKE]
Then try to filter by the attribute: SIZE [43]

However the result is a collection of ALL the configurable products that have the attribute SIZE attached to it, so at this point, the result is not:
- All Nike shoes with size 43 in stock.
- But, instead, it gives us all NIKE shoes that have a simple product, which has the Attribute Size [43]. Regardless of its stock status.

I hope you can help me sort this one out.


texts: my website is messed up i might have goofed up with some files

texts:
i have messed up something with my website.. i was searching some header and footer files and might have changed something in hurry..
now website looks like shit.
https://preyanksolar.in
somebody can please help.. will be appreciated greatly.


texts:
I have just installed Magento v2 on a fresh instance of CentOS (VPS). After overcoming various speedbumps (wrong PHP version, wrong MySQL version, php.intl not configured) and it appears that stylesheets haven't been installed correctly.

It appears that during the installation process, Magento have created a ton of new folders, but they're been given incorrect permissions, and, as such, files that were supposed to be inserted, haven't been.

Has anyone seen anything similar or have an idea what I might be able to try to resolve the issue?

The URL for my site is http://pearsonjames.com (don't worry, going to get an SSL cert and go HTTPS before going live.


texts: Custom extension Admin grid not displaying

texts:
When I try to load my custom grid view in the admin page, I got a blank page with the default admin layout loaded in instead of my grid. I tried many things but I can't find the bug.

My controller is implemented as follows:

<?php
class Brain2Terminal_CertWizard_Adminhtml_CertinfoController extends Mage_Adminhtml_Controller_Action
{
    public function indexAction() {
        $this->loadLayout();
        $this->_setActiveMenu('sales/sales');
        $this->_addContent($this->getLayout()->createBlock('CertWizard/adminhtml_certinfo'));

        $this->renderLayout();
    }
}

Grid container:

<?php
class Brain2Terminal_CertWizard_Block_Adminhtml_Certinfo extends
Mage_Adminhtml_Block_Widget_Grid_Container
{
    public function __construct()
    {
        parent::__construct();
        $this->_controller = "adminhtml_certinfo";
        $this->_blockGroup = "CertWizard";
        $this->_headerText = Mage::helper ( 'flexibleforms' )->__ ( 'Manage Infos' );
        $this->_addButtonLabel = Mage::helper ( 'CertWizard' )->__ ( 'Add Info' );
    }

    protected function _prepareLayout()
    {
        $this->setChild( 'grid', $this->getLayout()->createBlock( $this->_blockGroup.'/' . $this->_controller . '_grid', $this->_controller . '.grid')->setSaveParametersInSession(true) );
        return parent::_prepareLayout();
    }
}

The Grid:

<?php
class Brain2Terminal_CertWizard_Block_Adminhtml_Certinfo_Grid extends Mage_Adminhtml_Block_Widget_Grid
{
    public function __construct()
    {
        parent::__construct();
        $this->setId("certinfoGrid");
        $this->setDefaultSort("id");
        $this->setDefaultDir("ASC");
        $this->setUseAjax(true);
        $this->setSaveParametersInSession(true);
    }

    protected function _prepareCollection()
    {
        $collection = Mage::getModel("CertWizard/certinfo")->getCollection();
        $this->setCollection($collection);
        return parent::_prepareCollection();
    }

    protected function _prepareColumns()
    {
        $this->addColumn("id", array(
            "header" => $this->__("ID"),
            "align" => "right",
            "width" => "30px",
            "type" => "number",
            "index" => "id",
        ));
        $this->addColumn("attributeset_id", array(
            "header" => $this->__("Attributeset"),
            "align" => "right",
            "width" => "50px",
            "type" => "varchar",
            "index" => "attributeset_id",
        ));
        $this->addColumn("info", array(
            "header" => $this->__("Info"),
            "align" => "right",
            "width" => "50px",
            "type" => "varchar",
            "index" => "info",
        ));

        return parent::_prepareColumns();
    }
}

If any more information is needed, please let me know.

So my layout.xml file looks like follows:

 <layout>
 <adminhtml_certinfo_index>
    <reference name="content">
        <block type="CertWizard/adminhtml_certinfo" name="certinfo" />
    </reference>
</adminhtml_certinfo_index>
</layout>

Like you said i added a node with prefixing adminhtml_ in addition i refer to the correct block. When i debug everything is fine and block is also called without problems. Certainly i'm getting no gridview. Why?

Once again I've debugged the part where the the controller loads the layout and put the method

        var_dump(Mage::getSingleton('core/layout')->getUpdate()->getHandles());
    die();

after loadLayout().

The result was

    array (size=4)
  0 => string 'default' (length=7)
  1 => string 'STORE_admin' (length=11)
  2 => string 'THEME_adminhtml_default_MAG100207_MobileStore/' (length=46)
  3 => string 'adminhtml_certinfo_index' (length=24)

But still I can't find the bug.


texts: Display "VAT Shifted" in the invoice PDF

texts:
On the invoice PDF I need to display a message when VAT is shifted.

In the file app/code/local/Mage/Sales/Model/Order/Pdf/Abstract.php I want to use a variable $vatShifted, that is true or false, and then display the message "VAT shifted" if true.

First thought might be to base this on customer group. That won't work however. I'm using the Pillwax EuVAT module, and based on a valid VAT number for foreign EU customers, it can set the VAT to 0% for customers that do not create or use an account. These customers are assigned to the customer group NOT LOGGED IN, and that group is used for customers that pay tax as well.

I guess the only option is to see if the VAT paid is zero or not. (Better solutions are welcome!) This can be per order item with the message displayed next to the item in the PDF. An easier solution will be to use the total VAT value. VAT will be shifted for all items or for none, and I don't foresee a situation where this will change.

How can I get the total vat value to define $vatShifted?


texts: How to get best selling product with its image by object manager in magento2 .phtml file?

texts: How to get best selling product with its image by object manager in magento2 .phtml file ???


texts: 401 Unauthorized for accessing customer api

texts:
I was able to get the admin token using the below url against the created admin user
http://username:password@localhost.com/index.php/rest/V1/integration/admin/token

The username and password is for browser authentication which you can see before the url which is defined in .htaccess and .htpassword. The original username and password is given in the body

{
"username":"admin",
"password":"admin123"
}

But when I get customers by passing the token it says 401 unauthorized.
Below is the request

http://username:password@localhost.com/index.php/rest/V1/customers
and token is passed as "Authorization: Bearer abcdefghi" in request header

How to fix this issue?


texts: Which of these functions can I disable in PHP.ini? What does Magento2 use?

texts:
I'm attempting to lock down my server and I'd like to disable some high risk functions (listed below).

Would someone be able to definitively tell me which ones Magento 2.1.* needs to work correctly so I can disable the rest?

system, exec, shell_exec, passthru, phpinfo, show_source, popen, proc_open, fopen_with_path, dbmopen, dbase_open, putenv, move_uploaded_file, chdir, mkdir, rmdir, chmod, rename, filepro, filepro_rowcount, filepro_retrieve, posix_mkfifo, ini_set


texts: magento 2 : add custom button to admin grid row

texts:
I want to add a custom button to the action column of my rows in the admin grid.

i realise it must be added via extending Columns:

namespace Custom\Example\Ui\Component\Listing\Columns;

class EventActions extends Column
{

public function prepareDataSource(array $dataSource)
    {

        if (isset($dataSource['data']['items'])) {
            $storeId = $this->context->getFilterParam('store_id');

            foreach ($dataSource['data']['items'] as &$item) {
                $item[$this->getData('name')]['edit'] = [
                    'href' => $this->urlBuilder->getUrl(
                        'custom/example/edit',
                        ['id' => $item['id'], 'store' => $storeId]
                    ),
                    'label' => __('Add Available Date'),
                    'hidden' => false,
                ];
            }
        }

        return $dataSource;
    }
}

I am however not sure how to add HTML to the above method.

i tried this from this source  but it did not work:

public function prepareDataSource(array $dataSource)
    {
        if (isset($dataSource['data']['items'])) {
            $fieldName = $this->getData('name');
            foreach ($dataSource['data']['items'] as & $item) {
                $item[$fieldName . '_html'] = "<button class='button'>Send Mail</button>";
                $item[$fieldName . '_title'] = __('Please enter a message that you want to send to customer');
                $item[$fieldName . '_submitlabel'] = __('Send');
                $item[$fieldName . '_cancellabel'] = __('Reset');
                $item[$fieldName . '_customerid'] = $item['calender_id'];

                $item[$fieldName . '_formaction'] = $this->urlBuilder->getUrl('custom/example/edit');
            }
        }

        return $dataSource;
    }

UPDATE -- THE SOLUTION.

thanks to @mohit Rane for this elegant solution.

 public function prepareDataSource(array $dataSource) {

        if (isset($dataSource['data']['items'])) {
            $storeId = $this->context->getFilterParam('store_id');

            foreach ($dataSource['data']['items'] as &$item) {
                $name = $this->getData('name');
                $http = $this->urlBuilder->getUrl(
                        'custom/example/edit', ['id' => $item['id'], 'store' => $storeId]
                );

                $item[$name] = html_entity_decode("<button>Edit</button>");
            }
        }

        return $dataSource;
    }


texts: Get the quote/order ID that the user checked out?

texts:
I need to get the actual order id that the customer is using creating an order.
Tried with this that works fine, but returns me the previous order id, I need to get the actual one:
    $last_order_increment_id = Mage::getModel("sales/order")->getCollection()->getLastItem()->getIncrementId();


texts: Retrieve product and product stock from salable products of ALL stores (like in backend)

texts:
We want to retrieve all products and their stock using a script. This is the code we run. But this shows only the products of the store domain (url) that we use to request the file.

question: How can we remove the (automatic) store filter? and retrieve all the products of the magento installations (just like catalog products overview in backend?

Mage::app();

$data = Mage::getModel('catalog/product')->getCollection()
                    ->addFieldToFilter('visibility', Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH)
                    ->addAttributeToFilter('status', 1)
                    ->addAttributeToSelect('name')
                    ->addAttributeToSelect('type_id')
                    ->addAttributeToSelect('sku')
                    ->addAttributeToSelect('manufacturer')
                    ->addAttributeToSelect('cost')
                    ->addAttributeToSelect('price')
                    ->addAttributeToSelect('stock_status');


texts: I am trying to design a custom home page. How to create a custom header in Magento 2.


texts:
What is the solution to add markup for product URL or even home page url? I tried many combinations calling product url, specifying url directly... Still Google structured data tool does not recognize it.

This is what I'm using for other fields like Description and Sku and it works fine according to Google structured data tool.

<?php
 $_product = $this->getProduct() ?>
 <div style="display:none !important">
   <meta itemprop="description" content="<?php echo $this-
      >escapeHtml($_product->getShortDescription()); ?>">

    <meta itemprop="SKU" content="<?php echo $_product->getSku(); ?>">
  </div>


texts:
When I call to controller first time showing my data on page after some seconds data not showing on page. page is showing blank.

Controller

public function execute()
{
    $itemid = $this->getRequest()->getParam('itemid');
    $this->_coreRegistry->register('itemid', $itemid);
    $resultPage = $this->_resultPageFactory->create();
    return $resultPage;
    //$this->_redirect('csr/index/find');
}

After some time $itemid not getting me.


texts:
Does someone know how do I get the id of an email by name set on backend? I have an email created in backend in transactional emails that I want to send it programatically, but the id of it may differ depending on the instance that I'm on (local, live, stage), and I can only provide the same name for it.
I have this:

Mage::getModel('core/email_template')->sendTransactional(
$templateId,
$sender,
$recepientEmail,
$recepientName,
$vars,
$store);

And I need to find out $templateId and I only know that I saved the mail with name "Tests".


texts: how to show Color button Options in Product Category Listings page M1

texts: How to show different Color button Options configure Product Category Listings page M1


texts: How to check if customer is already subscribed to newsletter

texts:
I need to check if the customer is subscribed to news letter or not. Currently I am using this code and it is returning nothing:

if (Mage::getSingleton('customer/session')->isLoggedIn()) {
    $status = Mage::getSingleton('customer/session')->getCustomer()->getIsSubscribed();
    echo $status;
    die();
}

This is not giving anything. Any idea how to get this to work?


texts: Adding Structure Blocks and Content Blocks

texts:
How do I create a structure block next to my logo for pictures and a big picture underneath the Navigation menu and a block to display a text "featured products"?  I know how to do it if I made the site from scratch but unfortunately, my client decided he wanted me to use a Magento template and then customize it to the point that it wasn't a magento template anymore.

Picture here:


texts: Magento customer collection order by firstname

texts:
My required result is customer collection sort by firstname (ascending and descending order)

The Query
--------
$collection = Mage::getModel('customer/customer')->getCollection();
 $collection->addAttributeToSelect('userid')->addAttributeToSelect('firstname')->addAttributeToSelect('lastname')->addAttributeToSelect('profile_image')->addAttributeToSelect('specialist')->addAttributeToSelect('latitude')->addAttributeToSelect('free_consult')->addAttributeToSelect('longitude')->addAttributeToFilter('group_id',Federallawyer_Customer_Helper_Data::LAWYER);
$collection->getSelect()->order("e.firstname ASC")

But its show an error "Unknown column 'e.firstname' in 'order clause'"


texts: Estimate shipping methods by address id Error REST API : Magento 2

texts:
I am trying to call this magento 2 built in API :

  POST  http://domain.com/rest/V1/carts/mine/estimate-shipping-methods-by-address-id

In Body :

{"addressId": 194}

But I got this error:

{
    "message": "No such entity with %fieldName = %fieldValue",
    "parameters": {
        "fieldName": "addressId",
        "fieldValue": 194
    }
}

Can any body help ?


texts: Magento 2: get Logo URL for a specific store in controller

texts:
I just started developing a module in Magento 2. It is a copy of a module I made in Magento 1.

I'm already stuck with Magento 2 logic.

I want to get the logo URL of every store view.

In Magento 1 I went like this :

Mage::getDesign()->getSkinUrl(Mage::getStoreConfig('design/header/logo_src', $storeId));

with $storeId being a specific store view ID.

I can't find a way to do it in Magento 2. Actually I have this.

$om = \Magento\Framework\App\ObjectManager::getInstance();
$logo=$om->get('Magento\Theme\Block\Html\Header\Logo');
$logoUrl=$logo->getLogoSrc();

But it only gives me one Url and I don't see how to inject the store Id in the process to have the other.

I guess that I have to change some Global Value which define the store but I can't find How.

I have found similar questions but answers don't apply to my case because I'm in a Controller so it's only back end.

If someone got an idea. I would be really thankful.


texts: How to add jquery dependency to jquery.zoom for porto theme js under app/design

texts:
The website Magento is 2.1.7. We built a customised theme based on Porto theme.
Now our frontend product page has an exception:

pub/static/frontend/vendor/theme-name/en_AU/Magento_Catalog/js/jquery.zoom.min.js:23
Uncaught TypeError: Cannot set property 'zoom' of undefined

The code at line 23 is:

$.zoom = function(target, source, img, magnify) { ...

I think the exception is due to jquery.zoom is loaded before jquery so that $ is undefined. So I think I should find or create a requirejs-config file somewhere to create this dependency.

My question is: How to cite jquery.zoom.min.js in requirejs-config.js correctly? The location of jquery.zoom is

design/frontend/Smartwave/porto/Magento_catalog/jquery.zoom.min.js

I tried to call it Magento_Catalog/js/jquery.zoom.min in requirejs-config.js, but it seems requirejs cannot locate the file. Here is how I did exactly:

I add the dependency in design/frontend/vendor/theme-name/requirejs-config.js, the file is like:

var config = {
shim: {
    jquery: {
        exports: '$'
    },
    'Smartwave_Megamenu/js/sw_megamenu':
        {
            deps: ['jquery']
        }, ...

I tried to add jquery.zoom dependency here like:

        'Magento_Catalog/js/jquery.zoom.min':
        {
            deps: ['jquery']
        },

I call it Magento_Catalog/js/jquery.zoom.min because I found the deployed jquery.zoom.min.js is at

pub/static/frontend/vendor/theme-name/en_AU/Magento_Catalog/js/jquery.zoom.min.js

Then in the merged requirejs-config.js at

pub/static/_requirejs/frontend/vendor/theme-name/en_US/requirejs-config.js

I can see the dependency has been created successfully, but the exception is still there so I guess magento cannot find jquery.zoom.min.js file by Magento_Catalog/js/jquery.zoom.min. So what should I call/cite it in requirejs-config.js?

Can anyone help? Thanks.


texts: In my Magento 1.9 site, I have made a category page to redirect to the product page. I have category A and it contains a product B. Now when from menu link if one clicks on category A name, it will be redirected to product B. Here, the problem is, it is showing that product B has multiple canonical URLs. I am failing to understand, why this is happening and a way to solve it.


texts: The difference of "remove product links" in the cart and minicart (rwd theme)

texts:
Looking at the remove product links I found two different below codes:

In .../checkout/cart/item/default.phtml

<a href="<?php echo $this->getDeleteUrl() ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Remove Item')) ?>" class="btn-remove btn-remove2"><?php echo $this->__('Remove Item') ?>

In .../checkout/cart/minicart/default.phtml

<a href="<?php echo $this->getAjaxDeleteUrl() ?>"
    title="<?php echo Mage::helper('core')->quoteEscape($this->__('Remove This Item')) ?>"
    data-confirm="<?php echo $this->__('Are you sure you would like to remove this item from the shopping cart?') ?>"
    class="remove">
     <?php echo $this->__('Remove Item') ?>

Considering the below error log we have, I'm wondering if the minicart's remove link can be the same as cart once?

a:5:{i:0;s:16:"Invalid form key";i:1;s:912:"#0 /Installtion path/app/code/local/Mage/Checkout/controllers/CartController.php(616): Mage::throwException('Invalid form ke...')
#1 /Installtion path/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Checkout_CartController->ajaxDeleteAction()
#2 /Installtion path/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('ajaxDelete')
#3 /Installtion path/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#4 /Installtion path/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#5 /Installtion path/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#6 /Installtion path/index.php(83): Mage::run('mystore', 'store')
#7 {main}";s:3:"url";s:138:"/checkout/cart/ajaxDelete/id/455909/uenc/aHR0cDovL3d3dy5kaWdpc2hvcC5maS9rb3RpLXZhcGFhLWFpa2EvdHlva2FsdXQvdHlva2FsdWplbi1ha3V0Lmh0bWw_cD0y/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:11:"mystore";}


texts: Good practice: how to save many objects?

texts:
I have a question regarding a good practice: how to correctly save many objects?

Let's assume I modified many entities in a collection, let's say a collection of Products. This is what I could do:

...

foreach($productCollection as $product{
    $this->productRepository->save($product);
}

...

However using the method save() in a loop is not only a bad practice but also highlighted by PHP CS. Of course, if the collection only contains 4 or 5 products it won't change the face of the world, but sometimes it is clearly most than that.

I know that if I only modify an attribute, I don't need to use the repository and can use the built-in Magento component to update attributes, however sometimes I also need to do some logic and really need the product entity.

So anyone has a good practice to share in this context?


texts: Beginner Query - Magento Theme Not Falling Back?

texts:
I'm attempting to build a custom package and theme using the Magento guide at: magento.com/sites/default/files/MagentoDesignGuide.pdf

One of the fundamental points it makes at the beginning is that if any of the files are missing, Magento will always fall back to the default files.

I made a new package folder named newpackage against app/design/frontend and the same against skin/frontend and added "default" as sub-directories (also added template, layout, css, js etc. to relevant folders as advised):

So this is all I have, a few empty folders ready to play with. When I changed the Current Package Name against my store view, it seems to have broken the theme:

Could anybody please let me know why my package isn't falling back to the default files when it realises that the templates/css etc. is missing? As this looks nothing like it did before I enabled this package. Thank you so much for your time.


texts:
I'm following this:
How to securely upgrade from 1.6.x to 1.9.3.1

Trying to upgrade and old Magento install (1.6.2) to 1.9.3.10 I got:

  Fatal error: Uncaught Error: [] operator not supported for strings in
      D:\laragon31\www\mage19310\app\code\core\Mage\Usa\sql\usa_setup\upgrade-1.6.0.1-1.6.0.2.php:93

Stack trace:
#0 D:\laragon31\www\mage19310\app\code\core\Mage\Core\Model\Resource\Setup.php(624):

  include()
      #1 D:\laragon31\www\mage19310\app\code\core\Mage\Core\Model\Resource\Setup.php(437):
  Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade',
  '1.6.0.1', '1.6.0.3')
      #2 D:\laragon31\www\mage19310\app\code\core\Mage\Core\Model\Resource\Setup.php(320):
  Mage_Core_Model_Resource_Setup->_upgradeResourceDb('1.6.0.1',
  '1.6.0.3')
      #3 D:\laragon31\www\mage19310\app\code\core\Mage\Core\Model\Resource\Setup.php(235):
  Mage_Core_Model_Resource_Setup->applyUpdates()
      #4 D:\laragon31\www\mage19310\app\code\core\Mage\Core\Model\App.php(428):
  Mage_Core_Model_Resource_Setup::applyAllUpdates()
      #5 D:\laragon31\www\mage19310\app\code\core\Mage\Core\Model\App.php(354):
  Mage_Core_Model_App->_initModules()
      #6 D:\laragon31\www\mage19310\app\Mage.php(683): Mage_Core_Model_App->ru in
  D:\laragon31\www\mage19310\app\code\core\Mage\Usa\sql\usa_setup\upgrade-1.6.0.1-1.6.0.2.php
  on line 93

What is a correct upgrade path? Thanks.


texts:
I created a website through hostgator, but I am having problems using the magento sample data to the hostgator website. It would be a nice sample template to get me through everything and the rest I could customize.

If you could help me that would be really nice and I would really appreciate it. Thanks.


texts: Please anyone help me on this. I want to remove the top link from navigation menu, i found the solution but it removes only parent link, i want tp remove specific link from menu I.e. if users click on it they won't be directed to anywhere.


texts: Trying To Get All Product Sku's in Selected Category

texts:
I'm trying to set up a form in an external that will give me all Sku's of configurable or simple products in a category entered by the user. Instead, I'm ending up with a list of all products in the store, so my filter doesn't seem to be working:

<?php

function getProductSkus(){
    if(isset($_POST['submit'])){
        $categoryId = $_POST['categoryId'];
        $productType = $_POST['productType'];
        require_once('../app/Mage.php');
        Mage::app();
        $category = Mage::getModel('catalog/category')->load($categoryId);
        if($category){
            $productList = Mage::getResourceModel('catalog/product_collection')
                ->addAttributeToSelect('*')
                ->addAttributeToFilter('type_id', $productType)
                ->addCategoryFilter($category)
            foreach($productList as $product){
                echo $product->getName() . "
";
            }
        }
    }
}
?>

<form action="getproducts.php" method="post">

Category ID: <input name="categoryId" type="text" />

Product Type: <select name="productType">
    <option value="configurable">Configurable</option>
    <option value="simple">Simple</options>

<input type="submit" name="submit" value="Submit" />

</form>
<?php getProductSkus(); ?>

Can anyone tell me what I'm doing wrong here? I'm essentially following the method here, but using load() after the category filter doesn't seem to have any effect:

https://stackoverflow.com/questions/29124232/magento-get-all-products-in-the-current-category

I've also used the prepareProductCollection method here with the same results:

https://stackoverflow.com/questions/14318488/magento-get-all-products-in-a-certain-category-ordered-by-the-position-field


texts: How to override Checkout sidebar and set custom customer attribute in it with address()?

texts:
I have created Custom attribute for Customer and override sidebar and Add Static Label but how to add my custom attribute value in its address() ?

I have not added that attribute as customer_address entity i've added it as customer entity only.


texts: How do you add New Product to Existing Category using Admin Panel? For example, I know how to add the product and image, but now that the product is added, how or where do you set the new product to "existing category" using admin panel? Can you please point me to where this is in manual, or if there's a link to step-by-step how-to?


texts:
I'm trying to remove page title added from Magento\Downloadable\Controller\Customer\Products::Execute

public function execute()
    {
        $this->_view->loadLayout();
        if ($block = $this->_view->getLayout()->getBlock('downloadable_customer_products_list')) {
            $block->setRefererUrl($this->_redirect->getRefererUrl());
        }
        $this->_view->getPage()->getConfig()->getTitle()->set(__('My Downloadable Products'));
        $this->_view->renderLayout();
    }

I've tried to add below piece of code into catalog_product_view_type_downlodable.xml but nothing seems to be working.

<referenceBlock name="page.main.title" remove="true" />

Any ideas ?!