texts: In Mage_GoogleShopping, what is the intended way to add more categories?

texts:
We are using Mage_GoogleShopping which is a core extension that can be downloaded from MagentoConnect. It has a hard coded list of categories in Mage_GoogleShopping_Helper_Category.

public function getCategories($addOther = true)
{
    $categories = array(
        self::CATEGORY_APPAREL, self::CATEGORY_CLOTHING, self::CATEGORY_SHOES, self::CATEGORY_BOOKS,
        self::CATEGORY_DVDS, self::CATEGORY_MUSIC, self::CATEGORY_VGAME
    );
    if ($addOther) {
        $categories[] = self::CATEGORY_OTHER;
    }
    return $categories;
}

Why is that? Of course we could add new categories by rewriting this helper to add own categories - but is this the intended way?


texts: Magento 2 - Filterable option not appearing

texts:
I've created an attribute and need to show in Layered Navigation on product listing page, but I can't find the Use in Layered Navigation option.

I've searched and followed the steps but couldn't find that option in admin under storefront properties.
Please guide me in this,thanks.


texts:
We have a batch of images that belong to products already in the database. For that, we need to delete all images connected to each product being updated, then add the new/changed images to that product.

There's a lot of answers on how to delete all images from a product, but it seems that every single one fails if there's a condition present (even the backend fails):

We have multiple storeviews, and in one of those storeviews ("Default Store View") one of the images to be deleted is listed as the standard image (base, small, thumbnail). As long as this is the case, neither any code nor the backend is able to remove the images from a product while being set to the "Admin" store view.

I'm using this code to remove the images (at least, all except  the one in question):

$mediaApi = Mage::getModel("catalog/product_attribute_media_api");
$items = $mediaApi->items($product->getId());
foreach($items as $item) {
        echo $mediaApi->remove($product->getId(), $item['file']);

}

Is there a way to reset the store view to use the "Admin" storeview settings (aka setting all 3 image types to "Use standard") by code? I've already tried this:

$values = array(
    'image'=>'no_selection',
    'small_image'=>'no_selection',
    'thumbnail'=>'no_selection',
);
foreach (Mage::app()->getWebsites() as $website) {
    foreach ($website->getGroups() as $group) {
        $stores = $group->getStores();
        foreach ($stores as $store) {
            Mage::app()->setCurrentStore($store);
                Mage::getSingleton('catalog/product_action')->updateAttributes($product->getId(), $values, 0);
        }
    }
}

That didn't seem to change anything.


texts:
I need to show product listing based on Category id for which display mode ( under display settings) is set only to "Static Block Only".

So, In order to show product for this category i have created a CMS page and have set its Layout as

  2Columns with left bar

and added below xml

    <reference name="content">
          <block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">
          <action method="setCategoryId"><category_id>3</category_id></action>
              <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
                   <block type="page/html_pager" name="product_list_toolbar_pager"/>
                            </block>
                            <action method="addColumnCountLayoutDepend"><layout>empty</layout><count>5</count></action>
                            <action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>4</count></action>
                            <action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>3</count></action>
                            <action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>3</count></action>
                            <action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>2</count></action>
                            <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
                        </block>
</reference>

I get  proper product list, but Layer Navigation filters are not working.
Can any one please let me know what i am missing.

Thank You.


texts: How to get the SKU of products in abandoned cart

texts:
I have created a module which gives magento admin the ability to add shipping price for each order in magento.
               How it works is that, when a customer tries to check out, he is only allowed to place order, and the cart is abandoned and my custom module gets info about all abandoned carts in magento and allows admin to add shipping rate from backend after which the customer is notified via mail to check out himself.

The problem is that, i use magento abandoned cart report api to get the details and it only gives quote id, created date and customer email/name , which is too few for the admin to determine shipping price. I need to either get the sku and quantity of products added in cart in my module or a code to retrive all those details either in backend or in an external file. I tried joining the mysql query without the code, but it didnt succeed


texts: Magento 2.2 : Setting an image in the template of custom theme

texts:
I have the code below in MyVendor/MyTheme/Magento_Theme/templates/advertisement.phtml:

<?php echo $this->getViewFileUrl('images/ad2.jpg'); ?>
<img src="<?php echo $this->getViewFileUrl('images/ad2.jpg'); ?>" />

The first line displays the url of the image properly, I can see the image when I open the url in another tab of my browser. However, the second line with <img> tag doesn't display the image (which is in MyVendor/MyTheme/web/images/).

I tried removing the cache files and deploy static content:

cd /var/www/html/MAGENTO_FOLDER
rm -rf var/cache/* var/di/* var/generation/* var/page_cache/* var/view_preprocessed/* pub/static/frontend/*
php bin/magento cache:clean
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f -j 1 zh_Hans_CN en_US

Also, I noticed in Chrome Developer Tools that this attribute was added to the <img> tag: style="display: none !important;", and I can't remove it in the developer tool.

How can I fix it ?

ADDENDUM:

My template is set in the following layout:

<?xml version="1.0"?>
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
    <update handle="empty"/>
    <referenceContainer name="page.wrapper">
        <container name="header.container" as="header_container" label="Page Header Container"  htmlTag="header" htmlClass="page-header" before="main.content"/>
        <container name="page.top" as="page_top" label="After Page Header" after="header.container">
            <block class="Magento\Framework\View\Element\Template" name="advertisement" template="Magento_Theme::advertisement.phtml" after="-" />
        </container>
        <container name="footer-container" as="footer" before="before.body.end" label="Page Footer Container" htmlTag="footer" htmlClass="page-footer" />
    </referenceContainer>
</layout>

Here is the tree structure of my custom module:

├── Magento_Theme
│   ├── layout
│   │   └── default.xml
│   ├── layouts.xml
│   ├── page_layout
│   │   └── home_custom.xml
│   ├── templates
│   │   └── advertisement.phtml
│   └── web
│       └── css
│           └── source
│               └── _extend.less
├── media
│   └── preview.png
├── registration.php
├── theme.xml
└── web
    └── images
        ├── ad2.jpg
        ├── advertisement.png
        └── logo.svg

After digging, I tried with other pictures, also randomly taken from the Net and it worked, below is the list of pictures tried and their details:

NOT WORKING:
web/images/ad2.jpg:           JPEG image data, JFIF standard 1.01, aspect ratio, density 1x1, segment length 16, baseline, precision 8, 100x110, frames 3
web/images/advertisement.png: PNG image data, 921 x 381, 8-bit/color RGBA, non-interlaced

This image is another example of image that can't be displayed from phtml:
http://www.webdo.tn/wp-content/uploads/2015/09/publicite1.jpg

WORKING:
web/images/logo.svg:          SVG Scalable Vector Graphics image
web/images/pulpitrock.jpg:    JPEG image data, JFIF standard 1.02, aspect ratio, density 100x100, segment length 16, baseline, precision 8, 500x377, frames 3

Why does it work with some images and not with others ?


texts: boast total number of products ordered on homepage

texts:
I have a site that primarily sells one type of product in several quantities (50, 100, 200 and 400). How would I go about dynamically showing on the homepage the total amount of these products ordered over the lifetime of the site?

For example, if I had ten total orders of the product in quantity of 50 and five of the product in quantity of 200, how do I have the homepage dynamically count and display the total of 2500 [(5 x 50) + (10 x 200)]?

Also, it might not be a good idea to have this calculated every time the homepage loads - so is there any way to have the calculating script run every half hour or so (cron?)?

Is there perhaps an extension that does this?

I am using Magento 1.8.1


texts: Custom Admin grid TimeZOne - Date issue in magento2

texts:
I have set default time zone pacific standard time(america/los_angeles)

In admin gridwhen i inline edit date

i take 31 aug 2018 but once it save it display 30 aug 2018.

see in images:

Have anyone face this issue or have any solution for it?


texts: Problem overriding CatalogImportExport module

texts:
How to save only the product ids in my custom table post saving all the product details after importing csv.

I have added custom entity type under system->import.

When i click on that, it should perform the same functionality as product import, but apart from that also the imported product ids must be saved to my custom table.

This is what i have done:

etc/di

<preference for="Vendor\Module\Model\Import" type="Magento\ImportExport\Model\Import" />
<preference for="Vendor\Module\Model\Import\DataflowProfiles" type="Magento\CatalogImportExport\Model\Import\Product" />

etc/import.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_ImportExport:etc/import.xsd">
    <entity name="catalog_product" label="Custom Dataflow-Profiles" model="Vendor\Module\Model\Import\CustomDataflowProfile" behaviorModel="Magento\ImportExport\Model\Source\Import\Behavior\Basic" />
</config>

Vendor\Module\Model\Import\CustomDataflowProfile.php

<?php
   namespace Magento\CatalogImportExport\Model\Import;

   use Vendor\Module\Model\Import\CustomDataflowProfile\RowValidatorInterface as ValidatorInterface;

   class CustomDataflowProfile extends \Magento\ImportExport\Model\Import\Entity\AbstractEntity
   {
         ...same code as core...
   }

Vendor\Module\Model\Import\CustomDataflowProfile\RowValidatorInterface.php

same as core

My custom table has columns:
id , productid.

Now apart from saving the product details after import, i want my product ids to be saved in my custom table.

Updated error in comments

Please suggest!!


texts: What is Compilation in Magento and its use?

texts: I want to know the use of compilation in Magento. How it is helpful in my project and its benefit after enabling it.


texts: How to add multiple sections under same tab magento admin panel?

texts:
I am trying to add multiple section under same tab in magento admin panel. I added this in system.xml file. It works fine for one section but when i add another it display the section but after click it throw 404 not fount error.

I am using the below code :

<tabs>
    <mss translate="label" module="sqlite">
        Mss Extensions
        <sort_order>100</sort_order>
    </mss>
</tabs>
<sections>
        <mss translate="label" module="sqlite">
            Auto Indexing
            <tab>mss</tab>
            <sort_order>1000</sort_order>
            <show_in_default>1</show_in_default>
            <show_in_website>1</show_in_website>
            <show_in_store>1</show_in_store>

        <groups>
            <mss_group translate="label" module="sqlite">
                Indexing Options
                <frontend_type>text</frontend_type>
                <sort_order>10</sort_order>
                <show_in_default>1</show_in_default>
                <show_in_website>1</show_in_website>
                <show_in_store>1</show_in_store>

                <fields>
                    <mss_input translate="label">
                        Auto Products
                        <frontend_type>select</frontend_type>
                        <sort_order>90</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                        <source_model>adminhtml/system_config_source_yesno</source_model>
                    </mss_input>

                </fields>
            </mss_group>
        </groups>
    </mss>
</sections>
<sections

 <sqlite translate="label" module="sqlite">
            Auto Indexing
            <tab>mss</tab>
            <sort_order>100</sort_order>
            <show_in_default>1</show_in_default>
            <show_in_website>1</show_in_website>
            <show_in_store>1</show_in_store>

        <groups>
            <sqlite_group translate="label" module="sqlite">
                Sqlite Process
                <frontend_type>text</frontend_type>
                <sort_order>1000</sort_order>
                <show_in_default>1</show_in_default>
                <show_in_website>1</show_in_website>
                <show_in_store>1</show_in_store>

                <fields>
                    <sqlite_input translate="label">
                        Sqlite Product
                        <frontend_type>select</frontend_type>
                        <sort_order>90</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                        <source_model>adminhtml/system_config_source_yesno</source_model>
                    </sqlite_input>

                </fields>
            </sqlite_group>
        </groups>
    </sqlite>
</sections>

1 ) This is my mss section this works fine

2) This is section which i am trying to with name sqlite (when i click on this section this throws 404 error)

Please help me how to add new section in tab or where i am doing wrong.


texts: Need to remove Currency name(ie \gdp or \usd) from url in magento

texts:
I am new to Magento 1.9
I m trying to remove currency name from url and at the same time setting canonical url


texts:
I am trying to clean the log generated in var/log folder in magento 2 by cron job so that it can run periodically.I go through this link https://github.com/rakeshmagento/magento2-db-log-cleaner/blob/master/Rakeshmagento/Logcleaner/Cron/Logcleaner.php . In this way  I can delete some specific file from db. Debug.log,System.log,exception.log remain as it is.I want to delete these file also.
Needing help in this regard.
Thank you


texts: Magento 2, Cannot read property 'ui' of undefined

texts:
I don't get why adding my custom js file causes below issue. Please help understand the cause. Let me know if more details should be provided here.

Is it dependency issue?

edit: My requirejs-config.js in module

var config = {
    "paths":
    {
        "jQueryCustom": "myVendor_myModule/js/jquery.custom",
        "jqueryNoConflict": "myVendor_myModule/js/jquery.no-conflict",
    }
};

My jquery.no-conflict.js in module

define(['jQueryCustom'],function ()
{
    return jQuery.noConflict(true);
});


texts:
I tried locking my indexer programmatically with this code as I used to do:

$indexer = Mage::getSingleton('index/indexer');
            $indexer->lockIndexer();

I noticed that my indexer didn't get locked and when i went looking in the core files I saw it was deprecated. Is there any other way to lock the indexer? I looked into it and didn't exactly see one.


texts: Magento 2 get frontend store url for a path in admin

texts:
In admin code, i would like to get the frontend store url for a path. But, always getting admin url for the path.

$storeId = $this->_storeManager->getDefaultStoreView()->getStoreId();
$url = $this->_storeManager->getStore($storeId)->getUrl("sample/index/test");

Expected result in http://{magento-url}/sample/index/test/, but always getting http://{magento-url}/{admin-path}/sample/index/test/

Checked the store model, the getUrl function uses Magento\Backend\Model\Url to get the store url.

Can anybody please, let me know the correct way to get the store url from admin page.

namespace VendorName\ModuleName\Model;

use VendorName\ModuleName\Helper\Data as ModuleHelper;
use Magento\Store\Model\StoreManagerInterface;

class Api {

    protected $_helper;

    public function __construct(ModuleHelper $helper, StoreManagerInterface $storeManager) {
        $this->_helper = $helper;
        $this->_storeManager = $storeManager;
    }

    public function doSomeAction() {
        //$customUrl = $this->_storeManager->getStore()->getBaseUrl() . "/sample/index/test";
        $customUrl = $this->_helper->getCustomUrl();
        echo $customUrl;
    }

}

namespace VendorName\ModuleName\Helper;

use Magento\Framework\App\Helper\Context;
use Magento\Store\Model\StoreManagerInterface;

class Data extends \Magento\Framework\App\Helper\AbstractHelper {

    protected $_storeManager;

    public function __construct(Context $context, StoreManagerInterface $storeManager) {
        parent::__construct($context);
        $this->_storeManager = $storeManager;
    }

    public function getCustomUrl() {
        $storeId = $this->_storeManager->getDefaultStoreView()->getStoreId();
        return $this->_storeManager->getStore($storeId)->getUrl("sample/index/test");
    }

}


texts: Magento IWD one page checkout, show shipping cost

texts:
UPDATE:

I need to use the ajax function, when the shipping is updated or when voucher code is applied the fees should be added. I can not find out how to do this.

using IWD one page checkout.

Before total amount I want to show the total calculated shipping cost incl taxes. Have have got the costs etc working for the products and total. But I can not get the shipping cost, even when I copy code for showing this I get errors.

Can you please help me, going crazy!?

Here is the code i am using for products and total

<?php

    $items = Mage::getSingleton('checkout/session')->getQuote()->getAllItems();

    foreach($items as $item) { ?>

<?php echo $item->getQty(); ?> qty, <?php echo $item->getName(); ?>:
<?php echo number_format((float)$item->getPriceInclTax()*$item->getQty(), 2, '.', ''); ?> €

   <? }
?>

<?php echo $this->__('Total Amount to Pay:')?><?php echo Mage::helper('opc')->getGrandTotal()?>


texts: Why my overriding of the success.phtml is not working?

texts:
I have copied and pasted the file from

  vendor/magento/module-checkout/view/frontend/templates/success.phtml

to

  app/design/frontend/THEME/THEMENAME/Magento_Checkout/templates/success.phtml

Modified some codes in that file, then after I  have

cleared the cache
removed file manually from var/view_preprocessed and pub/static

But my code won't is displayed in the frontend.

Searched already via find command for another success.phtml file but nothing found.

Any ideas to override the success.phtml page?


texts: Magento 2 This site can’t be reached ERR_CONNECTION_REFUSED

texts:
My website creativehands.in built on Digital Ocean server is not opening with the error, "This site can’t be reached ERR_CONNECTION_REFUSED ". We are using Magento 2.1.5. How to fix this? It happened automatically.

Also, I inserted an iframe in one of the pages of a link without SSL(http). Is this might be the reason for this error? (The site was working fine for almost 10 - 12 days even after I inserted the iframe part).

Also, My disk space on Digital Ocean has very less free space(only about 1 - 2 GB free). Is this less free disk space the cause? Because, I have been searching alot of forums and they mention that the Magento SQL requires a good amount of free disk space to function.

Any help would be appreciated.


texts: Cron job not calling by automaticalic scheduler time

texts:
Not working cron job.
I used code from http://inchoo.net/magento/creating-cron-script-in-magento/.
But this code works when I hit my url every one minute http://127.0.0.1/magento18/cron.php that time called my custom cron job and it works perfectly and also added status success in cron_schedule table.But I want every one minuate call my cron job automatically.What I miss in my code ? Please suggest me.
My config.xml code

<config>
    <crontab>
        <jobs>
            <check_data1>
                <schedule>
                    <cron_expr>* * * * *</cron_expr>
                </schedule>
                <run>
                    <model>test/observer::test</model>
                </run>
            </check_data1>
        </jobs>
    </crontab>
 </config>


texts: Related products are not visible on product detail page

texts:
I am working on magento ultimo theme version 1.15. Related products slider is not shown on my detail page.
Please help me guys what to do.
I dont under stand whats the issue.
www.crewebserver.com/~wwwclearance/index.php/manufacturers/9a19-omni-300-led-35k-gu24.html

Thanks


texts: Hide tab on product page on certain condition in magento 2.3.3

texts:
I am trying to use ifconfig to hide a tab but it is not working properly below is my code please check

<?php
namespace Afg\Hidetab\Block;
class hidetab extends \Magento\Framework\View\Element\Html\Link {
    /**
     * @override
     * @see \Magento\Framework\View\Element\Html\Link::toHtml()
     * @return string
     */
    public function toHtml() {return true ? parent::toHtml() : '';}
}

=========

<referenceBlock name="product.info.details">
            <block  class="Magento\Catalog\Block\Product\View" name="hidetab" ifconfig='Afg_Hidetab/hidetab/enable' template="Afg_Hidetab::hidetab.phtml"  group="detailed_info" >
            <arguments>
                <argument translate="true" name="title" xsi:type="string">Lava Calculator</argument>
            </arguments>
            </block>
        </referenceBlock>


texts: Magento 1.9.2.2 Free Shipping Coupon Not Working

texts:
Currently we are using Magento version 1.9.2.2 and out free shipping coupon is not working correctly, I have set up a product cart rule in which if cart subtotal is >=100 and place by General or Guest user then he get free shipping. I have also create another coupon for 50% off on shipping if order is >=299 and placed by wholesale which is working correctly.

Where as the coupon is applied and also excluding the shipping amount but it also exclude the amount from cart item as well and adding the subtotal amount to shipping price.

I have already attach the screen shot so it would be easy to rectify the error. It would be great if any one update me which file is adding the discount on item row in cart.


texts: Different Full Page Cache for mobile and desktop

texts:
Note: Don't want to use multiple store views.

I have setup 2 different home pages for my website by detecting mobile agent and desktop agent.

Now the problem is, when page cache (Magento default) is generated from mobile, then it is showing mobile home page on desktop.

Is there anything I can do to make different page cache for mobile and desktop for home page?


texts: MAGENTO2 : HOW TO RECTIFY WHICH PROMOTION IS APPLIED ON THE RESPECTIVE ITEM IN AN ORDER

texts: I have an order with an Item having some special price on it. I want to know whether if it's Product's special price, tier price or any catalog rule promotion price. Reason for asking this question is I send this data to some third party to generate the report on basis of promotions(special price, tier price or catalog rule special price). I want to achieve it by writing a code in magento2. Can anyone help out in this?


texts:
I am trying to update Magento 2.2.5 to 2.3 using the System Upgrade tool.

The readiness check gives an error saying that php memory limit is set to  128M. In reality we have 2G set on server.

