texts:
I would like to move the search facility from the header.phtml, to the category view page. Looking at other posts I have created the following entry in my local.xml file:

  <reference name="root">
        <block type="core/template" name="top.search" as="topSearch" template="catalogsearch/form.mini.phtml"/>
    </reference>

And in app\design\frontend\default{Theme Name}\template\catalog\category\view.phtml

I have the following:

  <?php  echo $this->getChildHtml('topSearch') ?>

Am I doing something wrong?

EDIT:

Full local.xml file:

<?xml version="1.0"?>
<layout>
<default>

  <remove name="checkout.cart.coupon"></remove>
  <remove name="checkout.cart.shipping"></remove>

</default>

<catalog_category_default>
 <reference name="header">
     <action method="unsetChild"><name>top.search</name></action>
 </reference>
 <reference name="category.products">
     <action method="insert"><block>top.search</block></action>
 </reference>
</catalog_category_default>
<catalog_category_layered>
  <reference name="header">
     <action method="unsetChild"><name>top.search</name></action>
 </reference>
 <reference name="category.products">
     <action method="insert"><block>top.search</block></action>
 </reference>
 </catalog_category_layered>

 <catalogsearch_result_index translate="label">
  <label>Quick Search Form</label>
  <reference name="root">
      <action method="setTemplate"><template>page/1column.phtml</template></action>
  </reference>
 </catalogsearch_result_index>
</layout>


texts: shopping cart rule based on custom attribute

texts:
I would like to create a rule based on 2 attributes :

first attribute : enable free shipping, yes/no value
second attribute : date end of free shipping promotion, date value

then I will create a rule that say basically if all items in shopping carts have free shipping enabled and end date in the future, then give free shipping, otherwise, proceed as usual.

Any way to do that like that?

PS : i know how to do it with just a rule, but I insist on using attributes, because I want as well to display a small promotion warning in the product page, I therefore do not want each time to update both rules and attributes (to avoid discrepancies).

Magento EE 1.12.0.0


texts: Magento 2 cron job not re-indexing products as expected

texts:
My problem is Magento 2 doesn’t automatically index as I expect from the cron job. I currently have to SSH in and re-index using php bin/magento indexer:reindex , which is fine for me but not for my customers

The server (WHM cPanel setup, jailed shell) is my own which I am sharing between several of my customers. So I have root login but will need to keep the customers ‘jailed’. The server is almost new with only 1 other WordPress site. I am hoping to put several Magento 2 installs on it.

I suspect the cron job is running but something else is stopping the reindexing from happening.

There are no errors (empty) in magento.cron.log or setup.cron.log

In update.cron.log I'm getting:

  Notice: Undefined variable: nonWritablePaths in /home/gabitieartificia/public_html/update/app/code/Magento/Update/CronReadinessCheck.php on line 86
  Warning: implode(): Invalid arguments passed in /home/gabitieartificia/public_html/update/app/code/Magento/Update/CronReadinessCheck.php on line 86
  update-cron: Please check var/log/update.log for execution summary.

In debug.log I'm getting this error:

  [2016-06-12 09:19:07] main.DEBUG: cache_invalidate: {"method":"POST","url":"ht tp://gabitie.artificialart.co.uk/admin_ejiyo5/admin/index/index/key/46b3c13a698e28d113fd7d912659ff6cc5859d09833e8cf81e3448cb01ff357f/","invalidateInfo":{"tags":["BACKEND_MAINMENU"],"mode":"matchingAnyTag"},"is_exception":false} []

In update.log I'm getting this error:

  [2016-06-10 11:28:03] update-cron.ERROR: Cron readiness check failure! Found following non-writable paths [] []

And in the cPanel error log I'm getting this error:

  [Sun Jun 12 10:19:09.601340 2016] [access_compat:error] [pid 34328] [client 130.185.144.89:50199] AH01797: client denied by server configuration: /home/gabitieartificia/public_html/app/etc/config.php

I don’t know if all these errors relate to my re-indexing problem. I have been Googling permutations of these error messages for the last few days trying to find a solution to no avail.

Im sure my paths to php.ini and the binary are correct.

When I run the commands from a command line as root from the top directory they work fine with no errors at all, but it still doesn’t re-index

Ie this works fine:

sudo –u gabitieartificia /usr/local/bin/php -c /usr/local/lib/php.ini /home/gabitieartificia/public_html/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /home/gabitieartificia/public_html/var/log/magento.cron.log

phpinfo = http://gabitie.artificialart.co.uk/phpinfo.php

crontab contents =

 * * * * /usr/local/bin/php -c /usr/local/lib/php.ini /home/gabitieartificia/public_html/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /home/gabitieartificia/public_html/var/log/magento.cron.log
 * * * * /usr/local/bin/php -c /usr/local/lib/php.ini /home/gabitieartificia/public_html/update/cron.php >> /home/gabitieartificia/public_html/var/log/update.cron.log
 * * * * /usr/local/bin/php -c /usr/local/lib/php.ini /home/gabitieartificia/public_html/bin/magento setup:cron:run >> /home/gabitieartificia/public_html/var/log/setup.cron.log

I have even tried setting up a second copy of Magento 2 on the same server and putting all folders to chmod 777 to prove if it is permissions related, but that didn’t work either. It still wasn’t re-indexing.

Any help/insight anyone can provide will be hugely appreciated.


texts: How to define a category path of a product while importing csv sheet?

texts:
I am trying to add products to my website and the category path I am defining is in this format (Default Category,Default Category/Subjects,Default Category/Subjects/Business Management)

instead of adding the product into an existing category which I created manually it created a new category for the imported product like, in this case, it is Business management.

The category which I created manually (Business Management) is showing 0 products added in it.

I tried some alternate methods to overcome this problem by using category id instead of using category name.

but I got these results.

Please suggest me some methods to solve this problem.
Thank You


texts: Magento 2: New Linux Operating System Vulnerability

texts:
https://magento.com/security/vulnerabilities/new-linux-operating-system-vulnerability

  If you manage your own server, you will need to update the kernel (and
  reboot your server) once the security patch is issued by your
  operating system providers.

  If you do not manage your own server or if you are using shared
  hosting, contact your server administrator or hosting provider to make
  sure that you are protected against this vulnerability.

If I'm managing server myself then what I have to do?

If it's shared hosting then what I have to tell Server Administrator?


texts:
I run my Magento shop on a CentOS 7 Apache server and all pages are load over https.
This because of the SEO-score and safety.

But is it useful to install and config Varnish on this server, because I load all pages over https?


texts: Observer on class Mage_Core_Model_App end in function run

texts:
Look app\code\core\Mage\Core\Model\App.php

public function run($params)
    {
        $options = isset($params['options']) ? $params['options'] : array();
        $this->baseInit($options);
        Mage::register('application_params', $params);

        if ($this->_cache->processRequest()) {
            $this->getResponse()->sendResponse();
        } else {
            $this->_initModules();
            $this->loadAreaPart(Mage_Core_Model_App_Area::AREA_GLOBAL, Mage_Core_Model_App_Area::PART_EVENTS);

            if ($this->_config->isLocalConfigLoaded()) {
                $scopeCode = isset($params['scope_code']) ? $params['scope_code'] : '';
                $scopeType = isset($params['scope_type']) ? $params['scope_type'] : 'store';
                $this->_initCurrentStore($scopeCode, $scopeType);
                $this->_initRequest();
                Mage_Core_Model_Resource_Setup::applyAllDataUpdates();
            }

            $this->getFrontController()->dispatch();
        }
        return $this;
    }

I know that to create an event / observer I need to do the following:

<events>
  <EVENT_TO_HOOK>
    <observers>
      <module>
        <type>singleton</type>
        <class>company_module_model_observer</class>
        <method>methodToCall</method>
      </module>
    </observers>
  </EVENT_TO_HOOK>
</events>

but i dont know how to catch the event of the run function of the class Mage_Core_Model_App

what is the name of the event in order to observe this function?


texts: Magento 2 - Cant update categories programmatically Flat::validate()

texts:
Please could someone advise why I am getting this error when calling my code below:

Uncaught Error: Call to undefined method Magento\Catalog\Model\ResourceModel\Category\Flat::validate()

namespace exampleVendor\exampleModule\Controller\Index;

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

    public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Magento\Catalog\Model\ResourceModel\Category\CollectionFactory $categoryFactory,
        \Magento\Catalog\Api\CategoryRepositoryInterface $categoryRepository
    ) {
        parent::__construct($context);
        $this->categoryFactory = $categoryFactory;
        $this->categoryRepository = $categoryRepository;
    }

    public function execute()
    {
        $categories = $this->categoryFactory->create()
            ->addAttributeToFilter('is_active', 1)
            ->addAttributeToSort('id')
            ->addAttributeToSelect('*');

        foreach ($categories as $category){
            $category->setIncludeInMenu(1);
            $this->categoryRepository->save($category);
        }
    }
}

As requested the full error message is:

Uncaught Error: Call to undefined method Magento\Catalog\Model\ResourceModel\Category\Flat::validate() in /vendor/magento/module-catalog/Model/Category.php:1077
    Stack trace: #0 /generated/code/Magento/Catalog/Model/Category/Interceptor.php(570): Magento\Catalog\Model\Category->validate()
    #1 /vendor/magento/module-catalog/Model/CategoryRepository.php(194): Magento\Catalog\Model\Category\Interceptor->validate()
    #2 /vendor/magento/module-catalog/Model/CategoryRepository.php(112): Magento\Catalog\Model\CategoryRepository->validateCategory(Object(Magento\Catalog\Model\Category\Interceptor))
    #3 /generated/code/Magento/Catalog/Model/CategoryRepository/Interceptor.php(24): Magento\Catalog\Model\CategoryRepository->save(Object(Magento\Catalog\Model\Category\Interceptor))
    #4 /app/code/exampleVendor/exampleModule/Controller in /vendor/magento/module-catalog/Model/Category.php on line 1077


texts: Show Grouped Product price in product page view as sum of associated products in grouped product?

texts:
app/design/frontend/vagwan/moto/Magento_GroupedProduct/templates/product/view/type/grouped.phtml

How Can I display price sum of associated products in Grouped Product in product page view ? I ve tried this code but is not working.

                <tr>
                <?php
                $all = $block->getAssociatedProducts($block->getProductPrice($_item));

                if ($_associatedProducts) {

                    $priceForAll = 0;
                    foreach ($all as $product) {
                        $priceForAll += $product->getPrice();
                    }
                }

                ?>
                <?php echo $priceForAll ?>
            </tr>


texts: Difference between getAssociatedProductIds() and getUsedProductIds($product)?

texts:
I want to get the simple products associated with a configurable product. What is the difference between the following methods and why/when would I use one over the other? Both appear to return an array of IDs, however I have noticed the former is unreliable when used on a new, just-saved product.

Approach 1:

$arr = $configurableProduct->getAssociatedProductIds();

Approach 2:

$arr = $configurableProduct->getTypeInstance()->getUsedProductIds($configurableProduct);


texts:
In mail forgot password there is a link

http://xxx.xxxxxx.it/en/customer/account/resetpassword/?id=50&token=fagfdgdgfdbf5f6cf7d7faab34ba9e

but the my store is
http://xxx.xxxxxx.it/it/
not
http://xxx.xxxxxx.it/en/

where i can to change this?
Thanks


texts: If I'm putting XML in the admin panel for one page can I start at the action?

texts: I want to insert the twitter bootstrap CDN link into one page.  Im going to put it into the admin panel under that pages design tab.  For the XML can I start at the action?  Will the admin insertion append the rest?


texts:
On the posts page of my FishPig Wordpress blog, my Breadcrumb says Home > Blog. I want to change that to news.
I haven't been able to find where that's being set. I checked the database and the site name, but it's not coming from either of them.
I don't have any SEO tools installed on the blog.
Thanks


texts: ObjectManager is unusable for me in Magento 2 Unit Tests

texts:
I am following Vinai Kopp's Series on Mage2CodeKata but it gives me an error message when I declare the $objectManager. After seeing these treads:

Object Manager in Unit Testing in magento 2
Magento 2: Fixing Call to Undefined Method Mock_BlockFactory_4b440480::create() Test Failures

I want to try the ObjectManager in Magento\TestFramework\ObjectManager not the one in magento/framework/TestFramework/Unit/Helper/ObjectManager

Here is my code:
before class definition:

use Magento\TestFramework\ObjectManager;

after class definition:

public function testTheModuleIsConfiguredAndEnabled()
{
    /** @var ObjectManager $objectManager */
    $objectManager = ObjectManager::getInstance();

    $moduleList = $objectManager->create(ModuleList::class);

    $this->assertTrue($moduleList->has($this->moduleName));
}

Here is the error message:

  PHP Fatal error:  Class 'Magento\TestFramework\ObjectManager' not found


texts: How to upload large number of variations in Configurable Product?

texts:
I am facing problem with large number of variations in Configurable Product. I am trying to add ring and it has around 384 variables, 24 sizes, 4 metal types and 4 color/clarity.

This is the sample value for configurable_variations.

  https://gist.githubusercontent.com/samaybhavsar/43013064563c1fd6ce82cfb4f60b7bc8/raw/effb2e4f377077bc1891be78fb63e35f30d14b84/sample

When I try to upload. The upload happens successfully but the ring size does not show up in the product page.

How do I accomplish this?


texts: How to redirect my custom module url after admin login

texts:
What I want:
Admin should redirect my custom module url('adminhtml_module1/testimonial/index') instead of dashboard page after successfully admin login.

Any idea ?
How  can I do this ?


texts: Magento - add Category Tree in custom extension

texts:
i am trying to create a block for magento category tree in admin panel, till now whatever i have tried seems to fail. i have reffered this

http://www.magentocommerce.com/boards/viewthread/231274/P0/

as tutorial but was not able to built, any one with suggestion would be appreciated


texts: Redirect to our custom 404 page fir links to disabled store view

texts:
I disabled one of my store views, and now if I type the url to the disabled store view, Magento displays the default 404 page (coming from errors/default/404.phtml)

I want to redirect to our custom (CMS) 404 page, like any other non-existing url.

Is this possible?


texts: How to show Clear Shopping Cart in magento 2

texts:
I wish to show Clear Shopping cart button in cart page.

In default magento it was display:none, So need to show only Clear Shopping
 cart button as mentioned like below image.

Where I need to override this CSS


texts: Stock control race condition between checkout and payment completion

texts:
If two users simultaneously attempt to purchase the last item from an online store, we either have an opportunity for a race condition, or an opportunity for a DOS attack on the store.

Specifically, I am using Magento and Worldpay payment engine, but I see the problem as a more general one where a third party payment gateway is used.

Consider the two scenarios

Stock is deducted when an order is placed OR...
Stock is deducted when a payment is received.

In scenario 1, we have the following problem. If the payment is not completed, the item still goes out of stock. This allows an attacker to order everything without paying for it - of course the item will not be dispatched, but stock control will prevent any legitimate users from ordering the item. The problem has to be fixed manually, when it is noticed, during office hours.

There are settings in Magento to limit the number of items that can be ordered, but this isn't really useful for items where there are only a few in stock - and we might want to sell all of them to legitimate purchaser (ie not say "you can only have 1")

It doesn't necessarily have to be a deliberate attack either. If the user has trouble navigating the payment gateway's website due to a browser issue they may give up - or they may start the process again further depleting stock.

So the other option, scenario 2 leads us to a race condition. If two users both get to the checkout with the last item, they can both order it and carry onto the payment gateway website, because at that stage the stock has not been deducted. And then they both pay, but there is only one item available.

As far as I can make out, there is only a payment notification protocol, not a "is this item still in stock" protocol.

So I was wondering how people generally deal with this problem, and in particular what Magento / Worldpay configurations could be used to alleviate the issues.

The best fit I could think of is some sort of timeout on payment, which puts the item back in stock. This would require a payment timeout both at the Magento end and at the Worldpay end, but I can't see any method of doing that at either end.


texts: Table rate not working if I change the title

texts:
If I change the shipping method title from the CMS (and clear the cache and storage), from "Table Rate" to "Testing" for example, and change

$shippingAddress->setCollectShippingRates(true)
            ->collectShippingRates()
            ->setShippingMethod('tablerate_bestway')
            ;

to

$shippingAddress->setCollectShippingRates(true)
            ->collectShippingRates()
            ->setShippingMethod('testing_bestway')
            ;

Then the shipping sum always returns 0. The same happens if I change Best Way instead of Table Rate. Why is this happening? And how can I resolve this issue?


texts: Magento V1.8 one page checkout not loading payment information

texts:
Please, can someone assist me? I am having an issue with my one-page checkout on Magento CE v1.8.

I am testing the checkout process and noticed that after selecting a shipping method the system fails to move onto the next step which is "Payment Information". When I click on the continue button nothing happens and it remains on the shipping method tab.

I am new to Magento and still playing around with it so I wouldn't be surprised if it's a stupid setting or an overlooked issue because of my lack of experience with the system.

But I read somewhere that it may be a JS error or something from the template.

The link is http://beachandbeyond.co.za/shop and any assistance would be appreciated.


texts: Magento2 All Child product Out Stock display price

texts: If all Simple options of a product are out of stock in a Configurable product then its not showing price but I want to show it. How do I do that?


texts: Uploaded images on product via admin shows 0 byes

texts:
Magento 2.3.5 - p2
When we upload images from the Admin to Products, we see it uploaded but after saving it. We saw that images show the default Magento product image and the size of the image becomes 0 bytes.
Logs
We see this on the log
[2021-03-18 12:20:03] main.WARNING: Cannot gather stats! Warning!stat(): stat failed for /home/elsdfsdf/public_html/pub/media/catalog/product/r/u/rubens_tummies_handmade_swedish_organic_wheat_dolls_rubens_barn_children_cosying_with_group_5.jpg {"exception":"[object] (Magento\Framework\Exception\FileSystemException(code: 0): Cannot gather stats! Warning!stat(): stat failed for /home/elsdfsdf/public_html/pub/media/catalog/product/r/u/rubens_tummies_handmade_swedish_organic_wheat_dolls_rubens_barn_children_cosying_with_group_5.jpg at /home/elsdfsdf/public_html/vendor/magento/framework/Filesystem/Driver/File.php:72)"} []


texts:
Has anyone created a custom API or Web Services that will communicate directly with the Magento database?  The minimum requirements would need to support creation of new configurable products and order retrieval out of Magento?

The Magento API is extremely slow and we're looking for other alternatives.

Alex


texts:
So I've set up a new product in my Magento storefront. All works fine, however when I try to upload an image to the product I'm getting this error:

  Could not read config file

I've checked the folder where the image would be uploaded to and it is actually there so it's been uploaded, but can't actually save the image.

I've tried to debug it and it seems the problem is in the FileResolver.php file in this method:

public function get($filename, $scope)
    {
        switch ($scope) {
            case 'global':
                $iterator = $this->moduleReader->getConfigurationFiles($filename)->toArray();
                $themeConfigFile = $this->currentTheme->getCustomization()->getCustomViewConfigPath();
                if ($themeConfigFile
                    && $this->rootDirectory->isExist($this->rootDirectory->getRelativePath($themeConfigFile))
                ) {
                    $iterator[$this->rootDirectory->getRelativePath($themeConfigFile)] =
                        $this->rootDirectory->readFile(
                            $this->rootDirectory->getRelativePath(
                                $themeConfigFile
                            )
                        );
                } else {
                    $designPath = $this->resolver->resolve(
                        RulePool::TYPE_FILE,
                        'etc/view.xml',
                        $this->area,
                        $this->currentTheme
                    );
                    if (file_exists($designPath)) {
                        try {
                            $designDom = new \DOMDocument;
                            $designDom->load($designPath);
                            $iterator[$designPath] = $designDom->saveXML();
                        } catch (\Exception $e) {
                            throw new \Magento\Framework\Exception\LocalizedException(
                                new \Magento\Framework\Phrase('Could not read config file')
                            );
                        }
                    }
                }
                break;
            default:
                $iterator = $this->iteratorFactory->create([]);
                break;
        }
        return $iterator;
    }


texts:
We are currently running Magento 1.9.0.1 CE for our online store.
We have a domain example.com and a subdomain in.example.com

We use in.example.com specifically for customers from India whereas everybody else is meant for example.com. We are currently using geoip database to redirect. The issues that we are facing are as follows -

if somebody from India opens example.com/page.html they get redirected to in.example.com instead of in.example.com/page.html
if somebody from USA opens in.example.com they are not getting redirected to example.com at all. same is also true for in.example.com/page.html
even with these redirects we want example.com/admin to not get redirected whether accessing from India or USA.

Code that I have used is as follows -

RewriteCond %{HTTP_HOST} .*in.mokshafashions\.com [NC]

RewriteRule .* - [E=MAGE_RUN_CODE:india]

RewriteRule .* - [E=MAGE_RUN_TYPE:website]

RewriteCond %{HTTP_HOST} ^mokshafashions.com [NC]

RewriteRule ^(.*)$ in.mokshafashions.com/$1 [R=301,L]

RewriteRule ^(.*)$ mokshafashions.com/$1$1 [L]

RewriteCond %{REQUEST_URI} !^/admin.* – –


texts: Magento 2.3.3 dates change after saving product

texts:
After upgrading to 2.3.3 the dates are not saved correct.

When I change the product new from and to date and then save it, the date is messed up.


texts: The requested store is not found. when I deleted the extra store from Magento 2.1 store view.

texts:
The requested store is not found only on category tab in admin else everything is working fine if I deleted the extra store from Magento 2.1 store view.

How i set the one store view for all. product upload and layout.

Because while uploading products nos of Product URL created for all store ids 1,2,3,4,5 in the database. As I required only one store view that store id is 2.

Everything working fine


texts: Minicart display 99+ after count exceed more than 99

texts:
How can I update minicart counter after qty exceeds 99.

Like, If customer adds 10000 qty to cart in minicart it will display 10000 which looks weird, So if total qty in cart exceeds more than 99 then I want to display 99+.

How can I achieve this? Any ideas?


texts: How to update to 1.9.3.1 on a production system?

texts:
In the release-notes they say

  You currently cannot upgrade to this version using Magento Connect Manager. We expect to resolve this issue soon.

How am I supposed to update my production system, which runs on 1.9.2.4?

I tried replacing core and community directories in the app folder. But that resulted in an error.


texts: Magento 1.9.2.4 randomly (seemingly) doubling product quantities

texts:
So for some reason magento is randomly doubling some items.

Some times its one item, sometimes its all of them.  If we reorder from the admin, it then shows the correct quantity (in this case, 24), but the customer actually ordered and wanted 12.  Any ideas where to start?


texts: Product filtering with multiple attributes

texts:
I want to display all the product with some  product attribute features.

ie; I have 3 products in kids category with attributes and categories like

Category: boy and girl

Size: small, medium,large

color: black,red,white

so I need all the product having Category->boy, Size->small,medium,&color->black,white.

How can it be done?


texts: Magento 2 : Rest APi Management payment methods

texts:
I need a solution to manage payment methods.
Ex. Credit cards.
in the web version we have the option to list the cards already used in purchases. (html: //  vault / cards / listaction /).

  Is it possible to obtain this information via rest api?
Show, add and remove cards.

Appreciate.

Using magento 2.2.5


texts: magento web services set value to custom product attribute

texts: I wanna ask if somebody knows how can i set value to custom product attribute by web service. The attribute has multiselect type and i wanna be able to add and delete options to that attribute!


texts:
We use Magento for factoring (sending invoices to 3rd party).

Here's a scenario of our customer, who uses our Magento implementation to, in his turn, invoice his customer for a paint job (taxes are omitted in this example):
Our customer starts off with adding an initiate cost for the painting of $100.
He then goes on adding 13 hours of wall painting; $20 x 13 hours = $260.
Then for some reasons he adds a discount for 3 hours, which he needs to show explicitly, so he adds a 3 hours discount to the invoice item list: -$20 x 3 hours = -$60.
Finally he adds a campaign discount of 50% for the whole invoice.

The cart would then look like this:

Material and travelling: $100.00 x 01 =  $100.00
Painting:                 $20.00 x 13 =  $260.00
Discount:                -$20.00 x 03 =  -$60.00
=================================================
Campaign discount:                         50.00%
=================================================
Total:                                   $300.00
Campaign discount:                      -$150.00
Grand total to pay:                      $150.00

We're already using the native discount system for the whole cart, ie the campaign discount, for this invoice and need to implement a second discount which is set for the product/work, ie the painting work.

Also this should be done in code as the front end is very much NOT web shop like in user interface.
Something like this: $quote()->secondDiscount($secondDiscountCode);

So. Is this possible? With an extension or even without an extension?

This tip is very helpful, but doesn't really apply as we're using a third party extension for the checkout: http://stackoverflow.com/questions/15138237/magento-multiple-coupon-codes-for-one-order-without-extension.
So no need pointing us there ;)


texts: ERROR Failed to load the "MercadoPago_Core/js/view/method-renderer/custom-method" component

texts:
I've been trying to install MercadoPago payment method, but system can't find js files?

Installing version 3.3.5 (current) from https://packagist.org/packages/mercadopago/magento2-plugin

Console errors display: [ERROR] Failed to load the "MercadoPago_Core/js/view/method-renderer/custom-method" component. for each mercadopago module activated.

I installed the latest package, run setup:upgrade and setup:di:compile but still nothing


texts: Show Selected (active) Category Filter Attributes

texts:
I have updated the filters to show as a dropdown menu, rather than an . I updated template/catalog/layer/filter.phtml to be:

<select onchange="setLocation(this.value)">
    <option  selected ="selected"><?php echo $this->__('sshhh') ?></option>
    <?php foreach ($this->getItems() as $_item): ?>
        <?php if ($_item->getCount() > 0): ?>
            <option  value="<?php echo $this->urlEscape($_item->getUrl()) ?>"><?php echo $_item->getLabel() ?></option>
        <?php endif; ?>
    <?php endforeach ?>
</select>

Problem: The filter disappears once selected and is added to the 'Currently Shopping By' section

Objective: I'd like the filter dropdown to persist, even when one of the filter items has been selected. (I'd also like the dropdown to automatically pre-select whichever attribute filter is currently active, if any. But I can do this bit, I think)

Help: How do I keep a filter displayed, even when one of the filter items is selected? I've traced the route back to the core files, but at no point does it seem to 'hide' selected/active filters, it seems.

Thanks


texts: Search by keyword is not working properly magento 2

texts: When i search by full name of product the result in grid of product does not show the product. So is there a problem to fix and how to make search by sku product functionnal any help please and thanks in advance


texts: How to write an API to get sales report of the last 1 year?

texts:
I'm writing an module that provide a new API endpoint for Magento 2.
Can anyone guide on how to write an API endpoint that I can fetch the sales report of last 1 year ?


texts: How to display seller portfolio in seller product page?

texts: How can I display seller info with short description on it's product page with a link of "View More Info". On click, the user can get redirect to the seller profile page. This would really help me out guys! thanks in advance.


texts: how do i install a configuration option under "system: tool

texts:
I don't have all the option under the "system" option and I need a configuration option to set up my google analytics.

Please can you help me add the configuration option.

Thank you


texts:
i followed this tutorial and got problems with the install script. I get the following error:

  Can't retrieve entity config: practice_checkoutcomments/comments

here is the code:

app\etc\modules\Practice_CheckoutComments.xml

    <?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Practice_CheckoutComments>
            <active>true</active>
            <codePool>local</codePool>
            <depends>
                <Mage_Sales />
                <Mage_CatalogInventory />
                <Mage_Checkout />
            </depends>
        </Practice_CheckoutComments>
    </modules>
</config>

app\code\local\Practice\CheckoutComments\etc\config.xml

   <?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Practice_CheckoutComments>
            <version>0.0.1</version>
        </Practice_CheckoutComments>
    </modules>

    <global>
        <resources>
            <checkoutcomments_setup>
                <setup>
                    <module>Practice_CheckoutComments</module>
                </setup>
            </checkoutcomments_setup>
        </resources>
    </global>
</config>

app\code\local\Practice\CheckoutComments\sql\checkoutcomments_setup\install-0.0.1.php

   <?php
$installer = $this;
$installer->startSetup();

$table = $installer->getConnection()
    ->newTable($installer->getTable('checkoutcomments/comments_table'))
    ->addColumn('comment_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null,
        array(
                'identity' => true,
                'unsigned' => true,
                'nullable' => false,
                'primary' => true
        ), 'Comment ID')
    ->addColumn('order_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null,
        array(
                'unsigned' => true,
                'nullable' => false
        ), 'Real Order ID')
    ->addColumn('comment', Varien_Db_Ddl_Table::TYPE_TEXT, '64k', array(), 'Comment')
    ->addForeignKey(
        $installer->getFkName('checkoutcomments/comments_table', 'order_id',
                'sales/order', 'entity_id'), 'order_id',
        $installer->getTable('sales/order'), 'entity_id',
        Varien_Db_Ddl_Table::ACTION_CASCADE, Varien_Db_Ddl_Table::ACTION_CASCADE)
    ->setComment('Checkout Comments');

$installer->getConnection()->createTable($table);
$installer->endSetup();
?>


texts: Does Magento 2 always transliterate product url keys or only when generating it?

texts:
In our Magento 2.2.9 shop when updating a products url_key it has been transliterated automatically to remove spaces, umlauts, etc.. We now updated to 2.3.3 and this behavior stopped working.

I checked with vanilla 2.2.9 and 2.3.3 instances and when updating a url_key for a product it is not transliterated. So it seems this has never been a feature of Magento but we do not recall implementing such a feature.

I do know Magento transliterates the url_key when generating it based on the product name but has it ever been (or is) a feature of Magento that the url_key is always transliterated e.g. when updating or saving it manually?


texts: What /etc/acl.xml file is used for in Magento 2.0.X

texts:
I see that most(if not all) of the Magento core modules have a

acl.xml file

placed in

magento-module/etc/

I could not find any documentation on this, so basically I want to know, what is this file used for ?


texts: ReferenceContainer is appearing on wrong position, XML

texts:
I'm using Magestores Bannerslider with custom templates in order to create Sliders.

I want to place the slider above page.main and below the nav.section element.

This is my code in cms_index_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">
    <body>

        <referenceContainer name="page.wrapper" before="page.main">
            <block class="Magestore\Bannerslider\Block\SliderItem" name="slider">
                <action method="setSliderId">
                    <argument name="sliderId" xsi:type="string">1</argument>
                </action>
            </block>
        </referenceContainer>

    </body>

</page>

However, the element appears after page.main. From my understanding, placing it before that element should be enough, but it does not work. Why?


texts: How to create a responsive sticky header in magento

