texts: Out of memory when compiling Magento 2 - increasing memory doesn't work

texts:
When compiling Magento 2, I'm getting the error:

  Fatal error: Out of memory (allocated 294125568) (tried to allocate 32
  bytes) in /vendor/zendframework/zend-code/src/Scanner/FileScanner.php
  on line 36

I've read a ton of answers to this question, and everyone suggests using -dmemory_limit to increase memory while compiling. I've tried 756M, 4G, 5G, 8G, 16G, etc and it still doesn't work.

Any ideas?


texts: adding new custom attribute product into cart remove the other cart products

texts: I have an issue by adding custom attribute product into cart remove the other already added cart items. I have checked by applying base theme, disabling install module replace the fresh core files of code/core/mage/checkout directory but issue still existing. Kindly help me to solve this issue thanks in advance


texts:
I want to show all products, stacked in a nice list, one on top of each other.

I am using {{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" template="catalog/product/list.phtml"}} but it is showing the items as a grid because  list.phtml is what my category uses to display products.

How can I just get a list:

product 1
product 2
product 3

etc. ?


texts: Soap Error - Procedure 'loginParam not present'

texts:
I'm getting a soap error, and I haven't been able to trace it.  It is blocking an integration and generally causing havoc.  Since it is happening immediately with login, I haven't been able to trace it further.

Fatal error: Uncaught SoapFault exception: [SOAP-ENV:Server] Procedure 'loginParam' not present

reflected similarly in the apache error log:

PHP Fatal error:  Procedure 'loginParam' not present in /var/www/html/lib/Zend/Soap/Server.php on line 889

This occurs when trying to log in with a valid username/password (which work on the v1 API):

$api_url_v2 = "https://xxx/api/v2_soap/?wsdl=1";
$cli = new SoapClient($api_url_v2);
$session_id = $cli->login($username, $password);

I've tried flushing my WSDL cache, as suggested here:
https://stackoverflow.com/questions/12425909/magento-soap-2-api-fatal-error-procedure-login-not-present

I've also tried modifying my WSI-Compliance settings, to no avail.

Any help would be appreciated.

Additional info:
I traced out the incoming client call, and see this... although it certainly doesn't look right to me, I've never been a SOAP guy:

<?xml version="1.0" encoding="UTF-8"?>\n<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:Magento"><SOAP-ENV:Body><ns1:loginParam/><param1>{SOME_PASSWORD}</param1></SOAP-ENV:Body></SOAP-ENV:Envelope>

The headers look like this:

{"Host":"some-server.com","Connection":"Keep-Alive","User-Agent":"PHP-SOAP\\/5.6.20","Content-Type":"text\\/xml; charset=utf-8","SOAPAction":"\\"\\"","Content-Length":"235"}

So... my username appears to have been lost, and I'm not even sure if it is calling the right thing.


texts:
I have 77K products in magento admin and out of 77K products 60K products are visible on front.
The quantity of rest of the product is zero(0).

There is one attribute named "Model" whose type is dropdown.
This dropdown have 2585 options.

Issue:
When I try to open product listing page its taking too much time to load products.

Is there any one who can guide me to decrease page load?


texts: How to fire jQuery event when all shipping methods are loaded in Magento2 checkout page?

texts: I want to fire some jQuery event when all shipping methods are completely loaded on checkout page. Which function of which file is to be used? please help.


texts: Magento 2 Conflicting component dependencies (Fooman)

texts:
I have a problem while trying to update to Magento 2.1
I'm running 2.0.6 currently, and have updated to this version before without a problem.

Now I'm getting a dependencie error

We found conflicting component dependencies. Hide detail

Command "update" failed: Loading composer repositories with package information

[UnexpectedValueException]
RecursiveDirectoryIterator::__construct(vendor/fooman/packages): failed to open dir: No such file or directory

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [packages1] ... [packagesN]

I think it has something todo with a module from Fooman. But I don't understand why, because they were stable up and running till this moment.

I have to solve this problem to continue the update process.

-------- Edit (14:59 28-06-2016):

Okay thanks the answer of Kristof and Vinai the above problem has been fixed. But now I'm getting other Dependencie errors also with Foomans modules

We found conflicting component dependencies. Hide detail

Command "update" failed: Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Installation request for magento/product-community-edition 2.1.0 -> satisfiable by magento/product-community-edition[2.1.0].
- fooman/emailattachments-m2 2.0.3 requires magento/module-sales ~100.0.2 -> satisfiable by magento/module-sales[100.0.2, 100.0.3, 100.0.4, 100.0.5, 100.0.6, 100.0.7].
- Can only install one of: magento/module-sales[100.1.0, 100.0.2].
- Can only install one of: magento/module-sales[100.1.0, 100.0.3].
- Can only install one of: magento/module-sales[100.1.0, 100.0.4].
- Can only install one of: magento/module-sales[100.1.0, 100.0.5].
- Can only install one of: magento/module-sales[100.1.0, 100.0.6].
- Can only install one of: magento/module-sales[100.1.0, 100.0.7].
- fooman/pdfcustomiser-m2 2.1.1 requires fooman/emailattachments-m2 ~2.0.0 -    > satisfiable by fooman/emailattachments-m2[2.0.3].
- magento/product-community-edition 2.1.0 requires magento/module-sales 100.1.0 -> satisfiable by magento/module-sales[100.1.0].
- Installation request for fooman/pdfcustomiser-m2 ~2.1 -> satisfiable by fooman/pdfcustomiser-m2[2.1.1].


texts:
Rest api is not working in local server magento 1,
I taken module from github, it's working fine in server, but in localhost it displays the html code of home page. how to configure apache2 to work for rest api


texts: How does one persist a extension attribute in the Order addresses?

texts:
I created a extension attribute for my customer addresses using this tutorial.

How can I copy them to the order addresses when I finish the checkout and display them in the order?


texts: GetBlockHtml, getChildHtml by name or alias - Magento 1.9

texts:
A small reminder to be sure, If I'm not mistaken;

When an alias is declared in a child block, we called it by the alias instead of the name.
When an alias is declared in a block, we called it by the name instead of the alias.

Here I call my child in catalog/product/list.phtml like this :

<?php echo $this->getBlockHtml('my.test'); ?> //it works.

<?php echo $this->getBlockHtml('testoo'); ?> ///it doesn't work, it's logic.

<?php echo $this->getChildHtml('my.test'); ?> //it doesn't work, it's logic.

<?php echo $this->getChildHtml('testoo'); ?> //it doesn't work ?.

<catalog_category_view>
    <reference name="root">
        <block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">
            <block type="core/template" name="my.test" as="testoo" template="page/test/itest.phtml"/>
        </block>
    </reference>
</catalog_category_view>


texts: Accessing child product which has been added to cart

texts:
I can't seem to find a solution for this issue where I have bundle parent products with child products and need to display the selected child product's attributes at the cart, such as dates and times.

I've had a look at a few posts on how to do this (more or less), including the following:

$session = Mage::getSingleton('checkout/session');
foreach ($session->getQuote()->getAllItems() as $item)
{
    // Load the configured product options
    $options = $item->getProduct()->getTypeInstance(true)->getOrderOptions($item->getProduct());
     // Just dumping array content
     echo "<pre>"; var_dump($options);
}

This gives me a ["bundle_options"] array with some information like option_id, label, value, however it doesn't give me a product ID i could use to access the attributes I need.

I've also looked at the checkout/cart_item_renderer block but can't really see anything here I can use either.

Grateful for any pointers on how to do this, pretty new to magento!


texts: Custom layout update not shown for CMS page

texts:
I've made a custom layout update file according to the instruction (https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/xml-manage.html) in 2.4.1, but the option is not displayed for a CMS page I'm creating. I'm expecting a LegacyHomepage option to appear.
Current theme: [vendor]_legacy
CMS page ID: legacy-homepage
Layout file location: app/design/frontend/[vendor]/legacy/layout/cms_page_view_selectable_legacy-homepage_LegacyHomepage.xml
I can't tell what's incorrectly set up. I'd appreciate if anyone can spot anything.


texts: Magento 2: Checkout order summary show custom product attribute failed to load component issue

texts:
I'm trying to show custom product attribute in checkout order summary section.
I have achieved this by override vendor/magento/module-checkout/view/frontend/web/js/view/summary/item/details.js
and vendor/magento/module-checkout/view/frontend/web/template/summary/item/details.html files in my custom module and also created plugin
for getconfig() method to store custom attribute in totalsData.

My question is:

1] If i override vendor/magento/module-checkout/view/frontend/web/js/view/summary/item/details.js file using
app/code/Test/Checkoutsummary/view/frontend/requirejs-config.js file then custom attribute shows in order summary but product thumbnail image not showing and in console js error shows as below:

app/code/Test/Checkoutsummary/view/frontend/requirejs-config.js

var config = {
    map: {
        "*": {
            'Magento_Checkout/js/view/summary/item/details': 'Test_Checkoutsummary/js/view/summary/item/details'
        }
    }
};

2] If i override vendor/magento/module-checkout/view/frontend/web/js/view/summary/item/details.js file using
app/code/Test/Checkoutsummary/view/frontend/layout/checkout_index_index.xml layout file instead of requirejs-config.js file then custom attribute shows as well as all section looks proper and
also no error found in console.

app/code/Test/Checkoutsummary/view/frontend/layout/checkout_index_index.xml

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

So i'm not figure out why it shows console error when override summary/item/details.js file
using requirejs-config.js file.
Having anybody faced this type of issue? Any help should be appreciated. Thanks


texts: Store Specific Product Pricing in Magento 2

texts: Need to setup branch specific pricing.600 Branches available each branch has same products but different pricing. Need to use zipcode to differentiate users and navigate them to corresponding branches/products. How can we do this in Magento 2 ? How much customisation needed ? is it possible to create 600 store views based on branches and set different price same product in different store views ? is it efficient ?


texts: Customer´s IP recognization without registration or logging in

texts: I´m looking for Magento extension which recognizes the customer´s IP (user´s country) and based on that, shows (without registration/logging in/checking out) the individual prices with VAT (EU-customer) or without VAT (non EU-customer).


texts: Magento 2: Installed security patch using ssh on magento 2.1.2

texts: Please can you explain me how to install the latest security patches in Magento 2.1.2 via SSH.


texts: CSS not showing for "NEW" or "SALE" label

texts:
So I followed this tutorial to add "NEW" or "SALE" label for this site: http://www.ubertheme.com/docs/add-product-labels/. The label does show up on the product icon but for some reason the CSS isn't showing.

Current code for the app\design\frontend\default{theme}\template\catalog\product\list.phtml

<?php

?>
<?php

