texts: Magento 2.3 Type Error occurred when creating object: Magecomp\Imageclean\Model\ResourceModel\Imageclean\Grid\Collection\Interceptor

texts:
I am using under given module.
https://magecomp.com/magento-2-image-clean.html

Till Magento 2.3.1 it's working perfectly.
After upgrade to 2.3.2 it giving under given error:

  Type Error occurred when creating object:
  Magecomp\Imageclean\Model\ResourceModel\Imageclean\Grid\Collection\Interceptor

Please Guide me to solve this.

  File:Magecomp\Imageclean\Model\ResourceModel\Imageclean\Grid\Collection.php

<?php
namespace Magecomp\Imageclean\Model\ResourceModel\Imageclean\Grid;

use Magento\Framework\Api\Search\SearchResultInterface;
use Magento\Framework\Search\AggregationInterface;
use Magento\Framework\App\Config\ScopeConfigInterface;
use Magento\Store\Model\ScopeInterface;

class Collection extends \Magecomp\Imageclean\Model\ResourceModel\Imageclean\Collection implements SearchResultInterface
{
    protected $aggregations;
    /**
     * @var ScopeConfigInterface
     */
    protected $scopeConfig;
    protected $curstoreid;

    public function __construct(
        \Magento\Framework\Data\Collection\EntityFactoryInterface $entityFactory,
        \Psr\Log\LoggerInterface $logger,
        \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
        \Magento\Framework\Event\ManagerInterface $eventManager,
        \Magento\Store\Model\StoreManagerInterface $storeManager,
        ScopeConfigInterface $configScopeConfigInterface,
        \Magento\Framework\App\Request\Http $request,
        $mainTable,
        $eventPrefix,
        $eventObject,
        $resourceModel,
        $model = 'Magento\Framework\View\Element\UiComponent\DataProvider\Document',
        $connection = null,
        \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource = null
    ) {
        parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
        $this->_eventPrefix = $eventPrefix;
        $this->_eventObject = $eventObject;
        $this->_init($model, $resourceModel);
        $this->setMainTable($mainTable);
    }

    public function getAggregations()
    {
        return $this->aggregations;
    }

    public function setAggregations($aggregations)
    {
        $this->aggregations = $aggregations;
    }

    public function getAllIds($limit = null, $offset = null)
    {
        return $this->getConnection()->fetchCol($this->_getAllIdsSelect($limit, $offset), $this->_bindParams);
    }

    public function getSearchCriteria()
    {
        return null;
    }

    public function setSearchCriteria(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria = null)
    {
        return $this;
    }

    public function getTotalCount()
    {
        return $this->getSize();
    }

    public function setTotalCount($totalCount)
    {
        return $this;
    }

    public function setItems(array $items = null)
    {
        return $this;
    }
}


texts: Magento 2 How to over write route FrontName of a module?

texts:
I'm trying to extend Magento 2 default module Magente_Contact, but I can't change the frontName, I tried to put in the di.xml, but nothing happens.

<config>
    <router id="standart">
        <route id="contact" frontName="contato">
            <module name="[VENDOR]_Contact" />
        </route>
    </router>
</config>

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
  <preference for="Magento\Contact\etc\frontend\routes" type="{Vendor}\{Module}\etc\front\routes" />
</config>


texts: $product->getFinalPrice() and $product->isSaleable() are very slow when called from a product collection

texts:
Loading around 400 products without using $product->getFinalPrice() and $product->isSaleable() usually takes around 2 seconds. When calling them, however, the load times shoot up to around 12 seconds.

Here's the code I'm using:

$collection = Mage::getModel('catalog/product')->getCollection();
$expandedCollection = array();

    foreach ($collection as $product) {
        $price = $product->getPrice();
        $specialPrice = $product->getFinalPrice();

        $expandedCollection[] = array(
            'product_id' => $product->getId(),
            'sku'        => $product->getSku(),
            'name'       => $product->getName(),
            'price'      => $price,
            'specialprice'   => $specialPrice ,
            'visibility' => $product->getVisibility(),
            'short_description' => $product->getShortDescription(),
            'description' => $product->getDescription(),
            'eshopping_enabled' => (((int)$product->getStatus()) == 1 ? true : false),
            'in_stock' => (bool) $product->isSaleable() ,
            'category_ids' => $product->getCategoryIds(),
            'thumbnail_url' => $product->getThumbnailUrl()
        );
    }

I assume this is caused because both these functions load the product stocks..

Is there any way to optimize the load times? Different server configuration, etc..


texts: How can I set an explicit cookie domain and still login

texts:
I am setting explicit cookie domain in the config, as my Magento site is on www.mydomain.com and I want to share cookies with a subdomain sub.mydomain.com.

If I leave Magento to set its default cookie domain it will use .www.mydomain.com, which will not share with sub.mydomain.com, so I am setting a manual cookie domain to .mydomain,com (path: "web/cookie/cookie_domain", scope: "default", value: ".mydomain.com").

However, I then get the age-old problem of not being able to log into admin or frontend. I put in my username and password but I do not even get an error back - I'm just returned to the login page.

The conventional Magento wisdom is to clear cookies and make sure that you don't have a manual cookie domain set... except that I need a manual cookie domain set.

The domain of the cookie stored is correct as ".mydomain.com" and it is being shared as expected with the sub-domain. But I can't login. What am I doing wrong?


texts: Source config field of form ui component

texts:
This is field form category_form.xml file:

    <field name="store_id">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="dataType" xsi:type="string">number</item>
                <item name="formElement" xsi:type="string">hidden</item>
                <item name="source" xsi:type="string">category</item>
            </item>
        </argument>
    </field>

What does this line bellow mean:

<item name="source" xsi:type="string">category</item>


texts: Magento 2: Why my products aren't showing in Catalog Search?

