texts: Fix module routes manually after installing PATCH SUPEE 6788 + toolbox fix

texts:
After running https://github.com/rhoerr/supee-6788-toolbox fix for patch supee 6788 some routes still go to 404 page.

The fixSUPEE6788.log says for those cases "Admin routes for the module will have to be fixed manually". I don't know how to do that (replace what where).

i.e

2015-11-05T20:48:21+00:00 DEBUG (7): Found affected module: Unirgy_DropshipPo
2015-11-05T20:48:21+00:00 DEBUG (7): Found route tag 'udpoadmin'.

Original route XML:

<udpoadmin>
   <use>admin</use>
   <args>
      <module>Unirgy_DropshipPo_Adminhtml</module>
      <frontName>udpoadmin</frontName>
   </args>
</udpoadmin>

2015-11-05T20:48:21+00:00 DEBUG (7): ERROR: Unirgy_DropshipPo module route already includes _Adminhtml. Admin routes for the module will have to be fixed manually.
2015-11-05T20:48:21+00:00 DEBUG (7): To be replaced with:

<adminhtml>
   <args>
      <modules>
         <udpoadmin before="Mage_Adminhtml">Unirgy_DropshipPo_Adminhtml</udpoadmin>
      </modules>
   </args>
</adminhtml>

I'm looking at the config.xml file for this module and it has the changed applied (last code below "To be replaced with").

Thanks!

EDIT:
Unigry uDropship modules needed to be updated (as rob3000 answered mentions). In this case the extensions have an automatic updater (system->tools->unigry installer).


texts:
I am fetching custom products. I want to apply scroll on load product effect. When user scroll, more products shown. Any Idea.?

My Page

<?php

 $_productCollection=$this->getLoadedProductCollection();

$_productCollection = Mage::getResourceModel('catalog/product_collection')
->addAttributeToSelect('*')
->addFieldToFilter(array(array('attribute'=>'featured','eq'=>'1')));
$_productCollection->getSelect()->order('rand()');
$_productCollection->getSelect()->limit(20);

?>
  //loop for products
</div>
</div>


texts: SUPEE-9767 V2 Possible problems and solved Issues

texts:
Magento just Release Updated version Of SUPEE-9767 and Magento - CE 1.9.3.4.

So MY question is which bugs were solved in V2 and do we need to re apply V2 if we already apply v1.

And what are the new changes in CE 1.9.3.4, is it just fixes with the new security patch or much more??

and which bugs are still there after this v2 version.


texts:
I have an observer checkout_cart_add_product_complete which gives me a product. But not the cart. I want to add data to the cart based on the product.

My observer definition.

<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="checkout_cart_add_product_complete">
        <observer name="test_lease_controller_front_send_response_before" instance="Test\Lease\Observer\AddtoCart"/>
    </event>
</config>

The class:

<?php
namespace Test\Lease\Observer;

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

class AddtoCart implements ObserverInterface {
    public function execute(Observer $observer) {
        /** @var \Magento\Catalog\Model\Product\Interceptor $product */
        $product = $observer->getProduct();

        // need cart here
    }
}

I know the way to do this is dependency injection but I just can't figure it out.
I've red  a  few  things but can't figure it out.

Can somebody help me get started?


texts: Magento 2 CSV bulk upload product for multi website with a different price

texts:
Need to upload CSV for multi website e.g "base,us"

base will have £100.00

us will have  $110.00

I have a sample where I change price from admin But when I export CSV I only see the price for the base where is the us price ?
Need help to understand how to do this if is possible.

Tahnk you in advance.


texts: Change loaded phtml file using store code from layout xml

texts:
This is my code from my local.xml:

This is the block:

<catalog_product_view>
    <reference name="product.info">
        <block type="core/template" name="product.delivery" template="experius/statichtml/delivery.phtml" after="-">
             <action method="addToParentGroup"><group>detailed_info</group></action>
             <action method="setTitle" translate="value"><value>Test</value></action>
        </block>
    </reference>
</catalog_product_view>

and

<STORE_mystore_code>
        <catalog_product_view>
            <reference name="product.info">
                <reference name="product.delivery">
                    <action method="setTemplate"><file>experius/statichtml/delivery_de.phtml</file></action>
                </reference>
            </reference>
        </catalog_product_view>
<STORE_mystore_code>

My store code is 100% correct. Why I don't get the content of the delivery_de.phtml file ? Right now I got the content of the delivery.phtml file.Thx


texts: How to set tax amount to zero on Checkout page refresh

texts:
When I go to checkout page after adding some product in my cart and then fill billing and shipping form then Total table shows me shipping tax based on shipping address.

But when I reload or refresh the checkout page the info of billinng and shipping form has gone but tax amount (calculated before refreshing the page) is still showing in Total review table.  I want to set it to zero. I have applied below code but did not work-

$shippingaddress = Mage::getSingleton('checkout/session')->getQuote()->getShippingAddress();
$shippingaddress->setTaxAmount(0);
$shippingaddress->save();

this code set tax Amount to '0.00' in review table on page loading for a while but when page is fully loaded then this tax amount is replaced by old tax amount. But I want it to remain '0.00'. How I can do that.?


texts: M2 | Self Collection | I will pick it up myself option in checkout page

texts:
I want to show pickup from shop option in shipping method. The customer can choose either delivery to my address or ill pick up from the shop.
any idea anyone about this?


texts:
Is it possible to move the minicart widgets to the top of the minicart?

When I add CMS blocks now they are added to the bottom, but I would want to move this widget to the beginning of minicart-content-wrapper

See screenshot:


texts: Is there anyway to disable module validation of ioncube_loader for development work on a local?

texts:
I have a client who uses the ioncube_loader, but I can't get it working on a local version because of the validation of my domain. I have downloaded the apache module and that is working, it just the callback that fails to allow the page to render properly.

Am I able to disable the validation so I can do my updates?

Thanks


texts: Discount on combination of 2 products from different categories

texts:
I need to make a discount rule that only applies if products of Categories 2 & 5 are combined, and not applies if one of them is alone in the shopping cart

so seperated:
product from cat. 2 = €10
product from cat. 6 = €15

both combined are (€10+€15)- discount(20%) = €20
but if there is a product from cat 3 & 6 then there will be no discount.

hope this explains my problem


texts: How to modify the 'totals' area in cart checkout area

texts:
In the cart section of my Magento store i'm looking to modify these totals by adding a column (:) infront of each one.
So its laid out like this:

Subtotal:
Grand Total:

I cant figure out what file requires modification to change these.


texts: Fixed pricing per product until X qty then free but for various products

texts:
I'm on Magento ver. 1.8.1.0 and I'm in a unique situation... My website is: http://tinyurl.com/k8ch6xj

The client originally had one product but in various colors, the product cost $39.95 each and after they order 2 or more products, the entire order ships free. In Magento I have it set to where anything over $70.89 ships free. Anything below $70.89 will ship using the UPS module with special UPS rates they have from UPS.

Now they have two types of products called insoles, one cost $8.95 and the other is $19.95. They want the insoles to be shipped for $3.95 each and if a customer orders over 3 insoles, shipping is free.

How can I make it so Magento recognizes this? Where each insole costs $3.95 to ship, after 3 it ships free, then if they order 1 pair of shoes they will still be charged for UPS shipping for that one pair, but if they order 2 pair everything ships free even if they order 1 pair of insoles.


texts: Magento 2 : custom changes in product details page

texts:
I want to do some custom changes in the product details page,
for example :  I want to get custom attribute value in the product details page,
how can i do that?
please advise me on this.


texts: How to add owl carousel slider for recent view products in Magento 2.2.2 version with knockout js?

texts: How to adding owl carousel slider for recent view products. I have successfully added it for related product, up-sell products etc. But I am not able to add it for recent view because in Magento 2.2.2 its is rendered through knockout js and UI component.


texts: Change the name of a tab in admin Product Information

texts:
I'd like to change the name of of the tab "Related Products" in the Product Information in the Administration area (/catalog_product/edit/id/123).

I could easily do it changing the name in the code (app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php) but I'd prefer to avoid changing the Magento core.
So I was looking at the language files (app/locale/en_GB and app/locale/en_US), but the has no effect.

Any idea?

I verified the language used in the admin area is English UK (https://stackoverflow.com/a/14159348/1190011).

(Magento CE 1.9)


texts: Email Sender of default Magento 2 order confirmation is not correct 2.2.7

texts:
After I upgrade from 2.2.6 to 2.2.7. The sender of the order confirmation is changed from sales@mydomain.com to myusername@@c59619.sgvps.net

I checked the config->sales email and general->store email addresses,there are set correctly as sales@mydomain.com.

I do not have smtp set up, i'm using default phpmailer and my hosting is siteground.


texts: Sorry but i am new in Magento and i would ask what to do, i install Magento2.0 locally on XAMPP (i am using Windows 7) and when i go on Dashboard ,i get this message: One or more indexers are invalid. Make sure your Magento cron job is running. I saw the answer in topic Magento 2 Reindexing - One or more indexers are invalid. Make sure your Magento cron job is running , i have the same problem but the solution didn't work.


texts: How do you edit checkout field labels in Magento 2?

texts:
The site I am working on is only selling to UK customers, and therefore we would like to change the labels from the Zip/Postal to Postcode and from State/Province to County.

I have spent a long time looking through the code with very little success, although I have also read online that it may be stored in the database somewhere?


texts: Magento 2: How to add footer in pdf invoice?

texts:
How to add store information and terms and conditions inside pdf invoice file in magento 2?

Also how to add footer in each page of pdf in magento 2 invoice pages?


texts: function getNickname() is used but not declared in review module

texts:
I've tried to modify the reviews. I found that there's a small piece of code $_review->getNickname(). I was curious and tried to find that function in order to see how it works.

However, the only files that contain a function with the name are in the zendframework and I highly doubt that ZF provides functions to get review's nicknames.

$ grep -rl "function getNickname"
vendor/magento/zendframework1/library/Zend/Gdata/Gapps.php
vendor/magento/zendframework1/library/Zend/Gdata/Gapps/NicknameEntry.php
vendor/magento/zendframework1/library/Zend/Gdata/Gapps/NicknameQuery.php

Where can I find the correct getNickname() function?


texts: Error on constructor of a class that extends \Magento\CatalogRule\Model\Rule

texts:
Im trying to do a model that extends \Magento\CatalogRule\Model\Rule, but in the contructor the context is giving me a warning:

Declaration of overridden method should be compatible with parent class.

Ive seen parent class and its the same context, dont know how to fix it.

I leave the construct code here and thanks:

protected function _construct(\Magento\Framework\Model\Context $context,
                                   Product $product, Collection $collection, Iterator $iterator){
        $this->setIdFieldName('rule_id');
        $this->product = $product;
        $this->collection = $collection;
        $this->iterator = $iterator;
        parent::__construct(
            $context

        );
    }


texts: Error with Email to a friend functionality

texts:
I am trying to send an email to a friend for products https://prnt.sc/oujsr5 but getting this error https://prnt.sc/ole1kk.

I am using outlook service provider.


texts: How to get the parent category's thumbnail image of the product? ifthe product has no image at all in magento 1.9.2.1

texts:
I have a problem since I'm new to magento.

I have a product that has no product placeholder. I want that if the product has no image placeholder it will automatically use it's parent category image as placeholder.


texts: Magento 2 Move delivery time below add-to-cart-button

texts:
I want delivery time shown after add-to-cart-button. I have already have custom catalog_product_view.xml with this entries:

<referenceBlock name="product.info.overview" remove="true"/>
    <referenceBlock name="product.info.sku" remove="true"/>
    <move element="product.info.description" destination="product.info.main" before="product.info.price"/>
    <move element="product.info.review" destination="product.info.main" after="product.info.addto"/>
    <move element="product.attributes" destination="product.info.main" before="product.info.price"/>
    <move element="product.info.stock.sku" destination="product.info.main" after="product.info.price"/>

Please see the screenshot for an explanation:


texts:
Is there a way to use a different theme completely for the checkout page for example? I know this can be done for products, categories and pages using the built-in scheduled design change mechanism in the admin, but what about other sections, like My Account, Cart and Checkout?

I'm thinking an observer could do it, but I have no idea which. Ideas?


texts:
Is their any way we can override this block
app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Items/Grid.php
into module ?
Config.xml
<?xml version="1.0"?>
<config>
    <modules>
        <vendor_module>
            <version>
                0.1.0
            </version>
        </vendor_module>
    </modules>
    <global>
        <blocks>
            <adminhtml>
                <rewrite>
                    <sales_order_create_items_grid>
                        Vendor_Module_Adminhtml_Block_Sales_Order_Create_Items_Grid
                    </sales_order_create_items_grid>
                </rewrite>
            </adminhtml>
        </blocks>
    </global>
</config>

Vendor/Module/Block/Adminhtml/Sales/Order/Create/Items/Grid.php
<?php

class Vendor_Moduley_Adminhtml_Block_Sales_Order_Create_Items_Grid extends Mage_Adminhtml_Block_Sales_Order_Create_Items_Grid
{
    /**
     * Flag to check can items be move to customer storage
     *
     * @var bool
     */
    protected $_moveToCustomerStorage = true;

    /**
     * Class constructor
     */
    public function __construct()
    {
        parent::__construct();
        $this->setId('sales_order_create_search_grid');
    }

    /**
     * Returns the items
     *
     * @return array
     */
    public function getItems()
    {
        echo'check'; exit;
    }
}


texts: Magento 1: import products *directly* to multiple websites using csv import

texts:
We would like to import products via magento csv and add it to multiple websites in 1 go. Currently the data looks like this.
sku      name        _product_websites
PR.123   Blue socks   domain.com

The product is sold on more than 1 website. Now we have to go into Magento and update all the products via mass update, which is error prone, slow and also adds the problem that often the collection scope selection is difficult because only the parent/configurable products have certain attributes.
It would be much easier if immediately during import we could import the data like
sku      name        _product_websites
PR.123   Blue socks   domain.com;store2.com

Question: can this be done directly by changing magento core code? Detecting multiple scopes then at import setting the scope immediately to both _product_websites


texts: Magento 1: Find products who have a certain associated product

texts:
We have complex products (of type "simple product") with associations between them. Most of our products therefore have accessories associated, which are displayed on the product detail page.

However, our accessories still are valid, viewable products on their own, meaning that one can find them using the search function. It would be beneficial for customers to see the products that the product they are currently viewing is associated from.

An example:

The products "A", "B" and "C" have the product "Z" as a product association. "Z" is displayed on each of their product detail pages.

So the question is:

Is there any way of finding a simple product to simple product association from "Z" to "A", "B" and "C", without loading all products and checking $product->getAssociatedProducts() manually for the ID of "Z"?


texts: How to make product ratings required in Magento 2.1.2

texts:
For some reason the star ratings are not being validated on the product page (Product Review). The other 3 fields are being validated correctly (Nickname, Summary, & Review).

Has anyone encountered the same issue? The files I have been looking into are:

  shop/vendor/magento/module-review/view/frontend/templates/form.phtml
  shop/vendor/magento/module-review/view/frontend/web/js/error-placement.js

In the error-placement file it does not look like the rating elements are being returned for validation. Only the other 3 as specified above.


texts: Error after migrating from 1.9.3.1 to 2.1.5

texts:
after doing a data migration from 1.9.3.1 to 2.1.5,

I get this error after it was complete,

anyone have a clue??

a:4:{i:0;s:15:"No such entity.";i:1;s:3465:"#0 /opt/bitnami/apps/magento/htdocs/vendor/magento/module-store/Model/StoreResolver/Website.php(61): Magento\Store\Model\GroupRepository->get('1')

#1 /opt/bitnami/apps/magento/htdocs/vendor/magento/module-store/Model/StoreResolver.php(136): Magento\Store\Model\StoreResolver\Website->getDefaultStoreId(NULL)
#2 /opt/bitnami/apps/magento/htdocs/vendor/magento/module-store/Model/StoreResolver.php(122): Magento\Store\Model\StoreResolver->readStoresData()
#3 /opt/bitnami/apps/magento/htdocs/vendor/magento/module-store/Model/StoreResolver.php(85): Magento\Store\Model\StoreResolver->getStoresData()
#4 /opt/bitnami/apps/magento/htdocs/vendor/magento/module-store/Model/StoreManager.php(154): Magento\Store\Model\StoreResolver->getCurrentStoreId()
#5 /opt/bitnami/apps/magento/htdocs/var/generation/Magento/Store/Model/StoreManagerInterface/Proxy.php(119): Magento\Store\Model\StoreManager->getStore(NULL)
#6 /opt/bitnami/apps/magento/htdocs/vendor/magento/module-store/Model/Resolver/Store.php(29): Magento\Store\Model\StoreManagerInterface\Proxy->getStore(NULL)
#7 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/App/Config/ScopeCodeResolver.php(49): Magento\Store\Model\Resolver\Store->getScope(NULL)
#8 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/App/Config.php(79): Magento\Framework\App\Config\ScopeCodeResolver->resolve('stores', NULL)
#9 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/View/DesignExceptions.php(63): Magento\Framework\App\Config->getValue('design/theme/ua...', 'stores')
#10 /opt/bitnami/apps/magento/htdocs/vendor/magento/module-page-cache/Model/App/CacheIdentifierPlugin.php(43): Magento\Framework\View\DesignExceptions->getThemeByRequest(Object(Magento\Framework\App\Request\Http))
#11 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/Interception/Interceptor.php(152): Magento\PageCache\Model\App\CacheIdentifierPlugin->afterGetValue(Object(Magento\Framework\App\PageCache\Identifier\Interceptor), 'cc5db57b511d9a1...')
#12 /opt/bitnami/apps/magento/htdocs/var/generation/Magento/Framework/App/PageCache/Identifier/Interceptor.php(26): Magento\Framework\App\PageCache\Identifier\Interceptor->___callPlugins('getValue', Array, Array)
#13 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/App/PageCache/Kernel.php(60): Magento\Framework\App\PageCache\Identifier\Interceptor->getValue()
#14 /opt/bitnami/apps/magento/htdocs/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(71): Magento\Framework\App\PageCache\Kernel->load()
#15 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/Interception/Interceptor.php(142): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#16 /opt/bitnami/apps/magento/htdocs/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#17 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#18 /opt/bitnami/apps/magento/htdocs/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#19 /opt/bitnami/apps/magento/htdocs/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#20 {main}";s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";}


texts:
I have been struggling with a problem for few days now and am not bale to solve it.

I run Magento 2.2.2 on a Linux VPS with PHP7.1

First I developed site on a development domain dev.mydomain.com everything worked great cache was creaeted and served. When site was ready I cahnged domein name from dev. to www.mydomain.com this was an existing domain point to other directory first.

I changed domains in index.php (it is multistore) and changed in DB this is normal procedure I always do and it always works.

Now live site works and cache is created but pages do not load the cache. I really am puzzled what is causing this. I did all standard things flush cache, compile etc. Struggling if it is sever relate or Magento.

Anybody a clue on where to look?

Thanks,
Maco


texts:
this question is directed towards setting up the development environment.
I have some specific requirements:

I want to be able to use my solution under Linux, Windows and Mac OS, since people of our team use all these OS (e.g. front end developers use Windows / Mac, back end developers mostly use Linux)
I need to use modman
I need to use composer
I need to use Github as well as my private Git repositories
I need a proper IDE like Netbeans or PHP Storm
I want very good performance

My current setup is a virtualized Ubuntu image within Virtualbox.
All three OS can run Virtualbox, so points 1) - 5) are all satisfied.

However, currently, I am not completely satisfied with 6).
This is especially true when running the solution from within Ubuntu 12.04.
The Virtualbox seems much more stable and responsive under Windows 7.
However, many people in our team are using Linux, so I would like to improve the solution.

Does anyone have a comparable setup in VMWare or maybe even docker.io and can report whether it runs more stable?
Or does anyone have other comparable solutions / ideas?


texts: How to truncate product name properly in Magento 2?

texts:
I am using 2.3.1

I have truncated product name in the listing page and displayed dots if the length of the name is more than 27 but the problem is that there are special characters like &,'," etc. in the product name. So, I used html_entity_decode function to properly decode all special character. it is working fine for some cases

Now I have another scenario where the product name is having double quote two times in a consistent position. So, when I tried to truncate the product name the first double quote is displayed properly but the second one is not decoded properly.

  Product Name: 18inch woodproduct""Iron Box

I have used the below code:

<a class="" href="<?= /* @escapeNotVerified */ $_product->getProductUrl() ?>">
   <?php
     $product_name = $_product->getName();
     //$string = strval($product_name);
     $len = strlen($product_name);
     if($len > 27) {
        echo html_entity_decode(substr($product_name,0,27),ENT_QUOTES).'...';
      } else {
        echo $product_name;
      }
    ?>
</a>

  result in the front end listing page: 18inch woodproduct"&qu

How can I solve this issue?


texts: The best approach for a complete redesign of Magento site

texts:
i'm wanting to redo an existing Magento site (mostly for asthetic reasons)

Ive found a theme I want to customise I need to know whether it would be quicker/best to start a fresh installation, add the theme, and then import products and configure extensions, OR add a new site/theme to the existing installation and go from there.

Advice much appreciated, thanks!


texts: Magento 2 layered navigation attribute option sort by name not number of products

texts:
My theme is child of magento blank.
On default magento 2 layered navigation sort labels of attribute in layered navigation by Count number of products that exist with this attribute.

I need to change this  alphabetically sort order.

Example:
Colours:
  Red (10)
  Blue (3)
  Yellow (2)
Change to:
  Blue (3)
  Red (10)
  Yellow (2)

Where should I look?
In module_layered_navigation? or Magento\Framework\Data\OptionSourceInterface?  or somwhere else?

I found this in vendor/magento/module-catalog/Model/Layer/Filter/AbstractFilter.php

     * Create filter item object
 *
 * @param   string $label
 * @param   mixed $value
 * @param   int $count
 * @return  \Magento\Catalog\Model\Layer\Filter\Item
 */
protected function _createItem($label, $value, $count = 0)
{
    return $this->_filterItemFactory->create()
        ->setFilter($this)
        ->setLabel($label)
        ->setValue($value)
        ->setCount($count);
}

Maybe I could add somewhere usort:

usort($this, function($a, $b) {
if($a['order']==$b['order']) return 0;
return $a['order'] < $b['order']?1:-1;

});


texts: Why a custom JS is not recognized in checkout step3 shipping

texts:
i tried to add some js js/custom/custom.js file to all pages via local.xml , the code is present in a source code of the website but he doesn't work in the step 3 [shipping], but when I try to add it manually in checkout/onepage/shipping_method/available.phtml it works.

Have you an idea to add my file or this custom js code properly.

local.xml

<default>
    <reference name="head">
         <action method="addItem"><type>js</type><name>custom/custom.js</name></action>
    </reference>
</default>


texts: Show random price to certain visitors based on IP-address

texts:
Is there any easy way to let my Magento store display different price based on a visitor's IP address?

The reason I'd like to do this is that I have one specific competitor who constantly compare with my prices just to lower his own somewhere below - and I would like to distract him by showing random prices. And I know his IP. Displaying random + 10-20% higher prices to him would be helpful.


texts: Magento sales/order_item_collection showing same order multiple times

texts:
The Magento sales/order_item_collection is showing the same order multiple times,

$salesCollection = Mage::getResourceModel('sales/order_item_collection')
        ->addAttributeToSelect('*')
        ->addAttributeToFilter('created_at', array('from' => $from, 'to' => $to))
        ->load();

    foreach($salesCollection as $order){
        if(!empty($order)){
         // my order details ...
        }
    }

This is what im getting after printing the following methods

getIncrementId() - getOrderId() - getId() - getStatus()

100001519-1519-5083-Ordered
100001519-1519-5084-Ordered
100001519-1519-5085-Ordered
100001519-1519-5086-Ordered
100001519-1519-5087-Ordered
100001519-1519-5088-Ordered
100001519-1519-5089-Ordered
100001519-1519-5090-Ordered
100001519-1519-5091-Ordered
100001519-1519-5092-Ordered
100001519-1519-5093-Ordered
100001520-1520-5094-Ordered
100001520-1520-5095-Ordered
100001520-1520-5096-Ordered
100001520-1520-5097-Ordered
100001520-1520-5098-Ordered
100001520-1520-5099-Ordered

What i noticed is the order #100001519 has 11 items & #100001520 has 6 items. Is there anything wrong with my code ?


texts: Magento search not working during reindexing?

texts:
I am using an import script to import all my products from a custom file and after each import I reindex all the indices like this:

try {

    // @var $indexCollection Mage_Index_Model_Resource_Process_Collection
    $indexCollection = Mage::getModel('index/process')->getCollection();
    foreach ($indexCollection as $index) {
        // @var $index Mage_Index_Model_Process
        $index->reindexAll();
    }

} catch(Exception $e) {
    Mage::log('Import: Reindex failed.');
}

but during this process the magento search is not working and returns that products could not be found. Is this the default behaviour of magento or can I fix this?

I synchronize my products many times each day so it is not so great, if the search is not working at this time. Hope you can help me :).


texts: Set and Get magento2 session with custom value

texts:
I am working on custom module for catalog session.I have set the custom value with key in catalog session.If i get from another page with that session then the value is not coming.(its working fine in local server).
    In test.php i have written this code

 use Magento\Framework\App\Bootstrap;
    require_once '../app/bootstrap.php';
    //error_reporting(0);
    $bootstrap = Bootstrap::create(BP, $_SERVER);
    $objectManager = $bootstrap->getObjectManager();
    $appState = $objectManager->get("Magento\Framework\App\State")->setAreaCode('frontend');
    $catalogSession = $objectManager->get('Magento\Catalog\Model\Session');
    $catalogSession->setData('admin_view',3455);

In getData.php i have written below code

 use Magento\Framework\App\Bootstrap;
        require_once '../app/bootstrap.php';
        //error_reporting(0);
        $bootstrap = Bootstrap::create(BP, $_SERVER);
        $objectManager = $bootstrap->getObjectManager();
        $appState = $objectManager->get("Magento\Framework\App\State")->setAreaCode('frontend');
        $catalogSession = $objectManager->get('Magento\Catalog\Model\Session');
        echo $value = $catalogSession->getData('admin_view');//result should be 3455.locally its working,but in server it is not working.


texts: Customer can not redirect to my account page after create and login post action

texts:
Site does not redirect to my account page after create account or login button click. New account mail is sending properly at the time of registration. But the page still redirect to login page itself.

It works properly in localhost, but shows this error in live server

Does anyone know the solution?


texts: How does asynchronous email sending works in Magento 2

texts:
In Magento 1.x if you set this config to enabled Store > Configration > Sales > Sales Emails > General Settings > Asynchronous sending, Magento, instead of sending the email when the order is placed, adds an entry in a queue table (core_email_queue), and then a cron job comes, reads all the entries from the queue and sends the emails.
I don't find core_email_queue table in Magento 2. How does this feature work in Magento 2?


texts: Magento2 Need to redirect to cart page & not paypal review page

texts:
Magento2 I need to redirect to the cart page & not PayPal review page whenever there is an error in Paypal express checkout payment.
In short, let's say if there is an error of 'Shipping method not selected' in this case user should redirect to the cart page & not PayPal review page.
Please advice


texts: Layered Navigation not working using elastic search 6.0+

texts: i am using elastic search 6.0+ and porto theme with magento 2.3.2 , using mageplaza layered navigation but when i click in any filter gave 500 error on console and front end show without css.


texts: how make a skip extension install from downloader or magento connect

texts:
here what i want to do. i want to skip the installation if the module is already install from magento connect or downloader is this possible? i have module that are packaged with every extension that are causes the problem. What i want if that module is already installed then skip that module installation?

Error: file already exist.


texts: Item Count Appearing on Search Engines in magento 1.9.2.4

texts:
When we search in google it displays its description with "Item Counts".

While rich snippets is enabled for Enable Rich Snippet Reviews And Rating ,Price And Instock ,Breadcrumbs, Description.

And also we have enable RSS Feed.

Please see the image of my issue


texts: In magento 2.0.7 how to redirect the custom module admin system config

texts:
In magento 2.0.7 how we can make redirect our custom module system config after successfully saved data

For example want to redirect one particular section


texts: Show Process list Magento, queries are set to "sleep"

texts:
I am running one magento 1.9.2.4 instance, When I open my website and check process list using

Show Processlist

in mysql it shows multiple of queries set to "sleep". I am only opening one static page, which contains header,footer and static content of a cms page.

See Screenshot.

When I check with

Show full processlist;

It does not show any queries. There is no query logged in mysql and it is slow to open the query log also.

Please let me know what does this mean?
Why it is only in a Magento Project, it is not happening in Core PHP project?

Tell me if any information from my side is required.


texts:
I recently upgraded to Magento 2.3.3 from 2.3.2. And I noticed that the product dimensions no longer appear in the product admin page.
Even though the default set attribute still has them set.
Does anyone know why is it happening?

PS: I also had installed a fresh Magento 2.3.3 installation to see if the problem had something to do with the update or third party extensions.

Thank you!


texts: How to use Magento 2 cron jobs in observer file? I cannot get some values in cron file. Can anyone help me out how to configure cron in observer.


texts: Magento copy Regular price into special price

texts:
I need any script to copy all Regular price into special price. My condition is if my_attribute = 10 then copy all Regular price into special price

is any query available. If it's there please suggest me otherwise suggest me some easy way because i have 1500+ product is there


texts: Where condition in the collection issue in M1

texts:
This is my collection:

$blacklist = Mage::getModel('mynamespace_mymodule/customers')->getCollection()
            ->addFieldToFilter('store_id', $order->getStoreId())
            ->addFieldToFilter('status', 1)
            ->addFieldToFilter(
                ['email', 'last_name', 'first_name', 'ip_address', 'address'],
                [
                    ['email', 'eq' => $order->getCustomerEmail() ],
                    [
                        ['last_name',  $address->getData('lastname') ],
                        ['first_name',  $address->getData('firstname') ],
                    ],
                    ['ip_address', 'eq' => $currentIpAddress ],
                    ['address', 'like' => '%'. $orderAddressStreet],
                ]
            )
            ->addFieldToSelect('type');

This is the where condition:

(`store_id` = '1') AND (`status` = '1') AND
((`email` = 'asdsasaias8@yahoo.ro') OR
(((((`last_name` = 'last_name') OR (`last_name` = 'asdasdas'))) OR
(((`last_name` = 'first_name') OR (`last_name` = 'sdsadasd'))))) OR
(`first_name` = '127.0.0.1') OR (`ip_address` LIKE '%sdfafsdfd 21 asdasd') OR (`address` = ''))

The where condition is totally messed up. I would like to have something like:

(
    (email = 'emailaddress') OR
    ('last_name' = 'lastname' AND 'firstname' = 'firstname') OR
    ('ip_addrres' = 'myip') OR
    ('address' LIKE '%address')
)

How can I change my collection to get this where condition?


texts:
I'm currently experiencing bugs when trying to upgrade my dockerized installation of Magento 2.0.6 to Magento 2.2.4

I've imported the latest dump from production to the Docker Env and proceeded with the upgrade via composer.

After doing so I've cleared the cache and did one php bin/magento setup:upgrade. This is the console output:

Upgrading data..
Module 'Magento_Directory':
Upgrading data..
Module 'Magento_Eav':
Module 'Vendor_Module3':
Module 'Magento_Theme':
Upgrading data..
Module 'Vendor_Module4':
Module 'Vendor_Module1':
Module 'Vendor_Module2':
Module 'Magento_Customer':
Upgrading data.. PHP Fatal error:  Allowed memory size of 67108864 bytes exhausted (tried to allocate 32768 bytes) in /var/www/html/app/etc/config.php on line 1

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 32768 bytes) in /var/www/html/app/etc/config.php on line 1

Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.root@9c09d9df7a7e:/var/www/html#

How can I increase the RAM in order to resolve this issue? Whats possibly wrong here? There's enough RAM available to the system.


texts: How to allow USPS shipping method for all products?

texts:
I am new to Magento and want to set USPS shipping charge for all products.
 Currently, it is visible for those products which have weight.
How can I do this? Am I missing any configuration?


texts: Looking for a responsive theme for 1.4.1.1

texts: I was tasked with finding a responsive theme for an old Magento-site, but so far I found only one for version 1.4.1.1 at themeforest.net, so I wanted to ask if anyone has been in a similar situation. The theme should be as neutral as possible, but i'd be happy with just a pointer in the right direction, maybe to a theme site i might have missed.


texts: Integrity constraint violation: Duplicate entry for key 'UNQ_CATALOG_PRODUCT_SUPER_ATTRIBUTE_PRODUCT_ID_ATTRIBUTE_ID'

texts:
I cant save the super attribute because i get error

$pricesByAttributeValues = array();
$baseCode = Mage::app()->getBaseCurrencyCode();
$allowedCurrencies = Mage::getModel('directory/currency')->getConfigAllowCurrencies();
$rates = Mage::getModel('directory/currency')->getCurrencyRates($baseCode, array_values($allowedCurrencies));
$collectionConfigurable = Mage::getResourceModel('catalog/product_collection')
                        ->addAttributeToSelect(array('name', 'id', 'price','special_price','desde','moneda_base'))
                        ->addAttributeToFilter('type_id', array('eq' => 'configurable'))
                        ->addAttributeToFilter('sku', array('like' => 'Miila-CV'));

foreach ($collectionConfigurable as $_configurableproduct) {
    $_configurableproduct->getId();
    $_configurableproduct->getName();
    $moneda_base = Mage::getModel('catalog/product')->load($_configurableproduct->getId())->getAttributeText('moneda_base');
    //Get precio moneda base
    foreach ($rates as $rate=>$value){
        if (strcmp ($rate , $moneda_base ) == 0)
            {
                $moneda_base = $value;
            }
    }
    //Precio y Ofertas
    $precio = number_format($_configurableproduct->getPrice() / $moneda_base , 2);
    $descuento = number_format($_configurableproduct->getSpecialPrice() / $moneda_base , 2);
    $desde = number_format($_configurableproduct->getDesde() / $moneda_base , 2);
    $_configurableproduct->setPrice($precio);
    $_configurableproduct->setSpecialPrice($descuento);
    $_configurableproduct->setDesde($desde);
    //Configurables
    $attributes = $_configurableproduct->getTypeInstance(true)->getConfigurableAttributes($_configurableproduct);
    $i = 0;
    foreach ($attributes as $attribute){
    $prices = $attribute->getPrices();
        foreach ($prices as $price){
            $pricesByAttributeValues[$i]['product_super_attribute_id'] = $price['product_super_attribute_id'];
            $pricesByAttributeValues[$i]['value_index'] = $price['value_index'];
            $pricesByAttributeValues[$i]['label'] = $price['label'];
            $pricesByAttributeValues[$i]['default_label'] = $price['default_label'];
            $pricesByAttributeValues[$i]['store_label'] = $price['store_label'];
            $pricesByAttributeValues[$i]['is_percent'] = $price['is_percent'];
            $pricesByAttributeValues[$i]['pricing_value'] = (float)$price['pricing_value'] / 2;
            $pricesByAttributeValues[$i]['use_default_value'] = $price['use_default_value'];
            $pricesByAttributeValues[$i]['value_id'] = $price['value_id'];
            $i++;
        }
    }
   try{

       $_configurableproduct->setCanSaveConfigurableAttributes(true);
       $_configurableproduct->setConfigurableAttributesData($pricesByAttributeValues);
       $_configurableproduct->save();
   } catch (Exception $e) {
        echo 'Excepción capturada: ',  $e->getMessage(), "\n";
    }
}


texts: Magento2 addAttributeToFilter not working with Multi Select Attribute

texts:
I am try to filter Product collection attribute Multi Select with Following code but it not working with IN or FINESET.

\Magento\Catalog\Model\ResourceModel\Product\CollectionFactory

$collection1 = $this->collectionFactory->create();
$collection1->setStore(1);
$collection1->addAttributeToFilter('industry', array('in' => array(7)));

Suppose Product attribute "industry" contain 8,7,2 In this case above filter not working.

anyone have idea about this.


texts: update product price by using product sku in csv file

texts: Magento update price of product through CVS by using product sku. To improve system performance.


texts: How I can Make Live (Production) PWA Magento 2 Project?

texts:
I have created a sample project of Magento 2.3.1 on my local system and then setup PWA studio in it.

Now, I have not found any docs/instructions to deploy it on live server for non technical user.

Currently, I am using a command yarn run watch:venia for running it on dev environment.

Please let me know is there is any steps to build and make magento2 - pwa on live to server.

Thanks


texts:
I'm working on a query where I need to grab the MSRP from a simple product for orders placed to run some finance calculations (margin...).

The sales_flat_order_item table includes the configurable product and the simple product with same skus, so it's same product but different data.

The configurable product in the table holds all the price values I need to generate a report, except for the custom attribute named cost which is only available through a join from the catalog_product_flat_1 tables that is associated with the simple product.

I am currently filtering out the configurable products which means the order values wont be accessible for calculations.

Here is my current working query where total_cost_sum is null because of null MSRP value:

SELECT
so.entity_id AS 'Header ID', si.item_id AS 'Item ID', si.product_type, so.increment_id, si.sku
, cf.msrp AS MSRP, cd.value AS 'Package Cost'
, sum(round((cf.msrp + cd.value + 7 + 7 + 7), 2)) AS total_cost_sum
, si.price AS 'Retail Price', si.price_incl_tax AS 'Retail Price Incl. Tax'
, so.discount_amount AS 'Discount Amount', so.grand_total AS 'Total Revenue', so.base_subtotal_incl_tax
FROM sales_flat_order AS so
LEFT JOIN sales_flat_order_item AS si ON si.order_id = so.entity_id
LEFT JOIN catalog_product_flat_1 cf ON cf.entity_id = si.product_id # To get access to MSRP
JOIN catalog_product_entity_decimal cd ON cd.attribute_id = 236 # Get access to Package Cost. Custom Attribute > package_cost defaults to 5
WHERE so.store_id = 1 # Store 1 Orders Only
AND si.product_type = 'configurable' # limit duplicates in calculation
GROUP BY so.entity_id
ORDER BY so.increment_id ASC, cf.msrp DESC


texts: How to prevent adding same product to cart more than one time?

texts: As title says, how can I prevent adding same product to cart more than one time in Magento 2.4.2?


texts: Magento2 Install extension from multiple-extensions repository

texts:
I want to modify one extension from public GitHub repository(fork), and install it to my Magento2 via composer.

Extensions stored here GitHub. Really, i need only one sample-external-links. I tried many times to configure composer.json in my Magento2 root, but it doesn't work, i receive errors:

  [Composer\Downloader\TransportException]
    The "https://api.github.com/repos/magento/magento2-samples/sample-external-links" file could not be downloaded (HTTP/1.1 404 Not Found)

How to configure composer to install only 1 package from some repository like that?

my composer.json:

{
"name": "magento/project-community-edition",
"description": "eCommerce Platform for Growth (Community Edition)",
"type": "project",
"version": "2.1.0",
"license": [
    "OSL-3.0",
    "AFL-3.0"
],
"require": {
    "magento/product-community-edition": "2.1.0",
    "composer/composer": "@alpha",
    "magento/sample-bundle-all": "dev-master"
},
"require-dev": {
    "phpunit/phpunit": "4.1.0",
    "squizlabs/php_codesniffer": "1.5.3",
    "phpmd/phpmd": "@stable",
    "pdepend/pdepend": "2.2.2",
    "fabpot/php-cs-fixer": "~1.2",
    "lusitanian/oauth": "~0.3 <=0.7.0",
    "sebastian/phpcpd": "2.0.0"
},
"config": {
    "use-include-path": true
},
"autoload": {
    "psr-4": {
        "Magento\\Framework\\": "lib/internal/Magento/Framework/",
        "Magento\\Setup\\": "setup/src/Magento/Setup/",
        "Magento\\": "app/code/Magento/"
    },
    "psr-0": {
        "": "app/code/"
    },
    "files": [
        "app/etc/NonComposerComponentRegistration.php"
    ]
},
"autoload-dev": {
    "psr-4": {
        "Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/",
        "Magento\\Tools\\": "dev/tools/Magento/Tools/",
        "Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/",
        "Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/",
        "Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/"
    }
},
"minimum-stability": "alpha",
"prefer-stable": true,
"repositories": [
    {       "type": "vcs",
            "url": "https://github.com/magento/magento2-samples/sample-external-links"
    }
],
"extra": {
    "magento-force": "override"
}


texts: Connect Customers With Recurring Profiles to MailChimp

texts:
Site Info:
Meal prep company, running a site on Magento 1.9.3, the site was developed by a company in India, I work with these guys on some other projects as I'm not really familiar with Magento, but when they told me their issue I offered to take a look.

Their customers are all on subscription-based plans, they use Magento recurring profiles to manage their customers. When looking at the admin area or in the db tables you can see the customers stored in recurring profiles are not stored as customers in Magento, they only exist under recurring profiles.

The issue is we have tried to use to EZbizMarts MailChimp for Magento extension, but the extension is looking for customers in the customer's table but they're in another table. Another issue is all of the recurring profile's info is stored as SQL type blob. So everything from name to address to email is stored in a blob, not broken down into their own rows.

Goal: Either modify the ezbizmarts extension to look at the customers in recurring profiles or write something that would connect without the extension using the MailChimp API. Due to the custom nature of their store, the way products are set up, I think option 2 is better because the extension looks for things that do not exist.

We want to pass the users to MailChimp, and as their status (active, suspended, canceled) changes we want mail chimp to send automated emails. Ideally, we would also be able to send MailChimp the plan that the customer purchases (5, 10 or 14 meals) so we can send upsells etc.

The issue... I'm pretty lost, Magento to me seems a bit overcomplicated in terms of file structure, but I'm pretty new to PHP. What I think I need to do is write php that will retrieve the DB table the information is stored in, put it in an array, then connect to the MailChimp API to send the users that are retrieved from the array, their status, and the product ordered.

Am I on the right track? Another issue is there seems to be very little recurring profiles documentation.

Thanks in advance!


texts: Magento 2 : How to call phtml file in helper?

texts:
I got asnwer of how to call it in Magento 1, but in M2 i am getting an error.
if($product->getTest()){
        $productid = $product->getId();
        return Mage::app()->getLayout()->createBlock('core/template')->setTemplate('demo/test/test.phtml');
    }

Please Help.


texts: Magento 2 Nginx and ubuntu Post installation Permission and Ownership issue

texts:
I have installed Magento2 on AWS EC2 instance.  I am using Nginx, Php-fpm and Ubuntu 18.04 for my magento2 installation.
Magento 2 is installed successfully but whenever I run command php bin/magento cache:flush or php bin/magento setup:upgrade or php bin/magento indexer:reindex
after successful execution site go down.  i need to apply permission **sudo chmod -R 777 ***   then it start working.
I already checked magento's preinstallation and permission & ownership guidline.but seems after running the setup:upgrade or cache:flush site doesn't work until we apply 777 permission.
I have already checked and applied following solutions:
https://devdocs.magento.com/guides/v2.4/install-gde/prereq/file-sys-perms-over.html
https://devdocs.magento.com/guides/v2.4/install-gde/prereq/file-system-perms.html
I also tried following:
find . -type f -exec chmod 644 {} ;                        // 644 permission for files
find . -type d -exec chmod 755 {} ;                        // 755 permission for directory
find ./var -type d -exec chmod 777 {} ;                // 777 permission for var folder
find ./pub/media -type d -exec chmod 777 {} ;
find ./pub/static -type d -exec chmod 777 {} ;
chmod 777 ./app/etc
chmod 644 ./app/etc/*.xml
chown -R : .
chmod u+x bin/magento
Myuser in ubuntu is:  ubuntu
Any help would be appreciated.
Thank you


texts: Magento2 - Switch to right website on login

texts:
We've recently migrated a company to a new Magento2 installation and imported the users across two different websites; one local and one for World. These website only differ in the payment provider options and tax config.

Now the client just asked why no one was able to login to the site. It appears that you can't login to the World-website when you're on the Local-website.

Because the two sites are virtually identical it's very confusing this way. I wonder if it would be possible to switch to the right website when a user logs in, no matter from what website in the system ?


texts: I'm using the M2Epro extension to gather ebay and amazon orders. We want to differentiate between FBA orders and MFN for Amazon Orders. I can't find a column in SQL that differentiates between FBA and MFN, but there is an option to disable adding FBA orders... so figure it must be in the system somewhere. Does anyone know?


texts:
I would like to add a new product attribute to the file

  Magento_Catalog/templates/product/price/amount/default.phtml

And

  Magento_Tax/templates/pricing/adjustment.phtml

As an additional data tag like:

data-new-attribute="(value of the new product attribute)"

How do I get access to the data here?


texts:
We need inventory source selection at the time of ordering, not at the time of shipment and already solved reservations with a custom reservation mechanism that reserves stock on source level.
Now I'm refering to the documentation to create a custom source selection algorithm.
Adding a new source selection algorithm works, but I'm curious about this paragraph:

Create a InventoryRequest factory for quotes (optional)
Magento provides the InventoryRequestFromOrderFactory, which determines the
sources to use to fulfill the order at the time a shipment is created.
class InventoryRequestFromOrderFactory
{
      /**
     * @param OrderInterface $order
     * @return InventoryRequestInterface
     */
    public function create(OrderInterface $order) : InventoryRequestInterface
    {
        [...]
    }
}

To add an SSA at the time of checkout, introduce your own factory that
produces an InventoryRequestInterface based on a Quote object,
outlined as follows:
class InventoryRequestFactory
{
    /**
     * @param \Magento\Quote\Api\Data\CartInterface $quote
     * @return InventoryRequestInterface
     */
    public function create(\Magento\Quote\Api\Data\CartInterface $quote) : InventoryRequestInterface
    {
        // TODO
    }
}

There's no more information where that custom InventoryRequestFactory would be configured or called. Is this really possible, and if so, how?
From reading the code I had the impression that we needed a workaround with a source selection algorithm that would select sources based on our custom reservations. But if it were possible to move the source selection to a different point in the order process, that would help a lot (would like to get rid of the user interface anyways and always pick sources based on the algorithm)


texts: how to add phtml file in custom tab on product view page

texts: I have created a custom tab on product view page , but i don't know how to call a phtml file into custom tab.


texts:
I am working on a Magento 2.1.7 shop. To achieve this, I have created a child-theme of Magento Blank.

My top links (above the logo) are:

Compare Products
Default welcome msg!
My Account
My Wish List
Create an Account
Sign In

I need to know how, from my custom theme (I want to stay safe from the overwrites that occur when updating Magento), I could have only:

My Cart
My Wish List
Sign In

In app/design/frontend/vendor/themename/Magento_Theme/layout/default.xmlI have changed:

<referenceBlock name="top.links">
        <block class="Magento\Theme\Block\Html\Header" name="header" as="header" before="-">
            <arguments>
                <argument name="show_part" xsi:type="string">welcome</argument>
            </arguments>
        </block>
</referenceBlock>

into:

<referenceBlock name="top.links">
        <block class="Magento\Theme\Block\Html\Header" name="header" as="header" before="-">
            <arguments>
                <argument name="show_part" xsi:type="string">welcome</argument>
            </arguments>
        </block>
        <referenceBlock  name="my-account-link" remove="true"/>
        <referenceBlock  name="compare-products-link" remove="true"/>
        <referenceBlock  name="wishlist_link" remove="true"/>
</referenceBlock>

With no effect.

How can I achieve this goal? Thank you!


texts: Magento 2 - How to add logs inside module

texts:
I have added like below way. But it doesn't work for that module

use Psr\Log\LoggerInterface;

/**
 * @var LoggerInterface
 */
protected $logger;

protected $resultForwardFactory;

public function __construct(
    Action\Context $context,
    \Magento\Framework\Registry $coreRegistry,
    \Magento\Framework\App\Response\Http\FileFactory $fileFactory,
    \Magento\Framework\Translate\InlineInterface $translateInline,
    \Magento\Framework\View\Result\PageFactory $resultPageFactory,
    \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory,
    \Magento\Framework\View\Result\LayoutFactory $resultLayoutFactory,
    \Magento\Framework\Controller\Result\RawFactory $resultRawFactory,
    \Magento\Backend\Model\View\Result\ForwardFactory $resultForwardFactory,
    LoggerInterface $logger
) {
    $this->_coreRegistry = $coreRegistry;
    $this->_fileFactory = $fileFactory;
    $this->_translateInline = $translateInline;
    $this->resultPageFactory = $resultPageFactory;
    $this->resultJsonFactory = $resultJsonFactory;
    $this->resultLayoutFactory = $resultLayoutFactory;
    $this->resultRawFactory = $resultRawFactory;
    $this->resultForwardFactory = $resultForwardFactory;

    $this->logger = $logger;
    parent::__construct($context);
}

 /**
     * @return void
     * @throws \Magento\Framework\Exception\LocalizedException
     * @throws \Exception
     */
    public function run()
    {
        $this->resource->getConnection()->beginTransaction();
        try {
            $this->_prepare();
            $this->_execute();
            $this->resource->getConnection()->commit();
            $this->logger->info('Test');

        } catch (\Exception $e) {
            $this->resource->getConnection()->rollBack();
            $this->logger->info($e);
            throw $e;
        }
        $this->getFlag()->save();
    }


texts:
I'm using Magento CE 1.9 and I just tried to share a product on facebook. Worked like a charm except all the css of the text block was included :(

Can someone point me in the right direction as to how to fix this? Thanks.

Attached: Screenshot of problem.


texts: How to get "Text Area" attribute value in phtml file?

texts:
Value is showing on front page under custom tab section but bullets or images are not coming.

I am using this code in phtml file

code 1:

$_product = $this->getProduct();
echo $_product->getData('customattribute');

Or Code 2:

<?php if($_product->getCustomattribute()!= null){ ?>

Color Options :

       <?php echo $_helper->productAttribute($_product, ($_product->getCustomattribute()), 'customattribute') ?>

<?php } ?>

code 2 : Gives me error
code 1 : Print every thing except bullets/images just simple text.

Kindly suggest any method .  i follow almost all post related to this..


texts: Media Storage System Message on Magento 2.2

texts:
We are utilizing the database media storage feature on our Magento 2.2 site.  We ran the synchronization and got the following system message.

We were unable to synchronize one or more media files. Please refer to the log file for details.

I have two question about this message.

What log is it talking about?  I would like to see which if any images had problems syncing over.   I've looked around in var/log but haven't found any reference.
How do you clear this system message?  It's not present in the System > Notifications listing.


texts:
Does anyone know where the United Kingdom Language Pack has gone.

I cannot find it at http://www.magentocommerce.com/magento-connect/customer-experience/internationalization-localization.html

Welsh is there - but not UK English?

I am after installing via Connect to a 1.9.1 version so we have basket and VAT etc etc


texts:
Change default Magento 2 theme to use a boxed layout instead of full width?

I'd like to change my Magento 2 theme to use a boxed layout instead of a full layout. I've already started customizing the theme by creating a directory in:

app/design/frontend/<Company_Name>/<Theme_name>/

And been customizing various areas using:

app/design/frontend/<Company_Name>/<Theme_name>/Magento_Catalog/

app/design/frontend/<Company_Name>/<Theme_name>/Magento_Theme/

app/design/frontend/<Company_Name>/<Theme_name>/Magento_Theme/web/css/source/_module.less

Etc, etc.

But, I've found that the site's layout itself is using a full width layout and I'd like to change that to a boxed layout. The theme's theme.xml is using the Magento/blank theme as a parent, also. <parent>Magento/blank</parent>

So basically just starting from scratch and wondering how I'd customize this theme to use a boxed layout.

Thank you.


texts: Magento 2 - change mobile navigation text color

texts: How can i change the mobile navigation text color in .less file? Which variable is this?


texts: How to use noindex, follow on duplicate pages for search engines

texts:
I can easily set NO INDEX, FOLLOW on particular page through layout update.

But what I want is, I need to set NO INDEX, FOLLOW when the page loads after filtering from layered navigation on product listing page.

For Eg : https://test.com/recording-studio/keyboard-controllers.html?number_of_keys=37&price=-150

This is duplicate of https://test.com/recording-studio/keyboard-controllers.html. So need not to be indexed.

Any solutions for this ?


texts:
TinyMCE is installed in our Magento 1.9.2.4 webshop, but we have some conflict issues with the Javascript merge function in:
Magento back-end --> System --> Configurations --> Advanced --> Developer

When Javascript merge is enabled the website instantly becomes 10% faster but the photouploader in the tiny_mce editor is suddenly unusable.
It returns the following errors when trying:

error: error in [unknown object].fireEvent():"
event name: open_browser_callback
error message: MediabroweserUtility is not defined

I hope someone can help me with this problem!


texts:
I am new to RMA so i have some questions for which i could not find answers on other articles.

Order on which customer initiates RMA, does it's amount calculated on dashboard sales statistics?
If customer return/replace order item, does it update existing order or create new order?
What's status of order for which RMA initiated/approved?

I also referred some RMA extension guides but could not find any satisfactory answers.


texts: How to display best selling products on homepage in magento 2

texts: I am new in magento 2. Could you please describe in detail how can I get best selling products on homepage in Magento 2. Any help will be appreciated.


texts: Can't change magento 2 orders to complete

texts:
I have captured a payment for orders and created an invoice and a shipment but I don't see the complete option in the order status dropdown which I believe that is where I change the order to complete.

Am I doing something wrong? I don't see any errors in the exception log but I can't figure out how to get my orders changed to completed

UPDATE: This is the invoice that I created for this order

This is the shipment that I created for this order


texts: I have changed something in my theme, but it does not appear after deploying static files. Removed all necessary folders and cleaned cache but still not working. Strange thing is, that on my test server it does work. Any ideas ?


texts: Exception: Item (Magento\Framework\App\Config\Value\Interceptor) with the same ID "1" already exists

texts:
I got this exception while trying to run my new project with docker locally:
Exception:
*Item (Magento\Framework\App\Config\Value\Interceptor) with the same ID "1" already exists. in /var/www/html/vendor/magento/framework/Data/Collection.php:408 Stack trace: #0 /var/www/html/vendor/magento/framework/Data/Collection/AbstractDb.php(590): 21 {main}
*
Config server:
    server  phpfpm:9000;
 }
server {
  listen 80;
  root /var/www/html;
  index index.php index.html index.html;
  server_name _;
  set $MAGE_ROOT /var/www/html;
  set $MAGE_DEBUG_SHOW_ARGS 1;
  location ~ \.php$ {
    try_files $uri =404;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass phpfpm:9000;
    fastcgi_index index.php;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param PATH_INFO $fastcgi_path_info;
    fastcgi_buffers 16 16k;
    fastcgi_buffer_size 32k;
    client_max_body_size 24M;
    client_body_buffer_size 128k;
  }
} ````

docker-compose.yml:

```` version: '3.7'

services:
  app:
    image: nginx:1.16.1

    volumes:
      - ./conf/default.conf:/etc/nginx/conf.d/default.conf
      - ./src:/var/www/html
    ports:
      - "80:80"
  phpfpm:
    build: './dockerfile/phpfpm'
    volumes:
      - ./src:/var/www/html
  mysql:
    image: library/mysql:8.0
    volumes:
      - ./mysql:/var/lib/mysql
      - ./sql:/docker-entrypoint-initdb.d:ro
      - ./conf/mysql/custom.my.cnf:/etc/mysql/conf.d/custom.my.cnf
    environment:
      MYSQL_DATABASE: mydatabase
      MYSQL_USER: myuser
      MYSQL_PASSWORD: test123
      MYSQL_ROOT_PASSWORD: test123  ````

Dockerfile:
```` FROM php:7.3-fpm

COPY --from=composer /usr/bin/composer /usr/bin/composer

RUN apt-get update && apt-get install -y \
  gzip \
  libbz2-dev \
  libfreetype6-dev \
  libicu-dev \
  libjpeg62-turbo-dev \
  libmcrypt-dev \
  libpng-dev \
  libsodium-dev \
  libssh2-1-dev \
  libxslt1-dev \
  libzip-dev \
  lsof \
  default-mysql-client \
  zip

RUN docker-php-ext-configure \
  gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/

RUN docker-php-ext-install \
  bcmath \
  bz2 \
  calendar \
  exif \
  gd \
  gettext \
  intl \
  mbstring \
  mysqli \
  opcache \
  pcntl \
  pdo_mysql \
  soap \
  sockets \
  sodium \
  sysvmsg \
  sysvsem \
  sysvshm \
  xsl \
  zip

RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"

RUN cd /usr/local/etc/php/conf.d/ && \
  echo 'memory_limit = -1' >> /usr/local/etc/php/conf.d/docker-php-memlimit.ini

RUN groupadd -g 1000 app \
 && useradd -g 1000 -u 1000 -d /var/www -s /bin/bash app
RUN mkdir -p /var/www/html \
   && chown -R app:app /var/www

USER app:app
VOLUME /var/www
WORKDIR /var/www/html ```


texts: Configurable products with Customizable Options

texts:
I have a configurable product, whose attribute is color, and the user can change the color of the product. Also I have added customizable options, with the sizes that the user can change. But each article that is generated does not include these options, is this normal?

If I add a size attribute from the configuration tab, the system generates a product for each size and for each color, so many necessary products are created.


texts: How to solve slow performance, slow and long running CRONs in Magento Cloud?

texts:
I'm having these two main issues below in my Magento 2.3.2 Enterprise Cloud.

Heavy SQL load and site performance issues.
Long-running and stuck CRON.

How could I solve it?


texts:
Does anyone have a good solution for making magento products' URLs case insensitive?

Obviously I've looked into:

  <IfModule mod_speling.c>
    CheckCaseOnly on
    CheckSpelling on
</IfModule>

However since we are using mod_rewrite that doesn't work. So we then tried:

<IfModule mod_rewrite.c>
    RewriteEngine on
    rewritemap lowercase int:tolower
    RewriteCond $1 [A-Z]
    RewriteRule ^/(.*)$ /${lowercase:$1} [R=301,L]
  </IfModule>

Which worked, on the product level but broke the admin search fields and a created a few other headaches.

So now I am looking for a solution with no compromises.


texts: I am working on store upgradation from 1.4.1 to 1.9 for that i has tried following https://stackoverflow.com/questions/11662347/how-to-upgrade-magento-1-4-1-1-to-1-7-0-2 but after running the setup it is just loading in browser from last 10 hours.Please tell what is the problem. Why my site is just processing after upgrade. For the information my database tables are on myISAM engine i have converted required table to innoDB. Please guide me to update my store


texts: How can I set up a tax rate for all countries?

texts: I want to sell my products in every country in the world for a fixed tax rate on all my products. How can I do this?


texts: How to access Magento site on android application

texts:
I have completed my magento web application.

I want to develop an android app for my magento site.
So I want some information about how we can do that.
Along with that how to get
data from magento site through API key.

Please tell me which API should i use and what is the best way to do it.


texts: @baseDir variable not working in less file for background-image. Says undefined

texts:
Several other questions/answers here say to use the variable @{baseDir} to get the URL for background-image. I added this to my themes less file, however, when I compile, it crashes.

variable @baseDir is undefined

I do not understand how to proceed. I found several other files that have the reference to baseDir and it works fine, but in this specific less file, it doesn't. Frustrated.


texts: Shared Inventory on Associated Products in a Configurable Product

texts: Let's say I'm selling necklaces using a certain stone, and the customer has the option to have it done it either silver or gold chain, with the fancy addons or just plain. I have it set up as a configurable product, where they choose the chain and the fanciness. The limiting factor for supply is the stone, which may never come back in stock after it's used up. How can I have the associated products (Stone-Fancy-Silver, Stone-Fancy-Gold, Stone-Plain-Silver, Stone-Plain-Gold) share the same inventory, so that whenever one of them is purchased, the inventory goes down by 1 for all of them?


texts: Getting Wrong Maximum Price For Configurable Products

texts:
I am trying to get final price for price slider but it is showing me wrong price.
See below images, Price should be 4000/- for right slider but it is showing me 2000.

Input Price--

Output Price--

Any Help Appreciated.

Code Where I get Maximum Price-

public function getCurrMaxPrice(){
    if($this->_currMaxPrice > 0)
    {
        $max = $this->_currMaxPrice;
    } else
    {
     $max = $this->_maxPrice;
    }

 $max;
    return $max;
}


texts: Magento 2, add new column into admin grid?

texts: Using magento 2.2, admin. sale->order. I want to add a new column into  sales order grid in backend.


texts: How to add spacing between products in grid view

texts:
The products on the grid layout are cramped together and I'd like to have spacing between products.

How is this done?


texts: Why is system upgrade showing unstable version when upgrading in backend?

texts:
testing an upgrade from 2.1.7 to 2.1.9 and further, I was wondering why Magento shows the versions from 2.1.10 to 2.1.12 as "unstable versions" ?!
what does that mean - should one upgrade or not to this versions?

Please have a look at the uploaded image. I have to check "Show all versions" to get the complete list of upgrade versions.


texts: Magento 2.3.3 Undefined property EmailMessage.php

texts:
I am having this issue after upgrading to magento 2.3.3 and applied the email patch they provided.
When try to send email I get:

  report.CRITICAL: Notice: Undefined
  property:Magento\Framework\Mail\EmailMessage\Interceptor::$zendMessage
  in
  /my/folder/public_html/vendor/magento/framework/Mail/EmailMessage.php
  on line 66 {"exception":"[object] (Exception(code: 0): Notice:
  Undefined property:
  Magento\Framework\Mail\EmailMessage\Interceptor::$zendMessage in
  /my/folder/public_html/vendor/magento/framework/Mail/EmailMessage.php
  on line 66 at
  /my/folder/public_html/vendor/magento/framework/App/ErrorHandler.php:61)"}

Line 66 has this code:

$this->zendMessage->setBody($mimeMessage);

and all the __construct is:

parent::__construct($encoding);
        $mimeMessage = new ZendMimeMessage();
        $mimeMessage->setParts($body->getParts());
        $this->zendMessage->setBody($mimeMessage);
        if ($subject) {
            $this->zendMessage->setSubject($subject);
        }
        if ($sender) {
            $this->zendMessage->setSender($sender->getEmail(), $sender->getName());
        }
        if (count($to) < 1) {
            throw new InvalidArgumentException('Email message must have at list one addressee');
        }
        if ($to) {
            $this->zendMessage->setTo($this->convertAddressArrayToAddressList($to));
        }
        if ($replyTo) {
            $this->zendMessage->setReplyTo($this->convertAddressArrayToAddressList($replyTo));
        }
        if ($from) {
            $this->zendMessage->setFrom($this->convertAddressArrayToAddressList($from));
        }
        if ($cc) {
            $this->zendMessage->setCc($this->convertAddressArrayToAddressList($cc));
        }
        if ($bcc) {
            $this->zendMessage->setBcc($this->convertAddressArrayToAddressList($bcc));
        }
        $this->mimeMessageFactory = $mimeMessageFactory;
        $this->addressFactory = $addressFactory;

I have spent hours....Any help would be appreciated


texts:
Magento sort by price: sort by final price instead of price:

I want to sort by price filter to sort by final price of product instead of just price. For product I have price 10 but special price is 100 , so when user sort product by price, sorting looks wrong.

Please help me to fix it.


texts: How to override checkout on module enable/disable in Magento 2?

texts:
I want to override this by enabling/disable the module from admin.
<item name="progressBar" xsi:type="array">
  <item name="sortOrder" xsi:type="string">0</item>
  <item name="component" xsi:type="string">Magento_Checkout/js/view/progress-bar</item>
</item>

Please let me know thanks.


texts: Magento 2.3.0 URL keys regenerate on import

texts:
This is a serious issue that is occurring on numerous Magento 2.3 builds (I have tried)

If we use the import function from a CSV with the "name" header, Magento automatically updates the URL key to match this. If I do not add the "name" header, the URL keys simply delete themselves.

This is incredibly frustrating as it ruins my URL Rewrites. As the URL key updates, the URL rewrites do not. This makes updating products in bulk through the import feature incredibly annoying and damaging.

Is this a bug with 2.3? or simply a setting I've missed? I cannot reproduce this issue on a 2.2 build, nor can I find any solutions online to this problem.

Edit: I'd like to point out that I can regenerate these URL keys from a module, this isn't difficult but it's not an ideal solution.


texts: Proper method to get an attribute yes/no value so it is not translated

texts:
I'm trying to display a different static block for certain types of products. I am able to get this to work with my code bellow, however when switching store views the static block disappears even though it is set for all.

<?php if (isset($p['secCol_2'])) echo $p['secCol_2']; ?>

<?php if ($_product->getAttributeText('colocation') == "No"): ?>
    <?php echo $this->getChildHtml('container_product_secondary_2'); ?>
<?php endif; ?>
<?php if ($_product->getAttributeText('colocation') == "Yes"): ?>
    <?php echo $this->getChildHtml('container_product_secondary_colocation'); ?>
<?php endif; ?>

For reference, the original code that works on all store views with 1 static block:

<?php if (isset($p['secCol_2'])) echo $p['secCol_2']; ?>
<?php echo $this->getChildHtml('container_product_secondary_2'); ?>

What can I do to the above code so that it works on all store views?

EDIT:
With the assistance from the comments I have now figured out that the issue is that the store view is translated. Yes/No is becoming Oui/Non and that is why the blocks are not being displayed.

How do I over come this?


texts: How to handle modules in multiple webservers behind a load balancer?

texts:
This is my setup:

DB Server
NFS Server for shared media files
Load Balancer
Web Server 1
Web Server 2

What is the best way to handle installing modules?  The only thing I can think of is going into each Web Server and installing the modules.
I haven't found any really good resources on the topic as a whole.  I have heard I should also share pub/static for combined css/js, but didn't know if anyone had any good resources for the whole "Magento Community Load Balanced Setup" topic.


texts: One Step Checkout plugin - Move VAT row below Delivery

texts:
I want to move the VAT row below the delivery cost in the One Step Checkout review your order section. What would be the best approach to rearrange them?

Thanks in advanced for your help.


texts:
I want to obtain the file path inside my controller for the file uploaded in store configuration.In system.xml I have added the file upload section as

    Sales
    <tab>sales</tab>
    <resource>Magento_Sales::config_sales</resource>
    <group id="custom_group" translate="label" type="text" sortOrder="6" showInDefault="1" showInWebsite="1" >
        Security
        <field id="custom_file_upload" translate="label" type="Magento\Config\Block\System\Config\Form\Field\File" sortOrder="6" showInDefault="1" showInWebsite="1" >
            Upload custom file
            <backend_model>Magento\Config\Model\Config\Backend\File</backend_model>
            <upload_dir config="system" scope_info="1">test</upload_dir>
        </field>
    </group>

It's uploaded in my Magento root folder in path "magento_root/test/default".

Now let's say we upload the file abc.csv, I want this file path dynamically inside my controller.


texts: Has anyone tried installing Magento 2 with php-7?

texts:
As php-7 and Magento 2 has been released, i was wondering, what are the configurations and dependencies that needs to keep in mind while installing Magento 2 on php-7?
What are some drawbacks and benefits of doing that?


texts: Retrieve product status query optimization in core magento

texts:
One of our client is having more than 1 Lack of products and below retrieve product status query is taking around 9-11 sec on production server.

  SELECT cataloginventory_stock_status.product_id,
  cataloginventory_stock_status.stock_status FROM
  cataloginventory_stock_status WHERE (product_id IN('78724', '78723',
  '78722'.....upto 1 Lack productids here)) AND (stock_id=1) AND
  (website_id=1);

After investigation I have find that this query run after loading product collection in Magento. Query getting executed by an observer method in Mage_CatalogInventory_Model_Observer that is triggered for product collection after load event.

Config file path: app/code/core/Mage/CatalogInventory/etc/config.xml

Event: catalog_product_collection_load_after

class: cataloginventory/observer

method: addStockStatusToCollection

Observer file path: `app/code/core/Mage/CatalogInventory/Model/Observer.php

function: addStockStatusToCollection($observer)

addStockStatusToCollection method further calls addStockStatusToProducts($productCollection) method in app/code/core/Mage/CatalogInventory/Model/Stock/Status.php
function: addStockStatusToProducts($productCollection)
addStockStatusToProducts method calls getProductStatus($productIds, $websiteId, $stockId) in app/code/core/Mage/CatalogInventory/Model/Resource/Stock/Status.php

Final SQL Select query is getting generated from function getProductStatus($productIds, $websiteId, $stockId = 1)
app/code/core/Mage/CatalogInventory/Model/Resource/Stock/Status.php

public function getProductStatus($productIds, $websiteId, $stockId = 1)
    {
        if (!is_array($productIds)) {
            $productIds = array($productIds);
        }

        $select = $this->_getReadAdapter()->select()
            ->from($this->getMainTable(), array('product_id', 'stock_status'))
            ->where('product_id IN(?)', $productIds)
            ->where('stock_id=?', (int)$stockId)
            ->where('website_id=?', (int)$websiteId);
        return $this->_getReadAdapter()->fetchPairs($select);
    }

I have also checked SQL query optimization for large IN clauses and find that it can be optimize by replacing IN clause with JOIN.

However, I am not sure if we would be able to replace IN clause by JOIN in getProductStatus method because of following reasons:

We have productIds array in IN clause which can vary based on product collection query at different pages or blocks.
getProductStatus method is a common method which retrieve product status and return array as key product id, value - stock status.
We don't have table2(for JOIN) which stores only productIds which are coming as a parameter, as productIds may vary based on product collection query.
We can't use catalog_product_entity table for join because catalog_product_entity table has product id's for all the products in system and we need only the productIds coming in getProductStatus method parameter.

Please suggest how can we optimize above IN clause.


texts: Magento2: easiest way to delete a product attribute value without loading the product

texts:
I can update products efficiently without loading the whole product with

$this->productAction->updateAttributes([$productId], $attributesData, 0);

where $attributesData is an array, e.g. ['fabric' => 'cotton', 'pattern_repeat' => '50'].

However I would like to delete attribute values too, without setting them to empty values, so actually deleted and not set to null.

There is no method in Magento\Catalog\Model\Product\Action for deleting an attribute value for a product, just setting or updating what is there.

How can I delete a product attribute option value without loading the whole product?


texts: Magento 2 workflow exporting and importing between Local > Staging and Production configuration and database

texts:
I have a local Magento 2 installation and the code is controlled by Git. The dependencies are installed by Composer. I have a copy of this site moved to the Staging server and Production server.

But what is advisible/are best practices to handle the configuration and the databases?

In which environment I am doing configurations?
In which environment I am adding products and create cms pages etc?
On the production site there is also new customer and order
information in the database.

How do I sync or handle this best and most simplest way? Or do I have to do configuration on all environments separately in Magento admin (because it's only a one-time thing?


texts:
I am trying to overwrite the core AbstractPdf.php from

vendor/magento/module-sales/Model/order/PDF/AbstractPdf.php

To

app/design/frontend/vendor/projecta/Magento_Sales/Model/order/PDF/AbstractPdf.php

I did flush the cache after, but seems still using the core file, am I missing something? do I need to run some script to make this override works? I did search from any where over the internet, still not clear when I should do. Please help

Thanks!


texts: magento product thumbnail image cache issue

texts:
Magento 2 thumbnail main image cache path link changed from this link on the home page after 2 days
pub/media/catalog/product/cache/be293bf7411b924394287949fb9084eb/b/e/be-in-in.png
to this
media/catalog/product/cache/be293bf7411b924394287949fb9084eb/b/e/be-in-in.png
because of that, I am getting this
but when do flush Magento cache it changes back to
pub/media/catalog/product/cache/be293bf7411b924394287949fb9084eb/b/e/be-in-in.png
please can anyone give me suggestion to solve this issue?
thanks


texts: Magento indexing is failing, SQLSTATE[23000]: Integrity constraint violation

texts:
For some reason Magento indexing is failing, we haven't changed anything in the website.... And that is the weird thing! The error in shell using indexer.php:

$ php indexer.php --reindex catalog_product_flat
Product Flat Data index process unknown error:
exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`**********_db`.`#sql-649_47012`, CONSTRAINT  `FK_CAT_PRD_FLAT_1_ENTT_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES  `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON U)' in  /home/**********/domains/***********nna.nl/public_html/lib/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /home/**********/domains/***********nna.nl/public_html/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /home/**********/domains/***********nna.nl/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#2 /home/**********/domains/***********nna.nl/public_html/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 /home/**********/domains/***********nna.nl/public_html/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#4 /home/**********/domains/***********nna.nl/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('ALTER TABLE `ca...', Array)
#5 /home/**********/domains/***********nna.nl/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query('ALTER TABLE `ca...', Array)
#6 /home/**********/domains/***********nna.nl/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(340): Varien_Db_Adapter_Pdo_Mysql->query('ALTER TABLE `ca...')
#7 /home/**********/domains/***********nna.nl/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(2569): Varien_Db_Adapter_Pdo_Mysql->raw_query('ALTER TABLE `ca...')
#8 /home/**********/domains/***********nna.nl/public_html/app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.php(816): Varien_Db_Adapter_Pdo_Mysql->addForeignKey('FK_CAT_PRD_FLAT...', 'catalog_product...', 'entity_id', 'catalog_product...', 'entity_id', 'CASCADE', 'CASCADE')
#9 /home/**********/domains/***********nna.nl/public_html/app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.php(1390): Mage_Catalog_Model_Resource_Product_Flat_Indexer->prepareFlatTable(1)
#10 /home/**********/domains/***********nna.nl/public_html/app/code/core/Mage/Catalog/Model/Product/Flat/Indexer.php(296): Mage_Catalog_Model_Resource_Product_Flat_Indexer->reindexAll()
#11 /home/**********/domains/***********nna.nl/public_html/app/code/core/Mage/Catalog/Model/Product/Indexer/Flat.php(336): Mage_Catalog_Model_Product_Flat_Indexer->reindexAll()
#12 /home/**********/domains/***********nna.nl/public_html/app/code/core/Mage/Index/Model/Process.php(209): Mage_Catalog_Model_Product_Indexer_Flat->reindexAll()
#13 /home/**********/domains/***********nna.nl/public_html/app/code/core/Mage/Index/Model/Process.php(255): Mage_Index_Model_Process->reindexAll()
#14 /home/**********/domains/***********nna.nl/public_html/shell/indexer.php(160): Mage_Index_Model_Process->reindexEverything()
#15 /home/**********/domains/***********nna.nl/public_html/shell/indexer.php(200): Mage_Shell_Compiler->run()
#16 {main}


texts: How do I get the base object from within a plugin?

texts:
How do I get the object that my plugin is attached to from within an after plugin?  I thought it would be the $subject parameter, but that doesn't seem to be it.

My plugin is defined like this

di.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\ConfigurableProduct\Block\Product\View\Type\Configurable">
        <plugin name="MyCompany_Configurable" type="MyCompany\ConfigurableProduct\Plugin\Configurable" sortOrder="10" disabled="false"/>
    </type>
</config>

Configurable.php

public function afterGetJsonConfig($subject, $result)
{
    // ...
}

I assumed that $subject should be an instance of Magento\ConfigurableProduct\Block\Product\View\Type\Configurable, but when the plugin runs, $subject is actually Magento\Swatches\Block\Product\Renderer\Configurable\Interceptor.

The reason that this matters is because I want to call getAttributesForCollection on the object that the plugin is attached to.  However, if I call $subject.getAttributesForCollection(...) it returns null.  When getAttributesForCollection(...) is called in the base class (Magento\ConfigurableProduct\Block\Product\View\Type\Configurable), it returns an array.


texts: Adding custom column data to extension attribute in magento's default V1/orders API

texts:
I have a custom delivery_date column in quote table which I want to pass to V1/orders , I have passed this in extension_attribute.xml as following ;

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Api/etc/extension_attributes.xsd">
    <extension_attributes for="Magento\Sales\Api\Data\OrderInterface">
        <attribute code="delivery_date" type="string"/>
    </extension_attributes>
</config>

After placing order I am able to see it get and set methods for the same in var/generation/Magento/Sales/Api/Data/OrderExtensionInterface.php but in API it is not there.

Are there any extra steps I need to follow.

Please Help.


texts: HTML links are deleted/stripped after saving

texts:
I want to add code to a page in Magento as follows:

Link
#1

Link
#2

After I saved this a second time, the links are gone and I find this:

Link
#1

Link
#2

How can I solve this and why is Magento doing this? Thanks!


texts: How to show random product collection on category page in magento 2?

texts: How to override the default category product collection to show random products on the category page in Magento 2? Also, sort-by should be work when it selected. Could someone help me with this issue?


texts: Magento 2: Check if product has catalog rule applied to it

texts:
I'm very new to M2.
I have a block that is being added to front-end if there is no Mail In Rebate or Special Price applied to the product.
Class looks something like this:
<?php

declare(strict_types = 1);

namespace Company\Catalog\Block\Product\View;

use Magento\Catalog\Block\Product\View\Description;

class ListedPrice extends Description
{
    /**
     * @return bool
     */
    public function isListedPrice(): bool
    {
        $product = $this->getProduct();

        if ($product->getSpecialPrice() || $product->getMnlMailInRebate()) {
            return false;
        }

        return true;
    }
}

How can I add a check a product for Catalog Price rules?
We have a Group of customers that gets discounts based on Catalog Price rules and this block is being shown to them which destroys the layout.
Thanks in advance!


texts: Magento 2.2 update extension clear generated folder

texts:
Before magento 2.2 I emptied the var/generations folder during an upgrade of an extension or an update of magento from eg. 2.1.5 to 2.1.6

In 2.2 the var/generations folder is empty and replaced (I suppose) by the generated folder.

I always used this for upgrading (see below), but which commands to use in 2.2?

php bin/magento maintenance:enable

php bin/composer require myparcelnl/sdk "v1.3.0"
php bin/composer require myparcelnl/magento "2.3.0-beta.5"
php bin/composer update

rm -rf var/di/*;
rm -rf pub/static/*;
rm -rf var/generation/*;
rm -rf var/view_preprocessed/*;
php bin/magento cache:flush
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -j 1
php bin/magento setup:static-content:deploy nl_NL -j 1
php bin/magento indexer:reindex


texts:
I would like to replicate this side layered collapsible navigation on our website. This site is built using Magento, but does anyone know where I will be able to find this extension that was used to create the side column layered navigation on this site http://www.tightsplease.co.uk/tpgb/tights-online.html ?

I’m assuming it was a free or paid extension.

I have also attached a screenshot to hopefully explain exactly what I mean http://iforce.co.nz/i/35bdmjvl.lle.jpg I also like the way they did the price search.


texts:
Does anyone know why meta_title attribute is missing both for product and category flat tables?

I can see meta_description and meta_keyword fields in the flat tables but no meta_title. So I am forced to use eav model, which is fine. But I was wondering why is this so. Also does anyone has a "fix" for this in order to add meta_title to the flat tables?


texts:
I am completely new to magento & using version 1.7. I want to remove sku number from the order email when customer place an order. After lot of R&D I noticed that, the template used is from app/design/frontend/base/default/template/email/order/items.phtml and product name, sku number, quantity and price comes from echo $this->getItemHtml($_item) this line. I am not exactly figure out, how should I remove sku number column from this single line? Or is there any other way to do so?

Any help appreciated. Thanks.


texts: Magento 2 layout files & folder discrepancy

texts:
I've read about a folder structure discrepancy depending on how you install your Magento 2 which would cause the app/design themes to be moved into a vendor/magento/ folder.

Magento 2 - discrepancy between documentation and theme files structure on github

However my theme files seem to be located in pub/static/frontend/...

which has worked fine for me as far as copying the blank theme & then altering it, however i have come to remove the subscription form from the footer of the site & it seems to be ignoring my layout file.

I've found the Magento_Newsletter module using the template path hints & followed documentation to create a /pub/static/frontend/<vendor>/<template>/en_GB/Magento_Newsletter/layout/default.xml file within my theme containing:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceBlock name="form.subscribe" remove="true" />
</body>

So my question is 2 fold:

1) am i wrong to be building a theme in the pub/static folder

2) have i placed the default.xml file in the wrong folder or am i removing the block in the wrong way?

Thanks for any input.


texts: Add link to customer account navigation based on Customer Group

texts:
I'd like to add a link to 'customer_account_navigation' block, but add it only to customers who belong to Wholesale customer group. Is that possible? Any suggestions?

local.xml:

<customer_account>
    <reference name="customer_account_navigation">
        <action method="addLink" translate="label" module="profileimage">
            <name>set_profileimage</name>
            <path>profileimage/customer/form</path>
            <label>My Profileimage</label>
        </action>
    </reference>
</customer_account>


texts: How to make a billing/shipping state field mandatory when creating order from magento admin

texts:
When i try creating order from magento admin, I want to make the state filed mandatory for shipping/billing address

I went to the sales module and found out that the fields are coming from the customer address model.

app\code\core\Mage\Adminhtml\Block\Sales\Order\Create\Form\Address.php
protected function _prepareForm()

I can see $addressModel = Mage::getModel('customer/address');

I checked the customer module for the fields but was unable to find it out.
Can i do it using customer module XML config files? OR any php code is required OR should i run a direct query in the database to make required = 1


texts: Magento 2: Cancel order email sent to customer if admin cancel order

texts:
I am very beginner to magento and i am looking for answer,
if i cancel order from admin panel but cancel email order is not sent to customer.
If i want to sent email to customer what should i need to do?
I already create custom email template for cancel order
I am using Ranosys module to cancel order from frontend.


texts:
In Layered navigation There are two filters of same name appearing two times how can I remove the above one:

We want to remove the first CATEGORY FILTER AND make the second to be displayed only?


texts: Bug after upgrade Magento 2.3.4 to 2.3.5

texts:
My website show a lot bug after upgrade Magento 2.3.4 to Magento 2.3.5, It show like this

I found a temporary solution is turn off an extension Magento_CSP. But I think turn off Magento extension is not good idea.

Thank you for your advice!


texts:
I've just installed Livechat onto our site running Magento Community. There is an option to add custom variables into the livechat javascript so that I can obtain information about the visitors current session.
(see install help document here: http://www.livechatinc.com/kb/custom-variables-configuration/)

With very little knowledge of Magento, could anyone tell me where I might find the variable names and values that will pull in the following:

"Total Cart Value"
"Number of items in cart"


texts: Magento1.9 - Pass multiple variables to block with SetData

texts:
In a template I currently have the following working code:

$sticazzi = 'hey Frank';
$this->getChild('child-name')->setData("sticazzi", $sticazzi);
echo $this->getChildHtml('child-name');

and then in my block:

$sticazzi = $this->getData('sticazzi');
echo '<h1>' . $sticazzi . '</h1>';

This will render hey Frank in the template.

How can I pass multiple variables to the block in the same way? Does setData accept an array of vars? Is there a better way to do this (I would prefer not to use xml layout in this case).


texts: Huge MySql Query processed from frontend

texts:
We have several web servers and MySql Server.
Once in a while there is a huge query that being requested from one of the web servers (which means it comes from frontend).

We have a full page cache enabled. With redis support. So this kind of query is very strange. A especially when it comes from frontend.

The query is too long and it can take up to 20 sec to complete. When it occurs on several servers in parallel it can break down the whole system and website will fall.

The query goes like this:

`SELECT t_d.entity_id, t_d.attribute_id, t_d.value AS default_value,t_s.value AS store_value, IF(t_s.value_id IS NULL, t_d.value, t_s.value) AS value FROMcatalog_product_entity_varchar AS t_d\n LEFT JOIN catalog_product_entity_varcharAS t_s ON t_s.attribute_id = t_d.attribute_id AND t_s.entity_id = t_d.entity_id AND t_s.store_id = 2 WHERE (t_d.entity_type_id = 4) AND (t_d.entity_id IN (2,000 of products id comes here))`

,and this query is being joined 5 or 6 times. Each time with 2,000 products

How can I tell where does this query comes from?
How can I disable this dynamic query or whatever it is??

Thanks in advance


texts:
I am getting a 404 error when trying to go to my admin page was working fine earlier today. Haven't changed anything since I last logged in and the only thing I was doing was assigning products to categories.

http://mytempsite.net/gotie/admin

WHAT IVE TRIED SO FAR
Delete the following file:-

app/etc/use_cache.ser <-- I could not find the file in ftp or ssh

then tried doing this
 Opened PhpMyAdmin
- Went to my database
- Clicked SQL
- Ran the following SQL Query:

SET FOREIGN_KEY_CHECKS=0;
UPDATE core_store SET store_id = 0 WHERE code='admin';
UPDATE core_store_group SET group_id = 0 WHERE name='Default';
UPDATE core_website SET website_id = 0 WHERE code='admin';
UPDATE customer_group SET customer_group_id = 0 WHERE customer_group_code='NOT LOGGED IN';
SET FOREIGN_KEY_CHECKS=1;