?>
<?php
    $_productCollection=$this->getLoadedProductCollection();
    $_helper = $this->helper('catalog/output');
?>
<?php if(!$_productCollection->count()): ?>

<?php echo $this->__('There are no products matching the selection.') ?>

<?php else: ?>
<?php $i=1; ?>

<?php $i=0; foreach ($_productCollection as $_product): ?>

<?php

$_product = Mage::getModel('catalog/product')->load($_product->getId());

$attribute = $_product->getResource()->getAttribute('label');

 if(is_object($attribute)) {

  $attdefaultvalue = $attribute->getDefaultValue();

  $attributeValue = Mage::getModel('catalog/product')->load($_product->getId())->getlabel();

  $attributeValueName = Mage::getModel('catalog/product')->load($_product->getId())->getAttributeText('label');

   if(strlen($attributeValue) &&  ($attdefaultvalue !== $attributeValue)) {

    $labeltype = $attributeValueName;

    }

    else {

    $labeltype = "";

   }

 }

?>

<?php if ($labeltype): ?>

 <span class="<?php echo $labeltype; ?>-label"><?php echo $labeltype; ?>

<?php endif; ?>

 <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'); ?>" width="162" height="162" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />

<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?>

<a href="<?php echo $_product->getProductUrl() ?>"><img src="<?php echo $this->getSkinUrl('images/product_read_more.png', array('_secure' => true)) ?>" alt="" />

<? if( $i%5 == 0)

                   { ?>
<?php }
                  else {
                    ?>

<?php
                  }

               ?>
<?php $i++ ; endforeach ;  ?>

<?php endif; ?>

And my CSS: skin\frontend\default{theme}\css.style
has this code in it

/*Product Label*/
.products-grid .NEW-label {
    background: #15ae75;
    padding: 2px 5px;
    position: absolute;
    right: -5px;
    top: -5px;
    color: #fff;
    text-transform: uppercase;
    font-size: 92%;
    border-radius: 3px;
}
.products-grid .DISCONTINUED-label {
    background: #ef4135;
    padding: 2px 5px;
    position: fixed;
    position: absolute;
    right: -5px;
    top: -5px;
    color: #fff;
    text-transform: uppercase;
    font-size: 92%;
    border-radius: 3px;
}


texts:
How to Add new Country In Magento 2.4.1
How to Add new Country In Magento 2.4.1


texts: filter data using addFieldToFilter() Condition in block file magento2

texts:
I need to filter values based on and condition in my custom table

id    status   categoryid

and i have to filter data according to status and categoryid
my current code is

$collection = $this->collectionFactory->create()->addFieldToFilter('status', 1);

how can i filter data based on status and categoryid


texts: Magento 2 Redis Deprecated Functionality Causing Magento not to Start

texts:
Magento 2 is failing to start. The logs show this error:

  Deprecated Functionality: implode(): Passing glue string after array is deprecated. Swap the parameters in vendor/colinmollenhour/credis/Client.php on line 1414

Also

  Implode with historical parameter order: Passing parameters to implode() in reverse order is deprecated, use implode($glue, $parts) instead of implode($parts, $glue).

I have a standard Redis installation and this is part of it (although I did not install it directly):
https://github.com/colinmollenhour/Cm_RedisSession

There is no custom code in the site. Redis was installed in the usual way according to these Magento Dev Docs.

Here's the code referenced by the error message:

   1406     /**
   1407      * Build the Redis unified protocol command
   1408      *
   1409      * @param array $args
   1410      * @return string
   1411      */
   1412     private static function _prepare_command($args)
   1413     {
   1414         return sprintf('*%d%s%s%s', count($args), CRLF, implode(array_map(array('self', '_map'), $args), CRLF), CRLF);
   1415     }

Has anyone run into this error yet? Is there a solution (other than disabling Redis)?

Version info:

Magento ver. 2.3.3
redis 5.0.7
redis-cli 5.0.7

EDIT: I opened an issue on GitHub.


texts:
I'm working on a store that only has downloadable products in it. I need to get each customer's downloadable products and be able to sort them by product name and sku. My current code works in retrieving all the download links.

$purchasedItems = Mage::getResourceModel('downloadable/link_purchased_item_collection')
            ->addFieldToFilter('purchased_id', array('in' => $purchasedIds))
            ->addFieldToFilter('status',
                array(
                    'nin' => array(
                        Mage_Downloadable_Model_Link_Purchased_Item::LINK_STATUS_PENDING_PAYMENT,
                        Mage_Downloadable_Model_Link_Purchased_Item::LINK_STATUS_PAYMENT_REVIEW
                    )
                )
            );

However, this does not return the product name nor the sku. So I am attempting a join on the collection to the catalog_product_flat table.

$productTableName = Mage::getSingleton('core/resource')->getTableName('catalog/product_flat');
$purchasedItems->getSelect()
            ->join(array('products' => $productTableName), 'main_table.product_id = products.entity_id', array('products.*'));

Doing a var_dump($purchasedItems) returns a Mage_Downloadable_Model_Resource_Link_Purchased_Item_Collection Object. But I cannot iterate over the $purchasedItems.

Any help would be greatly appreciated.


texts: Filters on the dashboard don't work with the Spanish dashboard

texts:
When I put the panel in Spanish the filters stop working:

Why can this be? And how can I fix it?
Thank you so much!!


texts: Adding import table rate csv function for custom shipping module

texts:
i make new custom shipping module for magento shipping, just wondering actually how to make import csv function in main website, Thanks

                <import translate="label">
                    <label>Import</label>
                    <frontend_type>import</frontend_type>
                    <backend_model>jne_adminhtml/system_config_backend_shipping_mycarrier</backend_model>
                    <sort_order>40</sort_order>
                    <show_in_default>0</show_in_default>
                    <show_in_website>1</show_in_website>
                    <show_in_store>0</show_in_store>
                </import>

class MyCustomization_MyCarrier_Model_Adminhtml_System_Config_Backend_Shipping_MyCarrier extends Mage_Core_Model_Config_Data
{
    public function _afterSave()
    {
        Mage::getResourceModel('mycarrier_shipping/carrier_mycarrier')->uploadAndImport($this);
    }
}


texts: Magento order export import crashes 500 internal error

texts:
When I want to transfer my orders and customer details to the new environment we've build I get an error that I cannot define.

When pressing import the system redirects me to a 500 internal error in the browser.

Where do I find the error logs to find out where this is going wrong? I cannot find the problem anywhere.


texts: Magento 2 | manipulate minicart product name

texts:
I want to manipulate the product name within the minicart.
Check the picture below:

I can't find out which template is generating this.


texts: 404 with sample data on 1.9 with URL Rewrite off?

texts:
I've just installed the sample-data on a Magento 1.9.0 and none of the links work even after turning off URL rewrites and reindexing everything.

With URL rewrites ON, no catalog links will work.

With URL rewrites OFF, only the top level catalog links work.

With off, I get top level links like mysite.com/index.php/women.html and this works fine. The child links, turn into mysite.com/women/new-arrivals and this results in 404. If I manually add the index.php it will resolve correctly as in mysite.com/index.php/women/new-arrivals.

I have already tried reindexing everything numerous times, clearing all caches, and all to no effect. How do I get the child links to resolve correctly?


texts: Magento composer The system cannot find the path specified. (code: 3)

texts:
I am executing composer install but getting below error

# composer install
Loading composer repositories with package information
The following exception may be caused by a stale entry in your cmd.exe AutoRun
Check https://getcomposer.org/doc/articles/troubleshooting.md#-the-system-cannot-find-the-path-specified-windows- for details

  [UnexpectedValueException]
  RecursiveDirectoryIterator::__construct(/var/www/html/magento/zipextensions,/var/www/html/magento/zipextensions): T
  he system cannot find the path specified. (code: 3)

install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...


texts:
Magento Version 1.9.3.7

The scenario is:

I need to set up a Catalog Price Rule for specific brand's products.
So i set up condition "Manufacturer  is  BrandName".

Now I need to exclude some product from thet rule.

If i set up "SKU  is not one of" with just one sku it works fine, but if is an array of skus the rule will be applied to all catalog.

The follow is applied to all catalog:

If ALL  of these conditions are TRUE :

    Manufacturer  is  BrandName
    SKU  is not one of  sku1, sku2

the follow works as expected:

If ALL  of these conditions are TRUE :

    Manufacturer  is  BrandName
    SKU  is not one of  sku1

the follow works as expected:

If ALL  of these conditions are TRUE :

    Manufacturer  is  BrandName
    SKU  is one of  sku1, sku2

Guess the array will break the condition set so that it will result "empty condition" than good for all products.


texts: Magento 2 Product duplicate generates unlimitted file

texts: I migrated M1 data to M2. After that on product duplication from admin process continue (loader displaying) and product images start duplication. In 30 GB space filled just after process started.


texts: I want to override the product/price/amount/default.phtml in my custom module

texts:
I am creating a extension that will be modifying products price across the website. For this I need to override the product/price/amount/default.phtml.

What I have tried so far is:

Created a custom module with:

  Vendor/ModuleName/view/base/layout/catalog_product_prices.xml

<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/layout_generic.xsd">
    <block class="Magento\Framework\Pricing\Render\RendererPool" name="render.product.prices">
        <arguments>
            <argument name="default" xsi:type="array">
                <item name="default_render_class" xsi:type="string">Magento\Catalog\Pricing\Render\PriceBox</item>
                <item name="default_render_template" xsi:type="string">Magento_Catalog::product/price/default.phtml</item>
                <item name="default_amount_render_class" xsi:type="string">Magento\Framework\Pricing\Render\Amount</item>
                <item name="default_amount_render_template" xsi:type="string">Vendor_ModuleName::product/price/amount/default.phtml</item>
                <item name="prices" xsi:type="array">
                    <item name="special_price" xsi:type="array">
                        <item name="render_template" xsi:type="string">Magento_Catalog::product/price/special_price.phtml</item>
                    </item>
                    <item name="tier_price" xsi:type="array">
                        <item name="render_template" xsi:type="string">Magento_Catalog::product/price/tier_prices.phtml</item>
                    </item>
                    <item name="final_price" xsi:type="array">
                        <item name="render_class" xsi:type="string">Magento\Catalog\Pricing\Render\FinalPriceBox</item>
                        <item name="render_template" xsi:type="string">Magento_Catalog::product/price/final_price.phtml</item>
                    </item>
                    <item name="custom_option_price" xsi:type="array">
                        <item name="amount_render_template" xsi:type="string">Magento_Catalog::product/price/amount/default.phtml</item>
                    </item>
                    <item name="configured_price" xsi:type="array">
                        <item name="render_class" xsi:type="string">Magento\Catalog\Pricing\Render\ConfiguredPriceBox</item>
                        <item name="render_template" xsi:type="string">Magento_Catalog::product/price/configured_price.phtml</item>
                    </item>
                </item>
                <!--<item name="adjustments" xsi:type="array"></item>-->
            </argument>
        </arguments>
    </block>