texts:
A fairly fresh installation of Magento 2.1.7. 1.9.3.x database migrated over. Everything was working fine, the search worked, until sometime today when it just stopped. The last thing I remember doing was adding the first new product into the Default attribute set (whereas all the other products use migrated_normal_product attribute set. Soon after doing that, search stopped working entirely.

It doesn't find anything, not with SKU, not with the product name. I've tried reindexing and clearing the cache, but to no avail.

Advanced Search can find the products just fine, but not the regular one.


texts: how to implement Loader widget in magento2

texts:
I want to implement loader widget in magento 2,
In my form i have placed one button

    <button style="" class="scalable go" type="submit" id="button1">Do some action</button>

When i click this button i want to call url (frontName/Controller/Action). While this action performing i want to show loader widget.


texts: how to remove particluar javascript in comparision page on magento

texts:
I need to remove particular JavaScript from Footer in comparison page in Magento, because its getting appearance issue

<script type="text/javascript">
(function(d){
var app = d.createElement('script');
app.type = 'text/javascript';
app.async = true;
var pt = ('https:' == document.location.protocol ? 'https://' : 'http://');
app.src = pt + 'www.speakpipe.com/loader/7ke3tuki7asftw30o770pky260kt5jpu.js';
var s = d.getElementsByTagName('script')[0]; s.parentNode.insertBefore(app, s);
})(document);
</script>


texts: Magento 1.9 webp images rewrite htaccess

texts:
I can't figure out why my htaccess won't rewrite urls to webp images, only images that are on skin directory get served as webp.

https://domain/skin/frontend/theme/test/images/image.png will be served as webp image from
https://domain/skin/frontend/theme/test/images/image.webp

If it is a wysiwyg image in /media/wysiwyg/ directory it won't be serverd as webp..

https://domain/media/wysiwyg/pags/images/en_image02_2x.jpg however exactly as skins directory there is webp image with same file name....

<IfModule mod_rewrite.c>
   RewriteEngine On
   RewriteCond %{HTTP_ACCEPT} image/webp
   RewriteCond %{REQUEST_URI} (?i)(.*)(\.jpe?g|\.png)$
   RewriteCond %{DOCUMENT_ROOT}/$1.webp -f
   RewriteRule (.+)\.(jpe?g|png)$ $1.webp [L,T=image/webp,R]
</IfModule>

<IfModule mod_headers.c>
     Header append Vary Accept env=REDIRECT_accept
</IfModule>

<IfModule mod_mime.c>
     AddType image/webp .webp
 </IfModule>


texts: How to avoid 'Fatal error for class not found' while running php bin/magento setup:di:compile command

texts:
I have created a Payment Gateway plugin for Magento. The PSP is Payrexx.
This  Payment Module extension is created on Magento 2. Within the modules, we have used the external third party PHP library.
For Manual installation, we are running the following command

 php bin/magento module:enable Payrexx_PaymentGateway
 php bin/magento setup:upgrade

But the issue is:

" php bin/magento setup:di:compile "
While running this command we are getting fatal error for class not found, though this command is absolutely necessary to run  our modules.


texts: Page comes up blank. Clear cache, refresh, still blank

texts:
I am building out a new page. I have tried cache:clean, removing the files from var cache/generation/page_cache myself and setup:upgrade. Still shows up blank. I am getting an error in my XML file that 'Element referenceContainer is not allowed here' and 'Can not resolve symbol referenceBlock'. I am lost!
Any help would be great!

edit: I also have page cache disable in the admin system.
Using PHPstorm 2017.1

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

    <referenceblock template="content.phtml"
                    class="Blank\HelloWorld\Block\Main"
                    name="blank_helloWorld" />

</referenceContainer>

I also have a content.phtml page

<h1> Hello </h1>


texts: Magento 1.9 authorize.net issue after update PATCH_SUPEE-11085

texts:
I have updated the PATCH_SUPEE-11085_CE_1.14.4.0_v1-2019-02-28-05-21-55.sh with zero error. After I tried to pay with credit card showing the below.

Gateway error: The merchant login ID or password is invalid or the account is inactive.

I checked the gateway URL, Payment Update URL. Also, I tried the DPM method the same error occurred.

Now, The Authorized.net payment process not working on my site. Please help me to fix this.


texts: Issue with reindex in magento 1.9.1.0 having lots of products and tons of traffic

texts:
How do you handle a large site with tons of traffic and tons of SKUs? The main point here is that running indexes in Magento is a huge weight on the server; especially when you have hundreds of concurrent users.

How is a business supposed to run indexes without disrupting the site? I'm looking for input from the warriors who have fought the battles and conquered big business. How do you do it?

Has anyone done anything "interesting" to overcome this?


texts: Magento 2 : How to debug knockoutjs getRegion() bindings

texts:
Shipping address is displayed using below knockout js code.
I am having a hard time finding the back-end code that's setting data for getRegion('ship-to') function even though I could see the UI JS template component configuration. Does anyone have any input on how this data is being pulled on the payment/review page in Magento 2.x?

<!-- ko foreach: getRegion('ship-to') -->
    <!-- ko template: getTemplate() -->
    <!--/ko-->
<!--/ko-->


texts:
I need a product image popup on my Magento website.

So I see this extension https://marketplace.magento.com/swissup-tm-easylightbox.html  and installed it. But it is not working.

I want product image popup like this. How can I get a popup like this?

which code i need to write in template/catalog/product/view/media.phtml


texts:
How can I integrate the frontend and backend parts?
how to give arguments to block and how to take it from the template?
Is there any good material?
thanks


texts: Magento1.9 : My block is not calling in shell script

texts:
My block is not calling in shell script.

<?php
ini_set('display_errors', 1);
require_once 'abstract.php';
class Mage_Shell_ReportMail extends Mage_Shell_Abstract{
    public function run(){
        Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
        echo Mage::app()->getLayout()->createBlock('adminhtml/template')->setTemplate('salesreport.phtml')->toHtml();
    }
}

$shell = new Mage_Shell_ReportMail();
$shell->run();

?>


texts: How to add multiple pages in invoice pdf?

texts:
I am generating an invoice of order. when the order is big means it has a lot of different items in it. It shrinks the text inside the invoice. I want to make it go on two pages or more if the order is big.

These are the template settings given to my template

Can anyone help me regarding how to add multiple pages or add any option like that there which can allow multiple pages to invoice.


texts:
I'm trying to update my robots.txt file for magento installed in a folder public_html/shop/.

I've updated my robots.txt and .htaccess file based on solutions provided on below post:
Google Ignore's Magento's robots.txt

However from testing on Google Webmaster all files seem to open and none is getting blocked by the robots.txt file. By some hit and trail method I've reached a conclusion that it's not working because my Magento is installed in a folder rather than root. Below are examples of my testing:

Fail: Disallow: /app/ - Allowed (doesn't work)
Pass: Disallow: /shop/app/ - Blocked (works)

However for all Disallows I cannot prefix /shop as some disallows are within some folders. I know I can somehow use * or / and the robots.txt will work but not sure how to use it correctly.


texts: Magento 2 create order programmatically with product custom options having multiple values

texts:
I am trying to create a magento 2 order programmatically with product custom options. I have created an associative array to pass the product id with qty and option array as label with value, But it give me Error related with specified request.

Help please


texts:
I have a bunch of attributes I would like to make configurations based on ( like weight, as well as voltage and etc.). I have created Attributes in Store--> Products and also have assigned those Attributes to Store-->Attribute Sets.

Now I also need to have those options in my configuration panel. How am I able to do it?


texts: Is there a way to programmatically add search results to the search page?

texts:
I want to programmatically add some search results, and maybe do a bit more with the text that the user searches. Is this possible? Where would I inject my code?

edit: I found a somewhat similar question whose answer was to use the Mage_CatalogSearch_Model_Resource_Fulltext_Collection class, but the question was about magento 1 and I can't find the class anywhere in magento 2.


texts: How to display Sale label on configurable product

texts:
I am not able to display SALE labels on configurable products.

I am able to display NEW when I set a product as new for a certain period of time, however when I have a special price on a product I am not able to display the SALE label.

I am using Magento 2.3.2. Is there anything I can do? I saw that there is this issue already reported here Magento 2 configurable products issue but as I understood I should not be able to set a product as NEW as well.

Hopefully, someone can assist with this further.

Thanks


texts: Disable ajax completely in admin order grid - Magento 2.4.1

texts:
Is there a possibility to disable ajax on the admin order grid page?
This to improve the loading speed.
The page itself loads quote fast (within 1 second), but to complete the ajax that takes for 200 results 3 seconds. We do not benefit directly from ajax on that page, therefore we want to disable this.


texts: Magento 2: Best time to update product price and stock

texts:
I create a module for updating price and stock for product from csv file from the frontend. Here is my code :

Block :

public function getLoadProduct($id)
{
    return $product = $this->productRepository->getById($id, true);
}

public function changePriceById($csv){
    for ($i=0; $i < count($csv); $i++) {
        $product=$this->getLoadProduct($csv[$i][0]);
        $product->setPrice($csv[$i][1]);

        $product->setStockData(['qty' => $csv[$i][2], 'is_in_stock' => 1]);
        $product->setQuantityAndStockStatus(['qty' => $csv[$i][2], 'is_in_stock' => 1]);
        $product->save();
    }
}

phtml:

$product = $this->changePriceById($csv3);

It's works for me each i reload the page, but what is the best time to update the product price and stock?

Is it each time product get called to the page?

Because it's need much time to update hundred till thousand of product. And one more thing, is it ok to place the code to block and not to a controller?


texts: Paypal express checkout redirects to cart instead of Paypal Website

texts:
I have an strange issue in my magento application, When I say "Proced Chackout" after filling customer information, and selecting payment method as Paypal Express.

It redirects to cart, It should redirect to Paypal website.

The paypal log contains following error in responce.

    [response] => Array
        (
            [TIMESTAMP] => 2014-07-21T14:35:13Z
            [CORRELATIONID] => 35903468d6947
            [ACK] => Failure
            [VERSION] => 72.0
            [BUILD] => 11843215
            [L_ERRORCODE0] => 10412
            [L_SHORTMESSAGE0] => Duplicate invoice
            [L_LONGMESSAGE0] => Payment has already been made for this InvoiceID.
            [L_SEVERITYCODE0] => Error
        )

    [__pid] => 29910
)


texts: magento add custom dropdown like country and their stated

texts:
i want to add custom ajax drop down with values depending on its parent dropdown. like when country us is selected all states of us gets populated.

can i use that same login to create custom ajax mapping between two attributes ,

any way i can do this via module ??.

or use any built in feature of magento ?...please help


texts: Magento2 default captcha validation use in footer newsletter

texts: In footer newsletter how to use default captcha validation in Magento 2 if anyone know please reply me here form inside shows captcha image  so i can't  justify it.


texts:
I'm working on my e-commerce website and I have some trouble with the Header.

Can someone tell me please How to remove account button and replace with simple account|login links?


texts: Create CSV list of all products & their categories

texts:
can somebody suggest me a way or a script to export a csv file with all product SKUs & the categories those SKUs are associated to?

I've tried several things... but nothing seems to work. Magento's product export isn't working for me.. It gives me errors.

I've tried the Aten's script [source code] but it prints the
categories in json format..
so i've also tried this:

define('MAGENTO', realpath(dirname(__FILE__)));
require_once MAGENTO . '/app/Mage.php';
Mage::app();

$category = Mage::getModel('catalog/category')->load($categoryId);

$ids = $category->getCollection()->getAllIds();

if ($ids) {
    $file = "var/import/catwithid.csv";
    file_put_contents($file,"category_ids, sku" . "\n");
    foreach ( $ids as $id ) {
      $string = $id . ', ' . $category->load($id) . "\n";
        file_put_contents($file, $string, FILE_APPEND);
    }
}

and this

define('MAGENTOROOT', realpath(dirname(__FILE__)));
require_once(MAGENTOROOT.'/app/Mage.php');
umask(0);
Mage::app('default');

$products = Mage::getModel("catalog/product")->getCollection();
$products->addAttributeToFilter('status', 1);
$products->addAttributeToFilter('visibility', 4);
$products->load();

$fp = fopen('exports.csv', 'w');
$csvHeader = array("sku", "category_ids");
fputcsv( $fp, $csvHeader, $delimiter = ", ");

foreach( $products as $_product ) {
$sku = $_product->getData('sku');
$product = $_product->load($sku);
$product_row = array($sku);
fputcsv( $fp, $product_row, $delimiter = ", ");
}

I've also tried to merge them together but with no luck! :/

please help me!!


texts: magento 2 migrating from local to live site. what is the host setting

texts:
i am migrating from my localhost to a live site. My question is, in the setting within the :

  app\etc\env.php

what is the setting for 'host' . on the localhost the setting is localhost. but what about on a live site?

'db' => [
        'table_prefix' => '',
        'connection' => [
            'default' => [
                'host' => 'localhost',
                'dbname' => 'mydatabase',
                'username' => 'mydatabase',
                'password' => 'WWWWWNmpqkOv#JU0*',
                'active' => '1'
            ]
        ]
    ],


texts: What does this PHP line mean: 'is_in_stock' => $itemColourSizeFlat->getQuantityAvailable() > 0 ? 1 : 0,

texts:
I need help understanding this line of code and ultimately converting it to one that solves the problem I am facing.

'is_in_stock' => $itemColourSizeFlat->getQuantityAvailable() > 0 ? 1 : 0,

It is an extract from my inventory update process.
The problem I have is when I sync my inventory with my external system, products with qty <1 are marked "out of stock". This is a problem because some products have a backorder status of "allow backorders". If the status is allow backorders (or allow backorders and notify customer) I want the stock status to remain "in stock".

for context, this line of code sites together with these lines:

/**
     * Prepare data for simple products.
     *
     * @param $itemColourSizeFlat
     * @param string $mode
     * @return mixed
     */
    protected function _prepareDataSimple ($itemColourSizeFlat, $mode = self::MODE_CREATE)
    {
        $preparedAttributes                 = $this->_prepareData($itemColourSizeFlat);
        $preparedAttributes                 = $this->_prepareDataSimpleFinalPrice($itemColourSizeFlat, $preparedAttributes);
        $preparedAttributes['type_id']      = Mage_Catalog_Model_Product_Type::TYPE_SIMPLE;
        $preparedAttributes['stock_data']   = array(
            'is_in_stock' => $itemColourSizeFlat->getQuantityAvailable() > 0 ? 1 : 0,
            'qty' => $itemColourSizeFlat->getQuantityAvailable(),
        );

    foreach ($this->_simpleProductNameUniqueness as $attribute => $originalAttribute)
    {
        if (!array_key_exists($attribute, $preparedAttributes))
        {
            continue;
        }

        // @TODO FIX THIS usingaccumulated data per product group..
        $preparedAttributes['name'] = $preparedAttributes['name'] .
            ' ' .
            $preparedAttributes[$attribute.self::LABEL_DATA_APPEND];
    }</code>

Background. I'm not a developer and my dev is not contactable today. I really need to fix this, so I'm trying to teach myself PHP today to do so. It is very hard so far! Any help would be very much appreciated


texts: Add an image to a product description in 1.8.1

texts: I wish to add a "Certified Organic" logo to the Product Description of some products but not all. If I try to add an image tag to the description it does not stick. Is there another way of doing this by maybe creating an attribute that is turned on/off per product. If on the image is shown on the product page, and if off the image is not shown?


texts: Problem with Reindex Data Category Products SQLSTATE[23000]

texts:
After adding some products to the magento , I'm now getting this error when i try to reindex "category products" :

There was a problem with reindexing process. SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`domain_shop`.`catalog_category_product_index`, CONSTRAINT `catalog_category_product_index_ibfk_3` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CAS)

I've searched for answers here , and I tried some queries in phpmyadmin , but none of them worked .
Also , I don't have access to SSH of my website .   Control panel is DirectAdmin.
Any helps would be appreciated.


texts: How can I debug layout file processing in Magento 2?

texts:
According to magento 2 theme specification about Layout files processing :

  The Magento application processes layout files in the following order:

  1/ Collects all layout files from modules. The order is determined by the
  modules order in the module list from app/etc/config.php.

  2./ Determines
  the sequence of inherited themes [, ...,
  ]

  3./ Iterates the sequence of themes from
  last ancestor to current:

  a.    Adds all extending theme layout files to the list.

  b.    Replaces overridden layout files in the list.

  4./ Merges all layout files from the list.

How can I debug and view the layout file for every step of this process ?


texts: Magento : Replace Discontinued Product with New Product

texts:
I making observer, that detects when someone reorders a discontinued product and should replace that product with a new product.

My question is: How do I retrieve a product object with a specific SKU? For example I want to retrieve the product with the SKU D1105 and add that to the cart using $observer->getEvent()->setProduct( $myDD1105Product );.

I need to know, how to retrieve a product with the SKU D1105 and add it to the cart. Any advice would be greatly appreciated.

<?php
class MHT_Reorder_Model_Observer
{

    public function onReorder(Varien_Event_Observer $observer)
    {
        $event = $observer->getEvent();
        $product = $event->getProduct();

        $replacementSku = 'D1105';
        $blackListSKUs = ['D1100', 'D1101'];

        foreach ($blackListSKUs as $blacklistSku) {
            // if product SKU does not equal $blacklistSku: continue iterating
            if (strcasecmp($product->getSku(), $blacklistSku) != 0)
                continue;

            // How do I get the product from Mage/database that has the sku D1105?
            $event->setProduct()
            break;
        }
    }
}


texts:
I've been stuck with this for few day's now and can't understand why the category image is not retrieved by magento.

I've added this page_header.phtml to the template/page/html folder with the following html:

    <?php
    $_helper    = Mage::helper('catalog/output');
    $_category  = Mage::registry('current_category');
    $_imgUrl = $_category->getImageUrl()
?>
<?php
    if (!$_imgUrl){
?>

<?php
    }
?>
<div class="bgback" style="<?php if($_imgUrl): ?>background-image: url(<?php echo $_imgUrl; ?>);<?php endif; ?>">

            <?php echo $this->getChildHtml("breadcrumbs"); ?>

<?php echo $_helper->categoryAttribute($_category, $_category->getName(), 'name') ?>

Then went to the local.xml and added this:

    <catalog_category_view>
    <reference name="top.container">
        <block type="core/template" name="page.header" template="page/html/page_header.phtml">
            <block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>
        </block>
    </reference>
</catalog_category_view>

It show's up correctly on the category pages, but the issue is that the image is not being displayed and I can't figure out why.

The folder's on the server media and var has 777 permisions. The image is uploaded in the backend. Did I forget something?

Thanks guys,


texts: sales emails copy are sent multiple times

texts:
I am using Magento 1.9.1.0 .

In the backend I set up four different recipients to receive sales copy email every time a customer makes an order. The problem is that every recipient I inserted in the backend receive the same copy email multiple time.

Anyone has experienced this problem before?


texts:
Got warning from server regarding Disk space getting full.

After checking into file manager I found 17.2 GB of file size in session folder.

When looked into var/session folder, I can see unusual size ranging from 400 MB to 2.5 GB and years of these files as 2031, 1987, 1970, 1990.

Is it normal to have session files with size 2GB and greater?

Even unable to delete these unusual session files (Response:   550 Could not delete sess_2fjtnha6k4be02r2p1ofdh1qt4: Invalid argument)

Any suggestions?


texts: Rewrite Mage_Eav_Model_Entity_Attribute_Frontend_Default results in unable to find

texts:
I'm trying to rewrite a class, although it gives an error in Mage_Eav_Model_Entity_Attribute_Abstract telling me the class Namespace_FormValidator_Model_Eav_Entity_Attribute_Frontend_Default does not exist in Mage_Core_Model_Config:1349

Cache has been cleaned.

I'm rewriting class Mage_Eav_Model_Entity_Attribute_Frontend_Default as followes:

<global>
    <models>
        <eav>
           <rewrite>
               <entity_attribute_frontend_default>
                 Namespace_FormValidator_Model_Eav_Entity_Attribute_Frontend_Default
               </entity_attribute_frontend_default>
            </rewrite>
        </eav>
    </models>
</global>

And add the file in
app/code/local/Namespace/FormValidator/Model/Eav/Entity/Attribute/Frontend/Default.php

class Namespace_FormValidator_Model_Eav_Entity_Attribute_Frontend_Default extends Mage_Eav_Model_Entity_Attribute_Frontend_Default
{

}


texts: Unable to override Fulltext\Collection in module etc/di.xml

texts:
Preconditions

Magento 2.1.1
Using Ubuntu/trusty64 vagrant-box, php7, apache

Steps to reproduce

Add a new custom module
Update etc/di.xml in your custom module

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
   <preference for="Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection" type="Sanimarkt\App\Model\ResourceModel\Fulltext\Collection" />
</config>

Add new Collection.php file and override _renderFiltersBefore() method

namespace Sanimarkt\App\Model\ResourceModel\Fulltext;
class Collection extends \Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection
{
  protected function _renderFiltersBefore()
  {
    die('stopping here')
  }
}

clear cache
Make a search request

Expected result

The search request should stop and show 'stopping here' on the screen

Actual result

Nothing happens the custom class

Sanimarkt\App\Model\ResourceModel\Fulltext\Collection.php is not executed.


texts:
Vendor/Work/Plugin/ShippingInformationManagementPlugin.php

<?php

namespace Vendor\Work\Plugin;

class ShippingInformationManagementPlugin
{

    const XML_PATH_EMAIL_RECIPIENT = 'contact/email/recipient_email';

    protected $_transportBuilder;

    /**
     * @var \Magento\Framework\Translate\Inline\StateInterface
     */
    protected $inlineTranslation;

    /**
     * @var \Magento\Framework\App\Config\ScopeConfigInterface
     */
    protected $scopeConfig;

    /**
     * @var \Magento\Store\Model\StoreManagerInterface
     */
    protected $storeManager;

    /**
     * @var \Magento\Framework\Escaper
     */
    protected $_escaper;
    protected $quoteRepository;

    public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Magento\Quote\Model\QuoteRepository $quoteRepository
    ) {
        $this->quoteRepository = $quoteRepository;
    }

    public function beforeSaveAddressInformation(
        \Magento\Checkout\Model\ShippingInformationManagement $subject,
        $cartId,
        \Magento\Checkout\Api\Data\ShippingInformationInterface $addressInformation
    ) {
        echo '<pre>';print_r("hie");die();
        $request_body = file_get_contents('php://input');
        $delivery_details = json_decode($request_body, true);
        $quote = $this->quoteRepository->getActive($cartId);

        $shipping_date = null;
        if (isset($delivery_details['shipping_latlng']['shipping_date'])) {
            $shipping_date = $delivery_details['shipping_latlng']['shipping_date'];
        }
        $quote->setShippingLat($shipping_date);
        $quote->save();
    }
}

