texts: Import categories in magento through script

texts:
Hello I have just started to learn magento. Now I was trying to import category in magento through script.

my magento code looks like

<?php
    require_once 'businessclasses.php';
    define('MAGENTO', realpath(dirname(__FILE__)));
    require_once MAGENTO . '/app/Mage.php';
    umask(0);
    $count = 0;

    echo "<pre>";
    $data= new getCSV();
    $rows=$data->getRootCategories(); // Gets the list of root categories.

    foreach($rows as $row) {
        echo $categoryName = $row['us']; // Name of Category

        // Create category object
        $category = Mage::getModel('catalog/category');
        $category->setStoreId(1); // 'US-Store' store is assigned to this category

        $rootCategory['name'] = $categoryName;
        $rootCategory['path'] = "1/23/25"; // this is the catgeory path
        $rootCategory['display_mode'] = "PRODUCTS";
        $rootCategory['is_active'] = 1;
        $rootCategory['is_anchor'] = 1;
        $rootCategory['thumbnail'] = $row['catimg'].'.jpg';
        $category->addData($rootCategory);

        try {
            $category->save();
            echo $rootCategoryId = $category->getId();
        }
        catch (Exception $e){
            echo $e->getMessage();
        }
    }
?>

Now the category is importing successfully but image is not setting up there. It is not displaying category image there.

Can anyone help? Thank you in advance.


texts: Hi there is it possible to add a custom attribute to the smart category attribute list when creating a rule?


texts:
I downloaded magento2 latest version from https://www.mageplaza.com/download-magento/#download.

I pasted the unzipped folder to the htdocs of /Applications/MAMP/
When I started the mamp servers and opened magento in the browser, nothing is displayed.

I also tried running these commands

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
find var pub/static pub/media app/etc -type f -exec chmod g+w {} \;
find var pub/static pub/media app/etc -type d -exec chmod g+ws {} \;
chmod u+x bin/magento

I am using mac high sierra

does anyone have an idea about this?


texts:
I followed the instructions and tried to install the sample data but the frontend looks something like this

I'm new to magento and don't know what to do


texts: magento2: Add my cms static block to the right column in product view

texts:
I'm trying to put my own static cms block to the column of the right in the product view (to all products).

I create the CMS block identifier="first_block"

here is the my code to:

app/design/frontend/{Package}/{theme}/Magento_Catalog/layout/catalog_product_view.xml

<?xml version="1.0"?>
<page layout="2columns-right" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="sidebar.additional">
            <block class="Magento\Cms\Block\Block" name="first.block">
                <arguments>
                    <argument name="first_block" xsi:type="string">bla</argument>
                </arguments>
            </block>
        </referenceContainer>
    </body>
</page>

i can't see the new block.


texts: Add Fee or Discount to Order Totals - Problem with Order Confirmation Email

texts:
I am finding difficulty in getting discount to order confirmation email template . I am working on enterprise version 1.12.0.2 . Discount label and price is not displaying in order confirmation email template though the grand total is correct. While the same code is working correctly if I put it in the Magento community version, its displaying both label and price. Please suggest me the what can be the error .

After Debugging

i found that sale_email_order_item observer is not calling

  To be more clear

Code is working correctly displaying the discount label and price in order , invoice but only not displaying in order confirmation email template


texts: Composer update dependencies Magento 2.3

texts: Is it okay to update the dependencies of a magento store using command composer update? The store is functional and running on magento 2.3 at the moment.


texts: How to import 20.000 coupon codes in Magento 2 without paid

texts:
I want to import 20.000 coupon codes on my website, and for this reason, I created the following script:

<?php
use Magento\Framework\App\Bootstrap;

/**
 * If your external file is in root folder
 */
require __DIR__ . '/app/bootstrap.php';

// Import CSV from ViArt format:
$handle = fopen('coupons.csv', 'r');
$cols   = array_flip(fgetcsv($handle));

while($data = fgetcsv($handle))
{

    if($data[$cols['is_active']] == 1)
    {
        echo 'Importing coupon with code: '.$data[$cols['coupon_code']].'
';
        createCoupon(
            $data[$cols['coupon_code']],
            $data[$cols['description']],
            'by_fixed',
            $data[$cols['discount_amount']]
        );
    } else {
        echo 'Not imported (not active): '.$data[$cols['coupon_code']].'
';
    }
}

/**
* CREATE COUPONS
*/
function createCoupon($code, $description, $type, $amount, $options = array())
{

$params = $_SERVER;
$bootstrap = Bootstrap::create(BP, $params);
$obj = $bootstrap->getObjectManager();
$state = $obj->get('Magento\Framework\App\State');
//$state->setAreaCode('frontend');
$state->setAreaCode('adminhtml');

$coupon['name'] = '10% Footers';
$coupon['desc'] = 'Discount for vip signup coupon.';
$coupon['start'] = date('Y-m-d');
$coupon['end'] = '';
$coupon['max_redemptions'] = 1000;
$coupon['discount_type'] ='by_percent';
$coupon['discount_amount'] = 15;
$coupon['flag_is_free_shipping'] = 'no';
$coupon['redemptions'] = 1;
$coupon['code'] ='NL01-1234'; //this code will normally be autogenetated but i am hard coding for testing purposes

$shoppingCartPriceRule = $obj->create('Magento\SalesRule\Model\Rule');
$shoppingCartPriceRule->setName($coupon['name'])
        ->setDescription($description)
        ->setFromDate($coupon['start'])
        ->setToDate($coupon['end'])
        ->setUsesPerCustomer($coupon['max_redemptions'])
        ->setCustomerGroupIds(array('0','1','2','3',))
        ->setIsActive(1)
        ->setSimpleAction($coupon['discount_type'])
        ->setDiscountAmount($amount)
        ->setDiscountQty(1)
        ->setApplyToShipping($coupon['flag_is_free_shipping'])
        ->setTimesUsed($coupon['redemptions'])
        ->setWebsiteIds(array('1'))
        ->setCouponType(2)
        ->setCouponCode($code)
        ->setUsesPerCoupon(NULL);
$shoppingCartPriceRule->save();
}

?>

At first, the script only imported 100 coupons, but I saw error_log and discovered that the problem was memory_limit of php.ini. I incremented this memory limit and the script can import 170 coupons now.

How can i do to import the 20.000 coupons?

Thank you very much!


texts: Credit memo only working some of the time

texts:
I have issues with executing the credit memo functionality in Magento. Sometimes it works and sometimes it doesn't.

So far I have been able to narrow it down to a call to this function

   $order->setBaseTotalRefunded($baseOrderRefund);

This can be found in app/code/core/Mage/Sales/Model/Order/Creditmemo.php inside a function called public function refund().

I am sure it is failing here because if I comment it out the credit memo will work. Also, in cases where the credit memo won't work, if I replace $baseOrderRefund with a hardcoded figure such as 20 for example it seems to work.

I am trying to find where this function is defined and find out exactly where the process is failing but I have been unable to find this function in the code. Can anyone point me the correct direction


texts:
I get 404 not found when display the product in different store view and when pressing back it gives the product display page.

It happens with products in 3rd level sub category, despite working fine in 1st and 2nd level categories.

Steps to reproduce in our store:

  1- Navigate to 3rd level category page

  2- Click on any product to view its page.

  3- Switch the store view to see the product in other store view
  "عربى/English" you will get 404 Not found.

  4- Click the browser back button you will see the product display page
  of the store view.

Do the same for any 1st or 2nd level catogry it works fine without 404 errors

What is the reason for that issue in order to fix or where to find in logs, I checked debug, error, system logs files and didn't find any thing related.

Thanks in advance


texts: How to properly display price for downloadable product

texts:
There are a quite a lot of classes responsible for displaying prices, as well as tutorials about it.

How to display just simple price for downloadable product in custom block/template? Is there any preferable way? I think it would be nice to include some models if needed for DI of my block.


texts: Magento2: Default layout changed, Admin and front end

texts:
I am new to Magento. I am building a new eCommerce website for our company, which sells thousand of products. I have installed Magento2.1.12 via xampp yesterday and started configuring the site. After setting up Stores - Configuration - Web; Unsecure and secure links, the Magento admin panel and front end layouts have completely changed. It looks as if CSS is not working i.e. no styling both in admin panel and front end. Does anyone know what have I done wrong and how to retrieve the default settings back?

Here are the screenshots for Admin panel and folder structure.

Your help would be appreciated!
TIA!


texts:
I'm working with a set of Less CSS files I didn't write in Magento 2.  During compilation, I get the following error

Compilation from source:
frontend/Infortis/base/en_US/css/custom.less

Compilation from source:
frontend/Infortis/base/en_US/css/custom.less>
#0 /path/to/magento/framework/View/Asset/PreProcessor/AlternativeSource.php(155): Magento\Framework\Css\PreProcessor\Adapter\Less\Processor->processContent(Object(Magento\Framework\View\Asset\File))

I know I can start debugging from line 155 in AlternativeSource.php -- but does anyone know what this cryptic error means?


texts: Current Password and new password validation in account page

texts: In account page how to validate that the current password and new password are not the same?


texts: Add customer session object and use in templates

texts:
I want to omit all object manger-like methods.

Is there any smart way to add customer session object (for example check logged/non-logged user to display different content) into template? Of course it can be done via DI in each block we need but it needs a lot of overriding which is not a good solution.

Maybe it can be done by injecting it in di.xml as argument to desired blocks?

Or just adding it to context block somehow?


texts: How to make city as Dropdown in checkout pages

texts:
I want to make city as dropdown in checkout page in magento 2.

I also used below module
https://github.com/EaDesgin/Magento2-City-Dropdown

But this one only working for Romania not for other country.

If someone can help in This

Advanced Thanks


texts: API call on */V1/products/:SKU return wrong values for yes/no fields

texts:
I have a strange Problem

Magento version : 2.1.6
PHP: PHP 7.0.15-0ubuntu0.16.04.4 (cli) ( NTS )

If I send a REST call to mydomain/index.php/rest/de/V1/products/:SKU I get a result which looks fine for the first moment.

The problem is - I have a product attribute "lifetime_warrenty" and the Catalog Input Type for Store Owner is Yes/No.

The problem is - the result on the API REST call ist always: (also for products with YES)

{
      "attribute_code": "lifetime_warranty",
      "value": "0"
},

And hints? Any workaround you have?


texts:
i'm using memcache and redis.  is it possible to clear only a certain page or group of pages using these?  Howso?  For example i'd like to be able to only clear the homepage instead of the entire FPC.