texts:
I am trying to create a sticky header on Magento using scripts and I was successful in implementing it. I want to create sticky header only for full size window (desktop view) and it should not affect when we decrease the size of window (mobile view) that is the header should not stick in mobile view, but in my case the header sticks for both the views as shown in snapshots hence it looks inappropriate

here is my style.css

#ja-mainnav
{
position:fixed;
width:100%;
top: 30px;
  z-index: 10000;
}

javascript:

<script type="text/javascript">
var m1 = 30; /*header height in pixels */
var m2 = 0; /* Indent when during scrolling header* no longer visible */
var menuID = "ja-mainnav";
/* id menu */
var menuOpacityOnChange = "1";

var menuOpacityOnChangeIE = menuOpacityOnChange * 100;

function getScrollTop() {
    var scrOfY = 0;
    if( typeof( window.pageYOffset ) == "number" ) {
        //Netscape compliant
        scrOfY = window.pageYOffset;
    } else if( document.body
    && ( document.body.scrollLeft
    || document.body.scrollTop ) ) {
        //DOM compliant
        scrOfY = document.body.scrollTop;
    } else if( document.documentElement
    && ( document.documentElement.scrollLeft
    || document.documentElement.scrollTop ) ) {
        //IE6 Strict
        scrOfY = document.documentElement.scrollTop;
    }
    return scrOfY;
}

function marginMenuTop() {
    var top  = getScrollTop();
    var s    = document.getElementById(menuID);

    if(typeof s != "undefined" && s){
        if (top+m2 < m1) {
            s.style.top       = (m1-top) + "px";
            s.style.filter    = s.style.filter.replace("progid:DXImageTransform.Microsoft.Alpha(opacity="+menuOpacityOnChangeIE+")","");
            s.style.opacity   = "1";

        } else {
            s.style.top       = m2 + "px";
            s.style.opacity   = menuOpacityOnChange;
            s.style.filter    = s.style.filter.replace("progid:DXImageTransform.Microsoft.Alpha(opacity="+menuOpacityOnChangeIE+")","");
            s.style.filter    += "progid:DXImageTransform.Microsoft.Alpha(opacity="+menuOpacityOnChangeIE+")";
        }
    }
}

function setMenuPosition(){
    if(typeof window.addEventListener != "undefined"){
        window.addEventListener("scroll", marginMenuTop, false);
    } else if(typeof window.attachEvent != "undefined"){
        window. attachEvent("onscroll", marginMenuTop);
    }
}

if(typeof window.addEventListener != "undefined"){
    window.addEventListener("load", setMenuPosition, false);
} else if(typeof window.attachEvent != "undefined"){
    window. attachEvent("onload", setMenuPosition);
}

[


texts: My extension has been stolen and is now being sold for lower price

texts:
I am selling a Magento extension inside Magento Connect. Somebody bought it, copied entire code, just renamed it and now he is selling it in Magento Connect for lower price. My licence does not allow that.

This was my best selling extension, I put so much effort to make it perfect and now this clearly lowered my sale.

Do I have any chance? The person is from Asia and I am from Europe. It would be probably nearly impossible to make any legal action unless I don't invest USD 10k+ for legal adviser. What options do I have left?


texts: Product does not show on Magento2 categroy page

texts:
My Product does not show on Magento2 category page.My category page show blank .

any body help me.


texts: Magento 2, Applied discount amount not display on checkout and order item table

texts:
I have created a Catalog Price Rule for 10% discount like the below image

It applied product price, but its not showing on checkout details and also the discounted amount details are not saved in the "tbl_sales_order_item" table. so I cannot get it in the invoice details. How can I get the discounted amount and percentage from the order tables


texts: Search (elasticsearch) on 2.4 returns no result for 2 or more search terms

texts:
For example, I if search for "Lord of the Rings", I will get no results, but if search just "Lord", or "Rings", I will get the results.
Can't locate what could be the issue.
Update, I finally got the expection out:
{
  "error": {
    "root_cause": [
      {
        "type": "query_shard_exception",
        "reason": "failed to create query: field:[sku] was indexed without position data; cannot run PhraseQuery",
        "index_uuid": "znhJmQSgS4C07uL1bTJ_bw",
        "index": "magento2_product_1_v8"
      }
    ],
    "type": "search_phase_execution_exception",
    "reason": "all shards failed",
    "phase": "query",
    "grouped": true,
    "failed_shards": [
      {
        "shard": 0,
        "index": "magento2_product_1_v8",
        "node": "AS3yhH-9SP-3qRZ6Pytg3g",
        "reason": {
          "type": "query_shard_exception",
          "reason": "failed to create query: field:[sku] was indexed without position data; cannot run PhraseQuery",
          "index_uuid": "znhJmQSgS4C07uL1bTJ_bw",
          "index": "magento2_product_1_v8",
          "caused_by": {
            "type": "illegal_state_exception",
            "reason": "field:[sku] was indexed without position data; cannot run PhraseQuery"
          }
        }
      }
    ]
  },
  "status": 400
}


texts: Magento 2: So I have upgraded my magento from 2.3.6 to 2.4

texts:
So, I am trying to upgrade my magento from 2.3.6 to 2.4.
I have updated my PHP from 7.3 to 7.4 for that.
I am able to run composer install, composer update and all other magento commands without any error.
I have checked my database as well.
Everything looks fine for me.
But when I go to the url
127.0.0.1:8888/xyz/
I get "The requested URL not found on this server."
No matter how many instances I have created from scratch. I still get the same error. If anyone can help me it will be really helpful.


texts: How do I recover my Base URLs on the internet not phpMyAdmin?

texts:
I changed Base Urls by Open the Unsecure and Secure dropdowns, locate the base URL line, and replace this with the new URL. But now my website is inaccessible

How do I change or restore base_url my BaseURL settings back?

I just changed it by the link login , and i dont have any systems


texts: Magento 2 - Get Original Price and Special Price of a Bundle Product

texts:
I want to get the original price of a Bundle product (Minimal/Maximal one).
This needs to replicate what Magento is grabbing for the WAS price below so I can add a percentage off to product pages.

I can get the Special Price like below:

$bundleObj=$product->getPriceInfo()->getPrice('final_price');
echo $bundleObj->getMinimalPrice();// For min price
echo $bundleObj->getMaximalPrice(); // for max price

I've tried using the below but this just returns 0:

$_product->getPrice();

This also only has both with and without tax and the standalone tax:

print_r($_product->getPriceInfo()->getPrice('final_price')->getMinimalPrice());

Have also looked at:

$_product->getPriceModel()->getTotalPrices($_product,'min',1)

This seems to just be pulling similar data cannot get the original price.


texts: Change theme package from controller magento

texts:
I face weird problem on product page. It renders wrong package.
In cms home it render exactly same as defined from system/config backend. But when user click on product link. ProductController render new handle from different package and theme. I have no idea why

Handle in cms_index

  default
  cms_page
  STORE_english
  THEME_frontend_ma_primave_ma_primave4
  cms_index_index

Handle in catalog_product_view

  ma_primave
  default
  STORE_english
  THEME_frontend_default_theme263k
  catalog_product_view

THEME_fronten_ must be same.

Question, can i set theme before layout render in product controller? If not then does anyone have solutions to fix above issues?


texts: Magento translation of configurable product

texts: I am using pickpack to print a PDF sheet of the purchase but it is using from Catalog/Attribute/Manage Attribute/"the name of the attribute"/Manage Label/Option and not from Admin but from the Default Store View. I know that from the Manage products you could enabled the tickbox to use default.


texts:
please tell how to configuration store credit in megento commerce and also give me a code for that and explain where is put tis code in magento.

please tell how to configuration store credit in megento commerce and also give me a code for that and explain where is put tis code in magento.


texts: magento2: how to only deploy used themes to speed up static deploy

texts:
Does anyone know if it's possible to restrict the setup:static-content:deploy to only deploy themes I actually use?

For instance i have a theme that inherits from Magento/blank and we have two languages, also we normally don't change the admin area.

So I only need
pub/static/frontend/MyScope/mytheme/en_GB and   pub/static/frontend/MyScope/mytheme/en_US and
pub/static/adminhtml/*

however I don't need all the others that are also being generated. I tried to at least uninstall luma but It didn't work and Magento/blank I can't remove because my theme inherits from it but it's not used in production.

Anyone got an idea?


texts: Could someone please explain Message Queues

texts:
So, I read that Magento 2.3 will be introducing Messages Queues to Open Source. A feature currently available in the Commerce Edition.

I've found some information about it here and here. But I'm struggling to wrap my head around the terminology.

Please, could someone provide me with some real-case examples of how this is used. And also why it's such a good thing to have included in the Open Source Edition.

Thanks


texts: Add configurable Product to Wishlist (not simple product option within the product)

texts: Is there an option to add a configurable product to the wishlist without the user having to select an option (like just add the shirt without specifying a size or color)?


texts: Error reporting: var/report/ vs. var/log/exception.log

texts:
I'm trying to fully understand Magento's error handling.

I noticed that sometimes if a fatal error occurs, a report is created in var/report (and an email is sent - depending on configuration) and on other occasions an error message is logged in var/log/exception.log. This all happens on the same installation, so it can't be a configuration thing.

How does Magento decide where to store an error message?


texts: Magento 2 : Coupon codes - auto generate

texts:
We already have a rule with 500 coupon codes auto-generated which are due for expiry in a few days.  If we generate a new set of auto-generated codes with a new start and finish date on the same rule I wanted to check that the old codes will not be affected and that they will remain in place.

  Question : Will it affect the existing rule when generating coupons in an existing rule?

Any ideas would be appreciated!


texts: Magento2 - How to configure PayPal Website Payments Pro Hosted and it's support 3D secure?

texts:
I am using Magento2.3.3 EE.

Payment country is UK. I want to configured PayPal Website Payments Pro Hosted  solution method in Magento2.

Does it support 3D secure? How to teat it?

I have read below docs but its seems found for PWA/Graphql.

https://devdocs.magento.com/guides/v2.3/graphql/payment-methods/hosted-pro.html

Have anyone implemented before can you please help me.


texts:
I use the extension by raveinfosys to export orders from Magento.

I changed some stuff in the ordering of the items, but I do not want to do this in the extension itself. I want to do it with an own module.

The file is located in:

/app/code/community/Raveinfosys/Exporter/Model/Exportorders.php

In the config.xml of that module, I can only find this item which is related to a Model:

<models>
            <exporter>
                <class>Raveinfosys_Exporter_Model</class>
                <resourceModel>exporter_mysql4</resourceModel>
            </exporter>
            <exporter_mysql4>
                <class>Raveinfosys_Exporter_Model_Mysql4</class>
                <entities>
                    <exporter>

exporter

                    </exporter>
                </entities>
            </exporter_mysql4>
        </models>

I can not find something related to Exportorders.php, but how do I have to modify my own config.xml to overwrite the current Exportorders.php?

Thanks!


texts:
I have one installation of Magento working in it's own DocumentRoot.
I have another installation of Magento working in it's own DocumentRoot

Both webroot are on the same server; so they both have the same IP, yet they have different domain names.

I can visit each frontend successfully, but I cannot login to both admin panels at the same time.  I'm constantly reading about it being a cookie issue, but even after clearing my cache, cookies, sessions... I still cannot login to them both simultaneously.

Why is this happening?  The two installations are completely independent of one another, they both use a different database.  I simply cannot understand this and it's very frustrating.

When I say that I cannot login, I mean that the login page does not log me in.  I receive no error or anything;  I'm just redirected to the login page again.

UPDATE

As a user brilliantly pointed out, and I forgot to mention it, but I do have an SSL cert for the domain assigned to the IP.

Somehow

I'm not sure how it worked, but I cleared all my cookies and cache, closed the browser and waited for everything to be released from the memory; like how you wait for a router to discharge after unplugging it and before replugging it.  I opened the browser (Chrome) in normal (not incognito mode) mode, opened both admin login panels in separate tabs, and it worked?

Given this new odd discovery that I haven't tried to replicate yet, I know that it is indeed possible to be logged into both panels; even when using the same IP.


texts:
I am trying to get the list of routers and followed this available module, but I am trying to get the router for every url that executed on the browser.
In the code as shown below.
foreach ($this->_routerList as $router) {
      $ret .= get_class($router)."\n";
}

is giving me routes only for this module, where as I want for all the urls.


texts: I want to override vendor\magento\module-email\Model\AbstractTemplate.php

texts:
I want to override method setForcedArea() because I'm using Magento 2.2.4 & whenever I tried to save Content->Configration->Design Configuration->Edit

I'm getting following error:-

Something went wrong while saving this configuration: Area is already set

Screenshot:-

  http://nimb.ws/kV93zH

When i R&D then found that it's M2.2.4 issue so I've to modify this method.

Here is the Module :-

Step1:- app/code/Allin/Coreissueresolve/etc/registration.php =>

<?php

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

Step2:- app/code/Allin/Coreissueresolve/etc/module.xml =>

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
    <module name="Allin_Coreissueresolve" setup_version="1.0.0"></module>
        <sequence>
            <module name="Magento_Backend"/>
             <module name="Magento_Sales"/>
            <module name="Magento_Quote"/>
            <module name="Magento_Checkout"/>
        </sequence>
</config>

Step3:- app/code/Allin/Coreissueresolve/etc/di.xml =>

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="Magento\Email\Model\AbstractTemplate" type="Allin\Coreissueresolve\Model\Magento\Email\AbstractTemplate" />
</config>

Step4:- app/code/Allin/Coreissueresolve/Model/MagentoEmail/AbstractTemplate.php  =>

<?php

namespace Allin\Coreissueresolve\Model\Magento\Email;

abstract class AbstractTemplate extends \Magento\Email\Model\AbstractTemplate
{
     public function setForcedArea($templateId)
    {
        echo "Hello123" ; exit;
    }

}

After that i've run php/bin/magento setup:upgrade  & also cache:flush.

But app/code/Allin/Coreissueresolve/Model/MagentoEmail/AbstractTemplate.php => setForcedArea() is not calling.

While vendor\magento\module-email\Model\AbstractTemplate.php => setForcedArea() is calling everytime.


texts: Magento2 Catalog Price Rule Not Working when i create rule and click on save and apply rule not applied on Category without re-indexing my indexing is on update on save mode.


texts: How do I get current transactional email name?

texts:
I want to display a custom text in the header.html template for different transactional email templates (order,account,password ....). My idea is to include a block:

{{block type='core/template' area='frontend' template='trans_emails/custom.phtml' type=$trans_template_name}}

Actually i don't know from where I should get the trans. email name. to pass it in the custom.phtml file. In that file I will put some conditions which  text will be displayed. My question is how do I get the current transactional email template name ?

thx


texts:
This is the redirect part from my observer:

public function _redirectUser(Varien_Event_Observer $observer)
    {
        $sessionUrl = Mage::getSingleton("core/session", array("name" => "frontend"));
        $session = Mage::getSingleton('customer/session');
        $lastUrl = $sessionUrl->getData("lastUrl");

        $session->setAfterAuthUrl($lastUrl);
    }

The idea is that I check if a user is logged in or not when it access the checkout . If it is not , it will be redirected to login. After login, it will be redirected to checkout/cart. This works fine. The problem is that my cart is empty after the redirect. After I refreshed the page, I got all the items from my cart. Why I do not get all of the items from my cart after redirect ? thx


texts: On my site(it is live now), my product image size i specified was 255px x 344px. But the customers uploaded images of size 1024px x 683px. So the images look very bad now. how can i re size the images without affecting its clarity?


texts: I transfer my magento 2.3 to other server and changed url base but not working

texts:
I changed my Magento server but at moment not working.
Changed:
 1. web/unsecure/base_url = http://52.44.112.168/~champrob2b
 2. web/secure/base_url = http://52.44.112.168/~champrob2b
 3. Clean Cache
 4. Restart Apache

Now:
- Stylesheet not loading
- Admin not working
- All pages going to 404

In the old server path (Sub-domain):
https://www.website.com/stoer

in the new server temporary URL (main domain):
http://52.44.112.168/~champrob2b/

Thank you for your consideration


texts: Few product restrict for specific countries/state : M2

texts:
I want to restrict some products to show in a particular country/state, Not all products.
Can you please suggest me how to achieve it?
Thanks in advanced!


texts: Magento 2 extension - How to retrieve customer's data after registration

texts:
I need to retrieve id and email from the new customer after registration success. I imagine I have to bind the "customer_register_success" event, but my attempt is not working:

etc/frontend/events.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="customer_register_success">
        <observer name="customer_register_success_observer" instance="<Mynamespace>\<Mymodule>\Model\Observer\CustomerRegister" />
    </event>
</config>

Model/Observer/CustomerRegister.php

<?php

namespace Vendor\Module\Observer;
use Magento\Framework\Event\ObserverInterface;

class CustomerRegister implements ObserverInterface
{
  public function execute(\Magento\Framework\Event\Observer $observer)
  {
    echo "Customer registered";
    $customer = $observer->getEvent()->getCustomer();
    echo $customer->getName();
    exit;
  }
}

registration.php

<?php

\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    '<Mynamespace_Mymodulename>',
    __DIR__
);

config.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="<Mynamespace_Mymodulename>" setup_version="1.0.0" />
</config>

Now when a new customer registers himself he sees the error: "We can't save the customer." (though the registration goes well and the new user is saved on the db), plus I don't see any "echo" message and  I don't know. if the error message depends on my changes.

How to debug it.


texts: Best practice to add a layout handle for my custom module?

texts:
I think I read somewhere that the best place to add a layout handle for a custom module was through the local.xml file in layouts folder. However, almost all modules that I have seen, never has one used the local.xml. Is it the best practice to use local.xml?

Do you have a link to an article explaining this practice? Also, say I just want to add a lone js/css file to the layout on every page, would local.xml's default handle be the best practice to do it OR what is the best approach for it?


texts:
i want to change the logo on my site. i have tried every method available.
i have uploaded my new logo to skin/frontend/default/default/images/
over and over again.
i have flush my magento cache, clear my browser cache as well. i am not a big magento guru so someone should please help me.i installed a quickstart for a magento theme and i can change the logo to mine. so i need help please.


texts:
I'm trying to use jQuery camera inside a page block, but I'm doing something wrong.

I added the camera.min.js into my custom theme folder
Theme_folder/Magento_Theme/web/js/camera.min.js

Here's my requirejs-config.js in Theme_folder/Magento_Theme/web/js/requirejs-config.js

var config = {
    map: {
        '*': {
            'camera': './js/camera.min'
        }
    },
    shim: {
        'camera': {
            deps: ['jquery'],
            exports: 'jQuery.camera'
        }
    }
};

And here's the js in the block:

require(['jquery', 'camera'], function(jQuery) {
    jQuery(function(){
        jQuery('#camera_wrap').camera({
            alignmen: 'topCenter',
            height: '36.341%',
            minHeight: '134px',
            loader : false,
            pagination: false,
            fx: 'simpleFade',
            navigationHover:false,
            thumbnails: false,
            playPause: false
        });
    });
});


texts:
I am trying to customize Magento top header with some custom static block and also want to change and relocate existing link  and icon like wish-list.
I created  static block for top-header social icon and try to add this default.xml file. But unlucky .

    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
                <referenceContainer name="header.panel">
            <block class="Magento\Cms\Block\Block" name="header_socail_link"  after="header.panel">
                <arguments>
                    <argument name="block_id" xsi:type="string">header_socail_link</argument>
                </arguments>
            </block>
        </referenceContainer>
        <referenceBlock name="logo">
            <arguments>
                <argument name="logo_file" xsi:type="string">images/astrokapoor_logo.png</argument>
                <argument name="logo_img_width" xsi:type="number">180</argument>
                <argument name="logo_img_height" xsi:type="number">69</argument>
            </arguments>
        </referenceBlock>
         <referenceContainer name="main.content">
            <block class="Magento\Framework\View\Element\Template" name="skip_to_content.target" before="-" template="Magento_Theme::html/skiptarget.phtml">
                <arguments>
                    <argument name="target_id" xsi:type="string">contentarea</argument>
                </arguments>
            </block>
        </referenceContainer>
        <referenceContainer name="footer-container">
            <container name="footer" as="footer" label="Page Footer" htmlTag="div" htmlClass="footer content">
                <block class="Magento\Store\Block\Switcher" name="store_switcher" as="store_switcher" template="Magento_Store::switch/stores.phtml"/>
                <block class="Magento\Framework\View\Element\Html\Links" name="footer_links">
                    <arguments>
                        <argument name="css_class" xsi:type="string">footer links</argument>
                    </arguments>
                </block>
                <block class="Magento\Theme\Block\Html\Footer" name="copyright" template="Magento_Theme::html/copyright.phtml"/>
                <block class="Magento\Framework\View\Element\Template" name="report.bugs" template="Magento_Theme::html/bugreport.phtml" />
            </container>
        </referenceContainer>
        <!--<move element="top.links" destination="header-wrapper" after="logo" />!-->
        <move element="wish-list-link" destination="panel.top.links" />
        <referenceBlock name="header" remove="true" />

    </body>
</page>

similarly I want add currency logo on top and wish-list logo after cart item.please see screenshot .its my exact requirement.any help


texts: Cart Price Rule based on category does not work via Rest API

texts: I have created a Cart Price rule (not catalog) and applied a discount to it. I can apply the discount fine using the store's UI. I can also apply the discount via Rest API. Then if I add an action to only allow the discount if the product belongs to a category I can still apply the discount via store's UI but when I try via Rest I get the response that the discount code is not valid. The Rest request is made through another store view but the category is also visible in said store view. What am I missing?


texts:
Anyone can help me this problem, the issue in this link the screenshot below
http://prntscr.com/p9qypy
Thank you so much!


texts: Magento changing store code creates issues in site css loading

texts:
I have installed Magento 1.9.2.4 CE for my site. It is a multistore site with two stores, "default" and "business".

Now I for a while changed my "default" store-view's code to something else and reverted back.

But when I open "default" store in my site, it's css doesn't seem to load properly. It's display is all messed up.

Default store: http://kaffemesteren.webexpressen.no/default/

Business store: http://kaffemesteren.webexpressen.no/bedrift/

I already cleared cache and session, still same issue.


texts:
How to get selected simple product id in the configurable product from the dropdown options in Magento 2
The below code works fine with "Swatch Option" but not work with the "Dropdown Option"
  requirejs(['jquery','underscore'], function(jQuery,_){
        jQuery(window).load(function(){
            jQuery( ".product-options-wrapper div" ).click(function() {
                selpro();
            });
        });
        function selpro () {
            var selected_options = {};
            jQuery('div.swatch-attribute').each(function(k,v){
                var attribute_id    = jQuery(v).attr('data-attribute-id');
                var option_selected = jQuery(v).attr('data-option-selected');
                //console.log(attribute_id, option_selected);
                if(!attribute_id || !option_selected){ return;}
                selected_options[attribute_id] = option_selected;
            });

            var product_id_index = jQuery('[data-role=swatch-options]').data('mageSwatchRenderer').options.jsonConfig.index;
            var found_ids = [];
            jQuery.each(product_id_index, function(product_id,attributes){
                var productIsSelected = function(attributes, selected_options){
                    return _.isEqual(attributes, selected_options);
                }
                if(productIsSelected(attributes, selected_options)){
                    found_ids.push(product_id);
                }
            });
            console.log(found_ids);
        }
    });


texts:
I was changing all my categories URLS to match my old website when i notices magento kept changing them when I click saved.

For example i would write "nike_air_force_one" and once i clicked saved magento would change it to "nike-air-force-one"

SO my questions is how can I stop it form changing my URLS as I need them to match my old site for Google ratings?


texts: How to get value in function that is retrieved and stored in a variable of another function in same class | Magento 2

texts:
I want to use $orderId value in other functions.

Here is class

<?php
namespace vendor\module\Observer;

use Magento\Framework\Event\ObserverInterface;

class Observer implements ObserverInterface
{
public function __construct(
\Magento\Framework\Registry $registry
) {
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
}

public function execute(\Magento\Framework\Event\Observer $observer) {
    $order = $observer->getEvent()->getOrder();
    $orderId = $order->getId();
    $customerId = $order->getCustomerId();
}
public function getOrderId(){

$Id = $orderId;
return $Id;
}

}

I tried this:

class Observer implements ObserverInterface
{
public $orderId;
public function __construct(
\Magento\Framework\Registry $registry
) {
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
}

public function execute(\Magento\Framework\Event\Observer $observer) {
    $order = $observer->getEvent()->getOrder();
    $this->$orderId = $order->getId();
    $customerId = $order->getCustomerId();
}
public function getOrderId(){

$Id = this->$orderId;
return $Id;
}
}

I am Calling getOrderId(); in same class..
but not working

Gone through links like https://stackoverflow.com/questions/519078/making-a-global-variable-accessible-for-every-function-inside-a-class Need a solution in this particular scenario.


texts: Magento 2 - Translation dictionaries query regarding using html

texts:
I need to figure out whether I use the html in Magento 2 translation dictionaries For example I have this translation dictionaries file in which there are many relevant messages

\vendor\magento\module-advanced-checkout\i18n\en_US.csv

For instance if I want to use some html like let say I want to bold some word in the predefined message. Can I use the html translation dictionaries file if yes then how I use it and if no then tell me the other way to do html related changes to translation dictionaries messages?

I already use some of the Html tags in translation dictionaries file but it's not working

Any help, experience and knowledge sharing would be appreciated.


texts: Magento2 - How to add remove all wishlist button on the wishlish page?

texts:
on the wishlist's page we have remove wishlist's button for each item, and we want to add a button that can remove all wish-list item all at once

thank you


texts:
I have changed the invoiced template to add new parameters before product table. The problem is the changes is not showing when I print the invoices.

The file I am changing is located at \app\code\local\Mage\Sales\Model\Order\Pdf\Invoice.php and \app\code\local\Mage\Sales\Model\Order\Pdf\Abstract.php

I have tried to delete the archives because Magento should show me the errors but there are not errors. The invoice still printing and not showing the changes.

I checked all modules overrides and in code/local/Mage... and I don´t overriding this files.


texts: Use a different base URL per language - shouldn't the base URL be stripped of?

texts:
We have hybrid Magento + Typo3 system and want - for Magento - have URLs like that:

de/produkte/
en/products/
fr/produits/
ru/produkty/
cn/zhìpǐn/
it/prodotti/
es/productos/

Typo3 would overlay the same structure (de/presse + en/press and so on)

What I did is to set the web/(un)secure/base_url to a different URL per store view.

#de
n98-magerun.phar config:set web/unsecure/base_url --scope=stores --scope-id=1 "$BASE"de/produkte/
n98-magerun.phar config:set web/secure/base_url --scope=stores --scope-id=1 "$SECURE_BASE"de/produkte/

#en
n98-magerun.phar config:set web/unsecure/base_url --scope=stores --scope-id=2 "$BASE"en/products/
n98-magerun.phar config:set web/secure/base_url --scope=stores --scope-id=2 "$SECURE_BASE"en/products/

Also I defined in the web-root .htaccess

# URL Rewriting to Magento
RewriteRule ^de/produkte/ mage/index.php [L,env=MAGE_RUN_CODE:de]
RewriteRule ^en/products/ mage/index.php [L,env=MAGE_RUN_CODE:en]
RewriteRule ^fr/produits/ mage/index.php [L,env=MAGE_RUN_CODE:fr]
RewriteRule ^ru/produkty/ mage/index.php [L,env=MAGE_RUN_CODE:ru]
RewriteRule ^cn/zhìpǐn/ mage/index.php [L,env=MAGE_RUN_CODE:cn]
RewriteRule ^it/prodotti/ mage/index.php [L,env=MAGE_RUN_CODE:it]
RewriteRule ^es/productos/ mage/index.php [L,env=MAGE_RUN_CODE:es]

But now in Magento, I only get a page not found from Magento.

As a workaround I rewrote the function \Mage_Core_Controller_Request_Http::getBaseUrl`

public function getBaseUrl()
{
    $url = parent::getBaseUrl();
    $url = str_replace('\\', '/', $url);

    // Workaround Patch
    $parts = explode('/', $this->getRequestUri());
    if ($parts[1] == $_SERVER['MAGE_RUN_CODE']) {
        $url = implode('/', array_slice($parts, 0, 3)) . $url;
    }

    return $url;
}

which removes the specific part from the URL.

While this is working, I am wondering if there is an easier solution? Shouldn't Magento automatically strip away the current base_url ?


texts: How to move product toolbar in breadcrumbs section on product listing page magento 2?

texts: How to move product toolbar in breadcrumbs Section in magento 2 product Listing page?


texts: Cannot add custom topmenu link with plugin

texts:
I want to add custom links to the topmen / a submenu in the topmenu (I need the links for custom filters). To achieve this, I have created a plugin:

app/code/Vendor/Module/etc/frontend/di.xml:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
    <!-- Plugin to add custom topmenu links -->
    <type name="Magento\Theme\Block\Html\Topmenu">
        <plugin name="Module-topmenu" type="Vendor\Module\Plugin\Block\Topmenu" sortOrder="1"/>
    </type>
</config>

app/code/Vendor/Module/Plugin/Block/Topmenu.php:

namespace Vendor\Module\Plugin\Block;

class Topmenu
{
    /**
     * @var NodeFactory
     */
    protected $nodeFactory;

    public function __construct(
        NodeFactory $nodeFactory
    ) {
        $this->nodeFactory = $nodeFactory;
    }

    public function beforeGetHtml(
        \Magento\Theme\Block\Html\Topmenu $subject,
        $outermostClass = '',
        $childrenWrapClass = '',
        $limit = 0
    ) {

        $node = $this->nodeFactory->create(
            [
                'data' => $this->getNodeAsArray(),
                'idField' => 'unique-id',
                'tree' => $subject->getMenu()->getTree()
            ]
        );

        $subject->getMenu()->addChild($node);
    }

    protected function getNodeAsArray()
    {
        return [
            'name' => 'Testlink',
            'id' => 'testlink',
            'url' => 'http://www.example.com/',
            'has_active' => false,
            'is_active' => false // (expression to determine if menu item is selected or not)
        ];
    }
}

But this does not work, the custom menu link won't appear. Is there an error in my code, or is there another way to add topmenu/submenu links that are not categories?

EDIT: The code seems to be correct. But the site uses a customized theme that did not call the Magento function to render the menu, thus the plugin never ran. Instead, the theme builds the menu "by hand". This issue is nonexistent.


texts: how to make category's in magento 2 checkbox selectable and not clickable in search area

texts:
hey guys hope I well get an answer.
I didn't find any extension for that and I well be happy to any help here.
so I have this filter of products that I can select each sub category and it well filter.
but I need to make the main category's filterable(Selectable) too.
because right now I only can click them
but I understand that its complicated with that.
I well be happy to hear any solutions for this


texts: How to debug php code in remote server with phpstorm

texts:
I come from the .net world, where F5 on visual studio just triggers debug and hits the breakpoints easily.

I dont have a local dev server, but I do have a remote dev server and I already setup the environment in phpstorm and magicento. (so magento development)

I used this tutorial:
https://www.youtube.com/watch?v=ReOzltfka9o

Can I debug remotely, lets say I upload a new php file, trigger the execution on the server, and then I want to hit a breakpoint locally?  How can I do that?

THanks


texts: Whats the use of the 'is_active' column in Magento 2?

texts:
For what purpose does the 'is_active' column (in the 'customer_address_entity' table) exists?
I've tested this column by setting its value to 0,  and then checked if the address setted to 0 disappeared from the shipment checkout page, but it was still there.
Version Magento 2.3.5


texts: How to i can get category name and category id with hierarchy parent to child from database in magento?

texts:
I'm using this query:

select cat.*, cv.value as `category_name` from `catalog_category_entity` as cat
    join `catalog_category_entity_varchar` as cv on cat.entity_id = cv.`entity_id`
    join `eav_attribute` as att on att.`attribute_id` = cv.`attribute_id`
    join `eav_entity_type` as aty on att.`entity_type_id` = aty.`entity_type_id`
    where aty.`entity_model` = 'catalog/category' and att.`attribute_code` = 'name' and cv.`store_id` = 0  and cv.`entity_id` != 2 and cv.`entity_id` != 1

but data is not coming according to category hierarchy parent to child, data is coming random.


texts: How to send all csv data to database table in magento2?

texts:
I have to send all csv data which have two column and multiple records, but it send of first row data for save. i have to submit request path and target path to table via csv. i am using this code in one file in root and hit directly.

please see my code :

    use Magento\Framework\App\Bootstrap;
         $params = $_SERVER;
            $bootstrap = Bootstrap::create(BP, $params);
            $objectManager = $bootstrap->getObjectManager();

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

$row = 1;
if (($handle = fopen("url_data.csv", "r")) !== FALSE) {
    while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
        $num = count($data);
        $row++;
        for ($c=0; $c < $num; $c++) {
             $data[$c] . "<br />\n";
    $urlRewrite = $objectManager->create(\Magento\UrlRewrite\Model\UrlRewrite::class);

    $urlRewrite->load(0);

    $model = $urlRewrite;
    $data['entity_type']      = 'custom';
    $data['request_path']     = $data[0];
    $data['target_path']      = $data[1];
    $data['redirect_type']    = 301;
    $data['store_id']         = 1;

   $objectManager->get(\Magento\UrlRewrite\Helper\UrlRewrite::class)->validateRequestPath($data['request_path']);
    $model->setEntityType($data['entity_type'])
        ->setRequestPath($data['request_path'])
        ->setTargetPath($data['target_path'])
        ->setRedirectType($data['redirect_type'])
        ->setStoreId($data['store_id'])
        ->setDescription("Imported Urls");

    $model->save();
     }
 }
    fclose($handle);
}

anyone have any idea for that, what i am missing please.


texts: Magento 1 Payment method not loading or showing on Checkout

texts: After Magento version upgrade or installing patches, most of the we face problem "Payment method not loading after clicking CONTINUE button of shipping method step on Checkout page". What could be solution for it.


texts: Installing Google recaptcha:2.0.0 on Magento Open Source 2.2.x

texts:
Included in Magento documentation the following steps to install Google recaptcha:2.0.0 on Magento Open Source 2.2.x:

Install Module:

 composer require msp/recaptcha:2.0.0

Enable Module:

php bin/magento module:enable --all

php bin/magento setup:upgrade

For the first code composer require msp/recaptcha:2.0.0, I get this error message:

  [InvalidArgumentException]   Could not find package msp/recaptcha in
  a version matching 2.0.0

It seems I have to add something to it and the code as I enter is incomplete. If I use a shared hosting and I want to install the module on: mywebsite.com. What should the command line exactly be?


texts:
I want to create the discount within the category.
100 off for any three product within category

But my rule apply only when user buy three item from the same product. Not within Category any three products


texts:
Hoping for some help - its my first post here!

I am looking to link my newly created Magento website (using v2.3.2) to an Microsoft SQL server database.I would like to Database connection with Microsoft SQL server.

Would anyone be able to recommend the best way to go around this? Not sure if this is something Magento supports directly or would have to be done through plugins or addons ?

Just looking for some early advice on this as i am a bit stuck.

I am wanting the website to run a night time job to pick up new prices, descriptions and/or stock etc.

Thanks
John


texts: magento 2 - How to get attribute set name in product listing and product detail page

texts: How can we retrieve the attribute set name for a product. I want to use it on product detail and listing page.


texts: How can I use the CLI in Windows to tweak Magento 2

texts: I have successfully installed Magento 2 on WAMP and its running perfectly fine. How can I now use the CLI in Windows to tweak Magento 2. Is this something to do with composer?


texts: add a session.gc_maxlifetime in .htaccess file

texts:
i want to add the session.gc_maxlifetime inside the .htaccess file but I can't find which .htaccess file and how to put it inside , is the code below correct

<IfVersion < 2.3>
    php_value session.gc_maxlifetime 2000
    order allow,deny
    deny from all
</IfVersion>


texts: Change isUsingStaticUrlsAllowed via observer

texts:
I would like to change returned value by this core function:

//vendor\magento\module-cms\Helper\Wysiwyg\Images.php

public function isUsingStaticUrlsAllowed()
    {
        $checkResult = new \StdClass();
        $checkResult->isAllowed = false;
        $this->_eventManager->dispatch(
            'cms_wysiwyg_images_static_urls_allowed',
            ['result' => $checkResult, 'store_id' => $this->_storeId]
        );
        return $checkResult->isAllowed;
    }

I created my own observer:

public function execute(\Magento\Framework\Event\Observer $observer)
    {

        $result  = $observer->getEvent()->getResult();
        $result->isAllowed = true;
    }

But it does not work and does not make sense (?). Can I change this value via observer or i need to use plugin ?


texts: How to use Magento 2's UI Library Layout LESS variables

texts:
In the Magento 2 UI library there are LESS variables for the layout grid. See Magento UI Library > Layout.

Particullarly there are these two:

Variables list names           Default value    Allowable values    Comment
@total-columns                      12        '' | false | value    Number of total columns in layout (i.e. 1, 2, 3)
@layout-column__sidebar-width        2        '' | false | value    Sets sidebar width

How does @total-columns work, where is it used?  It has a default value of 12.  I have only seen 3 columns in Magento 2, .column.main, .sidebar-main and .sidebar-additional.  I haven't seen any page with 12 columns.

How does @layout-column__sidebar-width work, where is it used? It's default value of 2 makes no sense, is it 2px, 2 columns of width.

When you look at these values on the frontend they are percentage measurements:


texts: I want to perform system cleanup of a Magento 1 store so what steps to be taken care in the same.


texts: I cannot get my simple products in the right order within my configurable products

texts:
I have set up configurable products, which consists of simple products. I want my simple products listed in order of dimensions. But when I add a new product, I see it listed at the bottom of the list instead in the middle where it belongs.

I have a screenshot attached that displays the issue. Please give me the golden tip. Thank you in advance.

Thank you for your response.


texts: Edit/modify Google Analytics code from core module, not working - Magento 2.4.1

texts:
I want to edit the default Google Analytics code from the core module Magento_GoogleAnalytics, that is build in Magento 2.4.1.
I want to add the line; setTimeout("ga('send','event','Profitable Engagement','time on page more than 30 seconds')",30000);
Therefore I copied the file to /app/design/frontend/theme/theme/Magento_GoogleAnalytics/web/js/google-analytics.js
With the following entire js code, see below. But for some reason that does not work. The code is not added to the js when I check the web store source.
I already flushed the entire cache and run the static-content:deploy. But still it is not added. What am I missing here?
CODE:
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
/* jscs:disable */
/* eslint-disable */
define([
    'jquery',
    'mage/cookies'
], function ($) {
    'use strict';

    /**
     * @param {Object} config
     */
    return function (config) {
        var allowServices = false,
            allowedCookies,
            allowedWebsites;

        if (config.isCookieRestrictionModeEnabled) {
            allowedCookies = $.mage.cookies.get(config.cookieName);

            if (allowedCookies !== null) {
                allowedWebsites = JSON.parse(allowedCookies);

                if (allowedWebsites[config.currentWebsite] === 1) {
                    allowServices = true;
                }
            }
        } else {
            allowServices = true;
        }

        if (allowServices) {
            (function (i, s, o, g, r, a, m) {
                i.GoogleAnalyticsObject = r;
                i[r] = i[r] || function () {
                        (i[r].q = i[r].q || []).push(arguments)
                    }, i[r].l = 1 * new Date();
                a = s.createElement(o),
                    m = s.getElementsByTagName(o)[0];
                a.async = 1;
                a.src = g;
                m.parentNode.insertBefore(a, m)
            })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');

            // Process page info
            ga('create', config.pageTrackingData.accountId, 'auto');
            setTimeout("ga('send','event','Profitable Engagement','time on page more than 30 seconds')",30000);

            if (config.pageTrackingData.isAnonymizedIpActive) {
                ga('set', 'anonymizeIp', true);
            }

            // Process orders data
            if (config.ordersTrackingData.hasOwnProperty('currency')) {
                ga('require', 'ec', 'ec.js');

                ga('set', 'currencyCode', config.ordersTrackingData.currency);

                // Collect product data for GA
                if (config.ordersTrackingData.products) {
                    $.each(config.ordersTrackingData.products, function (index, value) {
                        ga('ec:addProduct', value);
                    });
                }

                // Collect orders data for GA
                if (config.ordersTrackingData.orders) {
                    $.each(config.ordersTrackingData.orders, function (index, value) {
                        ga('ec:setAction', 'purchase', value);
                    });
                }

                ga('send', 'pageview');
            } else {
                // Process Data if not orders
                ga('send', 'pageview' + config.pageTrackingData.optPageUrl);
            }
        }
    }
});


texts:
I have magento 1.7 installed and it worked fine till now.

I import products on daily basis. If there is any new manufacturer, I add it in drop down based Manufacturer attribute.

Today, I have added new Manufacturer option in attribute back-end and gone to import products it successfully imported products.

But after that I try to open any page in Magento admin site, It ends up with below error message

  Fatal error: Cannot override final method
  Mage_Core_Model_Abstract::clearInstance() in
  /var/www/html/app/code/core/Mage/Catalog/Model/Category.php on line 36

Line 36 has just starting curly { for this class

class Mage_Catalog_Model_Category extends Mage_Catalog_Model_Abstract
{ <-- this is line 36

And I have checked Mage_Catalog_Model_Category but there is no method defined with name clearInstance. It is really annoying.

FYI: I did not touch a single character of code I'm just using ADMIN site to import products and adding some required attributes


texts: Position Checkout Error Message Magento 2

texts:
I don't know if it's a real issue but the checkout error messages displays in the discount block when I'm selecting a payment method.

The error is "Please choose a credit card". Why is it showing here ?
I would like to show this kind of error above everything in the step 2 of the checkout.
Any idea?
Thank you


texts: Programmatically add simple product for configuration product?

texts:
In magento 2 I had created 3 product via my code. Product type is configurable, simple, simple.
so now don't know set two simple product into configuration product.
thank for help!


texts: How to control layout of custom options in Magento?

texts:
I have a product with two groups of custom options and I want one group to appear in the "product info column" and the other to appear in the "block after info column".

Currently, on the product page > design tab there is only one option for the layout which controls where all product options display. There is no way to control this individually.


texts: Product collection by category id, gives zero products

texts:
The following code, returns an empty collection in most categories, even if the category indeed has products:

$objectManager =  \Magento\Framework\App\ObjectManager::getInstance();
$categoryFactory = $objectManager->get('\Magento\Catalog\Model\CategoryFactory');
$categoryHelper = $objectManager->get('\Magento\Catalog\Helper\Category');
$categoryRepository = $objectManager->get('\Magento\Catalog\Model\CategoryRepository');
$store = $objectManager->get('Magento\Store\Model\StoreManagerInterface')->getStore();
$category = $categoryFactory->create()->load($categoryId);
$collection = $category->getProductCollection()
             ->addAttributeToSelect('*');

Am I missing something?


texts: Magento 2 add parent category class to body for product listing page

texts: I have number of subcategories under a main category called 'services'. I want to add a custom class 'service-listing' to body on all the subcategory pages under this category.


texts:
I am developing my own module.
I want after user ordered successfully run method like send email, SMS and etc.

how can I do this?


texts:
I have a uiComponent defined

define(
    ['jquery', 'ko', 'uiComponent', 'Magento_Ui/js/modal/modal', 'domReady!'],
    function($, ko, Component, modal) {
        'use strict';

        return Component.extend({
            initialize: function() {
                this._super();

                //get view model here
            }
        });
    }
);

I have a couple of questions:

1. Is the Magento2 uiComponent a knockout component ?

2. Does this basic component has a view model created and attached to it on Component.extend ?

3. If the view model does not exist how do we add it to the component (better to have it in writing if that is the case) ?

4. How can I get the component view model in the initialize method ?


texts: How to keep products synchronized in two shops

texts:
How can I transfer all products from one shop to another after clicking a button?

We have a shop which is a copy of our real shop. We need to keep the products, prices, etc. synchronized in both shops.,

The copied store is just a staging server where we deploy new features/bugfixes so we can test it before it goes live

It would be best if we could just press a button which starts the import process.


texts: Unable to log in on onepage checkout page

texts: I am unable to log in as a customer. I have changed the password and email for this customer to my own that I want to test with, and still I can't log in. I am getting message that email or password are incorrect. I know for a fact they are correct. Where is the problem happening that is stopping me from logging in?


texts: how to check if current page is login page and how to check current page is registration page

texts: i am using magento 1.9.2.4 and i am creating a module that will check if page is not registration page or login then it will redirect to home page  is there any way to know that if current page is login page or customer registration page ? thanx in advance.


texts:
A lot of my products have custom options.

The 255 character limit in the custom options is not enough to properly describe some of them.

What I want to do is to have a tooltip for my custom options.

I have searched like crazy for an extension that will do this, but all I've found so far is image tooltips.

Does anyone know how I can pull this off?


texts: Fresh install Magento 2.3.3 Admin Panel 404 error

texts:
After install magento 2.3.3 magento admin panel 404 error,

Website Front-end working good.

Any help thanks


texts: How to remove up sell product from the cart page

texts:
How to remove up sell and cross sell product from the cart page. (you may also like block) I added below code in my app/design/frontend/Custom/Theme/Magento_Checkout/layout/checkout_cart_index.xml file but when I click view cart page I am getting 500 error.

<referenceBlock name="checkout.cart.upsell" remove="true"/>
<referenceBlock name="checkout.cart.crosssell" remove="true"/>

Please help


texts: Update price frontend based on custom option

texts:
I need to change the frontend price of a product when two custom options dropdowns are selected. I have found some code in this question, but where do I put the files?
change price

UPDATE1:

added below codeto the options file and nothing happens when I adjust the quantity ?

$('#qty').keyup(function(){
alert('test');
});

UPDATE2

jQuery.noConflict();
 $('#qty').keyup(function(){
    alert('test');
    });

but now report 'Function expected'

UPDATE 3
I have the test code working now, Thanks. The real code doesnt work as expected, I want to update the price on the product page. This should equal the value of the dropdown multiplied x 4. Currently the code updates the price by adding 50 to it.

jQuery('#select_3').removeAttr('onchange').change(function(){
price=50;
optionsPrice.chagePrice('opConfig',price);
optionsPrice.reload();


texts: Not able to add Custom phtml file on Product Page - Magento 2.2.4

texts:
I can't able to add/include my custom phtml file on product detailed page.

Here is my entire flow :

Added the following code in app/design/frontend/Themename/themedirectory/Magento_Catalog/layout/catalog_product_view.xml file

<body>
        <referenceContainer name="content">
            <container name="product-main-content" htmlTag="div" htmlClass="product-main-content" before="-">
                </container>
               </referenceContainer>

        <referenceContainer name="content.top.most">
            <container name="custom.block.sec" htmlTag="div" htmlClass="custom-class" before="-">
            <block class="Magento\Catalog\Block\Product\View" name="my_custom" template="Vendorname_Modulename::custom.phtml" />
            </container>
        </referenceContainer>

          <block class="Magento\Theme\Block\Html\Title" name="page.main.sub.title" template="Magento_Theme::html/title.phtml"/>

            <referenceBlock name="product.info.details">
          <block class="Magento\Catalog\Block\Product\View" name="cmsinfo.tab" as="cmsinfo" template="product/view/cms_tab.phtml" group="detailed_info" >
            <arguments>
              <argument translate="true" name="title" xsi:type="string">Custom Tab</argument>
            </arguments>
           </block>
         </referenceBlock>

          <move element="custom.block.sec" destination="product.info.main" before="-"/>

</body>

Added the custom.phtml file in app/code/Vendorname/Modulename/view/frontend/templates/custom.phtml
custom.phtml file content

Custom File Works

I referred this link  as well but no luck.

But its not working. Why?

Can anyone let me know what's the issue & how to add the custom file in product page?


texts: How can I use a "Cloudinary like" service to upload images by url?

texts:
We are trying to learn the best way to upload our images both individually and in bulk- and to figure out the selections for displaying images.

Does anyone use a service like Cloudinary for images?
Are you using the Magento product interface, a spreadsheet or some other way to upload your images?

I thought it worked last week but this week it is not accepting the url at all.


texts:
The issue is no matter what height my product image is, the page is creating blank buffer space below image.

Here's my code in chrome tools:

(full size)
    inherited from div.fotorama__stage
    Style Attribute {
        width: 719px;
        height: 719px;
        line-height: 719px;
    }

(mobile size)
inherited from div.fotorama__stage
Style Attribute {
    width: 493px;
    height: 493px;
    line-height: 493px;

Removing the height and line-height in Chrome tools solves my problem. I've removed every height reference in all files containing fotorama__stage but nothing works. Does someone know where these attributes are being generated?

Do I need to recompile to make .less files work? I'm a little concerned about doing this because the last time it crashed my whole site.

Magento V 2.0.13 Luma child theme


texts:
Magento EU Cookie law restriction block not loaded per store id? cookie_restriction_notice_block

Hi, we are using default Magento EU Cookie law restriction block and I had set a block in CMS/BLOCKS where I would normally do it. Then I make that block member of the relevant storeviews.

However I am now seeing that the Magento EU Cookie law restriction block does not seem to respect the fact that we have two versions for every language.

Problem: It keeps showing the one version with the highest ID (and not the one belonging to our language specific store)

So essentially: store 1 EN => should use cookie_restriction_notice_block that is enabled in english store &
store 2 DE => should use cookie_restriction_notice_block that is enabled in german store

But all stores show the same english store version? (which is strange because from the german store perspective this block is not enabled)

Experiences?


texts: Magento 2 adding navigation bar in checkoutpage

texts:
I am developing a custom theme in magento 2.1.7. Everything goes fine till I reached checkout page. There were no header and footer found in checkout page. It seems like magento 2's default behavior. But here in my case I need to show the menu bar and other header links in header and footer. I managed to bring up minicart and search in header. But I couldn't add navigation menu.
This is my

  app/design/frontend/vendor/theme/Magento_Checkout/layout/checkout_index_index.xml

file

     <referenceContainer name="page.messages" remove="false"/>
    <move element="logo" destination="header-wrapper"/>
     <move element="minicart" destination="header-wrapper" before="top.links"/>
    <referenceContainer name="catalog.topnav" remove="false"/>
    <move element="catalog.topnav" destination="header-wrapper" after="top.search"/>
    <referenceContainer name="page.wrapper">
        <container name="header.container" as="header_container" label="Page Header Container" htmlTag="header" htmlClass="page-header container" before="main.content">
        </container>
        <container name="page.top" as="page_top" label="After Page Header" after="header.container" />
        <container name="footer-container" as="footer" before="before.body.end" label="Page Footer Container" htmlTag="footer" htmlClass="page-footer"/>
    </referenceContainer>
</body>

I have checked many websites and some of them suggested it would be hidden in css. But I couldn't find the DOM for menu in page source. Can any one helps me out?