Vendor/Work/etc/di.xml

<type name="Magento\Checkout\Model\ShippingInformationManagement">
    <plugin name="save-delivery-details" type="Vendor\Work\Plugin\ShippingInformationManagementPlugin" sortOrder="10"/>
</type>


texts: Upgrading Magento From Version 1.6.2 to 1.7

texts:
Im currently running 1.6.2 now for about a year, this is from day one introductory into magento, so over the year I have gained more knowledge with magento, and I would like to move over to new versions and also update when available.

From what I understand, dont touch core, but I can update everything, what im concerned about is the database though.

So for instance I have a base 1.6.2 install with the live database (copied). And I would like to just add the 1.7 files into the directory and overwrite where nessecary. I guess what im asking is, does the database change on versions?


texts:
Is it possible to add the category ids of a product into the html class of the product item itself? For example: let's say I do have 3 categories, catID: 20, ID: 21 and ID: 22. For each product I would like to see the specified cat IDs into the classes of the product in the product grid (or product list).

So my html would look something like this:

            ...

            ...

My main goal is to edit the css by product category. I do know how to edit a template for a category page, but that is not what I want.


texts: Use attribute in cart - not showing although added to config.xml

texts:
I have a custom attribute that I want to use in the cart to show some specific output text. That's usually pretty easy, just add it to the config.xml

<global>
        <sales>
            <quote>
                <item>
                    <product_attributes>
                        <jr_brand />
                        <jr_preorderable />
                    </product_attributes>
                </item>
            </quote>
        </sales>
</global>

The first attribute was already there when I took over the project. It works fine. I added the second one. It doesn't show up. I can do a var_dump on the product, it is not there.

Does anyone know a configuration on the attributes, that could make a difference on whether these usually pretty simple lines work or not? Btw, no cache problem. If I delete the first one, it is gone in the var_dump immediately.


texts: New development store - Sorry, no quotes are available for this order at this time

texts: I"m getting the above error in a newly locally configured 'testing' store i've set up.  Is there anything in the admin I can change to effectively bypass (or turn all addresses to available) this issue?


texts: Error when I click on edit customer in the admin panel

texts:
Manage Customers throwing customer activation errors:

Source model customeractivation/resource_attribute_source_customeractivation not found for attribute customer_activated


texts: Magento 1.9 - Replace template files by store ID

texts:
Let's say i want to use different template files on storeID 3.

The modules frontend folder is: checkout

If the storeID is equal to 3 I want Magento to use customcheckout instead.

Is there a way of achieving this, without rewriting or copying the whole module from app/code and renaming all the things?

I have been looking at layout handles and i got it to render both layouts, yet i could not remove the original "checkout" files.


texts: How to make the manufacturer attribute applicable to configurable product in Magento 2.2?

texts:
I would like the manufacturer attribute to apply to configurable products as well, not only simple products. Because right now in my module calling getAttributeText("manufacturer") returns nothing for configurable products because the manufacturer is set on the simple product level and cannot be set on the configurable product level.

Is it possible to set this somehow?


texts: How to get Product Custom attribute Using REST API in magento2.3.4

texts:
Hello I call the below API to get Product information
Url: URL: http://localhost/magentosample230/rest/V1/products/24-MB04
Type: GET
I got the Follow out put:
{
        "attribute_code": "material",
        "value": "5459,5460,5463,5465"
    }

