texts: Magento2 upgrade issue in Fetching Tax Value

texts:
Getting issue on my cart page after upgrading to magento 2.3.3, Tax value going wrong

Subtotal        $260.00
Tax              $27.44
Australia(10%)   $27.44

  Accepted result:    26.00

  Actual result:      27.44

Any Help will Appreciate!!


texts: Add to Cart Button Next To Each Grouped Item?

texts:
I have a grouped product with a large amount of simple products. I want the quantity of the simple product to default to the maximum stock available.

Issue with this that the current "Add To Cart" button adds all the simple products to the cart.

I'd like to add a button next to each simple item that will only add that item to the cart, is that possible?


texts:
I'm load testing a Magento site using Gatling. The site is hosted on 4 Amazon EC2 machines behind an application load balancer.

If all of my cron jobs are disabled, the site can take a good amount of traffic. But if I add cron.php to one server's crontab during load testing, as soon as that task kicks in, that server can't cope. The load average jumps up to around 40 and I start getting timeouts. Meanwhile, the load balancer continues to regard the machine as "healthy" because the helloworld.php script that I've set up as the health check, seems to be responding just fine the whole time.

The other 3 servers, where cron is not enabled, continue to run just fine.

In fact there's another php script which does the same thing. It's a quick script we wrote to look for orders stuck in "pending" status. Most times, there are no stuck orders, and the script is finished within one second... and yet this server still starts to fail to handle web traffic as soon as the cron job kicks in.

The website runs on php-fpm, the cron job uses php cli. So what on Earth could cause cron.php to interfere with the web traffic so much?


texts: Adding a new module to a production Magento 2 site

texts:
In all of the "deployment" threads  have read, nothing seems to incorporate how to go about adding a new module into the mix.

When adding a new module that, in most cases, would add new database tables, how are you supposed to incorporate that into any of these deployment strategies?

They all talk about minimal downtime by performing compilation and static file production on a staging server, which is fine, but what doesn't add up for me (yet) is how to go about adding a new module to the website using any of these deployment strategies? I am not deploying a new site, my site is live and running, and minimal downtime would be ideal so we can continue taking orders while the updated website is prepared.

In some examples I have read, they clone the database, perform setup:upgrade etc, and then rsync files to the live site (or slight variations of this). But what about the new module database tables, which are still not in the live site database?

Can someone fill in the gaps for me here as I don't get it :-)


texts: Unable to access rest api : http://localhost/magento2/index.php/rest/V1/products

texts:
I am new to Magento. Please help me understand how to fetch the products.
I believe there are some changes to be made in .htaccess file present in the root folder for this url: http://localhost/magento2/index.php/rest/V1/products to return the values.

This the response that I am getting :

Consumer is not authorized to access %resources

Magento_Catalog::products

.
Can someone please help me here.


texts: How to create a product page with fully custom CMS content?

texts: I would like a product detail page that doesn't follow the typical layout of a PDP in my store.  I've tried changing content with custom templates but this requires a code change - is there any way to do this from the CMS?


texts:
I'm new to magento and couldn't find an answer for the following question: Is it posible to extend only a part/property of the parent .less file?

So when the original for example looks like:

    ...more 'less'
    .media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
        .block-search {
            float: right;
            padding-left: 15px;
            position: relative;
            width: 250px;
            z-index: 4;

            .label {
                &:extend(.abs-visually-hidden-desktop all);
            }
}
     ...more 'less'

And I only want to change the float:right; to float:left; it doesn't seems to work to create the same file (and structure) in my own theme (that has this parent set) and in that less file only set:

.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
    .block-search {
        float: left;
}
}


texts: Catalog Search Dose Not Content Data Without Indexer in magento 2

texts:
I Am Used Amasty Search For Catalog Search and All Index Set Update By
Schedule When i Import Large Amount Of Product data Using Csv They
Dose Not Content In Catalog Search Without Apply Re-indexing Command
My Requirement is update catalog search without apply re-ndexing
command


texts: Parsing data from template to controller using Prototype JS Ajax.Request

texts:
I have the following method in my template file:

function submit_serials(){
    var serials = $('serials').value;
    new Ajax.Request("<?php echo $this->getUrl('*/*/process'); ?>" + '?serials=' + serials, {
        method: 'POST',
        onComplete: function(transport) {
            div = $('feedback');
            div.update(transport.responseText);
        }
    });
}

in my controller file I have:

public function processAction(){
    $serials = $_POST['serials'];
    ...
}

I'm getting a Request-URI too large error. I understand that there is too much info being stored in the serials variable, but how else can I parse this through to the controller? I read that you should be using the body of the AJAX request but I can't seem to figure out how to do so.

How can I parse the serials in the body of this Ajax request & fetch them from within the controller file?


texts: My CMS page redirects to homepage - Magento 1.9

texts:
Hi i've modified a page url to my page name. I've also changed the url link present on my navigation menu eg: I've changed the page url about-magento-demo-store to about-us. But when I click on the link it doesn't work and it keeps on redirecting me to my shop homepage.

I've re-indexed it so many times and flushed my cache but it still doesn't work.

Can anyone help please?

Magento CE 1.9.3.0


texts: I am looking for a way to list all magento 2 cron jobs. Is it available somewhere easy to review?


texts: Get product IDs of current category page

texts:
I would like to get all the product IDs from the current category page.
I don't want to load the whole collection, I just need to get the product IDs from the products currently displayed.

E.g.:

Customer goes on category, order is set to price descending, number of displayed products is set to 20 --> I just want to retrieve these product IDs
Customer goes to page 2 --> now I just want to retrieve these product IDs
Customer changes order to name asc, number of displayed products to 50 --> now I just want to retrieve these product IDs

So, getting the whole collection via

$category_id = Mage::getModel('catalog/layer')
     ->getCurrentCategory()
     ->getId();

$category = Mage::getModel('catalog/category')
     ->load($category_id);

$products = Mage::getModel('catalog/product')
    ->getCollection()
    ->addAttributeToSelect('*')
    ->addCategoryFilter($category)
    ->setOrder('price', 'ASC')
    ->load();

does not really help me, because I can't actually just the product IDs which are currently displayed to the customer. Is there some kind of way to filter and limit the collections to the values which the customer currently uses?

P.S:
Get product id of current category page
this guy had the same question (I guess) but didn't receive any answer, at least none, that would help me with my problem.


texts: Some of product detail page error- Element 'reference': This element is not expected

texts:
When I tried to change or open product I got next message:

1 exception(s):
Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'reference': This element is not expected.
Line: 1

Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'reference': This element is not expected.
Line: 1

Some of products have this error and I don't know where in XML I was wrong?

<?xml version="1.0"?>

    <move element="page.main.title" destination="product.info.main" before="-"/>

    <move element="product.info.review" destination="product.info.main" before="product.info.price"/>
    <referenceBlock name="product.info.sku" remove="true" />
    <referenceBlock name="product.info.overview">
        <arguments>
            <argument name="at_label" translate="true" xsi:type="string">none</argument>
        </arguments>
    </referenceBlock>
    <referenceContainer name="product.info.media">
    </referenceContainer>

    <move element="product.info.stock.sku" destination="product.info.main" after="page.main.title"/>
    <container name="cart.wrapper" htmlTag="div" htmlClass="d-flex flex-column bg-smoke pl-5 py-4"/>
    <move element="cart.wrapper" destination="product.info.main" after="product.info.description"/>
    <move element="product.price.final" destination="cart.wrapper" before="product.info"/>
    <move element="product.info" destination="cart.wrapper" after="-"/>

    <block class="Magento\Framework\View\Element\Template" name="product.info.anchor" template="Hiddentechies_Bizkick::product/anchors.phtml"/>

    <move element="product.info.anchor" destination="content" after="product.info.media"/>

    <move element="content.aside" destination="content" after="product.info.anchor"/>

    <move element="product.info.details" destination="content" after="content.aside"/>

-->
-->

    <move element="product.price.tier" destination="cart.wrapper" after="product.info" />

    <referenceContainer name="alert.urls" remove="true"/>
    <referenceContainer name="product.info.extrahint" remove="true"/>
    <referenceContainer name="product.info.review" remove="true"/>
</body>


texts: See process flow of shipping table rate module

texts:
I would like to know if there is an extension/way that let me see the complete flow of the passages of how the rate is choosen, because I have a module that let me choose only one free shipping method to apply to shopping cart price rule, so I guess that something does a check to see if it is equal to something, but I can't find the "breakpoint" to edit this behaviour.
I have tried to install AOE_profiler, but php return an error about "header already sent" or PHP Fatal error:  Undefined class constant 'TYPE_DATABASE' in app/code/community/Zend/Db/Profiler.php. Now I have installed Developer Toolbar from MGT, but I think that it isn't complete (or maybe I don't know where I have to look).


texts: Magento 2: How to convert query in Magento format

texts:
I have below query. How to convert it in to Magento format?

SELECT GROUP_CONCAT(id) as ids FROM table
WHERE YEAR(created_at) = YEAR(CURRENT_DATE - INTERVAL 1 MONTH)
AND MONTH(created_at) = MONTH(CURRENT_DATE - INTERVAL 1 MONTH)


texts: How to retrieve products from magento REST API?

texts:
I'm new to the REST api concept, after hitting the url- http://magentohost/api/rest/products I can see the products, means can access the product resource through guest user.

Then I have created the consumer from the admin panel and get the consumer key and secret then added new admin role and from REST attributes gave all resouce access to admin and linked admin user to REST role. Then I put sample php example for retrieving the products from documentation outside the magento root directory filled the url paths and consumer key and secret and created new file which is call back url.

Now when i run this sample file it works fine, ask user to fill his credentials, authorize the application and sent back to callback url.

There is nothing in the call back page, i have kept it blank, so what should i do to retrieve the list of products ? Is there anything that I'm missing ? How should I move further to learn REST API's ? Thanks in advance


texts: How to remove tooltip from email field on checkout

texts:
Tell me how to remove tooltip from the checkout email field.

I tried this way

app/code/Dv/Tooltip/registration.php

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Dv_Tooltip',
    __DIR__
);

app/code/Dv/Tooltip/etc/module.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Dv_Tooltip" setup_version="1.0.0" />
</config>

app/code/Dv/Tooltip/etc/frontend/di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Checkout\Block\Checkout\LayoutProcessor">
        <plugin name="dv-checkout-process" type="Dv\Tooltip\Plugin\LayoutProcessorPlugin" />
    </type>
</config>

app/code/Dv/Tooltip/Plugin/LayoutProcessorPlugin.php

<?php

namespace Dv\Tooltip\Plugin;

use Magento\Checkout\Block\Checkout\LayoutProcessor;

