texts: Block not rendering when extended and module output disabled

texts:
I've got a module with this rewrite in Magento 1.9.1.0 to change the checkout url in a nice way:

<blocks>
    <checkout>
        <rewrite>
            <onepage_link>RD_ModuleName_Block_Onepage_Link</onepage_link>
        </rewrite>
    </checkout>
</blocks>

And this block:

<?php
class RD_ModuleName_Block_Onepage_Link extends Mage_Checkout_Block_Onepage_Link
{
    public function getCheckoutUrl()
    {
        if($something === TRUE){
            return $this->getUrl('someurl', array('_secure'=>true));
        }
        return parent::getCheckoutUrl();
    }
}

This works perfectly. But I'd like to disable this module for one store so I've disabled it in the backend (configuration -> advanced). After this the complete checkout button is gone! Why? It looks like when there is a rewrite and the module output is disabled the rewrite stays but the block will not be rendered and it doesn't fallback to the original class (in this case Mage_Checkout_Block_Onepage_Link).

I've done some research, my own getCheckoutUrl() is never called but when I put a constructor in my class that one will be called. When I put some logging in the original Mage_Checkout_Block_Onepage_Link class; no function there is called, when I put a constructor in it for testing, that one will be called.

Is this normal behavior of Magento or is it a bug? When it's normal, what other options do I have to accomplish the same in a nice way?


texts: How to Magento remove default store view code from url?

texts:
We need your help to solve this problem.

we have a 2 view store in English and Arabic

URLs now

www.example.com/en
www.example.com/ar

we need to remove code view in English version only as default store view.

without sub domain solution.

we tried Jreinke Magento hide default store code but its not working well.

Thanks


texts: The product gallery seems to be broken and it says that gallery.css is missing. Where should this file be in the site structure. Any ideas how it might of gone walkies?


texts: Magento 2.2.3 - main.CRITICAL Notice: Undefined index: websites

texts:
I've a strange problem with a project that appeared all of a sudden. When I try to enter the site I get this error:

An error has happened during application run. See exception log for details.
enter code here

When I look in the exception.log:

[2018-03-26 15:15:12] main.CRITICAL: Notice: Undefined index: websites in /var/www/project/www/vendor/magento/module-config/App/Config/Type/System.php on line 248 {"exception":"[object] (Exception(code: 0): Notice: Undefined index: websites in /var/www/project/www/vendor/magento/module-config/App/Config/Type/System.php on line 248 at /var/www/project/www/vendor/magento/framework/App/ErrorHandler.php:61)"} []

This error came out of nowhere and the site is not working. Neither frontend or backend/admin. As you can see it's something related to the cache handling in a core file. I've been struggling for hours with this issue and I'm out of ideas...

I've tried:

Developer mode
Cleaing/flushing cache
Disabled cache
Removing www/pub/static/frontend/ www/pub/static/_requirejs/ www/var/cache/ www/var/di/ www/var/generation/ www/var/page_cache/ www/var/view_preprocessed/ www/generated/ from disk.
Restored database dump from yesterday
Removed www/vendor folder and re-ran composer install and composer update
Re-installed Magento with the setup CLI command
Re-created www/app/etc/env.php to make sure it's not corrupted
Turned off opcache in php.ini

I'm using Magento 2.2.3 with Nginx, MySQL and Ubuntu 16.04. I'm not using redis or varnish.

The Magento CLI is working and no exceptions are thrown.

Any ideas guys?


texts: Why Remote Ip is not showing in Order in magento-2.1 admin panel?

texts: I have some orders in Magento-2.1 admin panel. When I click on one order, then Placed it from IP it returns IP is missing. When I will work on localhost, then IP is showing. But when I will work on staging or production URL, then it is not showing. And Abandoned Carts is also not showing IP address. What is the problem behind that when i placed order through angular made frontend?


texts: Magento 2 from developer to production mode e-mail / mail

texts:
Magento 2.1.2
If i change from developer to production mode the order email layout is little confused.
Can help me somebody to fix that?

developer mode:

production mode:


texts: How To Add Phone Number Custom Field In User Registration Page In Magento 1.9

texts: According to Magento, mobile number is captured on the Customer registration form as 80xxxxxx07 without country code. How can i fix it


texts: display particular product name and image in custom admin grid page

texts: I want to display product name and product image in a custom page in admin grid that page opens on view click in action


texts: One store view homepage going to 404 sporadically

texts:
We have 2 store view, one french, one english. We use the store view code in the URL : www.website.com/fr/ and www.website.com/en/

For some reason, from time to time, /en/ returns a 404 until something is done. The problem never occured on /fr/.

When the problem is occuring, if I go to www.website.com/index.php/en/, I do not get the 404.

I tried executing : php indexer.php --reindex catalog_url and that usually clears the 404, until the next time.

I found 1 product with no title / no url, which I deleted.


texts: Remember zip code after we visit other Product page

texts:
we are using custom module for checking COD is available or not in view page.

we entered zip code and checked "COD is available or not", now if we click

on other product page, it should remember the zip code that we entered last time & should display message by default.

checkdelivery.phtml

        <?php $blockLabel = Mage::getStoreConfig('checkdelivery/general/block_title'); ?>
        <?php echo $this->__($blockLabel) ?>

            <input name="zipcode" size="17" type="text" id="zipcode" maxlength="10" class="input-text" placeholder="<?php echo $this->__('Enter ZIP Code'); ?>"/>
            <button type="button" name="zip-check" title="Check" class="button" id="zip-check" ><?php echo $this->__('Check'); ?></button>

            <?php $defaultHtml = Mage::getStoreConfig('checkdelivery/general/default_html'); ?>

<?php echo $defaultHtml ?>

view.phtml

<?php
echo $this->getLayout()->createBlock('core/template')->setTemplate('checkdelivery/checkdelivery.phtml')->toHtml();
?>

indexcontroller.php

<?php
class NextBits_CheckDelivery_IndexController extends Mage_Core_Controller_Front_Action
{
    public function indexAction() {

        $zip = $this->getRequest()->getParam('zipcode');
        $pincodearray = array();
        $pindata = Mage::getStoreConfig('checkdelivery/general/pincode');
        $pincodearray = explode(",", $pindata);
        $success = Mage::getStoreConfig('checkdelivery/general/success_messgae');
        $failure = Mage::getStoreConfig('checkdelivery/general/failure_messgae');
        $empty = Mage::getStoreConfig('checkdelivery/general/empty_messgae');
        $successHtml = Mage::getStoreConfig('checkdelivery/general/success_html');
        $failureHtml = Mage::getStoreConfig('checkdelivery/general/failure_html');
        $defaultHtml = Mage::getStoreConfig('checkdelivery/general/default_html');

        $trimedZip = trim($zip);
        $response = array();
        if(isset($trimedZip) && !empty($trimedZip)){
            if (in_array($trimedZip, $pincodearray)) {
                $response['message'] = $success;
                $response['color'] = 'green';
                $response['html'] = $successHtml;

            }else{
                $response['message'] = $failure;
                $response['color'] = 'red';
                $response['html'] = $failureHtml;

            }
        }else{
            $response['message'] = $empty;
            $response['color'] = 'orange';
            $response['html'] = $defaultHtml;
        }
        echo json_encode($response);exit;
    }
}


texts: Magento 2.2: What controllers are called when a product is added to the cart?

texts:
I have the next error when a product is added to the cart:

  Requested product doesn't exist

This comes from the following method:

  \Magento\Catalog\Model\ProductRepository

 public function getById($productId, $editMode = false, $storeId = null, $forceReload = false)
    {
        $cacheKey = $this->getCacheKey([$editMode, $storeId]);
        if (!isset($this->instancesById[$productId][$cacheKey]) || $forceReload) {
            $product = $this->productFactory->create();
            if ($editMode) {
                $product->setData('_edit_mode', true);
            }
            if ($storeId !== null) {
                $product->setData('store_id', $storeId);
            }
            $this->logger->debug('Repo2' . $productId);
            $product->load($productId); //            $this->logger->debug(var_export(get_class_methods($product), true));
            if ($productId == '') {
                return nulL;
            }
            if (!$product->getId()) {
                throw new NoSuchEntityException(__('Requested product doesn\'t exist'));
            }
            $this->cacheProduct($cacheKey, $product);
        }
        return $this->instancesById[$productId][$cacheKey];
    }

With the logger I see that three calls are made and the third the $productId has no value and skip the exception

log:

I need to know where the third call is made to see the values it sends.

EDIT:

I have found the third call, it is at the time of validating the sales-rule:

This returns a null object:

  $product = $model->getProduct();

  \Magento\SalesRule\Model\Rule\Condition\Product

public function validate(\Magento\Framework\Model\AbstractModel $model)
    {
        //@todo reimplement this method when is fixed MAGETWO-5713
        /** @var \Magento\Catalog\Model\Product $product */

        $product = $model->getProduct();
        $this->logger->debug(var_export(get_class_methods($product), true));
        if (!$product instanceof \Magento\Catalog\Model\Product) {
            $product = $this->productRepository->getById($model->getProductId());
        }

        $product->setQuoteItemQty(
            $model->getQty()
        )->setQuoteItemPrice(
            $model->getPrice() // possible bug: need to use $model->getBasePrice()
        )->setQuoteItemRowTotal(
            $model->getBaseRowTotal()
        );

        $attrCode = $this->getAttribute();

        if ($attrCode === 'category_ids') {
            return $this->validateAttribute($this->_getAvailableInCategories($product->getId()));
        }

        if ($attrCode === 'quote_item_price') {
            $numericOperations = $this->getDefaultOperatorInputByType()['numeric'];
            if (in_array($this->getOperator(), $numericOperations)) {
                $this->setData('value', $this->getFormattedPrice($this->getValue()));
            }
        }

        return parent::validate($product);
    }

  I have the same error but if I comment all the code and return
  directly true it is possible to add products to the checkout. But it
  is not a good solution since here it validates the offers.


texts: Not able to save changes to review model

texts:
I tried to alter information from the table review_detail by loading the model, changing values and saving the model again, but being stuck.

The following code does not work:

$review=Mage::getModel('review/review')->load(12);
$review->setCustomerId(2)->save();

There is no error thrown, no error in the logs either.


texts: CDATA Issue when Filtering by Category using Advanced Profiles