But i want following output:
{
        "attribute_code": "material",
        "value": "Canvas,Cotton,Mesh,Polyester"
    }

Please help me i try all solution of other stackexchange answer but not working in magento2.3.4
If someone help me its helpful


texts: How to apply "if" condition to XML generation file

texts:
I have a Magento 1.7 Community plataform, connected to an ERP (Bling). We have a file that take all those php information and send as an invoice to Bling.

In our products, we have a field named "gtin", that in the most cases are null/empty. Perhaps, when the invoice are sent to the ERP, the value are changed to 0. This "0" information is the big problem, because with this, we have to open invoice by invoice and delete this number 0 to be able to generate the invoice correctly.

In the code on the bottom, please note the line "gtin". My objective is to simply insert a "IF" condition, like:

  if ("gtin" == 0) {"gtin" = null/empty }

If the php logic was more "simple", i could be able to make it work, perhaps it's a php code wich i believe is specific for Magento. Here it is:

private function _addItens()
{

    $this->_xml["itens"] = array();
    $this->_xml["itens"]["item"] = array();

    $cont=0;
    foreach ($this->_orderModel->getItemsCollection() as $itemId => $item) {

        $_product = Mage::getModel('catalog/product')->load( $item->product_id );
                    /*if(!$this->checkProductAttributesRequired($_product)){
            throw new Exception("O produto no pedido ".$this->_orderModel->getIncrementId().", selecionado para emissão de Nf-e não possui os atributos requeridos");
        }*/
        if ( $_product->getResource()->getAttribute( Lema21_Nfe_Model_TransformToXML::ATTR_CODIGO_ORIGEM )->getFrontend()->getValue( $_product )){
            $res = $_product->getResource()->getAttribute( Lema21_Nfe_Model_TransformToXML::ATTR_CODIGO_ORIGEM )->getFrontend()->getValue( $_product );
        }

        $this->_xml["itens"]["item"][$cont] =
            array(
                "codigo" => $item->getSku(),
                "descricao" => $_product->getData(Lema21_Nfe_Model_TransformToXML::ATTR_OPERATION_NAME),
                "un"    => $_product->getData(Lema21_Nfe_Model_TransformToXML::ATTR_OPERATION_UNIT),
                "qtde"  => $item->getData("qty_ordered"),
                "vlr_unit" => $item->getPrice(),
                "tipo" => self::PRODUCT_OR_SERVICE,
                "peso_bruto" => $item->getWeight(),
                "peso_liq"  => $item->getWeight(),
                "class_fiscal" => $_product->getData(Lema21_Nfe_Model_TransformToXML::ATTR_CODIGO_NCM),
                "origem"    => $_product->getData( Lema21_Nfe_Model_TransformToXML::ATTR_CODIGO_ORIGEM ),
                "gtin" => $_product->getData(Lema21_Nfe_Model_TransformToXML::ATTR_CODIGO_GTIN),
                "gtinEmbalagem" => $_product->getData(Lema21_Nfe_Model_TransformToXML::ATTR_CODIGO_GTIN_EMBALAGEM)
            );

        $cont++;
    }

    return $this;
}

So, i wish someone could give me a light at this. Thanks a lot!


texts: getQty() giving fatal error in magento 1.9

texts:
I am trying to get the collection based on product and quote Id

    $quotecollection = Mage::getModel('sales/quote_item')->getCollection()->addFieldToFilter('quote_id',$quoteId)->addFieldToFilter('product_id',$product_id);

   $quotecollectionaArr =  $quotecollection->getData();
    echo $quotecollection->getQty();

Gave me the following error

  Fatal error: Call to undefined method
  Mage_Sales_Model_Resource_Quote_Item_Collection::getQty() in
  C:\xampp\htdocs.... Please help.


texts:
I have an extension to replace the default Magento search, but I have always this message no product results. On the previous Magento version was work fine, after upgrade is not work anymore.

I add in this function  public function prepareProductCollection($collection) this code before return:

Mage::log($collection->getSelectSQL(1), false, 'search.log', true);
Mage::log((array)Mage::getConfig()->getNode()->global->models->catalogsearch, false, 'search.log', true);

to see what search return but I don't know how to read the exact issue.

Here is the results for search.log

2016-11-28T14:19:17+00:00 EMERG (): SELECT DISTINCT `e`.*, MAX(  ((product_name.value LIKE '%test%')*1 + (product_name.value RLIKE '[[:<:]]tests[[:>:]]') + (product_name.value LIKE '%test%')*1 + (bss_index.tag LIKE '%test%')*1 + (bss_index.categories LIKE '%test%')*1 + (`e`.sku LIKE '%test%')*1 + (`e`.sku = 'test')*1 + 0) + search_result.relevance  ) AS `relevance`, `price_index`.`price`, `price_index`.`tax_class_id`, `price_index`.`final_price`, IF(price_index.tier_price IS NOT NULL, LEAST(price_index.min_price, price_index.tier_price), price_index.min_price) AS `minimal_price`, `price_index`.`min_price`, `price_index`.`max_price`, `price_index`.`tier_price`, `cat_index`.`position` AS `cat_index_position` FROM `catalog_product_entity` AS `e`
 INNER JOIN `catalogsearch_result` AS `search_result` ON search_result.product_id=e.entity_id AND search_result.query_id='1'
 LEFT JOIN `catalog_product_entity_varchar` AS `product_name` ON product_name.entity_id=e.entity_id AND product_name.attribute_id = '71'
 LEFT JOIN `bss_index` ON bss_index.product_id = e.entity_id
 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_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(3, 4) AND cat_index.category_id = '2' GROUP BY `e`.`entity_id`
2016-11-28T14:19:17+00:00 EMERG (): Array
(
    [class] => Mage_CatalogSearch_Model
    [resourceModel] => catalogsearch_resource
    [rewrite] => Mage_Core_Model_Config_Element Object
        (
            [fulltext] => TBT_Bss_Model_CatalogSearch_Fulltext
        )

)

What I need to do or there is something that I can check?

Thank you


texts: What to do in order to allow hyperinflationary currencies? (How to increase decimals limit)

texts:
We have to allow in our multi-currency site currency that's very hyperinflationary. Base price for products are set in USD but We have some products shown in VEF that are very close to Magento 2 maximum limit of 99,999,999.99 and not even to mention the orders totals.

We tried to make some changes in the Database but We noticed this is not enough. It seems somewhere there's some limit in code and probably something turning tables back to 12,4 decimals once you reindex in Magento.

Can someone help?


texts: Would like create a relationship between 2 simple products (parent/child) when add to cart?

texts:
I would like create a simple product (warranty) optional for customer choose when Add to cart, for example TV (parent product) can purchase 2 extra years warranty (child product). And I use quote_item.parent_item_id for related two simple product.

Function (implement)
1. Customer can see TV and Warranty product on cart/checkout flow.
2. When Customer delete the TV then the related warranty will be deleted, if more than one TV/Notedbook product on cart.

The problem....
1. I can use plugin to facilitate the relationship by add parent product ID on quote_item.parent_item_id, and facilitate deleted (child product) but the warranty product can't show on cart because the system look warranty product as configurable product.

Any suggestion? I need create new field on quote_item table and enhance delete item (parent/child) function? if yes, where to cart delete function code to follow up?


texts: Magento 2.1.9 checkout page getting error in console network

texts:
I am using wegbshop Matrix shipping method after login customer group I am facing this issue in checkout page when place order

{message: "Please specify a shipping method.",…}
message: "Please specify a shipping method."
trace: "
#0 /home/apps2/public_html/vendor/magento/framework/Interception/Interceptor.php(146): Magento\Checkout\Model\PaymentInformationManagement->savePaymentInformationAndPlaceOrder(18811, Object(Magento\Quote\Model\Quote\Payment), Object(Magento\Quote\Model\Quote\Address))
#1 /home/apps2/public_html/var/generation/Magento/Checkout/Model/PaymentInformationManagement/Interceptor.php(26): Magento\Checkout\Model\PaymentInformationManagement\Interceptor->___callPlugins('savePaymentInfo...', Array, Array)
#2 [internal function]: Magento\Checkout\Model\PaymentInformationManagement\Interceptor->savePaymentInformationAndPlaceOrder(18811, Object(Magento\Quote\Model\Quote\Payment), Object(Magento\Quote\Model\Quote\Address))
#3 /home/apps2/public_html/vendor/magento/module-webapi/Controller/Rest.php(307): call_user_func_array(Array, Array)
#4 /home/apps2/public_html/vendor/magento/module-webapi/Controller/Rest.php(216): Magento\Webapi\Controller\Rest->processApiRequest()
#5 /home/apps2/public_html/var/generation/Magento/Webapi/Controller/Rest/Interceptor.php(37): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
#6 /home/apps2/public_html/vendor/magento/framework/App/Http.php(135): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#7 /home/apps2/public_html/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#8 /home/apps2/public_html/index.php(40): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#9 {main}"


texts:
Can anyone explain what is a source Model in Magento.

various time it was asked by interviewer ...but it was confusing for me...can any body explain.....
I need to know deeply about source model.. in Magento and its task.....
I know about resource model which is responsible for collection and model for basic logic...but source model I don not know.....pls help


texts: Magento 2 - Translations : how does js-translation.json get populated? Mine is empty!

texts:
Community Version 2.1.3.

Locale is set to en_GB (English United Kingdom). Using Luma theme.

I have my en_GB.csv translation file set up and my translation is in there:

"You have no items in your shopping cart.","You have no items in your shopping basket!"