Thanks.


texts: Magento : Homepage Products Block Add to Cart Leads to Empty Shopping Cart

texts:
I have three custom module for best selling, new product and special product.
When I click on add to cart button of these products, it will leads to empty cart page and showing message cart is empty. While in whole site add to cart working fine.

When I disable cache, I am able to add to cart from here. For this I have increased cookie lifetime, gave 777 permission to session folder but nothing helped me.


texts: How we can remove all the related products with SKU programmatically Magento 2?

texts:
We are trying to update the related products with the default CSV import of Magento but instead of specifying the Empty attribute value constant, it is not removing the existing related products and if we add new SKUs for related products in CSV file, it appends with the existing related products. We need need to remove all the related products or want to have some option to update the related products with the new SKUs and remove the old ones. Is there any method or class that I can use for this?
I'm using Magento 2.3.3 CE.


texts:
I have to install this JS script into my theme (paygo) in the bottom so I think it is the footer. I don't know where to start can someone tell me what to do.

<!-- BEGIN: BBB AB Seal -->
<script type="text/javascript">
    var bbb = bbb || [];
    bbb.push(["bbbid", "boston"]);
    bbb.push(["bid", "197111"]);
    bbb.push(["chk", "94177EEAEA"]);
    bbb.push(["pos", "bottom-right"]);
    (function () {
        var scheme = (("https:" == document.location.protocol) ? "https://" : "http://");
        var bbb = document.createElement("script");
        bbb.type = "text/javascript";
        bbb.async = true;
        bbb.src = scheme + "seal-boston.bbb.org/badge/badge.min.js";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(bbb, s);
    })();
</script>
<!-- END: BBB AB Seal -->


texts: css is not loading in multi STORE VIEW magento 2

texts: I've set up multi-store view with multi language, but I'm facing a weird issue that is default store view is running perfectly but another store view is not able to load CSS.


texts:
I need connect odoo with magento 2.2, and I get some result but I got and 401 error when I try to call one service with my generated token.
So far:

from suds.client import Client
url="https://myserver.com/soap/default?wsdl&services=integrationAdminTokenServiceV1"
client = Client(url)
result = client.service.integrationAdminTokenServiceV1CreateAdminAccessToken('user', 'pass')

That result store a token to do the authentication, like http://devdocs.magento.com/guides/v2.2/get-started/soap/soap-web-api-calls.html, but, when I try

msg = str('Bearer '+result)
header = {'Authorization': msg}
target_url = "https://myserver.com/soap?wsdl&services=customerCustomerRepositoryV1"
client = Client(target_url, headers=header)

I got Transport Error:

  HTTP Error 401: Unauthorized.

Any suggestions?


texts: How can add static Block as a category cms block

texts:
I need to display extension static block as a category cms block.

Its working as a Extensions.

But not working as a category cms block static


texts: Adding new pages to renderRoutes -- venia-concept

texts:
I'm trying to create new pages and use them in the production build.
i added my page component  to the renderRoutes file like this :

import React from 'react';
import { Switch, Route } from 'react-router-dom';
import { Page } from '@magento/peregrine';
import ErrorView from 'src/components/ErrorView/index';

import RoutesTypes from './authentication';
// components
import MyPage from 'src/components/MyPage';

const { PrivateRoute, GuestRoute } = RoutesTypes;
const renderRoutingError = props => <ErrorView {...props} />;

const renderRoutes = () => (
    <Switch>
        <Route
            exact
            name="profile"
            staticName={true}
            path="/account/profile.html"
            component={MyPage}
        />
        <Route render={() => <Page>{renderRoutingError}</Page>} />
    </Switch>
);

export default renderRoutes;

and going to /account/profile.html does fully work as intended, but while the page is loading, this shows up :

Is there a way to remove that not found in the title and body while the page is loading?


texts: Disable cache for particular custom block called in layout xml

texts:
I want to disable cache only for particular block which is called in some pages like Home Page, Category Listing page , Product page and Shopping cart page etc.

<block class="Namespace\Module\Block\Custom" name="custom.storetime" template="Namespace_Module::storetime.phtml"/>

and I do not want to use cacheable=false as its disable the cache for entire page.


texts: Get specific product descriptions from all stores

texts:
I need to get all product descriptions(and maybe some other attributes).
For example, for product with id 2:

Store id 1: "First store description"
Store id 2: "Second store description"
Store id 3: "Third store description"

Is there some different way than getting all store id's and then in a loop for each one store id load product with id 2 and getting it's own description?


texts: Magento2 - including THREE.js in custom module

texts:
I'm using a 3D model object in my Magento (2.4.0) site for which I need to use three.js lib along with GLTFLoader and OrbitControls. GLTFLoader and OrbitControls are THREE.js dependents. I kept the mentioned libs on below location.
app/code/VENDOR/MODULE/view/frontend/web/js/

Then I created requirejs-config.js file on below location
app/code/VENDOR/MODULE/view/frontend/

Here is the code for it
var config = {
    paths: {
       threejs: 'Vendor_Module/web/js/threejs.min',
       gltfloader: 'Vendor_Module/web/js/GLTFLoader',
       OrbitControls: 'Vendor_Module/web/js/OrbitControls',
    },
    shim: {
       threejs: {
           deps: ['jquery']
       },
       gltfloader: {
           deps: ['threejs']
       },
       OrbitControls: {
           deps: ['threejs']
       }
    }
};

On my phtml file I do it like
require(['jquery','threejs','gltfloader','OrbitControls'],function($,THREE,GLTFLoader,OrbitControls){
     var loader = new THREE.GLTFLoader();
});

And I get these errors
Uncaught ReferenceError: THREE is not defined
at GLTFLoader.js:9

Any help would be appreciated.


texts: Replace "Add to Cart" button with an "Enquire" button linking to the "Contact Us" page

texts:
In both product listings (e.g. the category page) and the product view page, I need to replace the button "Add to Cart" with an "enquire" button which links to the "Contact Us" page.

Please help me to find a solution.


texts: magento2, REST API how correctly return data

texts:
i have this code
$remainingData = $this->remainingAmount($result['from'], $result['to'], $p);
            $data = $collection->getData();

            if (!empty($data)) {
                $this->helper->saveLogData(self::LOG_DATA_SENT);
                return [$remainingData];
            } else {
                $this->helper->saveLogData(self::LOG_EMPTY);
                throw new Exception(
                    __("Could not find data for your request"),
                    200,
                    Exception::HTTP_NOT_FOUND
                );
            }

on POSTMAN answer was
[
    {
        "remainingData": 0,
        "count": 2,
        "limit": 5000,
        "offset": 22
    }
]

how can i create response in this format
[
   "data": {
        "remainingData": 0,
        "count": 2,
        "limit": 5000,
        "offset": 22
    }
]

My interface class
<?php
namespace Lovat\Api\Api;

interface OrdersRepositoryInterface
{
    /**
     * @param string $from
     * @param string $to
     * @param int $p
     * @return mixed
     */
    public function get(string $from, string $to, int $p = 1);
}

return ['data' => $remainingData] it's not working for me!


texts: Magento 2: Calling a cms block in default xml

texts:
I am trying to call a static block in the footer block but it does not work.

I created a theme and then created a default xml:

  \app\design\frontend\MyTheme\Theme-frontend-default\Magento_Theme\layout\default.xml

i then removed the default footer links:

<referenceBlock name="footer_links" remove="true"/>

i then added the code to the block:

<referenceContainer name="footer">
            <block class="Magento\Cms\Block\Block" name="footer_navigation">
                <arguments>
                    <argument name="footerNavigation" xsi:type="string">footer_navigation</argument>
                </arguments>
            </block>
  </referenceContainer>

I had earlier created the block programmatically using an InstallData.php :

$cmsBlock = $this->blockInterfaceFactory->create();
        $cmsBlock->setIdentifier('footer_navigation')
            ->setTitle(self::Footer_Navigation)
            ->setContent('{{block class="Topclick\CmsPages\Block\Cmspages" template="Topclick_CmsPages::blockTemplates\footerNavigation.phtml"}}')
            ->setData('stores', [0]);
        $this->blockRepository->save($cmsBlock);

so. i am unclear why its not working. i did however test the block and it does indeed render on normal pages using this:

echo $this->getLayout()
          ->createBlock('Magento\Cms\Block\Block')
          ->setBlockId('footer_navigation')
          ->toHtml();

Why my xml doesn't work ?


texts: Remove Magento 2 spam customer accounts quickly in database

texts:
I have thousands of spam accounts in the customer database. Is there a way to quickly remove these?

I cannot do it quickly in admin panel, as it will crash the site if I try to delete them all at once. If I only delete 200 at a time it will take a very long time.

Is there a query I can run in SQL/PhpMyAdmin? All the spam accounts have the qq.com email address.


texts: website layout issue(Horizontal scroll bar at the end)

texts: My previous theme was working fine but since I changed my theme few days ago I am getting a scroll bar at the end of every page. Can someone tell me , from where I can fix this and adjust the width of the page? I am attaching a screenshot also


texts: How to scope class overwrite to affect only within module?

texts:
When I overwrite a Model/Controller/Helper overwrite through <rewrite/> in my module, how can I do it such that the overriding of the classes is scoped within my module and those that declares <depends/> on my module?

So let's say I have moduleA, moduleB and moduleC.

I did a rewrite of Mage_Core_Catalog_Product and called it My_Test_Catalog_Product in moduleA.

moduleB <depends/> on moduleB in its module config file. So, I would like only moduleA and moduleB to have that rewrite effect. In other words, only moduleA and moduleB will read from My_Test_Catalog_Product while moduleC will remain status quo (reading from Mage_Core_Catalog_Product).

Currently, it seems like the effect of overwriting a core Model or Controller from my module is global in Magento.


texts: Magento2: Label alignment in Dashboard Chart

texts: I want y-axis value on-line .how can I do this


texts: How to remove jobs that have been added to the magento cron tasks by an extension that has been removed

texts:
I keep getting an error repeating in my system.log telling me the following:

ERR (3): Warning: include(): Failed opening 'Mage/Bronto/Common/Model/Observer.php' for inclusion (include_path='/var/www/html/app/code/local:/var/www/html/app/code/community:/var/www/html/app/code/core:/var/www/html/lib:.:/usr/share/pear:/usr/share/php')  in /var/www/html/lib/Varien/Autoload.php on line 94

This was an extension used by Bronto email marketing software that we no longer use. I disabled the extension originally and then carefully went through and removed every file that I can see the extension installed (I went through comparing folder by folder to the install files).