class LayoutProcessorPlugin
{
    /**
     * @param LayoutProcessor $subject
     * @param $jsLayout
     * @return mixed
     */
    public function afterProcess(
        LayoutProcessor $subject,
        $jsLayout
    ) {
        //Remove telephone tooltip
        unset($jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']
            ['children']['shippingAddress']['children']['shipping-address-fieldset']['children']['email']['config']['tooltip']);

        return $jsLayout;
    }
}

php bin/magento s:up

After this tooltip is still there


texts: Magento 2 - How to hide/remove custom attribute from backend product edit page?

texts:
I've created a custom attribute yes/no with default value no.

If I update the product with custom attribute value yes then attribute should not be visible on the edit page, if with no value then should be visible.

How can we achieve this?

Thanks!


texts:
I have created home.js file using require-config.js for HomePage.

And init that home.js file in home.phtml file for Home Page.

But i need to get the function that inside the home.js file into size.html file for Home Page.

var config = {
    map: {
        '*': {

            xxHomePage: 'XXX_HomePage/js/home-page'
        }
    }
};

In js file:

 getMsg: function () {
            return "HI";
        },

In Home.phtml file:

<div class="home-slider" id="home-slider" data-mage-init='{"xxHomePage":{}}' data-bind="blockLoader:true">

I need to get the 'getMsg' function into size.phtml (that also in home page

Is there any possible

How to do this ..

Thanks


texts: 404 Page on when entering products from custom collection Magento 1.9.3.1

texts:
I have a major problem with this one. Basically when i try to click on product link that is generated from custom product collection (i mean filtered). It SOMETIMES gives me 404 page. The URL is correct. I don't know how to even debug this thing. It's really bumming me out. This is my filtered collection class:

class Mage_Catalog_Block_Product_Featured extends Mage_Catalog_Block_Product_Abstract {

public function __construct() {
    parent::__construct();
    $products = Mage::getModel('catalog/product')->getCollection()
                    ->addAttributeToSelect('*')
                    ->addAttributeToFilter('featured',array('eq' => 1))
                    ->addAttributeToFilter('status', array('eq' => 1))
                    ->setPageSize(4)->setCurPage(1)
                    ->setStore(Mage::app()->getStore()->getStoreId());

    $this->setProductCollection($products);
}

More importantly 404 page shows up not all times. Is this some rewrite problem?
Because i can open product 100 times and it will open up. But then after some time doing nothing on the page and then click the product it gives me 404 page. That is really really weird..

I'm getting url like this:

$_product->getProductUrl()

Is there a way to fix this? I don't know what i'm doing wrong here. Please help.


texts: Nginx redirect for -only- homepage of old domain, to homepage of new domain

texts:
On the server.rewrites file within the nginx/ map, I have the following logic for redirecting the homepage of an old domain, to the homepage of a new domain:

if ($http_host ~ ^(www\.)?olddomain.com ) {
   return 301 https://www.newdomain.com$request_uri;
}

This is not working as expected, because all other url's inside the old domain are also being redirected.

Example: olddomain.com/someurl is being redirected to newdomain.com/someurl, and the redirect should only work for the home page.

Any ideas on how I could adjust the above mentioned code? Thanks for your contributions.


texts:
I'm using Magento CE 2.1, deploy:mode:set was set to developer.

I have added attribute city_id for entity CUSTOMER_ADDRESS. Address was created in register form. But it wasn't able to save data for the custom attributes.

When debugging, I see that the address was saved by:

In: vendor/magento/module-customer/Model/ResourceModel/AddressRepository.php

    /**
     * Save customer address.
     *
     * @param \Magento\Customer\Api\Data\AddressInterface $address
     * @return \Magento\Customer\Api\Data\AddressInterface
     * @throws \Magento\Framework\Exception\LocalizedException
     */
    public function save(\Magento\Customer\Api\Data\AddressInterface $address)
    {
        $addressModel = null;
        $customerModel = $this->customerRegistry->retrieve($address->getCustomerId());
        if ($address->getId()) {
            $addressModel = $this->addressRegistry->retrieve($address->getId());
        }

        if ($addressModel === null) {
            $addressModel = $this->addressFactory->create();
            $addressModel->updateData($address);
            $addressModel->setCustomer($customerModel);
        } else {
            $addressModel->updateData($address);
        }
        ...
    }

Address model will call updateData to populate $address data into Address Model.

     /**
     * Update Model with the data from Data Interface
     *
     * @param AddressInterface $address
     * @return $this
     * Use Api/RepositoryInterface for the operations in the Data Interfaces. Don't rely on Address Model
     */
    public function updateData(AddressInterface $address)
    {
        // Set all attributes
        $attributes = $this->dataProcessor
            ->buildOutputDataArray($address, '\Magento\Customer\Api\Data\AddressInterface');

        foreach ($attributes as $attributeCode => $attributeData) {
            if (AddressInterface::REGION === $attributeCode) {
                $this->setRegion($address->getRegion()->getRegion());
                $this->setRegionCode($address->getRegion()->getRegionCode());
                $this->setRegionId($address->getRegion()->getRegionId());
            } else {
                $this->setDataUsingMethod($attributeCode, $attributeData);
            }
        }
        ...
    }

I have rewritten class Magento\Customer\Api\Data\AddressInterface in di.xml
to my custom class to add method setCityId() and getCity(). But it doesn't impact to the current process, the system only gets attribute from the interface Magento\Customer\Api\Data\AddressInterface. My rewrite doesn't impact to this process.

I have another solution. We need to rewrite updateData function and manually set my custom value, but I would like to clarify in this point.

$attributes = $this->dataProcessor
            ->buildOutputDataArray($address, '\Magento\Customer\Api\Data\AddressInterface');

I see the method buildOutputDataArray will be Reflection class \Magento\Customer\Api\Data\AddressInterface, but why it doesn't take my rewritten class (My class in di.xml is Voo\Customer\Model\Data\Address reference to Magento\Customer\Api\Data\AddressInterface).


texts: Language magento 1.9 description by admin panel

texts: I have 2 stores., one store has 2 store view (english, french) & other store has 3 store view (english, french, german). I add the description of products manually by admin panel according to the language one by one. Is there any way to add description in the first store (french) & then the description automatically add in second store (french).


texts: Magento 2: How to add or merge quote to customer cart using quote id programmatically?

texts:
I'm using Magento 2.3.4 and i need to add quote or merge quote to the customer cart using quote id, for example:
$customerId = 12;
$quoteId = 30;
if($this->isGuessQuote($quoteId)){ // check whether quote has been assigned to the customer or not
  $this->addQuoteToCustomerCart($customerId,$quoteId); // add or merge quote to customer cart
}

how can i achieve this?


texts:
I have a Magento 2 website in our server. I want to setup a local copy of the website in my system. In Magento 1, we usually take a complete backup of the files and DB and place them in the target system. Then we would remove the app/etc/local.xml file which will proceed the installation again.

What is the equivalent for Magento 2 for the same process?


texts: WYSIWYG editor is not selecting the image name

texts:
Selecting from thumbnail not showing the complete path of image. It is insert below

<img src="{{media url="wysiwyg/"}}" alt="" />

I tried everything but cannot solved this issue. Thumbnail are showing and uploader work too.

Anyone face the similar issue?

Magento ver. 1.9.3.2


texts: setup:di:compile - Warning: Narrowing occurred during type inference

texts:
I'm getting this error when running php -f bin/magento setup:di:compile

  Warning: Narrowing occurred during type inference

Does anyone know how to fix it?

  php -f bin/magento setup:di:compile -vvv Compilation was started.
  Proxies code generation... 0/7 [>---------------------------]   0% < 1
  sec 34.0 Proxies code generation... 1/7 [====>-----------------------]
  14% 1 sec 36.0 MiRepositories code generation... 1/7
  [====>-----------------------]  14% 1 sec 36.0 MiB

  [Exception]   Warning: Narrowing occurred during type inference.
  Please file a bug report    on bugs.php.net in
  vendor/composer/ClassLoader.php on line 444

  Exception trace:  () at
  vendor/magento/framework/App/ErrorHandler.php:61
  Magento\Framework\App\ErrorHandler->handler() at
  vendor/composer/ClassLoader.php:444
  include() at vendor/composer/ClassLoader.php:444
  Composer\Autoload\includeFile() at
  vendor/composer/ClassLoader.php:322
  Composer\Autoload\ClassLoader->loadClass() at n/a:n/a
  spl_autoload_call() at n/a:n/a
  class_exists() at
  setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php:122
  Magento\Setup\Module\Di\Code\Reader\ClassesScanner->includeClasses()
  at
  setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php:108
  Magento\Setup\Module\Di\Code\Reader\ClassesScanner->extract() at
  setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php:79
  Magento\Setup\Module\Di\Code\Reader\ClassesScanner->getList() at
  setup/src/Magento/Setup/Module/Di/App/Task/Operation/RepositoryGenerator.php:61
  Magento\Setup\Module\Di\App\Task\Operation\RepositoryGenerator->doOperation()
  at setup/src/Magento/Setup/Module/Di/App/Task/Manager.php:56
  Magento\Setup\Module\Di\App\Task\Manager->process() at
  setup/src/Magento/Setup/Console/Command/DiCompileCommand.php:205
  Magento\Setup\Console\Command\DiCompileCommand->execute() at
  vendor/symfony/console/Command/Command.php:242
  Symfony\Component\Console\Command\Command->run() at
  vendor/symfony/console/Application.php:842
  Symfony\Component\Console\Application->doRunCommand() at
  vendor/symfony/console/Application.php:193
  Symfony\Component\Console\Application->doRun() at
  vendor/magento/framework/Console/Cli.php:104
  Magento\Framework\Console\Cli->doRun() at
  vendor/symfony/console/Application.php:117
  Symfony\Component\Console\Application->run() at
  bin/magento:23

  setup:di:compile

In vendor/composer/ClassLoader.php line 443~445

{
    include $file;
}

If I run php bin/magento deploy:mode:set production it will show this code

Enabled maintenance mode
Starting compilation
Something went wrong while compiling generated code. See the error log for details.
Command returned non-zero exit code:
`/opt/cpanel/ea-php71/root/usr/bin/php -f bin/magento setup:di:compile`


texts: Magento 2 - how to make a custom (home) page-layout

texts:
The overrides structure that I have made for custom theme is (based on Blank):

app > design > frontend > Magento > gc>Magento_Theme > templates

It's now possible to override phtml file.

Now I would like to make a custom layout.

for app > design > frontend > Magento > gc > Magento_Theme > layouts.xml.

I edited the file with:

<?xml version="1.0" encoding="UTF-8"?>

<page_layouts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/PageLayout/etc/layouts.xsd">
    <layout id="1column">
        1 column
    </layout>
    <layout id="2columns-left">
        2 columns with left bar
    </layout>
    <layout id="2columns-right">
        2 columns with right bar
    </layout>
    <layout id="3columns">
        3 columns
    </layout>
    <layout id="home-gc">
        home-gc
    </layout>

</page_layouts>

In app > design > frontend > Magento > gc > Magento_Theme > page_layouts I have made home-gc.xml

<?xml version="1.0"?>

<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
    <update handle="empty"/>
    <referenceContainer name="page.wrapper">
        <container name="header.container" as="header_container" label="Page Header Container"  htmlTag="header" htmlClass="page-header" before="main.content"/>
    </referenceContainer>
</layout>

The home-gc page-layout can be select in CMS > content > pages > design > layout but the homepage is printing out empty.

Which way is best to make a custom page-layout?


texts:
Looking for some help with the recently viewed products block/widget in Magento2.3.2.
Have tried three different approaches - creating the widget in the widget section, creating the widget as a new block, and using an existing (functioning) product list block (best sellers) as a template - yet each time the block just appears as this on the frontend:

This is the code in editor for reference:
{{widget type="Magento\Catalog\Block\Widget\RecentlyViewed" uiComponent="widget_recently_viewed" page_size="5" show_attributes="name,image,price" show_buttons="add_to_cart" template="product/widget/viewed/grid.phtml"}}
Any help would be greatly appreciated.
Thanks.


texts: "URL key for specified store already exists." when renameing category

texts:
I have 3 storeviews in multiple languages (English, Dutch and German).
The all have the same categories but the english names must be translated.
So i select a storeview in the categorie editor in the backend.
But when I rename a category in let's say 'kitchen' to 'Küchen' in german (or to any other name) I get the following error:

"URL key for specified store already exists."

So and i can't change the name to anything whithout getting this error.
I tried to manually add a random url key lets say 'foo1234' but still not working. so i changed the category name and url key to random text. but there is no way i get it changed

I have no idea why i keep getting this error.


texts: TinyMce Magento2 2.3 Source Code Symbol / Setting

texts:
With the 2.3 version of Magento2 the TinyMce Editor lacks the possibility to edit the source code.
how can I activate this setting with the tinymce editor


texts: Is Magento Community and Enterprise are based on SaaS service?

texts:
I'm a new bie for the e-commerce platform. Actually I'm on the R&D stage to choose that which platform can be adopt to us. Therefore if you could reply me on the following it would be much appreciated?

1) Is Magento community and Enterprise edition based on SaaS service? I know MagentoGo is Saas but is two editions are SaaS?

2) Also I found the following link http://saas.smartosc.com/magento-saas/why-saas/ . Do you think as Web development company we should choose for this? or is this purely for typical customers?