Check .htaccess, limit is set to 2G, checked php info, local value as well is server value is set to 2G, I echoed the memory limit from index.php and it returns 2G.

What am I missing or from where can this 128M come from? The host is lost and has no idea what could be the issue.


texts: Disable Modules for specific website in Magento2

texts:
I am having Multiple stores. I need to Disable some modules for specific website in Magento2.

Can anyone suggest me how to achieve this


texts: Email Template Error with spanish characters

texts:
I am sending a custom email, the custom template data is in Spanish.
if the template is in the English language it's working perfectly.
but in Spanish language, it shows me unknown error.
it's not working if characters are like: ú, ó

Its not working with below code:

{{trans "%body" body="Transacción"|raw}}

Error:

  Unable to send mail: Unknown error


texts:
For certain store views, we do not want to offer a shopping functionality at all.

Products should be shown (as a catalog), but not the possibility to add to the cart.

How can we disable the shopping functionalities of Magento by configuration?

UPDATE:

Add To Cart Button can be removed using the catalog_product_is_salable_after (thanks to @fmrng's answer)
It is pretty tough to remove the "out of stock" notice from all templates...


texts: Basic shopping cart price rule not working

texts:
I am trying to set up:

10 percent of product price discount
If ANY of these conditions are TRUE :
SKU  is one of  K27700, K25500, K27950, K14230...

This simply will not apply at checkout with the coupon code set up. It says coupon code is not valid.

Rule is active and applicable to the correct website and customer groups.

Similar coupon works when not restricted to certain SKUs (works site wide).

Can anyone advise if I've set this up wrong?

Thanks :-)


texts: When to choose Magento Enterprise edition over Community edition?

texts:
Looking at the features of the Enterprise edition, I am wondering whether I should recommend it to clients.

I have many years of experience with the community edition  and have looked into the Enterprise edition.
It seems to me that it will almost always be cheaper for my client to use a community edition with a full page cache solution (like Varnish with an appropriate module) set up.

There are some more add-ons to Enterprise like rewards or better management of staff rights, but all these can be easily built using appropriate modules in the community edition it seems.

Then there is the service level agreement (SLA), but again having very much Magento experience, so far, I was always able to solve problems in a timely manner.

I am probably overlooking something, since the Enterprise edition is extensively used, so please give me insights / scenarios when to recommend Enterprise to a customer.


texts: Magento 2 import new products with a CSV file and cron job

texts:
How to import products with your image and categories from a .csv? I'm using the script:

Magento 2 import new and update current products with a CSV file and cron job

But I do not work the images or the categories of the product.
Is there a template I can get? Or is there a guide I can follow to do it?

thx


texts: How to restrict admin access to specific store on same installation?

texts:
How can I restrict admin access to specific store? For example:

Admin A
Admin B
Admin C

Store 1
Store 2
Store 2

Admin A > Store 1
Admin B > Store 2
Admin C > Store 3

I know there are some paid modules on Magento Connect, but I would like to find another solution.

All these stores are in the same Magento Installation.


texts:
I've found that when trying to use the unsetChild method, sometimes I have to use the 'name' attribute and others 'as'. It seems that if a block is added normally, you use 'as' but if it is  added to a block using the append method, you may have to use 'name'. Is this assumption correct?

What is the reasoning behind this and is there a standard way to understand which attribute you should use?


texts: Create Custom Attribute Like "Extra Fee" in Category And Calculate It To grand Total

texts:
I Have Created One Attribute In Category Like Extra Fee.
But How To Calculate That Extra Fee In Magento Grand Total ?


texts: How to log all rest api calls in magento2?

texts:
Is there any way to log all the requested rest API with details (requested URL, methods, parameters, time, etc.,) in Magento2?
earlier I have logged all the rest of the API which was related to products using the model (V1.php) in Magento 1. but in magento2 all the methods called in the same location for both API and backend usage to create/update/get.
here how can I know if the request from API?
Please suggest any solution to log APIs.
Thanks


texts: How to setup a rest api for adminhtml only?

texts:
Magento 2 version 2.1.10.

Admin base url : /admin

Site base url : /

How can I create a rest api and make it available only under the admin base url, like /admin/testapi ?

Furthermore, some day I may want use a separate domain name like admin.store.com for the backend site, how can I avoid CORS issue, like calling admin.store.com/testapi from store.com ?

Thanks a lot for any ideas ~~


texts:
On entering admin username/password - getting error - "You did not sign in correctly or your account is temporarily disabled."
And some time big url http://www,-------------.com/admin/admin/dashboard/index/key/286310d2d38e6d6df2c4f0df1663f3b2f2c61a23ba178174c86f746588d34b4b/
This site can’t be reached

The connection was reset
Please help me to resolve this issue.


texts:
I want to remove customer dashboard links. I have used below code and its working fine. But I want to know another way.

Please let me know if you have another logic to remove links.

Step 1: Go to (Package/Template/customer/account/navigation.phtml)

Step 2: Replace the below line

  $count = count($links);
  $_count = count($_links); /* Add or Remove Account Left Navigation Links Here -*/

  unset($_links['tags']); /* My Tags */
  unset($_links['invitations']); /* My Invitations */
  unset($_links['reviews']);  /* Reviews */
  unset($_links['wishlist']); /* Wishlist */
  unset($_links['newsletter']); /* Newsletter */
  unset($_links['orders']); /* My Orders */
  unset($_links['address_book']); /* Address */
  unset($_links['enterprise_customerbalance']); /* Store Credit */


texts:
I would like to add a block containing js to our products page.

The block in question would look like:

<script> <?php $this->callfunction($product) ?> </scipt>

How would I go about doing this?  And call the 'callfunction' from within this block?


texts: How to Shuffle Product Collection in Magento 2?

texts:
I am getting products collection form multiple categories. I want to shuffle products everytime when function getProductCollection() is called.
My function is:

public function getProductCollection($categories)
{
    $collection = $this->_productCollectionFactory->create();
    $collection->addAttributeToSelect('*');
    $collection->addCategoriesFilter(['in' => $categories]);
    $collection->addAttributeToFilter('visibility', \Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH);
    $collection->addAttributeToFilter('status',\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED);
    $collection->setPageSize(5);
    return $collection;
}


texts: Save custom value in sales_shipment_item

texts:
i have custom attribute ("current_seller_id") in sales_shipment_item table and want to save custom value in it when click on submit invoice

Can any one tell me which event or use plugin method for saving value when data save in sales_shipment_item table.

And also find to know same value save in sales_shipment table. current_seller_id attribute also in sales_shipment table.

Please guide me little bit which event use or plugin ?
Thanks in advance


texts:
In the category column of the CSV ("_category"), how do I use the ID number of the category instead of the full path?

I did google this but I think the results were for 1.7 as the field name was "category_id" and when I changed it to this, i got an error.


texts:
When reading the design guide here:
http://www.magentocommerce.com/design_guide/articles/working-with-magento-themes

This folder structure is often mentioned:

‘app/design/frontend/my_interface/my_theme/’ AND ‘skin/design/frontend/my_interface/my_theme/’

My question is what is my_interface, is that pc, tablet and mobile and so fourth?
What different interfaces can magento detect?


texts: formkey in layered navigation links on search results pages?

texts:
I just noticed that the layered navigation links in catalogsearch/result have a formkey embedded in the URL.

The links look like:

https://www.example.com/catalogsearch/result/index/form_key/8T6hGypNKP98Cdsj/color/3429/q/floral%20doll/?color=3429&q=floral+doll&shape=5681

Is this normal?

Any ideas why this is happening and how I can fix it?


texts: Undefined index: sequence-2 - Magento 2.2.2 EE

texts:
I can't place the order, some of the specific bundle products, it throws the below error.

  [2018-07-19 11:52:58] report.CRITICAL: Report ID: webapi-5b507b9a64391; Message: Notice: Undefined index: sequence-2 in /var/www/html/production/vendor/magento/module-tax/Model/Sales/Total/Quote/CommonTaxCollector.php on line 513 {"exception":"[object] (Exception(code: 0): Report ID: webapi-5b507b9a64391; Message: Notice: Undefined index: sequence-2 in /var/www/html/production/vendor/magento/module-tax/Model/Sales/Total/Quote/CommonTaxCollector.php on line 513 at /var/www/html/production/vendor/magento/framework/Webapi/ErrorProcessor.php:205, Exception(code: 0): Notice: Undefined index: sequence-2 in /var/www/html/production/vendor/magento/module-tax/Model/Sales/Total/Quote/CommonTaxCollector.php on line 513 at /var/www/html/production/vendor/magento/framework/App/ErrorHandler.php:61)"} []

If anyone faces this error before, please help me.


texts:
I would like to be able to let my clients select the product they want using a thumbnail defined in Custom Options.

If I have "White" selected in my dropdown menu. I would like the product image to update to the white image.

I know there are modules for this, however I would appreciate a free option if possible.


texts: Magento 2 USPS shipping method estimated date and time

texts:
I need to show estimated date and time with shipping method name. I am trying USPS api to get estimated date and time but facing some error. Below the api which i am trying and the error.
https://production.shippingapis.com/ShippingAPI.dll?API=SDCGetLocations&XML=05510755428
https://production.shippingapis.com/ShippingAPI.dll?API=PriorityMail&XML=5510755428
Array
(
[Number] => 80040B19
[Description] => XML Syntax Error: Please check the XML request to see if it can be parsed.(B)
[Source] => USPSCOM::DoAuth
)
If anyone can help with this then please let me know.


texts: What is the recommended way to keep Magento up to date?

texts: I have a site on Magento 1.9.2.2. I recently got a notification to upgrade to 1.9.3 and SUPEE-8788. I am used to Wordpress where you get one update and install it and that is it. Do I need to install the Supee patch if I install 1.9.3? Are they separate? Should I install one before the other?


texts: Search Results not using the Product list interceptor class

texts:
I needed to make some changes to the product list in magento 2.
So I went with this approach.
Create a plugin on the  Magento\Catalog\Block\Product\ListProduct::toHtml method and do my changes in there.
So far so good. It works nicely on the category view page, but it does not work on the search results list.
After some debuging I found out that on the category view page the class  Magento\Catalog\Block\Product\ListProduct\Interceptor is used and on the search results list the class  Magento\Catalog\Block\Product\ListProduct is used. That's why I don't get my plugin executed.
My question is, why is the class Magento\Catalog\Block\Product\ListProduct used directly and not the generated interceptor for the search results page?