texts:
Can you somehow indicate exact match within the "Character Data Block"? I'm trying to isolate ONLY products from Category (ID:4) but when I use (4) in the "Character Data Block" for Variable "Filter/Category_ids" (See Below) it returns products for any category (ID) that contains the number 4. For example: 416, 84, 940, 1004, etc. Once again, can exact match be specify in this instance?

<action type="catalog/convert_adapter_product" method="load">
    <var name="store"><![CDATA[1]]></var>
    <var name="filter/attribute_set"><![CDATA[26]]></var>
    <var name="filter/visibility"><![CDATA[4]]></var>
    <var name="filter/status"><![CDATA[1]]></var>
    <var name="filter/category_ids"><![CDATA[4]]></var>
</action>

<action type="catalog/convert_parser_product" method="unparse">
    <var name="store"><![CDATA[1]]></var>
    <var name="url_field"><![CDATA[1]]></var>
</action>

<action type="dataflow/convert_mapper_column" method="map">
    <var name="map">
        <map name="sku"><![CDATA[SKU]]></map>
        <map name="name"><![CDATA[Product Name]]></map>
        <map name="description"><![CDATA[Description]]></map>
        <map name="url_path"><![CDATA[Product URL]]></map>
        <map name="image"><![CDATA[Image URL]]></map>
        <map name="category_ids"><![CDATA[Category]]></map>
        <map name="special_price"><![CDATA[price]]></map>
        <map name="manufacturer"><![CDATA[Manufacturer]]></map>
    </var>
    <var name="_only_specified">true</var>
</action>

<action type="dataflow/convert_parser_csv" method="unparse">
    <var name="delimiter"><![CDATA[,]]></var>
    <var name="enclose"><![CDATA["]]></var>
    <var name="fieldnames">true</var>
</action>

<action type="dataflow/convert_adapter_io" method="save">
    <var name="type">file</var>
    <var name="path">var/export</var>
    <var name="filename"><![CDATA[sample.csv]]></var>
</action>


texts: URL rewrite and sitemap with inactive categories

texts:
I have 2 stores in the same installation (multistore)

I have 1 root category and 3 subcategories.

In store1 I have active subcategory1 and subcategory2.

In store2 I have active subcategory1 and subcategory3.

It's everything ok, except that in store1's url rewrites I'm seeing url's from subcategory3 (not active at this store) and the same happens with the sitemap.

Anyone knows how to fix it?


texts: Amazon pay return error on checkout page

texts:
on my Magento store sometimes customer facing the error on the checkout page when the customer wants to place the order with Amazon pay payment method.

It says "

Important Message
We're sorry, but there's a problem processing the order from this website.
Please contact the seller for help with placing this order."

Steps that I followed:

1) Added product into Car

2) Login into Amazon

3) From Amazon checkout navigated to home page.

4) Again came back to Amazon checkout & found this error & at this time following errors were there in the console:

"Uncaught Error: Unable to process binding "foreach: function()

{return $parent.elems() }
"" (Attaching screenshot for error)

I am using Magento 2.2.4 with PHP 7.1.20

Thanks In advance..!!!


texts: Is it possible to combine Configurable Products With Grouped Products Together On One Listing?

texts:
I have a listing on Magento that requires both Configurable Product and Grouped Product to be both shown on the listing. Is it possible to do this at all?

Thank you.


texts: Field value in admin form not saving to database

texts:
This is what I'm trying to achieve as the end result by the way:-

I think I may have just realised why $this->getImageHtml($model->getImgMain()) returns nothing. Is this meant to be getting the value from the database? If so, there is no value stored in the database. So the image uploader is uploading the image but not saving the name in the database. I think I'm getting somewhere?
Edit
I can confirm, that the value as per above is returned empty because the image filename is not being saved to the database:-
        $fldUpload = $form->addFieldset('upload', array('legend'=> $hlp->__('Image Upload')));
        $fldUpload->addField('img_main', 'file', array(
        'label'     => $hlp->__('Image'),
        'name'      => 'img_main',
        'required'  => false,
        'after_element_html' => $this->getImageHtml($model->getImgMain()),
        ));
        $fldUpload->addField('remove_img_main', 'checkbox', array(
            'label'     => $hlp->__('Remove Image'),
            'name'      => 'remove_img_main',
            'value'     => 1,
        ));

And I created the table in the database img_main and whilst the image uploads, the filename is not saved to the database...
Really stumped on this one, I know the image filename is being generated correctly, I know that the field name is the same as the table name in the database. I can't figure out why the image filename is not being saved in the database table.


texts:
When creating an order at the backend, we get The requested Payment Method is not available!". Our exception is thrown at /app/code/core/Mage/Payment/Model/Info.php in function getMethodInstance.

The payment method is working at regular online orders, but not via the backend.
We have this problem after updating to Magento 1.9.1.1 .

I believe that $instance is set, but I am not able to find setInfoInstance method to debug this further. Where can I find it?

The requested payment method is in the list of the active payment methods.
Is it possible, that an other non used payment method is responsible for this trouble Then: How can I find out, which payment method causes the issue?

Also m2epro import has the same problems.


texts: In Magento 9.2, i have different price in view and list page. So, what are the tables used for price in catalog page and product view page?


texts: Magento Multi store customer account sharing

texts:
I have a scenario where I have 3 store fronts on one Magento platform. I want to be able to share customer accounts across two of the store fronts but not the third. In System > Config > Customers > Customer Configuration you can Share Customer Accounts by "Per Website" or "Globally' but you can't select which websites individually.

I know I could change the store_id in the table customer_entity but that's not a long term option, has anyone been able to do the described another way?


texts: I want to save the successful order for another db

texts:
Please help me to sort out this.

I want to save all the successfull order details from magento 1.9.3 website to another database.From where i can break the checkout process and
get all the details>?


texts: How to locate culprit for "Please correct the XML data and try again" error

texts:
Getting the following error on the cart page of Magento 2, checkout_cart_index. It's a code base with no version control and this issue is present even when I'm using the default Luma theme. I've run diffs between the original version, re-updated everything with Composer, but I didn't see any core files (app code and theme) modified.

  Cache file with merged layout: LAYOUT_frontend_STORE1_7e13260053f56644d576f1e487266f9a1
      and handles default, checkout_cart_index: Please correct the XML data and try again.  [] []

I've traced it back to...

Magento\Framework\View\Model\Layout\Merge to
Magento\Framework\View\Model\Layout\Update\Validator to
Magento\Framework\Config\Dom.

However,  I still can't find the actual XML layout file with the schema violation. Is there a way to find out which file is the culprit without using an IDE like PhpStorm? (I tried a few online validators, but they did not return relevant errors)


texts:
I'm trying to modify an admin template by overriding it (instead of modifying the core template file directly).

So the way I understand it, I should just be able to copy a template file:
app/design/adminhtml/default/default/template/catalog/product/edit/websites.phtml

to:
app/design/adminhtml/default/companyname/template/catalog/product/edit/websites.phtml

Here's the tricky part: it works for just about every page except for the page I need it to work on. I'm trying to copy any of the templates used by Catalog->Products->->Custom Options

I can't seem to override any of those templates.
I've cleared every cache I own (even from my wallet just to be sure).
I've double checked all file names and paths.

I can't find error messages that would be helpful to give me a hit to what's going on, so I'm hoping somebody had run across this before or might be able to point me in the direction

At the very least at some hidden logs somewhere that might tell me what's going on?

Edit:
After digging into this more, we came up with an interesting find: the default theme is customtheme and the override template is default, only for this section. Everywhere else, default is default and override is customtheme.
We still have no idea why.


texts: Custom Conditions for Mage_Rule + Different Entity Types

texts:
I have a client that is looking for a new rule-based module that will allow them to trigger various actions when order statuses are changed. While I'm fairly confident that I can code the event observers and the actual actions required (automatically creating an invoice when the order status is changed to X, etc.) I have no idea how to give my client a Mage_Rule style Conditions/Actions interface for this.

The first problem is that I only know of Mage_Rule being used for products. Catalog Price Rules, Shopping Cart Price Rules and Target Rules (EE only I believe) all use the catalog_product entity. None of these use Orders or Invoices or anything from that part of the Magento, so I have nothing to go off of.

The second problem is just the process of creating new conditions and new actions that Mage_Rule understands and can show to the user via the usual UI.

If anyone knows of existing tutorials out there, or even a plugin that does something similar that is licensed in a way that it will allow me to learn from their code, that would be awesome.

Thanks.


texts: get ordered items from last 10 days of specific customer

texts: I am looking for collection which have number of products that ordered by specific customer. If anyone have any suggestion please share.


texts: Magento2 price filter with configurable products