When I go to the basket page (it's empty) I can see my translation fine! However when I hover over the minicart the overlay does not translate. It continues to say "You have no items in your shopping cart.".

I understand that I need a pub/static/frontend/[Theme]/default/en_GB/js-translation.json file with the translation in there too. But when I try a static deploy "bin/magento setup:static-content:deploy en_GB" it creates the file but it's empty.

I also believe there's a var/view_preprocessed/source/frontend/[Theme]/default/en_GB/js-translation.json too.

So what do I need to clear or flush or whatever to get this file populated?

Do I need to do something with a language pack maybe?

Thanks
Tadhg


texts:
I have the following code in a custom block that is referenced in my three column layout. To get the category banner to show at the very top of each category page.

<?php
$_helper    = $this->helper('catalog/output');
$_category  = $this->getCurrentCategory();
$_imgHtml   = '';
if ($_imgUrl = $_category->getImageUrl()) {
    $_imgHtml = '
escapeHtml($_category->getName()).'" title="'.$this->escapeHtml($_category->getName()).'" />
';
    $_imgHtml = $_helper->categoryAttribute($_category, $_imgHtml, 'image');
}
?>

<?php if($_imgUrl): ?>
<?php echo $_imgHtml ?>
<?php endif; ?>

However I get a fatal call to object error, can anyone help? I've tried a simple echo hello to test there's nothing wrong with the block. So there's some issue with the code above. Thank you.

Here's the error..

  fatal error: Call to a member function getImageUrl() on a non-object
  in
  /home/website/public_html/app/design/frontend/mytheme/default/template/custom/category/top_banner.phtml
  on line 5


texts: Tab in show Customer information Grid in Custom module for Magento 2.1.x

texts:
Tab in show Customer information Grid in Custom module for Magento2.1.4

How to do???


texts: Correct Deployment Steps in a Production server

texts:
Recently, we have gone live a website which was built in Magento 2.3.1. After release we did some changes in the code and also added some modules locally. Then the code was pushed to the live server and executed the following commands on the terminal :

sudo git stash
sudo git stash clear
git checkout development
git pull origin development
sudo php bin/magento maintenance:enable
touch maintenance.enable
sudo chmod -R 777 var/ generated
sudo rm -rf var/ generated
sudo php bin/magento cache:flush
sudo php bin/magento setup:upgrade
sudo php bin/magento setup:di:compile
sudo php bin/magento setup:static-content:deploy
sudo chmod -R 777 var/ generated/ app/ pub/
sudo rm -rf maintenance.enable
sudo php bin/magento maintenance:disable
sudo rm -rf maintenance.html
sudo chmod -R 777 var/ generated/ app/ pub/

After one hour, there were issues in placing the order, adding subscriptions etc. On analysis we find that there were no permission for the var folder. we gave the permission and all issues were fixed.

I dont know why this happened as we already gave the permission after the deployment commands.

Can someone help me resolve this or tell me the CORRECT steps to be followed in a production server which deploying new changes???


texts: debug.log file is empty in Magento 2.2.x

texts: After upgrading a site from Magento 2.1.x to 2.2.3, log output is no longer being written to var/log/debug.log. There was nothing in the 2.2.0 change log about this behavior.


texts: User redirected to a really bad URL after logging into Magento-based site with Safari on Mac OSX & iOS

texts:
I really don't know what to call this. It seems only to happen on both Mac OSX and iOS with Safari. It doesn't seem to affect Chrome even though they are both Webkit-based.

I'm working on a B2B project where we are using Magento as the primary development framework. Linking to the site, the user must log on to do anything. I've been primarily developing on a Windows machine then pushing the code to a LEMP machine. I encounter no problems with any browser on Windows or Android.

On a Mac with Safari I link to the site. The page displays as expected. I enter my correct credentials and click on the login button. I receive a message that the server cannot be found. When I look at the address bar, I see this strangeness:

://://:///?SID=m4sc01d4rgptruhv3jf4efari4

Yes, that is the URL the system wants to redirect to.

I've also seen "localhost" on iOS. I don't have localhost anywhere in the (non-database) configuration that I can find in a global search of the source code.

I did some searching looking for anything related to that broken URL and all I found were some references to turning off the SID. I did that just to see what happens, and now I receive this URL:

://://:///

I've only seen this with Safari on Mac OSX or iOS.

Edit: Reloading / Relinking to the original site URL loads the site as if I were redirected there after log in.


texts: Inventory reindex runs catalog price reindex also

texts:
Magento version: 2.3.1

When I run inventory reindex from command line it first runs inventory reindex and then price reindex after that.

Here is the command I executed:

bin/magento indexer:reindex inventory

Output on console:

Inventory index has been rebuilt successfully in 00:00:40
Product Price index has been rebuilt successfully in 00:08:10
Catalog Search index has been rebuilt successfully in 00:25:01

As you can see from console output, price and catalog search reindex also executed.

How can I prevent running price reindex automatically? I want just inventory reindex.


texts: How to Debug Shopping Cart Pricing Rule Error?

texts:
Shopping Cart Price Rule - By using ZIP Code and Subtotal - Free shipping Not Working

Shipping Method : Webshop Matrix Rate

I am applied Shopping Cart Price Rule using zipcode,

May I know where I did the error?

Error Log:

2018-10-03T10:47:02+00:00 ERR (3): Warning: include(): Failed opening 'Mage/Displayfreeprice/Model/Freeprice.php' for inclusion (include_path='/home/abc/public_html/app/code/local:/home/abc/public_html/app/code/community:/home/abc/public_html/app/code/core:/home/abc/public_html/lib:.:/opt/cpanel/ea-php70/root/usr/share/pear')  in /home/abc/public_html/lib/Varien/Autoload.php on line 94


texts:
I have Android and IOs apps for my website and for promotion of my apps I added banners in website but I want some thing different.

When someone visits my website a pop-up appears and ask them to download app or they may continue without downloading same as if you visit Ask.fm website from mobile phone.

Any idea,tutorial or help will be highly appreciated.


texts: magento 2 dashboard contents are not working?

texts: magento 2 dashboard sidebar is not working???


texts: How can I confirm that the Reindexing Process is working?

texts:
I am running EE 1.14 and I am seeing more than a few errors in my products data that should be fixed upon reindexing. Since the errors persist, I am thinking that the reindex process is not working correctly. I tried running the indexer.php script from a command line and the whole process seems to run amazingly quick...essentially instantly. Each index reports that it has been reindexed in 00:00 and nothing changes....
Kind of a rambling question, but what I need is some way to confirm that the process is actually doing anything?


texts: Magento 2 how to create custom Field in checkout page

texts: How to create custom field on checkout Page in magento2?


texts:
I'm using custom block to show my module logo over each product, now since catalog_product_view tag it shows the logo at product details page only, the problem is that I want to show the icon on each page on each product, whether it is home page, product list, detail, etc. how to achieve this using blocks

Here is the code

Module Configuration (app\etc\modules\NS_Mymodule.xml)

<config>
    <modules>
        <NS_Mymodule>
            <active>true</active>
            <codePool>community</codePool>
        </NS_Mymodule>
    </modules>
</config>

Configuration XML (app\code\community\NS\Mymodule\etc\config.xml)

<config>
    <modules>
        <NS_Mymodule>
            <version>1.0.1</version>
        </NS_Mymodule>
    </modules>
    <global>
        <helpers>
            <Mymodule>
                <class>NS_Mymodule_Helper</class>
            </Mymodule>
        </helpers>
        <blocks>
            <mymodule>
                <class>NS_Mymodule_Block</class>
            </mymodule>
        </blocks>
    </global>
    <frontend>
        <layout>
            <updates>
                <mymodule>
                    <file>mymodule.xml</file>
                </mymodule>
            </updates>
        </layout>
    </frontend>
</config>

Block Class ( app\code\community\NS\Mymodule\Block\Showicon.php )

class Ns_Mymodule_Block_Showicon extends Mage_Core_Block_Template
{
    public function myfunction()
    {
        return "Hello tuts+ world";
    }
}

Layout XML ( app\design\frontend\rwd\default\layout\mymodule.xml)

<layout version="1.0.1">
    <catalog_product_view>
        <reference name="product.info">
            <block type="mymodule/showicon" as="ns_media" name="mymodule_showicon" template="mymodule/showicon.phtml" />
        </reference>
    </catalog_product_view>
</layout>

Template File (app\design\frontend\rwd\default\template\mymodule\showicon.phtml)

SHOW ICON HERE

and in the app\design\frontend\rwd\default\template\catalog\product\view.phtml

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

right after

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


texts:
below error facing when i try to reindex :

  {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"In
  Shingle TokenFilter the difference between max_shingle_size and
  min_shingle_size (and +1 if outputting unigrams) must be less than or
  equal to: [3] but was [9].  This limit can be set by changing the
  [index.max_shingle_diff] index level
  setting."}],"type":"illegal_argument_exception","reason":"In Shingle
  TokenFilter the difference between max_shingle_size and
  min_shingle_size  (and +1 if outputting unigrams) must be less than or
  equal to: [3] but was [9]. This limit can be set by changing the
  [index.max_shingle_diff] index level setting."},"status":400}

OS : ubuntu Magento 2.3.4


texts:
our magento has installed :

0 Step Checkout

http://www.magentocommerce.com/magento-connect/0-step-checkout.html

MSP Multi-Flat Shipping

http://www.magentocommerce.com/magento-connect/multi-flat-shipping.html

And we are using Paypal Express Checkout without Order Review Page, and Paypal would return us the shipping address after paying process is finished. And we only use the shipping address from paypal, so the Checkout page has no address textbox allows customer to type address.

Here is the setting of
Multi-Flat Shipping :
Created 4 x Flat Rate shipping method with "All Countries Allow" .
0 Step Checkout :
Didn't set default country as UK (let say)

And the problem is happened at Checkout.
For example If the customer finished paying at Paypal, and deliver to "USA". but the parameter at paypal log that says shipping address become "UK" (the default country at 0 Step Checkout).

I have checked the Paypal log, the Country code has been changed when Magento calling DoEC API, but the country still "USA" at SetEC and GetEC.

I have no idea where (the code) has changed the Country to "UK" from "USA".

Is there anyone can help me and tell the reason of causing this problem(i know it is about the request data, but i have no idea where can fix it.). and please kindly give me a suggestion that I should pursue or it is the nature of Paypal Express doing.


texts: Magento 2 : update the price value in shopping cart page

texts: How can we update the price value in shopping cart page for magento 2?


texts: Issue with Magento Host-Guest VirtualBox configuration - Exception : Warning: Cannot modify header information - headers already sent

texts:
I'm facing an issue with accessing Magento configured with VirtualBox on Windows host. I had freshly installed Magento 2 on Windows 10. I'm using a virtualBox with Ubunto as Guest on it, where I had installed Apache2 with PHP/ MYSQL. I had also moved the Magento2 Database on Ubuntu, (Just Magento folder is on Win 10) But when I access the store through browsers both in Windows & in Ubuntu, it shows following error:-

1 exception(s): Exception #0 (Exception): Warning: Cannot modify header information - headers already sent by (output started at /media/sf_Magento2_2/index.php:20) in /media/sf_Magento2_2/vendor/magento/framework/Stdlib/Cookie/PhpCookieManager.php on line 148 Exception #0 (Exception): Warning: Cannot modify header information - headers already sent by (output started at /media/sf_Magento2_2/index.php:20) in /media/sf_Magento2_2/vendor/magento/framework/Stdlib/Cookie/PhpCookieManager.php on line 148 #0 [internal function]: Magento\Framework\App\ErrorHandler->handler(2, 'Cannot modify h...', '/media/sf_Magen...', 148, Array) #1 /media/sf_Magento2_2/vendor/magento/framework/Stdlib/Cookie/PhpCookieManager.php(148): setcookie('store', 'default', 1548893731, '/Magento2_2/', '', false, true) #2 /media/sf_Magento2_2/vendor/magento/framework/Stdlib/Cookie/PhpCookieManager.php(121): Magento\Framework\Stdlib\Cookie\PhpCookieManager->setCookie('store', 'default', Array) #3 /media/sf_Magento2_2/vendor/magento/module-store/Model/StoreCookieManager.php(61): Magento\Framework\Stdlib\Cookie\PhpCookieManager->setPublicCookie('store', 'default', Object(Magento\Framework\Stdlib\Cookie\PublicCookieMetadata)) #4 /media/sf_Magento2_2/vendor/magento/module-store/Model/Plugin/StoreCookie.php(90): Magento\Store\Model\StoreCookieManager->setStoreCookie(Object(Magento\Store\Model\Store\Interceptor)) #5 /media/sf_Magento2_2/vendor/magento/framework/Interception/Interceptor.php(121): Magento\Store\Model\Plugin\StoreCookie->beforeDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Magento\Framework\App\Request\Http)) #6 /media/sf_Magento2_2/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(69): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http)) #7 /media/sf_Magento2_2/vendor/magento/framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) #8 /media/sf_Magento2_2/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http)) #9 /media/sf_Magento2_2/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array) #10 /media/sf_Magento2_2/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http)) #11 /media/sf_Magento2_2/generated/code/Magento/Framework/App/Http/Interceptor.php(24): Magento\Framework\App\Http->launch() #12 /media/sf_Magento2_2/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http\Interceptor->launch() #13 /media/sf_Magento2_2/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor)) #14 {main}

I can access via ftp, the files from both guest & host, so there is no problem with virtualBox configuration. Everything else is OK..

Previously, I had XAMPP (Apache, PHP) before with Magento 2 all installed on windows 10, and it worked fine. It's just with remote virtualBox configuration. I'm getting this issue. Not sure if I'm doing something wrong with configuration.

Any help would me much appreciated


texts: Lost products from the cart when you refresh the page: Magento 2

texts: When you go to checkout there is a product, but you only need to refresh the page or switch from checkout to any other page, then the goods will disappear, such a feeling that it removes it from the session, who faced this problem?


texts: Cron job not working in my live magento 2 website

texts:
Today I set the Cron job for every 2 Minutes, but it's not working. You can see my setup in Nexcess Siteworx panel image below.

I need to clear the debug.log and other files every 2 minutes. Is it the correct way or need to modify my rule.


texts:
We run a Magento 2.1.8 Shop with Amasty Geo IP Redirect Module.

Unfortunatly it is not working correctly with varnish.
Amasty wrote they know no working solution right now.
I looked up for other modules - all not working with Varnish right now.

Has anyone any Idea how to achieve this?

Our current state is, that the session parameters for the redirect module are not written and the user gets redirected everytime. So switching the store is not possible.

This is a serious problem for us. Disabling Varnish is no solution since the performance increase is neccessary.


texts: Magento 2: Alternative layout for bundle

texts:
I need two different layouts for bundles. For this I created an alternative page layout in the page_layout folder. I am able to access the page layout in the backend of the bundle what works like a charm.

Now I need to have an alternative XML-definition for the bundle-layout.

The original file is called:
catalog_product_view_type_bundle.xml

I would like to use an alternative, like:
catalog_product_view_type_bundle_alternative.xml

In this new file I would like to add f.e. a new body-class with:

<?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>
        <attribute name="class" value="konfigurator" />
...

But how do I get the connection between the page-layout-file and the bundle-layout. I guess it is really easy but I really do not know how to solve this.

To be clear: I would like to have 2 different layouts for bundle (like a/b test). These both layouts should have different classes, CSS- and JS-resources.

I would really appreciate some hints.


texts: Write log file on successful checkout from success.phtml magento 1.9

texts:
I want to write a custom log file which contains order and timestamp in the log file.

I tried Mage::log() but stops the file running afterwards and footer disappears.

Can anyone guide me in that?

Thank you


texts: Magento 1- Keep Handling fee on free shipping price rule

texts:
We currently offer Standard Shipping, which can bee set to "for free" on certain products by shopping cart price rule.
Now we want to offer an additional "priority shipping" with an extra fee.
Of course if the customer selects this we want to keep this fee, even when the shipping itself is free. With the default shopping cart price rules this doesn't seem to be possible.

How can we do this?

I was able to get the totals in the order correct by avoiding the "free shipping" option in the shopping cart price rules and working with discounts instead but then the shipping cost selection in the checkout isn't anymore which is bad for usability, it needs to look like this:

Standard Delivery - 0,00
Priority Shipping - 5,00

But it looks like this:

Standard Delivery - 15,00
Priority Shipping - 20,00

and then before Submitting the Order in the totals:

Some totals             123,45
Discount               -15,00
Shipping & Handling     20,00

I currently have no idea on how to solve this.
Easiest way would be if there's an extension that could do this.
But every kind of input is appreciated.


texts: Cannot Leave a Review about an Extension Installed at Magento Marketplace?

texts:
Yesterday, one of our customers said that she downloaded our extension on Magento Marketplace only to find that she cannot leave a review after finding our app really works. So she asks me for help.

However, I have no idea how this review process works either. Does anyone here know how to leave a review about one extension you installed at Magento Marketplace?

This is very important for me to know how we can make improvements to our extensions.


texts: catalog_product_view.xml is loading from vendor folder, instead of theme folder

texts:
I'm trying to remove the category title & category images from category view page. However, when i edit the catalog_product_view.xml from the (Infortis Ultimo) theme folder

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

it did not work, but when I edit the catalog_product_view.xml from the vendor folder

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

then it works.

I'm trying to get it done through the theme folder, how do i achieve it?

below is the code i need to add.

<referenceContainer name="columns.top">
    <referenceBlock name="page.main.title" remove="true" />
    <referenceBlock name="category.image" remove="true"/>
</referenceContainer>
<referenceContainer name="sidebar.additional" remove="true" />

Thanks!


texts: Unable to initialize external jQuery in Magento2

texts:
I would like to initialize intlTelInput for the country code column. I have done below,

in requirejs.config.js added below

var config = {
    deps: [
    "Ucs_Reson8/js/countryCode"
  ],
  paths: {
    'intlTelInput': 'Ucs_Reson8/js/intlTelInput',
  },
  shim: {
    'intlTelInput': {
      deps: ['jquery'],
      exports: 'jQuery.fn.intlTelInput',
    }
  }

};

Then in countryCode.js added below,

require([
'jquery',
'intlTelInput',
],
function($) {
        console.log('sample function 1234567');
        $(window).load(function() {
            jQuery("#country_code").intlTelInput({
                initialCountry: "ae",
                separateDialCode: true,
                preferredCountries: ["ae","bh","kw","om","qa","sa"],
                //onlyCountries: ["ae","bh","kw","om","qa","sa"],

            });
    });
    });

But I am getting the error as below in the browser console.

  TypeError: jQuery(...).intlTelInput is not a function

But in the page source I can see the utilsIntel.js

NOTE: Before trying any other solution, it would be better to check jquery and plugin version compatibility


texts:
I meet a problem with magento 1.9.2.3, an error message appears when I connect with my custom admin form.

I created a module and I duplicated the customer/account/login page for my users role.

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

my config.xml:

<?xml version="1.0"?>
<config>
    <global>
        <page>
            <layouts>
                <Custom_Page>
                    <label>User Login</label>
                    <template>page/user_login.phtml</template>
                </Custom_Page>
            </layouts>
        </page>
    </global>
</config>

No problem with old magento version.

But with 1.9.2.3: The Invalid Form Key. Please refresh the page appears.

  NOTE: If I replace the old Observer.php it's done:

www\app\code\core\Mage\Admin\Model\Observer.php

But I think it's not serious to replace the new Observer.php with the old.

  EDIT: My user_login.phtml contains an input form_key.

<form action="/admin" method="post" id="login-form">
    <input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>"/>

Thanks for your help.


texts: General question about validation in router

texts:
I have a news-module.

It got a Router.php.

At the moment, I validate in there, if theres an entry in DB for the URL it wants to rout to.
If yes -> got to my news_view.phtml -> if not -> 404

What I want to achieve is to transfer the already loaded collection to my view because I dont want to load it twice. Once for validation in Router and then to display Data in view.

I know bout parameters, but is it a good idea to transfer like 50 lines news-text over parameters?

May I miss something totally here :-/

May someone of you got completely different approach. I am open for everything! Thx in forward!


texts: Magento 2 - How can I increase the price of customizable options in bulk for a specific category?

texts:
I am on a Magento 2.3.4 website and need to increase the price of customizable options, in a specific category, in bulk, by 20%. The category has hundreds of products with many options, so manually editing each is not reasonable. The product price itself should stay the same, but each customizable option should increase.
I have access to a development environment and will test the solution there - in case you worry.
Thank you!


texts: Magento 2 - Improve Checkout Failure Error Messaging

texts:
I want to improve the error messaging on PayPal for customers who get an error when checking out. The problem is that many errors report the message An error occurred on the server. Please try to place the order again..

This is the message even if the response coming back from PayPal is "Transaction is declined.". That's a problem since the error is not accurate and doesn't give the customer the information they need. This message seems to pop up if my billing address doesn't match the card.

I'm seeing "Transaction is declined" when I output <?php echo $params['error_msg'];?>.  I realize that in Magento_Payment/templates/transparent/iframe.phtml I can edit this text or echo that error_msg.

So, my question: is it safe to replace An error occurred on the server. Please try to place the order again. with <?php echo $params['error_msg'];?>? I don't want the output of error_msg to be sensitive info from PayPal that the customer shouldn't see (like account ID ### has not paid their bill...lol).

Or am I better off replacing the text with something hardcoded like "There was an error with your card. Please make sure your credit card details are correct and your billing address matches the address on your card."?


texts: I need display in checkout/cart in cart totals shipping, now i created table rate file csv, make import in Shipping Methods, other method is disable and save, when i send products in cart, i see total amount without shipping price, how can I show the shipping price in the cart total?


texts: Update billing address inserts javascript string in the address

texts:
when I hit update the billing address during checkout I get this string from legacy-build.min.js inserted into the address:

  function e(F,E){var D=0;try{this._each(function(H){F.call(E,H,D++)})}catch(G){if(G!=$break){throw G}}return this}, function y(G,F,E){var D=-G,H=[],I=this.toArray();if(G<1){return I}while((D+=G)F?1:0}).pluck("value")}, function w(){return s.call(this,0)}, function z(){var E=Prototype.K,D=$A(arguments);if(Object.isFunction(D.last())){E=D.pop()}var F=[this].concat(D).map($A);return this.map(function(H,G){return E(F.pluck(G))})}, function p(){return this.length}, function z(){return"["+this.map(Object.inspect).join(", ")+"]"}, function reverse() { [native code] }, function forEach() { [native code] }, function r(){this.length=0;return this}, function f(){return this[0]}, function l(){return this[this.length-1]}, function o(){return this.select(function(B){return B!=null})}, function A(){return this.inject([],function(C,B){if(Object.isArray(B)){return C.concat(B.flatten())}C.push(B);return C})}, function n(){var B=s.call(arguments,0);return this.select(function(C){return !B.include(C)})}, function q(B){return this.inject([],function(E,D,C){if(0==C||(B?E.last()!=D:!E.include(D))){E.push(D)}return E})}, function v(B){return this.uniq().findAll(function(C){return B.detect(function(D){return C===D})})}, function w(){return s.call(this,0)}

Anyone has any idea how to fix this?

Thanks


texts: How do I exclude products with discount from coupon codes?

texts:
I need put a coupon code. But I don't need the products with any discount (catalog price rule). I want to make discount coupon only for products with normal price.
Is this even possible?


texts: Displaying custom attribute in dropdown when collection loaded different to default

texts:
On the product view page, we're displaying a dropdown of products that are available to the customer as a free gift for that particular product.

We're loading the collection so we can get these products using:-

<?php $productGift = Mage::getModel('catalog/product')->load($giftId); ?>

This is currently displaying the product name which we can get by:-

<?php echo $productGift->getName()?>

We've created a custom attribute to use instead of the product name, so we want to display this in the dropdown instead of the product name but we're unable to use _$item or $_product, it's not a custom attribute of the current product, it needs to get the custom attribute from all the products loaded by Mage::getModel('catalog/product')->load($giftId);.

I'm unsure how to fetch this data.

It would be something like:-

<select id="select_28" class="product-custom-option" title="" name="freeGiftId">
    <option value=""><?php echo $this->__('-- Please Select --')?></option>
    <?php foreach($freeGifts as $giftId): ?>
    <?php $productGift = Mage::getModel('catalog/product')->load($giftId); ?>
    <option value="<?php echo $productGift->getId()?>">
        <?php if ($productGift->getAttributeText('free_eliquid_product_name'); ?>
        <?php echo $productGift->getAttributeText('free_eliquid_product_name');?>
        <?php else: ?>
        <?php echo $productGift->getName()?>
    </option>
    <?php endforeach; ?>
</select>

(If free gift product has custom attribute set then display this otherwise display the product name). How can I get the custom attribute from $productGift? Thanks.

I've tried this...

<?php if ($productGift->getXyz()): ?>
    <?php echo $productGift->getXyz()?>
<?php else: ?>
    <?php echo $productGift->getName()?>

Should this be working? Because it doesn't...


texts: Failed address validation With Automatic Customer Group Assigment enabled

texts:
So again i am badly hit by Magento today.
I have enabled the "Automatic Assignment To Customer Group" for my VAT validation process to assign special customer group to those who has validated their VAT.
That part is working fine.
Now i have added the Paypal express checkout to Store, and trying to place an order but on order review page when i accept the Terms and conditions and select the shipping, now by hitting the button to place order it is giving me error with "Failed address validation".
So disabling the "Automatic Group Assignment" it is working fine, but as you see i required this option for my VAT thing so cant disable.
So I have also tried to disable Skip Order Review Step but still the error is there.
Now my question is how i can figure this out, and make both the things work?


texts: Is there a simple tutorial on how to change a color?

texts:
I know css and I come from a asp.net and mysql background but with all the Magento2 .less files and seemingly endless nested folders I can not figure out how to do what should be a very simple thing after two weeks and many tutorials.

I've done Alan's Hello World and it works, I've created a theme file and assigned it to my store, I've added our logo, I have shell access and mysql workbench connecting and can see everything, I have developer mode on so I can see the block names and module paths.

Please tell me how to change something simple like the color of the product title on the product details page.

I love the database and flexibility of M2 and am sure it will do whatever we want it to but how can I hope to use M2 if one little thing like a font color is so hard to change... I need to start making M2 look like our current site or we need to abandon M2 quickly. Extremely frustrated with the lack of online tutorials, admin area hints, and apparent unnecessary complexity.


texts: Magento2 - trying to update module template file not working

texts:
Template path hint is showing below given path for that file which i want to overwrite.

/home/tunersto/public_html/mysite.com/app/code/Nwdthemes/Revslider/view/frontend/templates/revslider.phtml

And i create below given directory & files in my current active theme.

/public_html/mysite.com/app/design/frontend/Etheme/yourstore/Nwdthemes_Revslider/template/revslider.phtml

but file did not get overwrited. Even i cleared cache and deploy static content. Let me know if i left something. i am quite new in magento2 world

Thank You in Advance.


texts: No possible add product to basket - still loading

texts: Before everything worked fine, but now when I try to add a product to the cart, the non-stop page is loading. Anyone know how to solve it?


texts:
How to download csv in my local system....?

controller.php

public function exportmeAction(){
      try{
        $products = Mage::getModel("catalog/product")->getCollection();
        $products->addAttributeToSelect('category_ids');
        $products->addAttributeToSelect('*');
        $products->addAttributeToFilter('status', 1);//optional for only enabled products
        $products->addAttributeToFilter('visibility', 4)
        ->joinField('qty',
                         'cataloginventory/stock_item',
                         'qty',
                         'product_id=entity_id',
                         '{{table}}.stock_id=1',
                         'left');;//optional for products only visible in catalog and search
        $fp = fopen('exports.csv', 'w');
        $csvHeader = array("Product Id","Product Name","Product Sku","Product Url", "Product Image Url","Category Ids","Description","Product Qty","Special Price", "Price");
        fputcsv( $fp, $csvHeader,",");
        foreach ($products as $product){
            echo $sku = $product->getSku();
            echo $name = $product->getName();
            echo $id = $product->getId();
            echo $url = $product->getProductUrl();
            echo $des = $product->getDescription();
            echo $splprice = (int)$product->getFinalPrice();
            echo $price = (int)$product->getPrice();
            echo $qty = (int)$product->getQty();
            echo $img = Mage::helper('catalog/image')->init($product, 'image');
            echo $categoryIds = implode('|', $product->getCategoryIds());//change the category separator if needed
            fputcsv($fp, array($id, $name, $sku, $url, $img,$categoryIds,$des,$qty,$splprice,$price), ",");
        }
        fclose($fp);
      }

       catch (Exception $e) {
            echo 'Error Message: '.$e->getMessage();
      }
      $this->_redirectReferer();
      Mage::getSingleton('core/session')->addSuccess("Done");
   }

phtml

<form class="my-form" name="myForm" id="customize" action="<?php echo $this->getUrl('productexport/index/exportme');?>" method="post">

<input type="submit" value="Customize" class="btn btn-default" />

</form>

i got this error

Cannot send headers; headers already sent in C:\xampp\htdocs\test\app\code\local\MPS\Productexport\controllers\IndexController.php, line 48

Also i want to download in my local system how to achieve this?


texts: How to disable a request for shipping information on a downloadable, virtual item

texts:
In Versions 2.0.7 to 2.1.9 CE, when a customer is logged in, and One-page checkout is enabled, and a free, downloadable item is in the cart by itself, when I click either the "Go To Checkout" or the "Proceed To Checkout" button, The "Review & Payments" page is shown next, and has required fields for the customer's name, address, and phone number.  The "Place Order" button is not functional until the required fields have data in them, of course.

Although it never says that these fileds are shipping information, that
appears to be what they are for, because when I press the qeustion mark next
to the "Phone Number" field, it shows "For delivery questions".

Since the person is already a customer with an account, and logged in, there simply isn't a need for shipping information for a downloadable item.

The free downloadable item was set up as a virtual item, then made downloadable, and "The item has no weight" is chosen.

I have tested many changes in the Admin to get around the request for extra customer information, but still no joy.

Perhaps there is a setting I don't know about.

Anyone know a way to turn this step off, or override it?

Thank you in advance.

I have included a screenshot below:


texts:
While it is possible to install Magento locally, I cannot seem to get Magento to actually set cookies in the Admin when logging in if I use the hostname localhost:8080.

Having worked with Magento for some time, I am aware of this limitation and the local modification to Mage_Core_Model_Session_Abstract_Varien, to modify this check:

 if (isset($cookieParams['domain'])) {
    $cookieParams['domain'] = $cookie->getDomain();
 }

To this:

 if (isset($cookieParams['domain']) && !in_array('127.0.0.1', self::getValidatorData())) {
    $cookieParams['domain'] = $cookie->getDomain();
 }

This works well for most local development environments. However, it does not work for Mac. I'm looking for an OSX-based solution.

I'm running PHP 5.4 webserver and this is for educational/experimentation only. In production I prefer Apache, under Linux. This would not be for production purposes - see my answer below for more details on how PHP interprets the local address for IPv6.


texts: Magento : Need to Change Custom Order Status

texts: When order is complete, then set order status to Payment Complete and once they set Courier status then it should be made as Completed.


texts: Magento 1.9.3 tinymce url('{{media url=" issue

texts:
In Magento 1.9.3 it started to cut off media url inside cms editor:

becomes this

Does anybody have any idea about workaround without using direct full url path?


texts: Moved Magento to other server. I see home page but getting errors. What can be wrong?

texts:
I had a Magento webshop 1.9.1 for a client and about 6 months ago they asked me to remove it, so i did.

I created a DB backup and also the same with the files.

Now they asked me if i was able to re-install (yep, i know...).

Recently i changed servers and i am now on php 5.6.14 and MySql 5.6 instead of the previous php 5.4 and Maria DB (don't recall version)

Now is uploaded the files and imported the DB. Changed urls in DB. I check the website and it shows the front page just as i left it ;-)

But... when clicking a menu item, page or other link, i get 404 not found, requested doc not found on this server.

what might be wrong?

Could it be this setting in local.xml?

also when trying to go in admin, it doesn't recognize that url either.

Hope someone can point me in the right direction here.


texts: Two entry point: index.php and pub/index.php

texts:
I am facing the problem of having two entry points to Magento2 index.php and pub/index.php.

I want to add another DIR called "pub", add this to the document root load and test it.

Currently it is:

C:\xampp\htdocs\magento2\

But I want to set it to:

C:\xampp\htdocs\magento2\pub\

What are the correct steps to point apache to the correct entry point and load the necessary files?


texts: How to build different custom forms for each product type?

texts: I want customers to fill a form for each product and that forms have to be changed by product types. I searched it but i think i'm not using correct words for extensions. Is there any extension for this? (Of course, free extensions prior) Thank you.


texts: Can't find any of the new 1.9 Email options

texts:
My Magento version is CE 1.9.0.1.

I want to customise the header and footer of my email templates, and the inline CSS, as explained here: http://devdocs.magento.com/guides/m1x/ce19-ee114/RWD_responsive_emails.html#newsletter-template

However none of the admin panel options for these customisations are there in System > Configuration > GENERAL > Design > Transactional Emails. For example I have no option for Email Header Template / Email Footer Template / Non-inline CSS files.

Also if I go to System > Transactional Emails, I cannot load the Email Header/Footer templates. Also the file app/locale/en_US/template/email/html/header.html does not exist.

I haven't found any other missing files or config options - it just seems that all of this email stuff is missing.

We have another site, also 1.9.0.1, but installed more recently, which uses the same theme, which does have these options.

Has anyone else experienced the problem?

Thanks

EDIT: After Erik Hansen's answer, I realised the other website is 1.9.1 and the website I am using is 1.9.0.1. Stupid mistake, sorry.


texts:
I have a Magento 1.9 Site: Livecopper.co.za

My issue is the password reset link. I wanted to test my site as a client shopping on the front end.

So I sent a forgotten password email to my emails and clicked on the link. It then tells me to add new password twice. Once I did that it gives me a message that the username is not filled in and the password request has expired.


texts:
I'm wondering if it's possible to move the way the categories are listed in the layered navigation... In the admin, there is a category that's at the bottom of a root category but on the front end shows at the top of the layered navigation.

Is there away I can move these around?


texts: How to filter a product by a datetime attribute in Magento2?

texts:
I am trying to filter products on a search by an attribute of type 'datetime'. The problem is it does not filter by it, so it shows all the results. I have tested other attributes and it works fine, any guesses on why? This is how my SearchResultsobject and product attribute look like:

    $filter1 = $this->filterBuilder
        ->setConditionType('eq')
        ->setField('some_attribute')
        ->setValue(self::SOME_VALUE)
        ->create()
    ;

    $now = new \DateTime();
    $filter2 = $this->filterBuilder
        ->setConditionType('gt')
        ->setField('departure_datetime')
        ->setValue('2018-01-15')
        ->create()
    ;

    $searchCriteria = $this->searchCriteriaBuilder
        ->addFilter($filter1)
        ->addFilter($filter2)
        ->create();

    $products = $this->productRepository->getList($searchCriteria);


texts: Magento 2: Update Query Using Standard Way

texts:
I have UPDATE posts SET viewed = viewed + 1 WHERE id = 1 MySql Query

I have referred https://webkul.com/blog/magento2-write-custom-mysql-query-without-using-model/
But i want to as we do Select Way, Means Standard Way

Example:

$select = $this->getConnection()
                ->select()
                ->from(['posts' => $this->getMainTable()])
                ->where(
                'posts.id = ?', $id);


texts: Grid Export: Item (Neo_Affiliate_Model_Affiliate) with the same id "2977" already exist

texts:
I have custom affiliates module with grid.this affiliate module grid has list of orders placed by the affiliate customer group. in this grid i had added some columns array('billing_name','created_at','base_grand_total','grand_total','status') from sales order grid and shipment number from the sales_flat_shipment using join in magento.Following is my query.

$collection->join(array('og' =>'sales/order_grid'), 'main_table.order_id = og.entity_id', array('billing_name','created_at','base_grand_total','grand_total','status'));
$collection->getSelect()->joinLeft(array('sfs' =>'sales_flat_shipment'), 'main_table.order_id = sfs.order_id','increment_id as shipment_id');

I am getting this join columns added and data also populated in the affiliate grid with no issue.

The issue is when i am trying to export this grid i am getting the following issue

Item (Neo_Affiliate_Model_Affiliate) with the same id "2977" already exist

When i printed the collection object i see affiliate_id which is primary key of the affiliate module has 2977 twice.so i came to know that if primary key dupliacates then above issue comes.

in the collection i have 2977 duplicate because for order number lets assume 10000011 has 2 shipments so their collection object has 2977 twice with one record as shipment 1 and another record as shipment 2.

i had tryied this issue on google and tried many soultions like

1)$collection->getSelect()->group('main_table.affiliate_id');

2)$collection->getSelect()->distinct(true);

3)$collection->getSelect()->distinct('main_table.affiliate_id');

this issue only coming when i am trying to export.it is not coming when the grid is displaying the records.

Note:- Affiliate table contains records of orders details by affiliates

Updated:-

protected function _prepareCollection()
        {
            $collection = Mage::getModel('neoaffiliate/affiliate')->getCollection();
            $collection->join(array('og' =>'sales/order_grid'), 'main_table.order_id = og.entity_id', array('billing_name','created_at','base_grand_total','grand_total','status'));
            $collection->getSelect()->joinLeft(array('sfs' =>'sales_flat_shipment'), 'main_table.order_id = sfs.order_id','increment_id as shipment_id');

            // tryed code

            //$collection->getSelect()->group('main_table.affiliate_id');
            //$collection->getSelect()->distinct(true);
            //$collection->getSelect()->distinct('main_table.affiliate_id');
            //$collection->getSelect()->distinct();

            $this->setCollection($collection);
            return parent::_prepareCollection();
        }


texts:
Uncaught TypeError: Cannot read property 'element' of undefined

I am getting this error when I load the page.
This is the script i have written

    var stateArr = <?php echo json_encode($_stateArr)?>;
require([
    "jquery",
    "mage/mage",
    "mage/validation"
], function($){
    jQuery( function() {
        document.getElementById('project').elements[i];
        var availableTags = stateArr;
        document.getElementById(postcode).autocomplete({
        //jQuery( "#postcode" ).autocomplete({
            source: availableTags,
            minLength:3
        });
    });
    $(".ui-autocomplete").appendTo($("#input-postcode-container"));
});


texts: Security PATCH SUPEE-10975 Installation error in Config.xml

texts:
I have the same flaw. I have all the previous patches set except for php 7.0. Returning to the "original" version of config.xml has not solved the problem. How can I solve it?

Checking if patch can be applied/reverted successfully...

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

patching file app/code/core/Mage/Adminhtml/Block/Customer/Group/Edit.php
patching file app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Edit.php
patching file app/code/core/Mage/Adminhtml/controllers/Cms/BlockController.php
patching file app/code/core/Mage/Adminhtml/controllers/Customer/GroupController.php
patching file app/code/core/Mage/Adminhtml/controllers/SitemapController.php
patching file app/code/core/Mage/Adminhtml/controllers/System/BackupController.php
patching file app/code/core/Mage/Captcha/Model/Observer.php
patching file app/code/core/Mage/Captcha/Model/Zend.php
patching file app/code/core/Mage/Captcha/etc/config.xml
patching file app/code/core/Mage/Catalog/Model/Api2/Product/Image/Rest/Admin/V1.php
patching file app/code/core/Mage/Catalog/Model/Product/Attribute/Media/Api.php
patching file app/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage.php
Hunk #2 succeeded at 387 (offset -1 lines).
patching file app/code/core/Mage/Core/etc/config.xml
Hunk #1 FAILED at 28.
1 out of 3 hunks FAILED -- saving rejects to file app/code/core/Mage/Core/etc/config.xml.rej
patching file app/code/core/Mage/Core/sql/core_setup/upgrade-1.6.0.6.1.2-1.6.0.6.1.3.php
patching file app/code/core/Mage/Dataflow/Model/Convert/Container/Abstract.php
patching file app/code/core/Mage/ImportExport/Model/Import/Entity/Customer.php
Hunk #1 succeeded at 280 (offset -9 lines).
patching file app/code/core/Mage/ImportExport/Model/Import/Entity/Customer/Address.php
Hunk #1 succeeded at 281 (offset -22 lines).
patching file app/code/core/Mage/Payment/etc/config.xml
patching file app/code/core/Mage/Payment/etc/system.xml
patching file app/code/core/Mage/Payment/sql/payment_setup/upgrade-1.6.0.0.1.1-1.6.0.0.1.2.php
patching file app/code/core/Mage/Sendfriend/Block/Send.php
patching file app/code/core/Mage/Wishlist/controllers/IndexController.php
patching file app/code/core/Zend/Controller/Request/Http.php
patching file app/design/adminhtml/default/default/template/cms/browser/content/files.phtml
patching file app/design/frontend/base/default/layout/captcha.xml
patching file app/design/frontend/base/default/template/wishlist/sharing.phtml
patching file app/design/frontend/rwd/default/layout/page.xml
patching file app/design/frontend/rwd/default/template/sendfriend/send.phtml
patching file app/etc/modules/Mage_All.xml
patching file app/etc/modules/Mage_Captcha.xml
patching file app/locale/en_US/Mage_Wishlist.csv
patching file js/lib/jquery/jquery-1.12.0.js
patching file js/lib/jquery/jquery-1.12.0.min.js
patching file js/lib/jquery/jquery-1.12.0.min.map
patching file js/lib/jquery/jquery-1.12.1.js
patching file js/lib/jquery/jquery-1.12.1.min.js
patching file js/lib/jquery/jquery-1.12.1.min.map


texts: Change Order Confirmation Email For Specific Orders

texts:
I have two 'special' products that when ordered should send a custom email (in place of the standard order confirmation email).

An Observer is set up for the sales_order_place_after event but not sure how to change the email template for the order.

How do I change the email template for this particular order.


texts: Customer Adresses rest api - add created_at

texts:
I need to return on the webservice /rest/V1/customers/ the created_at and updated_at fields from the table customer_address_entity. Any help?

thanks !


texts: Magento 2.1 - Add prefix to category url

texts:
How to add a prefix for Magento 2.1 URL and show child without a parent?

Example: Category level1: www.example.com/categories/fashion.html

Example: Category level2: www.example.com/categories/men.html

Example: Category level3: www.example.com/categories/tshirt.html


texts: Guest Cart Items API returns 0 for the price of item added last to the cart - M 2.2.6

texts: The API rest/V1/guest-carts/cart_id/items returns the value 0 for the item which was added last to the cart, in case the guest cart has more than one item and in the case of one item the value is still 0.


texts: how to get products purchased by customer custom report

texts:
I created custom report module based on Ordered Products Report.

https://github.com/sivajik34/products-by-customer

Present I'm trying to build query like this.

SELECT so.customer_id, soi.sku, sum( soi.qty_ordered )
FROM sales_order so
INNER JOIN sales_order_item soi ON soi.order_id = so.entity_id
WHERE  soi.parent_item_id IS NULL
GROUP BY soi.sku order by so.customer_id

I need report like this.