However, something seems to still be called and I can't figure out how to track this back and remove it. Can anyone help?

EDIT:

Looking at aoescheduler I can see several bronto% tasks scheduled. I have tried the following in mysql:

DELETE from cron_schedule WHERE job_code LIKE '%bront%';

However, this doesn't seem to totally remove the task or stop it (they stay in aoescheduler). I have disabled them from there but I want to understand how to completely remove these.


texts: Unable to display color as swatches in listing page and image as swatches in product detail page in magento2.3

texts:
As per requirement, I need to display color as swatches in product listing page while in product detail page it should be displayed as image.

Let me know how to display color instead of image.


texts: Extending Mage ImportExport te make it simpler

texts:
I'm relatively new to Magento development and I was wondering if I could extend the Mage extension ImportExport Export block to make it simpler.

I want the user only to select the attribute-set as a filter and nothing more. Only the attributes of the selected attribute-set should be included in the export CSV.

I've been looking to override Mage_ImportExport_Model_Export_Entity_Product->export but that would only be for the filtering it self.

I suspect I should override Mage_ImportExport_Block_Adminhtml_Export_Edit_Form->_prepareForm to hide the entity field and add the attribute-set select field?

Can anyone give me a push in the right direction?


texts: What are the steps should I follow if my custom module gets a 404 not found error?

texts:
I have created a custom module which will save some data in the database and will show in the front end.
But when I see in the front end it gets me a 404 not found error.
I think the error is in the config xml file .
could anyone suggest what are the steps to follow if I get this type of issue ?
This is my config file..

<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
    <Magentostudy_News>
        <version>1.0.0.0.1</version>
    </Magentostudy_News>
</modules>
<global>
    <models>
        <magentostudy_news>
            <class>Magentostudy_News_Model</class>
            <resourceModel>news_resource</resourceModel>
        </magentostudy_news>
        <news_resource>
            <class>Magentostudy_News_Model_Resource</class>
            <entities>
                <news>

magentostudy_news

                </news>
            </entities>
        </news_resource>
    </models>
    <helpers>
        <magentostudy_news>
            <class>Magentostudy_News_Helper</class>
        </magentostudy_news>
    </helpers>
    <blocks>
        <magentostudy_news>
            <class>Magentostudy_News_Block</class>
        </magentostudy_news>
    </blocks>
    <resources>
        <magentostudy_news_setup>
            <setup>
                <module>Magentostudy_News</module>
                <class>Mage_Core_Model_Resource_Setup</class>
            </setup>
        </magentostudy_news_setup>
    </resources>
    <events>
        <before_news_item_diplay>
            <observers>
                <magentostudy_news>
                    <class>Magentostudy_News/observer</class>
                    <method>beforeNewsDisplayed</method>
                </magentostudy_news>
            </observers>
        </before_news_item_diplay>
    </events>
</global>
<frontend>
    <routers>
        <magentostudy_news>
            <use>standard</use>
            <args>
                <modules>Magentostudy_News</modules>
                <frontName>news</frontName>
            </args>
        </magentostudy_news>
    </routers>
    <layout>
        <updates>
            <magentostudy_news>
                <file>magentostudy_news.xml</file>
            </magentostudy_news>
        </updates>
    </layout>
</frontend>
<Admin>
    <routers>
        <adminhtml>
            <args>
                <modules>
                    <Magentostudy_News before="Mage_adminhtml">Magentostudy_News_adminhtml</Magentostudy_News>
                </modules>
            </args>
        </adminhtml>
    </routers>
</Admin>
<adminhtml>
    <layout>
        <updates>
            <magentostudy_news>
                <file>magentostudy_news.xml</file>
            </magentostudy_news>
        </updates>
    </layout>
</adminhtml>
<default>
    <news>
        <view>
            <enabled>1</enabled>
            <items_per_page>20</items_per_page>
            <days_difference>3</days_difference>
        </view>
    </news>
</default>

Thank you.


texts:
I am trying to build a size attribute picker similar to the one on the Laura Ashley website: http://www.lauraashley.com/uk/invt/alexanderbl

Does any one have any information or ideas that I can use as a starting point for creating this? Are there any existing extensions or will this be a custom job - if so what would be the best practice for configuring this? A configurable product & custom attribute set?

Thanks for any help in advance


texts: Import categories programatically in magento 2

texts: I have 250+ categories and sub categories with me. I want to import it in my magento 2. It is not possible to manually add it. Can anyone help me with some scripts or code to import categories from csv.  Please dont reccomend any extension unless it is free.


texts: "Notice: Trying to get property of non-object" from cron

texts:
Suddenly I'm starting to get these log warnings every minute:

2016-01-14T15:03:39+00:00 ERR (3): Notice: Trying to get property of non-object  in C:\Bitnami\magento-1.9.2.2-1-3\apps\magento\htdocs\app\code\core\Mage\Cron\Model\Observer.php on line 67

I looked at the code and it comes from here:

/** @var $schedule Mage_Cron_Model_Schedule */
        foreach ($schedules->getIterator() as $schedule) {
            $jobConfig = $jobsRoot->{$schedule->getJobCode()};
            if (!$jobConfig || !$jobConfig->run) {
                $jobConfig = $defaultJobsRoot->{$schedule->getJobCode()}; // <-- here!!!!!
                if (!$jobConfig || !$jobConfig->run) {
                    continue;
                }
            }
            $this->_processJob($schedule, $jobConfig);
        }

I have an extension with some cronjobs but I removed it completely and it still happens.

I don't know why it started all of the sudden, or why this happens. I can't seem to be able to get rid of it and stacktrace don't do any good either because its something internal of Magento.

Edit: reset entire server and still no good. :/

How do I deal with this??

Thanks!


texts: Display data from multiple database tables to frontend

texts:
How to get data from 2 database tables and show them in the custom frontend page? I have been looking for the tutorials, so far what i get is creating SQL Left Join in the Collection.php (even though i do not know whether this is working or not)

<?php
namespace Namespace\Modulename\Model\Resource\Modulename;

use Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection;

class Collection extends AbstractCollection
{
    /**
     * Define model & resource model
     */
    const YOUR_TABLE = 'tablename';

    public function __construct(
        \Magento\Framework\Data\Collection\EntityFactoryInterface $entityFactory,
        \Psr\Log\LoggerInterface $logger,
        \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
        \Magento\Framework\Event\ManagerInterface $eventManager,
        \Magento\Store\Model\StoreManagerInterface $storeManager,
        \Magento\Framework\DB\Adapter\AdapterInterface $connection = null,
        \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource = null
    ) {
        $this->_init(
            'Namespace\Modulename\Model\Modulename',
            'Namespace\Modulename\Model\Resource\Modulename'
        );
        parent::__construct(
            $entityFactory, $logger, $fetchStrategy, $eventManager, $connection,
            $resource
        );
        $this->storeManager = $storeManager;
    }
    protected function _initSelect()
    {
        parent::_initSelect();

        $this->getSelect()->joinLeft(
                ['secondTable' => $this->getTable('tablename')],
                'main_table.columnname = secondTable.columnname',
                ['columnname1','columnname2','columnname3']
            );
    }
}
?>


texts: Backlash in email, still Magento validate-email don't respond

texts:
/js/prototype/validation.js