</layout>

Change the  default_amount_render_template path in the code above.

  Vendor/ModuleName/view/base/templates/product/price/amount/default.phtml

Copied this file from the Magento_Catalog Module

Made changes but no effect.


texts: We enabled cash on delivery for UAE only and 2checkout for all countries. When I select UAE as billing adress and shipping adresss as different place in UAE then both payment methods are showing. But problem when I select different country as billing address and UAE as shipping adsress at that time only 2checkout is showing. I am using lotusbreath one page checkout.


texts: Wrong Shipping cost calculation and rounding error on checkout page

texts:
if you add this product (for example) to the card on the /checkout/cart/ page the Shipping cost are wright €2.95

But in the checkout page /onestepcheckout/ the Shipping cost are €2.96 (wrong).

How do i get it also €2.95 here?

Thanks!


texts: How can i add custom values in quote using REST api

texts:
i have tried this solution Add Custom Field in Order and Quote Table To be Used in REST API.
But still the custom field values are not setting in quote table.
Here is my payload for POST request

<base_url>/rest/V1/carts/mine/items

Payload:
{
    "cart_item": {
        "sku": "H6S4K461FDD192",
        "qty": 1,
        "quote_id": "256",
        "product_option": {
            "extension_attributes": {
                "custom_options":  [
                    {
                        "option_id":"374",
                        "option_value":"1522"
                    },
                    {
                        "option_id":"373",
                        "option_value":"898"
                    },
                    {
                        "option_id":"372",
                        "option_value":"895"
                    }
                ],
                "configurable_item_options": [
                    {
                        "option_id": "93",
                        "option_value": "110"
                    }
                ]
            }
        },
        "extension_attributes": {
            "layaway":"1",
            "downpayment":"1838.00",
            "finalpayment":"1444.50",
            "duration":"30",
            "bank_name":"Bank Name",
            "layaway_multipay":"0",
            "multi_pay_initial":"0"
        }
    }
}

i want to set values of layaway,downpayment finalpayment duration bank_name layaway_multipay multi_pay_initial in quote table
i have also added extension_attributes.xml


texts: when i want add to cart product it showing error Your session has expired how i solve this problem.


texts:
I used below controller to export Product Information. It export But my problem is all value come only header. How to display proper format

public function exportmeAction(){
      try{
        $products = Mage::getModel("catalog/product")->getCollection();
        $products->addAttributeToSelect('category_ids');
        $products->addAttributeToSelect('*');
        $products->addAttributeToFilter('status', 1);//optional for only enabled products
        $products->addAttributeToFilter('visibility', 4)
        ->joinField('qty',
                         'cataloginventory/stock_item',
                         'qty',
                         'product_id=entity_id',
                         '{{table}}.stock_id=1',
                         'left');;//optional for products only visible in catalog and search
        $content = '"Product Id","Product Name","Product Sku","Product Url", "Product Image Url","Category Ids","Description","Product Qty","Special Price", "Price"\n';
        foreach ($products as $product){
            $content .= $product->getSku() . ",";
            $content .= $product->getName() . ",";
            $content .= $product->getId() . ",";
            $content .= $product->getProductUrl() . ",";
            $content .= $product->getDescription() . ",";
            $content .= (int)$product->getFinalPrice() . ",";
            $content .= (int)$product->getPrice() . ",";
            $content .= (int)$product->getQty() . ",";
            $content .= (string)Mage::helper('catalog/image')->init($product, 'image') . ",";
            $content .= implode('|', $product->getCategoryIds()) . ",";//change the category separator if needed
            $content .= "\n";
        }
      }

       catch (Exception $e) {
            echo 'Error Message: '.$e->getMessage();
      }
      Mage::getSingleton('core/session')->addSuccess("Done");
      $this->_prepareDownloadResponse('export.csv', $content, 'text/csv');
   }


texts:
I need to be able to add an SKU column to the Best Sellers report. I have managed to add the column to the page by adding:

$this->addColumn('sku', array(
            'header'    => Mage::helper('Sales')->__('Skus'),
            'width'     => '100px',
            'index'     => 'skus',
            'type'      => 'text',
        ));

to the _prepareColumns() function but I cannot work out where I need to select the SKUs from in the Mage_Sales_Model_Resource_Report_Bestsellers class.

Anyone have any ideas? Thanks in advance.

EDIT:

Added this join to _prepareColumns but still not getting any data:

$resourceCollection = Mage::getResourceModel($this->getResourceCollectionName());
$resourceCollection->join('catalog/product', 'product_id = entity_id', '*');
 $resourceCollection->setPeriod($filterData->getData('period_type'));
        $resourceCollection->setDateRange($filterData->getData('from', null), $filterData->getData('to', null));
        $resourceCollection->addStoreFilter($storeIds);
        $resourceCollection->setAggregatedColumns($this->_getAggregatedColumns());


texts:
We need some changes done in the PDF that magento gives. I've looked at many guides and have found some solutions that work but are not really how I want it to be done. Many guides tell you to copy the files you want to edit, paste it in the local folder and make your changes there. But the changes are really small so I wanna know if there is a better way to make these small changes. The changes have to be done in these 2 files.

App/code/Mage/Core/Sales/Model/Order/Pdf/Abstract.php
App/code/Mage/Core/Sales/Model/Order/Pdf/Invoice.php

And all that we are going to change on these files are some colours. We could also override these classes but one of the classes is an abstract class. I am not sure if it's right to extend these and change them in local.


texts: How to install language that are not in Locale Magento2

texts:
I am new to magento,

I want to add language options(Burmese) for magento website, my current magento version is 2.2.8.

At first I run this command to get burmese language pack and I think that language pach file is successfully installed.

composer require mageplaza/magento-2-burmese-language-pack:dev-master

Package "mageplaza/magento-2-burmese-language-pack:dev-master" listed for update is not installed. Ignoring.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Installing mageplaza/magento-2-burmese-language-pack (dev-master 1f9bd6a): Cloning 1f9bd6acb0 from cache
Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.
Generating autoload files

But problem is when I try to run the following command.

 php bin/magento setup:static-content:deploy my_MM

and I got these error,

 [Magento\Framework\Exception\LocalizedException]
 NOTE: Manual static content deployment is not required in "default" and "developer" modes.
  In "default" and "developer" modes static contents are being deployed automatically on demand.
 If you still want to deploy in these modes, use -f option: 'bin/magento setup:static-content:deploy -f'

I think this error is over Burmese Language will be shown in locale, any suggest is greatly appreciated.

Thanks!!


texts: How to show only 5 items in wishlist Magento 2

texts:
On customer account I only want to show just 5 items of wishlist.
How can I do this ?  item.phtml is

    <?php $iterator = 1; ?>
    <?php if (count($block->getItems())): ?>

        <?php foreach ($block->getItems() as $item): ?>
        <?php /* @escapeNotVerified */ echo($iterator++ == 1) ? '
getId() . '">' : '

getId() . '">' ?>

                <?php foreach ($columns as $column): ?>
                    <?php $column->setItem($item); echo $column->toHtml($item);?>
                <?php endforeach; ?>

        <?php echo($iterator == count($block->getItems())+1) ? '
' : '' ?>
        <?php endforeach; ?>

    <?php else: ?>

            <?php /* @escapeNotVerified */ echo __('This Wish List has no Items');?>

    <?php endif; ?>

<?php foreach ($columns as $column): ?>
    <?php echo $column->getAdditionalHtml();?>
<?php endforeach; ?>


texts: Setting session in the frontend not accesible in the Observer

texts:
Here is how i setup session:

<?php
    error_reporting(E_ALL | E_STRICT);
    $mageFilename = 'app/Mage.php';
    require_once $mageFilename;
    $app = Mage::app('default');
    Mage::app();

    Mage::getSingleton('core/session', array('name' => 'frontend'));

    ini_set('display_errors', 1);

    $customer_id = Mage::getSingleton('customer/session')->getId();

    $GrandTotal = Mage::getModel('sales/quote')->loadByCustomer($customer_id)->getGrandTotal();
    $HalfTotal = $GrandTotal / 2;

    $PcPay = Mage::getSingleton('core/session')->getPcPayment();
    $result = array();
    if($PcPay != "") {
    $result['GrandTotal'][] = $GrandTotal;
    } else {
        $result['GrandTotal'][] = $HalfTotal;
    }
    echo json_encode($result);
    Mage::getSingleton('core/session')->setPcPayment('pc_payment');
    Mage::getSingleton('core/session')->unsPayOnDel();
    ?>

Then in the observer when i try:

$PcPay = Mage::getSingleton('core/session')->getPcPayment();
Mage::log("PCPAYMENT - $PcPay");

After that in the system log it seems the session is not set. It seems it's empty.

Why i can not use the frontend session to the observer, is it possible and how ?


texts: How to use OR operator to refer the two different attribute in rest api filter?

texts:
can we use OR operator to refer the two different attribute?
Ex: delivery_status table has two different column like sms_status and email_status.
Need to get records which are delivered either from sms or email.
Below one considering all attribute as AND.
rest/v3/status/56/?limit=10&offset=0&filter[1][attribute]=mail_status&filter[1][in][1]=4&filter[1][in][2]=1&filter[0][attribute]=sms_status&filter[0][in][1]=4&filter[0][in][2]=1


texts: Add to cart one product with different size at once in product listing page magento 2.3

texts:
I want my customers to add products with different size at once in the shop cart, is this possible ? can anyone help me ?
please see attached screenshot:
https://imghostr.com/F2QnsQgR


texts:
This is very strange. Magento displays (but does not charge, just displays) some taxes twice or more after payment. It's not at the summary in the checkout, it's in order, in invoices and my account. So after the payment.

There is no logic, for example number of taxes displaying not depends of number of products ... I'me coming crazy o0   !


texts:
I would like to add a collection type attribute.
A field with several informations.

It's like field_collection of drupal8.

I was thinking about a grid, but is it possible to add a grid attribute?

In my product I want to add a field (duplicable) that contains: a title, a text and an image.

Which procedure do you recommend?


texts: Magento 2: Basic Product Tables to Display on Admin & Frontend Side [SOLVED]

texts:
What are the basic tables which need to use, so Product will be shown in Admin & Frontend as well?

No need for extra attribute/image as well. Required fields & Enabled Product.

As I seen below 2 tables required. Not sure about other tables

catalog_product_entity
catalog_category_product
catalog_category_product_index
catalog_eav_attribute
catalog_product_website
catalog_product_entity_text
catalog_product_entity_varchar
catalog_product_entity_datetime
catalog_product_entity_decimal
catalog_product_entity_int
catalog_product_flat_1
catalog_product_index_price
cataloginventory_stock_item
cataloginventory_stock_status
cataloginventory_stock_status_idx
eav_entity_attribute
eav_attribute_option_value
url_rewrite

As I'm unable to import products from Backend. I'm thinking of alternatives.

Please re-confirm the above tables. This gonna be also tough. It's better someone can help with the Admin Side Product Import Issue

Magento 2: Product Import Error - Product Type is invalid or not supported. Duplicates found in column names [SOLVED]

https://github.com/magento/magento2/issues/6939


texts: level 2 menu is not collapsing on mobile (Magento 2.3 Parent theme-Luma)

texts:
I have created a three-level menu using Magento Admin It works great on desktop. But the third level menu is not collapsing on mobile view. Please check the image. Yellow highlighted links are the second level menu.

Here is what I need help with:
First of all, second level menu should be in collapsed mode. And, when "Painting" is clicked on mobile, it should open up the third level menu items (Oil, Acrylic, Watercolor and so on) + "All Paintings " button on top just like how "All Collections" button is shown.


texts: Grunt watch doesn't watch _theme.less and custom less file

texts:
That's my css/source file structure:
https://i.stack.imgur.com/5tNxJ.png

I made grunt clean, theme exec, theme less, watch.
Watch is responsive to any less file changes accept of _theme.less and local.less located level us (css/local.less). Local.less was already added to theme.js:

files: [
  'css/styles-m',
  'css/styles-l',
  'css/local'
],

local and _theme compiling well with grunt less but not responsive for grunt watch. The problem is related ot this two file only, all others including modules extends are watching by grunt ok.

Any ideas?

Grunt less output:

Running "less:base" (less) task
File pub/static/frontend/MaxTheme/base/en_US/css/styles-m.css created: 307.72 kB → 529.6 kB
File pub/static/frontend/MaxTheme/base/en_US/css/styles-l.css created: 51.13 kB → 89.83 kB
File pub/static/frontend/MaxTheme/base/en_US/css/local.css created: 25 B → 242 B

UPD: Just checked /pub/static, the two less files placed not as symlinks, but as regular less files.


texts: "There has been an error processing your request" but no /var/report directory

texts:
I have 1.9.1 and finished building the site a few days ago. Nothing was ever wrong, now all of a sudden this morning I get an error on ALL pages frontend and admin:

  There has been an error processing your request Exception printing is
  disabled by default for security reasons.

  Error log record number: 189535875249

I have tried following the instructions here and here but it seems this is for a different version of Magento as I do not have var/report. So I have no idea where to even check this specific error but from everywhere I can see I need to manually create a tmp folder and edit some core code. I guess some Magento developer decided havint the install create the correct directories was not important and the better solution was to crash people's frontend a few days after install with no warning.

Can anyone tell me where the var/report has been moved?


texts:
I am trying to generate a coupon through the Magento 2 REST API. It works, except that I cannot change the usage_limit and expiration_date. They are always set to the values of the rule. Is there any way around this, except creating a new rule for every new coupon?

Request:

{
    "coupon": {
        "rule_id":14,
        "code":"aaabbb",
        "usage_limit":10,
        "expiration_date":"2017-03-19",
        "type":"1"
    }
}

Response:

{
  "coupon_id": 11,
  "rule_id": 14,
  "code": "aaabbb",
  "usage_limit": 2147483647,
  "usage_per_customer": 0,
  "times_used": null,
  "expiration_date": "2064-03-14",
  "is_primary": null,
  "type": 1
}


texts: Magento2: how to fetch product id from local storage in observer

texts: i want product id from local storage in observer is there any easy way to do it?


texts: How to Hide Disabled Payment methods in Admin Configuration in Magento 2?

texts: I want to hide all the disabled Payment Methods (Ex:Bank Transfer,Purchase Order,Authorize.net etc) in   Stores → Configuration → Sales → Payment Methods.


texts: Magento 2 - Multiple collection on same block

texts:
I have a block where I want 3 different collections with different category filters. I have created collection object in constructor like this:

protected $collection;
public function __construct(
    ...
    \Magento\Catalog\Model\ResourceModel\Product\Collection $collection,
    ...
)
{
    $this->collection = $collection;
    ...
}

This is my function where I am getting collection

public function getMyCollection($categories)
{
    $collection = $this->collection;

    //$this->productCollection->addAttributeToSelect('*');

    //Enable filter
    $collection->addAttributeToFilter(
        'status', array('eq' => \Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED)
    );

    $collection->setVisibility($this->visibility->getVisibleInSiteIds());

    $collection->addCategoriesFilter(array('in' => $categories));

    //Setting up pagination
    $collection->setPageSize(10)
        ->setCurPage(1);
    //echo $collection->getSelect();

    return $collection->load();
}

The problem that I am facing is, when I call this function for first time, it runs properly, if I call it 2nd time, then it is not refreshing previous filters and adding new filters along with previous ones.

like categories in(23,24) AND categroies in(25,26)

How can I get multiple collections with single object with different filters everytime?


texts: How to remove comma separator from price in magento 2.1?

texts: How to remove comma separator from the price in magento2.1 Product List and Product page?


texts:
I need to remove the Home link from the Breadcrumbs (i.e., from Home > Catalog > Product to simply Catalog > Product).

I looked at how to override the _prepareLayout() method of \Magento\Catalog\Block\Breadcrumbs (Change Breadcrumbs Home link's URL 2.1), and that works fine.

However, when I remove the addCrumb method that adds the Home breadcrumb, it removes the Home breadcrumb from the beginning of the list as expected, but the Home breadcrumb gets added again at the end of the list (i.e., Catalog > Product > Home)!

Is there another file appending the Home breadcrumb? How do I remove the Home link completely?


texts: Magento 1.9 fatal error Mage_Configurableswatches_Helper_Productimg' not found

texts:
i faced with a Fatal error: Class 'Mage_Configurableswatches_Helper_Productimg' not found in /app/Mage.php on line 547 while flushing the swatch image cache.

Please let me know how to fix this issue?


texts:
I'm having a problem with the new 2.3.5 version but only on one of our websites.

I've been using this query for months and it was working well, but since we updated to 2.3.5, it does not work anymore.

The query :

{
products(
  filter:{
    sku:{
      eq:"test_dev_product"
    }
  }
)
{
  items{
    tier_prices{
      qty,
      value
    }
  }
}

}

It's a basic one, but it seems that it throws this error with Postman :

  Uncaught Error: Cannot instantiate interface Magento\Framework\GraphQl\Query\ErrorHandlerInterface in magentoRoot/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php: 50
Stack trace:
#0 magentoRoot/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer-&gt;create('Magento\\Framewo...')
#1 magentoRoot/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(167): Magento\Framework\ObjectManager\ObjectManager-&gt;get('Magento\\Framewo...')
#2 magentoRoot/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(273): Magento\Framework\ObjectManager\Factory\AbstractFactory-&gt;resolveArgument(Array, 'Magento\\Framewo...', NULL, 'errorHandler', 'Magento\\Framewo...')
#3 magentoRoot/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(236): Magento\Framework\ObjectManager\Factory\AbstractFactory-&gt;getResolvedArgument('Magento\\Framewo...', Array, Array)
#4 magentoRoot/vendor/magento in <b>magentoRoot/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php

As it is doing well on 2 websites and not this one, maybe someone found something ? Some says that the SSL is the problem but I can't find a way to disable it on graphql only.

Thank you for your time,


texts:
Having problems with js Files on my local install backend/frontend. I get 404 on all referenced JS files. I already cleaned couple of times the cache and deleted pub/static but the same problem occurs. I have developer mod enabled.

If I try to access directly require.js I get

File '/...../' does not exists.
vendor/magento/module-media-storage/Model/File/Storage/Response.php(59): Magento\Framework\File\Transfer\Adapter\Http->send


texts: Magento load layout handle directive programmatically

texts:
In an e-mail template I found this layout handle which is displaying an overview of purchased products:

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

I'm trying to load this layout handle somewhere in an encapsulated environment. But I don't know how to render the content. This is what I have made so far:

require '../app/Mage.php';
Mage::init();

ini_set('xdebug.var_display_max_depth', -1);
ini_set('xdebug.var_display_max_children', -1);
ini_set('xdebug.var_display_max_data', -1);

$orderId = 200001234;
$order = Mage::getModel('sales/order')->loadByIncrementId($orderId);

/* Rendering Layout Block, but how?! */
// echo {{layout handle="sales_email_order_items" order=$order}}

This is the XML-Defintion of the layout handle

<sales_email_order_items>
    <block type="sales/order_email_items" name="items" template="email/order/items.phtml">
        <action method="addItemRender"><type>default</type><block>sales/order_email_items_order_default</block><template>email/order/items/order/default.phtml</template></action>
        <action method="addItemRender"><type>grouped</type><block>sales/order_email_items_order_grouped</block><template>email/order/items/order/default.phtml</template></action>
        <block type="sales/order_totals" name="order_totals" template="sales/order/totals.phtml">
            <action method="setLabelProperties"><value>colspan="3" align="right" style="padding:3px 9px"</value></action>
            <action method="setValueProperties"><value>align="right" style="padding:3px 9px"</value></action>
            <block type="tax/sales_order_tax" name="tax" template="tax/order/tax.phtml">
                <action method="setIsPlaneMode"><value>1</value></action>
            </block>
        </block>
    </block>
    <block type="core/text_list" name="additional.product.info" />
</sales_email_order_items>


texts: How to make a simple ajax call in Magento 2.1.0

texts:
I have added a simple button in one of my phtml file.

<input type='button' name='emq_zip_btn' class='emq_zip_btn' value='Go'>

I have added one custom js file ("emq.js") from a custom module (Ved_Mymodule) :

require([
    "jquery",
    "jquery/ui"
], function($v){
//<![CDATA[
    $v = jQuery.noConflict();
    $v(document).ready(function()
    {
        console.log('jquery loaded from emq.js');
        $v(".emq_zip_btn").on('click',function(e)
        {
            console.log('clicked');
        });
    });
//]]>
});

When I click on the above button then "clicked " is printed in the console i.e. jQuery is working properly.

Here is a controller file from a custom module Ved_Mymodule:

Ved\Mymodule\Controller\Index\Index.php:

<?php

namespace Ved\Mymodule\Controller\Index;

use Ved\Mymodule\Model\NewsFactory;
use Magento\Framework\App\Action\Action;
use Magento\Framework\App\Action\Context;

class Index extends Action
{
    /**
     * @var \Tutorial\SimpleNews\Model\NewsFactory
     */
    protected $_modelNewsFactory;

    /**
     * @param Context $context
     * @param NewsFactory $modelNewsFactory
     */
    public function __construct(
        Context $context,
        NewsFactory $modelNewsFactory
    ) {
        parent::__construct($context);
        $this->_modelNewsFactory = $modelNewsFactory;
    }

    public function execute()
    {

    }
}

Ved/Mymodule/etc/frontend/routes.xml:

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

My question is how to return a data from this controller method and then access it via jQuery i.e. How to make a simple ajax call after that button clicked.


texts: Can i run a magento2 store that sells goods to US and EU customers from a server that is in Germany(EU)?

texts:
I have a magento2 store that is running on a dedicated server that is located in Germany(EU). I started selling in EU so at that time it made sense to host it there.
Question is: if I want to start selling to US customers will it have a huge impact on performance? Should I expect a very slow loading time for US customers? Or should it be ok?
P.S I've done a few tests with two cloud servers with dedicated resources one from US/NY and one from EU/GE/Berlin, both of them running a basic apache installation. The loading time for the basic apache2 welcome page was US ~100ms and EU ~200ms (Both tests done on a pc in US/TX). Will this translate into a much longer loading time for my magento2 store?


texts: Magento Blank/White Screen for specific IP Address

texts:
I am using Magento-1.9 version. I cant login at the back end with the IP address of my workplace.
But at home it is working and for other networks also working.

I get a blank/white screen after login.
I've tried to clean cache and browser settings everything.

In the var files i don't have error log. I upgraded my magento version 1 year ago.

This is what i see in my .htaccess file

RewriteCond %{REQUEST_METHOD} ^TRAC[EK] RewriteRule .* - [L,R=405]


texts: Inserting a Static Block In Category Page - Avoid Cache

texts:
I want to place a specified Static Block in my category page on my Magento site. The code should look up if a specifically named Static Block exists, and if so display the content of it. I do this on a product page absolutely fine, but it appears that the Block Cache in a category breaks it.

I am using the code

 echo $this->getLayout()->createBlock('cms/block')->setBlockId("$categoryBlock")->toHtml();

Where $categoryBlock is a generated string in the form category_bluewidget or category_redwidget. In the Static Blocks I have set up separate blocks called category_bluewidget, category_redwidget etc.

The first page I visit the code works perfectly, however the block appears to be cached and the rest of the pages show the same CMS block on them, not the one that should show.

If I go to admin and turn off Blocks HTML output it works fine, I don't want to do that though as it will slow the site down terriibly. I am looking at just stopping this Static Block cache.


texts:
I know how to register, how to get the value from registry and how to unregister.

for register

$this->_coreRegistry->register('customer_save_observer_executed_' . $customer_Data->getId(),true);

for get the value from register

$this->_coreRegistry->registry('customer_save_observer_executed_' . $customer_Data->getId())

for unregister

$this->_coreRegistry->unregister('customer_save_observer_executed_' . $customer_Data->getId());

Now I don't know how long register will hold this information untill if I unregister.

Expecting valuable suggestions/help?


texts:
I'm using magento 1.9 version.

I am creating custom module, which contains some javascript functions to be included.

I defined all javascript functions in seperate js file and included that js in my xml file under app\design\mytheme\default.

Called the js function in my phtml file. It shows the error : (index):403 Uncaught ReferenceError: myFunction is not defined. How to solve this.


texts: Removed products from a category but still showing

texts:
I removed a bunch of products from a category and it's still showing in the webshop.

What I've done is:

Reindexed all indexes
Cleared all caches

Another problem that keeps happening is that I can not sort this category and few of the subcategories as well.

Does anyone know how to solve both of these problems? I appreciate any help I can get with this.


texts:
I need to update the prices of my simple products so that they appear properly in my Google Shopping data feed. A systematic/automatic approach is likely overkill since we only currently have about 60 products of almost 3000 with super attribute pricing. Ideally I would generate a report that lists which items are affected, and I can update their prices manually.

I've located the database table with the values (catalog_product_super_attribute_pricing), but I'm unclear on how to reference those values to the actual products that are affected.

How would I reference the catalog_product_super_attribute_pricing table values to actual products?
Is there a better way of figuring out which items are affected by super attribute pricing that I'm completely missing?


texts: Get Image Url In Custom Email Template From Theme - Magento2

texts: The following code exists in Magento 1 to get an image in template syntax, is there a way to do this in Magento 2 and load an image from my theme for the email template? I want to add additional images to the footer.


texts: How to show weight in kg and gm on product list page

texts:
In product list weight is 0 gm. I set weight in admin panel, but it's weight show in 0 gm..? I set code in

  app/design/frontend/rwd/default/template/catalog/product/list.phtml

code is:

<?php
     $_weight = $this->htmlEscape($_product->getWeight());
  if ($_weight < 1)
    $_weightstr = number_format($_weight*1000) . " gm";
  else
    $_weightstr = number_format($_weight) . " kg"; echo $_weightstr; ?>

Please help...!


texts: Errors while submitting module in Magento Marketplace: Magento 2

texts:
I created a custom module in Magento 2 and packaged it for submitting it to the Magento marketplace. The composer.json file is as below,

{
  "name": "vendor/module",
  "description": "text that describes the module",
  "type": "magento2-module",
  "version": "1.0.0",
  "license": [
    "OSL-3.0",
    "AFL-3.0"
  ],
  "require": {
    "php": "~5.5.0|~5.6.0|5.6.5|7.0.0|7.0.2|7.0.4|~7.0.6",
     "magento/framework": "~100.0.19"
     },
  "authors": [
    {
      "name": "Vendor",
      "email": "mail@domain.com",
      "homepage": "http://www.something.com/",
      "role": "Developer"
    }
  ],
  "autoload": {
    "files": [ "registration.php" ],
    "psr-4": {
      "Vendor\\Module\\": ""
    }
  }
}

After the packaging and submission of the module in Marketplace, the module was rejected from the technical review with Installation errors as below,

Command: setup:di:compile
Installation issue:
Proxies code generation... 1/7 [====>-----------------------] 14% 1 sec 44.0 MiB
Repositories code generation... 1/7 [====>-----------------------] 14% 1 sec 44.0
MiB PHP Fatal error: Class 'Vendor\Module\Block\Adminhtml\Items\AbstractItems' not found in /var/www/html/vendor/vendor/module/Block/Adminhtml/Quote/View/Items/Renderer/DefaultRenderer.php on line 23
    [Pipeline] }
    [Pipeline] // stage
    [Pipeline] sh
    [DockerOperationsPHP70Magento20CEVarnish] Running shell script
    + echo Failure
    Failure

However, when I run the setup:di:compile in local I could not find any issue.
Also, the Class Vendor\Module\Block\Adminhtml\Items\AbstractItems does exist and working fine in local.

I have already gone through the relevant links as below but didn't find the solution.

Errors during installation- Submitting Package to Magento Marketplace
Installation issues on packaging a module: Magento 2
Error while submitting Extension to Magento2

I have no clue on what can be the issue out here. It has been a long time that I could not submit the module to marketplace since I am still stuck with the issues here.
Please, can anyone help?


texts:
I want to enable a admin tab 'Products' once after saving data in other three tabs. That tab should contain a product grid(product name and product id).

The product collection in the grid should be filtered on the basis of an attribute code. For example in Manage Products if I have selected red for attribute color. That product should be displayed in grid.

How is it possible? Please help.


texts: Mysql Server Gone away on Hostgator server with magento

texts:
I am having issue with a Magento website with 1.9.x version.
A strange issue started appearing.

I attached logs of Magento


texts: Varnish Turpentine - Failed to apply the VCL

texts:
I've installed Varnish Turpintine on our staging site by following the instructions on the Magento-Turpintine wiki.

Our site is on Ubuntu 14.04, NGINX, varnish-4.0.3m,  Turpentine v0.6.5, Magento 1.9.2.

These are my DAEMON_OPTS in /etc/default/varnish

DAEMON_OPTS="-a :80 \
             -T localhost:6082 \
             -f /etc/varnish/default.vcl \
             -S /etc/varnish/secret \
             -p cli_buffer=16384 \
             -p feature=+esi_ignore_other_elements \
             -p vcc_allow_inline_c=on \
             -s malloc,256m"

I installed the turpentine module successfully, only really changing the config for the Secret Varnish Authentication Key with the \n appended, URL Blacklist and enabling debug info.

When I tried saving my configuration I got the bellow error:

Failed to apply the VCL to 127.0.0.1:6082: Got unexpected response code from Varnish: 106 Message from VCC-compiler: directors are now in directors VMOD. ('input' Line 27 Pos 1) director default round-robin { ########---------------------- Running VCC-compiler failed, exited with 2 VCL compilation failed

This is what I have in the Turpentine generate var/default.vcl file:

vcl 4.0;
C{
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <pthread.h>
static pthread_mutex_t lrand_mutex = PTHREAD_MUTEX_INITIALIZER;
void generate_uuid(char* buf) {
pthread_mutex_lock(&lrand_mutex);
long a = lrand48();
long b = lrand48();
long c = lrand48();
long d = lrand48();
pthread_mutex_unlock(&lrand_mutex);
sprintf(buf, "frontend=%08lx%04lx%04lx%04lx%04lx%08lx",
a,
b & 0xffff,
(b & ((long)0x0fff0000) >> 16) | 0x4000,
(c & 0x0fff) | 0x8000,
(c & (long)0xffff0000) >> 16,
d
);
return;
}
}C
import std;
director default round-robin {
{
.backend = {
.host = "127.0.0.1";
.port = "8080";
.first_byte_timeout = 300s;
.between_bytes_timeout = 300s;
}
}
}
director admin round-robin {
{
.backend = {
.host = "127.0.0.1";
.port = "8080";
.first_byte_timeout = 21600s;
.between_bytes_timeout = 21600s;
}
}

I was seemingly able to fix this by creating the custom_include.vcl file from version-4.vcl  as it was missing

cp app/code/community/Nexcessnet/Turpentine/misc/version-4.vcl app/code/community/Nexcessnet/Turpentine/misc/custom_include.vcl

But now when I try to save the configuration I get a new error:

Failed to apply the VCL to 127.0.0.1:6082: Varnish data to write over length limit by 749 characters

This seems to be related to the -p cli_buffer=16384 which I set in the DAEMON_OPTS at /etc/default/varnish.  When I try increasing this I still get the same error but with a different limit.

Failed to apply the VCL to 127.0.0.1:6082: Varnish data to write over length limit by 8941 characters.

I have nothing in magento/var/log/ or /var/log/varnish/ for Varnish. I tried chacking the Varnish Admin to see if there was anything wrong with the cli_buffer but could see nothing of note.

$ sudo varnishadm
varnish> param.show cli_buffer
200
cli_buffer
        Value is: 16k [bytes]
        Default is: 8k
        Minimum is: 4k

        Size of buffer for CLI command input.
        You may need to increase this if you have big VCL files and use
        the vcl.inline CLI command.
        NB: Must be specified with -p to have effect.

Thanks in advance for any advice suggestions.


texts: Disabled products missing in product grid

texts:
All my disabled products don't show up in the product admin grid. I have no filters enabled on the view and tried re-indexing several times.

I'm on version 2.2.3

The screen above shows 89 products but I know if I can guess an unpublished product ID I can get to it by making the url manually.


texts:
First Magento Site.
This has been the most difficult CMS to jump into it seems.
Brand new Magento install. 1.9.0.1

I've added this to my home page as suggested in other threads to create a product list on the home page.
{{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" category_id="2" products_count="400" column_count="6" template="catalog/product/list2.phtml"}}

I get what looks like an attempt to create a list but it seems the foreach isn't looping and the page gets cut off.  Only one product lists.  I thought this may be CSS related and they might be stacking.  But it actually only has one product listed in the code.

I've followed steps here:
Show products on homepage magento 1.9

I've checked to make sure all are visible, enabled, default category etc.
http://www.aschroder.com/2010/07/why-are-my-magento-products-not-showing-up/

also, none of the details are listing like in the old default Magento template.
products list fine when using the old default template vs. RWD template.

At a loss.

as you can see from the image I have 28 items which it recognizes but its only listing one.


texts: SOAP v2 api "The operation has timed out"

texts:
We are running a product update from a custom .net API via the SOAP connector in Magento 1.9.

After about 3 hours we get the following error

  The operation has timed out SKU 6X2XXXX9030

I can not find an error in the Apache log or the system.log in Magento

UPDATE:Client shared this error

  19 records threw the error.. last timeout found 29/09/2015 13:11:54
  Unable to connect to the remote server SKU jk5825jkk37k3

The php timeout

[root@magento log]# php -i | grep max_exec
max_execution_time => 0 => 0


texts: Magento 2 : Custom Report with Two Table Join issue

texts:
I am facing issue with a custom report with multiple table join.

I have created a custom collection into _initSelect function.

While I am print this query and run manually on a database server its run perfectly and I get data what I want. But it in the normal case it's not working. Also without joining its working fine and I got data in grid.xml

protected function _initSelect()
{
    parent::_initSelect();

    $collection = $this->getSelect()->reset(\Zend_Db_Select::COLUMNS)
                 ->columns(['product_id','name']);

    $this->getSelect()->join(
        ['secondTable' => $this->getTable('sales_order')],
        'main_table.order_id = secondTable.entity_id',
        ['status','increment_id','customer_email','DISTINCT(entity_id)']
       );
}

Here the Main table is sales_order_item.

Without Join Output of Report

Adding join in the collection

here is code of grid.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<update handle="reports_report_grid"/>
<body>
    <referenceBlock name="adminhtml.report.grid">
        <arguments>
            <argument name="id" xsi:type="string">gridTestReport</argument>
            <argument name="dataSource" xsi:type="object">Test\Testmodule\Model\ResourceModel\Testmodule\Collection\Initial</argument>
        </arguments>
    </referenceBlock>
    <referenceBlock name="adminhtml.report.grid.export">
        <arguments>
            <argument name="exportTypes" xsi:type="array">
                <item name="csv" xsi:type="array">
                    <item name="urlPath" xsi:type="string">*/*/exportCsv</item>
                </item>
                <item name="excel" xsi:type="array">
                    <item name="urlPath" xsi:type="string">*/*/exportExcel</item>
                </item>
            </argument>
        </arguments>
    </referenceBlock>
    <referenceBlock name="adminhtml.report.grid.columnSet">
        <arguments>
            <argument name="count_totals" xsi:type="string">1</argument>
        </arguments>
        <block class="Magento\Backend\Block\Widget\Grid\Column" name="adminhtml.report.grid.columnSet.product_id" as="product_id">
            <arguments>
                <argument name="header" xsi:type="string" translate="true">Product Id</argument>
                <argument name="sortable" xsi:type="string">0</argument>
                <argument name="type" xsi:type="string">text</argument>
                <argument name="index" xsi:type="string">product_id</argument>
                <argument name="id" xsi:type="string">product_id</argument>
                <argument name="column_css_class" xsi:type="string">col-name</argument>
                <argument name="header_css_class" xsi:type="string">col-name</argument>
            </arguments>
        </block>
    </referenceBlock>
</body>


texts: Generate Adminhtml Controller url with get parameter in Block

texts:
I have a controller for adminhtml area like this:

namespace Namespace\Module\Controller\Adminhtml\Order;

use Magento\Framework\Controller\ResultFactory;
use Magento\Sales\Model\Order;

class Complete extends \Magento\Backend\App\Action
{
    protected $resultPageFactory;

    public function __construct(
        \Magento\Backend\App\Action\Context $context,
    \Magento\Sales\Api\OrderRepositoryInterface $order
    )
    {
    $this->order = $order;
        parent::__construct($context);
    }

    public function execute()
    {
    $orderId = $this->request->getParam('order_id');
    $order = $this->order->get($orderId);
    if(!empty($order->getId())){
      try {
        $orderState = Order::STATE_COMPLETE;
        $order->setState($orderState)->setStatus(Order::STATE_COMPLETE);
        $this->messageManager->addSuccess(__("Successfully completed the order"));
      } catch (Exception $e) {
        $this->messageManager->addError(__("There's something wrong, please try again!"));
      }
    } else {
      $this->messageManager->addError(__("Invalid Order"));
    }
    $resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
    $resultRedirect->setUrl($this->_redirect->getRefererUrl());
    return $resultRedirect;
    }
}

i want to generate the url to redirect to this controller with magento GET parameter order_id, how to do it in block file, so i can get the url from my phtml?

edit:
i tried to do it like this:

$url = $block->getUrl('mymodulerouter/order/complete', ['param' => array("order_id"=>$order->getId())]);

echo $url;

but the result only generate the url to the controller without request get parameter, like this:

  http://baseurl.com/adminhtml/mymodulerouter/order/complete/key/3t45n892808da9ea52mij56b87vv87f37f9c7y79886209d27caf9df3e7dc7c9c07/


texts: Upgrading 2.1.4 from 2.1.6 manually using zip archive

texts:
I am currently developing locally using MAMP. I originally installed Magento 2.1.4 from a software archive (zip). I’d like to upgrade to 2.1.6. Can I just do a fresh install from the latest zip archive and use the 2.1.4 database? I can’t seem to find any documentation for this method with Magento 2 but I have seen it mentioned with Magento 1.

I assumed it would be fine as long as I merged the old media folder, the theme and the extensions into the new file structure. I’d like to know whether I’m doing this in an acceptable way and whether it could cause problems in the future.

I’d be grateful if someone knows the correct steps to achieve this.


texts: Changed custom admin URL, admin works, but getting 404 error after logging in

texts:
I changed the admin URL in app/etc/local.xml. Now, a 404 appears straight after logging in to this custom URL instead of dashboard (includes 'noRoute' in the URL). There is no problem with the admin section after the first page, so no need to revert to the default admin URL.

When I run select * from m_core_config_data where path like '%admin/%'; the only row returned is irrelevant (admin/dashboard/enable_charts)

The user(s) logging in have full administrator roles.

There is a function within Mage_Adminhtml_IndexController that appears to be relevant.

/**
* Admin area entry point
* Always redirects to the startup page url
*/
public function indexAction()
{
   $session = Mage::getSingleton('admin/session');
   $url = $session->getUser()->getStartupPageUrl();
   if ($session->isFirstPageAfterLogin()) {
    // retain the "first page after login" value in session (before redirect)
    $session->setIsFirstPageAfterLogin(true);
    }
    $this->_redirect($url);
}

If you search for getStartupPageUrl, you find the function in Mage_Admin_Model_User

/**
* Find admin start page url
*
* @return string
*/
public function getStartupPageUrl()
{
    $startupPage = Mage::getStoreConfig(self::XML_PATH_STARTUP_PAGE);
    $aclResource = 'admin/' . $startupPage;
    if (Mage::getSingleton('admin/session')->isAllowed($aclResource)) {
        $nodePath = 'menu/' . join('/children/', explode('/', $startupPage)) . '/action';
        $url = (string)Mage::getSingleton('admin/config')->getAdminhtmlConfig()->getNode($nodePath);
        if ($url) {
        return $url;
        }
    }
return $this->findFirstAvailableMenu();
}

Could one of these functions help to show the dashboard on the first screen after log in?


texts: magento2.2.3 Authorize.net direct post response hash validation failed

texts:
I've set up authorize.net direct post in test mode on my live server.

Trying to make a purchase I get an error.  In the exception log I get :

  main.CRITICAL: The transaction was declined because the response hash
  validation failed. {"exception":"[object]
  (Magento\Framework\Exception\LocalizedException(code: 0): The
  transaction was declined because the response hash validation failed.
  at
  /var/www/html/vendor/magento/module-authorizenet/Model/Directpost.php:539)"}
  []

Does anyone know why this is occurring?

Any help would be appreciated.

Thanks.


texts: Magento2 : Get translation for multiple languages

texts:
I have a Magento 2 with a multiple website/store/storeview setup.
Now I want to create a list of links with the text "Continue on [store_name] store". The problem is that I want to translate it in the language of the [store_name].

If I use the __() function all labels are p.e. in English or French, ...

My question is: how can I get a specific translation for a specific language that is not the current one?

So far I found some code:

$this->_dictionary->getDictionary($lang_code)['This is the string' . $store->getName()]

But this doesn't seem to work. The getDictionary($lang_code) is empty.


texts: fatal error "invalid image file type" import file - magento 1.9

texts:
I am running script for importing products. For some of the skus it is giving ->

  Fatal error: Uncaught exception 'Mage_Core_Exception' with message
  'Invalid image file type.' in
  /home/oceanf7p/public_html/app/Mage.php:595 Stack trace:

  /home/oceanf7p/public_html/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Media.php(282):

  Mage::throwException('Invalid image f...')

  /home/oceanf7p/public_html/app/code/core/Mage/Catalog/Model/Product.php(1042):

  Mage_Catalog_Model_Product_Attribute_Backend_Media->addImage(Object(Mage_Catalog_Model_Product), '/home/oceanf7p/...', Array, false, false)

  /home/oceanf7p/public_html/import-products.php(341):

  Mage_Catalog_Model_Product->addImageToMediaGallery('/home/oceanf7p/...',

  Array, false, false) #3 {main} thrown in

  /home/oceanf7p/public_html/app/Mage.php on line 595

I checked for image file extension also. its jpg only.

this is happening with some skus while others are imported successfully.


texts: move product overview below product review in Magento2?

texts: help me to move the product overview below product review in product details page like this...and help me to make qty and add to cart button in a single line...


texts:
I have built a store where we offer free shipping over a certain order value. When I do a trial and get to that point of the checkout I note that i am given the option to check a box for free shipping or one for paid shipping even though the order is over the minimum amount. Is that how it should work or have i missed a setting? I had presumed that as the shipping was free then the paid shipping method would not show once the order was over a certain price.

I have attached a screen shot to show you what I mean.

Many thanks.


texts: Slow SQL Query on Magento 1.9 with MySqll (Percona) 5.7

texts:
I have been working a lot with Magento 1.9.
I was changing database to Percona 5.7 (from 5.6) but since then, I have a major issue with "initial" load (for example after database restart).

I have traced, that there is following query:

SELECT `main_table`.`entity_id`, main_table.`name`, main_table.`path`, `main_table`.`is_active`, `main_table`.`is_anchor`, `url_rewrite`.`request_path` FROM `catalog_category_flat_store_1` AS `main_table` LEFT JOIN `core_url_rewrite` AS `url_rewrite` ON url_rewrite.category_id=main_table.entity_id AND url_rewrite.is_system=1 AND url_rewrite.store_id = 1 AND url_rewrite.id_path LIKE 'category/%' WHERE (main_table.include_in_menu = '1') AND (main_table.is_active = '1') AND (main_table.path like '1/2/%') ORDER BY `main_table`.`position` ASC

From Explain on Percona 5.7 I have found following:

But when I run same query on same database (could be max 1 day old) but on Percona 5.6:

Query is definitely not using key, but why?
Does somebody, please, have a suggestion?

EDIT:
I have setted up another shop on Percona 5.7, which has a lot less amount of rows in "core_url_rewrite". I can see, that keys are being used now (unable to paste screenshot)

So it looks like the problem is on the Percona side, perhaps the size of the table goes outside "buffer".


texts:
I'm following the documentation http://devdocs.magento.com/guides/v2.1//get-started/authentication/gs-authentication-oauth.html and I'm a little stuck.

Basically I want to make REST calls from my backend to the Shop to get all products in the shop for example.

Under "Activate an integration" it states, that after activate the Integration it will send a HTTPS POST call with the specific attributes to the callback URL. But on my backend a POST never happens.

Shouldn't I get at least the parameters from the POST call or do I have to implement the other steps too before something happens?

Could someone check out my code/picture and point out some mistakes?

This is the Java Part (I tried RequestParam and RequestAttribute too)

@PostMapping(value = "/authenticate")
public void authenticate(@RequestHeader("store_base_url") String store_base_url,
                         @RequestHeader("oauth_verifier") String oauth_verifier,
                         @RequestHeader("oauth_consumer_key") String oauth_consumer_key,
                         @RequestHeader("oauth_consumer_key_secret") String oauth_consumer_key_secret) {
    logger.info("Calling MagentoShop.authenticate({} {} {} {})", store_base_url, oauth_consumer_key, oauth_verifier, oauth_consumer_key_secret);
}

These are my integration settings

Much appreciated

Thomas


texts:
I'm trying to extract some datas from magento. Here, the orders.
I search on the net and I don't understand why I always got null orders.

I have a Block like this:

namespace TATA\TOTO\Block\Extraction;

use \Magento\Framework\View\Element\Template\Context;
use \Magento\Sales\Model\ResourceModel\Order\CollectionFactory as OrderCollectionFactory;
use \Magento\Sales\Model\ResourceModel\Order\Collection as OrderCollection;
use \TATA\TOTO\Block\AbstractExtractionBlock;

/**
 * Order Block
 */
class Order extends AbstractExtractionBlock
{
    /* @var OrderCollectionFactory $_orderCollectionFactory */
    protected $_orderCollectionFactory;

    /* @var OrderCollection $_orderCollection */
    protected $_orderCollection;

    /**
     * Order constructor.
     *
     * @param Context $context
     * @param OrderCollectionFactory $orderCollectionFactory
     * @param array $data
     */
    public function __construct(
        Context $context,
        OrderCollectionFactory $orderCollectionFactory,
        array $data = [])
    {
        $this->_orderCollectionFactory = $orderCollectionFactory;
        $this->_orderCollection = null;

        parent::__construct($context, $data);null);
    }

    /**
     * Get the Order Collection
     *
     * @return OrderCollection
     */
    public function getOrderCollection()
    {
        if (is_null($this->_orderCollection)) {
            $this->_orderCollection = $this->_orderCollectionFactory->create()
                ->addFieldToSelect('*');

            $this->setPaginationParameters($this->_orderCollection);
        }
        return $this->_orderCollection;
    }
}

The Block extends from an abstract Block which implement an Interface. I'm not sure you need all of this. See the Interface below:

namespace TATA\TOTO\Block;

use \Magento\Framework\Data\Collection;

/**
 * Extraction Block Interface
 */
interface ExtractionBlockInterface
{
    /**
     * Get the pagination parameters into the respective vars.
     */
    public function getPaginationParameters();

    /**
     * Set the pagination parameters.
     *
     * @param Collection $collection
     * @return Collection
     */
    public function setPaginationParameters(Collection $collection);

    /**
     * Escape the param form HTML and delete all newline char.
     *
     * @param string $param
     * @return string
     */
    public function frontendEscape($param);
}

The Controller is classic and the template looks like this:

use \Magento\Sales\Model\ResourceModel\Order\Collection as OrderCollection;
use \Magento\Sales\Model\Order;

/* @var OrderCollection $orders */
$orders = $this->getProductCollection();
echo 'ORDER_ID|CUST_ID|PRODUCT_ID|REFERENCE|UNIT_PRICE|CURRENCY|QUANTITY|DATE<br>';

if (empty($orders)) return; // Prevent the null value for foreach.

// Never goes there because $orders is null

/* @var Order $order */
foreach ($orders as $order) {
    echo $order->getId(); //Trying to display the Id.
}

Do you see an mistake I've made?


texts: Browser jumps to middle of page with a form on loading

texts:
Weird behavior happening on Mac only using Chrome and Safari (Haven't tested on FF).

I've got a couple of forms on my site and one of them jumps to the middle of the page on loading. I double checked the page to see if the second parameter of new varienForm() was at false and it was. I don't have any scrolling or any .focus() in my script so I'm kind of clueless of what could be doing this.

Like I wrote earlier, this behavior only happens on Mac.

Anyone had to deal with something similar?

here is the link where it happens:
http://45.79.136.156/index.php/qc_en/partner-in-kind-form/

Thanks!


texts:
am having a problem on checkout it gives me error message

  "Please agree to all the terms and conditions before placing the
  order"

but the whole block not showing and it's enabled and i've put a condition!


texts: Mulitple websites with one instance or with multiple?

texts:
I'm not familiar with Magento 2, but would like to know how to deal with multiple shops. I read that Magento supports multiple websites, what sounds interesting. However, I'm wondering when that could or should be used. What are the pros and cons regarding one Magento instance with multiple sites vs one instance per site. When should be used what?

Is the multi website feature of Magento only useful if the shops have
something in common?
If one shop deals with tools and another with shoes, is one instance applicable?
How about running 100 shops?
How about backend users? One admin, multiple managers (one per shop).
Would you recommend the commerce edition or can all be done with the community edition likewise?
What is the main intention to have the multi website feature?


texts: Link to configurable product that avoids price change

texts:
Magento offers the ability to link to a configurable product with options already specified by adding the attribute id and option to the query string, like this:

www.example.com/product-link.html?166=475

However, when this option increases or decreases the price, the initial price is shown first and then the increase/decrease is shown a moment later after a JavaScript script changes it. This causes problems for our Google shopping feed, as Google's automated price checking records the base configurable product price while the correct, adjusted price for the associated product is reported in our feed.

Is there a simple way to link to an associated product and have the price appear immediately, or will I need to adjust the code to make this work?

We want the product link in our Google shopping ads to link to the configurable product page, so linking to a simple product page does not solve the problem.


texts: Can Magento import products by cron job?

texts: I know Magento provide us to create our custom cron job. Is it possible to create a cron job that imports the products?


texts: Magento setup multidomain with multiple languages

texts:
I have one store, let's call him default.com and I need to add another 2 domains with different languages,  so I want my store structure to be:

default.com -English
           - Spanish

domain.de - German
           - Russian

domain.at - English
           - German

domain.de and domain.at will use the same catalog and content that exist in default.com


texts: Layered navigation is not working for configurable product in Magento

texts:
I'm stuck at layer navigation enable for frondend site.

Click on category->display setting-> Is anchor set to "Yes".
Open attribute and set layered navigation -> yes.
reindex from system->index management
Remove cache

Still I can't see filtration at fronend

I want filtration here


texts: Images URL is getting broken at frontend in mobile view

texts:
I created custom attribute with name Product Header Info and added the following content in the text editor:

I am getting broken URL at frontend.When I am inspecting the image it is showing something broken URL.Please have a look


texts: Visual swatches for attribute with input type multiselect

texts:
In Magento 2.1.1 CE visual swatches works with select-type attributes out of box, but not witth multiselect.

Is there any simple way to make it work also with multiselect-type?

Can it be achieved by some configuration or small modification of core files? Or is it more complicated?


texts: Where is "or" generated from, as in "Sign In or Create An Account"

texts:
Does anyone know where "or" is generated from, as in "Sign In or Create An Account" in the bar at the top of every page?  It does not appear to be part of either link, just placed there to separate them.  I simply want to remove "or" from every page.

I am using Magento CE version 2.0.7-0 on an offline Linux home test server, with the Luma theme.  The install was from a Bitnami package download.

My folder structures, in part, are like this:
/home/krang/magento-2.0.7-0/apps/magento/htdocs/vendor/magento/

I have been able to remove "Sign In" and "Create An Account" in their respective files:

return $this->isLoggedIn() ? __('Sign Out') : __('Sign In');

<referenceBlock name="register-link" remove="true"/>

I have tried both

<referenceBlock name="authorization-link" remove="true"/>

and

<referenceBlock name="authorization-link-login" remove="true"/>

to no avail.

I have also tried Developer debug and numerous searches, but none of them panned out.

“or” appears to be called a data-label, but I haven't been able to find out where this comes from:

<li class="authorization-link" data-label="or">

Thanks everyone.


texts: How to call block function in other custom module's model file?

texts: I am working on Magento 2. I want to use other module's block function to get some data. How can I call that block function in my module's model file ?


texts:
There are 3 different tables that stores product viewed count

report_viewed_product_aggregated_daily
report_viewed_product_aggregated_monthly
report_viewed_product_aggregated_yearly

If I want to get current viewed count of a product, I can get it from any one of these tables. But the problem is, whenever I open the product on frontend, none of these tables are showing any result related to that product.

Is it a magento builtin issue?

I thought I need to set Magento cron to update these tables instantly when user open the product, but it also not worked for me.


texts:
On updating Magento 2.4 from 2.3 it will be stopped after getting this error
on installing that extension it gives me this error

Issue on setup:upgrade command

Any help is appriciated.


texts:
I am trying to make a (very simplified) page builder for just the homepage in Magento 2.3.

I figured out how to build a repeating field from a serialized array, like this :

            <field id="footer_links_2" translate="label comment tooltip" sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="0">
                <label>Footer links (Midden)</label>
                <frontend_model>Brancom\FooterContext\Block\Adminhtml\System\Config\Form\Field\Footerlinks</frontend_model>
                <backend_model>Magento\Config\Model\Config\Backend\Serialized\ArraySerialized</backend_model>
            </field>

This is the model

    class Footerlinks extends AbstractFieldArray
{
    /**
     * @var Factory
     */
    protected $_elementFactory;

    /**
     * @param Context $context
     * @param Factory $elementFactory
     * @param array   $data
     */
    public function __construct(
        Context $context,
        Factory $elementFactory,
        array $data = []
    ) {
        $this->_elementFactory = $elementFactory;
        parent::__construct($context, $data);
    }

    protected function _construct()
    {
        $this->addColumn('name', ['label' => __('Tekst')]);
        $this->addColumn('link', ['label' => __('Link')]);
        $this->_addAfter       = false;
        $this->_addButtonLabel = __('Voeg Toe');
        parent::_construct();
    }

}

But I can't seem to find a way to add a column with a WYSIWYG field.
Is this even possible?


texts: Magento 2 - Add Another Provider / Add Data To Provider - Checkout UI Component

texts:
I want to either add quote data to checkoutProvider so my custom input will use it or add my own provider and tell the input to use that.

How is this done?


texts: alphabetical collection of store in Choose Store View: dropdown on magento admin side

texts: I am using magento 1.9 . I need to show website ,store, and  storeview  collection by their name ascending order for Choose Store View: drop down on magento admin side dashboard.


texts: Cannot access the Admin section to perform edits on webpage

texts:
Each time I try to access the Admin control panel of my site, I get an error message saying

There has been an error processing your request
Mage registry key "_singleton/magestore_themeinstaller_model_observer" already exists
Trace:
#0 /home4/opsshop/public_html/app/Mage.php(192): Mage::throwException('Mage registry k...')
#1 /home4/opsshop/public_html/app/Mage.php(446): Mage::register('_singleton/mage...', false)
#2 /home4/opsshop/public_html/includes/src/__default.php(20646): Mage::getSingleton('magestore_theme...')
#3 /home4/opsshop/public_html/app/Mage.php(416): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#4 /home4/opsshop/public_html/includes/src/__default.php(13464): Mage::dispatchEvent('controller_acti...', Array)
#5 /home4/opsshop/public_html/includes/src/Mage_Adminhtml_Controller_Action.php(152): Mage_Core_Controller_Varien_Action->preDispatch()
#6 /home4/opsshop/public_html/includes/src/__default.php(13364): Mage_Adminhtml_Controller_Action->preDispatch()
#7 /home4/opsshop/public_html/includes/src/__default.php(17629): Mage_Core_Controller_Varien_Action->dispatch('login')
#8 /home4/opsshop/public_html/includes/src/__default.php(17220): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#9 /home4/opsshop/public_html/includes/src/__default.php(19712): Mage_Core_Controller_Varien_Front->dispatch()
#10 /home4/opsshop/public_html/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#11 /home4/opsshop/public_html/index.php(80): Mage::run('', 'store')
#12 {main}**

I am new to Magento and cannot work out what to do.


texts: I need to detect whenever the inventory level of a product changes. Its only for updating the stock I've had some success using the cataloginventory_stock_item_save_after event which is triggered when inventory is changed in the backend . Not trigger event on sales of the product in frontend.


texts:
I have setup the corn command using crontab -e command.

MAILTO=""
* * * * * /usr/bin/php7.2 /var/www/vhosts/hostname/httpdocs/bin/magento cron:run --group="test"

I have created module to run CRON job automatically. But it is not working automatically.

Instead when I hit command 'php bin/magento cron:run' it works. I am surprised CRON task is performing manually but not automatically.


texts: Controller to Ajax Estimate Shipping - Load Block and display phtml

texts:
I copied estimatePostAction and made estimateAjaxPostAction (overrided core - i did not hack the core). The controller action works as well (class Mage_Checkout_CartController).

Now I want to get/create a block for replace shipping block after estimate shipping with ajax. I tried this:

public function estimateAjaxPostAction()
{
    $country    = (string) $this->getRequest()->getParam('country_id');
    $postcode   = (string) $this->getRequest()->getParam('estimate_postcode');
    $city       = (string) $this->getRequest()->getParam('estimate_city');
    $regionId   = (string) $this->getRequest()->getParam('region_id');
    $region     = (string) $this->getRequest()->getParam('region');

    $this->_getQuote()->getShippingAddress()
    ->setCountryId($country)
    ->setCity($city)
    ->setPostcode($postcode)
    ->setRegionId($regionId)
    ->setRegion($region)
    ->setCollectShippingRates(true);
    $this->_getQuote()->save();
    //$this->_goBack();

    $this->loadLayout();
    $block = $this->getLayout()->createBlock('Mage_Checkout_Block_Cart_Shipping','checkout.cart.shipping.ajax',array('template' => 'checkout/cart/shipping.phtml'));
    if($block) {
        $response = array();
        $response['shipping'] = $block->toHtml();
        $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($response));
    }
}

The block checkout.cart.shipping.ajax was created. But toHtml() returns nothing.
My json returns: {"shipping":""}

Why toHtml method doesn't work?


texts: How to create a direct link from list page to detail page in custom module in magento 1?

texts:
I'm a newbie in magento and this is the first time I create a module.

I have a brand module with 2 pages: list brand and brand's detail. In the list page, I want to click in a brand and then it will direct to brand's detail page but I don't know how to do this and what files I must change or create.

Can anyone show me the flow of making this.


texts:
My simple question is that, Do i need to compile less with grunt in magento?
My theme is working fine. However i am not sure that i need to compile less with grunt or not.
Is there any impact on performance ?
Please suggest what is best method ?


texts:
I've the run the before running setup:di:compile home page and other is working fine.After running the setup:di:compile expect home page other pages working fine.
if i'm removing the di/global.ser that i didn't face any issue but that is correct way.Please help on this i'm not sure what is the issue on that.

Error:

Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Framework\View\Element\Template::__construct() must be an instance of Magento\Framework\View\Element\Template\Context, instance of Magento\Framework\ObjectManager\ObjectManager given, called in E:\xampp\htdocs\Digicel-Branding\vendor\magento\framework\ObjectManager\Factory\AbstractFactory.php on line 93 and defined in E:\xampp\htdocs\Digicel-Branding\vendor\magento\framework\View\Element\Template.php:128 Stack trace: #0 E:\xampp\htdocs\Digicel-Branding\vendor\magento\framework\ObjectManager\Factory\AbstractFactory.php(93): Magento\Framework\View\Element\Template->__construct(Object(Magento\Framework\ObjectManager\ObjectManager)) #1 E:\xampp\htdocs\Digicel-Branding\vendor\magento\framework\ObjectManager\Factory\Compiled.php(88): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Framewo...', Array) #2 E:\xampp\htdocs\Digicel-Branding\vendor\magento\framework\ObjectManager\ObjectManager.php(57): Magento\Framework\ObjectManager\Factory in E:\xampp\htdocs\Digicel-Branding\vendor\magento\framework\View\Element\Template.php on line 128


texts: Extra parameters passed to parent construct error after upgrade

texts:
After upgrading Magento from 2.3.1 to 2.3.3, while running di:compile, it throws following error.

Extra parameters passed to parent construct: $messageFactory, $emailMessageInterfaceFactory, $mimeMessageInterfaceFactory, $mimePartInterfaceFactory, $addressConverter.
File: /vendor/magento/module-newsletter/Model/Queue/TransportBuilder.php
Total Errors Count: 1


texts: Magento 2: Integrity constraint violation: 1062 Duplicate entry in category page

texts:
I getting below error while open category page.
i also tried to reindexing, cache clear, setup upgrade and di:compile but its not working.

Integrity constraint violation: 1062 Duplicate entry '62332' for key 'PRIMARY', query was: INSERT INTO search_tmp_5b3a22e6d14c03_14202655 (entity_id,score) VALUES


texts: How can I mount var session/cache to tmpfs?

texts:
Could someone tell me how to mount my var session/cache folders to tmpfs? Also what would have to be done to unmount them if it does not work correctly? Could you please include the commands that are needed to stop/restart the needed service?

I know there are a lot of tutorials online to do this, however I am not sure if they apply to my system and each one I come across is a little different.

I am running:

CentOs 6 - 64Bit (v6.6)
Apache (2.4)
Percona (MySQL) (v5.6)
PHP 5.5.25 (via PHP-FPM)
Magento 1.9.0.1


texts: Update Shopping Cart by Ajax - How does it work?

texts:
I'm still so new to Magento. So this article about update the shopping cart by Ajax. https://www.magemonkeys.com/magento-2-update-cart-using-ajax-when-quantity-change/. I'm wondering how this all code works?
I understand creating a new module can overwrite the existing Magento code. I don't understand how this new module works. How does cartQtyUpdate.js call the function to load subtotal and order total?


texts: Review block not displayed on product page

texts:
I am using a custom theme-celebrity by athlete  and now the problem is the review block from the product page is missing. When i click on "Be first to review this product" ,it leads to another page with url/#review-form but this page also does nto have review form.

Can anyone help me?


texts: DIsplay the list of all categories in magento

texts: I want to display the list of all category into which the particular product belongs .This information is neede to display all category in product view page.


texts:
How can I make up sell to show only saleable products? if ($_product->isSaleable()) doesn't work in this case.
Thank you