texts:
I created a custom price filter (without layered navigation). This function works great on simple products, but configurable products are filtered (maybe because they don't have a price?).

This is my function:

<?php namespace Silvan\Sidebar\Model\Plugin;

use Magento\Catalog\Model\ResourceModel\Product\Collection as ProductCollection;

class SidebarFilter
{
    public function aroundAddFieldToFilter(ProductCollection $collection, \Closure $proceed, $fields, $condition = null)
    {
        if ($fields === 'category_ids') {

            $price  = isset($_GET[ 'price' ]) ? $_GET[ 'price' ] : false;

            if ($price && strpos($price, '-') !== false) {
                $price = explode('-', $price);
                $min   = isset($price[ 0 ]) ? $price[ 0 ] : 0;
                $max   = isset($price[ 1 ]) ? $price[ 1 ] : 9999999;

                $collection->addAttributeToFilter('price', ['gt' => $min]);
                $collection->addAttributeToFilter('price', ['lt' => $max]);
            }
        }

        return $fields ? $proceed($fields, $condition) : $collection;
    }
}

I tried using min_price and max_price, but these attributes are ignored in the filter.


texts: Is it possible to append a block to the footer in admin dashboard?

texts:
I'm trying to append a block to the footer but only on the dashboard page i.e.

<footer>
[New Template]
[Core Content]
</footer>

How can I achieve this? I've tried a layout file with the following but nothing is displayed:

<?xml version="1.0"?>
<layout version="0.1.0">
    <adminhtml_dashboard_index>
        <reference name="footer">
        <block type="core/text_list" name="newreference" as="newreference" translate="label">
            <label>New Reference</label>
        </block>
        </reference>
        <reference name="newreference">
        <block type="core/template" name="newreferenceblock" template="stats.phtml" />
        </reference>
    </adminhtml_dashboard_index>
</layout>

Do I have the path or reference name wrong?


texts: can i use both built in cache & varnsih cache for magento2 at a time?

texts:
I configured Varnish cache as well as the built in page cache. Now I've got some issues with the cache.

If I disable the built in cache the cache issue is resolved.
So my question is can I use both the built in cache & varnish for my site? Or do I need to use only one of them?


texts: How to disable PayPal express payment method on one of the store

texts:
I got 2 variations of the store - EU and USA. I need to disable the PayPal Express method on the EU store, how can I do that?

There no option to disable Payment on EU store:

But avaliable on default config:


texts: sales report showing empty in Magento 2.1.8

texts: Couldn't found any records in sales report section. I'm using magento 2.1.8. Reports expect from Sales module is showing up.


texts:
How does Magento2 count the views of products in the Product Views Report, is it by browser session or per account (login in different accounts using the same browser, each account counts as 1)?
If by browser session, how does Magento defines a browser session? If I open and close a browser within 15 minutes and view a product, will Magento count each session and view as 1?


texts: How to setup specific tax rule for a specific website in magento 2

texts:
As per We required to set up a specific tax rule for a specific website.
to set website-specific tax rules.
Please give me a suggestion or link or any programmatic script so I can
do this ASAP
Thank you,


texts: Ui_component column visible doesn't work

texts:
In Magento 2.2.6, modifying customer listing to add custom columns, setting  to set a default visibility is not being taken into account. It doest not matter if it is set to true or false. It does not make any change.

The  is working, since we are able to change column name. For example, see "Web Site 2" column name.

<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<columns name="customer_columns">
    <column name="mod_cardcode" class="Mod\CustomerCrm\Ui\Component\Listing\Column\Cardcode">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="dataType" xsi:type="string">text</item>
                <item name="visible" xsi:type="boolean">true</item>
                <item name="filter" xsi:type="string">text</item>
                <item name="label" translate="true" xsi:type="string">Company customer code</item>
                <item name="sortOrder" xsi:type="number">25</item>
            </item>
        </argument>
    </column>
    <column name="group_id" component="Magento_Ui/js/grid/columns/select" sortOrder="50">
        <settings>
            <visible>false</visible>
        </settings>
    </column>
    <column name="created_at" class="Magento\Ui\Component\Listing\Columns\Date" component="Magento_Ui/js/grid/columns/date" sortOrder="100">
        <settings>
            <visible>false</visible>
        </settings>
    </column>
    <column name="website_id" class="Magento\Customer\Ui\Component\Listing\Column\Websites" component="Magento_Ui/js/grid/columns/select" sortOrder="110">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="visible" xsi:type="boolean">false</item>
                <item name="label" translate="true" xsi:type="string">Web Site 2</item>
            </item>
        </argument>
    </column>
    <column name="confirmation" class="Magento\Customer\Ui\Component\Listing\Column\Confirmation" sortOrder="130">
        <settings>
            <visible>false</visible>
        </settings>
    </column>
</columns>


texts: Add conditional statement in the static block in magento

texts:
My following code is under static block and i am trying to achieve following functionality.

I print invoice using the following code:

{{if order_date == '03/06/2017'}}

        Tax(VAT/CST)

{{else}}

        Tax(GST)

{{/if}}

Update:-

My order date is 03/06/2017 and every time it is going into else statement and printing else statement instead of printing if statement.


texts: Magento2.2.1 crashes half way through 7000 products import, with 500 Internal server error on form key request

texts:
With a brand new installation of Magento 2.2.1 on PHP 7.1, all settings correct (I believe), I use System/Import to put in 7000 products. And the page hangs with spinning loader. On re-importing I looked at the browser network console and found this internal server error:

Request URL:http://www.myUrl.co.uk/myAdminUrl/admin/import/start/key/my Key/&form_key=myFormKey
Request Method:POST
Status Code:500 Internal Server Error
Remote Address:myip
Referrer Policy:no-referrer-when-downgrade

shouldn't this ampersand be a question mark.


texts:
I am want to check Authorize is working or not

I change Test Mode to Yes in configuration and i want to use with test credit numbers

I have added Live Authorize.net details

In configuration Authorize only is selected and Capture will be done after so when i try to invoice it is throwing error

  Gateway error: (TESTMODE) Credit card number is required.

It is not sandbox account

Can anyone suggest is it possible to test with test card with live account?


texts:
Does Magento 2 have batch processing? Forgive my ignorance--I'm looking for something similar to Drupal's batch processing. I'm wanting to call a list of operations and batch-processing code usually is more resilient than just calling code outright.

https://www.drupal.org/docs/7/api/batch-api/overview


texts: I want to use Magento Connect to install a plugin. I am receiving a 404 page when I try to open it.


texts: Product Images not visible in backend since 1.9.3.1 update

texts:
In Magento CE 1.9.2.4 I was able to see the product images in the backend in the Catalog/ProductManagement/Images screen.

I have upgraded Magento to 1.9.3.1 with magento connect.

Since then there is no images displayed in the grid. The grid only contains the first line "no image".

The images are still visible in the frontend.

I have no CreareSeo extension installed.
I have tested with up-to-date Firefox and Chrome.
I have made a copy of the shop on a test system and de-installed almost all extensions, but it is still not ok.

This is an urgent matter because it is in production and we cannot add products without images...

Thanks


texts:
I am trying to import configurable product in magento2 but my attribute options include "|" separator in label, due to that Magento cannot identify the correct attribute value during import.
Any ideas to import such attribute options with configurable product ?
Here is the sample csv file


texts: There is a free extension that allows you to create multiple table rates simultaneously visible on the front end.


texts: Example of Overriding Topmenu.php in Module-Theme?

texts:
I'm trying to add some code to protected function _getHtml (in Topmenu.php).

I've tried both the "preference" and the "plugin" angle, but still can't properly override override the function. Information I've found online seems lacking.

What's the best way to do this, in this particular case? Any thoughts/examples would be greatly appreciated!


texts: is it possible to filter checkout cart collection magento 2?

texts:
Actually i want to filter the checkout cart collection using custom
attributes values using this link

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$quoteId = $objectManager-> create(‘Magento\Checkout\Model\Session’)->getQuoteId();
$cartData = $objectManager->create(‘Magento\Quote\Model\QuoteRepository’)->get($quoteId)->getAllVisibleItems();
$currentItemCount = count($cartData); //Current cart quote count echo $currentItemCount;


texts: Youtube Video Added in Product Gallery - Magento 2

texts:
I am getting error when i am trying to add Youtube link in product media gallery. Youtube API is already added. But still i am getting error. can you please describe me, How to i can fix this error ? Please below screenshot.

Thanks


texts: Generate EC Sales List for UK VAT Return

texts:
We've just recently switched over to Magento and it's been working very well. As we reach the end of the VAT period, however, I'm struggling to figure out how to generate the necessary reports. Specifically, the EC sales list.

We need a report that lists the VAT IDs of EU B2B customers and their total spend during the period. I can't see any way to do this in Magento, and a Google search comes up with absolutely nothing on the subject.

There must be many UK-based Magento systems running that routinely need to generate this information, so it must be possible. Any idea how I do this?


texts: Error on checkout page while adding product to cart

texts:
I am using a custom module, where I want to redirect to checkout page once a product is adding to cart. For this I have created an event on frontend "checkout_cart_add_product_complete".

For simple product its working fine. But where I am adding a configurable product it will redirect to checkout page with attribute data so(Check in last for URL reference), I am getting an error of noroute on checkout.

Here is my Observer code:

   $observer->getRequest()->setParam('return_url', $this->_url->getUrl('checkout'));

  My error on checkout page because url become like:-
  www.yourDomain.com/checkout/#size=173&color=53

Note: Using Magento 2.3


texts: Sql syntax error coming up for only one product in the whole website

texts:
I am getting the following error in my magento store when I try to access one particular product.

  SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '))' at line 1, query was: SELECT main_table.* FROM catalog_category_flat_store_1 AS main_table WHERE (())

Every other product is working fine in my magento store. When I try to open the product page of one particular product I am getting the above magento error. Can anyone kindly tell me how to sort this out?


texts:
I would like to call paid fonts via pub folder. I create the specific font folder in pub i.e

  pub/static/frontend/Mageplaza/ultimate/en_US/fonts

and linked it my custom.css file font family is not working.


texts: Magento 2 - How to get data from table customer_log?

texts:
I need to get the value for last_login_at for the current customer, but this seems to be impossible without the use of SQL.

Current Solution (SQL):
/**
* @var \Magento\Framework\App\ResourceConnection
*/
protected $_connection;

...

$connection = $this->_connection->getConnection();
$tableName = $this->_connection->getTableName('customer_log');
$sql = "Select * FROM " . $tableName . " WHERE customer_id = " . $customerId;
$result = $connection->fetchRow($sql);

How does it work with Magento code instead of SQL? It seems to me that magento 2 did forgot to implement the proper code.


texts:
I have a label for my custom payment method in the config.xml file. It looks like this:

<default>
    <payment>
        <cashpayment translate="title" module="paygate">
            <active>1</active>
            <model>payments/cash</model>
            <order_status>1</order_status>
            <title>Cash Payment</title>
        </cashpayment>
    </payment>
</default>

Unfortunately, despite 'translate' parameter the output in the front end is still 'Cash Payment'. I've updated translation file, flushed the cache but it didn't help.
Any suggestions would be highly appreciated :)?


texts: Missing 'orders' entity from admin panel export

texts:
I only have 'products' and 'customers' as an entity type to export.

There are orders in our system to export.

Why is orders export missing?


texts: Share the shopping cart content between Magento multi-store websites

texts:
I have Magento multi-store websites that I want to user can add to his shopping cart products from all the website and pay once.

I successfully done it using this article.

But when the user click on the product in the shopping cart, he is not redirected to the right website. It's a limitation the described in the article at the end.

  The link for editing items in the cart will redirect customer to original cart website. It is possible to change it, you can override getUrl method for cart items block or override controller.

I couldn't find any explaination how to do this override.

Someone can help me do this?

Thanks


texts: Remove Subtotal, Shipping & Handling and Grand Total on order email?

texts: I don't want to display Subtotal, Shipping & Handling and Grand Total on order email. How can I remove it? Thank you!


texts:
I am trying to add Contact us Menu into the top navigation menu but its not Working for me.

I am trying using default Contact Us page but its not showing in Top Menu.
      From admin panel I was Enable yes Contact Us. But When Go to the Block section I don't get the Contact Us Page.

I need to add that contact us menu side to the About us top menu?

How can achieve this?


texts: Does Magento save the data order even it was canceled or failed?

texts:
I am integrating a payment gateway the test mode is working fine.
But the payment method provider asked for to save order details(failure order during checkout/cancel order during checkout/success order) in database.

Does Magento save these types of data already ? or i need to create custom module for this ?


texts: Buy product X and Y, get a discount of 50% for product Z

texts:
Any idea how to do this in promotions from admin panel?

If a customer buys product X and product Y, customer gets a discount of 50% for product Z.

X, Y and Z are specific products.


texts: Troubleshooting customer email missing in orders

texts:
Customer email is required in one step checkout, however, in the last three months I have had a few orders that have not captured the customers email or at least not saved it to the Magento order.

The only thing I can find in common with the customers are that they are checkout out as guests. I believe the only thing interacting with OSC is our email marketing platform Bronto.


texts: default value in advanced search dropdown

texts:
In my magento "advanced search" I have some attributes to be chosen via a dropwdown box.
When the user loads the page all the fields default to "all".

array_unshift($options, array('value'=>'', 'label'=>Mage::helper('catalogsearch')->__('All')));

What I need to do is to give a default value to just one of the fields, for example I want "color" to default to "red", so that the user has to change it manually if he wants to search for "green" or "yellow" or "all".

I tried defining the needed attributes as "default" in the config section but this only seems to work in defining an attribute in the admin interface, not in the search.


texts: How to load an external file to load and execute our custom JS files on the Magento site?

texts: seeking some advises. My Magento-2 project has 2 custom JS files that I would like replicated and loaded externally on the site. This arrangement is for our client to use them to add his own code changes and deploy them directly to the production server whenever he makes minor changes in these JS files. Just to give you an example, he wants to change the logo every holiday for which he can deploy these JS files as soon once the logo is changed and stash this file once the holiday is over. All I need to know is what location is ideal for saving external files and how to load and execute them on the Magento site using some function? How do I invoke this?


texts: Getting the product info from different store in checkout process

texts:
I have two stores. View one is in English and the other is the translation, each product has the same price and information but the difference is the translation.

I want all orders in the back-end with the same items information taking in to account the fact the site/view that the item was ordered from. For example suppose I have the item with a name of name1 in first view and name2 in the second view. If the customer creates the order in first view I will see it as name1, and name2 if he creates it from the second view.

I tried to find the code that processes the checkout to change the code and set the store id to one in all cases, but I didn't find it.

Then I tried to handle it in shopping cart by changing the code _initProduct()in :

\app\code\core\Mage\Checkout\controllers\CartController.php
From
$product = Mage::getModel('catalog/product')
   ->setStoreId(Mage::app()->getStore()->getId())
   ->load($productId);
To
$product = Mage::getModel('catalog/product')
   ->setStoreId(1)
   ->load($productId);

So could you tell me please how I can do both things, changing the info of the product in the cart and order?

Edit One:

After tracing Magento code

I changed the method setProduct in class Mage_Sales_Model_Quote_Item to have this code:

$productTemp=null;
    if($product->getStoreId !== 1){
    $productTemp =  Mage::getModel('catalog/product') ->setStoreId(1)
       ->load($product->getId());
    }
    else
    {
    $productTemp=$product;
    }
    $this->setData('product', $product)
        ->setProductId($productTemp->getId())
        ->setProductType($productTemp->getTypeId())
        ->setSku($this->getProduct()->getSku())
        ->setName($productTemp->getName())
        ->setWeight($this->getProduct()->getWeight())
        ->setTaxClassId($productTemp->getTaxClassId())
        ->setBaseCost($productTemp->getCost())
        ->setIsRecurring($productTemp->getIsRecurring());

My question is, is it bad practice to edit core files & does this edit have a negative impact?


texts: Add Images in Magento Theme template file

texts:
I want to add image like footer.png in

app/design/frontend/vendorname/themename/Magento_Theme/templates/html/footer.phtml

Here I am adding image using

<img src='<?php echo $this->getViewFileUrl('Company_Module::images/image-icon.png'); ?>' alt="image-icon" width="30" height="25"

Image In Magento_Theme/web/images folder


texts: How to transfer Magento site/store view data to an existing install of Magento?

texts:
I'm running Magento ver 1.9.1 just to get that out there

Here's the situation:
The company I work for has 9 different magento stores running on it's live server. I was asked to create a new store-view/store. Rather than develop on a live server, I created a development server. Did a complete transfer of all magento files and database. On this development server I created and built the new site with it's new theme. Since then, we've had 3 weeks of customers/orders added to the live DB. I don't want to lose all that info, so just doing a db import from my development server is out of the question.

Here's what I've tried:

Moved all theme related files to their proper directory on the live site.
Imported tables cms_block, cms_page, core_config_data (edited the urls), core_store, and I know design_change table is supposed to be included, but it was empty so I didn't use that one.
I've changed local.xml to include the new store's info
Added symlinks in new sites folder as well as the index.php

When I navigate to the new site's url, I get this error message

Front controller reached 100 router match iterations

Trace:
#0 /var/www/html/MagentoImage/prolinehoods/app/code/core/Mage/Core/Controller/Varien/Front.php(179): Mage::throwException('Front controlle...')
#1 /var/www/html/MagentoImage/prolinehoods/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#2 /var/www/html/MagentoImage/prolinehoods/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#3 /var/www/html/MagentoImage/flagship/index.php(87): Mage::run('flagshipstorevi...', 'store')
#4 {main}

I've looked it up, I know there's a bunch of different things that could be causing it, I've ran through a few different debug solutions and nothing has helped.
Specifically the ones here: https://merchantprotocol.com/506/solved-front-controller-reached-100-router-match-iterations/

There's not a lot of information available on the interwebs for the situation that I'm in. I don't know how people develop for magento normally? Am I missing some tables that also need to be imported?

Would I be better off buying some magento extension that exports all customer and sales/order data for me, then just import my new version of the DB and then import the customer and sales data into that one?
It seems there's a lot more information available on importing/exporting customer information than there is for the situation I just described.


texts: Custom payment method not listed in checkout payment step in frontend

texts:
I am new to Magento2 and trying to create a custom payment method. I followed the tutorials from http://webkul.com/blog/create-custom-payment-method-magento2/ , http://webhintsexplorer.com/custom-payment-method-magento-2/ and http://www.magestore.com/magento-2-tutorial/2361-2/ creating three different modules. But none of them are showing my custom payment methods in the checkout page in the frontend though they are listed in the admin. Am I missing any steps or any commands that I need to run? I have already run these commands:

setup:upgrade
setup:di:compile
setup:static-content:deploy


texts:
I'm facing a problem with product magnifier on the product detail page. when i hover my mouse over an area in the product image it is more showing other parts of the image and the size doesn't increase. like in this capture

I tried to modify magnifier properties in the view.xml but it doesn't change anything.
Any help please !!


texts:
I would like to know if it's possible to get code html of transactional emails before send email to user with template variables etc...

I override _sendEmailTemplate and I try to get HTML code in this way:

protected function _sendEmailTemplate($template, $sender, $templateParams = array(), $storeId = null) {
        /** @var $mailer Mage_Core_Model_Email_Template_Mailer */
        $mailer = Mage::getModel('core/email_template_mailer');
        $emailInfo = Mage::getModel('core/email_info');
        $emailInfo->addTo($this->getEmail(), $this->getName());
        $mailer->addEmailInfo($emailInfo);

        // Set all required params and send emails
        $mailer->setSender(Mage::getStoreConfig($sender, $storeId));
        $mailer->setStoreId($storeId);
        $mailer->setTemplateId(Mage::getStoreConfig($template, $storeId));
        $mailer->setTemplateParams($templateParams);
        $emailTemplate = Mage::getModel('core/email_template')->loadByCode($template); // I try to get template

        $processedTemplate = $emailTemplate->getProcessedTemplate($templateParams); //set template variables and get html code
        print_R($processedTemplate);
        exit;
        $mailer->send();
        return $this;
    }

Comments in code.

It doesn't work. Any ideas will be appreciated


texts:
I want to create an event observer when admin update attribute from admin panel.
i've tried to use eav_entity_attribute_save_after and eav_entity_attribute_delete_after, but it's not working
I have not found any suitable event observer.
is in magento2 events for update eav attributes?


texts: Magento attributes displayed as tabs on product view page

texts:
I found a way how to add tabs to magento product view, through XML layouts with add tab, where every tab is actually a one phtml template (So I can set description, and attributes in example and retrieve that templates to show in tabs).

What I would like to do is to show every attribute as one tab. I suppose I should separate my attributes in separate phtml templates, and then call it in xml.

Can someone point me what should the PHP for retrieving attributes be alike? Also how should the XML reference for adding new attribute be alike?

I am using 1.7, and my attributes are normal one.

Thanks in advance.


texts: Magento 1.9 : How can i filter specific state inside foreach with Observer

texts:
How can I add if the condition for my for each loop,

my_observer :

<?php
    class Gta_GetOrderDetails_Model_Observer
    {
        public function getdetailsafterorder($Observer)
        {
            $order = $Observer->getEvent()->getOrder();
            $items = $order->getAllItems();
            $shipping_state = $Observer->getEvent()->getOrder()->getShippingAddress();
            if($shipping_state()->getRegion() == 'Kerala')
                {
                    foreach($items as $item)
                    {
                        $sku = $item->getSku();
                        $name= $item->getName();
                        $qty = $item->getQtyOrdered();
                        $price = $item->getPrice();
                        $shipping_state = $Observer->getEvent()->getOrder()->getShippingAddress();
                        $loggerInfo = ['sku' => $sku, 'name' => $name, 'qty' => $qty, 'price' => $price];
                        Mage::log(json_encode(print_r($loggerInfo, true)), null, 'event.log', true);
                    }
                }
            ### start test observer ###
            // $order = $Observer->getEvent();
            // Mage::log($order->getName(),null,'event.log');
             ### end test observer ###
        }
    }
?>

I just want to add shipping state as my filter.


texts: how to update top.links and other magento blocks without refresh page

texts:
how can we update value of mycart on top.links with out refresh magento page on add to cart event

 <script type="text/javascript" src="http://code.jquery.com/jquery-1.11.2.min.js" ></script>
 <script type="text/javascript">
//<![CDATA[
   $(document).ready(function()
    {
        $('#product-addtocart-button').click(function()
        {
            var formurl = "<?php echo $this->getUrl('checkout/cart/add') ?>";
            var datafile=$("#product_addtocart_form").serialize();
                $.ajax({
                type : 'POST',
                data : datafile,
                url  : formurl,
                success: function(responseText)
                {
                    //need code to update My cart on click event
                }
                });
            return false;
        });
    });
//]]>
</script>


texts: How to display the products in the wishlist of particular customer?

texts: I want to display the products which are contained in the wishlist of a particular customer. Pls can anyone help me in this.


texts:
I'm new to magento, I need help to develop following features.

Next previous post buttons to post view page
Show popular post in the widget area
A slider using recent post featured images.

Could find find much help resources for magento 2 fishpig :(


texts: How to get visual swatch image from attribute_id?

texts:
I want to get the visual swatch image from attribute_id, but I could not find how to get it.

I want to get swatch image in getBrand() method, I have got attribute_id and attribute_option_id.

<?php

namespace Vendor\Catalog\Helper;

use Magento\Catalog\Model\Product as ModelProduct;
use Magento\Store\Model\Store;
use Magento\Swatches\Helper\Data;

class Brand extends \Magento\Framework\App\Helper\AbstractHelper
{
    /**
     * @var TimezoneInterface
     */
    protected $_swatchesHelper;
    protected $_brandAttributeCode = 'brand';

    public function __construct(
        \Magento\Framework\App\Helper\Context $context,
        Data $swatchesHelper
    ) {
        $this->_swatchesHelper = $swatchesHelper;
        parent::__construct($context);
    }

    public function getBrand(ModelProduct $product){
        $attribute = $product->getResource()->getAttribute($this->_brandAttributeCode);
        //$attribute->getId();
        $label = $attribute->getFrontend()->getLabel($product);
        $attrValue = $attribute->getFrontend()->getValue($product);

        $attributeOptionIds = $attribute->getSource()->getOptionId($attrValue);

        //$swatch = $this->_swatchesHelper->getSwatchesByOptionsId($attributeOptionIds);

        if(strtolower($attrValue) != 'no' && $attrValue !='' && $attrValue !== 0){
            return array('name' => $attrValue, 'label' => $label, 'image' => '????');
        }
        return false;
    }

    public function getBrandHtml(ModelProduct $product){
        $brand = $this->getBrand($product);
        if($brand){
            return '<img src="'. $brand['image'] .'" alt="'.$brand['label'].':'.$brand['code'].'">';
        }
        return '';
    }

}


texts: Show All Attributes Of Filter Layered Navigation Before & After Applying Filter : magento2

texts:
I am Creating a functionality to show all attribute of layered navigation in magento2. All options of particular attribute must shown before & after applying filter in layered navigation.

I have debug this class for the same.

Magento\Catalog\Model\Layer\Filter\Attribute

Is there any specific method where filter options are added in filter attribute? where i can add all options to filter attribute..?


texts: Sort product collection by date in standart category view

texts:
I'm running Magento CE 2.3.3 with Porto theme.
I want to sort the products in the category overview by the date they were added without using an extra extension.
By default products in category view/category pages can be sortet by either position, product name, size, price. The pre selected sorting attribut is position.

Although there is a way to define new attributes, there is no way to create an attribute that sorts by date resp. newest first.

What is the smartest way to add this feature to Magento without adding much new code?
The question is related to the questions in these threads:Magento 2: Sort Product Collection by date added to category and Sort products by Date... Unfortunately I haven't figured it out yet.


texts: Magento 2.3 : Remove Constraint from db_schema.xml file

texts:
I just try to override db_schema.xml file of a core customer module into my custom module , but there is no success.

I need to remove a constraint defined in customer db_schema.xml file, how may I do that.

Thanks


texts: Get Configurable Product options, Price And Add to cart Button On Related Product Section

texts:
How to get Configurable Products options, price on related products sections. Also, put add to cart button on each product. right now related products show only the price as low as but want to add customer can also see configurable options and add cart button click then product should be added to cart without going to the product detail page.

can any help me?

Any kind of help will be appreciated.

Magento Version: 2.2.6


texts: I am getting error "PayPal gateway has rejected request. Authorization is voided (#10600: Authorization voided)." while cancelling order from Magento admin. Why I am getting this error and how to solve it.


texts:
I read the article Submitting an Magento 2 Extension and understood that it was necessary to provide the source code to technical review. But as I understand it, I need to choose a license for my module. I want my module to be paid one with non-distributable source code. If I understood correctly, the source code will be available for anyone who buys my module.

How to create a license in this case? Can I choose an existing one?


texts:
I display 4 recently viewed product in my home page. If cache is disabled in back end then only it works fine, other wise all the system have same product.

How  can  i fix it?


texts: Data from the default shipping address in customer grid

texts:
Magento OOTB is displaying data from default billing address in customer grid. I need data from default shipping address instead of billing. I made changes in indexer.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:Indexer/etc/indexer.xsd">
    <indexer id="customer_grid" view_id="customer_dummy" class="Magento\Framework\Indexer\Action\Entity" primary="customer">
        <fieldset name="shipping" source="Magento\Customer\Model\ResourceModel\Address\Collection">
            <reference fieldset="customer" from="entity_id" to="default_shipping"/>
            <field name="full" xsi:type="searchable" dataType="text" handler="ShippingAddressHandler"/>
            <field name="street" xsi:type="searchable" dataType="varchar"/>
            <field name="firstname" xsi:type="searchable" dataType="varchar"/>
            <field name="lastname" xsi:type="searchable" dataType="varchar"/>
            <field name="city" xsi:type="searchable" dataType="varchar"/>
            <field name="company" xsi:type="searchable" dataType="varchar"/>
            <field name="region" xsi:type="searchable" dataType="varchar"/>
            <field name="telephone" xsi:type="searchable" dataType="varchar"/>
        </fieldset>
    </indexer>
</config>

I run:

bin/magento indexer:reindex

and got this error:

 Customer Grid indexer process unknown error:
 SQLSTATE[42000]: Syntax error or access violation: 1070
 Too many key parts specified; max 16 parts allowed, query was:
 CREATE TABLE IF NOT EXISTS `customer_grid_flat`

How can I solve this? Maybe if I do not use billing data how can I remove it from indexer?


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

texts:
I am getting error when I am calling modal like this

setTimeout(function() { $('#site-pop-up').modal('show'); }, 2000);

Error in console:

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

Anyone have solution for this?

Thanks


texts: The [Send Email] [Invoice] [Ship] buttons work and send e-mail. Only manual status change that does not send mail


texts:
How do I  check if product has used  Products. I use the following snippet to get child products

$variants = $this->getCurrentProduct()->getTypeInstance()->getUsedProducts($product);

however if product does not have any child products this would generate a fatal error. So first I would like to check if product has any childs. How would I do that?


texts: Search is Not Returning An Entire Attribute Set of Products in Magento 1.13 EE (1.8 CE)

texts:
After upgrading to 1.13 EE (1.8 CE), an entire attribute set of products no longer shows up in search results. The products have visibility of 'Search' and the product page for this product works fine in both our 1.12 EE (1.7 CE) and 1.13 EE instances. The search works fine in 1.12 but fails entirely in 1.13.
The row is there in the catalogsearch_fulltext as seen here:

SELECT * FROM catalogsearch_fulltext WHERE data_index LIKE '%3402-757%';
+------------+----------+---------------------------------------------------------------------+-------------+
| product_id | store_id | data_index                                                          | fulltext_id |
+------------+----------+---------------------------------------------------------------------+-------------+
|    2443712 |        1 | ARCTICCAT-3402-757|Taxable Goods|Arctic Cat|Arctic Cat - 3402-757   |   139705308 |
|            |          | - V BELT, DRIVE||Authentic V BELT, DRIVE from Arctic Cat (Part#:    |             |
|            |          | 3402-757). UPC: 886224105147|Authentic V BELT, DRIVE from Arctic    |             |
|            |          | Cat (Part#: 3402-757). UPC: 886224105147|194.72|1                   |             |
+------------+----------+---------------------------------------------------------------------+-------------+

Did something change regarding search in 1.13 Is there something else I'm missing here?


texts:
I've been banging my head for a few hours now. I have setup a small Magento 2 module. It is enabled everything is working except the Setup scripts never run. Actually from my diagnosis right now, they aren't even required in the setup:upgrade process.

If it could be of any help here are the module configuration files:

registration.php:

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Wizbusiness_CustomerSubscriptions',
    __DIR__
);

etc/module.xml:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
                <module name="Wizbusiness_CustomerSubscriptions" setup_version="0.0.9" />
</config>

Setup/InstallData.php:

<?php
namespace Wizbusiness\CustomerSubscriptions\Setup;

use Magento\Framework\Module\Setup\Migration;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;

class InstallData implements InstallDataInterface
{
    public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
    {
        $setup->startSetup();

        $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);

        /** @var CustomerSetup $customerSetup */
        $customerSetup->addAttribute(
            Customer::ENTITY,
            'subscribedtags',
            [
                'type' => 'text',
                'input' => 'multiselect',
                'backend' => 'Magento\Eav\Model\Entity\Attribute\Backend\ArrayBackend',
                'global' => \Magento\Catalog\Model\Resource\Eav\Attribute::SCOPE_GLOBAL,
                'label' => 'Subscribed Tags',
                'required' => 0,
                'system' => 0, // <-- important, otherwise values aren't saved.
                               // @see Magento\Customer\Model\Metadata\CustomerMetadata::getCustomAttributesMetadata()
                'position' => 100,
                'filterable' => true,
                'option' => [ 'values' => ['Test', 'Test2', 'Test3' ] ]
            ]
        );

        $used_in_forms=array();
        $used_in_forms[]="adminhtml_customer";
        $used_in_forms[]="checkout_register";
        $used_in_forms[]="customer_account_create";
        $used_in_forms[]="customer_account_edit";
        $used_in_forms[]="adminhtml_checkout";
        $customerSetup->getEavConfig()->getAttribute('customer', 'subscribedtags')
            ->setData('used_in_forms', [$used_in_forms])
            ->setData("is_used_for_customer_segment", true)
            ->setData("is_user_defined", 1)
            ->save();
        $setup->endSetup();
    }
}

Also a smaller test in Setup/Recurring.php:

<?php
namespace Wizbusiness\CustomerSubscriptions\Setup;

use Magento\Framework\Setup\InstallSchemaInterface;
use Magento\Framework\Setup\SchemaSetupInterface;
use Magento\Framework\Setup\ModuleContextInterface;

class Recurring implements InstallSchemaInterface {

    protected $logger;

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

    public function install( SchemaSetupInterface $setup, ModuleContextInterface $context ) {
        touch("<path here>/recurring.txt");
        $this->logger->debug('This is running');
    }
}

If anybody knows what's up, please help me!


texts: How to refresh the module configuration after change the etc/config.xml?

texts:
I've created a module with default configurations into the etc/config.xml file, but I changed the default configuration and I'm not able to see them reflected into my module installed.

How could I refresh the installation to see these changes reflected in the admin panel?


texts:
I am having problem regarding the customer/session on Magento homepage.
Currently i can access and get all Customer information using customer/session but not in Homepage. In all other pages i can get the customer.
I have also made a clone of project on local machine (Ubuntu 16.04) which is identical as the online server. In local server i can get the correct Customer from session.

When i try to get the customer from session on Mage_Core_Controller_Varien_Action i get the correct Customer.

in Mage_Cms_IndexController in indexAction Method i get empty customer.

Any help is appreciated.


texts: I want to add a custom csv export to the customer grid page. Whats the best way to achieve this


texts: How to remove placeholder in textbox and note for email address shown in Checkout Page;Magento2

texts: I want to remove my placeholder in textbox as well as note for email address under Shipping address block.Can you please guide me.Thanks in advance.


texts: My products aren't showing up on my new store. Transactional website needs to share all the same products as default store

texts:
System > Manage Stores

Name, code, website are unique but it's going to share Root Category > Default Category.

System > Configuration > Web

All the URL's have been configured to point at the correct store. The website and all it's styles are populating. Just no products.

Catalog > Manage Products

I selected all and used the action dropdown to "update attributes". Hit submit. Then Websites left submenu > add product to websites. I select my new store and hit save.

I've ensured that all these products are enabled and have qty's associated with them and they have visibility correct.

Next, in SSH i ran php reindexer.php --reindexall

Magento ver. 1.13.1.0

Why are my products showing up? Is there something that i missed?


texts:
In Magento 2.1.8 Site All Pages Display Blank.

Link: http://dev.controllermodz.co.uk/controllermodz/

In Google Chrome Console Displays Error: Error parsing header X-XSS-Protection: 1; mode=block, 1; mode=block: expected semicolon at character position 14. The default protections will be applied.


texts: Magento 2 Cookie for specific domain without extra dot