texts:
I'm attempting to create a report based on the category and the quantity sold for that category. So two columns: Category and Quantity Sold.

Pretty much as you see in this report here with the category name and the quantity ordered
http://reports.demo.mirasvit.com/admin/?demo=demo (Advanced Reprots->Sales->Sales by Category)

I know magento doesn't associate a sale with a category so i'm quite stuck on this and appreciate any help. Pulling out a category tree list as ordered in the admin would be a start but I can't even seem to do that at the moment!


texts:
Magento2 + Mailchimp
After connection between both, new subscribers are pushing from Magento to Mailchimp sucessfully.
How i can add or import the old subscribers into mailchimp contact list?


texts: Magento 2 , unable to place order with stored credit cards

texts:
Place order button is not working when i add new billing address and click place order
using stripe stored credit card , i m trying to debug and check for the place order function.
as each payment method has its own view model and place order button i've tried to a log in it but still not able to track/find the issue.
any thoughts where i can i find this "place order" function or any solution ? (when i click "place order it send ajax requests but doesn't redirect or place order , check image) Answers & interest are appreciated.


texts: Redirect to another category from observer

texts:
i am using the controller_action_postdispatch_ajax_index_add observer. i wanted to redirect to another category in this event so my code is as follows

Mage::app()->getResponse()
           ->setRedirect(
               Mage::getUrl($category_model->getUrlPath())
           )
           ->sendResponse();

but their is no redirection from the observer to the category page.please help me


texts:
I've added custom product text attribute and marked it "Use In Search".

Also my code configured for searching by two letters.

For example when I'm searching "Tuborg" and typing "tu" autocomplete in search bar show me results.

In my atribute I added short word "øl" which means beer in norwegian.
As you can see whe word contains one letter from extended latin list.

Typing exactly that word in search bar result gives me nothing.
Some experiments shows me that if I write attribute value "øle" instead "øl" and type "øl" in search bar - it gives me result of needed product.

How to make working search by this kind of two words? And why it isn't working?

UPD: As I though the problem might be in norwegian entities, but search doesn't work in general in case when word contain only two letters and search query contain two letters too.


texts:
I am trying to save custom options(drop_down type) for a specific product. In my case, I need to add a custom option in the loop.

  My code is here

$json ='{"productID":"1","productPrice":"5585.00","productDetails":{"productImage":"https:\/\/development.modeconfigurator.com\/eCommerce\/backdrop.jpg","TABLE TOP":"COPPER DISTRESSED","TABLE FRAME":"RAL 5024 PASTEL BLUE"},"_":"1583172411557"}';
        $jsonDecode = json_decode($json, true);
foreach ($jsonDecode["productDetails"] as $key => $value) {
            $options = [
                    0 =>[
                    'sort_order' => '1',
                    'title' => $key
                    ,
                    'price_type' => 'fixed',
                    'price' => '',
                    'type' => 'drop_down',
                    'is_require' => '0',
                    'values' => [
                        '0' =>[
                            'title' => $value,
                            'price' => '',
                            'price_type' => 'fixed',
                            'sku' => '',
                            'sort_order' => '0',
                            'is_delete' => '0',
                        ]
                        ]
            ]
                ];
            foreach ($options as $arrayOption) {
//
                $option = $this->_options
                    ->setProductId($_product->getId())
                    ->setStoreId($_product->getStoreId())
                    ->addData($arrayOption);
                $option->save();
                $_product->addOption($option);
            }
        }

The output of this code is

But I want to add 3 Custom Options 1 for product image, 2 for Top Table, 3 for Top frame and add 1 value for each custom option(drop_down). loop in screenshot

Please tell me where am I doing a mistake.


texts: How to check if value exists in catalog_category_product table Magento

texts: How can I check if the value exists in catalog_category_product table Magento ?


texts:
How I can remove store code from default store URL of my website?

Actually

www.domain.com/it/ **DEFAULT STORE**

www.domain.com/en/ **ENGLISH STORE**

I Need

www.domain.com/ **DEFAULT STORE**

www.domain.com/en/ **ENGLISH STORE**


texts:
Essentially, I have set the store up so the suffix for each page title is "- CompanyName" but I would like to know how to create an exception for this for the home page.
Thanks


texts: Get specific transaction ID from invoice

texts:
I know that I can use order->getPayment()->getLastTransId() to get the related transaction id from the most recently processed transaction, but it's not as specific as I'd like.

Is there a method to get the specific transaction id associated with an invoice?

Example:
Place Order -> Original Authoriztaion ID xxx1
Partial Invoice A -> Delayed Capture Transaction ID xxx2
Partial Invoice B -> Delayed Capture Transaction ID xxx3
Final Invoice C -> Delayed Capture Transaction ID xxx4

How would I get the transaction ID that is specifically related to Invoice A?


texts: How to enable customer account in Magento 2?

texts:
I am not able to log in to Magento 2 frontend.

  "You did not sign in correctly or your account is temporarily disabled."

This message is showing after the correct login.
How to solve this error?


texts: Login into Magento 2 site from external site

texts: I have a site outside Magento's domain and I should allow Magento customer to login into Magento Store from this external site. Being completely new to Magento , I don't know how to implement this service. I was able to allow registration to Magento from an external site using REST API, but I can't find a similar way to login using REST services.


texts:
I am getting sales quote collection with this reference,,but it throws below error.

MyCode

Mage::log($item_ids);
$collection=Mage::getSingleton('sales/quote_item')->getCollection()->addFieldToFilter('item_id',array('in'=>$item_ids));
foreach($collection as $item)
    {
        Mage::log($item);
    }

Log

2014-12-10T13:13:46+00:00 DEBUG (7): Array
(
    [0] => 3030
    [1] => 3032
    [2] => 3056
    [3] => 3057
    [4] => 3070
)

Error    showing on frontend white screen with this message.

Fatal error: Call to a member function getStoreId() on a non-object in /var/www/beta/app/code/core/Mage/Sales/Model/Resource/Quote/Item/Collection.php on line 67

What is wrong in my code? .


texts: Equivalent product option code in Magento 2?

texts:
Magento 2.3.3
I tried rewriting the code I have for Magento 1, but i cant manage. The code can be found on https://pastebin.com/8rKJh0j7. Can someone help?
Thanks


texts:
I am trying to integrate Open Weather API in my website, for this I have written some coding and it's working as expected in my local system. The same code is not working in Live. it's returning error and I have googled for this error and I tried so many examples like xml json XMLHttpRequest jsonp But all examples is working locally when Live it's not working. Throwing same error as below.

For above I have tried below code:

Example 1

Example 2

In Example 2 I have tried both xml,json and jsonp Mode in url and datatype. But again throwing same Error.

Could you please suggest me how to do it.


texts: Magento 2 Integration test can't run - store_website doesn't exist

texts:
I am trying to write the integration test. I follow the guide from http://devdocs.magento.com/guides/v2.1/test/integration/integration_test_execution.html to setup the environment. After I updated all requested files (phpunit.xml, install-config-mysql.php), I try to execute the test and get the following error (the phpunit.xml doesn't include my testsuite, just the default testsuite).

Exception: Starting Magento installation:
File permissions check...
[Progress: 1 / 473]
Required extensions check...
[Progress: 2 / 473]
Enabling Maintenance Mode...
[Progress: 3 / 473]
Installing deployment configuration...
[Progress: 4 / 473]
Installing database schema:

  [Zend_Db_Statement_Exception]
  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento_inte
  gration_tests.store_website' doesn't exist, query was: SELECT `main_tab
  le`.* FROM `store_website` AS `main_table` ORDER BY main_table.sort_ord
  er ASC, main_table.name ASC

Does anyone know why the error happened and how to fix it?

I am using Magento 2.1.9 and PHP 7.0.


texts:
I would like to get the following data between two dates:

Total number of orders
Total revenue excl
Profit excl VAT
VAT Total revenue incl VAT
Total profit excl VAT

I'm trying the following query but seems not correct to me.

$from = date('Y-m-d');
$to = date('Y-m-d', strtotime('-2 year'));
$query = "SELECT SUM(orders_count) AS orders_count,
                 SUM(total_qty_ordered)            AS total_qty_ordered,
                 SUM(total_qty_invoiced)           AS total_qty_invoiced,
                 SUM(total_income_amount)          AS total_income_amount,
                 SUM(total_revenue_amount)         AS total_revenue_amount,
                 SUM(total_profit_amount)          AS total_profit_amount,
                 SUM(total_invoiced_amount)        AS total_invoiced_amount,
                 SUM(total_paid_amount)            AS total_paid_amount,
                 SUM(total_refunded_amount)        AS total_refunded_amount,
                 SUM(total_tax_amount)             AS total_tax_amount,
                 SUM(total_tax_amount_actual)      AS total_tax_amount_actual,
                 SUM(total_shipping_amount)        AS total_shipping_amount,
                 SUM(total_shipping_amount_actual) AS total_shipping_amount_actual,
                 SUM(total_discount_amount)        AS total_discount_amount,
                 SUM(total_discount_amount_actual) AS total_discount_amount_actual,
                 SUM(total_canceled_amount)        AS total_canceled_amount
          FROM sales_order_aggregated_created
          WHERE period <= $from AND period >= $to";

The above query is what I'm using to get total numbers of orders, Total Revenue and Profit, but I'm not getting the idea on how to calculate taxes.

Also, I'm not sure about using the sales_order_aggregated_created table.


texts: Magento 2: Can you Remove a Block From the Layout Completely

texts:
In Magento 2, you can suppress the display of a block using the remove tag

<referenceBlock name="product.info.media.image" remove="true"/>

However, this doesn't remove the block from the layout completely.  If you tried to insert a new block with the name product.info.media.image, you'd get the following error

  main.CRITICAL: exception 'Magento\Framework\Exception\LocalizedException' with message 'Element with ID 'product.info.media' already exists.' in /path/to/magento/framework/Data/Structure.php:151

Is there a way -- similar to Magento 1's unsetChild -- to completely remove a block.

Asking because many Magento 1 extension remove and reinsert blocks, and having a way to do this in Magento 2 would help with automated conversion tools.


texts: Which element added in magento admin backup?

texts:
I want to know the exact use of below backup setting.

System backup -> is system configuration settings are stored and where stored?
Database and Media backup -> is media files are including on this backup?
Database backup -> this is for whole database backup?

Your inputs is really appreciable.


texts: i need to move the "shop by" button in mobile, inside the toolbar block, and i cant do it. Any help?


texts: Rewrite all log messages of a module to a different log

texts:
This might be an odd question. In my shop i have a module which writes a lot to my system.log. The developers told me to ignore it but i like my log to be clean for other things. I'm not allowed to change this module's code by a contract otherwise i could easily put this in a different log.

Is there a way by using the observer perhaps to detect log input from this specific module and intercept it and write it to another log file.

p.s. these messages are always the same and popup hundreds of times, so i could check for certain text in this message to detect and rewrite to another log.

Thanks in advance, im really curious about this one.


texts: Magento2 : Get Category Ids from product import csv

texts:
product import csv containing category data which is given as below

  Default Category/Diagrams/Business,Default
  Category/Diagrams/Strategy,Default Category/Diagrams/Planning,Default
  Category/Diagrams/Marketing,Default Category/Diagrams/Icons

I want to fetch category ids from the above string.


texts:
while creating admin menu i am getting this error .
attribute 'resource': [facet 'pattern'] The value 'M_Again::menucontroller' is not accepted by the pattern.

etc/acl.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
    <acl>
        <resources>
            <resource id="Magento_Backend::admin">
                <resource id="M_Again::menucontroller" title="magain" translate="title" sortOrder="900"/>
            </resource>
        </resources>
    </acl>
</config>

etc/adminhtml/menu.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
    <menu>
        <add id="M_Again::again" title="magain" module="M_Again" translate="title" resource="M_Again::menucontroller" sortOrder="100" action="magain" />
    </menu>
</config>

The resource id given in acl.xml is wrong i think explain please what it should be . thanks


texts: how to get discount rule and discount from cart programmatically?

texts:
Any one know how to get discount rule and discount from cart? See the pic

Can i get this from external script using cart object? This part of code generate the discount amount section:

public function renderTotal($total, $area = null, $colspan = 1)
{
    //if the code is "discount"
    $code = $total->getCode();

    if ($total->getAs()) {
        $code = $total->getAs();
    }
    return $this->_getTotalRenderer($code)
        ->setTotal($total)
        ->setColspan($colspan)
        ->setRenderingArea(is_null($area) ? -1 : $area)
        ->toHtml();
}

Update

try {
    $product_id = '907'; // Replace id with your product id
    $qty = '1'; // Replace qty with your qty
    $product = Mage::getModel('catalog/product')->load($product_id);
    $cart = Mage::getModel('checkout/cart');
    $cart->init();
    $cart->addProduct($product, array('qty' => $qty));
    $cart->save();
    Mage::getSingleton('checkout/session')->setCartWasUpdated(true);
    Mage::getSingleton('core/session')->addSuccess('Product added successfully');

    $totals = Mage::getSingleton('checkout/session')->getQuote()->getTotals();
    //work
    echo $totals['discount']->getValue()."
";

    $quote2 = Mage::getSingleton('checkout/session')->getQuote();

foreach ($quote2->getAllItems() as $item){
    //work
    $discountTotal += $item->getDiscountAmount();

}
echo $discountTotal."
";

The left question is how to get discount label?


texts: I want to add new column into magento database and want to insert new data into newly created column. Basically what exact i want to do is that when new customer register in my webstore. i want to generate a temporary account number when customer click on register button. on the next page this number will be appear written as temporary account number is = ....... for this purpose i think i need to create a new column in database to store the temporary account number.


texts: Magento 2 How to change variable value using Plugin

texts:
I have a execute method of controller which has array as item like

$data['array_key'] = $this->helper->someFunction();

now i want to change value of this item on some condition can any one please help me on how i can change this value using plugin.

Note: Please don't suggest preference.


texts: API url for instant purchase in magento 2.2.6

texts:
I am new for Magento and want to create REST API of instant purchase functionality for mobile application using Magento version 2.2.6. I have configured instant purchase option for site and it's working fine.

To create API for instant purchase, I have googled but unfortunately did not find api url for instant purchase. I have already worked for magento API like add to card, list products...etc but unable to create for instant purchase. So could someone suggest me if possible, how to do this?

Thanks


texts: Magento - Different css for different email template

texts:
I need to hide the email header only for order email. How would you achieve that in Magento 1?

One thing that I have in mind is to have different class in the <body> tag. But is it possible for the email templates?


texts: Magento2 not able to get & save customer custom attribute

texts:
I am using Magento 2.1.5, and created custom attribute for customer and trying to get & set the values of custom attribute but didn't get custom attribute in customer collection and as well as set also.

add custom attribute:

 $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
    $eavSetup->removeAttribute(\Magento\Customer\Model\Customer::ENTITY, 'sample_attribute');
    $eavSetup->addAttribute(
        \Magento\Customer\Model\Customer::ENTITY,
        'sample_attribute',
        [
            'type' => 'int',
            'label' => 'Sample Attribute',
            'input' => 'select',
            'source' => 'Magento\Eav\Model\Entity\Attribute\Source\Boolean',
            'required' => true,
            'default' => '0',
            'sort_order' => 100,
            'system' => false,
            'position' => 100
        ]
    );
    $sampleAttribute = $this->eavConfig->getAttribute(\Magento\Customer\Model\Customer::ENTITY, 'sample_attribute');
    $sampleAttribute->setData(
        'used_in_forms',
        ['adminhtml_customer_address', 'customer_address_edit', 'customer_register_address']
    );
    $sampleAttribute->save();

Get custom attribute value :

   $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $customerRepository = $objectManager->create('Magento\Customer\Model\Customer')->load('1');
    echo "<pre>"; print_r($customerRepository->getData());


texts: Remove category level from top navigation menu (topMenu)

texts:
I have a category structure which goes Socks>>Casual>>No-Show, Crew  and would like the URL to be socks/casual/no-show.html, for example.

However, I would like the generated top navigation menu ("topMenu") to skip the 2nd level, i.e. "Casual", so that the dropdown menu shows Sock>>No-Show, Crew.

What's the best way to do this?

Thank you!


texts: Magento 2 UI Component field customize based on condition

texts:
I need to validate required-entry true/false based on condition in UI component form field.
Ex. if there is new entry, field will be required and it form is with existing entry, field will be not required.


texts:
Can any body provide me fresh installation for magento 2.3.2.
Every time i tried with the setup installtion it gives me error.
Can anybody provide me with fresh setup of version 2.3.2

Getting this error

[2020-02-27 07:20:45] main.CRITICAL: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento0_wazoodle02.core_config_data' doesn't exist, query was: SELECT `main_table`.* FROM `core_config_data` AS `main_table` {"exception":"[object] (Zend_Db_Statement_Exception(code: 42): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento0_wazoodle02.core_config_data' doesn't exist, query was: SELECT `main_table`.* FROM `core_config_data` AS `main_table` at /home/magento02wsisit/public_html/lib/internal/Magento/Framework/DB/Statement/Pdo/Mysql.php:110, PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento0_wazoodle02.core_config_data' doesn't exist at /home/magento02wsisit/public_html/lib/internal/Magento/Framework/DB/Statement/Pdo/Mysql.php:91)"} []


texts:
I am trying to configure how to redirect my Magento website from "www.mywebsite.com/home" to base url "www.mywebsite.com", it always redirecting to www.mywebsite.com/home

RewriteEngine on
RewriteCond %{THE_REQUEST} ^.*/home
RewriteRule ^(.*)home$ http://www.mywebsite.com/$1 [R=301,L]

but I got error at the browser says "The page isn't redirecting properly"

I don't know where to change it to only "http://www.mywebsite.com/"

I will have problem with SEO if it not change


texts: Magento2 rewrite _prepareCollection method

texts:
I want to override the _prepareCollection method but not working I am using preference to override the method, In the same class of another method except _prepareCollection  is going to successfully overridden.

Please help on the above issue.Any references and suggestion is highly appreciated.

Thanks.


texts:
I'm trying to integrate Google Address to magento, following this guide

But I dont understand a line in php, here's the block definition:

namespace Webkul\Autofill\Block;

use Magento\Framework\View\Element\Template\Context;

class Autofillform extends \Magento\Framework\View\Element\Template
{

/**
 * @param Context $context,
 * @param array   $data = []
 */
public function __construct(
    Context $context,
    array $data = []
) {
    parent::__construct($context, $data);
}

/**
 * Return ajax url for button.
 *
 * @return string
 */
public function getGoogleApiKey()
{
    return trim($this->_scopeConfig->getValue('autofill/general_settings/google_api_key'));;
}

}

But in the function getGoogleApiKey I don't understand where _scopeConfig comes from, Is not been set on the __construct function.

Is this guide correct or there's something missing?

Thank you for your time.


texts: "You added %1 to your shopping cart." message not converting in italian language in magento2

texts:
%1 = product name
when i add a product in cart then magento showing msg
"You added %1 to your shopping cart."

  when i add product in cart in italian store
  so why english message not convering in italian language like below msg
  "Hai aggiunto %1 al tuo carrello."


texts: Magento 1.9 fresh install missing follow symlinks "Template Settings"

texts:
I'm running a magento 1.9 fresh install in a Debian 9 (also fresh install) and I can't find the "Template Settings". It should be under System > Configuration > Advanced > Template, but it is not there.

I'm looking for this section to set the "Allow Symlinks" to On, but it is not there. Anyone can help me?

Thanks in advance.


texts: Magento 1.9: Collecting information from form

texts:
I'm completely new to Magento and I was looking into ways I could implement a form that collects customer name and email information by writing the information into CSV file.

I know a custom module might be a way to solve this issues but I don't know how to implement it, or if you guys can think of a better way to solve this that would be much appreciated!


texts: Getting error in extension manager, Check Component Dependency & 2 php errors

texts: Trying to find solution from many days on google but nothing found helpful.


texts:
I feel like I'm going around in circles and missing something with a particular Magento 1.9.2 setup.

Previously the site used to use URL's for category pagination URL's like :

https://www.domainname.com/category/stuff/2.html

But for some reason it has now reverted back to

https://www.domainname.com/category/stuff.html?p=2

The only reason I noticed was during an SEO Audit I noticed 404's for the previously used rewritten URL's.

How can I change them back ? I'm guessing its not a straightforward rewrite.

There is a an SEO plugin installed,  however I can't find any settings in order to accomplish it ( mirasvit seo )


texts: 'value' is not expected in 'text' UI component

texts:
I try to add text item to adminhtml UI component as described in docs:

<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">

    <argument name="data" xsi:type="array">...</argument>
    <settings>...</settings>
    <dataSource ...>...</dataSource>

    <fieldset name="..._form">
        ...
        <text name="text_example" template="ui/form/field">
            <settings>
                <label translate="true">Text Field Example</label>
                <visible>true</visible>
                <disabled>false</disabled>
                <elementTmpl>ui/form/element/text</elementTmpl>
                <value>The text value example</value>
            </settings>
        </text>

    </fieldset>
</form>

I have an error in browser:

1 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): The XML in file "/.../view/adminhtml/ui_component/..._form.xml" is invalid:
Element 'value': This element is not expected.
Line: 63

Verify the XML and try again.
<pre>#1 Magento\Ui\Config\Reader->read() called at [vendor/magento/module-ui/Config/Data.php:102]
#2 Magento\Ui\Config\Data->initData() called at [vendor/magento/module-ui/Config/Data.php:136]
#3 Magento\Ui\Config\Data->get() called at [vendor/magento/framework/View/Layout/Reader/UiComponent.php:100]
#4 Magento\Framework\View\Layout\Reader\UiComponent->interpret() called at [vendor/magento/framework/View/Layout/ReaderPool.php:105]
...

I've checked text.xsd and ui_component.xsd and I don't see value attribute is defined there.

What is the right way to add text item to UI form?

These are the text items based on @Marius (first one) and @Shailesh Katarmal (second one) answers below:

Marius code should be slightly edited:

<text template="ui/form/element/text">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="inputName" xsi:type="string">text_example</item>
            <item name="value" xsi:type="string">Lorem ipsum ...</item>
        </item>
    </argument>
</text>

but Shailesh Katarmal code can be used as is.

Thanks, guys!


texts: Can I reuse adminhtml UI compontent on frontend? if so How?

texts:
I'm new to Magento, hope this is the right place to ask this question, well the thing is that I'm new to Magento 2 and I'm trying to see how everything works, I bought a Module that converts Magento 2 into a marketplace, but now I have the dilemma that they won't allow me to show the "Attribute sets" on the vendor side, I can see them just in the admin, but not in the vendor site, they want to sell me that as a separate plugin.

I don't want to buy a new plugin, so I've been seeing how the admin side works for creating knew products, and I was thinking that maybe I could take that UI component (product_form) and put it on the frontend then "intercept" the method when the product is being created and then add that to the marketplace table, that way I wouldn't have to buy that plugin, but I don't know if this can be done and if so, where can I get specific info on how to do that? Is it worth it?

Thanks!


texts: Recommended Magento cron frequency and setup

texts:
All over the internet, there is a variety of suggestions for how often a cron should be run, without any real suitable explanation.
Thus, I was wondering if anyone could help myself identify 'ideal', settings.
Magento's recommendation is:

/bin/sh /path/to/your/magento/site/root/cron.sh

For clarity, Magento suggests to execute on every minutes. But, have seen some of the following recommended by others:

*/5 * * * * sh /path/to/your/magento/site/root/cron.sh
*/1 * * * * sh /path/to/your/magento/site/root/cron.sh
*/10 * * * * sh /path/to/your/magento/site/root/cron.sh

My current settings for cron in admin:
Generate schedules every: 15
Schedule ahead for: 20
Missed if not run within: 15
History cleanup every: 10
Success history lifetime: 60
Failure history lifetime: 600


texts:
In CMS pages i add one button show in image

When i m click on that button it redirect to another page that time CMS is not highlighted

which shown in above image so how to highlight menu?


texts: Importing prices csv is taking a long time

texts:
In Magento 2, there are roughly 115,000 products in the store.  There are 7 customer groups.  When importing prices via csv, the batch upload slowly imports the price but eventually crawls to a stop.  I've checked all error logs in my server, can't find any failure notices in magento logs, or any other server logs.  No email is sent.

More details on the setup:

RHEL 7
PHP 7
Apache
MySQL
Magento 2.1 EE

How I setup up the import is through a scheduled task, and hitting 'run'.  I've tried batches of 50000, 10000, 5000, 1000.  All have the same effect.  When uploading products, customers, and availability - Magento had no issue with big bulk uploading.

Another symptom I may be seeing is bin/magento indexer:reindex takes no more than :30 seconds for each category, except for Prices and EAV.   It takes over 3 minutes each.  Currently there only 3000 prices in the database, so 3 minutes to reindex seems like a lot.

Has anyone come across this? Any suggested fixes?


texts: Magento Subscription with automatic payment

texts:
We are planning to sell a webservice with a subscription period of one month. This means the customer subscribes our service for an unlimited time and gets an invoice every month after we (or our payment provider) automatically charged his credit card.

Is this possible with Magento? Which extensions might be suitable for us? Do we need to get a custom solution? Are recurring profiles a possible solution? Which payment providers offer this?

I made some research and I am not sure which solution suits our needs. We already had bad experiences with an extension (http://www.itabs.de/store/magescription) where it turned out, that the customer would have to pay every month manually. I found the Subscriptions and Recurring Payments by aheadWorks but I am not sure if this is the best solution. Can you recommend a direction where to go?

P.S.: We are in Europe (EU) if it matters.


texts: Nothing Happens When Paying With PayPal Payflow

texts:
Trying to test the checkout on my Magento 2.0.7 site. When I enter credit card information and hit the "place order" button, the ajax loader appears and remains there without any discernible response.

Opening the debug.log I can see the following arrays logged by the transaction, but I can't make heads or tails on what the problem is:

main.DEBUG: array (
  'request' =>
  array (
    'user' => '****',
    'vendor' => 'Bukuysk',
    'partner' => 'PayPal',
    'pwd' => '****',
    'verbosity' => 'HIGH',
    'BNCODE' => 'Magento_Cart_Community',
    'tender' => 'C',
    'trxtype' => 'A',
    'amt' => 0,
    'createsecuretoken' => 'Y',
    'securetokenid' => '0b50e95b762a30710ab71db50cf751f8',
    'returnurl' => 'http://tm34commerce.com/paypal/transparent/response/',
    'errorurl' => 'http://tm34commerce.com/paypal/transparent/response/',
    'cancelurl' => 'http://tm34commerce.com/paypal/transparent/cancel/',
    'disablereceipt' => 'TRUE',
    'silenttran' => 'TRUE',
    'firstname' => 'Ryan',
    'lastname' => 'Miller',
    'street' => '3587 South Federal Hwy Apt B',
    'city' => 'Boynton Beach',
    'state' => 'FL',
    'zip' => '33435',
    'country' => 'US',
    'email' => 'ryanmiller732@gmail.com',
    'shiptofirstname' => 'Ryan',
    'shiptolastname' => 'Miller',
    'shiptostreet' => '3587 South Federal Hwy Apt B',
    'shiptocity' => 'Boynton Beach',
    'shiptostate' => 'FL',
    'shiptozip' => '33435',
    'shiptocountry' => 'US',
  ),
  'result' =>
  array (
    'result' => '0',
    'respmsg' => 'Approved',
    'securetoken' => '985uWjaVg9UWaTmOzC0UIjQrH',
    'securetokenid' => '0b50e95b762a30710ab71db50cf751f8',
    'result_code' => '0',
  ),
) {"is_exception":false} []

I've placed a test order using the check/money order option, so the checkout itself works. It's paypal that's the problem. Is there anything in the debug log that indicates what the problem would be and how to fix this?


texts: How to show layered Navigation based on Advanced Search Result

texts:
I need to show Layered Navigation in advanced Search Result page based on Advanced Search result options.

For Example:

If I search Price 1000-10000, Then Based On Result Product options only view in layered navigation. Not Full Options.

I added Layered Navigation to advanced result page. Then search by price 1000-10000 its show some results and Full Layered navigation options.

But, I filter any city if any product not there in based on that city its show no product are there.

I know Functionality works fine. But, I  need to show only available layered navigation options of advanced search result product.

Suggest Me, How can I do that.


texts: Custom Controller Action Url Rewrite from config.xml Not working

texts:
I need to the rewrite custom controller action url, I have tried the below code in config.xmlwith the help of this and this. When I entered the url as http://www.website.com/orders instead of http://www.website.com/test_order/index/order , it shows 404 error.

<frontend>
    </routers>
        <test_order>
            <use>standard</use>
            <args>
                <module>Test_Order</module>
                <frontName>test_order</frontName>
            </args>
        </test_order>
    </routers>
</frontend>
<global>
    <rewrite>
        <test_order_index_order>
            <from><![CDATA[#^/[orders]/([-\A-Za-z0-9.]+)?/?([-\A-Za-z0-9.]+)?/?([-\A-Za-z0-9.]+)?$#]]></from>
            <to><![CDATA[/test_order/index/order/]]></to>
            <complete>1</complete>
        </test_order_index_order>
    </rewrite>
<global>


texts:
I found this code below at AddressesPost.php for addresses.phtml. How can addresses.phtml send parameter continue or new_address so AddressesPost.php can getParam('continue') or getParam('new_address')?

AddressesPost.php :

if ($this->getRequest()->getParam('continue', false)) {
   $this->_getCheckout()->setCollectRatesFlag(true);
   $this->_getState()->setActiveStep(State::STEP_SHIPPING);
   $this->_getState()->setCompleteStep(State::STEP_SELECT_ADDRESSES);
   $this->_redirect('*/*/shipping');
} elseif ($this->getRequest()->getParam('new_address')) {
   $this->_redirect('*/checkout_address/newShipping');
} else {
   $this->_redirect('*/*/addresses');
}

I already add <input type="hidden" name="split" value="0" id="split_flag"/> and <input type="hidden" name="update" value="0" id="update_flag"/> in addresses.phtml and the getParam in controller like in code below.

Controller :

elseif ($this->getRequest()->getParam('new_address')) {
    $this->_redirect('*/checkout_address/newShipping');
} elseif ($this->getRequest()->getParam('split')) {
    $btn = $this->getRequest()->getPost('btn');
       if($post = $this->getRequest()->getPost('split')){
            $this->_getCheckout()->setSplitItemInformation($post, $btn);
       } else{
            $this->_redirect('*/*/addresses');
       }
} elseif ($this->getRequest()->getParam('update')) {
    $this->messageManager->addError('test');
    $this->_redirect('*/*/addresses');
} else {
    $this->_redirect('*/*/addresses');
}

It's work for getParam('split'), but it's not work for getParam('update').


texts:
My problem is that all of the categories url are not working. There are in some kind of infinite loop so I tried  to reindex from admin panel. The result are the same: infinite loop. After that I tried from console. I used this command:php indexer.php --reindex catalog url

and the result is this:Product Attributes index process unknown error:exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded                              ; try restarting transaction' in /home/shopdev2/public_html/lib/Zend/Db/Statement/Pdo.php:228
    Stack trace:
    #0 /home/shopdev2/public_html/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
    #1 /home/shopdev2/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_exec                              ute(Array)
    #2 /home/shopdev2/public_html/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql-                              >_execute(Array)
    ..................

Do you have other idea how do i reindex my urls ? thx
[UPDATE] after executing the command php -indexer.php -reindexall
this is the result:

Product Attributes index process unknown error:
exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction' in /home/shopdev2/public_html/lib/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /home/shopdev2/public_html/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /home/shopdev2/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#2 /home/shopdev2/public_html/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 /home/shopdev2/public_html/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#4 /home/shopdev2/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('DELETE FROM `ca...', Array)
#5 /home/shopdev2/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('DELETE FROM `ca...', Array)


texts: Magento 2 Knockout JS (access UiClass from foreach)

texts:
I have a question about my knockout ViewModel. I can't access "this" in my jumpToPage (defined in ViewModel) from my click in the template. The subscribeToQuery displays "this" as a UiClass so that i can access other methods from there. I would like to do the same from my jumpToPage method.

Below is my viewmodel:

define(['jquery','ko', 'uiComponent'], function ($, ko, Component) {
        "use strict";
        self.addresses = ko.observableArray([]);
        self.pages = ko.observable(0);
        self.q = ko.observable("");
        return Component.extend({
            initialize : function() {
                this._super();
                this.getAddresses();
                this.subscribeToQuery();
            },
            getAddresses : function(search, page, limit) {
                self.addresses([]);
                $.ajax({
                    url: '/customer/addresses',
                    type: 'GET',
                    data: {
                        p: (page === undefined) ? 1 : page,
                        limit: (limit === undefined) ? 10 : limit,
                        search: search
                    },
                    complete: function (output) {
                        var json = JSON.parse(output.responseText);
                        $.each(json.data, function(index, address) {
                            self.addresses.push(address);
                        });
                        self.pages(json.meta.pages);
                    }
                });
            },
            subscribeToQuery : function() {
                console.log(this);
                var that = this;
                self.q.subscribe(function(value) {
                    clearTimeout(self.addressCall);
                    self.addressCall = setTimeout(function () {
                        that.getAddresses(value);
                    }, 300);
                });
            },
            jumpToPage : function(item, event) {
                console.log(this);
            }
        });
    }
);

And this is my template:

<input type="text" name="search" placeholder="Zoek een adres" data-bind="value: q, valueUpdate: 'keyup'">

    <button data-bind="text: $index()+1, click: $parent.jumpToPage" style="cursor: pointer"></button>

Can anyone please help? Thanks in advance!


texts:
I want to use the Magento Database Repair tool, but it does not work.
I get the following PHP error:

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /magento-db-repair-tool-1.2.php:83 Stack trace: #0 /magento-db-repair-tool-1.2.php(1727): Tools_Db_Repair_Mysql4->setConnection(Array, 'corrupted') #1 /magento-db-repair-tool-1.2.php(1810): Tools_Db_Repair_Action->run() #2 {main} thrown in /magento-db-repair-tool-1.2.php on line 83

I used localhost as host. Because it is running on the same server.
I guess it is a php7 error, how can I solve this?


texts: Is it possible to save a product without without firing events?

texts:
There is an event that fires after a product import (And we run this update on the product import). Is it possible to make this save without extra events firing?

/*UPDATE UNIT COST*/
                    if ($unit_cost > 0) {
                        try {
                            $product->setData('cost', $unit_cost);
                            $product->save();
                            Mage::log("SKU {$sku} cost was updated to {$unit_cost}", null, 'custom.log');
                        }
                        catch (Exception $e) {
                            Mage::logException($e);
                        }
                    }


texts: how to add custom captcha in custom module in frontend magento 1.9?

texts:
Actually I am trying to add captcha in custom module in frontend
  magento 1.9

  Below code is not useful.

<layout version="0.1.0">
<contacts_index_index>
    <reference name="contactForm">
        <action method="setTemplate"><template>mymodule/contacts/form.phtml</template></action>
        <block type="core/text_list" name="form.additional.info">
            <block type="captcha/captcha" name="captcha">
                <reference name="head">
                    <action method="addJs"><file>mage/captcha.js</file></action>
                </reference>
                <action method="setFormId"><formId>contacts</formId></action>
                <action method="setImgWidth"><width>230</width></action>
                <action method="setImgHeight"><width>50</width></action>
            </block>
        </block>
    </reference>
</contacts_index_index>


texts: Add a product to cart without going through the event checkout_cart_product_add_after

texts:
Currently we have the problem, that users can buy/put products in the cart that they should not, because we have a function which is listening to the event checkout_cart_product_add_after. This Event is for example triggerd, if you try to add a product to the cart from the product detail page, or via URL (https://www.foobar.de/checkout/cart/add/product/1337/form_key/adsfXXddeee/).

Do you have a idea how the users can do this? Is this a known Magento bug?

PHP 5.6.x
M1.9.2.4


texts: How to merge two/more customers account in magento

texts:
Is it possible to merge two or more (copying customers orders and other stuff ) customer accounts?

is it possible in magento?


texts: How to trace a JS function appeared out of nowhere in one of the Magento 2 category page?

texts:
one of the category page of our Magento site throws an JS error Uncaught ReferenceError: j$ is not defined. Upon investigating, this was found present with

<script>
     j$('h1').hide();
</script>

How and where do I remove j$ from this function. I need to know where this code resides.


texts: Event observer redirecting... notice message not showing in some cases

texts:
I have a module which redirects the customer to a specific page trade/index/login if they are on a certain store and not logged in, in certain cases.

config.xml:

    ...
    <events>
        <controller_action_predispatch>
            <observers>
                <controller_action_before>
                    <class>mymodule_tradecustomers/observer</class>
                    <method>redirectNotLoggedIn</method>
                </controller_action_before>
            </observers>
        </controller_action_predispatch>
    </events>
    ...

Observer.php:

public function redirectNotLoggedIn(Varien_Event_Observer $observer)
{

    $storeId = Mage::app()->getStore()->getStoreId();

    if ($storeId == 2 || Mage::helper('customer')->isLoggedIn()) {
         return $this;
    }

    $route = strtolower(Mage::app()->getRequest()->getRouteName());
    $controller = strtolower(Mage::app()->getRequest()->getControllerName());
    $requestedUrl = Mage::helper('core/url')->getCurrentUrl();

    /* Check 1 */
    if($route == 'catalog'){
        Mage::getSingleton('customer/session')->addNotice('You need a trade account to access the requested area of the website. Please apply or log in below.');
        $requestedUrl = Mage::helper('core')->urlEncode($requestedUrl);
        $redirectUrl = Mage::getUrl('trade/index/login',array('referer' => $requestedUrl));
        Mage::app()->getFrontController()->getResponse()->setRedirect($redirectUrl);
        return;
    }

    /* Check 2 */
    if(strpos($requestedUrl,'download-the-catalogue') !== false){
        Mage::getSingleton('customer/session')->addNotice('You need a trade account to access the requested area of the website. Please apply or log in below.');
        $requestedUrl = Mage::helper('core')->urlEncode($requestedUrl);
        $redirectUrl = Mage::getUrl('trade/index/login',array('referer' => $requestedUrl));
        Mage::app()->getFrontController()->getResponse()->setRedirect($redirectUrl);
        return;
    }

    /* Check 3 */
    if($route == 'cms'){
        Mage::getSingleton('customer/session')->addNotice('You need a trade account to access the requested area of the website. Please apply or log in below.');
        $requestedUrl = Mage::helper('core')->urlEncode($requestedUrl);
        $redirectUrl = Mage::getUrl('trade/index/login',array('referer' => $requestedUrl));
        Mage::app()->getFrontController()->getResponse()->setRedirect($redirectUrl);
        return;
    }

    return $this;
}

Check 1, Check 2 and Check 3 redirect to trade/index/login with the referer, is expected.

My issue is with the notice message.

If I go to the catalog pages (Check 1), the message 'You need a trade account to access the requested area of the website. Please apply or log in below.' is showing on trade/index/login.

However, if I go to the CMS page download-the-catalogue (Check 2), or if the route is cms (Check 3), I am redirected to trade/index/login but the notice message doesn't show. I have no idea why.

I have tried commenting out Check 1 but I still have the same problem with Check 2 and Check 3.

Any help appreciated. Thanks.


texts:
I have a problem with emails not sending

I had a problem with cron yesterday 'No heartbeat task detected' and solved it by amending the cron.php file as directed by the xtento site by adding

$isShellDisabled = true;after $isShellDisabled = (stripos(PHP_OS, 'win') === false) ? $isShellDisabled : true;

This solved my probelm with the cron heartbeat error, but my site still isn't sending emails

can you help me solve this?


texts: Remove H1 tag from product summary box Magento 2

texts: I am trying to remove the H1 tag from the product summery box, does any one know how I can remove it?


texts: How to setup development environment for magento 2 with docker?

texts:
I am trying to install Magento 2 on my macOS Mojave

I have installed Docker first.
Then,
I followed this https://github.com/clean-docker/Magento2 link but stuck at last here is the error that comes in terminal (last part):

...........
...........
358ea099d7a6: Pull complete
03ce86db77da: Pull complete
Digest:
sha256:289226e3474f6d306c93c14bd13291e6bd239182660efa593e6ed79e96fdf647
Status: Downloaded newer image for rafaelcgstz/magento2:latest
fatal: not a git repository (or any of the parent directories): .git
sed: docker-compose.yml: No such file or directory
bash: line 31: src/index.php: No such file or directory
chmod: src: No such file or directory
bash: start: No such file or directory

Any help will be highly appreciated!


texts:
I've just imported a big list of regions/states to the Magento table directory_country_region as UTF8

However, in the region/state box at checkout I now see encoding issues for many special characters. As this droplist is not the only place where this information is printed out I need to find a solution that work sitewide.
Is there like any global setting that can sort this?


texts: Magento 2 configuration hierarchy not working as expected

texts:
I have setup a fresh Magento 2.1.3 installation with four websites that all have only one Store view. I want to set the locale on website level and leave the Store view level as 'Use Website' but instead of the website level the default level is used:

The Default Config is English, the website level (for the first website, but it's the same for the other websites) is set to Dutch but the Store view level shows English instead of Dutch.

When opening the website frontend in a browser, it runs with English language settings. After changing the Store view level to Dutch, the website language settings are Dutch as expected. But I would rather like to make the settings on the highest possible level.

This behavior is the same with all the other settings as well like Base URL, currencies, etc.

Has this changed from Magento 1 to Magento 2 or is there another setting that influence this?


texts: Type Error occurred when creating object: Magento 2 EE 2.3.4

texts:
Environment:

Magneto EE 2.3.4
PHP 7.2.23-1
OS Ubuntu 16.04

Error:

  Type Error occurred when creating object:
  Custom\Module\Model\ResourceModel\Module\Grid\Collection\Interceptor

Situation:

I am trying to add and admin Grid in Magento 2 Custom Module... It's working fine on Developer Mode but I am getting this error in Production Mode

Here is My Code Of Custom\Module\Model\ResourceModel\Module\Grid\Collection.php

<?PHP
use Custom\Module\Model\ResourceModel\Module\Collection as CustomCollection;

/**
 * Class Grid COllection
 */

class Collection extends CustomCollection implements \Magento\Framework\Api\Search\SearchResultInterface
{
    private $_aggregations;

    private $storeManager;

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

    /**
     * @param \Magento\Framework\Search\AggregationInterface $aggregations
     * @return $this
     */
    public function setAggregations($aggregations)
    {
        $this->_aggregations = $aggregations;
    }

    /**
     * Retrieve all ids for collection
     * Backward compatibility with EAV collection
     *
     * @param int $limit
     * @param int $offset
     * @return array
     */
    public function getAllIds($limit = null, $offset = null)
    {
        return $this->getConnection()->fetchCol($this->_getAllIdsSelect($limit, $offset), $this->_bindParams);
    }

    /**
     * Get search criteria.
     *
     * @return \Magento\Framework\Api\SearchCriteriaInterface|null
     */
    public function getSearchCriteria()
    {
        return null;
    }

    /**
     * Set search criteria.
     *
     * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
     * @return $this
     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
     */
    public function setSearchCriteria(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria = null)
    {
        return $this;
    }

    /**
     * Get total count.
     *
     * @return int
     */
    public function getTotalCount()
    {
        return $this->getSize();
    }

    /**
     * Set total count.
     *
     * @param int $totalCount
     * @return $this
     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
     */
    public function setTotalCount($totalCount)
    {
        return $this;
    }

    /**
     * Set items list.
     *
     * @param \Magento\Framework\Api\ExtensibleDataInterface[] $items
     * @return $this
     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
     */
    public function setItems(array $items = null)
    {
        return $this;
    }
}

I have Tried by removing var/ and generated/ folder and run php bin/magento setup:di:compile


texts: How to remove year dropdown from ui-datepicker Magento 2

texts:
How can i remove ui-datepicker-year from calender in Magento 2.
I only want to make user select only date and month.
How to achieve that.

I have removed this line of code from jquery-ui.js

if ( !inst.yearshtml ) {
        inst.yearshtml = "";
        if (secondary || !changeYear) {
            html += "" + drawYear + "";
        } else {
            // determine range of years to display
            years = this._get(inst, "yearRange").split(":");
            thisYear = new Date().getFullYear();
            determineYear = function(value) {
                var year = (value.match(/c[+\-].*/) ? drawYear + parseInt(value.substring(1), 10) :
                    (value.match(/[+\-].*/) ? thisYear + parseInt(value, 10) :
                    parseInt(value, 10)));
                return (isNaN(year) ? thisYear : year);
            };
            year = determineYear(years[0]);
            endYear = Math.max(year, determineYear(years[1] || ""));
            year = (minDate ? Math.max(year, minDate.getFullYear()) : year);
            endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);
            inst.yearshtml += "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";
            for (; year <= endYear; year++) {
                inst.yearshtml += "<option value='" + year + "'" +
                    (year === drawYear ? " selected='selected'" : "") +
                    ">" + year + "</option>";
            }
            inst.yearshtml += "</select>";

            html += inst.yearshtml;
            inst.yearshtml = null;
        }
    }

So the year dropdown is removed but still when i select date and month, it shows year in the textbox.

How to remove date from text box.


texts: How to change the background in the table?

texts: How to change the background color in the table? Template RWD Magento.


texts: How to tell if a website is using our extension?

texts: We develop Magento extensions. Is there a way to tell what websites are using our extension?


texts:
We are currently developing our site(community edition 1.9.2.4) and ideally would like to hide the shopping cart on the home page and various other content related pages.

I can not find a way to complete this and any help would be appreciated?


texts: Time to first byte taking 800ms - put same array outside of magento is 90ms any ideas?

texts:
Alright, I normally don’t ask for help, but on this one I am a little baffled.

I am working on a website where we do a ajax post, that goes through my Magento module’s IndexControler and sends back a list of the available options. Pretty straight fowatd.

Everything works but for some reason the time to first byte is 800ms, which is too long (you start trying to click the select before the options are populated).

At first I thought it was my DB calls, so I completely removed all DB calls and set a static array.

{"models":[{"id":"5","name":"iPhone 5"},{"id":"6","name":"iPhone 5s"},{"id":"7","name":"iPhone 6"},{"id":"8","name":"iPhone 6+”}]}

Tested it, and the time to first byte was still 800ms. So after that I set up the file in its own local .php file on the same server and ran the test and it returned a 90ms, which is exactly what I expected…

So my question is this - where and what is causing Magento to have such a long time to first byte, and do you have any ideas?

I’ve already shift to sending my responses to json, and that did shave off 50ms it wasn’t enough to make it fell responsive enough to use in production.


texts: Magento 2 Payment methode per Storeviews?

texts: In Magento 2, as default, the Payment Methods are for Website Scope. We didn't unfortunatelly had this in mind when starting the project, so we have created 4 storeviews since the start. and now we need to have different Payment Methods on different Storeviews, it's too late (too much work) to change the entire site to Website Scope. Is there a work around for this? I tried to search if there are any modules that allow us to set the payment methods per storeviews, no luck yet.


texts: Magento 2: Parsing Item information through block

texts:
I want to create a phtml file and create a dynamic block with that one to put on CMS pages - Take it as product information blocks where i want to display the product name, the price, the URL - nothing more.

Is it possible to make that with something like the standard magento 2 block variable and link that to a phtml file?

I got something like this in mind:

  Magento 2 Block

{{widget type="Magento\Cms\Block\Widget\Block" template="widget/static_block/product-info.phtml" product-id="30"}}

And then get the information within the phtml file via the used product-id on the block variable but I also got no clue how to approach that.


texts: Magento 2 : Create file type customer attribute

texts:
I've created customer attribute with type 'file'. Below is my code.

$attributesInfo = [
        'upload_documents' => [
            'label' => 'Upload Document',
            'type' => 'varchar',
            'input' => 'file',
            'position' => 1000,
            'visible' => true,
            'required' => false,
            'system' => 0,
            'user_defined' => true,
            'position' => 1000,
            'is_used_in_grid' => true,
            'is_visible_in_grid' => true,
            'is_html_allowed_on_front' => true,
            'visible_on_front' => true
        ]
    ];

Attribute created and it works but can't allow me to upload PDF file. When I upload it it uploaded with out any error.

Like ,

After save it returns error like,

In error log returns nothing.

Is there anything missing ?? Please help.


texts: need to create shopping cart price rule for buy 2 get 5% off and buy 3 get 10% off

texts:
I wanted to give an offer to the users. If they buy the same product with qty 2 then 5% off and if they buy 3 then 10% off. I tried it with shopping cart price rules but only one shopping cart price rules works at the same time. Is there any way to achieve it. Please help.

Thanks!


texts: Which version added the core swatch for attributes support via URL hash?

texts:
The answer of this question https://magento.stackexchange.com/a/71077/61389 presented a core way to automatically select attributes values using the URL hash.

We are developing a module that will depend on this functionality, and we want to know which version of Magento 1 added it. So we can determine the minimum version of Magento that our module will support and probably provide a backward compatible solution for older versions.


texts: Products don't show in search results or categories after data reset

texts:
I recently needed to clear my test data, so I ran through the steps in this post: Clearing Magento after testing
Ever since then any products I add don't show up in categories (I've confirmed they're assigned to a category) or in search results (autocomplete looks like there should be results). The thing that makes it weird is that if I pull the slug for a product from the admin I can navigate directly to the product page. So the products are visible on the front end, they're just not showing up, almost like there's a broken association somewhere.
I've gone through re-index, I've cleared cache, I've tried manually adding a new product with various inventory settings. Nothing seems to get a product to show up in category nav or search results.
I'll provide anything I can, I'm just not sure what is relevant here.


texts: Why Magento 2 doesn't export all attribute data?

texts:
In Magento 2, When I try to export all product data then some attribute those are created by me doesn't get exported?

Is there any setting I need to do for an attribute to get exported? Please help me.


texts: Can't reset customer password in magento2

texts: customer cant reset its password in magento2.Something went wrong while resetting the password.This issue comes while resetting the password. Please help me out in this point.


texts: Magento 1.9.3: Add to cart 404 after moving to new server

texts:
After moving to a new server with plesk, I get a 404 not found when i press add to cart. I am not sure why. I truncated the core_url_rewrite table, deleted everything in var/cache and var/session before moving the site.

An example of the 404 url:

  /checkout/cart/add/uenc/aHR0cHM6Ly9lbGVrdHJvbmlrZGVsZS5kay8,/product/1193/form_key/0X2MdMHKzLuVombB/

Magento 1.9.3


texts:
I have a product csv file and when I import it in admin then is the result https://prnt.sc/pf3rhl Thank in advance.

update:
I did change all ” to " and this is the result: