texts: Magento 2 - How to override LESS code from _extends.less?

texts:
I try to remove the box-shadow of a button in the customer area.

I found the code in

vendor\magento\theme-frontend-luma\web\css\source\_extends.less:

//
//  Secondary button
//  ---------------------------------------------

& when (@media-common = true) {
    .abs-revert-to-action-secondary {
        &:extend(.abs-revert-secondary-color all);
        .lib-css(border-radius, @button__border-radius);

        &:not(:focus) {
            .lib-css(box-shadow, @button__shadow);
        }

        &:active {
            .lib-css(box-shadow, @button__shadow-active);
        }
    }
}

I added my override to a new file

THEME\web\css\source\lib\extend\_overrides.less

//
//  Secondary button
//  ---------------------------------------------

& when (@media-common = true) {
    .abs-revert-to-action-secondary {
        &:extend(.abs-revert-secondary-color all);
        .lib-css(border-radius, @button__border-radius);

        &:not(:focus) {
            .lib-css(box-shadow, false);
        }

        &:active {
            .lib-css(box-shadow, false);
        }
    }
}

I used false in lib-css() because in the Magento UI Library Documentation (lib/web/css/docs/utilities.html) it says:

  The .lib-css() mixin is used to set any css property if there is a
  value passed to it by a variable. Also .lib-css() can add -ms-,
  -webkit- and -moz- prefixes if needed.

  If the variable is set to false, the .lib-css() mixin will add nothing
  to the code.

Then I imported the file into

THEME\web\css\source\_extend.less

@import 'lib/extend/_overrides';

But the original code is still getting loaded from the following file and my override does not get applied:

/pub/static/frontend/hausfux/base/de_DE/css/source/_extends.less

Where do I have to add my override to make it work?


texts: Change product image base image programmatically Magento 2

texts: I want to change bulk product image base image programmatically Magento 2


texts:
Got this error, no clue how to upgrade:

- magento/product-community-edition 2.2.0 requires composer/composer 1.4.1 -> satisfiable by composer/composer[1.4.1] but these conflict with your requirements or minimum-stability.

my composer.json

{
    "name": "magento/project-community-edition",
    "description": "eCommerce Platform for Growth (Community Edition)",
    "type": "project",
    "version": "2.2.0",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "require": {
        "magento/product-community-edition": "2.2.0",
        "composer/composer": "1.1.2 as 1.0.0-beta1",
        "iwd/ordermanager": "2.6.0",
        "hellobrave/cookiecompliance": "1.0.4",
        "clarion/customer-attribute": "1.0.0",
        "extait/admin-notify": "1.0.3",
        "amasty/base": "1.0.6",
        "amasty/groupcat": "1.3.1",
        "aheadworks/module-rbslider": "1.1.5"
    },
    "require-dev": {
        "phpunit/phpunit": "4.1.0",
        "squizlabs/php_codesniffer": "1.5.3",
        "phpmd/phpmd": "@stable",
        "pdepend/pdepend": "2.2.2",
        "fabpot/php-cs-fixer": "~1.2",
        "lusitanian/oauth": "~0.3 <=0.7.0",
        "sebastian/phpcpd": "2.0.0"
    },
    "config": {
        "use-include-path": true
    },
    "autoload": {
        "psr-4": {
            "Magento\\Framework\\": "lib/internal/Magento/Framework/",
            "Magento\\Setup\\": "setup/src/Magento/Setup/",
            "Magento\\": "app/code/Magento/"
        },
        "psr-0": {
            "": "app/code/"
        },
        "files": [
            "app/etc/NonComposerComponentRegistration.php"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Magento\\Framework\\": "lib/internal/Magento/Framework/",
            "Magento\\Setup\\": "setup/src/Magento/Setup/",
            "Magento\\": "app/code/Magento/"
        },
        "psr-0": {
            "": "app/code/"
        },
        "files": [
            "app/etc/NonComposerComponentRegistration.php"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/",
            "Magento\\Tools\\": "dev/tools/Magento/Tools/",
            "Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/",
            "Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/",
            "Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/"
        }
    },
    "minimum-stability": "alpha",
    "prefer-stable": true,
    "repositories": {
        "0": {
            "type": "composer",
            "url": "https://repo.magento.com/"
        },
        "magento": {
            "type": "composer",
            "url": "https://repo.magento.com/packages.json"
        }
    },
    "extra": {
        "magento-force": "override"
    }
}


texts: do catalog price rules carry over when added to the cart?

texts:
I have a catalog price rule - which appears to look correct when viewing the products in the catalog.  however, when I add to the cart - the price goes back up to the full amount.

Is this price rule supposed to carry over?  whats the best practice for showing this store sale in the catalog and then carrying over the discount into the cart?  catalog + shopping cart rule?


texts: Change the name of the route in Magento 2

texts:
For example http://magento2.loc/checkout changed to http://magento2.loc/supercheckout

Thank you for answer.


texts:
guys.
I'm working with product attribute. I have a multi-select attribute, but I wanna add search option for it. I use Modifier, this is my code:
public function modifyData(array $data)
{
    return $data;
}

/**
 * @param array $meta
 * @return array
 * @since 100.1.0
 */
public function modifyMeta(array $meta)
{
    $tag = ProductAttribute::TAGS;

    $elementPath = $this->arrayManager->findPath($tag, $meta, null, 'children');
    $containerPath = $this->arrayManager->findPath(static::CONTAINER_PREFIX . $tag, $meta, null, 'children');

    if (!$elementPath) {
        return $meta;
    }

    $meta = $this->arrayManager->merge(
        $containerPath,
        $meta,
        [
            'arguments' => [
                'data' => [
                    'config' => [
                        'breakLine'     => false,
                        'formElement'   => 'container',
                        'componentType' => 'container',
                        'component' => 'Magento_Ui/js/form/components/group',
                        'scopeLabel'    => __('[GLOBAL]')
                    ],
                ],
            ],
            'children'  => [
                $tag => [
                    'arguments' => [
                        'data' => [
                            'config' => [
                                'component' => 'Magento_Ui/js/form/element/ui-select',
                                'dataType' => 'select',
                                'componentType' => Field::NAME,
                                'formElement'   => 'select',
                                'elementTmpl'   => 'ui/grid/filters/elements/ui-select',
                                'filterOptions' => true,
                                'searchOptions' => true,
                                'chipsEnabled' => true,
                                'showCheckbox' => true,
                                'multiple'      => true,
                                'disableLabel' => true,
                                'config'           => [
                                    'dataScope' => $tag,
                                    'sortOrder' => 170,
                                ],
                            ],
                        ],
                    ],
                ]
            ]
        ]
    );

    return $meta;
}

Yeah,follow this, I have attribute with ui-select with search option, but:
first, it's not showing selected option, I must click to input to see them:
second, I search but nothing to find, only show 0 option.
third, I have to remove one selected option to add other options.
someone helps me this case. Thank you and sorry for my english :D
I use magento 2.4.1


texts: What is the use of the customer_account.xml layout file?

texts: Because the customer_account.xml layout file doesn't match any front actions, then how this handle called and what are the places this is used, is it possible to have custom handles and add into the layout?


texts: 1.9 - Not all products showing on frontend

texts:
I have done everything I've found here and elsewhere:

All products are enabled
All products are In Stock with 1+ quantity
All products are set to Catalog, Search
I have reindexed multiple times, as well as tried reindexing via shell
I have cleared cache multiple times
All products are in active categories

For example, in the admin panel, a specific category shows 662 products, but on the frontend it only shows 337.  It's becoming annoying because some filterable attributes only show a few items when used, despite there being many more.

The items are there when searched for using advanced search. They are not there when using attributes to filter for them.


texts: How to get All customer Data using Object Manager : Magento2

texts:
How to get all customer data using object manager.

Actually, I have created root file and load customer data with specific id but I want to load all customer data not a specific customer id.

What i have tried

    <?php
use Magento\Framework\App\Bootstrap;
require __DIR__ . '/app/bootstrap.php';

$bootstrap = Bootstrap::create(BP, $_SERVER);
$obj = $bootstrap->getObjectManager();
$storeManager = $obj->get('\Magento\Store\Model\StoreManagerInterface');

$objectManager =  \Magento\Framework\App\ObjectManager::getInstance();

$appState = $objectManager->get('\Magento\Framework\App\State');
$appState->setAreaCode('frontend');

$customerID = 10;
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$customerObj = $objectManager->create('Magento\Customer\Model\Customer')
->load($customerID);
$customerEmail = $customerObj->getEmail();
print_r($customerEmail);
?>

It is working but i only can get data from specific customer id.so how to get customer data of all customer id.


texts: Payment method markup in transactional email

texts:
I need custom markup for payment method details in new order email.

There seems to be only a single variable available for payment method markup {{var payment_html}}

Wondering what's the best way to do it?

Is there a way to add custom variables in transactional email so that I can create custom ones like {{var payment_cc_type}} & {{var payment_cc_last4}}?


texts: How to move product description after product options in Magento2

texts:
I want to display product description between size option and qty box.

I have tried below options :

<move element="product.info.description" destination="product.info.main" after="product.info.price"/>
<move element="product.info.description" destination="product.info.main" after="product.info.form.options"/>
<move element="product.info.description" destination="product.info.main" after="product.info.options"/>
<move element="product.info.description" destination="product.info.main" after="product_options_wrapper_bottom"/>
<move element="product.info.description" destination="product.info.main" before="product_options_wrapper_bottom"/>

But no options worked.
How this can be achieved?


texts: Magento2 : How to force Shipping Address is the same as Billing Address?

texts:
Is there a way to prevent the addition of a different address at checkout, so that billing and shipping addresses are always the same?

With this I'd like to also prevent the user adding a shipping address in their account, and if they already have more than one to hide any but the first. And that updating the billing address also updates the shipping address.

Since I don't believe this is a on/off functionality in the Magento 2 backend I assume this would require and entire module?


texts: CSS and JS not rendering from pub/static folder after installation of Magento 2.2.8

texts:
I have just installed Magento 2.2.8 and it throws an error on home page

then I ran following commands

php -dmemory_limit=6G bin/magento setup:static-content:deploy -f
php bin/magento cache:clean

But its nothing changed how to solved this error? why Magento 2.2.8 does not taking pub/static path for images,css and js files?


texts:
I would like to send a mail after a user fill out the form.

The form is OK but now I want to use values in $post to send a mail to a mail address (the mail address of the company)

I'm beginner and I found a lot of tutorials but it's not what I search.

Can someone help me to start ?

Thanks.

<?php

namespace Kg\KgContent\Controller\Index;

use Magento\Framework\Controller\ResultFactory;

class Catalog extends \Magento\Framework\App\Action\Action
{
    /**
     * Catalog action
     *
     * @return void
     */
    public function execute()
    {
        // 1. POST request : Get catalog data
        $post = (array) $this->getRequest()->getPost();

        if (!empty($post)) {
            // Retrieve your form data
            $firstname   = $post['firstname'];
            $lastname    = $post['lastname'];
            $phone       = $post['phone'];

            // Doing-something with...

            // Display the success form validation message
            $this->messageManager->addSuccessMessage('Votre demande de catalogue a bien été prise en compte');

            // Redirect to your form page (or anywhere you want...)
            $resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
            $resultRedirect->setUrl('/kgkgcontent/index/catalog');

            return $resultRedirect;
        }
        // 2. GET request : Render the catalog page
        $this->_view->loadLayout();
        $this->_view->renderLayout();
    }
}


texts: Magento Add to Cart just redirecting to home page no adding

texts:
Regular products work just fine in store but configurable products don't.\

When you click on "Add To Cart" on a configurable product it just tries loading for about 5 seconds and then redirects you to home page without adding to cart.


texts: How to add products grid in Edit/new form

texts:
I am working on an extension where i want to load products grid serializer inside form.
I followed magento_catalog and adding below code in my ui_component form.

<fieldset name="assign_products">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="label" xsi:type="string" translate="true">Products in Category</item>
            <item name="collapsible" xsi:type="boolean">true</item>
            <item name="sortOrder" xsi:type="number">40</item>
        </item>
    </argument>
    <container name="assign_products_container" >
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="sortOrder" xsi:type="number">160</item>
            </item>
        </argument>
        <htmlContent name="html_content">
            <argument name="block" xsi:type="object">Magento\Catalog\Block\Adminhtml\Category\AssignProducts</argument>
        </htmlContent>
    </container>
</fieldset>

but getting this error

  Fatal error: Uncaught Error: Call to a member function
  getProductsReadonly() on null in
  C:\xampp\htdocs\m22\vendor\magento\module-catalog\Block\Adminhtml\Category\Tab\Product.php:137


texts: client denied by server configuration: /app/etc/config.php

texts:
I am currently facing a weird issue.The admin session is being destroyed and admin is being logged out when the admin tries to click on any tab on the store configuration.

What i figured out?

I have used a theme for my store and an extension for multi-vendor.I figured out that there is module incompatibility between theme module and another module. Individually both of those modules function properly but when both are enabled there is issue of admin logout when admin tries to change the system configuration.

/********* Update ***************/

I checked the Apache log and it says:

  [Wed Oct 05 10:57:59.355737 2016] [access_compat:error] [pid 7300:tid
  1740] [client 192.168.0.90:57108] AH01797: client denied by server
  configuration: E:/xampp/htdocs/projectname/app/etc/config.php

I guess It suggests that the config.php is tried to opened directly or likewise, not sure.

/**********Update ends **********/

What help I expect?

I think it is very difficult to figure out the issue without seeing the codes but if anyone could answer the types of conflicts that could arise on modules on Magento 2 which could give issue of such behavior.

What i did?

I commented the content on system.xml file of a theme module and tested as there is issue only when the admin click the system configuration tab but it didn't worked.

So could anyone help me out here to figure out the issue or suggest the way of debugging to figure out the issue.

Any help or suggestion is appreciated.


texts: Magento 2: how to set role to user programmatically

texts:
and also an role

$roleAuthModel = $objectManager->create('\Magento\Authorization\Model\Role');
            $roleAuthModel->setName("cool role")
                ->setPid(0) //set parent role id of your role
                ->setRoleType("G")
                ->setUserType(UserContextInterface::USER_TYPE_ADMIN);
            $roleAuthModel->save();

        $userModel->setUserName("bbbb");
        $userModel->setFirstName("cccc");
        $userModel->setLastName("dddd");
        $userModel->setEmail("aaaa@bbbb.com");
        $userModel->setPassword('Adfasdas322323das');
        $userModel->save();

How can I relate and set "cool role" to my new user "bbbb" ?


texts: Magento 1.9 i have added custom email template. need to preview customer before sending

texts:
I have added custom emails template it is working fine preview and in admin side transnational email section after loading code.But i need to implement preview section in front-end so when i load email template code

$emailTemplate = Mage::getModel('core/email_template')->loadByCode($templateId);

It's printing array as output.

Customer able to see preview before sending email.


texts:
Magento 2 and using porto theme

Sub Category product can't be view in the product page

i'm attached the all screenshot admin and front end

in admin to add the product in select the category  not viewed in the page

admin side

admin in stock

Search results show the product but Sub Category product can't be view in the product page

Category page in admin side


texts: Remove coupon code from new order email and insert label of coupon instead

texts:
Does anyone know how to edit the following to have the name of the coupon as the label on the new order sales email instead of the coupon code?

<?php foreach ($this->getTotals() as $_code => $_total): ?>
    <?php if ($_total->getBlockName()): ?>
        <?php echo $this->getChildHtml($_total->getBlockName(), false); ?>
    <?php else:?>
    <tr class="<?php echo $_code?>">
            <?php
            if ($_code=="discount") {
              $code_used = trim(str_replace(array("Discount (",")"),array(""),$this->escapeHtml($_total->getLabel())));
              $coupon = Mage::getModel('salesrule/coupon');
              $coupon->load($code_used, 'code');
              $rule = Mage::getModel('salesrule/rule')->load($coupon->getRuleId());
              $rule_name = $rule->getName();
            }

            ?>
         <td <?php echo $this->getLabelProperties()?>>
            <?php if ($_total->getStrong()):?>
            <?php echo $this->escapeHtml($_total->getLabel());?>
            <?php else:?>
            <?php echo $this->escapeHtml($_total->getLabel());?>
            <?php endif?>

        <td <?php echo $this->getValueProperties()?>>
            <?php if ($_total->getStrong()):?>
            <?php echo $this->formatValue($_total) ?>
            <?php else:?>
            <?php echo $this->formatValue($_total) ?>
            <?php endif?>

    <?php endif?>
<?php endforeach?>


texts: I´m new to Magento but how can I set my canonical tags for my products, so that Product A can be in 4 categories but still link to one at the end. And I don´t have duplicate content.


texts: Checkout Process By Credit Card On localhost without any API or extension

texts:
Is it possible to perform payment by credit card on my localhost without any extension or API ?

If possible how can I set this up? If it is not possible without an extension what are my options?


texts: How can we get page title back in magento 2

texts:
I had tried to remove title from cms pages so used referenceBlock name="page.main.titlte" remove="true" on cms_index_index.xml but it removed title from product and category pages too.

How can i get the title back? Tried removing the above code but no luck.


texts: How to create a pagination on product page for the reviews

texts:
I am trying to create pagination on product page just to keep the review down. I have over 50 reviews for product is there anyway I could limit it to 10.
Is there anyway I could follow some codes or tutorials


texts: How to Sort a Large Number of an Attribute's "Manage Options (values of your attribute)"

texts:
I have a dropdown attribute with many options that need to be sorted.

I am wondering how best to sort them automatically?

If it can't be done automatically, is there a way to export the data from the database and sort them elsewhere?


texts: How to change "add to cart" text on category view?

texts:
Where can I change the text below?

Where is the file and where do i need to copy it in my custom theme? Thanks alot! :)


texts:
I added a module that moves billing address to the shipping step. But now I miss some spaces on the billing address in the sidebar of the billing step.

I'm missing the spaces between firstname and lastname and zipcode and city.
Does anyone know where those spaces should be set normally in the M2 code? I can't find it.

I did find that module-checkout > view > frontend > web > template < shipping-information.html calls for getRegion('ship-to')

I'm working with this module:
Modified checkout


texts: Magento : Setting Shipping Origin Dynamically

texts:
My website have multiple origin shipping address and I want it to pick origin address according to my customer address. I have way to pick origin shipping address according to customer address but my origin address is not working. I have found code for setting config of store but its not working for me as my store is picking up address and postal code provided in admin of magento...

$store = Mage::app()->getStore();
$configScope = array(
'street_line1' => $street1,
'street_line2' => $street2,
'city'         => $city,
'region_id'    => $region_id,
'postcode'     => $postcode,
'country_id'   => $country_id
);

foreach($configScope as $_scope=>$_val){
$store->setConfig('shipping/origin/' . $_scope, $_val);
}


texts:
I want to apply coupon code in magento landing page , i just saw the code, but according to code, the code apply on cart's amount and after deducting coupon code, it apply the price on cart, but i want to apply code on a specific static price, can it be possible? if yes, then please help me to solve it out.
Thanks


texts: How to update order item product options after order placed?

texts:
I am trying to change my order item custom options after order placed but it overwrite exitsting data and set only value that i did set previously.
https://www.screencast.com/t/Y99dQ1D4
My code.