["validate-email","Please enter a valid email address. For example johndoe@domain.com.",function(e){return Validation.get("IsEmpty").test(e)||/^([a-z0-9,!\#\$%&'\*\+\/=\?\^_`\{\|\}~-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z0-9,!\#\$%&'\*\+\/=\?\^_`\{\|\}~-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*@([a-z0-9-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z0-9-]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*\.(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]){2,})$/i.test(e)}]

The type of email in which backlash is there e.g. john/smith@domain.com, john#smith#@domain.com or john*smoth@domain.com are not showing error for validation of emails.

What I can do to fix?


texts:
In Magento When i click Ship, the order status should be processing.
When i click invoice the status should be payment pending.
How do i do that? Please help me out


texts: How to Create Customer Group and Product Attribute with Script / Programmatic of type drop down and having values as customer name?

texts:
I want to create attribute through script of drop down type. in Drop down i want to display Customer Name of particular group.
and also want to create customer group with script how its possible?

Thank you so much..


texts:
I am facing issue with new order emails. Magento send new order emails two times for every order.

I am not getting what is issue there.


texts:
I noticed that the "updated" column for indexers only changes, when I run the indexers manually from the command line. It seems like everything is up to date (i.e. I see changes reflected in the frontend)

They are set to "update on save". When I change the mode to "update by schedule", the date changes as expected.

What could be the reason? Is this the normal behavior in Magento 2.1?


texts:
I need to add comment to cart page using observer . I need to know better way. Is it better to add custom option. i have tried using following code but no success

$option = array(
'is_delete' => 0,
'is_require' => false,
'previous_group' => 'text',
'title' => 'Shipping Description',
'type' => 'field',
'price_type' => 'fixed',
'price' => '0.0000'
);
 $options->addOption($option);
$options->saveOptions();

I am using checkout_cart_product_add_after observer . comment is only for display purpose so it is custom option is better or any other option


texts: How to override `Shipping method` in `Edit Order` area?

texts:
I am trying to override the shipping method in the Edit order area of the admin side.

What I have done is, added new file

My/Module/Block/Adminhtml/Sales/Order/Create/Shipping/Method/Form/Form.php in my custom module. It has code,

<?php
class My_Module_Block_Adminhtml_Sales_Order_Create_Shipping_Method_Form extends Mage_Adminhtml_Block_Sales_Order_Create_Shipping_Method_Form
{
    protected function _toHtml(){
        $this->setTemplate('module/form.phtml');
        return parent::_toHtml();
    }
}
?>

and in my config.xml ,

<blocks>
        <adminhtml>
            <rewrite><sales_order_create_shipping_method_form>My_Module_Block_Adminhtml_Sales_Order_Create_Shipping_Method_Form</sales_order_create_shipping_method_form>
            </rewrite>
        </adminhtml>
     </blocks>

in frontend/adminhtml/default/default/template/module/form.phtml

I wrote

<?php echo "Hello world"; ?>

I think this is enough to override the sales_order_create_shipping_method_form. But Unfortunately, nothing happens!! Please let me know If i missed something.


texts: Redirect custom contract forms to the original form page

texts:
I have a custom contact-us form that is a CMS pages.
After submitting the contact form I want to redirect back to the CMS page with the custom contact form.

I need to edit the controller (app/code/core/Mage/Contacts/controllers/IndexController.php) and change the $this->_redirect('*/*/'); lines.

And I also found out that I need to edit the contact form .phtml file (app/design/frontend/theme/theme/contacts/form.phtml) with:

<div id="messages_product_view">
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
</div>

To

<?php Mage::app()->getLayout()->getMessagesBlock()->setMessages(Mage::getSingleton('customer/session')->getMessages(true)); ?>

But I do not want to edit the core file. So I want to override the default contact controller.
Therefore I found this URL.

But I do not know where I need to create the config.xml and what code I what code I need inside my custom IndexController.php file to achieve what I want.

What do I exactly need to do, to achieve this?


texts: How does the CMS page admin form data provider gets its data?

texts:
Long story short:
The CMS page admin form data provider class Magento\Cms\Model\Page\DataProvider, more specific the method getData always returns an array with a single element that contains the data for the page that I'm editing and the element key is the page id.
How does this happen? Where is the filter by page id applied?
Short story long:
At a first glance, what the method Magento\Cms\Model\Page\DataProvider::getData returns is not that obvious.
In the method there is this line
$items = $this->collection->getItems();

and the collection member var is initialized in __construct with
$this->collection = $pageCollectionFactory->create();`

Where $pageCollectionFactory is an instance of Magento\Cms\Model\ResourceModel\Page\CollectionFactory.
So, when I first looked, I thought "why the hell is it loading the full collection since I am editing only one item? This doesn't scale.".
Upon a closer inspection, I saw that the collection returns one single item. The one I am editing. This is good, but how does it work?
If I print the collection query echo $this->collection->getSelect() I get back
SELECT `main_table`.* FROM `cms_page` AS `main_table` WHERE (`main_table`.`page_id` = '2')

where 2 is the id of the page that I am editing.
Now the curious part (if this was not curious enough) If I create my own entity, following the same guidelines for the data provider class, it works the same. I get back one single item.
This makes me think the filtering happens somewhere higher in the inheritance tree, but I have no idea where?
Note: Please don't explain how to make this work on my custom module. I know how to do that. I just need an explanation on how/why/where the magic happens.


texts: Name variables convention with underscore or not

texts:
I find that some protected variables in the Magento core come with an underscore prefix and some don't.

Also some parameters in di.xml do not have an underscore

<type name="Magento\Catalog\Helper\Product">
<arguments>
    .....
    <argument name="productRepository" xsi:type="object">Magento\Catalog\Api\ProductRepositoryInterface\Proxy</argument>
</arguments>
</type>

This protected var $productRepository does not have an underscore. Is there any reason for this ?


texts: How I can add tooltip text for SKU product form in magento 2 admin panel

texts: Can anybody please tell me how I can add tooltip text for SKU in magento 2.2.5 admin panel product add/edit form.


texts: Changes or improvements in Magento 2.2.2

texts:
Magento will introduce Magento version 2.2.2. So what will be changes and improvements in Magento 2.2.2?

I tried to search on google for version Magento 2.2.2 but didn't find anything about magento2.2.2.


texts: Magento 1.9 customer account navigation missing from left column

texts:
My issue is when i login to my live magento website the account navigation sidebar is missing from the left column of the my Account page, however when i login the same website in my local system(using XAMPP) the sidebar is showing there and its working fine.

i already tried this

<layout version="1.0">
<default><remove name="left"/></default>

i have removed this

<remove name="left"/>

but its not working please help.


texts: Add offer product programmatically in magento

texts:
I added product with 0 price as a offer product in observer. My code is

 public function addOfferProduct($observer)
     {
        $item = $observer->getQuoteItem();
        $items = Mage::app()->getFrontController()->getRequest()->getParams();
        if($items['offer'])
        {
           try
           {
               $product = Mage::getModel('catalog/product')->load($items['offer']);
               $quote = Mage::getSingleton('checkout/session')->getQuote();
               $quoteItem = $quote->addProduct($product, $qty);
               $quoteItem->setCustomPrice(0);
               // we need this since Magento 1.4
               $quoteItem->setOriginalCustomPrice(0);
               $quote->collectTotals()->save();
           }
           catch(Exception $e)
           {
               //echo $e->getMessage();;
           }

       }
    }

In Cart page the added product looks like separate product with 0 Price. I want to add that product as a offer product like bundle product style.


texts: Page Layouts : 1 column , 2 columns-left , 2 columns-right , 3 column

texts:
I am having a doubt.

What is mean by 1 column, 2 columns-left, 2 columns-right and 3 columns ?
What is the use ?
How we can identify this page is 1 column , or 2 columns-left or 2 columns-right or 3 columns ?
Can anyone please explain in brief ?

Thanks in advance.


texts: Magento 1.9.x Product View > Show Last Order Date

texts:
I'd like to show the "date of the last order" on the view.phtml product page.

So far I've discovered "getCreatedAtStoreDate" from "design/template/sales/order/history.phtml.

But when I include these lines in view.phtml it results in the following error:
Call to a member function getCreatedAtStoreDate() on null in /.../view.phtml

Is there any simple way to show the date of the last purchase?
Maybe someone had this issue before.
Thanks


texts: Cm_Cache_Backend_Redis - Suspected config cache invalidation

texts:
I have a cluster with 8 webserver nodes and a redis cache instance running on a separate server.

During high load, the throughput on the redis server goes through the roof, approximately 35-40 MB/s (megabytes). I inspected the redis commands with MONITOR on the redis instance and I discovered that there were a disproportionate amount of EVALSHA calls against the redis cache with the config tags.

This means, the web servers were sending data to the redis cache at a pace of 14 MB/s.

If I disable the config cache in the backend, the received bytes counter on the redis server came all the way down to 1 MB/s, which is reasonable.

I suspect that the config cache is getting invalidated somehow.

Have any of you seen anything like this before?

These are my config settings:

<cache>
  <backend>Cm_Cache_Backend_Redis</backend>
  <backend_options>
    <server>10.254.253.1</server> <!-- or absolute path to unix socket -->
    <port>6380</port>
    <persistent></persistent> <!-- Specify unique string to enable persistent connections. E.g.: sess-db0; bugs with phpredis and php-fpm are known: https://github.com/nicolasff/phpredis/issues/70 -->
    <database>0</database> <!-- Redis database number; protection against accidental data loss is improved by not sharing databases -->
    <password></password> <!-- Specify if your Redis server requires authentication -->
    <force_standalone>0</force_standalone>  <!-- 0 for phpredis, 1 for standalone PHP -->
    <connect_retries>2</connect_retries>    <!-- Reduces errors due to random connection failures; a value of 1 will not retry after the first failure -->
    <read_timeout>10</read_timeout>         <!-- Set read timeout duration; phpredis does not currently support setting read timeouts -->
    <automatic_cleaning_factor>0</automatic_cleaning_factor> <!-- Disabled by default -->
    <compress_data>1</compress_data>  <!-- 0-9 for compression level, recommended: 0 or 1 -->
    <compress_tags>1</compress_tags>  <!-- 0-9 for compression level, recommended: 0 or 1 -->
    <compress_threshold>2048</compress_threshold>  <!-- Strings below this size will not be compressed -->
    <compression_lib>snappy</compression_lib> <!-- Supports gzip, lzf, lz4 (as l4z) and snappy -->
    <use_lua>1</use_lua> <!-- Set to 1 if Lua scripts should be used for some operations -->
  </backend_options>
</cache>


texts: What are the differences between EAV and Flat catalogs?

texts: Can anyone provide a clarification on the differences between EAV and Flat catalogs, when accessing the sub categories of a category?


texts: Magento 2 installation says var directory is not writable

texts:
I have a strange problem with my Magento 2 installation. The readiness check says my var-directory is not writable although it clearly is. I even set it to 777. The other directories (app/etc, pub/media, pub/static) all have the same rights and they pass the test.

Anyone else encountered this problem upon installing? My configuration is Nginx / PHP7.0.4


texts:
I'm configurating email templates and can't find how to add a link to view the current email in browser, in case it don't show up correctly in the Client.

Have been google for few hours now and can't to find any info on the subject.

Does this feature exists in Magento? If yes, how to add an correct URL in the template?

Thanks,


texts: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry


texts: How to add an automatically generated coupon code to the welcome email

texts: I want to add an automatically generated coupon code to the welcome email. Each coupon code can only be used once. I don't know much about magento. Can anyone tell me what to do?


texts: Magento2.1 Configurable attributes in cart

texts:
I want to add configurable products attributes to cart page too.

Example:
T-Shirt color:red size:m already added to cart by price 100$,

Now I want to change attributes on cart and use color:green size:m price:110$
Also images of each attribute should change.

What should I do?

More explanation:

I have below SKU's in a configurable product name A:

t-shirt size m color red price 100$.
t-shirt size s color red price 110$.
t-shirt size m color green price 150$.
t-shirt size s color green price 90$.

Added t-shirt size m color red price 100$ to my cart. Now I'm on cart page(/checkout/cart) and I want to change t-shirt size m color red price 100$ to  t-shirt size m color green price 150$.

I don't want to return back to product page, change attributes add to cart again and remove last SKU. I want to change attributes on cart page.


texts: How to create a new “Input Validation for Store Owner” option for attribute?

texts:
I need to create a bunch of new attributes from my module, and I would like to define custom validation rules for each of the attribute. How can I do it?

edit: Your answers about magento validation in models are Ok - thanks, however I probably didn't emphasize it enough my question is How can I create a new “Input Validation for Store Owner” (this setting is in the attribute configuration panel)


texts: Categories mapping when migrate from Magento 1 to Magento 2

texts: Can anyone tell me whether it's possible to have a migration with categories mapping on migration for magento 1 to magento 2 and how can I do this?


texts:
I have a custom role added to an image (attr-id = lookbookimage, label = Lookbook image), one of the product images has this role assigned to it.

I'm doing this in the front-end but it keeps returning main product image rather than a lookbook one.

public function getLookBookImage($product)
{
    return $this->imageBuilder
        ->setProduct($product)
        ->setImageId('product_page_lookbook_image')
        ->create();
}

I have tried many other ways but everything seem to be returning main product image rather than lookbook one

Please note that I'm also looking to get lookbook image resized to the dimensions I have specified in view.xml -> I've created a custom attribute there

<image id="product_page_lookbook_image" type="image">
    <width>640</width>
    <height>960</height>
    <frame>false</frame>
</image>


texts:
How can I override the following file:

vendor/magento/framework/Locale/Format.php


texts: Magento reorder with existing order price

texts:
I have a requirement where an order needs to be created from an existing order i.e Re-order feature of magento but programatically. A cron job dispatches a reorder event based on certain conditions. The below code looks up the order-id and creates a new order successfully. However, the new order picks the updated price of the product whereas I need it to be the same as the previous order. How can I modify it to set pricing from the last order?

$order = Mage::getModel('sales/order')->loadByIncrementId($lastOrderId);
$order_model = Mage::getSingleton('adminhtml/sales_order_create');
try {
    $order->setReordered(true);
    $order->getPayment()->getMethodInstance()->getInfoInstance();

    $order_model->getSession()->setUseOldShippingMethod(true);
    $reorder = $order_model->initFromOrder($order);
    $newOrder = $reorder->createOrder();
    $newOrderId = $newOrder->getIncrementId();
} catch (Exception $e) {
    Mage::log('Renewal for Profile #'.$profileId.': '.$e, null, 'prosub-debug.log');
    Mage::logException($e);
}


texts: Magento 1 get all checkout child's block on ajax request

texts:
I create an action that will return to checkout page when I called it.
My code is,

echo $this->getLayout()->createBlock('opc/wrapper')->setTemplate('opc/wrapper.phtml')->toHtml();

But it shows an empty template of checkout without shipping method or payment method.

How can I fix it or improve my code?


texts:
I am trying to write some business logic root folder of index.php file, but it's throwing below error.

  Uncaught RuntimeException: ObjectManager isn't initialized in
  vendor\magento\framework\App\ObjectManager.php on line 31

I have a multi store based on Country I am redirecting store to appropriate. For these, I have done below code.

<?php
/**
 * Application entry point
 *
 * Example - run a particular store or website:
 * --------------------------------------------
 * require __DIR__ . '/app/bootstrap.php';
 * $params = $_SERVER;
 * $params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = 'website2';
 * $params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = 'website';
 * $bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $params);
 * \/** @var \Magento\Framework\App\Http $app *\/
 * $app = $bootstrap->createApplication('Magento\Framework\App\Http');
 * $bootstrap->run($app);
 * --------------------------------------------
 *
 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

try {
    require __DIR__ . '/app/bootstrap.php';
} catch (\Exception $e) {
    echo <<getMessage()}

HTML;
    exit(1);
}

//$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER);

$params = $_SERVER;

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$getHelper = $objectManager->get('Learning\Location\Helper\Data');
$getStore = $getHelper->getCountry();

if($getStore == "india"){
    $params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = 'default';
}else if($getStore == "united states"){
    $params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = 'us';
}else{
    $params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = 'us';
}
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = 'store'; // store or website
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $params);

/** @var \Magento\Framework\App\Http $app */
$app = $bootstrap->createApplication('Magento\Framework\App\Http');
$bootstrap->run($app);

How can I write my logic inside index.php? Please suggest us


texts: How to configure Magento2 to use selenium_hub in a Docker environment

texts:
I am struggling to get the selenium hub docker to work with Magento2. I have used it in other frameworks like Django, but I'm struggling to make the connection in Magento2. I'm working on top of https://github.com/meanbee/docker-magento2 as a starting point.

Things I've tried to do to get some more information:

I can enter the CLI container and curl http://selenium_hub:4444/wd/hub/ to get a JSON response so I know the domain is resolving correctly.
I tried using just the firefox standalone container but I got the same error.
I can access the grid console from the host machine, so the containers are running.

Using the following server configuration I get an error

Error

The Selenium Server is not active on host http://selenium_hub/wd/hub/ at port 4444.

config.xml

<server>
    <item name="selenium"
          type="default"
          browser="Mozilla Firefox"
          browserName="firefox"
          host="http://selenium_hub/wd/hub/"
          port="4444"
          seleniumServerRequestsTimeout="90"
          sessionStrategy="shared">
       <desiredCapabilities>
          <browserName>firefox</browserName>
          <platform>ANY</platform>
       </desiredCapabilities>
    </item>
</server>

docker-compose.yml (selenium containers)

  selenium_hub:
      container_name: selenium_hub
      image: selenium/hub
      ports:
        - "4444:4444"

  selenium_chrome:
    container_name: selenium_chrome
    image: selenium/node-chrome-debug
    environment:
      - HUB_PORT_4444_TCP_ADDR=selenium_hub
      - HUB_PORT_4444_TCP_PORT=4444
    ports:
      - "5900:5900"
    depends_on:
      - selenium_hub

  selenium_firefox:
    container_name: selenium_firefox
    image: selenium/node-firefox-debug
    environment:
      - HUB_PORT_4444_TCP_ADDR=selenium_hub
      - HUB_PORT_4444_TCP_PORT=4444
    ports:
      - "5901:5900"
    volumes:
      - /dev/shm:/dev/shm
    depends_on:
      - selenium_hub

I'm still new to Selenium and Magento2, so any ideas are appreciated.


texts: Associated simple products not showing in configurable product

texts:
In my magento2.1.5 (migrated from magento1.9) store, some configurable products are not showing any associated simple product in both admin and front-end. I need to set the simple products again in admin and then it is working good. This behavior is repeating in products that are migrated from magento1.9.

Strange thing is, when I get the children of that configurable product using the code below, it is not showing me the child products.

$children = $product->getTypeInstance()->getUsedProducts($product);

It looks like the simple products are associated but somehow Magento is not able to render this.

I also checked the values in the database and for most products having an issue, the value of "has_options" and "required_options" is set to 0. Changing it to 1 doesn't work for me.

These products were working fine earlier and are working fine on my older staging deployments. Can anyone please tell me what is the issue?


texts: Can't Access Quote from checkout session after returning from payment Gateway

texts:
I am building payment gateway extension and i am facing small issue to get the quote object after control return from payment Gateway.

Let me explain you in detail.

I am using below funtion to redirect to payment gateway.

public function getCheckoutRedirectUrl()
{
return Mage::getUrl('custom/index/start');
}

Above method works fine. I am redirecting to payment gateway and payment processed successful with success message and redirect back to our store with captured status on below controller action.

public function returnAction()
{
$quote = Mage::getSingleton('checkout/session')->getQuote();
$quote->collectTotals();
$payment = $quote->getPayment();
$service = Mage::getModel('sales/service_quote', $quote);
$service->submitAll();
$quote->save();
$order = $service->getOrder();
$this->getSession()->setLastQuoteId($quote->getId())
->setLastSuccessQuoteId($quote->getId())
->setLastOrderId($order->getId());
{

Mage_Sales_Model_Order::STATE_PENDING_PAYMENT:
break;
case Mage_Sales_Model_Order::STATE_PROCESSING:
case Mage_Sales_Model_Order::STATE_COMPLETE:
case Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW:
$order->sendNewOrderEmail();
break;
}
$this->getResponse()->setRedirect(Mage::getUrl('checkout/onepage/success'));
return;
}

But in the above function i get the quote object as blank and due to that i am unable to place an order. This means that after returning from payment gateway it clears the checkout session.

How can i get the quote object and what is the problem ?

Please help


texts: Magento 2.1.10 Composer Sample Data Install Issues

texts:
I have Magento 2.2.0 setup with sample data. I am trying to setup Magento 2.1.10 with Sample Data for reference. However, when running:

php bin/magento sampledata:deploy

I get:

Loading composer repositories with package information
Updating dependencies (including require-dev)

Problem 1
    - The requested package magento/module-bundle-sample-data could not be found in any version, there may be a typo in the package name.
  Problem 2
    - The requested package magento/module-catalog-sample-data could not be found in any version, there may be a typo in the package name.
  Problem 3
    - The requested package magento/module-catalog-rule-sample-data could not be found in any version, there may be a typo in the package name.
  Problem 4
    - The requested package magento/module-cms-sample-data could not be found in any version, there may be a typo in the package name.
  Problem 5
    - The requested package magento/module-configurable-sample-data could not be found in any version, there may be a typo in the package name.
  Problem 6
    - The requested package magento/module-product-links-sample-data could not be found in any version, there may be a typo in the package name.
  Problem 7
    - The requested package magento/module-customer-sample-data could not be found in any version, there may be a typo in the package name.
  Problem 8
    - The requested package magento/module-downloadable-sample-data could not be found in any version, there may be a typo in the package name.
  Problem 9
    - The requested package magento/module-grouped-product-sample-data could not be found in any version, there may be a typo in the package name.
  Problem 10
    - The requested package magento/module-msrp-sample-data could not be found in any version, there may be a typo in the package name.
  ...

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Installation failed, reverting ./composer.json to its original content.
There is an error during sample data deployment. Composer file will be reverted.

Composer tries to fetch the version 100.1.* for these modules but can't find it. (For reference it tries and successfully gets version 100.2.* for Magento 2.2.0.

Any ideas or thoughts on getting the sample data via composer in Magento 2.1.10?


texts: Magento2 : How to Create custom theme in PWA Studio

texts: Anyone have any idea about how to Create custom theme in PWA Studio Magento2 ?


texts: Bundles: wrong tax class when using fixed price

texts:
I am facing exactly same problem as stated in https://github.com/magento/magento2/issues/30204
I am looking for an optimal solution for that. I am using Avalra Avatax for tax calculation with Magento Version 2.3
I want Tax to be calculated based on the tax classes defined against each bundle line item


texts: Static blocks on home page CE 1.9 RWD Demo Theme

texts: I was wondering how you would create the static blocks on the home page in the RWD Madison Island theme, the three below the sliding banner?  Can they be created just using the static blocks and widget GUI or do you need to enter code?  Many thanks for any suggestions. I thought this would be a trivial issue.


texts: Magento 2: Which observer event is used instead of "core_block_abstract_to_html_after" in Magento 1?

texts: I use the "core_block_abstract_to_html_after" event in magento 1. What is the equivalent in Magento 2?


texts: Using multiple marketplace accounts with composer in the same installation

texts:
(Magento 2.3.4, 2.4.1, 2.4.2, Composer 1.10.19, Ubuntu 18, PHP 7.3)
We have two marketplace accounts and paid-for extensions in both, for the same Magento instance. We'd like to use auth.json to provide credentials so it can be kept out of source control.
We've tried several solutions for this - all failed:

private satis repo to "proxy" the packages
using 'connect20.magentocommerce.com' as the hostname (an alternate name for repo.magento.com)
using repo URLs in the form 'username@repo.magento.com'

(where necessary, adding "canonical":false in the repo config so it can 'fall through' to the next repo)
Issues we found were:

when looking up the repo credentials, composer seems to only use the hostname so user@host doesn't work
when using 'connect20.magentocommerce.com', the URLs in the downloaded package.json files all point to 'repo.magento.com', so it falls back to using the other credentials
using satis to 'proxy' it means downloading every version of every package (guessing packagist could help with this, we are yet to try it)

We're using composer with an 'auth.json' file and needed it to be able to pull updates from both accounts during the same composer run.
Next step - we're trying out a private packagist setup to re-package the marketplace accounts.
My question is: is there a neat way to handle this?
(related composer issue: https://github.com/composer/composer/issues/8724 )
(related issue for tar errors when repackaging with satis: https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/2098 )


texts: Some Payment Method Not Showing in Sales grid after upgrade magento to 2.3.1

texts:
I upgraded Magento version 2.2.3 to 2.3.1 by using composer. All Things are working fine, except Sales order grid. In sales grid it's showing only payment method check, rest other payment methods are not showing in grid.

But they are visible in details.

I have checked below file
vendor/magento/module-payment/Helper/Data.php
in this file function getPaymentMethodList have a validation for active method.

My all methods are active and showing in frontside but not showing in grid.

I have disabled all 3rd party modules also but no luck.


texts: Is there a way to remove all Product attributes set on View level, so they all fall back to "All Store View" scope?

texts:
I have been working on fixing the product attributes that were imported via CSV files. I noticed that somehow the importers fill in attributes on the store view level, which means the change I made to the All Store Views will not be affecting until I manually go through the Default Store View and set each applicable to fall back to the Default Value.

Is there a way to just remove all of them (via MySQL or code or admin UI)?


texts: API not allowing attribute codes > 30 characters

texts:
I have tried updating the ATTRIBUTE_CODE_MAX_LENGTH value in ../magento/module-eav/Model/Entity/attribute.php. I've cleared the cache, reindexed and rebooted the server but, the changes don't seem to be working. I've tested this with an insert of 30 characters and it will accept the attribute code and insert the attribute.

Does anyone know what I am doing wrong?

Thank you.


texts: How to limit products category based per user in magento 1.9.1.0?

texts: I want to limit products category based per user. For example, If I have added free category under 10 products. Users only can order 1 to 7 products within free 10 products. Any idea regrading this?


texts: How To Add Video As Background In Magento?

texts:
I Want to add video as background in magento home page.

I used this code but it is not working.

Helping People

    Learn More


texts: consumers_wait_for_messages not adhered to

texts:
I'm trying to run my message queue consumer in a cronjob but the process never exits which means my cronjob never exits either. Looking at the docs https://devdocs.magento.com/guides/v2.3/config-guide/prod/config-reference-envphp.html#consumers_wait_for_messages it seems possible to turn off waiting for processes but I've tried that without success. I also tried adding it on the highest level:
cat app/etc/env.php
<?php
return [
    # ...
    'consumers_wait_for_messages' => 0,
    'queue' => [
        'consumers_wait_for_messages' => 0
    ]
];

I'm running the consumer like this: bin/magento queue:consumers:start consumer.ga.event.refund. And I've tried setting the CONFIG__DEFAULT__SYSTEM__CRON__CONSUMERS__USE_SEPARATE_PROCESS env variable that I found while googling to both 1 and 0, but it doesn't change anything.
Any advice regarding this?


texts: Magento2: How can i get all orders from database tables

texts:
I want to get all orders record from database.
How many tables i have to dump for . Kindly enlist the tables names here


texts: previous extension giving 404 on installing new module in magento2

texts:
I have created a stripe module that allow to create standard account from customer section, was working fine, but as I installed new webkul's stripe checkout module, my module giving 404 error.

Any suggestion ? How to resolve this ?


texts:
I added a sample product to the basket. When I try to delete product from basket or clear basket an error is displayed.

Fatal error: Uncaught TypeError: Argument 1 passed to Magento\Framework\Exception\InputException::__construct() must be an instance of Magento\Framework\Phrase, string given, called in /home/brandswearxv/ftp/vendor/magento/module-quote/Model/ShippingAddressManagement.php on line 121 and defined in /home/brandswearxv/ftp/vendor/magento/framework/Exception/InputException.php:51 Stack trace: #0 /home/brandswearxv/ftp/vendor/magento/module-quote/Model/ShippingAddressManagement.php(121): Magento\Framework\Exception\InputException->__construct('Minimalne zam\xC3\xB3...') #1 /home/brandswearxv/ftp/vendor/magento/module-quote/Model/Quote/ShippingAssignment/ShippingProcessor.php(66): Magento\Quote\Model\ShippingAddressManagement->assign('66', Object(Magento\Quote\Model\Quote\Address)) #2 /home/brandswearxv/ftp/vendor/magento/module-quote/Model/Quote/ShippingAssignment/ShippingAssignmentProcessor.php(110): Magento\Quote\Model\Quote\ShippingAssignment\ShippingProcessor->save(Object(Magento\Quote\Model\Shipping), Object(Magento\Quote in /home/brandswearxv/ftp/vendor/magento/framework/Exception/InputException.php on line 51


texts: Magento 2 : how to add color swatches on list page

texts:
Is it possible to add color swatches on the list page and color dropdown on the product view(detail) page?.

Please check below image, I added color attribute as a dropdown:

So by default on the product view page showing dropdown of the color attribute.

Now I need to add color swatches on product list page.

Is it possible?. If it's possible let me know how to set color swatches on the product list page.

Thank you so much.


texts: Show item discount in top cart (mini cart)

texts:
We have set up few shopping cart price rules which gives discount on entire category. When customer adds some products from this category to their cart, our mini cart shows inconsistency where it displays discount for previously-added items in cart but not for the new one which just got added. When navigating to shopping cart page the discounted prices gets reflected on mini-cart though. I can understand as it's a shopping cart rule it does not show immediately in mini-cart, but this is confusing for customers as they do see discount on other items.

Any idea how I can make sure every time a product is added to cart it shows shopping cart discount immediately before customer go to cart/checkout page?

Thanks


texts: How to show layer navigation filter in top of list.phtml (magento 1)?

texts:
I want to show layer navigation filter in top of list product page. in dropdown filter i'll prefer. Thanks in advanced.

Finally this code is work in my theme.

<reference name="product_list">
  <block type="catalog/layer_view" name="catalog.toplayer" template="catalog/layer/view.phtml"/>
</reference>

<?php echo $this->getChildHtml('catalog.toplayer'); ?>


texts: Magento 2 - Change Product Price if Custom Value is Selected

texts:
I am using Magento 2.3.6
I have on the Product Page an Custom HTML Select Field: Yes / No
I want the price to Change if selected Field is set to "Yes" and keep the same price if it is set to "No".
At the moment i got this Product.php Class
namespace Vendor\Name\Model;

class Product
{
    protected $objectManager;

    public function __construct(\Magento\Framework\ObjectManagerInterface $objectManager)
    {
        $this->objectManager = $objectManager;
    }

    public function afterGetFinalPrice($product, $proceed) : float
    {
        return $proceed+10;
    }
}

What i want is to set $proceed + 10 only if the Custom Produt Attribute is set to "Yes".
Under Vendor_Module/etc i have di.xml file
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Catalog\Model\Product">
        <plugin name="change_product" type="Vendor\Name\Model\Product" sortOrder="1"/>
    </type>
</config>

Any Ideas?
How can i get .phtml Value from Frontend into PHP File before adding to Shooping Cart?


texts: Magento 2 module not registering and causing CLI to fail

texts:
I am in the early stages of test developing a Magento 2 extension - and I am having problems with registration of the module. The confusing thing is (I think) I am following the same method that previously resulted in successful registration of the module! Also, the presence of my registration.php file is causing the Magento CLI to fail.
I am hoping somebody can spot an obvious error/issue in what I am doing - or, failing that, give me some pointers on how to troubleshoot the issue.

I am working in Magento 2.04 CE
The OS is CentOS
SELinux is set to permissive

I have placed the composer.json and registration.php files in the root directory of my module. They reside in directory app/code/vendorname/modulename. I also have a module.xml file in the app/code/vendorname/modulename/etc directory.

Content of the composer.json:

{
  "name": “magemood/shareorder",
  "description": "A Magento 2 module that shares orders with other applications",
  "type": "magento2-module",
  "version": "1.0.0",
  "license": [
    "OSL-3.0",
    "AFL-3.0"
  ],
  "require": {
    "php": "~5.5.0|~5.6.0|~7.0.0",
    "magento/framework": "~100.0.4"
  },
  "autoload": {
    "psr-4": {“Magemood\\Shareorder\\": "" },
    "files":["registration.php"]
  }
}

The content of registration.php:

use \Magento\Framework\Component\ComponentRegistrar;

ComponentRegistrar::register(
    ComponentRegistrar::MODULE,
    'Magemood_Shareorder',
    __DIR__
);

As well as not resulting in successful registration of the module, the presence of these files causes the Magento CLI to fall over.

  [Zend\ServiceManager\Exception\ServiceNotCreatedException]
  An abstract factory could not create an instance of
  magentosetupconsolecommandmoduleuninstallcommand(alias:
  Magento\Setup\Console\Command\ModuleUninstallCommand).

  [Zend\ServiceManager\Exception\ServiceNotCreatedException]
  An exception was raised while creating
  "Magento\Setup\Console\Command\ModuleUninstallCommand"; no instance
  returned

  [Zend_Json_Exception]
  Decoding failed: Syntax error

Also, if I try running something like: php bin/magento module:status

I get:

  [InvalidArgumentException]
  There are no commands defined in the "module" namespace.

I also have the output from running these commands in verbose mode. However, I have excluded these to keep this post to a reasonable length. I can post these separately.

Any help much appreciated...

I have added some sample exception trace ..

  Exception trace:
  () at vendor/zendframework/zend-servicemanager/src/ServiceManager.php:1135
  Zend\ServiceManager\ServiceManager->createFromAbstractFactory() at vendor/zendframework/zend-servicemanager/src/ServiceManager.php:646
  Zend\ServiceManager\ServiceManager->doCreate() at vendor/zendframework/zend-servicemanager/src/ServiceManager.php:598
  Zend\ServiceManager\ServiceManager->create() at setup/src/Magento/Setup/Console/CommandList.php:89
  Magento\Setup\Console\CommandList->getCommands() at vendor/magento/framework/Console/Cli.php:107
  Magento\Framework\Console\Cli->getApplicationCommands() at vendor/magento/framework/Console/Cli.php:84
  Magento\Framework\Console\Cli->getDefaultCommands() at vendor/symfony/console/Symfony/Component/Console/Application.php:91
  Symfony\Component\Console\Application->__construct() at vendor/magento/framework/Console/Cli.php:76
  Magento\Framework\Console\Cli->__construct() at bin/magento:24

Update:
Still no luck on this issue. I am starting to wonder if there is a problem with my Composer install. Could it be Composer is looking for files in the wrong locations? I'm going to check my Composer install and review Composer documentation. Any pointers/help on this much appreciated.

Another update on the issue. I have still been unable to resolve. However, I have been able to workaround by by-passing Composer. This is OK for getting the module working for test purposes. So, it looks as though the registration.php and module.xml files were fine - and the issue lies with either my composer.json file... or the way I have Composer setup on my system...


texts: Configurable product Add configurations visibility

texts: Is there any way of setting new created products from within a configurable product to visibility search insted of not visible individually?


texts: How to display only USA states as a select drop-down in custom phtml in Magento2.2.5?

texts:
I want to display only USA states as a select drop-down in custom phtml in Magento2.2.5?

Any help would be appreciated.


texts: Is it possible to make magento use another user database?

texts: If a website has an thousands of users registered and the credentia is stored one user database (one account) and we are installing a new store (magento). Is it possible to make magento use the existing user database so as to allow users to use the existing account to use magento?


texts: magento2: table rates csv file with ISO-3166-2-Code shows issue

texts:
In the column "Region/State" im using  ISO-3166-2-Codes for Germany (https://de.wikipedia.org/wiki/ISO_3166-2:DE) , but Magento is showing me this Message:

How can I solve this ?

-
Update:

In the db table directory_country_region we can see country codes and region/state codes of every country. The value of "Region/State" (of tablerates.csv) must be in the same format as in that table. The table content can be seen via phpmyadmin.


texts:
I'm currently facing an issue with regards to upgrading Magento from 2.1.3 to 2.1.8.

Unfortunately, My ISP refuses to run commands on their shared hosting server as this affect other clients as well so I've opted to use the admin interface:

  System > Tools > Web Setup Wizard

And run the setup but getting numerous errors.

Here is readiness check fails errors:

I've logged in to my CPanel and set up the cron jobs like this:

/usr/local/bin/php /home/username/public_html/bin/magento cron:run | awk '{ print strftime("\%Y-\%m-\%d \%H:\%M:\%S"), $0; fflush(); }' 2>&1 >> ~/magento_cron.log
/usr/local/bin/php /home/username/public_html/update/cron.php | awk '{ print strftime("\%Y-\%m-\%d \%H:\%M:\%S"), $0; fflush(); }' 2>&1 >> ~/magento_cron.log
/usr/local/bin/php /home/username/public_html/bin/magento setup:cron:run | awk '{ print strftime("\%Y-\%m-\%d \%H:\%M:\%S"), $0; fflush(); }' 2>&1 >> ~/magento_cron.log

But this has not lead to any success. Upgrading my PHP version is a minor issue but could someone please be so kind as to advice what I could potentially be doing wrong?

Any advice would be greatly appreciated.


texts: Why is there a /base/default/ layout and a /default/default layout? This seems confusing and redundant.


texts: Get static block content by identifier in helper class?

texts:
I am trying to get the content of a static block in a helper class. So far I had no luck. So, how can I get the content of a static block by block identifier in a helper class?

I tried:

$valueContent = $this->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('my_identifier')->toHtml();

Magento 2.2.2


texts:
<reference name="content">
    <block type="pricetool/result" name="update.info.block"  as="update.info.block"  template="pricetool/pricetool.phtml" />
</refrence>

I have created this code in xml and I want to call it in my phtml file using $this->getChildHtml() but it doesn't work.


texts: messageManager addSuccessMessage/addErrorMessage set cookies?

texts:
Whenever I addSuccessMessage/addErrorMessage it sets the cookie?
But I am not able to get that code, where that magic happens.

In messages.js
it gets that message by using code

$.cookieStorage.get('mage-messages');

In my case, once it set the cookieStorage it doesn't get clear even though I do it my code at the end of the script.

$.cookieStorage.set('mage-messages', '');


texts: Magento2 in After order placed Observer does not change order status

texts:
class AfterSaveOrderObserver implements ObserverInterface
{
    /**
     * Sets current instructions for bank transfer account
     *
     * @param \Magento\Framework\Event\Observer $observer
     * @return void
     */

    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        /** @var \Magento\Sales\Model\Order $order */
        $order = $observer->getEvent()->getOrder();
        $order->setState(\Magento\Sales\Model\Order::STATE_NEW, true);
        $order->setStatus('new');
        $order->save();
     }
}


texts:
I installed a local Magento environment on XAMPP using composer. The database is also running on XAMPP (MySql). After the (web) setup i found out that the static files where not generated yet so I tried to run following command:

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

I got the "There are no commands defined in the "setup" namespace." error. After that I tried running cache:clear but I got the same error.

When I run

php bin/magento

I got 3 error message along with some normal info. The error message are the following:

[Zend\ServiceManager\Exception\ServiceNotCreatedException] An abstract factory could not create an instance of magentosetupconsolecommandconfigsetcommand(alias: Magento\Setup\Console\Command\ConfigSetCommand).

[Zend\ServiceManager\Exception\ServiceNotCreatedException] An exception was raised while creating "Magento\Setup\Console\Command\ConfigSetCommand"; no instance returned

[Magento\Framework\Exception\FileSystemException] Cannot read contents from file "C:\xampp\htdocs\magitas\app\code\duo\main\etc\module.xml" Warning!file_get_contents(C:\xampp\htdocs\magitas\app\code\duo\main\etc\module.xml): failed to open stream: No such file or directory

I have the correct user rights (otherwise my setup would not have run).

Thanks


texts: place responsive menu link on nav bar instead of moving top-left in magento-2

texts:
I wanted to display the menu in the nav bar when it becomes responsive. But defaultly it gets displayed in top left with three lines. I wanted to replace this three lines with a text and also wanted to place this link on the nav bar itself.Can any on help .

thanks in advance

the default is as on left side but i want something like on left side


texts: Issues with Magento 1.9.3. or latest SUPEE-8788 upgrade?

texts:
Just got notification re Magento 1.9.3.1 release. Before I go whack it up are there any potential issues I need to be aware of. I'm running Magento 1.9.2.4.

Should I apply SUPEE-8788 first or just upgrade to 1.9.3.1?

Note: This question is related to 1.9.3.1 and latest SUPEE-8788 patch which were released on 14th of Nov and is not related to older SUPEE-8788 (v1).


texts: Mobile Menu Links created in CMS Block are Redirecting to Undefined

texts:
I'm on Magento 2.1.14 and have a custom theme applied which builds off of the blank theme.  The customizations through XML in the Magento_Theme directory are minimal.  I added several links to the main nav bar (the same one that contains the category links) by calling a cms block in the default.xml.  The cms block was created through the admin and instead of hardcoding the urls, I used {{store direct_url='path'}}.  In my default-head-blocks.xml file in my "Magento_Theme" folder, I am not calling any extra js.  Code posted.

On the desktop version of the site, there are no problems with the nav bar and all links direct to their correct urls or paths.  When I load the mobile version, the extra links that were added through calling the cms block all direct me to url/undefined.  This only happens on the mobile version.

Does anyone have any insight into why this may be happening?  I have searched for any info and it all leads back to JS or jQuery errors.  But I'm basically using the majority of the Magento Blank theme and core Magento files.

Background: when I originally added the links, I tried several methods including, the current method.  I initially tried adding the links directly through XML using the link class and added arguments to specificy the path.  This ended up adding a trailing slash to all the paths added, so I then created redirects in the admin to direct those particular paths with trailing slashes to the correct path (without the trailing slash).  That resulted in the browser crashing for a few of the links, so I removed the XML and deleted the redirects from the admin.

  myThemeDirectory/Magento_Theme/layout/default.xml

   <?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
  <body>

    <referenceBlock name="catalog.topnav">
      <block class="Magento\Cms\Block\Block" name="additional-links">
        <arguments>
          <argument name="block_id" xsi:type="string">additional-store-links</argument>
        </arguments>
      </block>
    </referenceBlock>

    <referenceBlock name="skip_to_content.target" remove="true" />
    <referenceBlock name="report.bugs" remove="true"/>
    <referenceBlock name="store.settings" remove="true"/><!-- targets mobile menu ? -->
    <referenceBlock name="store.links" remove="true"/><!-- targets mobile menu ? -->
    <referenceBlock name="top.search" remove="true" />
    <referenceBlock name="top.links" remove="true" />
    <referenceBlock name="footer_links" remove="true" />
    <referenceBlock name="form.subscribe" remove="true" />

    <referenceBlock name="reviews.tab" remove="true" />
    <referenceBlock name="product.review.form" remove="true" />
    <referenceBlock name="product.info.review" remove="true" />

    <move element="store_language" destination="header-wrapper" after="-" />
    <move element="breadcrumbs" destination="main.content" before="-" />

    <referenceBlock name="header.panel.wrapper" remove="true"/>

    <referenceContainer name="footer">
          <block class="Magento\Cms\Block\Block" name="cms-static-main-footer" before="copyright">
                    <arguments>
                        <argument name="block_id" xsi:type="string">cms-static-main-footer</argument>
                    </arguments>
                </block>
    </referenceContainer>
  </body>
</page>


texts:
I'm looking in Magento the Class that login a Customer and I do not find where is located.

I need to be able to login a user externally a Magento.

Any idea?


texts: Editing css for magento 2 extension, how to take effect?

texts:
I installed a extension (bannerslider), all css seems placed in app/code/Magestore/Bannerslider/view/frontend/web/css

i had tried to delete all css in this folder then run

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

or

php bin/magento setup:static-content:deploy

but nothing were changed in frontend, anyone knows how to edit css of a extension?


texts: Set cron job but the order email will auto cc to other customers

texts: Set the cron job, but the order email will auto cc to other customers and I don't know why. Email configuration and setup are proper, and only  "order email " will be auto cc, the shipment,invoice email and account email didn't have this problem.


texts: Magento2 cookieMessages showing multiple time

texts:
I am using Magento version 2.3.3 Version. In creating account or lot of others pages always showing me message multiple time in the page. Like below image.

I have tried with disable module but no luck, how to solve this issue?


texts:
Example:

I have a product including price is RS 1750 (inr) and tax rate is 5.5%.

And my shopping CART is showing like this

SUBTOTAL    RS 1,658.77
TAX         RS 91.23

GRAND TOTAL RS 1,750.00

But 5.5% of 1750 is 96.25

So what is the wrong?


texts: Is there a way to get the City and State to select correctly once our operators type in the zip code? It feels like hours pass while trying to select the proper state in the dropdown.


texts: Magento 2: I need to remove .html from all product page url

texts:
I am trying to remove ".html" from the URL. Attached are my catalog SEO setting in the Magento 2. As you can see I have remove the ".html" from Product URL Suffix.

I have already tried below solution but no luck
Soln1: php bin/magento indexer:reindex
Soln2:  1). Delete all records from table url_rewrite. You can run the following SQL command: DELETE FROM url_rewrite WHERE entity_type = 'product';
2).Login to your Magento 2 backend >> Re-save all your Categories and then run this command :- php bin/magento cache:flush
Please help me with this issue.
I am using Magento 2.3.
Thanks In advance..!!


texts:
I am currently trying to locally debug a Magento installation using a Windows 8.1 machine, XAMPP, XDebug and Sublime Text 3 XDebug client. It currently runs so slow, it is pretty much unusable while debugging (40 to 90 second page loads - almost all of that is the initial page request, not external file requests). Here are the settings I am using. Is there a better way?

[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 0
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "C:\xampp\tmp"
xdebug.profiler_output_name = "xdebug_profile.%R::%u"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = 127.0.0.1
xdebug.remote_port = 9000
xdebug.trace_output_dir = "C:\xampp\tmp"


texts: Magento 2 : How to check product is in stock by color and size?

texts:
I want product can be pre order if not in stock.
suppose, Product X has 3 sizes S,M and L.
and colors Red, Blue and Black.

At Product Details Page, If I select size L and Color black which is not in stock then, It should show 'Pre Order' instead of 'Add to Cart' Button.

Just like Magento's Back order process.


texts: Change the placeholder for all fields in Magento 2 checkout pages

texts:
I need to change the placeholder for all fields in the Magento 2 checkout pages. How to implement that?

Please suggest a method to do that.


texts: Where can i still download Magento 1.4 sample data?

texts:
There is no 1.4 sample data i can download, i had tried to install the sample data 1.3 found from the below link and page, the file name is Magento-sample-data-1.1.2-2015-02-12-09-16-25. But after installed Magento 1.4, there is a blank page in browser.

https://www.magentocommerce.com/download#download1759

Anyone can help?


texts:
I know this question has been asked alot for setting up one or two store groups and views but my situation is a bit different.

I need to set up 20+ store views to represent phsyical stores, URL like this: http://mywebsite.co.uk/store1

Seems pretty simple right but the 2 methods that are most well known:

1) Using sub directories, copying the index.php into them and symlinking the media etc folders - for every store this would grow out of hand pretty quickly with all the sub folders

2) set ENV variables in .htaccess or the vhost for each store which again would get unmanagable very fast

To be able to setup this many store views and keep it managable as well as easy to add more in the future, how would I go about it?

Thanks


texts: How can i create custom filter with custom attribute in header panel in magento 2?

texts:
I create one product attribute which name "country" type drop-down.
in that i add two country there US and CA
now at front-end , front header show custom drop-down with that product option . like US and CA ,
       - when select CA then in category page display product which country option is "CA" .
       - when select US then in category page display product which country option is "US" .
- by default US selected.

any one can guide me how can i do this !


texts: Magento Connect missing in System Dropdown

texts:
for some reason our Magento Connect menu item is not appearing under the System dropdown in the admin panel.

I have made sure that it is enabled in the advanced section in conficuration, but still don't see it. Is there anot


texts: Export specific customer data incl. orders to another instance

texts:
I'm working for a customer that has several Magento Instances (from local, to stage, to test, to production). On production, customers are creating unreproducable behaviours which developers would like to verify and fix.

However, its been a complicated task to export specific customer data in an granular way.

Is there any smart way to export Magento Customer Data incl. Order details + Addresses to another Magento Database?

I was thinking about doing regular collection calls to Magento and "fake" SQL insert commands in order to provide developers ways to import Customers and Orders into their local Database without copying the full and live DB at all. I've now created a shell script that loads the customer based on its email, but from there on I guess I have a hard time since I do not fully see if I got every single customer data aspect in here.

How could I do that in a good way?


texts: Merging Magento CSS results in browsers displaying wrong font-style.

texts:
I have an issue with Magento now, I tried merging CSS, but each time I do that, all the fonts on my page goes from displaying font-weight: 300 (as it should) to bold text.

If I inspect with the browser inspector, it shows as font-weight:300, but its definately not. Also all bold items are suddently not bold.

Tried contacting my hosting provider, but I have no clue. Is this a code issue or server side issue, and what can I do to fix it?


texts: How to create custom button in the admin panel form?

texts: I want to create custom button besides Update Quantity with an custom action where when you click on it, it makes the Quantity to refund column as zero on credit memo page. How can we create that? Thanks in advance!


texts: Khaos Control cron tasks not triggering with other cron tasks (Magento 1.9)

texts:
We have additional module in our Magento 1.9 for Khaos Control which allows Magento to communicate with Khaos for stock and orders etc

The functionality works fine when manually triggered but not when set to run on the cron schedules.

Our other crons are working fine (such as Sage Pay & emails), and Keystone Software who develop the module are frankly no help as they are more interested in selling us their alternative to Magento than helping fix the issue so I'm currently hoping someone out there has experienced similar and can provide me some pointers!


texts: Magento 2: How to show amount at the bottom?

texts:
Currently, toolbar amount is showing at the top in the product listing page. And I want to show this at the bottom in the product listing page.

Items 1-8 of 32

Is there any way to do this without using CSS ?


texts: For Ui Component admin form Field with ajax updating the select value

texts: I have a select field in the UI component, on the changing the select field with ajax how to load the next select field.in the admin side?


texts: Missed fields at listing page, custom EAV

texts:
I've created custom entity (EAV). I could see all fields on edit page. app/code/Klever/ProductPricing/Controller/Adminhtml/WallMaterial/Edit.php
public function execute()
{
    // 1. Get ID and create model
    $id = $this->getRequest()->getParam('entity_id');
    $model = $this->_objectManager->create(\Klever\ProductPricing\Model\WallMaterial::class);

    // 2. Initial checking
    if ($id) {
        $model->load($id);
        if (!$model->getId()) {
            $this->messageManager->addErrorMessage(__('This Wallmaterial no longer exists.'));
            /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
            $resultRedirect = $this->resultRedirectFactory->create();
            return $resultRedirect->setPath('*/*/');
        }
    }
    $this->_coreRegistry->register('klever_productpricing_wallmaterial', $model);

    // 3. Build edit form
    /** @var \Magento\Backend\Model\View\Result\Page $resultPage */
    $resultPage = $this->resultPageFactory->create();
    $this->initPage($resultPage)->addBreadcrumb(
        $id ? __('Edit Wallmaterial') : __('New Wallmaterial'),
        $id ? __('Edit Wallmaterial') : __('New Wallmaterial')
    );
    $resultPage->getConfig()->getTitle()->prepend(__('Wallmaterials'));
    $resultPage->getConfig()->getTitle()->prepend($model->getId() ? __('Edit Wallmaterial %1', $model->getId()) : __('New Wallmaterial'));
    return $resultPage;
}

app/code/Klever/ProductPricing/Ui/Component/Listing/Column/Thumbnail.php
public function prepareDataSource(array $dataSource)
{
    if(isset($dataSource['data']['items'])) {
        $fieldName = $this->getData('name');
        foreach($dataSource['data']['items'] as & $item) {
            // TODO GET EAV ATTRIBUTE VALUE
            $attribute = $this->eavConfig->getAttribute(\Klever\ProductPricing\Model\WallMaterial::ENTITY, 'image');

But when I am on listing page I have an access just to main(?) attributes only:

How could I display all EAV fields on listing page?


texts: How to add catalog price rule to have different discounts for different categories?

texts:
I am new to magento . I want to add catalog price rule to have different discounts for different categories . Currently i can select one or multiple categories from conditions tab and then enter discount amount but that will be only for those specific categories and for rest there will be no discount .

I found out that on adding catalog rule it calculates and saves all product prices under selected category to 'catalogrule_product_price' table .

I want to have discount say 15% for category id 4 and 20% for rest . How can i achieve that .


texts:
I'm having a problem where my category attributes (name, url, etc) are not updating in the front end of the store, as well as new products that are added to that category are not displaying. In the admin area, the products show as being assigned to that category and the name of the category is changed, however this is not reflected on the front end of the site. I've done the usual things, flush cache, make sure the root category is set for the store, make sure that the categories are children of the root category, but no luck. New categories that are created also go straight to a 404 page.

Is there any reason why the changes would reflect in the admin area but not the front end? Thanks for any guidance that you might be able to provide!


texts: Magento 2 product pages renders very slow

texts:
I have a magento 2.3 intance with 277.000 product. Most of them are simple products. I have an external website with links to products.
Problem is when user is redirected from an external page to product page on Magento, for the first time it renders very, very slow. When user goes once again, request is much faster, probably because page is cached. Is there any way to increase performance of loading product pages in Magento 2?


texts: Display specific category, toolbar and filter on home page

texts:
I want to have a category page as part of my homepage that also shows the pagination and, most importantly, the filter.

I'm using this extension to change the filter to a horizontal one that uses AJAX to reload the page after a filter has been changed. I also want it to function normally.

I got a few ideas which include:

Make the category page the homepage (suggested by the developer of above mentioned extension)
Insert the products, toolbar and filter as a block

Both of them have their downsides, though.

For the first one I'd have to copy the category page that I want to display, which results in me having to edit the product importer that I'm using, what I don't really want to have to.

I tested the second idea and the results were... strange. I used this code:

<block type="catalog/product_list"  name="home-products" template="catalog/product/list.phtml">
    <block type="catalog/product_list_toolbar" name="product_list_toolbar"
        template="catalog/product/list/toolbar.phtml">
        <block type="page/html_pager" name="product_list_toolbar_pager"/>
    </block>
    <action method="setCategoryId"><category_id>77</category_id></action>
    <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
</block>
<block type="catalog/layer_view" name="catalog.topnav" before="home-products" template="catalog/layer/view.phtml"/>

which showed me the items and the toolbar at the correct location but inserted the navigation at the top of the content (just below the header) and it also didn't have any effect (didn't filter the listed products).

Maybe you can help me figure out what I am doing wrong or even point me in a totally different direction.