texts:
I am trying to set the cookie for the specific domain(as I have multiple websites and I don't want to share them) so for this, I changed the configuration as OOTB Magento provides this feature (Stores > Configuration > General > Web Default Cookie Settings > Cookie Domain) and I added my domain and set the Cookie Path / and saved the configuration, clear cache, cookies . On the frontend side, I can see all cookie set to the to my domain expect form_key which is adding extra .(dot)

So is this correct way or am I missing something to set the cookie for the specific domain? and another question is

Why Magento adding . (dot) to only form_key cookie?


texts: Ajax load the category custom product collection on custom phtml?

texts:
I have a phtml file which displays all subcategory with its product.I want to load the products of particular category section using ajax when user select a radio button.Give me some solution.
sample code customphtml file.

<?php foreach ($categories as $category): ?>

        <a href="<?php echo $category->getUrl() ?>" class="clearfix">
            <?php if($thumbFile = $category->getThumbnail()): ?>
            <img src="<?php echo Mage::getBaseUrl('media') . 'catalog' . DS . 'category' . DS . $thumbFile;?>" alt="<?php echo $this->htmlEscape($category->getName()) ?>" />
            <?php endif;?>
            <?php echo $category->getName() ?>

    <?php
    $_helper = $this->helper('catalog/output');
    $products = Mage::getModel('catalog/product')
        ->getCollection()
        ->addCategoryFilter($category)
        ->addAttributeToFilter('type_id', 'simple')
         ->addAttributeToSelect('*');
        ->load();
    ?>
    <?php $toolbar = Mage::getBlockSingleton(‘catalog/product_list’)->getToolbarBlock();
    $toolbar->setCollection($products);
    $pager = $layout->createBlock(‘page/html_pager’);
    $toolbar->setChild(‘product_list_toolbar_pager’, $pager);
    echo $toolbar->toHtml();
    ?>
    <?php  if($toolbar-<getCurrentMode()!=grid)
    {
    ?>

    <?php foreach ($products as $product): ?>

        <?php // Product Image ?>
        <a href="<?php echo $product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->stripTags($this->getImageLabel($product, 'small_image'), null, true) ?>" />
        <?php // Product description ?>
       <input class="my-activity"
                     type="radio"
                     id="product<?php echo $_product->getId();?>"
                     name="<?php echo str_replace(" ","_",strtolower($catname['name'])) ?>"
                     value="<?php echo $_product->getId(); ?>"  <?php echo $checked; ?> onclick="saveselectedproduct(<?php echo $catname['catid']; ?>)">   <?php $_productNameStripped = $this->stripTags($product->getName(), null, true); ?>

<a href="<?php echo $product->getProductUrl() ?>" title="<?php echo $productNameStripped; ?>"><?php echo $_helper->productAttribute($product, $product->getName() , 'name'); ?>

    <?php endforeach ; ?>

      function saveselectedproduct(catid)
      {

                 url2="<?php echo      $this->getUrl('compatibility/compatiblelist/getcollection'); ?>";
              $j.ajax({
                        url:url2,
                        type: 'POST',
                        dataType: "json",
                        data:{catid:catid},
                        success: function(data) {
                               alert($data);
                        }});
            }
  </script>


texts:
I want to get category Id from order Item.

As we aware that we can get current_category on the product page.

but how to get that category from orderItem object.

We can get Product object via $orderItem->getProduct() but,

I am getting categoryIds() but I want specific Category Id  where the user
 come and add that product to cart.


texts: Magento2 Addtocart before plugin not working

texts:
I have created before plugin for Add to cart functionality to check if product's custom attribute called My Tshirt(which is text field type) value "Jack"  or "Jill".
Plugin work properly but in plugin code product is not loading the custom attributes.  it;s loading product's default attributes.  I tried to load the custom attribute using productRepository but unfortunately it's not working. I want return error message on the frontend if Attribute value is "Jill".   in plugin code you can see "$product->getMyTshirt()"  is not working also, if I try $product->getData('my_tshirt')  that's also not working.  How can I load the custom attribute value in there.
  <type name="Magento\Checkout\Model\Cart">
   <plugin name="interceptAddingProductToCart"
        type="Jackson\Wyss\Model\Checkout\Cart\Plugin"
        sortOrder="10"
        disabled="false"/>
  </type>

 <?php
  namespace Jackson\Wyss\Plugin\Model\Checkout\Cart;
 use Magento\Framework\Exception\LocalizedException;
 class Plugin
{
 /**
 * @var \Magento\Catalog\Model\ProductRepository
 */
protected $productRepository;

/**
 * @param \Magento\Catalog\Model\ProductRepository $productRepository
 */
public function __construct(
    \Magento\Catalog\Model\ProductRepository $productRepository
) {
    $this->productRepository = $productRepository;
}

public function beforeAddProduct($subject, $productInfo, $requestInfo = null)
{

    try {

        $product = $this->productRepository->getById($productInfo->getId());
        if($product->getMyTshirt() == 'Jill'){

           throw new LocalizedException(__('Could not add Product to Cart'));
       }

    } catch (\Exception $e) {
        throw new LocalizedException(__($e->getMessage()));

    }

    return [$productInfo, $requestInfo];

 }
 }

I tried to use observer controller_action_predispatch_checkout_cart_add as well. If I use that observer and add to cart on the frontend, it's simply reloading the page and in observer not getting product data as well.  I followed below article but still no luck.
Any help would be appreciated!
Magento2 - How to stop a product from getting added to cart programmatically?


texts:
I want to add tags to my products and my question is how do you organize this. What I know for now thinks to do.

I must change tags page url to look nicer

  NO: ../tag/product/list/tagId/1/

  YES: ../tag/My-Tag

I have found the nice post about that (not tested yet)
link: Magento rewrite tags url

I think the good idea would be to add some description about 300 words to every tag- I guess this would bust SEO - not really sure how to solve that.
Do you have any suggestions?

Thanks for any help.


texts:
I am using Magento 1.9.3.2 and when I search for mercedes on my site, it finds several products such as Original Mercedes-Benz Typenzeichen Zeichen Hecktür Flügeltür SPRINTER.

Now, when I search for mercedes-benz, it finds nothing. How could that be? Its also part of the name. I did a reindex of the search index, but that did not help. My search is set to like and fulltext.

Thanks for your help!


texts: Change the logo displayed in magento 2 checkout page

texts:
I want to change the logo that is being displayed in the checkout page. For rest of the pages the logo should remain same. Also, I should be able to manage this via admin panel.

Please check the attached screenshots:-

Logo in the home page:- https://prnt.sc/r89rxt
I want to change the logo in checkout page:- https://prnt.sc/r89skp

Please help.

Thanks in advance.


texts:
I created category with url key name is "xxxxx". I have changed that category url key to "YYYYY". INow i dont like that url key for that category. Again i changed the url key to "xxxxx". It throws "The value specified in the URL Key field would generate a URL that already exists.

Please help me to change the old url key."


texts:
I want to customize a sidebar filter in the category magento 1.

I have it customizable but when reloading, it shows the body part when the header is not clicked.

I want to click on the header, the body will display

My code:

Geschlecht

                Damen(1265)

                Herren(162)

Js


texts: Magento 2.3 - How to setup LEMP - Multi Website Localhost url setup on Nginx

texts:
For testing, we using Magento 2.3.4 in localhost [Centos 7 & Nginx]
Main-store Path & URL:
Path : usr/share/nginx/html/gomart - URL :  http:// 192.168.1.64:8077/
Multi-Store URL :
Path : usr/share/nginx/html/gomart/grocery - URL :  http:// 192.168.1.64:8077/grocery/
How to setup Multi-Website url into => nginx.conf.sample & index.php & .htaccess


texts:
I'm trying to reload the cart page with AJAX. I'd like to send a "checkout.cart" block via JSON to replace in AJAX call.
In my controller (I overrided CartController.php), I'm trying to call the line:

$checkout_page = $layout->getLayout()->getBlock('checkout.cart')->toHtml();
$response['checkout_block'] = $checkout_page;
$this->getResponse()->setBody(Mage::helper('core')->jsonEncode($response));

But a error happen

Fatal error: Call to a member function toHtml() on boolean in C:\D\Websites\magento\app\code\local\Excellence\Ajax\controllers\IndexController.php on line 211


texts: Clearing product collection in Product Listing without images - Magento 1.9

texts:
In our Magento project we have around 200 thousand skus and many of them are with incomplete information. So we made a filter to prevent products without images from appearing on the category pages.

<catalog_product_collection_load_before>
    <observers>
        <mymodel_catalog_product_collection_load_before_clean_images>
            <type>singleton</type>
            <class>mymodel/observer</class>
            <method>filterProductsWithoutImages</method>
        </mymodel_catalog_product_collection_load_before_clean_images>
    </observers>
</catalog_product_collection_load_before>

...

public function filterProductsWithoutImages($observer) {
    if (isset($observer['collection'])) {
        $collection = $observer['collection'];
        $collection->addAttributeToFilter('small_image', array('neq' => "no_selection"));

        return $this;
    }
}

Products without images are removed from the collection. The problem occurs with pagination. The filtered products generate "holes" in the product listing. Example:

Category Accessories: 100 SKUS active.

Page 1: 36 products.
Only 20 products are displayed, because 16 are without images.

Page 2: 36 products.
Only 9 products are displayed, because 27 are without images.

Page 3: 28 products.
The 28 products are displayed because they all have images.

So the problem is that after changing the collection, either through events catalog_product_collection_load_before or catalog_product_collection_load_after, the collection's pagination is not updated and the indices of the filtered products remain.

My questions:

In my understanding, the page was built after the load of the collection (so I was using the catalog_product_collection_load_before event). But because of this situation, it does not seem to be that way. How does it actually work?
Considering that if I edit the collection and load it again it can generate an infinite loop, how can I update the collection so as not to generate these "holes"?


texts: SQLSTATE[HY000] [1049] Unknown database after deleting local.xml?

texts:
I'm using Magento 1.9 need to reconfigure. So I deleted local.xml file but then it shows following error.

  SQLSTATE[HY000] [1049] Unknown database 'site_db'

Why this happens?


texts:
Columns in magento 2 has item sort order:

<item name="sortOrder" xsi:type="number">44</item>

But it doesn't change the column order. What need I to do to change columns order?


texts: New magento template file is not created in pub/static

texts:
I wanted to create a custom checkbox in checkout view.
I did it by adding the following code

<item name="showMore" xsi:type="array">
  <item name="component" xsi:type="string">Magento_Checkout/js/view/more</item>
  <item name="config" xsi:type="array">
    <item name="template" xsi:type="string">Magento_Checkout/more</item>
  </item>
</item>

The problem is that magento is looking for template file under pub/static/frontend/themeName/en_GB/Magento_Checkout/template/more.html and it is not there.

I tried to generate it by:

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
flushing magento cache
changing between dev and prod mode

but without any success. Am i missing something?

PS. Checkbox works good when i manually copy template file to pub/static, but this is probably not a solution right?..


texts: City field not required on checkout in Magento 2

texts: How to make city field not required on checkout?


texts: Magento 2 How can I change product name for category page only

texts: I want to replace all Product name with one Product Attribute in Category page only. Any idea how can I achieve it? Any suggestion or guidance? No need to provide code.


texts:
Is there a way to quickly remove unwanted categories via Magmi. I know it is possible to delete products en masse using Magmi, is it possible to do this with categories as well using a CSV with a list of categories to be removed?

Many thanks in advance.


texts: Disable log setting in Magento 1.9 then the URL admin page returns 404 error

texts:
Hi I just disabled log setting in Magento 1.9 in admin dashboard:

system-> configuration -> advanced -> developer -> log settings and change "enable log settings" from Yes to No.

After that, the URL admin page returns 404 error page then I cant login to admin dashboard anymore.

Any ideas how to fix this? Thanks in advanced.


texts: Use plugin after getImage() in Magento 2

texts:
I want to add text after image on product list page. For that I created plugin for getImage() function of vendor/magento/module-catalog/Block/Product/AbstractProduct.php

Plugin Code:

<?php

namespace Vendor\Module\Model;

class Product extends \Magento\Catalog\Block\Product\AbstractProduct
{
    public function afterGetImage(\Magento\Catalog\Model\Product $subject, $result)
    {
        $result .= 'Testing From Plugin';
        return $result;
    }
}

But I'm getting this error:

  Uncaught TypeError: Argument 2 passed to Magento\Catalog\Block\Product\AbstractProduct::__construct() must be of the type array, object given

What I am doing wrong?


texts: Magento2: Issue during config shipping methods - blocks hidden

texts:
When i try configure shipping methods after select this tab. Blocks They appear on the second and disappear. How to solve it?

M 2.3.4

log:

[2020-04-10 18:55:43] main.ERROR: Unable to resolve the source file for 'adminhtml/Magento/backend/en_US/tinymce.js' [] []
[2020-04-10 18:55:43] main.CRITICAL: Unable to resolve the source file for 'adminhtml/Magento/backend/en_US/tinymce.js' [] []
[2020-04-10 18:55:47] main.ERROR: Unable to resolve the source file for 'adminhtml/Magento/backend/en_US/tinymce.js' [] []
[2020-04-10 18:55:47] main.CRITICAL: Unable to resolve the source file for 'adminhtml/Magento/backend/en_US/tinymce.js' [] []


texts: Remove prefix and suffix from order create page in backend

texts:
I want to remove suffix and prefix field in billing and shipping address when i create order from backend.

can anyone help me how to do this


texts: How to add attributes to a custom table?

texts:
I would like to add some attributes to a custom table with an install script.
But whatever I try it didn't work.

$installer = $this;
$installer->startSetup();
$installer->addAttribute(custom_data, 'street', array( ... )

Magento just showed my an error page that this model doesn't exist.
But I have this table in my database.
What else am I missing?


texts: I am currently writing my first unit test. The basis of the test is I get all of the order information along with the items and create a JSON object from it. Is there a way to create dummy items and orders with preset data?


texts: Rest API to get thumbnail image in shopping cart

texts:
In rest api, I am using "rest/V1/carts/1/items" method to get the magento cart items. It works well and the result is
{
    "item_id": 1,
    "sku": "sk1",
    "qty": 4,
    "name": "test",
    "price": 10,
    "product_type": "simple",
    "quote_id": "1"
}
Any option to get product image in cart


texts: How to call phtml file from html in Magento 2?

texts:
I have included a custom button in checkout page on click of that I should get my phtml file as popup.

I have created a button in my custom module.

  \view\frontend\web\template\checkout\custom-checkout-page.html

Please help me in which path I should add my phtml file and how can I add it ?

Should I use any di?


texts: How to display Coupon code on cart page and checkout page?

texts:
My webshop is using Magento 1.9.3.2 using default OnePageCheckout.

See screenshot:

https://snag.gy/OinRzW.jpg

I found this article answere solution for my question:

Get Coupon code on cart page and checkout page?

I add below answere solution code from the question article at the bottom in file:

magento/app/design/frontend/YOUR_PACKAGE/YOUR_THEME/layout/local.xml

<block type="core/template" name="getcoupon" output="toHtml" template="custom/info.phtml">

    <block type="checkout/cart_coupon" name="checkout.cart.coupon" as="coupon" template="checkout/cart/coupon.phtml"/>

</block>

See screenshot of the added code in my local.xml:

https://snag.gy/F1ACQs.jpg

But this not result in showing the coupon code on checkout page.

To make it work right do I also have to add this same code to the file:

app/design/frontend/YOUR_PACKAGE/YOUR_THEME/template/custom/info.phtml ?


texts: Get Top Rated Products and Order by rating

texts:
I want to get Top Rated Products collection and sort it by ratings. I'm using the code but not working.

$collection->getSelect()->joinLeft(
                        'rating_option_vote_aggregated',
                        'e.entity_id = rating_option_vote_aggregated.entity_pk_value',
                        array('vote_count' => 'SUM(rating_option_vote_aggregated.vote_count)'))
                ->group('e.entity_id')
                ->order('vote_count ' . $this->getCurrentDirectionReverse());

  [2019-04-01 12:51:58] main.ERROR: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'vote_count ' in 'order clause', query was: SELECT e.*, 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, IF(at_status.value_id > 0, at_status.value, at_status_default.value) AS status, IF(at_visibility.value_id > 0, at_visibility.value, at_visibility_default.value) AS visibility, SUM(rating_option_vote_aggregated.vote_count) AS vote_count, stock_status_index.stock_status AS is_salable FROM catalog_product_entity AS e
   INNER JOIN catalog_product_index_price AS price_index ON price_index.entity_id = e.entity_id AND price_index.website_id = '1' AND price_index.customer_group_id = 0
   INNER JOIN catalog_product_entity_int AS at_status_default ON (at_status_default.entity_id = e.entity_id) AND (at_status_default.attribute_id = '97') AND at_status_default.store_id = 0
   LEFT JOIN catalog_product_entity_int AS at_status ON (at_status.entity_id = e.entity_id) AND (at_status.attribute_id = '97') AND (at_status.store_id = 1)
   INNER JOIN catalog_product_entity_int AS at_visibility_default ON (at_visibility_default.entity_id = e.entity_id) AND (at_visibility_default.attribute_id = '99') AND at_visibility_default.store_id = 0
   LEFT JOIN catalog_product_entity_int AS at_visibility ON (at_visibility.entity_id = e.entity_id) AND (at_visibility.attribute_id = '99') AND (at_visibility.store_id = 1)
   LEFT JOIN rating_option_vote_aggregated ON e.entity_id = rating_option_vote_aggregated.entity_pk_value
   INNER JOIN cataloginventory_stock_status AS stock_status_index ON e.entity_id = stock_status_index.product_id AND stock_status_index.website_id = 0 AND stock_status_index.stock_id = 1 WHERE (IF(at_status.value_id > 0, at_status.value, at_status_default.value) = '1') AND (IF(at_visibility.value_id > 0, at_visibility.value, at_visibility_default.value) = '4') AND (stock_status_index.stock_status = 1) GROUP BY e.entity_id ORDER BY vote_count ASC
   LIMIT 8 [] []


texts: Magento Security Scan not able to verify site

texts:
I am trying magento's New Magento Security Tool with below url

https://account.magento.com/scanner/index/form/

But i can not Verify Site Ownership, every time when i click on Verify Confirmation Code it's give me same error

Unable to verify this site. Please recheck your verification code and try again!

I have followed all step that provide in right block


texts: Invalid product ID throws PHP error in CMS

texts:
When specifying an incorrect product_id="" value (non existent product etc.) in a CMS page, it renders a PHP error on the page rather than any much less ugly alternatives. Is there a built in method to suppress these errors, or a clean way to have it redirect to a 404 page if the product isn't found?

      {{block type="catalog/product_view" product_id="12130" template="catalog/product/cms_piece/button.phtml"}}

Above is an example of how the product is being called. What's actually causing the error is that $product->getTypeId() is returning NULL, and Magento is trying to use that as an index for $typeModel in Catalog/Model/Product/Type.php.

The error can be solved by creating a conditional to check for null before allowing it execute:

            $typeModel->setConfig($types[$product->getTypeId()]);

This is a bit different of an issue than my original problem, but my concern is that this my not be the best way to solve this problem, as I don't know what effects this may have elsewhere.


texts: Magento Product Custom option in New Order Email

texts:
I am trying to remove Html tags from (Downloadable) Product Custom Option values, but cannot yet figure out, from which file product custom options are fetched in New Order Email ?

I edited the following file but no luck:

app/design/frontend/my_theme/default/template/email/order/items/order/default.phtml

From which file product custom options are fetched in New Order Email ?


texts: Magento 2 - Could not load content for ... (HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE)

texts:
I am using grunt with livereload to compile my less files. Grunt also generates source maps so that I can directly see in my browser, in which LESS files css code is located.
But often when I click to inspect it, then I get
Could not load content for https://www.company.de/pub/static/frontend/company/fresh/de_DE/css/source/lib/extend/main/header/header_main.less (HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE)
Why is this happening and how can I prevent it?


texts: How to table rate shipping charge apply with specific state?

texts:
I have Made one CSV for the table rate shipping method.
When I import CSV in the table rate shipping rate method.
Given this error We couldn't import this file because of these errors: Please correct Region/State "GJ" in Row #7.


texts: Magento 2 - send transactional email programmatically

texts:
I have created some custom transactional emails in the backend and would like to send them programmatically, perhaps with a simple custom form.
In Magento 1 it was possible to do this:
$localeCode = Mage::getStoreConfig('general/locale/code', Mage::app()->getStore()->getStoreId());
$emailTemplate = Mage::getModel('core/email_template')->loadDefault('custom_text_template',$localeCode);
$emailTemplateVariables = array('custom_text' => ''.$customText.'','title_title' => ''.$titleTitle.'');
$processedTemplate = $emailTemplate->getProcessedTemplate($emailTemplateVariables);
$emailTemplate->setSenderName(Mage::getStoreConfig('trans_email/ident_general/name'));
$emailTemplate->setSenderEmail(Mage::getStoreConfig('trans_email/ident_general/email'));
$emailTemplate->send($email, $name, $emailTemplateVariables);

In Magento 2 how can I do this?
Thanks for any help


texts:
I am new to Magento and Magmi but I succeeded in doing an ok Job with Mangento and Magmi on my local virtual server (Mamp). Now I want to go live but I can’t seem to use Magmi on my production server with Bluehost. When I import my product files, it just said NO FILE. I think it is a problem with permissions but I am not really sure. I tried to give 777 permissions to most of the files (Conf, state, …) but doesn’t seem to work. So I decided to go through CLI as I read it doesn’t need permission settings. But when I tried to import with the command line

php magmi.cli.php -mode=create -CSV:filename=/home3/tunique1/public_html/magmi/var/import/simple.csv

The follow error Log appears in CLI folder :

PHP Warning:  require_once(./inc/magmi_defs.php) [function.require-once]: failed to open stream: No such file or directory in /home3/tunique1/public_html/magmi/engines/magmi_productimportengine.php on line 11

PHP Fatal error:  require_once() [function.require]: Failed opening required './inc/magmi_defs.php' (include_path='.:/usr/lib64/php:/usr/share/pear:/home3/tunique1/public_html/magmi/inc:/home3/tunique1/public_html/magmi/integration/inc:/home3/tunique1/public_html/magmi/engines') in /home3/tunique1/public_html/magmi/engines/magmi_productimportengine.php on line 11

Could you help me with this problem ?


texts: Can multiple modules share a frontName in routes.xml?

texts:
In my current project I have developed several modules to add different pieces of functionality. I'd like the admin of each module to be managed from a shared frontName, for example:

Company_ProductModule (/admin/company/product/index...)
Company_CategoryModule (/admin/company/category/index...)
Company_CustomerModule (/admin/company/customer/index...)

I have another module, Company_AdminModule, which has this adminhtml/routes.xml:

<router id="admin">
    <route id="company" frontName="company">
        <module name="Company_AdminModule">
    </route>
</router>

The admin module has an adminhtml/menu.xml as follows:

<menu>
    <add id="Company_Admin::main" title="Company Name" module="Company_Admin" />
</menu>

Each module has an adminhtml/menu.xml as follows:

<menu>
    <add id="Company_Product::index" title="Product Management" module="Company_Product" parent="Company_Admin::main" action="company/product/" />
</menu>

This works in so far as the menu items are all added, and the URLs all look correct. However visiting each link added by a module which isn't Company_AdminModule just redirects to the admin homepage, I guess because it's looking for the controller in the Company_AdminModule module.

Is there any way to split out the controllers under this frontName, so each can sit within the correct module's Controller/Adminhtml/ directory?

Ultimately this is desirable because each additional module should be able to add to the admin menu (which it can) but also add to the URL structure in a 'neat' way.


texts:
In magento 2 how to get and  save a customer attributes value in db

  app/code/Cm/CustomerAttribute/etc/di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
  <type name="Magento\Checkout\Model\ShippingInformationManagement">
         <plugin name="Cm_CustomerAttribute::ShippingInformationManagement"
 type="Cm\CustomerAttribute\Plugin\Checkout\Model\ShippingInformationManagement"
 sortOrder="1"/>
  </type>
</config>

  app/code/Cm/CustomerAttribute/Plugin/Checkout/Model/ShippingInformationManagement.php

<?php
namespace Cm\CustomerAttribute\Plugin\Checkout\Model;

class ShippingInformationManagement
{
    /**
     * @param \Magento\Checkout\Model\ShippingInformationManagement $subject
     * @param $cartId
     * @param \Magento\Checkout\Api\Data\ShippingInformationInterface $addressInformation
     */
     protected $quoteRepository;
     public function __construct(

    \Cm\CustomerAttribute\Helper\Customerattribute $helper,
     \Magento\Quote\Model\QuoteRepository $quoteRepository
    ) {

        $this->helper = $helper;
         $this->quoteRepository = $quoteRepository;
    }

    public function beforeSaveAddressInformation(
        \Magento\Checkout\Model\ShippingInformationManagement $subject,
        $cartId,
        \Magento\Checkout\Api\Data\ShippingInformationInterface $addressInformation
    ) {
       $shippingAddress = $addressInformation->getShippingAddress();
    $shippingAddressCustomerAttributes = $shippingAddress->getCustomAttributes();
    if ($shippingAddressCustomerAttributes) {
        $customField = $shippingAddressCustomerAttributes->getTestAge();
        $shippingAddress->setTestAge($customField);
     }

    }

Custom field value not saved in db


texts: Apply tier price to cart for configurable products

texts:
does anyone know a way or extension for Magento2 that would achieve the following for configurable products and tier prices when added to the cart...

Tshirt sold in Blue, Green, Red

100 Tshirts = £1.50

200 Tshirts = £1.00

300 Tshirts = £0.50

Separately add 100 Blue Tshirts, 100 Green Tshirts, 100 Red Tshirts to the cart

Unit price of each item in the cart should be £0.50 (to reflect tier price) and not £1.50

Cart price rules and manual discounts are not feasible as there are too many tier prices and hundreds of products that this applies to.

Thanks for any help


texts: Configurable products are not created correctly

texts:
I have a custom product (configurables) importer from XML made by me. Things are not working fine. The products are created, but attributes and categories are not set properly. Maybe I'm missing some part, or not doing it right.

Categories tab of simple and configurable product are looking like this, though I have $product->setCategoryIds($o['categoryids']); where $o['categoryids'] = Array ( [0] => 190 ). 190 leads to Shop → Events → Homecoming.

Asociated products are correct, but if you pay attention at the color you see nothing there but it should be 'Print'.

The tab with custom options for simple product (style should not be there, and color must be Print, size - one of [00, 0, 2]):

The tab with custom options for configurable product:

Full code of MainFormController.php (file with importing code) is on pastebin (Alert: Messy code where logic may not be found). First is called postAction method.

Contents of XML: http://pastebin.com/B7JaG1y9 (simplified: 1 product, 3 sizes and 1 color as trying to do in the code).

Create configurable product is called with the following args: enter link description here

Args for create simple product: http://pastebin.com/AVV2AE9Q

print_r($configurableProductsData): http://pastebin.com/WTpW8Q2F

print_r($attributesData): http://pastebin.com/VThyRP1F

Information about attributes (attributes and values): http://pastebin.com/ibB33Mku

Update 1

The problem with attributes was at:

$product->setData($key, $value);

When setting simple product attributes, you must pass the value id not the value itself.

$product->setData($key, $value_index);

Now remains the problem with the categories. A stange thing is that I created a simple product following the tutorial from http://www.danneh.org/2012/05/creating-products-programmatically-magento, and the same problem is there.

Update 2

Well, I added manually a product to Magento (tests for categories). And I saw that, even for that product the problem is. So I need to make a new question, because it's not related to configurable products.


texts:
I have a custom module, with an IndexController and an indexAction. This has a route with a fronName set in the config.xml(for example angular-app). On this page I have an angular app, with it's own routing. Everything works fine until I don't refresh the browser. After refresh I get 404.
How can I setup magento's router to handle every request under the angular-app with the IndexController:indexAction.

So what I would like:

request: http://domain.com/angular-app -> IndexController:indexAction
request: http://domain.com/angular-app/x/y/z -> IndexController:indexAction where x, y, z are dynamic parameters.


texts:
I am learning version 1.9.

How to turn off bread crumb?