foreach ($orderIds as $key => $value) {
       $orderModel = Mage::getModel('sales/order')->load($value);
       $orderItem = $orderModel->getAllItems();
       foreach ($orderItem as $item) {
        if($item->getId()==17447){
           $option = $item->getProductOptions();
          $info = $intoByRequest['info_buyRequest']['additional_options']['item_shippinggroup'];
          $info = 'group1';
          $item->setProductOptions(serialize($info))
       }
    }

can anyone please guide me how i would change one array element and save the item.


texts:
This seems like it should be easier than I'm finding it. How can I change the label of SKU on a product page (and well, everywhere I guess) to "Article Number"?

I changed the label in attributes, I've changes the translate csv, but still it always shows SKU... weird! I'm using Ultimo if it helps.

Thanks.

updates

in the view.phtml file I have this:

<?php if ($theme->getCfg('product_page/sku')): ?>

<?php echo $this->__('SKU'); ?>: <?php echo $_product->getSku(); ?>

            <?php endif; ?>

If I hard code SKU to Article Number, I of course break the translation which enables the German version (which works!).

In the back-end, I have the following labels set:

Admin  - English  - German
Article Number  - Article Number  - Artikelnummer

If I goto \app\design\adminhtml\default\default\locale\en_US and the translate.csv

I have these entries:

SKU - SKU

So I changed them to SKU - Article Number, but still doesn't change in the frontend.


texts: How can I change grand total when user Clicks on Custom Payment method?

texts:
I am using the one-page checkout module. I want to change the grand total when user/customer selects the payment method.
If customer/user selects the online payment option then grand total should change.

app/code/local/Bliss/Onlinepayment/etc/config.xml

<global>
    <events>
        <payment_method_is_active>
            <observers>
                <observer>
                    <type>singleton</type>
                    <class>Bliss_Onlinepayment_Model_Observer</class>
                    <method>paymentmethod</method>
                </observer>
            </observers>
        </payment_method_is_active>
    </events>
</global>

app/code/local/Bliss/Onlinepayment/Model/Observer.php

<?php

class Bliss_Onlinepayment_Model_Observer {

public function paymentmethod(Varien_Event_Observer $observer)
    {
        //$method = $observer->getEvent()->getMethodInstance();
        $quote = $observer->getEvent()->getQuote();
        if($quote->getCode()=='checkmo')
        {

   $quote->setGrandTotal(1);
   $quote->setBaseGrandTotal(1);
   $quote->save();

        }

    }
}


texts:
Which of the following is called to apply taxes on the product view page?

Mage_Tax_Helper_Data
Mage_Tax_Model_Sales_Total_Quote_Tax
Mage_Sales_Model_Quote_Address_Total_Tax
Mage_Catalog_Model_Product_Type_Price


texts: Paypal payment failure - #10004 Invalid Transaction ID

texts:
I'm getting an error using PayPal payments Pro - but only at a certain quantity of a product. When ordering 55 items of a product the customer sees this error popup:

PayPal gateway has rejected request. The transaction id is not valid (#10004: Transaction refused because of an invalid argument. See additional error messages for details).

I've checked the PayPal log and have found the response to be:

        [TIMESTAMP] => 2016-06-23T10:59:20Z
        [CORRELATIONID] => 241c536268ca3
        [ACK] => Failure
        [VERSION] => 72.0
        [BUILD] => 22386173
        [L_ERRORCODE0] => 10004
        [L_SHORTMESSAGE0] => Transaction refused because of an invalid argument. See additional error messages for details.
        [L_LONGMESSAGE0] => The transaction id is not valid
        [L_SEVERITYCODE0] => Error
        [AMT] => 107.25
        [CURRENCYCODE] => GBP

The strangest thing is that if the customer clicks "Place Order" a second time it will go through, or if the customer orders a different quantity (30 instead of 55 for example) the order still goes through.

Has anyone seen anything like this before? I don't know how it could just happen based on the quantity, and as far as I know PayPal responds with the transaction ID and it isn't something provided by Magento.

Any help would be great!


texts: Relationship Between Module Layout Handle XML files and Theme Update XML Files

texts:
What's the relationship between a module's layout handle XML file and a theme's layout handle XML file?  Which files have priority?  When does one file replace another file?  When does one file merge with another file?  I haven't been able to find concrete information on this in the documentation, and I'm hoping for a clear answer before I spend too much time hunting this information down myself.

That is, in Magento 2 it's possible for a module to add a layout handle XML file

vendor//magento/module-theme/view/frontend/layout/default.xml

It's also possible for a theme to specify this exact same layout handle XML file

vendor//magento/theme-frontend-blank/Magento_Theme/layout/default.xml

and for a theme that inherits from another theme to specify the exact same file.

vendor//magento/theme-frontend-luma/Magento_Theme/layout/default.xml

What's not clear is the relationship between all these files.  In Magento 1, creating a new layout update XML file in a theme would replace that original layout update XML file. Early versions of Magento 2 featured layout merging, where new layout files would be merged with the originals. It's not clear if merging made it into Magento 2.  If it did, it's not clear what those merging rules are.  It's also not clear if a theme replacing a module file behaves differently than a child theme file replacing a parent theme file.

Short of tracing the very abstract and complicated merging code myself, does anyone know the rules for this new layout merging?


texts:
Homepage not show page content in magento?
I check with inspect element withe firebug there one
This div style display: none; If I remove this style in inspect element then show page content.
Please tell me how to remove display none of this div and then show the content.

thanks


texts:
I need to show custom magento 2 success page for customers, who choose specific carrier and payment method. My questions is: Can I do override on magento success page that will be applied only when customer chooses carrier x and payment y?

Thanks in advance.


texts:
A quite simple question maybe, but should I enable Magento’s Compilation on my 1.9.2.4 install?

Will it improve the speed of my Magento store with 90.000+ products?


texts: How to add scope option in adminside magento 2

texts:
How to add website scope option in my custom module to the admin side
programmatically if any idea or suggestion link please let me know to
do this functionality.like this see the below snap.


texts: Responsive of Magento 2.2? was it accurate?

texts: Will Create a typical ecommerce system. Just want to know how magento 2.2 responsive work? Cause last time I do responsive is 1.8 and media query give me a bit problem.


texts: Magento2.4: Getting error while importing the product custom option

texts:
We have created the product custom options by uploading the csv file but its showing the error and the uploaded custom option is not showing in the frontend.
Getting the below error:
Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`xyz`.`catalog_product_option`, CONSTRAINT `CATALOG_PRODUCT_OPTION_PRODUCT_ID_CATALOG_PRODUCT_ENTITY_ROW_ID` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`row_), query was: INSERT INTO `catalog_product_option` (`product_id`, `type`, `is_require`, `sort_order`) VALUES (?, ?, ?, ?) [] []

We're not sure why this error is appearing as we don't have any errors in other instances of our server. It would be great if anyone guide me to resolve this error.
Any help will be appreciated


texts: auto save in stock if qty greater than 0

texts:
I am working on a store with thousands of products. I have noticed that when product Quantity is zero (or manually turned to Zero) the Stock Availability goes 'Out of Stock' however when we update the product Quantity to number greater then zero like 10,15 or 200 the 'Stock Availability' stays 'Out of Stock' unless and until manually changed to 'In Stock' so that the product appears on fronted.

I want the 'Stock Availability' to Auto turned to 'In Stock' as we update the Quantity to number greater then Zero. The Quantity in my case gets its values from the store inventory software we don't change it manually.

Event used cataloginventory_stock_item_save_commit_after

Any help and tips will be appreciated.

public function autoinstockproduct($observer) {

   $product = $observer->getProduct();
    $stockData = $product->getStockData();

    if ( $product && $stockData['qty'] > 0) {
        $stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product->getEntityId()); // Load the stock for this product
        $stock->setData('is_in_stock', 1); // Set the Product to InStock
        $stock->save(); // Save
    }
}

But this code is not working

Reference question


texts: How to remove the stock status in magento2

texts:
I need to remove the stock status for particular product type in admin product form.

Thanks.


texts: addColumn() or addAttribute() ? What is the best for performance, migration & usability?

texts:
What is the best method of adding new attributes to the sales and/or quote tables in magento via an install script:

use: addColumn() or use addAttribute() ?

So the main questions are :

  What is the best if in the future I need to migrate to a new version (I m on CE 1.7) ?
  What is the best for performance ?

I need to display this custom data in the admin back end order grid, so what is the best choice for that too (performance & usability) ?

Thank you in advance !


texts: Q: How to add Street to Estimate & Tax on Cart Page

texts:
I want to be able to add the Street field to the Shipping Estimation section. I already cloned the LayoutProcessor file into my own plugin, but now i want to show the street field. With the following code below I also get a:
Exception #0 (Exception): Notice: Undefined index: sortOrder in /vendor/magento/module-checkout/Block/Checkout/AttributeMerger.php on line 198
<pre>#1 Magento\Checkout\Block\Checkout\AttributeMerger->getFieldConfig('street', array('visible' => true, 'formElement' => 'input', 'label' => &Magento\Framework\Phrase#000000002c51740200000000753e7bc6#, 'value' => NULL), array(), 'checkoutProvider', 'shippingAddress') called at [vendor/magento/module-checkout/Block/Checkout/AttributeMerger.php:135]

Here is my full LayoutProcessor.php code:
<?php

namespace Act\ShipTime\Block\Preference\Cart;

class LayoutProcessor extends \Magento\Checkout\Block\Cart\LayoutProcessor {

    public function __construct(
        \Magento\Checkout\Block\Checkout\AttributeMerger $merger,
        \Magento\Directory\Model\ResourceModel\Country\Collection $countryCollection,
        \Magento\Directory\Model\ResourceModel\Region\Collection $regionCollection
    ) {
        $this->merger = $merger;
        $this->countryCollection = $countryCollection;
        $this->regionCollection = $regionCollection;
         parent::__construct($merger, $countryCollection, $regionCollection);
    }

    /**
     * Process js Layout of block
     *
     * @param array $jsLayout
     * @return array
     * @SuppressWarnings(PHPMD.NPathComplexity)
     */
    public function process($jsLayout)
    {
       $elements = [
        'city' => [
            'visible' => true,
            'formElement' => 'input',
            'label' => __('City'),
            'value' =>  null
        ],
        'country_id' => [
            'visible' => true,
            'formElement' => 'select',
            'label' => __('Country'),
            'options' => [],
            'value' => null
        ],
        'region_id' => [
            'visible' => true,
            'formElement' => 'select',
            'label' => __('State/Province'),
            'options' => [],
            'value' => null
        ],
        'postcode' => [
            'visible' => true,
            'formElement' => 'input',
            'label' => __('Zip/Postal Code'),
            'value' => null
        ],
        'street' => [
          'visible' => true,
          'formElement' => 'input',
          'label' => __('Street'),
          'value' =>  null
      ]
    ];

      if (!isset($jsLayout['components']['checkoutProvider']['dictionaries'])) {
            $jsLayout['components']['checkoutProvider']['dictionaries'] = [
                'country_id' => $this->countryCollection->loadByStore()->toOptionArray(),
                'region_id' => $this->regionCollection->addAllowedCountriesFilter()->toOptionArray(),
            ];
        }

        if (isset($jsLayout['components']['block-summary']['children']['block-shipping']['children']
            ['address-fieldsets']['children'])
        ) {
            $fieldSetPointer = &$jsLayout['components']['block-summary']['children']['block-shipping']
            ['children']['address-fieldsets']['children'];
            $fieldSetPointer = $this->merger->merge($elements, 'checkoutProvider', 'shippingAddress', $fieldSetPointer);
            $fieldSetPointer['region_id']['config']['skipValidation'] = true;
        }
        return $jsLayout;
    }
}

Any ideas? Thank you very much!


texts: Magento showing random image on product page

texts:
I have created a product with multple images.

I have set the base image and even added a sort order but when I view my product, it shows a random image and not the main image. what is causing this?


texts: Bulk import Product Tags to multiple products

texts:
I've got a list of several configurable products that need product tags added. There are about 15-20 tags per product and close to 50 separate products.
Is there a way to import the tags or run a SQL command to add them?


texts:
I am trying to create new module in magento2. I am trying to  override the Review block but is not working. Please check and let me know what I am doing wrong:

di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\Review\Block\Product\View" type="Categoryreview\Block\Product\View" />
</config>

Categoryreview/Block/Product/View.php file code

<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
namespace Revoamerica\Categoryreview\Block\Product;

class View extends \Magento\Review\Block\Product\View {

public function getReviewsCollection()
{
    die("testtt");
    // if (null === $this->_reviewsCollection) {
    //     $this->_reviewsCollection = $this->_reviewsColFactory->create()->addStoreFilter(
    //         $this->_storeManager->getStore()->getId()
    //     )->addStatusFilter(
    //         \Magento\Review\Model\Review::STATUS_APPROVED
    //     )->addEntityFilter(
    //         'product',
    //         3
    //         //$this->getProduct()->getId()
    //     )->setDateOrder();
    // }
    // return $this->_reviewsCollection;
}

}

registration.php

\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'xyz_Categoryreview',
    __DIR__
);


texts:
We recently migrated a Magento site and, for some reason, an unknown a number of orders that were paid for are still marked as Pending (status) in the Magento admin panel.

I need to be able to change the status to Processing so that back office staff can view invoices, print packing sheets etc, but I am unable to change the order status. Is there a way to do this?


texts: How to achieve the product added to the shopping cart, the "process" this function?

texts:
I want to know how to achieve the product added to the shopping cart, the"process" this function? Similar to this site

https://www.itead.cc/


texts:
How to display special price products in Sale category by default

Not like selecting products while creating categories or
 selecting category while adding products.


texts: How can I access my old Magento Admin Panel?

texts:
we recently launched a new website and in doing so have lost access to the old admin site.  Both sites are using Magento 1 and we used to access the old site on the following URL, https://www.alltank.co.uk/index.php/manage

Now that takes you to a 404 on the new site and I don't know how to get back to the new one?

New site is on AWS

Old site is on Freethought


texts: Prevent CMS page availability on base URL

texts:
I  have an issue in a Magento 1.9.2.2  store that I can't quite figure out the solution for, so i was hoping for your assistance.
There are 2 different store views each serving a different language. Those views are accessible by ULRs as the following:

base URL: www.example.nl

dutch version: www.exampe.nl/nl/cmspage

english version: www.example.nl/en/cmspage

The goal is to make the cms pages accessible only by using the correct country tag in the URL, this is working for the English part of the site but not for the Dutch.

To clarify:

www.exampe.nl/nl/cmspage is also accessible through www.exampe.nl/cmspage even when only nl is selected as storeview , the idea is to simply return a not found when trying to acces the cms page through www.example.nl/cmspage.

Any advice or tips you could give me on the subject would be greatly appreciated.


texts: Customer Billing address should match on the credit card

texts:
I am using Paypal Payment Pro payment method and I want to restrict to customers to make sure that the billing address has to match the billing address on the credit card they are using.
Is this possible?
If yes, please let me know required configuration.
Thanks in advance.


texts: where to get the missing js file for the missing menu in 1.9.1 version?

texts:
where to get the missing .js file for the missing menu in 1.9.1 version? Can someone please provide access to the missing file? In version 1.9.1 installation, products can not be access by visitors.

Thank you for your help!


texts: How to get last level category of each product in magento

texts:
I am trying to get last level category name with its product count for each product on listing page. explained as below-

Category
                -> Sub-category 1
                          ->Sub-sub-category 11   -> Product 1
                          ->Sub-sub-category 12
                              -> Sub-sub-sub-category 13  ->Product 2
                -> Sub-category 2
                          ->Sub-sub-category 21
                              -> Sub-sub-sub-category 22  ->Product 3
                          ->Sub-sub-category 23   -> Product 4

I want to get  only categories "Sub-sub-category 11", "Sub-sub-sub-category 13", "Sub-sub-sub-category 22" and "Sub-sub-category 23" which are the last level categories of Products 1, Products 2, Products 3, Products 4.
I found below link https://stackoverflow.com/questions/20926118/get-last-level-category-name-of-a-product-in-magento but it only gets third level category.


texts: Creating URL Rewrites on first descendant

texts:
I have a marketplace and I want to provide my merchants a way to get a URL for their stores. For example:
xyz.com/mystore
My question is how to do it safely. I know I can check the target paths to see if there is any rewrite already existent, but I need to prevent my customers to choose any module name and/or CMS pages name.
I dont want them to choose for example: xyz.com/customer.
The problem is that I am not able (or at least I dont know how) to check whether the last two are either a module or a CMS page.
I could add a custom path like xyz.com/store/mystore but this leads to bigger URLs and not so happy merchants.
Any thoughts? Is this a bad practice? Should I stick with the second option (custom path)?
Thanks


texts: Magento2.3 adding the products automatically to the parent category and to the subcategories which are on higher level

texts:
I am using Magneto2.3.0 I need this adding the products automatically to the parent category and to the subcategories which are on higher level

If anyone idea reply me how to achieve this requirement.
I am trying to below answer code than getting this

please check it my admin image

how to remove selected category above c d p b s options

here below  my catalog-category -section image there other brand category inside child category assign it automatically like c d p b s. if i assign shop by department->beauty & personal care->hair->seriums/oils but in above this category other parent category inside child category assign it. so this is wrong to our requirement wise.i share you my category structure below image mentioned

please check i have to install other default magento setup inside this code apply after getting this using luma theme by default.


texts: Magento 2 REST API end points for multi website

texts:
I have created 3 multi websites for my store. Each website has one store and separate root category for each website. The Urls are like below

hi.abc.com (default website)
hello.abc.com
hi-hello.abc.com

Admin url = manager.abc.com/manager
I need to call REST APIs for each website. How can I call the APIs? I get all the category/products details by using the default website Url with specific store code. Is it the right way?


texts:
In Magento 2 backend for a single page form, we can create form with simple HTML tag and we can also create form with UI components.

So what will be benefits to create a form with UI XML?


texts: Change Order status automatically when product is delivered based on fedex

texts:
I want to change the order status based on fedex or aramex shipping method.

Suppose fedex delivered product i want just automatically update order status in my system.

i have used fedex shipping as well as shipment api. but its not return satisfy response.

here is my code : but i cant get the final status from fedex.

$response = Mage::getModel('usa/shipping_carrier_fedex')->getTracking($data[$i]['track_number']);
                $trackings = $response->getTrackings()->getData('progressdetails');
                echo "<pre>";
                print_r($trackings);
                exit;


texts: Changing a transactional email based on total spend?

texts:
I'd like customers who spend more than $50 to get an additional sentence in their confirmation email. So if ordervalue <= 50, I guess.

Is this possible?
Or can an extension do it?
I can't seem to find anything online as the phrasing is awkward. Any
help is appreciated.


texts: If order confirmation email is sent then entry remove from database automatically

texts:
i want to know, that
If order confirmation email is sent then entry remove from
core_email_queue  Or
core_email_queue_recipients
database table automatically.

and if database table have entry inserted so what is meaning of that?,
email are sent or not?

In Email Sending, What is the Role Of CRON?
can CRON affect the order email sending process?

pls, explain me..
Thank You..


texts:
what is use of theme.xml file please explain briefly in magento 2 ?

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceBlock name="logo"> <arguments> <argument name="logo_file" xsi:type="string">images/theme_logo.png</argument> <argument name="logo_img_width" xsi:type="number">300</argument> <argument name="logo_img_height" xsi:type="number">300</argument> </arguments> </referenceBlock> </body> </page>

    argument name="logo_img_height" xsi:type="number">300</argument> </arguments> </referenceBlock> </body> </page>


texts: getSkinUrl with _forced_secure not loading via https after clearing cache

texts:
I have this code as the src in an img tag.

$this->getSkinUrl('images/mobile-logo.png',array('_forced_secure'=>true));

If I clear the cache, then immediately load a secure page, it loads with https and stays that way until the cache is cleared.  If I load a http page right after clearing the cache, then it loads with http, and again stays that way until the cache is cleared.  I have a cron job that refreshes the cache so I can't always be there to be the first person to load a page following the refresh.  I have tried both '_forced_secure' and '_secure'.  Just looking for a dependable way to load over https when the page is secure, without hard-coding it in or disabling caching.  And I'm fine if it always loads over https, but mainly need it to when the page is secure so that my lock icon stays as green as cash.


texts: How to get state codes from JS in Magento 2?

texts:
I need to add a function which will be check order state in JS for show/hide content in rows in Orders (Admin Panel).

In php I can use something like Order:STATE_COMPLETE, but in JS I don't know how to get this.


texts: How to set success and error message when custompage ajaxcall in magento2?

texts:
I want to display success message when my custom form submitted .

I am doing ajaxcall here.

How to achieve this?

I want default page.messages not custom message div.


texts: Magento 1.9 : How to Send Mag::Log error using Whatsapp?

texts: How can i send my EventObserver log message by whatsapp message?


texts:
I've managed to display the sub categories in my own block.

<?php
$category = Mage::getSingleton('catalog/layer')->getCurrentCategory();
$categories = $category->getCollection()
      ->addAttributeToSelect(array('name', 'image'))
    ->addAttributeToFilter('is_active', 1)
    ->addAttributeToSort('position', 'asc')
    ->addIdFilter($category->getChildren());
?>

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

             <a title="<?php echo $category->getName() ?>" href="<?php echo $category->getUrl() ?>">
                <img width="300" height="300" src="<?php echo $category->getImageUrl() ?>" alt="<?php echo $this->htmlEscape($category->getName()) ?>" />

            <a title="<?php echo $category->getName() ?>" href="<?php echo $category->getUrl() ?>">
                <?php echo $category->getName() ?>

<?php endforeach; ?>

Call this block from a CMS static block and when necessary set this in the design settings in the category.

My problem is that while I was developing I had the cached turned off it was working fine, once I enabled the cache it broke, to get around this issue I've disabled the 'Blocks HTML output' in the cache management, this is only a temporary measure but this module will need to enable to help page speed

The version of Magento is 1.9.2.2. Is there any fix to get around this issue.

UPDATE

I've created a block and overridden the getCacheKeyInfo method

public function getCacheKeyInfo()
{
    return array(
                    'SUBCATEGORY',
                    $this->getNameInLayout(),
                    Mage::app()->getStore()-getId(),
                    (int)Mage::app()->getStore()->isCurrentlySecure(),
                    Mage::getDesign()->getPackageName(),
                    Mage::getDesign()->getTheme('template'),
                    'CATEGORY-'.Mage::getSingleton('catalog/layer')->getCurrentCategory()->getId()
                 );
}


texts:
When I try to add a new category page it starts to load and then seems to reload the whole window inside the where the category list should be. The window starts to flicker, reloading over and over with the loading gif present. Not sure what to do as I am new to Magento and just trying to stand it up in a dev environment.

Category Page http://imageshack.com/a/img829/3136/9r1g.png


texts:
I'm updating a plugin and I need to build a select.

I'm new in Magento2, and I found this idea: Magento 2: How add dropdown in admin form?

I'm building something similar but I'm not able to display it in Admin Panel.

here the function:

<?php
namespace Fattura24\AppFatturazione\Block\System\Config;

class SelectFattureCreaFattura extends
\Magento\Config\Block\System\Config\Form\Field implements
\Magento\Framework\Option\ArrayInterface
{
public function toOptionArray()
{
$result = [];

foreach (self::getOptionArray() as $index => $value) {
    $result[] = ['value' => $index, 'label' => $value];
}
return $result;
}

/**
* Retrieve option array
*
* @return string[]
*/
public static function getOptionArray()
{
return [
    [1 => __('Disabilitata')],
    [2 => __('Fattura NON Elettronica')],
    [3 => __('Fattura Elettronica')]
];

}

/**
* Retrieve option array with empty value
*
* @return string[]
*/
public function getAllOptions()
{
$result = [];

foreach (self::getOptionArray() as $index => $value) {
    $result[] = ['value' => $index, 'label' => $value];
}

 return $result;
}

/**
* Retrieve option text by option value
*
* @param string $optionId
* @return string
*/
public function getOptionText($optionId)
{
$options = self::getOptionArray();

return isset($options[$optionId]) ? $options[$optionId] : null;
}
}

I know I need a template but I don't know where to place it exactly and how to build it. Thanks to all David


texts:
Actually magento share session with differents Store/view.
Is there a way to unset session when i switch store (not website, store).
I don't want to share cart between two differents stores.

Is it possible ?


texts: Magento 2.1.4 add Category Image into Product Image Slider?

texts:
I'm new to Magento and I'm using 2.1.4 . I want to add Category image into the Product Image Slider top Corner. I search in Magento forum and I can't find it any where. All the example are for early magento editions.

If any one can help, it would be GREAT.


texts: magento 2 ui component form default value

texts:
I have a created a custom magento 2 ui component form on Admin side.
I have given create a button in customer detail page. Now what i expect is when i click on the button, it will go to my custom form and populate (New not editing) some customer details (firstname, email etc). The other detail will be blank.

Any Help?


texts: How to add on scroll animation in magento 2 using AOS (Animation On Scroll) Jquery?

texts:
I have tried to add on scroll animation in my Magento 2 cms page. I used AOS Jquery for that.

I have added the js and CSS file and initialize AOS through cms page but It will shows

  Uncaught TypeError: AOS.init is not a function

Does anyone have an idea how to use AOS in Magento2?


texts: UPS/FedEx Dynamic Destination type from shipping address

texts:
Magento has a static setting sitewide that we can either select to commercial or residential
How can I make it dynamic depending on addresses, since addresses are mixed commercial and residential so I want to check destination type dynamically and add shipping rate?
Shipping rates I have already set.


texts: How to prevent that the module version is updated if install/upgrade fail?

texts:
When you install/update a module, it is possible that for some reason the operation fails.

Using transaction, I managed to easily prevent updating/inserting the data by rollbacking in case of failure.

However, the module version in the setup_module table is still set by the installer. Is there a way to prevent that?


texts:
I am attempting to install a magento 2.3.3 site on windows and no content is being generated for my page. I have followed many different methods of fixing this. I have changed the Validator realpath variable and more. When i inspect the page, this is the only code that is generated, apart from the head.

<!doctype html>
<html lang="en">
  <head> ... </head>
  <body data-container="body"
      data-mage-init="{"loaderAjax": {}, "loader": { "icon": "http://localhost/greenbeansau/pub/static/frontend/_view/en_NZ/images/loader-2.gif"}}"
      class="cms-index-index page-layout-1column">

  </body>
</html>

My Admin page also has the same code. As far as i can tell, no errors have been logged in the var/log files, and no php errors are being generated.

Help please. Anything would be appreciated


texts: How can I extend/override admin create order controller?

texts:
I am trying to override adminhtml_sales_order_create controller.
I have created a small module
app/code/local/PA/Sales/etc/config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <PA_Sales>
            <version>0.1</version>
        </PA_Sales>
    </modules>
    <admin>
        <routers>
            <adminhtml>
                <args>
                    <modules>
                        <sales before="Mage_Adminhtml">PA_Sales_Adminhtml</sales>
                    </modules>
               </args>
            </adminhtml>
        </routers>
    </admin>
</config>

and created controller file as

app/code/local/PA/Sales/controllers/Adminhtml/CreateorderController.php

<?php
require_once 'Mage/Adminhtml/controllers/Sales/Order/CreateController.php';
    class PA_Sales_Adminhtml_CreateorderController extends Mage_Adminhtml_Sales_Order_CreateController
    {
         public function indexAction()
        {
                 echo "something";exit;
        }
    }

I am unable to override this controller, where did I go wrong?


texts:
I am getting this error when i going to remove first 3 tax rules

can you please tell me how i can remove them.its very urgent issue to fix its magento 1.9.

i have already tying to remove it but Tax rate cannot be removed. It exists in tax rule is the error showing Thanks


texts: Can't load all products in Indexcontroller

texts:
I have a simple Indexcontroller.

When I use this:

$collection = Mage::getModel('catalog/product')
                        ->getCollection()
                        ->addAttributeToSelect('*');
echo count($collection);

It doesn't show all the product (just a few), what could the reason for this be? I would like to load all products, doesn't matter what the status is.

UPDATE:
Thanks to Alan Storm I found the answer. In using: echo (string) $collection->getSelect(); I saw: (_table_name.store_id = 5)

By setting it to storeId 0 ('admin' so to say) I was able to see all the product.

Sounds logical... as always :-)


texts: Magento2 : Change shipping address layout on checkout page

texts:
Need to change shipping address layout on checkout page.

Remove middle name to shipping address form.
Display last name just after first name.

How i can remove middle name to shipping address form.

How to add put firstname and lastname input in new created  because of I need to display last name just after firstname.

in short i need to it display in two column (firstname and lastname) like this

How can achieve task ? any have solve this ?


texts: Magento2.2.4: The top menu not showing to the product detail page

texts:
I'm getting issue with the Top Menu on PDP page:

I have upgraded my magento website 2.1.7 to 2.2.4. I got two issues:

Breadcrumbs issue ( Breadcrumbs not display on PDP page )
Top menu issue  ( Top menu not display on PDP page )

I have fixed the breadcrumb issue by following below link:
https://github.com/VOREStation/VOREStation/issues/3751

But not found any solution for the top menu issue. I have checked my all custom modules there is no remove attribute used for removing the top menu & no other static conditions.

If anyone knows the solution then please let me know.

On home page the top menu is showing but on PDP page it is not showing. We have removed the top menu only for checkout & cart page.

Here is the website URL:

https://www.firefold.com/

PDP page URL:

https://www.firefold.com/digital-clamp-meter-klein-tools-cl600


texts: deploy:mode:set production taking too much time

texts:
I did a php bin/magento deploy:mode:set production on magento 2 snappy 4000 vps, it's taking about 3h and still not done.

Is it normal?

4 GB RAM
2 Cores CPU
165 GB Disk Space
2 TB Bandwidth

Aren't those specs enough for magento?


texts: Why does Magento show the default 'favicon.ico' when template path hints are enabled?

texts: When I enable the template hints (System->Config->[select store/website]->Developer->Debug->Enable template hints), why does Magento show the standard and well-loved 'favicon.ico' file instead of the 'favicon.ico' I have uploaded for my theme/site?


texts: I can't save a category in Magento 2.3.5-p2 - Probably after migration from 1.9.2

texts:
I migrated a store from version 1.9.2 to 2.3.5-p2, I had some issues at first, as with any migration I did before, but I sorted everything out. The migration was made with the official Magento migration tool.
After a while of having the store online, I tried to enable / disable a category, or even only trying to save it without any change, and I'd always get this error:
Something went wrong while saving the category.
along with:
Argument 1 passed to Magento\Catalog\Model\Category\FileInfo::removeStorePath() must be of the type string, array given, called in /vendor/magento/module-catalog/Model/Category/FileInfo.php on line 167
No error report is generated, and I can´t seem to find an issue on the debug, system or exception logs.
Everything else has been working fine, so I don´t know what the problem could be. So any help would be awesome.

EDIT:
I've found a "temporal solution" (I think). On this question:
Magento 2.3.4 - Error: Call to a member function getAttributeCode()
On the file: vendor/magento/module-catalog/Observer/InvalidateCacheOnCategoryDesignChange.php on line 67 I commented this part of code:
if ($this->isCategoryAttributeChanged($designAttribute->getAttributeCode(), $category)) {
            $this->cacheTypeList->invalidate(
                [
                    \Magento\PageCache\Model\Cache\Type::TYPE_IDENTIFIER,
                    \Magento\Framework\App\Cache\Type\Layout::TYPE_IDENTIFIER
                ]
            );
            break;
        }

And now I can edit my categories again. But I doubt that this is the right solution for this.


texts:
⚠ GraphQL Error (Code: 404): {"response":{"error":"\n\n404 Not
  Found\n\nNot Found\nThe requested URL
  /graphql was not found on this
  server.\n\nApache/2.4.33 (Win32) PHP/7.2.4 Server at
  192.168.1.105 Port 80\n\n","status":404},"request":{"query":"\n
  query IntrospectionQuery {\n      __schema {\n        queryType { name
  }\n        mutationType { name }\n        subscriptionType { name }\n
  types {\n          ...FullType\n        }\n        directives {\n
  name\n          description\n          locations\n          args {\n
  ...InputValue\n          }\n        }\n      }\n    }\n\n    fragment
  FullType on __Type {\n      kind\n      name\n      description\n
  fields(includeDeprecated: true) {\n        name\n        description\n
  args {\n          ...InputValue\n        }\n        type {\n
  ...TypeRef\n        }\n        isDeprecated\n
  deprecationReason\n      }\n      inputFields {\n
  ...InputValue\n      }\n      interfaces {\n        ...TypeRef\n
  }\n      enumValues(includeDeprecated: true) {\n        name\n
  description\n        isDeprecated\n        deprecationReason\n
  }\n      possibleTypes {\n        ...TypeRef\n      }\n    }\n\n
  fragment InputValue on __InputValue {\n      name\n      description\n
  type { ...TypeRef }\n      defaultValue\n    }\n\n    fragment TypeRef
  on __Type {\n      kind\n      name\n      ofType {\n        kind\n
  name\n        ofType {\n          kind\n          name\n
  ofType {\n            kind\n            name\n            ofType {\n
  kind\n              name\n              ofType {\n
  kind\n                name\n                ofType {\n
  kind\n                  name\n                  ofType {\n
  kind\n                    name\n                  }\n
  }\n              }\n            }\n          }\n        }\n      }\n
  }\n  "}}

Please check screenshots:

http://prntscr.com/nfx29r
http://prntscr.com/nfx35i
http://prntscr.com/nfx3ez


texts: How to get rid of browser caching issue of javascript file in magento 2

texts:
After our magento 2 site is live whenever we are doing changes in JS file it doesn't reflect in customer browser as a result some of the pages breaks for those customer who doesn't flush his browser cache. Is there any way that browser will load fresh file from the server if there is any changes in the file.

Thanks in Advance
I am facing this issue in magento 2


texts:
I have two stores setup in Magento, one is purely for US customers and it's currency is set to be USD.

I'm trying to import products so that the prices that are supplied are interpreted as US dollars, but when I import them, they are treated as GBP. Is it possible to import the prices in dollars?


texts:
Getting The below error in website

Parse error: syntax error, unexpected 'protected' (T_PROTECTED) in /home/bhuwalfashion/public_html/lib/Zend/Cache/Backend/File.php on line 30

Does anyone know how to solve it?

Thanks in advance.


texts: Set tax on product subtotal line at checkout

texts:
I'm struggling to set the correct price on the checkout summery.

What I need is the price on each product lines (red) should include Tax, like the Subtotal (blue). In the images, the 2 highlighted amounts should be $682.95.

I tried configuring Tax on the Admin Configuration, but it doesn't seem to want to change anything.

If it helps, I'm using onestepcheckout, but not sure it changes anything.


texts: How to Add New custom button of Import template in my grid?

texts:
i have an button add item now i want to add import template button but when i used same helper it override previous button..so how can I create multiple button there ??

my module

<?php
class Matrid_Feedmanager_Block_Adminhtml_Web extends Mage_Adminhtml_Block_Widget_Grid_Container
{
  public function __construct()
  {
    $this->_controller = 'adminhtml_web';
    $this->_blockGroup = 'web';
    $this->_headerText = Mage::helper('web')->__('Matrid FeedManager');
    $this->_addButtonLabel = Mage::helper('web')->__('Create new Template');

    parent::__construct();

  }

}


texts: How to add custom button to edit attribute form?


texts: SSH "Could not open input file: bin/magento"

texts:
I'm working through the Hello World tutorial and it's time for me to enter the "$ php bin/magento setup:upgrade" command for the reason mentioned in the tutorial but I get the error: "Could not open input file: bin/magento" and when I try to navigate to the Magento dir in bin it doesn't exist.

Help please? What am I doing wrong?


texts: Customer Address Field Labeled Wrong in Checkout (Magento 2.3 Cloud)

texts: Im having a strange issue , i just created a "Customer Address Attribute"  . It is showing correctly on filling Shipping Address , but when i go to Payment Method it shows me like this . Have any of you have this issue ? Im wondering is this a Magento Bug , because i havent do any override yet to the website .


texts: Add options to Visual Swatch by Rest API

texts: Can options be entered into a Visual Swatch attribute by API Rest?


texts: Get all products with a specific attribute code with REST API in Magento 2

texts:
Is there is a built in rest API to get ALL products with a specific attribute_code

ex. this API
https://domain.com/index.php/rest/V1/products/:productID
returns

..
     <item>
          <attribute_code>featured</attribute_code>
          <value>0</value>
     </item>
..


texts: Magento theme not displaying on front-end after install

texts:
I'm fairly new to Magento. I have successfully installed Magento, sourced a theme I like and followed the install instructions.

When the theme is installed and theme name is entered into: System > Config > Design > Default: 'Theme Name'

It makes no changes to my website.

I have looked around the web for answers and this had led me to try refreshing the cache.

From what i've read, it sounds like the theme I have installed is not being found my Magento and is falling back to the default theme, but I can't seem to find a fix.

I'm not sure if i'm meant to post website details here, but the website is:enter link description here

Any help is much appreciated, Thanks


texts:
in magento 1.x for add contact form in CMS page i use next code

{{block type="core/template" name="contactForm" form_action="{{store direct_url='contacts'}}/index/post" template="contacts/form.phtml"}}

How I can add contact form in CMS page in magento 2


texts: how to create customer session variable on first visit on store?

texts:
It is required to have some session variables set when customer visit store for first time, or his session was expired and renewed.

For existing customer it is possible to listen to customer_customer_authenticated event and when customer logs in - and add variable to core/sessionsingleton with observer, but how to deal with the guest user (or new registered customer ) ?

The main goal is to set some session variables when customer session is initiated, if the customer visits store for the first time, or its session was expired and reinitiated.

( From this session variables some layered filter defaults will be set, if the guest customer - one filter, if logged in - another filter - based on attributes of this customer, etc. But if session exists for him, let him to customize his layered filters in catalog area. )

How to accomplish this task ?

Thanks


texts: Magento2.1.8 ltrim() error broke production site

texts:
Live production site went down suddenly. I created a custom cron job to enable/disable products in the site and the job ran successfully. 3 people placed order and suddenly the Live site went down and following are the series if events that happened:
1) "There has been an error processing your request"
2) "Can't create directory /var/www...../generation"
3) Runtime exception
4) Customers who were logged in were logged out

Then the site got restored, all in 1 minute. In the exception log all that I can see is an "Warning: ltrim() expects parameter 1 to be string, array given". I need urgent help with this. I want to know why the site went down.


texts:
since the last update of magento 1.9.4.1 i see a bug :

  Warning: is_readable(): open_basedir restriction in effect.
  File(/opt/php-7.2/lib/php//var/www/clients/client1/web1/web/magento_dev/var/log/system.log)
  is not within the allowed path(s): (
  /var/www/clients/client1/web1/web:
  /var/www/clients/client1/web1/private:
  /var/www/clients/client1/web1/tmp: /var/www/odyssee-vins.com/web:
  /srv/www/odyssee-vins.com/web: /usr/share/php5: /usr/share/php: /tmp:
  /usr/share/phpmyadmin: /etc/phpmyadmin: /var/lib/phpmyadmin)

  in /var/www/clients/client1/web1/web/magento_dev/lib/Zend/Loader.php
  on line 186

i don't understand why it's say that.
i delete manually the system.log and this msg appeared like he can't create the new file.

it's really strange, if you have any idea, i take them.


texts: How to add my own HTML and Javascript codes to Magento 1

texts:
This must be a basic question but I cant find an answer to use. I did some custom functions with Javascript and a design (css/html) and now I want to include them in a Magento 1 project, how can I achieve it?

Thank you.


texts:
How we can a create a custom module in magentho 1.9?

For this I created a new module inside app/code/loacl/display. Here display is the directory I have created. Inside display I have created a new folder customgrid. Inside Customgrid I have created Block, Helper, Model and Controller.

I need to know one thing where I will create a view page for my controller and How I will get the data from the view page to controller and How can I insert my data to database

I have attached the screen shot I need to create a view page like this in admin side.

This is the view page I need in the admin side. I need to change the value inside each coloum that I will create.


texts: Magento2 theme changed after language change

texts:
I created a new theme and I added Multilingual support.
When I change the language, the theme also changes.
So, please help me how to remain my selected theme after the language changed.


texts:
How can I get the store ID from a product instance ?

I have tried: $product->getStoreId();

but it don't works.

Thanks for help.


texts:
Befor I forget, I use Magento 1.9.2.1.
I backuped my live Magento shop. Then I copied the backup to my test shop an loaded the backup. Now I cant reach the frontend or the backend. I'm always beeing redirected to the live Shop. I believe its because of the address set up in the shop. Where are they beeing saved?


texts: Overwrite magento2 function using plugin method?

texts: I want to customize return value of  $block->getProductDetailsHtml($_product) (in list.phtml) using plugin method, not overrite list.phtml


texts:
We have a CMS page with URL key 'contact_btl'. However, the page URL in question is /contacts, and the content differs completely. The live page content consists of a map (which is a CMS block that leaves blank space when disabled) and a contact form (template part). Catalog > URL Rewrite Management does not appear to contain anything to do with it either.

So I guess my question is where might it be and/or how might I track it down?


texts: What are the advantages of created a custom package?

texts:
What are the advantages of created MyPackage/MyTheme instead of default/MyTheme ?

Since app/design/frontend/default/default is almost completely empty (no template folder, no local.xml) we could customize files here.

In skin/frontend/default/default no customizations or they will be overwrite in case of magento update. So we could do our customizations in default/MyTheme.

So the only disadvantage with default/MyTheme is that the skin/frontend/default/default fallback would be useless.

I guess there is others reasons of created MyPackage/MyTheme as recommended by Magento but i can't figure out them.


texts: Show products under/over certain prices in static blocks

texts:
On my top level nav items instead of showing all products in that category and the ones below, i would like to show static blocks with titles of "Under £10", "Under £20" and so on.

How would i do this?

I know i have to make sure it isn't being used as an anchor and in display properties of the category to set it to use a static block instead of products.

My issue is how to actually get the products that match the titles above into a static block.

So my question. How do i pull products from the db for all the categories nested in the top level category into a static block IF they meet a certain condition e.g. price <= 10

Thanks


texts: How to display saving amount if a product is on discount?

texts: I am trying to display how much a customer will save when a product has a special price. I want to display it on the product page next to the special price or above it. I am attaching an image so you can see what exactly I am trying to achieve. I was not able to find anything similar to what I want to achieve. I am using Magento 2.3.2


texts:
After installed Magento 2.3.3, I try login Admin account and have this issue:

I use Magento 2.3.3 and PHP 7.3.13.

Any help would be appreciated!


texts: How can I disable the mini-cart if the basket contains too many products?

texts:
I am working on a wholesale website in Magento 2 and have noticed the front-end performance drops off massively when the mini-cart has to render too many items (over say, 20 different SKUs).

I'm sure I can figure out how to hide the cart myself if there are more than a certain number of items but I was wondering if there's an 'official' way to do this?

I found a method in Magento\Checkout\Block\Cart\Sidebar which seems to get a config value for this purpose:

/**
 * Return max visible item count for minicart
 *
 * @return int
 */
private function getMiniCartMaxItemsCount()
{
    return (int)$this->_scopeConfig->getValue('checkout/sidebar/count', ScopeInterface::SCOPE_STORE);
}

However this doesn't seem to have the intended effect.

I've traced it through to vendor/magento/module-checkout/view/frontend/web/js/view/minicart.js where the value is assigned to the mini-cart in initSidebar() but it only seems to adjust the height (CSS) of the mini-cart?

This would obviously have no effect on the performance of the page...

Do I need to come up with my own add-on somewhere in the render chain instead?


texts: How to add columns filter in Products in Category

texts: I need to add columns filter in products in category like in product listing page


texts: Problem concerning order status in update script when installing fresh Magento

texts:
We have a installed a third party module on an existing Magento installation which creates some new order statuses in its setup script like this:

$statusTable        = $installer->getTable('sales/order_status');
$data = array(
    array('status' => 'authorized', 'label' => 'Authorized Payment'),
    array('status' => 'canceled_saferpay', 'label' => 'Canceled by Saferpay')
);
$installer->getConnection()->insertArray($statusTable, array('status', 'label'), $data);

Everything went fine until we tried to initialize a new database with the existing Magento code (which is already including the module).

Now we get a duplicate key constraint violation in the sales_order_status table, complaining that the entry authorized already exists.


texts: simple factory (not autogenerated) in magento2

texts:
I need to create different models by condition.

if($fullActionName == 'catalog_product_view'){
    //get first custom model,
} elseif($fullActionName == 'catalog_category_view'){
    //get second custom model
}

I find the correct way to do this:

1)

function __construct(FisrtModel $first, SecondModel $second){ ... }

But it's not sense add both model if only one will be use...

2)
Get personal model directly use object manager:

$this->_objectManager->create($modelName, $data);

But it's a bad practise..?


texts: How to check if user exists in Unit Test ? in Magento2

texts:
This my the code, and it's working normally, but in test unit, it is not working ? he said that he doesn't have the create method.

    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $userModel = $objectManager->create('Magento\User\Model\User');
    $userModel->loadByUsername("bbbb");
    $role_id_under_selected_user = $userModel->loadByUsername("bbbb")->getRoles();
    if ($userModel->getData('password') == NULL || empty($role_id_under_selected_user)) {
        return false;
    } else {
        return true;
    }

Thanks for your help.


texts:
I am trying to remove a block named catalog.leftnav. After reading this- https://stackoverflow.com/questions/16937018/magento-remove-block-using-update-xml

I created a local.xml file and put this in there-

<?xml version="1.0" encoding="UTF-8"?>
<layout>
   <default>
     <remove name="catalog.leftnav" />
   </default>
</layout>

I added it into frontend/default/themename/layout

What am I missing?


texts: how to get the weight unit of the product from quote in magento 2

texts:
I wish to get the weight unit of the product from quote in magento 2.
Please provide me a solution to get quote value.


texts: How to remove coupon programmatically in salesrule_validator_process event

texts:
I want to add some custom condition based on cart item's custom option on coupon code.

For this I am using salesrule_validator_process event and also added code for cart item's custom option condition but how to remove coupon or not allow to apply when condition not matched?

Here is my code :

$quote = Mage::getSingleton('checkout/session')->getQuote();
$cartItems = $quote->getAllVisibleItems();
foreach ($cartItems as $item)
{
    $info_buyRequest = $item->getOptionByCode('info_buyRequest');
    $buyRequest = unserialize($info_buyRequest->getValue());
    if($custom_condition)
    {
        return true;
    }
    else
    {
        return false;       // here I want to remove coupon or not allow to apply
    }
}

How to do that?


texts: I can not add a custom attribute to the product page

texts:
I use Magento 2.3.4 EE and when I try to add a custom attribute to the product page - I can’t do it.

Mi file:

  app/design/vendor/theme/Magento_Catalog/layout/catalog_product_view.xml

My code:

<referenceBlock name="product.info.details">
    <block class="Magento\Catalog\Block\Product\View\Attributes" name="product.info.custom" as="custom" template="Magento_Catalog::product/view/attribute.phtml" group="detailed_info">
        <arguments>
            <argument name="at_call" xsi:type="string">getCustom</argument>
            <argument name="at_code" xsi:type="string">custom</argument>
            <argument name="title" translate="true" xsi:type="string">Custom Attribute</argument>
            <argument name="sort_order" xsi:type="string">15</argument>
        </arguments>
    </block>
</referenceBlock>

And i try too:

<referenceBlock name="product.info.details">
    <block class="Magento\Catalog\Block\Product\View\Description" name="product.info.custom" as="custom" template="Magento_Catalog::product/view/attribute.phtml" group="detailed_info">
        <arguments>
            <argument name="at_call" xsi:type="string">getCustom</argument>
            <argument name="at_code" xsi:type="string">custom</argument>
            <argument name="title" translate="true" xsi:type="string">Custom Attribute</argument>
            <argument name="sort_order" xsi:type="string">15</argument>
        </arguments>
    </block>


texts: how to delete products of attributeset programmatically

texts:
I am adding products by code in particular one attributeset named "Diamond".

I had programmed a cron job to add the csv data as products in "Diamond" attribute set. The new csv uploaded on daily bases.

So, I want to remove the previously added products from "Diamond" atribute set.

Any idea to delete those products which attribute set is "Diamond" by code?


texts:
I want to add data in cart

How can i do this without change core files


texts: How to get Tier Price of product magento2?

texts:
How to get tier price of the product in Magento 2 with custom code?

This is my code

 public function getProductCollection()
    {
        $collection = $this->_productCollectionFactory->create();
        $collection->addAttributeToSelect('*');
         $collection->setOrder('created_at', 'DESC');
        // $collection->setPageSize(3); // fetching only 3 products
        return $collection;
    }

and my call function in .phtml

  $productCollection = $block->getProductCollection();
   $productCollection->setPageSize(2);
            foreach ($productCollection as $product) {

 echo $product->getName();
 print_r($product->getTierPrice());

echo getName ,getPrice,getSpecial price works

but getTierPrice is not working.

ex. I have VIP member card (customer_group) I want to show tier price VIP member card to public not set all group


texts: Magento2 Script for copying Product Title to Image alt

texts:
we use magento 2.1.9ce

Our products are made through an api. And they fill in the ean number at the image alt location.
And unfortunatly they can't change that.

But i would like to have the products title on the img alt.

Can anyone help me with a script that copies the product title to the img alt?


texts: getTable() does not work in core code on core table

texts:
In Mage_Sales_Model_Resource_Report_Bestsellers_Collection::_initSelect() on Line 138

$mainTable = $this->getTable('sales/bestsellers_aggregated_yearly');

Magento throws an error: Can't retrieve entity config: sales/bestsellers_aggregated_yearly but table sales_bestsellers_aggregated_yearly does exist.

Why does Magento not find this table?

I did a Magento update from ce-1.4.0.1 that might have messed up something...

Update

getTable() is calling Mage_Core_Model_Resource::getTableName() and this looks like this:

    $parts = explode('/', $modelEntity);
    if (isset($parts[1])) {
        list($model, $entity) = $parts;
        $entityConfig = false;
        if (!empty(Mage::getConfig()->getNode()->global->models->{$model}->resourceModel)) {
            $resourceModel = (string)Mage::getConfig()->getNode()->global->models->{$model}->resourceModel;
            $entityConfig  = $this->getEntity($resourceModel, $entity);
        }

        if ($entityConfig && !empty($entityConfig->table)) {
            $tableName = (string)$entityConfig->table;
        } else {
            Mage::throwException(Mage::helper('core')->__('Can\'t retrieve entity config: %s', $modelEntity));
        }

In app/code/core/Mage/Sales/etc/config.xml the correct table is defined as sales_bestsellers_aggregated_yearly with the config path:

/config/global/models/sales_resource/entities/bestsellers_aggregated_yearly

To find modules messing with this config i did:

grep -R "bestsellers_aggregated_yearly" app/

And found only core files:

app/code/core/Mage/Sales/Model/Resource/Report/Bestsellers/Collection.php
app/code/core/Mage/Sales/sql/sales_setup/*
app/code/core/Mage/Sales/etc/config.xml


texts:
I need to get current store view code in JS component to compose i18n-compatible route to the REST API operation:

define(
    ["jquery", "ko", "uiComponent", "mage/translate"],
    function ($, ko, Component, translate) {
        "use strict"

        const URL_EMAIL = "/rest/V1/feedback/form/email"

        let url = "/" + storeCode + URL_EMAIL;
...

because __('text to translate') does not work in REST API code on server side w/o store view prefix.


texts: How to set cronjob dynamic schedule from database in Magento 2

texts:
I am working on a custom module for Magento 2. I did setup crontab there and it is working good with static schedule.

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../app/code/Magento/Cron/etc/crontab.xsd">
    <group id="default">
        <job name="tm-feed-job" instance="TM\Feed\Model\Cron" method="export">
            <schedule>* * * * * *</schedule>
        </job>
    </group>
</config>

But I need the <schedule>* * * * * *</schedule> dynamic from my database saved value. Here I need to use 3 schedule Daily Weekly Monthly

Frequency already saved in database

How can i add dynamic schedule there?


texts: How to disable 'Proceed to Checkout' button on the cart page?

texts:
I am trying to make it so PayPal is the only option the purchase products, how do I remove the 'Proceed to Checkout' button so this is the only option?

Thanks in advance.


texts: Magento2: How to get content of file from remote sftp?

texts:
I have one requirement in which i need to get zip file from remote sftp and read its data after extract it.

I see there is class Magento\Framework\Filesystem\Io\Sftp which i can use like below.

   \Magento\Framework\Filesystem\Io\Sftp $ftp
   ){
       $this->ftp = $ftp;
   }

   public function uploadFile(){
       $open = $this->ftp->open(
                   array(
                       'host' => 'hostname here',
                       'username' => 'username',
                       'password' => 'password'
                   )
               );
}

but how to retrieve files and extract it so i can copy to my server.


texts: Magento 2: how to display notification after module install via zip/composer?

texts:
I want to display a backend admin notification

Example:Your module Test_Product installed successfully!

In the yellow bar after my custom module Test_Product will be installed successfully in Magento instance via zip/composer.

So how can I achieve this functionality?


texts: Magento API complex filter value from another key value

texts:
I have a custom soap api for my magento 1 website, the problem is i dont know what array value to pass as the filters parameter so the parameter will work like this:

 $collections = Mage::getModel('namespace/module')->getCollection()
->addFieldToFilter('created_at', array(
                    array('null' => true),
                    array('lt' => new Zend_Db_Expr('updated_at'))
                  ));

here's my api custom function which receive filters as parameter:

public function mymodulelist($filters = null){
       $collections = Mage::getModel('namespace/module')->getCollection();
       $apiHelper = Mage::helper('api');
       $filters = $apiHelper->parseFilters($filters);
       try {
           foreach ($filters as $field => $value) {
               $collections->addFieldToFilter($field, $value);
           }
       } catch (Mage_Core_Exception $e) {
           $this->_fault('filters_invalid', $e->getMessage());
       }
}

i usually use a complex filter like this:


texts: Magento2 move coupon code inside summary

texts:
I am planing to move the coupon code section inside the summary page,before that i have moved the summary-section under the item list, and moved the cross-sell section next to summary-section.

Now i plan to move the coupon-code section inside the summary section or next to item-list section.

For move inside the summary-section i just used below code

<move element="checkout.cart.coupon" destination="cart.summary"/>

For move next to order item list section

<move element="checkout.cart.coupon" destination="checkout.cart.items" before="checkout.cart.order.actions" after="checkout.cart.form"/>
<move element="checkout.cart.coupon" destination="checkout.cart.container" before="cart-items" />


texts: On which checkout step tax gets calculated if tax calculation is based on Billing Address?

texts:
I wanted to understand, on which checkout step, tax gets calculated if tax calculation is based on Billing Address?

Also which class/method gets called and what triggers it when Magento calculates the tax based on billing address?


texts: Having to re-deploy static files to see changes in javascript

texts:
I have to run

sudo rm -rf var/*
sudo rm -rf pub/static/frontend/*
sudo bin/magento setup:static-content:deploy

to see any changes made in my js/scripts.js file. I am in developer mode.


texts: Custom field in catalog product image gallery

texts:
I want to add custom input field in catalog product gallery in magento 2.1.7

I already create a column in catalog_product_entity_media_gallery_value table and also made related configuration for that field but it didnt work.

I also tried editing core files but that also didnt work.

How to do that?


texts: Is sucuri and redis cache work together?

texts:
In magento site my client is using Sucuri cache Sucuri now he want to use redis cache too because site is too slow so I also add redis cache in server and website but after that site speed performance is not good and speed is same as before added redis cache.

So I want to know from some pro developer that does sucuri and redis cache work together or conflict with each other?


texts: How to import image labels per language (store view) using ImportExport

texts:
I am using AvS_FastSimpleImport which is based on Mage_ImportExport - so answers for the latter would also help.

The images per store view are the same but I want to use different labels.

The following layout is not working. I get the image labels only in one language.


texts: magento 2 In cart page how discount code validation works

texts: magento 2 In cart page how discount code validation done in default, while cart page referesh


texts: Refreshing Cache via calling website recursively - useful?

texts:
since few days I'm optimizing the performance of our magento (1.9) store. I mounted the var/cache folder via tmpfs with a size of 256MB.

Now my question: does it make sense to call the site via wget -m (morror) for the effect that the content will be cached? Maybe once a week via crontab?

Greetings from Munich!


texts:
I want to install this extension. I bought the source code from the company.

but here, what the install procedure of extension is confusing for me.

please search these following lines in above link :

"now unzip the respective marketplace zip you will find the app folder
inside that move that app and skin folder in magento root as per the screenshot".

but when i try to copy "app & skin" to root of magento folder using "ftp[filezilla", we are getting "app & skin folders
exists, do you want to overwrite the files". So i am in confusion how to install this extension.

please help me to find solution.

Thanks in advance.


texts: Log printing is not working in Magento 2.2.2

texts:
I have tried to print a log in Magento 2.2.2 but its not printing any log in debug.log file. I am using xampp server with php version 7.1.7

\Magento\Framework\App\ObjectManager::getInstance()->get('Psr\Log\LoggerInterface')->debug(print_r(['getCountries' => $countryCodes], true));

Let me know if i need to do any extra setting.

Thanks


texts:
I am looking at various tuning on magento 1.9.3 installation with Redis hosting FPC. I am interested in mileage with the various policies available as listed below and also the associated monitoring strategies for Redis cache items and lifecycles.

I am experiencing periodic failures of my Redis service due to OOM, currently at around 550mb. I am about to move to a much bigger dedicated Redis host, but I am unsure if my problem will just continue due to ever growing cache due to only using the default cache memory policy.

I do not know:

how to monitor and understand if items are actually being evicted and that the cache is being emptied of stale items
what practical effect the memory policies will have and what is recommended (if not the default)?

From Redis Docs:

noeviction: return errors when the memory limit was reached and the client is trying to execute commands that could result in more memory to be used (most write commands, but DEL and a few more exceptions).

allkeys-lru: evict keys trying to remove the less recently used (LRU) keys first, in order to make space for the new data added.

volatile-lru: evict keys trying to remove the less recently used (LRU) keys first, but only among keys that have an expire set, in order to make space for the new data added. allkeys-random: evict random keys in order to make space for the new data added.

volatile-random: evict random keys in order to make space for the new data added, but only evict keys with an expire set.

volatile-ttl: In order to make space for the new data, evict only keys with an expire set, and try to evict keys with a shorter time to live (TTL) first.


texts:
I have a magento installation (1.9.2.3) on a Bitnami AWS instance, I am trying to use the SMTP Pro extension ( source ) and use the Amazon SES feature. When I run the self-test it works and send the email from and to the configured emails.

But the magento installation cant send emails at all.

I tried to run either cron.php or cron.sh , without any error, but without any apparent consequence.
sendmail is installed and working
Amazon SES credentials working

cronjob is irrelevant at this point since It doesnt do anything.

Can someone help me?


texts: Magento2, define variable in html (Knockout) file

texts:
Consider below code, the condition ko if: falg  does not work. How to define variable falg = "false" in this file?

<!-- ko falg = "false" --> <!-- /ko -->
<!-- ko if: product_has_url -->
    <!-- ko falg = "true" --> <!-- /ko -->
<!-- /ko -->
<!-- ko if: falg -->
...
<!-- /ko -->

update: I'm writing module to customize the minicart content. Below is the structure:

   registration.php
    |
    +---etc
    |   |   module.xml
    |   |
    |   \---frontend
    |           di.xml
    |
    +---Plugin
    |       DefaultItem.php
    |
    \---view
        +---frontend
            \---layout
            |     checkout_cart_sidebar_item_renderers.xml
            |
            \---web
              \---js
                 \---myscript.js
              \---template
                 \---minicart
                    \---item
                            default.html
    \---requirejs-config.js

So now my challenge is to pass the flag from myscript.js to based on the item attibute product_has_url to default.html

myscript.js ?

define([
    'uiComponent',
    'Magento_Customer/js/customer-data',
    'jquery',
    'ko',
    'sidebar'
], function (Component, customerData, $, ko) {

    function checkAttr() {

    }

    return Component.extend({

        });

});


texts:
I want to sort product search result by in stock and then show out of stock products. Currently my search result is mixing in stock & out of stock items.
Please help to fix it.


texts: Remove quantity box for specific product

texts:
I installed Magento 1.9.2.1 and I need to delete the box quantity only on some products.

I was thinking, for example, when max quantity is set to 1, instead of for other products leave the box.

Thank you, do you have any suggestions?

File addtocart.phtml

<?php $_product = $this->getProduct(); ?>
<?php $buttonTitle = $this->__('Add to Cart'); ?>
<?php if($_product->isSaleable()): ?>

        <?php if(!$_product->isGrouped()): ?>
        <?php echo $this->__('Qty:') ?>
        <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getProductDefaultQty() * 1 ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Qty')) ?>" class="input-text qty" />
        <?php endif; ?>
        <button type="button" title="<?php echo $buttonTitle ?>" id="product-addtocart-button" class="button btn-cart" onclick="productAddToCartForm.submit(this)"><?php echo $buttonTitle ?></button>
        <?php echo $this->getChildHtml('', true, true) ?>

    <?php echo Mage::helper('core/nbproductdesign')->showButtonDesign(); ?>
<?php endif; ?>


texts: Magento : Edit Head Tag of Specific Page

texts:
I'm trying to setup an Analytics A/B test on my Magento, on 2 landing pages (not homepage).

The problem is that, if I place Google Analytics Content Experiment code on every page of store, it re-directs automatically to one of landing pages no matter what.

If I'm not wrong, I must place code only on these 2 landing pages, but I don't have any idea on how to do this.

Anyone can kindly give me a hand?
Thanks!


texts:
I tried to install "Delhivery_Lastmile-0.3.0 rar extension" through magento connect manager

but i got following error :

CONNECT ERROR: The 'community' channel is not installed.

Please use the MAGE shell script to install the 'community' channel.

I am not familiar with ssh, is there any solution for this without using ssh commands.

please help me to find solution.

thanks in advance.


texts: Use link to CMS page that will not break when title of CMS page is changed

texts:
I am struggling with the following Magento:
1. I have created a link in the content of a CMS block. Let's call this block-A.html
2. The link refers to another CMS block or page, say block-B.html
3. When changing the title of the block B into block X, the link in block A breaks.

Is there a way to avoid that link to break?


texts: How to Create Magento Dataflow advanced profiles during extension installation in Magento 1.9.x?

texts: Can anyone please tell me How to Create New Magento Dataflow advanced profiles during extension installation in Magento 1.9.x?


texts: How can i move the category Description text from the wrong place to the right place. See my illustration for more information.


texts: Serialization failure: 1213 Deadlock found when trying to get lock


texts: change message in payment section when using paypal

texts:
Is there a way to add messaging into a paypal checkout?
Many customers abandon their basket at payment because they think they require a paypal account. The option to pay by card is available only at the end of the checkout which is confusing for some.

Thanks!