3) Can we purchase enterprise extensions for the Magento Community version

Thanks


texts:
I'm currently in the process of setting up a Magento store-front (v1.9). Our products are set up as configurable products. We have an image for the configurable products and an image for each simple product within it. On the category index page there is a filter option so people can filter our products by color. The problem is, in the filtered results they are shown the configurable product image rather than that simple product image.

For example, all our configurable product images are set to the brown version of our product. If a user searches by "green" to see all our green products, they are shown all the results of products available in green, but the images are still brown. Is it possible to set up Magento so it shows the green images of those products instead?


texts: Class *Factory does not exist when get data to show on frontend

texts:
I'm trying to get data from my custom table and show it to frontend.

I followed to this tutorial: https://www.emiprotechnologies.com/technical_notes/magento-technical-notes-60/post/how-to-create-model-resource-model-and-collection-in-magento-2-400

Here is my code:

app/code/HaoNMN/Museinc/Model/SampleTable.php:

<?php
namespace HaoNMN\Museinc\Model;

use Magento\Framework\Model\AbstractModel;

class SampleTable extends AbstractModel
{
    /**
     * Define resource model
     */
    protected function _construct()
    {
        $this->_init('HaoNMN\Museinc\Model\ResourceModel\SampleTable');
    }
}

app/code/HaoNMN/Museinc/Model/ResourseModel/SampleTable.php:

<?php
namespace HaoNMN\Museinc\Model\ResourceModel;

use Magento\Framework\Model\ResourceModel\Db\AbstractDb;

class SampleTable extends AbstractDb
{
    /**
     * Define main table
     */
    protected function _construct()
    {
        $this->_init('museinc_sampletable', 'id');
    }
}

app/code/HaoNMN/Museinc/Model/ResourseModel/SampleTable/Collection.php:

<?php
namespace HaoNMN\Museinc\Model\ResourceModel\SampleTable;

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

class Collection extends AbstractCollection
{
    /**
     * Define model & resource model
     */
    protected function _construct()
    {
        $this->_init(
            'HaoNMN\Museinc\Model\SampleTable',
            'HaoNMN\Museinc\Model\ResourceModel\SampleTable'
        );
    }
}

app/code/HaoNMN/Museinc/Controller/Index/Index.php:

<?php
namespace HaoNMN\Museinc\Controller\Index;

use Magento\Framework\App\Action\Action;
use Magento\Framework\App\Action\Context;
use HaoNMN\Museinc\Model\SampleFactory;

class Index extends \Magento\Framework\App\Action\Action
{
    protected $_modelFactory;

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

    public function execute()
    {
        $sampleModel = $this->_modelFactory->create();

        $item = $sampleModel->load(1);
        var_dump($item->getData());

        $data = $sampleModel->getCollection();
        var_dump($data->getData());
    }
}

And final is my route:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="standard">
        <route id="museinc" frontName="museinc">
            <module name="HaoNMN_Museinc"/>
        </route>
    </router>
</config>

But when I access my url: http://localhost/magentoCE233/museinc/index/index, it got error like this:

I search some post in here and someone said that this is solved by run command php bin/magento setup:di:compile. But when I run, it showed this error:

Can you tell me what wrong did I do?


texts: Magento2 error - The file "/home/hmsdgwtu/public_html/pub/media/tmp/catalog/product/" doesn't exist or not a file

texts:
I have created another store in one website in magento2. After that , when I am editing product I am getting this error

  The file "/home/hmsdgwtu/public_html/pub/media/tmp/catalog/product/"
  doesn't exist or not a file

I am stuck on that anyone have any idea about how to fix that error ?


texts: What should i do with setup directory in magento 2

texts:
my magento version is 2.1.7
and i noticed that there a directory called setup when i go tho this directory via web like exmaple. com/setup i got this message

  Welcome to Magento Admin, your online store headquarters.
  To use the Magento setup wizard sign into your Admin account and navigate to System => Tools => Web Setup Wizard

should i delete this folder ?
or how can i disable it ?


texts: Magento 2 can you call a custom widget inside a custom widget?

texts:
I have two module, which both have custom widget. I want to insert the widget to my second one. Whenever I call my second widget I get the following
{{widget type="Magento\Catalog\Block\Product\Widget\NewWidget" display_type="all_products" products_count="5" template="product/widget/new/content/new_grid.phtml"}}


texts:
How to get media path in Magento 2.1. I tried lots of option but it is not working?

I want to display the image in front-end inside .phtml file.


texts:
I have tested with IE, Chrome, and Firefox for FedEx shipping methods stability issue. In all three browsers we found that during onepage checkout, not all 4 shipping methods we have are listed on the page. Sometimes there are only 2 or 3 methods available, and occasionally it shows no shipping methods and the checkout process got stuck. i would like to troubleshoot this issue to make sure all four shipping methods

how can  i fix it


texts: How can we edit config.xml file of a core module?

texts:
For example, I would like to edit app/code/core/Enterprise/Rma/etc/config.xml,I copied config.xml file to local/Enterprise/Rma/etc/config.xml and made changes but it didn't work.

I don't want to make any other changes to any other files of RMA module.


texts: Where is the product search call in magento 1?

texts:
I want to modify product search magento 1 , but i am not able to find the search call in magento 1 files ,
please let me know if anybody knows it or how to find it ?
Thanks


texts: how to set Custom Select and MultiSelect value while Product add Programatically Magento 2

texts:
I am working on to create a simple product programmatically.

I have created 2 custom Attribute

Select(select_testing)
MultiSelect(multiselect_testing)

select_testing attribute value ==> 1, 2, ,3, 4.
multiselect_testing attribute value --> 1, 2, 3, 4.

So, I try to add Product using following code.

  $_objectManager = \Magento\Framework\App\ObjectManager::getInstance(); // instance of object manager
  $simple_product = $_objectManager->create('\Magento\Catalog\Model\Product');
  $simple_product->setSku('test-sku');
  $simple_product->setName('SimpleProduct');
  $simple_product->setRkTesting('Rk Testing');
  $simple_product->setSelectTesting('1');
  $simple_product->setMultiselectTesting(array("1","2"));
  $simple_product->setYesTesting(1);
  $simple_product->save();

But, Select and Multiselect attribute value not save.

Suggest me, how to add Select and multiselect Attribute value.


texts: Individual Shipping Rate per product along with Table Rate - Magento 2

texts:
I am using the table rate (price vs destination) shipping method. Along with these data I also need individual shipping rates per product.So the shipping rate from the table-rate should only be used if there is no individual shipping rate is specified for the product. Can anyone help me here

Many thanks in advance.


texts:
<?php $columnsLimit = $block->getColumnsLimit() ?: 0; ?>

What is the use of $columnsLimit in Magento theme topmenu.phtml?


texts:
I have products with different sizes and their availability varies.
Like Product A is available in S, M, L, XL and the respective availability is 0,2,5,1

How to configure it in Magento.


texts:
I have a client's site that is currently using Magento 1.9.1.0 and need to apply the latest patches. I've applied both 10266 and 10336 (in that order) - all good. However on the description for 10266, it states the following:

  SUPEE-10266 for Magento Commerce (Enterprise Edition) includes a fix
  for a functional issues MPERF-9685, related to checkout with a zero
  order amount. This fix is not included in release 1.14.3.6. However,
  in some cases, SUPEE-10266 can cause issues in the checkout process.
  Specifically, if a customer enables the Add gift options checkbox
  during checkout, the checkout process will not progress beyond the
  payments step. Magento released a fix for this issue as a new patch
  SUPEE-10348, that needs to be installed on top of SUPEE-10266.

I can't find the download for 10348 anywhere, and I do not have Magento support, so how do I install this patch?


texts: Preselect default options in the Ui-select component of Magento 2

texts:
I'm able to load custom options into the select but I don't know how to pre-select some of these options at page load

My UI field:

<field name="products">
    <argument name="data" xsi:type="array">
        <item name="options" xsi:type="object">vendor\Module\Model\Attribute\Source\SourceName</item>
          <item name="config" xsi:type="array">
          <item name="label" xsi:type="string" translate="true">Products</item>
          <item name="componentType" xsi:type="string">field</item>
          <item name="formElement" xsi:type="string">select</item>
          <item name="component" xsi:type="string">Magento_Ui/js/form/element/ui-select</item>
          <item name="elementTmpl" xsi:type="string">ui/grid/filters/elements/ui-select</item>
          <item name="dataScope" xsi:type="string">products</item>
          <item name="filterOptions" xsi:type="boolean">true</item>
          <item name="showCheckbox" xsi:type="boolean">true</item>
          <item name="disableLabel" xsi:type="boolean">true</item>
          <item name="chipsEnabled" xsi:type="boolean">true</item>
          <item name="multiple" xsi:type="boolean">true</item>
          <item name="levelsVisibility" xsi:type="number">1</item>
          <item name="sortOrder" xsi:type="number">10</item>
          <item name="required" xsi:type="boolean">true</item>
        </item>
    </argument>
</field>

My options source class:

<?php
namespace vendor\Module\Model\Attribute\Source;

class SourceName implements \Magento\Framework\Option\ArrayInterface
{
  protected $productCollection;

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

  public function toOptionArray()
  {

    // Load the products as options
    $products = $this->productCollection->load();
    $options = [];

    /* @todo: add query to load selected options */

    foreach ($products as $product){
      $options[] = [
        "value" => $product->getId(),
        "label" => $product->getSku()
      ];
    }

    return $options;
  }
}

Preview:

Maybe using dataProviders? Can you provide some example to help me pre-select options ? Thanks


texts: Reindexing process problem: possible to upload db from localhost?

texts:
Magento Version:1.9 (latest), Linux Hosted

I had a Magento website. I added a few configurable products and the error about reindexing process started appearing. As there was nothing I could do, I deleted my website and installed it again. Just after a few amendments the error started appearing again. My php memory limit is set to 256 at max by my host, which I think is the reason for this to happen.

My question is: Is it possible to install and configure magento on my localhost (using xampp or wamp) and then transfer the database with all the stuff there on my remote host?


texts: Help understanding the code and logic behind Magento's full page cache?

texts:
I recently upgraded my Enterprise store to v1.14, and am not convinced that the full page cache is working properly. I say this because there's no difference in page loading times with the FPC turned on/off.

I spent hours trawling through the cache-related core classes, debugging everything, and I noticed that if I logged $this->getMetadata('cache_subprocessor') in the extractContent() method, it was always empty, and therefore - by my understanding - the full page cache would never be rendered!

I'd like help understanding. Please correct me if any of this logic is wrong:

1) To extract content from the cache storage, Magento calls upon Enterprise_PageCache_Model_Processor::extractContent()

2) This method checks if the $content parameter passed to it is empty, and if it is, attempts to load the content from the relevant subprocessor:

 if (!$content && $this->isAllowed()) {
     $subprocessorClass = $this->getMetadata('cache_subprocessor');
     // etc
 }

3) However, that cache_subprocessor metadata key is set inside the processRequestResponse() method; a method which is only called inside the observer method Enterprise_PageCache_Model_Observer::cacheResponse(), which itself is only called after a page has been rendered (controller_front_send_response_before).

So, as I understand it, the cache_subprocessor can only be set once a page has been rendered. But the cache_subprocessor is itself required to render a page from the cache.

If this is correct, how can the full page cache ever possibly work, if a page must be rendered (in the current browsing session, in order to set the cache_subprocessor) before the cache can be used (by the current browsing session)?


texts:
I am new to Magento order status thing. I am observing event when order is refunded but not sure which event to use for the same.

I have few concerns about order refund

Does admin or customer refund the order ?
How can I know if the order is refunded ?
Does the customer raise a return request for refund ?

I need to perform some custom calculations when order is refunded.

For a specific scenario, is it possible to Add some privilege amount to customer when order is Closed and if that order is refunded, restore that privilege amount ?

Please Guide.

Thanks.


texts: Uncaught SyntaxError: missing ) after argument list

texts:
I see this error, related to this line:

var searchForm = new Varien.searchForm('search_mini_form', 'search', 'Cerca nell\\'intero negozio...');

I have to modify "Cerca nell\", but I don't find the file that I should modify. Can you help me?


texts: Magento 2: how to make some JS elements expanded by default?

texts:
In the checkout (Blank theme) there is a block "Order Summary" on the right column.

Inside this block, items in cart are hidden by default. If users want to see the items they have to click an arrow button.

Inspecting the element, the aria-selected and aria-expanded attributes change their value from "false" to "true" when user clicks the arrow.

How can I modify this behavior to display the items by default instead of hiding them?

I want the users to be able to see their items in that block by default.


texts: Module for Accepting Payments via Google Checkout

texts: Is there any Magento extension that works like PayPal Pro website payments? I am looking for on site credit card processing using Google Checkout.


texts:
I have a category with 20000 products and 50 subcategories, while I tried to save that category at that time Magento go into infinite loop and after 10-15 min getting 500 error.

I have set 18000 max time out and 100000 max input vars.
Also in front end category page  showing empty and in HTML body shown as empty

  https://drive.google.com/file/d/0B_qaQlQ9Qh8XeUVQRlFjQ0Q4QXM/view?usp=drivesdk.

Can anyone help me to resolve this issue?
Magento version 2.1.6


texts: Activity Approve From super admin in magento 2

texts:
I am using Magento 2.2.6, and I need to create two admin user, in which one user change anything, it should be mandatory for another user will approve that. then only the changes will affect.
I saw advance permission modules, but this feature is not there.
if any module is available, please let me know or tell me how I can achieve this in Magento 2.


texts:
I am using this code to store particular product image size in my own different folder. but it is storing all the size images in "p1" folder.my image width is 500 and height could be any should be store in p1/c/ . another is width with 280 and height any should be save in p2/c/.

any solution for this?

 if(($this->_width == 500) || (!empty($this->_height)))
    {

    $path = array(
          //  Mage::getSingleton('catalog/product_media_config')->getBaseMediaPath(),
         Mage::getSingleton('catalog/product_media_config'),
           // 'cache',
          //  Mage::app()->getStore()->getId(),
            $path[] = 'p1/C:' // $this->getDestinationSubdir()
        );

}
elseif(($this->_width == 280) || (!empty($this->_height)))
{

       $path = array(
          //  Mage::getSingleton('catalog/product_media_config')->getBaseMediaPath(),
         Mage::getSingleton('catalog/product_media_config'),
           // 'cache',
          //  Mage::app()->getStore()->getId(),
            $path[] = 'p2/C:' // $this->getDestinationSubdir()
        );
}

else
{

   $path = array(
          //  Mage::getSingleton('catalog/product_media_config')->getBaseMediaPath(),
         Mage::getSingleton('catalog/product_media_config'),
           // 'cache',
          //  Mage::app()->getStore()->getId(),
            $path[] = 'R/C:' // $this->getDestinationSubdir()
        );

}


texts: Allow only specific number of quantity products per cart

texts:
I have to allow only specific numbers of total quantity products in cart. For example i have to allow total 10 products per cart. it's doesn't matter to specific product, products from specific category. Whatever only 1o product per cart allowed. If more than 10 then redirect user to cart page and display message.

Please give me some hints or suggestion. I don't have to use any third party extension.


texts: Check if product is variation / has parent?

texts:
This should be easy, but I'm having trouble figuring out / searching out a solution.

What code could I use to check if a product is a variation, or has a parent? I want to execute code if a product is either a configurable product or a simple product without a parent, ignoring all simple products that aren't variations. Any thoughts?


texts: Clear custom cache from cache management Magento 1

texts:
I have created a custom cache using script.
cache is created successfully, i can get it too.
Added cache field for custom cache in cache management.
How to clear that cache custom cache from cache management Magento 1.


texts: How the Quotes enter between the URL written in the default.xml file?

texts:
I have created a block for the header. And it contains static page URLs. I have added the URLs from the Theme default.xml. Here is the code.

<block class="Magento\Framework\View\Element\Html\Link" name="track-orders">
    <arguments>
        <argument name="label" xsi:type="string" translate="true">Track My Orders</argument>
        <argument name="path" xsi:type="string" translate="true">sales/guest/form</argument>
    </arguments>
</block>

When I execute the file it shows the URL like below. What could be the issue?

Track My Orders


texts: Magento 1.9: Revert the inventory if cancel the order from back-end by admin?

texts: How to do inventory back if order cancel from backend by admin?


texts:
i got a new SOAP Error Unknown Content-Encoding after updating php to 5.4

phpinfo(); at magento:
HTTP_ACCEPT_ENCODING    gzip,deflate,sdch

getLastRequestHeaders :

POST /index.php/api/soap/index/ HTTP/1.1
Host: www.abc.de
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.3.3-7+squeeze19
Content-Type: text/xml; charset=utf-8
SOAPAction: "urn:Mage_Api_Model_Server_HandlerAction"
Content-Length: 2592

SoapFault Object
(
    [message:protected] => Unknown Content-Encoding
    [string:Exception:private] =>
    [code:protected] => 0
    [file:protected] => /var/www/kusy/module/magentoapi/magento.class.php
    [line:protected] => 158
    [trace:Exception:private] => Array
        (
            [0] => Array
                (
                    [function] => __doRequest
                    [class] => SoapClient
                    [type] => ->
                    [args] => Array
                        (
                            [0

** Update 15:02 **

i check the sample code from magento api website to create a product. this is the result:

    __getLastRequestHeaders :
    POST /index.php/api/soap/index/ HTTP/1.1
    Host: www.abc.de
    Connection: Keep-Alive
    User-Agent: PHP-SOAP/5.3.3-7+squeeze19
    Content-Type: text/xml; charset=utf-8
    SOAPAction: "urn:Mage_Api_Model_Server_HandlerAction"
    Content-Length: 2552

    __getLastResponseHeaders :
    HTTP/1.1 200 OK
    Date: Thu, 03 Jul 2014 13:01:18 GMT
    Server: Apache/2.2.9 (Debian) PHP/5.4.30-1~dotdeb.0 mod_python/3.3.1 Python/2.5.2 mod_ruby/1.2.6 Ruby/1.8.7(2010-08-16) mod_ssl/2.2.9 OpenSSL/0.9.8o
    X-Powered-By: PHP/5.4.30-1~dotdeb.0
    Content-Encoding: none
    Connection: close
    Content-Length: 506
    Content-Type: text/xml; charset=UTF-8

    object(SoapFault)#2 (9) {
      ["message":protected]=>
      string(24) "Unknown Content-Encoding"
      ["string":"Exception":private]=>
      string(0) ""
      ["code":protected]=>
      int(0)

I solve the Problem.

In php.ini

    zlib.output_compression = On

And in php:

    $client = new SoapClient($url, array('compression'=> SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP,'trace'=>true,'exceptions'=>true));


texts: How to diagnose "Invalid block type .." error?

texts:
Not sure how to figure out this error, I've been googling for a week and I can't seem to find a solution. Any ideas?

2013-06-10T04:04:28+00:00 ERR (3):
exception 'Mage_Core_Exception' with message 'Invalid block type: ' in /home/xxxxxxx/public_html/app/Mage.php:594
Stack trace:
#0 /home/xxxxxxx/public_html/app/code/core/Mage/Core/Model/Layout.php(495): Mage::throwException('Invalid block t...')
#1 /home/xxxxxxx/public_html/app/code/core/Mage/Core/Model/Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance('', Array)
#2 /home/xxxxxxx/public_html/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('', 'checkout.cart')
#3 /home/xxxxxxx/public_html/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('', 'checkout.cart')
#4 /home/xxxxxxx/public_html/app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#5 /home/xxxxxxx/public_html/app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#6 /home/xxxxxxx/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#7 /home/xxxxxxx/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#8 /home/xxxxxxx/public_html/app/code/core/Mage/Checkout/controllers/CartController.php(159): Mage_Core_Controller_Varien_Action->loadLayout()
#9 /home/xxxxxxx/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Checkout_CartController->indexAction()
#10 /home/xxxxxxx/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#11 /home/xxxxxxx/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#12 /home/xxxxxxx/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#13 /home/xxxxxxx/public_html/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#14 /home/xxxxxxx/public_html/index.php(89): Mage::run('', 'store')
#15 {main}


texts: "Edit" column in CMS block grid (Row id in `_prepareColumns()` )

texts:
I want to create a column with "Edit" hyperlink to open the row in a new page.

I have created the column like this:

$this->addColumn('action_edit', array(
        'header'   => 'edit',
        'width'    => 15,
        'sortable' => false,
        'filter'   => false,
        'type'     => 'action',
        'actions'  => array(
            array(
                'url'     => $link,
                'caption' => 'edit',
            ),
        )
    ));

But I do not know how to get the correct url to replace the $link with.
I know I want the same link that already exists as the row "title", but I can't figure out how to get it programmatically.

Also, just getting the row id would solve my issue I believe.

EDIT


texts:
Magento catalogrule: how to have prices ready and showing at midnight exactly?

I've two catalogrules in my Magento ver. 1.9.2.1 shop:

Already started, has and end_date of today (so: it is effective until tonight at 23:59)
Starts tomorrow (so: tonight at midnight (00:00))

tl;dr

How can I make catalogrule_apply_all calculate the prices both for now (with today rule) and for tomorrow (with tomorrow rule)?

Longer version

My rules:

rule_id name    description from_date   to_date is_active   conditions_serialized   actions_serialized  stop_rules_processing   sort_order  simple_action   discount_amount sub_is_enable   sub_simple_action   sub_discount_amount
15  FIRST   NULL    2017-10-31  2017-11-02  1   snip, conditions are OK snip, actions are OK    1   0   by_percent  90.0000 1   by_percent  90.0000
16  SECOND  NULL    2017-11-03  NULL    1   snip, conditions are OK snip, actions are OK    1   0   by_percent  5.0000  1   by_percent  5.0000

Due to both marketing and local legislation, I need the timings to work as described (a few minutes off is ok, but 10 mins are already too much).

The problem is that if I run catalogrule_apply_all tomorrow at midnight, it takes 2 hrs to complete (the store has a 200.000 products and 50 rules), so we are waaay late.

So my strategy would be to run catalogrule_apply_all at 21:00 of today (the day before the 2nd rule is set to kick in), expecting to have the price pre-calculated and ready for midnight. That's not the case: if I hack the clock to "tomorrow", I still see "today" prices.

Database-wise, this is what I see (in a nutshell: records are OK as long as I run catalogrule_apply_all the same day of the rule).

If I run catalogrule_apply_all today at 21:00 (sudo timedatectl set-ntp false && sudo date --set="2 nov 2017 21:00:00" && n98-magerun.phar sys:cron:run catalogrule_apply_all && n98-magerun.phar sys:cron:run catalog_product_index_price_reindex_all && n98-magerun.phar cache:dir:flush), this is what I find in catalogrule_product_price:

rule_product_price_id   rule_date   customer_group_id   product_id  rule_price  website_id  latest_start_date   earliest_end_date
8   2017-11-01  0   120 2.9900  1   2017-10-31  2017-11-02
9   2017-11-02  0   120 2.9900  1   2017-10-31  2017-11-02

If I run catalogrule_apply_all tomorrow at 10:00am (I'm using a +10hrs offset from midnight to exclude any timezone interference, sudo timedatectl set-ntp false && sudo date --set="3 nov 2017 10:00:00" && n98-magerun.phar sys:cron:run catalogrule_apply_all && n98-magerun.phar sys:cron:run catalog_product_index_price_reindex_all && n98-magerun.phar cache:dir:flush), this is what I find in catalogrule_product_price:

rule_product_price_id   rule_date   customer_group_id   product_id  rule_price  website_id  latest_start_date   earliest_end_date
11  2017-11-03  0   120 28.4050 1   2017-11-03  NULL
12  2017-11-04  0   120 28.4050 1   2017-11-03  NULL

So... yes, each rule iworks if I run catalogrule_apply_all the same day of the rule effective date.

Context

flat tables are disabled
I'm simulating with only one product in the dev DB. It's the one that's affected by the rule


texts:
I am trying to remove the shipping method from magento onepage checkout page by a new module refering to the second solution on this link [Remove Shipping steps in Onepage Checkout

but its not working....  please help me how can i adapt onepage.phtml ?


texts: Magento CE 2.0.0 upgrade to Magento CE 2.0.1 Fails to update with no errors

texts:
After Getting the System Upgrade to Complete a Readiness Check and Complete the Full backup the Update process begins after 5 minutes some lines are displayed in the Console log.

[2016-01-22 10:44:07 UTC] Job "maintenance_mode {"enable":true}" has been started
[2016-01-22 10:44:07 UTC] Magento maintenance mode is enabled.
[2016-01-22 10:44:07 UTC] Job "maintenance_mode {"enable":true}" has successfully completed
[2016-01-22 10:44:07 UTC] Job "update {"components":[{"name":"magento/product-community-edition","version":"2.0.1"}]}" has been started
[2016-01-22 10:44:07 UTC] Starting composer update...

After sitting for an almost 2 hours with only this being displayed in the Console Log I'm clueless to know what happen because Google Inspect/Network displays that

Status

{,…}
complete: false
error: false
isUpdateInProgress: true
pending: false

Ideas?

After 11.4 hours of wating and the status being updating saying no errors the installation finally completed saying it has stopped due to error then says try to roll the system back. or click here to manually roll the system back.
This is my var/update_status.log

[2016-01-22 10:44:07 UTC] Job "maintenance_mode {"enable":true}" has been started
[2016-01-22 10:44:07 UTC] Magento maintenance mode is enabled.
[2016-01-22 10:44:07 UTC] Job "maintenance_mode {"enable":true}" has successfully completed
[2016-01-22 10:44:07 UTC] Job "update {"components":   {"name":"magento/product-community-edition","version":"2.0.1"}]}" has     been started
[2016-01-22 10:44:07 UTC] Starting composer update...
[2016-01-22 10:44:07 UTC] ./composer.json has been updated

Then I tried clicking the Rollback button which run no code just greyed the box out.
So then i proceeded to do the manual rollback using magento.docs
rolled back media and code successfully then must have error-ed out while doing DB rollback because then the file bin/magento Poof diapered.


texts: CSS not loading after Magento 2.1 install: Mac OS X with Nginx

texts:
I have just followed the installation steps

Have configured my nginx conf exactly as per mage docs guide (to include the nginx.conf.sample file in my nginx site's conf file)

Magento has installed OK, but when I view the backend, the CSS is not loading (very bare HTML + links loading).

When I view the HTML for the page, I can see it is trying to load file eg:
http://helloworld.dev/static/version1504621364/adminhtml/Magento/backend/en_US/extjs/resources/css/ext-all.css

However, on my server there is no folder 'version1504621364'  ...

I have come across this page but not finding it very helpful especially since I am using nginx rather than apache.

I have also already run: php bin/magento setup:static-content:deploy

Also have tried putting system into production / developer mode ... nothing working ...

No luck (neither front nor backend)... not sure why magento is throwing in that version1504621364 folder when requesting the CSS (or how to disable / fix it in either magento config / nginx config?)

any help much appreciated,
g

OS: Mac OS X sierra
nginx
PHP 7


texts: Magento upgrade deleted admin design and skin files

texts:
I have performed a Magento version upgrade (from 1.9.0.1 to 1.9.3.10) using the mage shell script. The upgrade completed without throwing any error, but it deleted all the admin files in app/design and skin.

Did anyone experience this? How can I fix it?

Thank you


texts: Magento2 Extension-Attribute of type \DateTime?

texts:
I'am trying to add an extension-attribute to Magento_Customer like this:

<extension_attributes for="Magento\Customer\Api\Data\CustomerInterface">
    <attribute code="some_attribute" type="\DateTime" />
</extension_attributes>

The goal is to have a datetime-Column in SQL and an \DateTime-Object in PHP.

But every time I try to do this it somehow ends in an reflection error like this:

1 exception(s):
Exception #0 (InvalidArgumentException): Each getter must have a doc block. See DateTime::format()

I've tried to wrap this in an extra getter/setter-Class and not to use \DateTime directly as an extension attribute but at some point is has to return \DateTime from a getter and this will also be picked up recursively by the reflections implementation of Magento2.

What am I missing here ?


texts: Why the Google Data Highlighter for products isn't showing in Google?

texts:
I have a few sites that make it difficult for me to go in and implement structured data by code - Thus I revert to using Google's Data Highlighter in Search Console.

I have marked up two sites to test the results with - Google recognises the "Product" data added, no errors, but even after a whole month, the prices rich snippet doesn't appear.

I am wondering if anyone has had any experience working with this tool and why Google hasn't shown me any rich snippets yet - The sites I work with are well known local brands, sell a ton of products, and receive plenty of traffic.


texts: Magento 2 How to add attribute options values into dropdown attribute programmatically

texts: I have brand attribute in Magento and want to import all it's options.


texts: Adding multiple products to cart failing

texts:
Assuming I want to create a link for the customer to click on that automatically adds some items to cart and redirects them to the cart.

I created a controller that adds two items to cart, problem is, it's only adding the first item to cart, tried switching the order of the items and same problem.

Any ideas?

public function specialsAction(){
    $prod_one = Mage::getModel('catalog/product')->setStoreId(Mage::app()->getStore()->getId())
        ->load($prod_one_id);
    $prod_two = Mage::getModel('catalog/product')->setStoreId(Mage::app()->getStore()->getId())
        ->load($prod_two_id);

    $params_one = array(
        'product' => $prod_one->getId(),
        'qty' => 1
    );

    $params_two = array(
        'product' => $prod_two->getId(),
        'qty' => 1
    );
    $cart = Mage::helper('checkout/cart')->getCart();

    // this item gets saved to cart, since its the first item i'm adding
    $cart->addProduct($prod_one, $params_one);
    $cart->save();
    Mage::getSingleton('checkout/session')->setCartWasUpdated(true);

    // this item does NOT get added (unless I add it first to the cart)
    $cart->addProduct($prod_two, $params_two);
    $cart->save();
    Mage::getSingleton('checkout/session')->setCartWasUpdated(true);

    $this->_redirect('checkout/cart');
}

Answer

Since the answer below is a bit ambiguous I'm pasting the solution below:

    $cart->addProduct($prod_one, $params_one);
    // REMOVE these two lines and place them only at the end of all the product additions
    //$cart->save();
    //Mage::getSingleton('checkout/session')->setCartWasUpdated(true);

    $cart->addProduct($prod_two, $params_two);

    // HERE is where we save
    $cart->save();
    Mage::getSingleton('checkout/session')->setCartWasUpdated(true);


texts:
I have created custom attribute for featured product and fetched the product collection using object manager.

 <?php
 $objectManager =  \Magento\Framework\App\ObjectManager::getInstance();
 $priceHelper = $objectManager->create('Magento\Framework\Pricing\Helper\Data');

  $collection = $objectManager->create('\Magento\Catalog\Model\ResourceModel\Product\Collection')
  ->addAttributeToSelect('*')
  ->addAttributeToFilter('newest_product',['eq'=>1])
  ->addAttributeToFilter('status',\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED)
  ->load();

   foreach ($collection as $product)
  {
    $pdata = $product->getData();
    $store = $objectManager->get('Magento\Store\Model\StoreManagerInterface')->getStore();
    $imageUrl = $store->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA) . 'catalog/product' . $product->getImage();

 }
 ?>

Here $imageUrl Returns the full image of the Product while I want the image of 300X400

I am trying to get the 300X400 size image in $imageurl code but not sure how to get the resized image. If you see the code, I have not used the helper method.

Need help to resize the product image to 300X400.

Any help would be appreciated.


texts: Code that Track the Last Added Item on cart

texts:
I would like to ask about the way to track the last item added on the cart. I don't want to switch the product I just want to track it and display it on the error handling of the Cart. How would I do it?

Note: I only allow a single product on cart and disregard the last item added if not same with the product on the cart.


texts: Is it possible to integrate sms process in magento 2

texts: I have searched sms code for magento 2. But there is only purchased extension only there. Is it possible to integrate sms in magento 2 by only coding?


texts:
We have a sidebar that says "others also liked" but what is it basing that off of? We don't have a "like" feature and the products don't have any rhyme or reason. If you click reload it's just another random 3 products.

Is there a way to control that sidebar?


texts: How do I correct the following in Magento 2.1.2: Fatal error: Call to a member function getId() on null

texts:
The path to the file is: C:\XXX\www\magento212\vendor\magento\framework\View\Model\Layout\Merge.php on line 751

Here are the Line numbers followed by the code with the actual line 751

741  /**
742  * Find the closest physical theme among ancestors and a theme itself
743  *
744  * @param \Magento\Framework\View\Design\ThemeInterface $theme
745  * @return \Magento\Theme\Model\Theme
746  * @throws \Magento\Framework\Exception\LocalizedException
747  */
748  protected function _getPhysicalTheme(\Magento\Framework\View\Design\ThemeInterface $theme)
749   {
750       $result = $theme;
751     while ($result->getId() && !$result->isPhysical()) {
752           $result = $result->getParentTheme();
753       }
754       if (!$result) {
755           throw new \Magento\Framework\Exception\LocalizedException(
756               new \Magento\Framework\Phrase(
757                'Unable to find a physical ancestor for a theme \'%1\'.',
758                   [$theme->getThemeTitle()]
759               )
760           );
761       }
762       return $result;
763   }

I would appreciate some help. Thanks in advance for your time.


texts: Magmi Ignore Entire Column - Not just specific rows inside a column

texts:
I know Magmi has this page about their "MAGMI_IGNORE" function, but it don't think it will work for my purposes.

My goal is to use specific columns with the CONCATENATE function (in google sheets / microsoft excel) to select attribute options from a multiselect field. The values to be concatenated will be separated by columns, then grouped together in the cell with the equation.

Doing this manually works without any issues when cell contents are:

a, b, c - values separated by comma followed by a space (with the Value Trimmer option enabled)

I have yet to test - and probably should have first - but I assume having the column headers be __MAGMI_IGNORE__ will not work as desired. Their wiki only shows the function being used as a non-header row's cell value.

Has anyone else tried this and wants to answer the question with their experience so others can find this info quicker than I did?


texts: Unable to display taxvat builtin magento field in addresses

texts:
In Magento 1.7 and 1.8 there are 2 "eav_attribute" regarding VAT: 'vat_id' and 'taxvat'.
I can display the vat_id on customer address simply from system -> configuration -> customer configuration adding in the address templates:

{{depend vat_id}}VAT ID: {{var vat_id}}{{/depend}}

And it works fine.
if I try the same thing with the  'taxvat' field

{{depend taxvat}}CF: {{var taxvat}}{{/depend}}

it doesn't work...

I think that it depends from the file

/app/code/core/Mage/Customer/etc/config.xml

so I create a custom module and added my config.xml, then I tried to edit the configuration to make the taxvat field like the vat_id field, but still it doesn't work.
What's the best practice to display this builtin field in the address?


texts: display blog category name through blog category id in magento2

texts:
I have a module for a blog in that I have different categories now I want print category name in phtml file through category id in magento2 I am getting category id
code to display category id

<?php
$categoryIds = $_post->getCategories();
print_r($categoryIds);
?>

through this code blog category id is coming now i want to display title


texts: How to change magento My Account links order

texts:
Hi I need to change magento my account links order. Now it looks like bellow

Account Information
Address Book
My Orders
My Wishlist

I need to change the order like,

My Orders
My Wishlist
Account Information
Address Book


texts:
Since a couple month i am having a problem with Paypal integration. Specifically "Paypal Express"

The problem is that some customers are stuck at the redirection, it's not continuing to Paypal.

Sometimes it's not continuing after Paypal back to the shop to complete the order. In the back end I have some missing order numbers.
When I try with my computer to pay with Paypal it works...
The second problem is that "Paypal Standard" is not shown at checkout, that's why I had to choose "Paypal Express".

Error:

'PayPal NVP gateway errors: This transaction couldn't be completed. Please redirect your customer to PayPal (#10486: This transaction couldn't be completed). Correlation ID: 15378a2c52092. Version: 72.0.'

I'm working with Magento ver. 1.6


texts: How can I change the caption of the button at the PayPal website? (PayPal Express Checkout)

texts: how can I change the button caption at the PayPal website? I read that the caption is depending on the url (https://developer.paypal.com/docs/classic/express-checkout/integration-guide/ECCustomizing/), but I dont know how I can change this required parameter.


texts:
I am facing below issue:

I have added couple of products (say P1 and P2) in cart. Now I have disabled P2 from admin.
Now when I am visiting the checkout page by clicking the checkout link, Magento removes the disabled product from quote but it does not display any message for it.

How can I show the item removal message in this scenario?


texts:
So, I have added a column to sales_order table. It is varchar type and it has some data in it.

I found tutorial:

here

that show what I want to achieve exactly.

Now, I am running Magento 2.2.3. and the exact same tutorial is not working for me. It just shows loading element and says

  Attention Something went wrong.

and then there is echoed error: "Something went wrong with processing the default view and we have restored the filter to its original state.
"

So, here are my classes and xmls:

Collection.php

use Magento\Sales\Model\ResourceModel\Order\Grid\Collection as OriginalCollection;

class Collection extends OriginalCollection
{
    protected function _renderFiltersBefore()
    {
        $joinTable = $this->getTable('sales_order');

        $this->getSelect()->joinLeft(
            ["so" => $joinTable],
            'main_table.entity_id = so.entity_id',
            array('customer_manager')
        );

        parent::_renderFiltersBefore();
    }

}

di.xml

 <type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory">
    <arguments>
        <argument name="collections" xsi:type="array">
            <item name="sales_order_grid_data_source"
                  xsi:type="string">Silk\Customerstaff\Model\ResourceModel\Order\Grid\Collection
            </item>
        </argument>
    </arguments>
</type>

sales_order_grid.xml

   <?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <columns name="sales_order_columns">
        <column name="customer_manager">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="filter" xsi:type="string">select</item>
                    <item name="label" xsi:type="string" translate="true">Customer Manager</item>
                    <item name="sortOrder" xsi:type="number">10</item>
                <item name="customer_manager" xsi:type="string">sales_order.customer_manager</item>
                <item name="options" xsi:type="object">Silk\Customerstaff\Ui\Component\Listing\Column\Order\CustomerManagerOptions</item>
                </item>
            </argument>
        </column>
    </columns>
</listing>

And CustomerManagerOptions.php

class CustomerManagerOptions
{
    /**
     * @var array
     */
    protected $options;

    /**
     * @var CollectionFactory
     */
    protected $collectionFactory;

    /**
     * Constructor
     *
     * @param CollectionFactory $collectionFactory
     */
    public function __construct(CollectionFactory $collectionFactory)
    {
        $this->collectionFactory = $collectionFactory;
    }

    /**
     * Get options
     *
     * @return array
     */
    public function optionarray()
    {
        \Zend_Debug::dump('levu levic');
        if ($this->options === null) {
            $this->options = $this->collectionFactory->create()->toOptionArray();
        }

        return array(array('value' => 'Vukasin Vulovic', 'label' => 'Vukasin Vulovic'));
    }

}

Does anybody have any idea why is this happening?

Thanks


texts: When i creates new configurable products the product page not opening

texts:
When i created new products as configurable products, the products are being displayed on catalog list page but when we open product page the page is not opening and showing "No data received" and Reload Page.

I have done with all settings in product settings. cleared cache, Reindexed URL Rewrite, But still unable to open the newly created product page.

Please give any solution. Thanks in advance


texts: Magento 2 : List all api user and role belong to a particular user

texts:
In magento 1 I did the below code, which worked fine.

Step 1: Fetch all the active api user list
    try{
            require_once '../app/Mage.php';
            Mage::app();

        $usermodel = Mage::getModel('api/user')->getCollection()->addFieldToFilter('is_active', 1);
        $id = $usermodel->getColumnValues('user_id');$name = $usermodel->getColumnValues('username');
        $api_key = $usermodel->getColumnValues('api_key');
        echo '<pre>';print_r($api_key);exit;

        $ulist = array_combine($id,$name);
    }catch(Exception $e){
        echo $e->getMessage();
    }

$rolemodel = Mage::getModel('api/role')->getCollection();
$role_id = $rolemodel->getColumnValues('role_id');
$role_name = $rolemodel->getColumnValues('role_name');
$list = array_combine($role_id,$role_name);

Step 2: $_GET['id'] = $apiUserId;
Fetch role that belong to a given api user id.

if(isset($_GET['id'])){
    $usermodel = Mage::getModel('api/user')->getCollection();
    $id = $usermodel->getColumnValues('user_id');$name = $usermodel->getColumnValues('username');
    $ulist = array_combine($id,$name);

    $role_id_under_selected_user = Mage::getModel('api/user')->loadByUsername($ulist[$_GET['id']])->getRoles();
    $role_id_under_selected_user = $role_id_under_selected_user[0];
    $rlist = array();
    if($role_id_under_selected_user)
    $rlist[$role_id_under_selected_user] = $list[$role_id_under_selected_user];
}

I need to do the same in magento 2. Can anyone help?


texts: 500 error when trying to open any order from Admin panel

texts:
In admin panel homepage, when I click on any order from the "Last 5
  orders" section I get a 500 error.

  I have tried reading var/log/system.log, and below is the log that was
  created when I encounter that 500 error.

  Warning: include(): Failed opening 'Mage/Customer/Model/Attribute.php' for
  inclusion (include_path='/home/xxx/public_html/app/code/local:/home/xxx/public_html/app/code/community:/home/xxx/public_html/app/code/core:/home/xxx/public_html/lib:.:/opt/cpanel/ea-php56/root/usr/share/pear')
  in /home/xxx/public_html/lib/Varien/Autoload.php on line 94

Is there anything I could do to resolve or identify the root cause of this issue?


texts: static files deleted after php bin/magento setup:upgrade

texts:
While setting up new  module and after running php bin/magento setup:upgrade it started to clean cache and file and deleted all front end css and adminhtml css and all visual files. How Can I prevent this happen again as I need to make that module working?

[user@server html]$ php bin/magento setup:upgrade
Cache cleared successfully
File system cleanup:
/chroot/home/user/rootdir/html/generated/code/Composer
/chroot/home/user/rootdir/html/generated/code/Ebizmarts
/chroot/home/user/rootdir/html/generated/code/Magento
/chroot/home/user/rootdir/html/generated/code/Symfony
/chroot/home/user/rootdir/html/generated/code/Wyomind
The directory '/chroot/home/user/rootdir/html/generated/metadata/' doesn't
exist - skipping cleanup
/chroot/home/user/rootdir/html/pub/static/_po_compressor
/chroot/home/user/rootdir/html/pub/static/adminhtml
/chroot/home/user/rootdir/html/pub/static/deployed_version.txt
/chroot/home/user/rootdir/html/pub/static/frontend
/chroot/home/user/rootdir/html/var/view_preprocessed/pub


texts: I am getting error filtering template: Notice: Undefine Variable :imageBlockBuilder

texts:
I am using Porto theme.I am getting error like

  Error filtering template: Notice: Undefined variable:
  imageBlockBuilder

In my home page.


texts: Hide a Store View from the store view picker, but keep it active for requests using ?__store=myhiddenstore

texts:
I'm trying to hide a store view from the store view picker, but keeping it active for requests like mymagento.com?__store=myhiddenstore

Is there a simple way to achieve this? If not, what are good, clean alternatives?


texts: Magento 2 : Styles not reflected after installation

texts: After installation, the Magento 2, css and js files are not loaded.


texts: How to Know The Magento Event that We Want to Hook

texts:
My question is simple, how to know the Magento event that we want to hook?

Is there any simple solution?


texts: Magento 2 composer issue with bitbucket pipelines

texts:
I made a bitbucket pipeline and I would like to do some deployments, but my pipeline got stuck with a composer issue.
This is the error message from the pipeline:
The 'https://repo.magento.com/archives/magento/framework/magento-framework-102.0.4.0.zip' URL required authentication.
You must be using the interactive console to authenticate

If I access that link, I got this:
You haven't provided your Magento authentication keys. For instructions, visit
https://devdocs.magento.com/guides/v2.3/install-gde/prereq/connect-auth.html

But the thing is that I have my keys added in the auth.json and if do a composer install or update, it works, so I m not sure why it doesn't work from the pipeline and what exactly that error means. Can you please clarify it ? or give me some advice?
Thank you


texts:
In the two column layout on the category page the banner is contained in the right column alongside the left column filter. What is the best practice to position that banner above the 2 columns so that it is at a 100% width?

Thanks


texts: Catalog price rules: priority + stop further rules

texts:
we offer 30% as standard discount on all articles.
There are 3 customers groups (cus35%, cus40% and cus45%) which get more discount on special categories.
So there must be 4 rules like this:
Rule #1: 30% | all customer groups | whole catalog | which priority? | stop further rules?
Rule #2: 35% | group c35% | special cats | which priority? | stop further rules?
Rule #3: 40% | group c40% | special cats | which priority? | stop further rules?
Rule #4: 45% | group c45% | special cats | which priority? | stop further rules?
The rules are set up but we still struggling with problems like a) multiple discounts are applied (e.g. 40% and another 30% from the basic discount) or b) no more than 30% for customer group c40%.
Any tipps how to set up the rules right in terms of a) priority and b) "stop-rule" yes/no?
Many thanks! :)


texts: Shipping address gets missing after page refresh magento2

texts:
I have tried the below link and some github links
Shipping Address Missing on Payment Page Refresh

When i refresh the page in second step billing address gets empty only country will be visible.
Anyone suggest what is causing for this, I dig out more with no success.


texts: Magento 2 deployment without downtime - are there proven production strategies?

texts:
We know the recommended Magento 2 deployment process which roughly contains the following steps:

php bin/magento maintenance:enable
composer require <package> <version> --no-update
composer update
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
php bin/magento maintenance:disable

This process includes a downtime which can take a while depending on different factors like the number of modules, dependencies and of course the included database changes in a version.
While the static content can easily be deployed in non production environment and taken later into production (e.g. container, simlinks etc.), the database schema update is a challenge.

I have read a lot about this issue, for example the answers and discussion to this question: Can you achieve zero downtime deployment with magento2?

There are a lot of E-Commerce sites where continuous deployment is state-of-the-art and a deployment downtime is not acceptable.

  Now my questions are:

  What are your proven production deployment strategies (and architectures) to achieve a zero-downtime with Magento 2?
  Is zero-downtime deployment only possible if there are no database changes?

And yes, I know that for the most stores a downtime of a few minutes is not an issue and acceptable :-)


texts: filter_condition_callback function not called in observer

texts:
I'm adding a custom column (from a custom table) to an admin grid with an observer, and the filtering/sorting doesn't work. Adding the 'filter_condition_callback' to my column doesn't work, the function is never called.

I've seen other similar questions but none of them had this particular problem, or they were never answered.

I've made a module that modifies the admin_user grid.

It contains an observer linked to these events :

    <core_collection_abstract_load_before>
        <observers>
            <beforeCollectionLoad>
                <class>Namespace_Adminextra_Model_Observers_Users</class>
                <method>beforeCollectionLoad</method>
            </beforeCollectionLoad>
        </observers>
    </core_collection_abstract_load_before>

    <adminhtml_block_html_before>
        <observers>
            <add_an_field>
                <type>singleton</type>
                <class>Namespace_Adminextra_Model_Observers_Users</class>
                <method>appendContent</method>
            </add_an_field>
        </observers>
    </adminhtml_block_html_before>

So the beforeCollectionLoad method is called so I can join my custom column (from a custom table, not an attribute) :

public function beforeCollectionLoad(Varien_Event_Observer $observer)
{
    $collection = $observer->getCollection();
    if (!isset($collection)) {
        return;
    }
    if ($collection instanceof Mage_Admin_Model_Resource_User_Collection) {
        $collection->getSelect()->joinLeft(
            array('adminextra' => 'digitagri_adminextra'),
            'adminextra.user_id = main_table.user_id',
            array(
                'is_advisor' => 'adminextra.is_advisor',
                'phone' => 'adminextra.phone',
            )
        );
    }
}

This successfully seems to add the column to the collection.
The observer first calls the function appendContent, which checks the current grid :

public function appendContent(Varien_Event_Observer $observer){
    $block = $observer->getEvent()->getBlock();

    if (!isset($block)) {
        return $this;
    }
    if ($block instanceof Mage_Adminhtml_Block_Permissions_User_Grid) {
        $this->appendCustomColumns($block);
    }
    return $this;
}

Then the column is added :

public function appendCustomColumns($grid){
    $grid->addColumnAfter('is_advisor', array(
        'header' => 'Conseiller',
        'align' => 'left',
        'width' => '50',
        'index' => 'is_advisor',
        'type' => 'options',
        'options'   => array('1' => Mage::helper('adminhtml')->__('Oui'), '0' => Mage::helper('adminhtml')->__('Non')),
        'filter_condition_callback' => array($this,'_filterIsAdvisor'),
    ), 'is_active');
    $grid->sortColumnsByOrder();
}

The column is added and the values are displayed, the 'options' acts as a renderer and correctly displays '1' as Oui and '0' as Non. But the filtering and sorting don't work. No error, no exceptions, it does nothing.

The function called in 'filter_condition_callback' never seems to be called either. I've put a Mage::log to check :

protected function _filterIsAdvisor($collection, $column){
    Mage::log('works?',null,'test.log',true);
}

So what am I doing wrong ?

Filtering and sorting seem incredibly finicky, especially since i'm joining a column from a custom table and not an attribute.


texts: How to add simple product to cart instead of configurable product in Magento2

texts:
I would like to add the simple product equivalent of the selected configurable product to the cart.
I would like to solve that with a plugin.
I would like to know where should I intercept the code, and how can I get the simple product if I have the configurable product with the selected attributes.

So what I did until now:

class Cart
{

protected $quote;
protected $request;
protected $configurableproduct;

public function __construct(
    \Magento\Checkout\Model\Session $checkoutSession,
    \Magento\Framework\App\Request\Http $request,
    \Magento\ConfigurableProduct\Model\Product\Type\Configurable $configurableproduct
){
    $this->quote = $checkoutSession->getQuote();
    $this->request = $request;
    $this->configurableproduct = $configurableproduct;
}

public function beforeAddProduct($subject, $productInfo, $requestInfo = null)
{

    $paramsData = $this->request->getParams();
    foreach($paramsData as $pId=>$param){ echo "booo";
            $params['product'] = $paramsData['product'][$pId];
            $params['super_attribute'] = $paramsData['super_attribute'][$pId];
        }
        var_dump($params);
    }
    $productId = (int)$this->request->getParam('product', 0);

    return array($productInfo, $requestInfo);
}
}

But it does not work...

It must be something with the foreach loop, because if I comment that out, the code runs.


texts: How to set up .gitignore for a fresh Magento 2 (v2.2.0) site?

texts: When I install Magento (v.2.2.0), only things set up in .git are /pub and /update directories. I obviously want to expand the theme, and add new modules to it, so why are these the only ones set up to be followed by git? Is there because of danger to compromise (change in a faulty manner some files) Magento installation, so as a secureity measure by Magento?


texts: Magento 2: Add a custom link in myaccount dashboard

texts:
I wants to add a custom link in my account dashboard, and that link redirects to specified phtml file in magento2.

How to add specified controller to this.

Controller:

    <?php
namespace Vendor\Module\Controller\Customer;

class Index extends \Magento\Framework\App\Action\Action
{
   /**
  * Index Action*
  * @return void
  */
  public function execute()
  {
    $this->_view->loadLayout();
    $this->_view->renderLayout();
  }
}

test_customer_index.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
  <head>
        <title>My Blog Post</title>
    </head>
    <update handle="customer_account"/>
    <body>
      <referenceBlock name="page.main.title">
            <action method="setPageTitle">
                <argument translate="true" name="title" xsi:type="string">My Blog Post</argument>
            </action>
        </referenceBlock>
        <referenceContainer name="content">
            <block class="Magento\Framework\View\Element\Template" name="module_customer" template="Vendor_Module::loy_rew.phtml" after="-" />
        </referenceContainer>
    </body>
</page>

customer_account.xml

<?xml version="1.0"?>

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

        <referenceBlock name="customer_account_navigation">
            <block class="Magento\Framework\View\Element\Html\Link\Current" name="customer-account-navigation-nscore-link">
                <arguments>
                    <argument name="label" xsi:type="string" translate="true">My Blog Post</argument>
                    <argument name="path" xsi:type="string">module/customer</argument>
                </arguments>
            </block>
        </referenceBlock>
    </body>
</page>


texts: How to change the template for all the pages of product review?

texts: How to change 1 column on 3column for all the pages of product review?


texts:
I have upgraded my site from Magento 2.3.5 to Magento 2.4 for the previous version Porto was working fine when I upgraded my whole CSS is broken
Need Help
I Have tried by deploying static content


texts:
I have a custom module.
when I switch store view it not show anything.

normally it still working fine in all store view

update:
I have added it in XML file

        <referenceContainer name="page.main.actions">
        <block class="Magento\Backend\Block\Store\Switcher" name="store_switcher">
            <action method="setUseConfirm">
                <argument name="params" xsi:type="string">1</argument>
            </action>
        </block>
    </referenceContainer>

Any help? Thank in advance.


texts:
We are trying to grab all data from a magento 1.x-Shop to process them for some statistics.

I was able to connect to the shop and grab product, customers, orders and stockitems so far

I saw at the product-data:

z_filter_winegrower: '245',

z_filter_vintage: '19',

z_filter_country: '43',

z_filter_region: '23',

.... we need this data in human language, not in IDs
=> how to?

I tried

http://magentohost/api/rest/filters

http://magentohost/api/rest/z_filters

http://magentohost/api/rest/filter_groups

so far and nothing worked

Thank you very much!


texts: Magento 2 Wamp installation CSS/JS files return 404 error - multi store

texts:
I have the Wamp installation of Magento 2 with 2 websites (Sportswear.com and Furniture.com).

I have not changed the sportswear website domain and it works perfectly. I navigate to this using localhost:8080. I have modified the Base URL of the furniture website to be: http:// furniture.com/ and the styling/js does not work.

The CSS/JS returns HTTP Error 404.0 - Not Found.

The furniture page has this css link:  http://furniture.com/pub/static/frontend/Magento/luma/en_AU/mage/calendar.css

as opposed to the same link on sportswear (localhost:8080)
http://localhost:8080/pub/static/frontend/Magento/luma/en_AU/mage/calendar.css

I have modified the .htaccess:

SetEnvIf Host www\.furniture.com MAGE_RUN_CODE=furniture_en
SetEnvIf Host www\.furniture.com MAGE_RUN_TYPE=store
SetEnvIf Host ^furniture.com MAGE_RUN_CODE=furniture_en
SetEnvIf Host ^furniture.com MAGE_RUN_TYPE=store

I have also deleted tried deleting the var/static folder as well as running:

setup:static-content:deploy

I adjusted the hosts file in order for "www.furniture.com" to point to 127.0.0.1
I am unsure if this is correct or if there is something else I am missing.

Any direction is appreciated. Thank you.


texts:
i have just cloned my website and then updated the cloned website. Everything works perfec except the images for my sub categories isnt showing up, my product images are just not the sub category images.

My code for looks like this:

<?php
$_categories=$this->getCurrentChildCategories();
if($_categories->count()):
$categorycount = 0;
foreach ($_categories as $_category):
if($_category->getIsActive()):
$cur_category=Mage::getModel('catalog/category')->load($_category->getId());
$layer = Mage::getSingleton('catalog/layer');
$layer->setCurrentCategory($cur_category);
$catName = $this->getCurrentCategory()->getName();
if ($categorycount == 0){
$class = "first";
}
elseif ($categorycount == 3){
$class = "last";
}
else{
$class = "";
}
?>
<li class="item <?=$class?>">
<a href="<?php echo $_category->getURL() ?>"
title="<?php echo $this->htmlEscape($_category->getName()) ?>">
<img class="pic_size_subcat" src="<?php echo $_category->getImageUrl() ?>" width="100" alt="
<?php echo $this->htmlEscape($_category->getName()) ?>" />

<a href="<?php echo $_category->getURL() ?>" title="<?php echo $this->htmlEscape($_category->getName()) ?>"><?php echo $this->htmlEscape($_category->getName()) ?>

<?php
endif;
if($categorycount == 3){
$categorycount = 0;
echo "
\n\n
";
}
else{
$categorycount++;
}
endforeach;
endif;
?>

but when i inspect the element in my web browser it shows this -

so all i can tell is that it is reading in the code correctly but it isnt getting the img src. Does anybody know why? it worked before i cloned the website


texts:
I am using Magento 1.9 and want to redirect all the files generated inside the folder var/reports to stdout. If it is possible then how can I do it? If it is not then may be we can output all the generated reports files to one file and symlink to /dev/stdout. Any thoughts?
UPDATE:
I was able to create a file with name 9999 and redirect all logs to same file but when I tried to symlink the file to /dev/stdout or /proc/self/fd/1, both does not work. I still need  the way to forward the logs to standard output.
To redirect logs to a single file, open errors/processor.php file and edit two lines
//$this->reportId   = abs(intval(microtime(true) * rand(100, 1000)));
$this->reportId   = 9999;

and
//@file_put_contents($this->_reportFile, serialize($reportData));
@file_put_contents($this->_reportFile, serialize($reportData).PHP_EOL,FILE_APPEND|LOCK_EX);


texts: Correcting Parent Categories of Categories that failed to create correctly

texts:
We have a large number of categories that were created with code and had a server related error (long since fixed) that resulted in the parent category not being properly assigned.

These categories exist in the catalog_category_entity database table, but show a parent_id of 0 (our default category is 2, there is no entity_id of 0).

I've attempted to use the standard functions to assign a parent category to these, however using:

$category = Mage::getModel( 'catalog/category' )->load($id);
$category->setParentId($parentID);

I get an error message of "Call to a member function getModelInstance() on null in {path}/app/Mage.php on line 463"  This is being generated simply by attempting to load the category that needs to be fixed.

I know I could create a new category, but since there are a number of subcategories already assigned to this missing category and numerous products, I'd prefer to fix this programmatically to save a lot of manual work.

Any suggestions on a fix here?


texts: Not able to find Magento 2.0.4 default theme files

texts: I have recently installed Magento 2.0.4 on to my local machine, I am trying to find files so that I can customize the product page layout according to my requirement. Everybody are pointing me to app/design/frontend/Magento and telling me that I can find the theme files over there, but when I go to that folder it's just empty. Please guide me where to find the theme files so I can customize the pages.


texts: Magento 2. How does Magento bypass the circular dependency for Magento\Backend\Model\Url?

texts:
Magento uses

\Magento\Backend\Model\Url

as a preference for

Magento\Framework\UrlInterface

now \Magento\Backend\Model\Url
has a dependency on

\Magento\Framework\Data\Form\FormKey

which has a dependency on

\Magento\Framework\Session\SessionManagerInterface

which in the admin area is implemented by

\Magento\Backend\Model\Session

which has a dependency on
`Magento\Framework\Session\SidResolverInterface`

which is implemented by

\Magento\Framework\Session\SidResolver

which in turn has a dependency on

\Magento\Framework\UrlInterface

in the end what we have is a circular dependency

Backend\Model\Url <- depends -> FormKey

I've triple checked to see if a different implementation is provided for SidResolverInterface in the admin area, one that does not have a dependency on Magento\Framework\UrlInterface. This is not the case.

So how does Magento bypass this circular dependency, why does it not fail, what am I missing?


texts: How to implement Google Recaptcha in Custom Form?

texts:
In Magento 2.3 we are allowed to implement Google Recaptcha as described in the following link

https://docs.magento.com/user-guide/v2.3/stores/security-google-recaptcha.html

How can I add the same in Custom Form?


texts: System and Other Tab missing in Magento 1.9.2.0

texts:
Suddenly , when I logged in admin panel of magento.
All tabs including dashboard , system are missing in magento 1.9.2.0.
Only Sales, Catalog , Cutomers ,Promotions and CMS tab are visible.

I had not installed any extensions. And tried to clean cache manually also my complier is disabled.But Not able to see Tabs. I have not created any other user/role.

Please help me out.


texts:
I want to create the controller which get the parameter like

http://example.com/manufacturerpages/index/id/497

When I do this, It goes to 404 error plus I am also not able to get the id in controller by using this code

$mId = (int) $this->getRequest()->getParam('id', false);

I don't need the solution like

http://example.com/manufacturerpages/index?id/497

Because I have to use it in URL Rewrite so in that case, it is not working

Any help, experience and knowledge sharing would be appreciated.