texts: Magento 2 multistore view switcher not working with multiple domains

texts:
When switching to another store view in the Magento front end, Magento responds only by redirecting back to the main store view domainstoreview1.tld/en_GB.
The site worked ok with all the store views on one domain until I configured a different domain.tld for each store view in the Magento 2.3.2 admin panel.

Also, when typing in domainstoreview2.tld, Magento redirects to domainstoreview1.tld.

Remarkable, when you generate a site map, store views keeps using the maindomain.tld for several store views. For sure these store views all have their own domain.tld in the base url settings.
After putting this within the .htaccess, the store view works when you type in storeviewdomain.tld, you have the right store view content:

SetEnvIf Host ^(.*)storeviewdomain1\.eu MAGE_RUN_CODE=en_GB
SetEnvIf Host ^(.*)storeviewdomain1\.eu MAGE_RUN_TYPE=store
SetEnvIf Host ^(.*)storeviewdomain2\.de MAGE_RUN_CODE=de_DE
SetEnvIf Host ^(.*)storeviewdomain2\.de MAGE_RUN_TYPE=store

However the store view switcher in the front end still does not work, when the browsers is in storeviewdomain2.tld and switch the scope to storeviewdomain1.tld, Magento redirects to the home of storeviewdomain2.tld.

I also tried changing index.php with standard htaccess and this index.php with above htaccess: Magento 2 Multistore is not working with multi domain
index.php content:

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

HTML;
    exit(1);
}

$params = $_SERVER;

switch($_SERVER['HTTP_HOST']) {

        case 'storeviewdomain1.eu':
        case 'www.storeviewdomain1.eu':
             $params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = 'en_GB';
                         $params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = 'store';
        break;

        case 'storeviewdomain2.de':
        case 'www.storeviewdomain2.de':
             $params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = 'de_DE';
                         $params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = 'store';
        break;
        case 'storeviewdomain3.es':
        case 'www.storeviewdomain3.es':
             $params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = 'es_ES';

                         $params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = 'store';
        break;
    }

$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $params);
/** @var \Magento\Framework\App\Http $app */
$app = $bootstrap->createApplication('Magento\Framework\App\Http');
$bootstrap->run($app);

I did not edited my nginx virtual hosts file like stated in https://devdocs.magento.com/guides/v2.3/config-guide/multi-site/ms_nginx.html

etc/hosts file content:

ip1.add.res.ss1 storeviewdomain1.eu storeviewdomain2.de storeviewdomain3.es

After configuring different domains for each store view, Magento was recompiled, deleted all cache, switched browser and I hard reloaded the site to avoid any local cache issues.
Magento 2.3.2 runs on Centos7 using nginx and varnish.


texts: What is reference for in layout update file?

texts:
I'm new to Magento, and am wondering what the reference tag is for in the [mylayout].xml file.

<reference name="root">
    <block type="dennis/mijnblok" name="content" output="toHtml" template="oefening/all/Mijnblok.phtml" />
</reference>

If I change reference name to content it will not work.

But, when I change name="content" to name="test", it does work.

So I'm wondering why, can anyone explain?


texts: Moving language block in footer not getting after reference block in magento2

texts:
I want move header language block into footer after copyright but it's display before copyright block

i have tried using

   <move destination="footer-container" element="store_language"  after="copyright"/>

but i am getting it before copyright

please see attachscreenshot


texts: Magento 2: None of the discount code is working

texts:
I'm tried of sorting out the discount code issue in our magento 2 website (Magento 2.4.1) .
Below is my rule description. I have tried with auto generation as well as manual code. None of them are working.
None of the coupons in our website is working as well.
I always get The Coupon Code get20off is not valid . If you look at the code all I have is one condition based on shipping method. My coupon code is not working in cart/checkout page.
I was trying for a very long time and not sure what I'm missing. If someone can go through the rule and let me know what's missing or what to do, that will be really helpful.
I also checked in database and everything looks good. It will be great if you can guide me how to troubleshoot this scenario.


texts:
i have add manually fav icon

and upload  fav magento_theme web image favicon.ico

but not showing


texts:
I want to put a Magento Redirect rule to change the URL for filtering products and category.

When I use the filter in a category, the urls are look like this :

FROM: http://example.com/redwine

TO  : http://example.com/redwine//cat/france

So, basically I want to remove the //cat. How can I do this trough either .htaccess or a hack in magento?


texts: custom text area wysiwyg attribute product in magento2

texts:
When I am getting the value of text area type attribute WYSIWYG enabled will not show images or media content in phtml.

I am using below code in my theme's product's addtocart.phtml file:

<?php
$_product = $block->getProduct();
$demoStore = $_product->getResource()-getAttribute('extension_demo_details')->getFrontend()->getValue($_product);
$attr_label_for_demo =$_product->getResource()->getAttribute('extension_demo_details')->getStoreLabel();
?>

<?php echo $demoStore; ?>

//Will not show media related data


texts: In my magento store Lifetime sales and total order revenue are different?

texts:
My magento store running from 2 years  But on my magento store dashbord

  Lifetime sales

and

  total order revenue

which is set for 2ytd is display different?
anyone have any good solution for this?


texts: How to Apply Custom Filter In Customer Admin Grid With customer attribute in magento 2

texts:
i wan to add custom filter with drop down value yes or no is select yes than apply filter and get that that custom attribute value are something
if apply no than apply filter and get that value that custom attribute value are blank

or else how can i apply sorting in that when i apply sorting this below types of error accrue

LIMIT 20 {"exception":"[object] (Zend_Db_Statement_Exception(code:
42): SQLSTATE[42S22]: Column not found: 1054 Unknown column
'customer_id' in 'order clause', query was: SELECT main_table.*,
IFNULL(rnt.name, IFNULL(rct.default_name,
main_table.billing_region)) AS billing_region FROM
customer_grid_flat AS main_table  LEFT JOIN
directory_country_region AS rct ON
rct.region_id=main_table.billing_region_id  LEFT JOIN
directory_country_region_name AS rnt ON
rnt.region_id=main_table.billing_region_id AND rnt.locale='en_US'
ORDER BY customer_id ASC  LIMIT 20 at
/var/www/html/unobstructedview/vendor/magento/framework/DB/Statement/Pdo/Mysql.php:110,
PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054
Unknown column 'customer_id' in 'order clause' at
/var/www/html/unobstructedview/vendor/magento/framework/DB/Statement/Pdo/Mysql.php:91)"}
[]


texts: How to Show Tier Price in Magento 2 Catalog Page

texts:
I have setup a tier price for my Magento 2 product and I can see the tier price on product details page like below screen shot.

I need to show the same "Buy 3 for $0.00 each and save 100%" in my catalog page also. Is there any way to show like this? Can anyone help me?


texts:
I'm trying to override a function in the Helper of the Swatches module of Magento 2. The function resides in the Data.php file. As some of you may know in specific versions of Magento 2 the text swatch values fall back to the default Admin value due to a bug.

A fix was issued here: https://github.com/magento/magento2/pull/15960

I am trying to implement this fix by overriding the function in Data.php using preference.

Since the Porto theme that I'm using is already overriding some other functions I decided to add my override there.

app/code/Smartwave/Porto/etc/di.xml

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
<type name="Smartwave\Porto\Block\Template">
    <arguments>
        <argument name="customTemplate" xsi:type="array">
            <item name="context" xsi:type="string">\Magento\Framework\View\Element\Template\Context</item>
            <item name="registry" xsi:type="string">\Magento\Framework\Registry</item>
        </argument>
    </arguments>
</type>
<type name="Smartwave\Porto\Block\CategoryCollection">
    <arguments>
        <argument name="categoryCollection" xsi:type="array">
            <item name="context" xsi:type="string">\Magento\Framework\View\Element\Template\Context</item>
            <item name="helper" xsi:type="string">\Magento\Catalog\Helper\Category</item>
            <item name="flatstate" xsi:type="string">\Magento\Catalog\Model\Indexer\Category\Flat\State</item>
            <item name="menu" xsi:type="string">\Magento\Theme\Block\Html\Topmenu</item>
        </argument>
    </arguments>
</type>
<preference for="Magento\Catalog\Controller\Category\View" type="Smartwave\Porto\Controller\Category\View" />
<preference for="Magento\CatalogSearch\Controller\Result\Index" type="Smartwave\Porto\Controller\CatalogSearch\Result\Index" />
<preference for="Magento\Catalog\Helper\Product\View" type="Smartwave\Porto\Helper\Product\View" />
<preference for="Magento\Swatches\Helper\Data" type="Smartwave\Porto\Helper\Swatches\Data" />

As you can see I added the preference on the last line.

app/code/Smartwave/Porto/Helper/Swatches/Data.php

namespace Smartwave\Porto\Helper\Swatches;

class Data extends \Magento\Swatches\Helper\Data
{

/**
 * @param array $fallbackValues
 * @param array $swatches
 * @return array
 */
private function addFallbackOptions(array $fallbackValues, array $swatches)
{
    $currentStoreId = $this->storeManager->getStore()->getId();
    foreach ($fallbackValues as $optionId => $optionsArray) {
        if (isset($optionsArray[$currentStoreId]['type'], $swatches[$optionId]['type'])
            && $swatches[$optionId]['type'] === $optionsArray[$currentStoreId]['type']
        ) {
            $swatches[$optionId] = $optionsArray[$currentStoreId];
        } elseif (isset($optionsArray[$currentStoreId])) {
            $swatches[$optionId] = $optionsArray[$currentStoreId];
        } elseif (isset($optionsArray[self::DEFAULT_STORE_ID])) {
            $swatches[$optionId] = $optionsArray[self::DEFAULT_STORE_ID];
        }
    }

    return $swatches;
}

}

However this doesn't seem to work. Is there anyone that can tell me why this is the case.


texts: After cart update get old and new quotes of each product

texts:
I'm trying really hard to learn Magento, but I need some help.

I want to track product quotes changes in cart after clicking to "update cart" button. I found nice events called checkout_cart_update_items_after and checkout_cart_update_items_before.

But I don't know how to get info about cart quotes changes in observer.

The best I achieved was

public function Mytestupd($observer) {
    $product = $observer->getData('cart');
    $quote = $product->getData('quote');
    $items = $quote->getAllVisibleItems();

    foreach($items as $item) {
        $prsku .= $item->getQty()." ";
    }
    }

Which of course just gives me old (or new, depends on event) quote of each item.

At the end I'd like to do

echo Mage::getSingleton('checkout/session')->addSuccess("Cart Updated, your changes are: ".$changes);

where $changes is something like

productOne: 3 items added;
productTwo: 4 items removed

I hope  that was clear enough and someone will help me!


texts:
[Ubuntu 18.04 / Apache 2.4 / PHP 7.2.17 / Magento 2.3.1]

After successful installing, magento show blank page. I found following error in apache error.log:

  [php7:error] [pid 29252] [client 127.0.0.1:45454] PHP Fatal error:
  Uncaught RuntimeException: Can't create directory
  /var/www/html/magento/generated/code/Magento/Framework/App/ResourceConnection/.\nClass
  Magento\Framework\App\ResourceConnection\Proxy generation error:
  The requested class did not generate properly, because the 'generated'
  directory permission is read-only. If --- after running the
  'bin/magento setup:di:compile' CLI command when the 'generated'
  directory permission is set to write --- the requested class did not
  generate properly, then you must add the generated class object to the
  signature of the related construct method, only. in
  /var/www/html/magento/vendor/magento/framework/Code/Generator.php:135\nStack
  trace:\n#0
  /var/www/html/magento/vendor/magento/framework/Code/Generator/Autoloader.php(35):
  Magento\Framework\Code\Generator->generateClass('Magento\\Framewo...')\n#1
  [internal function]:
  Magento\Framework\Code\Generator\Autoloader->load('Magento\\Framewo...')\n#2
  [internal function]: spl_autoload_call('Magento\\Framewo...')\n#3
  /var/www/html/magento/vendor/mag in
  /var/www/html/magento/vendor/magento/framework/Code/Generator.php on
  line 135

I have set chmod -R 777 /var/www/html/magento/generated.
But it's showing the same error.
Can you help?


texts: Set Product Category without Loading the Whole Product Model

texts:
I'm using this to update the attributes of a product:

Mage::getSingleton('catalog/product_action')->updateAttributes()

However, I want to set the category IDs as well. But $product->setCategoryIds() is a function not an attribute. Now, it will defeat the purpose of fast product saving if I load the product model just to set the category IDs. Any way I could set the category IDs without loading the product?


texts:
All my administrator accounts to login to the backend of the website is inactive. I cant login to change it because it shows access denied, how can i change it.

I have ftp access and cpanel access.


texts: Mage registry key Already Exist Magento 1.9.2.1

texts:
I have used the Observer event in my Custom module, but when i load the added event, it is showing below error message,

Mage Registry key "Observer" already exists.

I have checked the Compiler Mode, it is in Disable state.

I am using  event, Any help will be much appreciated.

<global>
    <events>
        <sales_order_status_history_save_before>
            <observers>
                <auto_order_statua>
                    <class>Custom_Status_Model_Observer</class>
                    <method>implementOrderStatus</method>
                </auto_order_statua>
            </observers>
        </sales_order_status_history_save_before>
    </events>
</global>

Observer.php

class Custom_Status_Model_Observer
{

    public function implementOrderStatus(Varien_Event_Observer $observer)
    {
        //$order = $observer->getOrder();
        //$stateProcessing = $order::STATE_PROCESSING;
        //$state = $order->getState();
        mail('nagamaniatnaresh@gmail.com', 'test', 'test');
    }

}


texts: Failed Magento SUPEE 6482 Security Check (APPSEC-1030) with Version 1.9.3.7 CE

texts:
The new Magento Security Scanner reports that there are vulnerabilities on the website and that patch SUPEE 6482 is required. This occurs even when there are no Modules enabled.

However, we are currently running 1.9.3.7 and the same fixes from SUPEE 6482 were applied in 1.9.2.1. There is no download available for SUPEE 6482 for any version of Magento after 1.9.2.0.

Also confusing is that the specific vulnerability, called APPSEC-1030, only affected the Enterprise Edition of Magento prior to 1.14.2.1.

The SUPEE 6482 patch for 1.8.1.0 - 1.9.2.0 modifies the following files:

  app/code/core/Mage/Api/Model/Server/Adapter/Soap.php
  app/code/core/Mage/Catalog/Model/Product/Api/V2.php

I have verified that these changes are already present, so applying the old SUPEE 6482 patch would do nothing. Additionally, none of these changes appear to address the APPSEC-1030 issue.

I am reasonably sure that this vulnerability - as it originally appeared in Magento - does not exist, but I am concerned that something else is re-introducing the same issue.

How do I determine exactly why this security check is failing?


texts: Magento 1.9 menu and products stock problem

texts:
I have a problem with a Magento 1.9.1.1 store: categories menu in header disappears and in the meantime all the product stock seems to be unavailable. The strange thing is that the two problems occur at the same time.

I've explored the site and there's a module installed that runs asynchronous re-index every minute, and the problem seems to appear every minute, so I think the 2 problems are related.

My question is: what can possibly cause this problem? A database lock during re-index on the stock information so that Magento can't read data?

Thanks in advance.


texts: 500 Internal Server Error - Fresh Install

texts:
I just setup a fresh install of cpanel.
Uploaded magento package - tested both.
Magento-CE-2.1.6-2017-03-29-12-40-05
Magento-CE-2.0.13-2017-02-20-06-04-35
tried php 56, 57,70
move .htacess
Verified I could get the html files.
Opened a ticket with cpanel for help.

Error Below.

  Internal Server Error

  The server encountered an internal error or misconfiguration and was
  unable to complete your request.

  Please contact the server administrator at
  webmaster@magento.************.com to inform them of the time this
  error occurred, and the actions you performed just before this error.

  More information about this error may be available in the server error
  log.

  Additionally, a 500 Internal Server Error error was encountered while
  trying to use an ErrorDocument to handle the request.


texts: Sort products in category by stock quatity or stock availabilty

texts:
I show out of stock items on my website and they are all over the place but I dont want to get rid of them.

I want to sort the category so that products that are out of stock appear last, is this possible?


texts:
I'm using the Luma theme. I would like to change the padding for the a-tag tag used in the navigation submenu. I can change the backgroundcolor of the items (li) like this,

@navigation-desktop-level0-item__active__color: @navigation-desktop-level0-item__color;,

but not the padding of the a-tag within the li-tag. Can anyone help me?


texts:
I want to load getChildHtml on category view. I just tried this:

Inside list.phtml I added this line:

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

In local.xml I added this line inside
<catalog_category_layered>
<reference name="content"> :

<block type="catalog/product_list" name="specificaties" as="specificaties" template="catalog/product/list/specificaties.phtml"/>

And inside the specificaties.phtml I added this code:

<?php
    $_helper = $this->helper('catalog/output');
    $_product = $this->getProduct();
    $theme = $this->helper('ultimo');
    $helperSnippets = $this->helper('ultimo/rsnippets');
?>

<?php $yourCatIds = array(235);
$productCats = $_product->getAvailableInCategories();

if (count(array_intersect($yourCatIds,$productCats))) {
    echo '
' . $_product->getAttributeText('i_display_diagonal_944_1') . '
';
    echo '
' . $_product->getAttributeText('i_processor_family_2196_1') . '
';
    echo '
' . $_product->getAttributeText('i_internal_memory_11381_1') . '
';
}
?>

But that breaks down the page. What am I doing wrong?


texts: How do I disable grid row click in adminhtml product catalog?

texts:
How do I disable grid click? So I can only click "Edit" link.

This is the grid in adminhtml:

Here are all the places where getRowUrl($row) function is:

I've tried changing the function in vendor/magento/module-catalog/Block/Adminhtml/Product/Grid.phpto return false;, and afterwards recompiling/deploy static content, but it doesn't work:


texts: How to add description and short description to product?

texts:
I would like to use a function to add a description and a short description, but cannot locate anything related in

  www/vendor/magento/module-catalog/Model/Product.php

//$product is an instance of Magento\Catalog\Model\Product

$product->setDescription('suyyyper long fooBar');
//setDescription does not exist, so what would be a way to set a desscription ?
$product->setShortDescription('suyyper fooBar');
//setShortDescription does not exist, so what would be a way to set a desscription ?


texts: Magento2: Select box as title in checkout as select

texts: The title field in the checkout of M2 is only text field. Is there a possibility to use a select button instead to let the customer choose between "Prof" and "Dr"?


texts: How can I allow a Configurable product price (tax) to apply as per tax class of simple (child) product in Magento 2

texts:
Magento 2 version 2.2.2

Steps to set tax rules:
Create a configurable product, which has two simple (child) products.
Configurable product is set as taxable with 20% tax setup.
First simple product is set as taxable with 20% tax setup.
Second simple product is set as no tax i.e. 0% tax.
Add second product through configurable options to cart.

Actual result:
Tax of 20% is being applied in cart for the second simple product.

Expected result:
0% tax should be applied for the second simple product.

How can I modify this to achieve my requirement?


texts: Magento 2 Area is already set in Admin Panel

texts:
I can't access Admin panel. It return Exception printing is disabled by default for security reasons.

I checked my System.log

[2018-06-04 14:49:21] main.CRITICAL: Exception message: Area is already set
Trace: #0 /home/criactiv/public_html/generated/code/Magento/Email/Model/Template/Interceptor.php(284): Magento\Email\Model\AbstractTemplate->setForcedArea('design_email_he...')
#1 /home/criactiv/public_html/vendor/magento/module-theme/Model/Design/Config/Validator.php(117): Magento\Email\Model\Template\Interceptor->setForcedArea('design_email_he...')
#2 /home/criactiv/public_html/vendor/magento/module-theme/Model/Design/Config/Validator.php(68): Magento\Theme\Model\Design\Config\Validator->getTemplateText('design_email_he...', Object(Magento\Theme\Model\Data\Design\Config))
#3 /home/criactiv/public_html/vendor/magento/module-theme/Model/DesignConfigRepository.php(91): Magento\Theme\Model\Design\Config\Validator->validate(Object(Magento\Theme\Model\Data\Design\Config))

It returns many errors.

I have my vendor/magento/module-email/Model/AbstractTemplate.php well set.

/**
     * Store the area associated with a template so that it will be returned by getDesignConfig and getDesignParams
     *
     * @param string $templateId
     * @return $this
     * @throws \Magento\Framework\Exception\MailException
     */
    public function setForcedArea($templateId)
    {
        if (!isset($this->area)) {
           $this->area = $this->emailConfig->getTemplateArea($templateId);
        }
        return $this;
    }

I don't know what seem to be the problem.


texts: How does the payment gateway works in Magento 2?

texts:
I want to integrate my own payment gateway in Magento 2. I've read many topics, studied the sample code from the Magento 2 repository and the braintree module.

However I've not found great posts about the used patterns and how they works. I would like to understand what's the process and the functional flow behind this.
Actually I can implement the payment gateway but it's completely useless if I can't understand how it works.. So what I need is some technical logic explanation and what are the different process.


texts: The "i18n:collect-phrases" command does not collect all translatable strings from JS

texts:
During module development I trying to collect all translations to the i18n/en_US.csv file using regular command:

sudo -u www-data php bin/magento i18n:collect-phrases -o /var/www/html/app/code/Vendor/Module/i18n/en_US.csv /var/www/html/app/code/Vendor/Module

But it collected not all phrases. Phrases from JS was missed, which written like that one:

define([
    'jquery',
    'uiComponent',
    'ko',
    'Vendor_Module/js/action/generate-method',
    'uiRegistry',
    'mage/translate'
], function ($, Component, ko, methodsGenerator, registry, $tr) {
    'use strict';

    return Component.extend({
        defaults: {
            visible: false,
            changeLocationLabel: $tr('Change my location')
        },

As a result the 'Change my location' phrase was missed in the i18n/en_US.csv file.


texts:
My Magento website is pretty fast. Pages are loading within 2 a 3 seconds. I'm using the compiler, and APC caching.

Also my checkout is fast, except when it's loading the shipping costs. I'm disabled all shipping methods to check if it's due to a plugin. But still, when I disabled everything, loading the shipping methods is very slow.

Especially /saveBilling is slow (1.3 minute).
Strange thing is that it was fast before and I didn't did anything.

EDIT:

I think I have a good Blackfire profile now. Generating this profile took me about 1.42 minutes. The other profiles were pretty fast, so nothing was wrong with that I think.

https://blackfire.io/profiles/12909e01-127e-4298-9409-76adbb8803ad/graph


texts: Dynamically change the category layout based on filters

texts:
Synopsis

I have a problem where by a Magento Store I am working on has been configured to use grouped products with associated simple products.  These products can be filtered by the products attributes/values as configured in the admin.

Current behaviour

The simple products' visibilities are set to Not visible individually.
The simple products when searched are displayed by their group product.

When the end-user filters the products results by colour and for example red, the grouped products with simple associated products that have an attribute value for colour of red are displayed.

Expected behaviour (after customization)

The simple products' visibilities are set to Not visible individually.
The simple products when searched are displayed by their group product.

When the end-user filters the products results by colour (only) that instead of the grouped products being displayed, that simple product should be displayed.

My logic was - I could detect the filters through the request parameters.  When the colour filter has been set, I override the products results somehow.

When I say somehow what I mean is, this is the part where I have trouble solving my simple problem.  How can I solve this problem?

Conclusion / Attempts

Below are the list of attempts i've thought of and played around with to either find it doesn't entirely solve my problem or simply doesn't solve my problem at  all.

Observe the catalog_controller_category_init_before:

I thought when I observe the _initCategory() method I could override the layout in that I could potentially change the Magento configuration to display simple products and not grouped products.

However it appears $this->loadLayout() is never called, so I have to override the getLayout or viewAction methods on the CategoryController itself.

Override the CategoryController explicitly to implement layout changes:

I reverted the above and decided to pursue my second option of overriding the functionality.  Starting with extending the Mage_Catalog_CategoryController controller.

My first trial was to override the loadLayout, after learning this is never called I then decided to override the getLayout at this point I wasn't sure what I was going to do.

Override the Mage_Catalog_Block_Product_List:

I decided that the better option was to extend the actual block which has the models and collections necessary.  Within my block I override the getProductsListHtml method, I quickly learn the entire HTML has already been parsed, executed and generated.

So I couldn't simply.

Listen for the $this->getRequest()->getParams();
Iterate over the grouped products to get their associated products that match my filter;

Observe the catalog_product_collection_load_after event:

This time I thought fine I could observe the model collection and change the questy to alter the results when my filters have been set.  Whereby I get $observer->getEvent()->getCollection() and update the query based on my filters.

This doesn't work because I can remove the grouped products, but the simple products wont show up because of the visibility.


texts: Magento 2.4 - Storefront price presentation

texts: Magento by default presents the lowest price. Is it possible to overcharge the lower base price with a higher price from shared catalog?


texts: Magento 2, adding price value 1,000 convert and save as 1.00, issue

texts:
https://github.com/magento/magento2/issues/13851

In the above issue, in Magento 2 they did that on every price field, but they don't do that if Magento prefilled those values.
For example, if we can create a duplicate price type field and

  Admin enters the amount as $1,000 and click save then Magento will save like $1.00, and
  Admin enters $1000 and saves then Magento will pre-fill the form as $1,000 and then without changing any value click on 'save' only then Magento will save it as $1.

So, My question is, Is saving $1,000 as $1.00 is really an issue or Magento does that with a reason?


texts: Admin order new email template override?

texts: I want to override admin invoice email template in my custom module but I have no idea for this please suggest me if anyone did this task.


texts: is it safe to delete magento 2 table customer_visitor , will there be any consequence

texts:
In my magento 2 website there is a table named customer_visitor which has more than 15,47,354 entries . This would have been surely making the website slow , i did not care about that untill the website completly stopped working and this error was thrown to my face .

Lock wait timeout exceeded; try restarting transaction, query was: INSERT INTO `cw_customer_visitor` (`customer_id`, `session_id`, `last_visit_at`) VALUES (?, ?, ?)

I restarted the mysql server and the error was gone , but i am afraid it would keep on increasing and i would be faced with the same problem again .

Have anyone deleted this table ? Can anyone tell me is it safe to delete this table , if someone answer , please also tell me which log tables are harmless to delete , that would have been causing problems to the system

Thanks


texts: Magento2 How to use custom fonts in Homepage

texts:
Does anyone suggest me how i can use custom fonts in my magento website ?
I want to use "Red Rose" Google Fonts.
i already download that font family and upload to my theme file

"app/design/frontend/Vendor/Theme/fonts/"

Folder
now which steps i need to follow ?


texts: region/state code in tablerate.csv file in magento 2

texts:
i need to get the region/state code for Riyadh, Dammam, Jeddah.
or get me the zip/postal code range for the same cities.
pls help me.
Thanks.


texts: Magento 2.3 translations (translate label) in the admin panel (backend)

texts:
In Magento 1 I just added a translate.csv for my admin area.
How can I achieve this in Magento 2?
I just want to change the translations of a few things and add some missing translations. Can't I put a de_De.csv for the adminhtml area somewhere?

How to handle translations for the admin panel (backend).
Thanks


texts: M2 Set permissions and groups to auto-generated files and folders

texts:
Every time I installed new extensions or do something that generates files and folders, it's like I lose the group, permissions, or magento generate a bad URL, like the cache and the double slash (...cache//...)
I need to execute, a lot of times, one or more of the next commands:

sudo chown user:www-data -R .
sudo chmod 777 var
sudo chmod 777 pub
sudo rm -rf var/cache/*
sudo rm -rf generated/*
...

I would like to know if there is any way to force Magento always use the group www-data, and do not create the double slash into the cache folder


texts: Magento1.9 : moving webserver to new web server location

texts:
Already have installed our magento 1.9 in Following Configuration

Magento ver = 1.9

Ubuntu = 12.04

Apache 2 = 2.2.22

php = 5.4.45

We have to plan move to webserver to new web server Following Configuation

ubuntu = 18.04

Apache2 = 2.4.29

php = 7.2.10

Can you please suggest me Above configuation support to magento1.9


texts: When we run di:compile then getting error in magento 2.1.3

texts:
When we run command di:compile then we are getting error. we are using magento 2.1.3
sudo php bin/magento setup:di:compile Compilation was started. Area configuration aggregation... 5/7 [====================>-------]  71% 28 secs 244.0 MiBMiB

[ReflectionException]
Class Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface does not exist

[ReflectionException]
Class Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface does not exist

Please share some correct answer.


texts: Magento refusing to connect after installation

texts:
I am using Magento 2 Developer's Guide to learn magento. Following the instructions for setting up the local environment I used Vagrant to install and run magento on a UNIX box. The VagrantFile executes fine and from the execution logs it looks like magento is installed and the server is up.

1)  Here's how we've defined the ip info. in vagrant file :

config.vm.network "private_network", ip: vagrantConfig['ip']

2)  ip value in the config file :

ip: 192.168.10.10

3) I then modified the hosts file on my host machine to include this :

192.168.10.10   magento.box

Here's what I get when I try to access magento installation from the browser :

Any thoughts on how to get this to work ? I am out of ideas on this.


texts: How to using mixins for "mage/dataPost"?

texts:
I try to mixin a widget js file following guide at here.
I create a file requirejs-config.js in view/frontend directory.
There's view/frontend/requirejs-config.js:

var config = {
   config: {
      mixins: {
          'mage/dataPost': {
              'Vendor_Training/js/dataPost-mixin': true
          }
      }
   }
};

And there's view/frontend/web/js/dataPost-mixin.js:

define([
  'jquery'
], function($) {
    console.log('Mixin Working');
    return function (dataPost) {
       return dataPost;
    };
});

And it's exist on pub/static/frontend/<Vendor>/<theme>/en_US/requirejs-config.js. But it's not working.

And it's working when I use map on requirejs-config.js to override.

The mixins js file not calling when dataPost.js run.

Any help would be appreciated.


texts: Magento 1 catalog_product_flat_1 corrupt

texts:
We have disabled the option to use catalog flat product.

Not we have a corrupt DB message:

magento.catalog_product_flat_1
Error    : Incorrect information in file: './magento/catalog_product_flat_1.frm'
error    : Corrupt

How can we solve this?

Can we for example safely remove the table: catalog_product_flat_1?


texts: Magento2 Limiter on product review page not working

texts:
I am using Magento 2.1.4, Limiter for the product review on product details page not working. After changing limiter value ajax is not working. Please refer screenshot

If I change page limiter then I want one ajax call which is not working


texts: Magento 2 How to disable module using xml file?

texts:
I am facing issue to create module. I created one module and I given apply to system admin to enable disable.
So, Right now I am doing module hide/show using below code.

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$module_enable = $objectManager->get('Magento\Framework\App\Config\ScopeConfigInterface')->getValue('magefilter/magefilter/enable');
if(isset($module_enable) && $module_enable==1){

but is there any way if I can disable module from admin then it is disable by xml file.

I means is there any way to not ovverride that xml.

Thanks


texts: Magento 2 CSS inlining error in Order Success mail

texts:
I am working on Magento ver. 2.1.10.

After the Order is successfully placed, the customer is getting a mail regarding the successful order in which a warning error appears:

CSS inlining error: Warning: DOMXPath::query(): Undefined namespace prefix in public_html/vendor/pelago/emogrifier/Classes/Emogrifier.php on line 269 .

What I have already checked :

  Put this in the require-dev part of composer.json:
  "pelago/emogrifier": "1.0.0 as 0.1.1"

But still issue persists.

Please guide me to fix this issue.

Thanks in Advance.


texts:
Been struggling with this for a week now. I have some code where I create a quote and add shipping details but I can't get the shipping price to save on the quote. Everything else such as the shipping method and description works though so I am a bit puzzled.

Here is my code

$quote = Mage::getModel('sales/quote')->load(1234);

$shipCode = $_GET['so-rate-code'];
$delCost = $_GET['so-rate-price'];
$delTitle = $_GET['so-rate-title'];

$quote->getShippingAddress()->setShippingMethod($shipCode); // WORKS FINE
$quote->getShippingAddress()->setShippingDescription($delTitle); // WORKS FINE
$quote->getShippingAddress()->setShippingAmount($delCost); // WONT SAVE !!!
$quote->getShippingAddress()->setCost($delCost); // WONT SAVE !!
$quote->getShippingAddress()->setBaseShippingAmount($delCost); // WONT SAVE !!
$quote->collectTotals();
$quote->save();

Any help would be greatly appreciated


texts:
<?php
    $productCollection = Mage::getModel('catalog/product')
        ->getCollection()
        ->addAttributeToFilter('name', array('like' => '%hp%'))
        ->addAttributeToSelect('*');

    foreach ($productCollection as $product) {
        //echo $product->getSku();
        echo "

".$product->getName()."

".$product->getDescription()."

";
        echo 'getUrlPath().'">
        init($product, 'thumbnail')->resize(100).'">';
    }
?>

The above code is making the path of an image is..

src="http://127.0.0.1/magento/media/catalog/product/cache/1/thumbnail/100x/9df78eab33525d08d6e5fb8d27136e95/images/catalog/product/placeholder/thumbnail.jpg"

but I want to get an image from this path.

media/catalog/product/and the Path of the image

How to get right path of image?


texts: In magento which price or price rule has the highest priority?

texts:
Suppose I have set following rules/prices set in Magento for product (all type)

1) Special price

2) Tier Prices

3) Catalog price rules

4) Group prices

Then which price will be having highest priority and which  will be applicable to the product on adding to the cart?


texts: How to import & export product attributes in magento?

texts:
I have created product attributes in  my magento site,now i want to export all  attributes to another magento site.
Please suggest how it can be done?


texts: Observer (event hook) for media or images

texts:
I want to create a module that will hook events for images being added to products or vendors etc so that when it's saved and was already an existing image (image was being updated) - that it would invalidate that image (in cloudfront).

What events would allow me to detect this; maybe extend the image.php where it saves the image?  Currently I don't see any dispatched events that will help me;

I tried: core/Mage/Catalog/Model/Product/Attribute/Backend/Media.php:277:

Mage::dispatchEvent('catalog_product_media_add_image', array('product' => $product, 'image' => $file));

But found that the event is not dispatched when adding an image to a product.  But technically - I only need to know about changed images - is there a way for me to detect (by hooking the before or after product save event) what properties have been updated?

Any direction would be greatly appreciated.


texts: I am trying to make soap call to get data from 3rd party website. How can i use soap api call in magento2 ?


texts:
I want to add custom button to the order view, which should print the package slip.
How can I do that?

Thanks!


texts:
As a beginner, can anyone tell me which is the best source to learn how the knockout js works in magento2?

I have tried learning from http://knockoutjs.com/ but it does not give the detailed idea for magento2 working.

You can also suggest the paid tutorials/videos, it would be fine for me.


texts: Magento 1.9 - How do I get default captcha in custom template file?

texts:
I had created a custom template file for a custom newsletter subscription form for my Magento 1.9 store, How do I get magento default captcha in that form?

Is there any way to call default captcha in any of the custom template form in Magento 1.9?


texts: Google Search Console notifies an error as shown in the screenshot. How to ensure such errors do not occur so the search engines can crawl and access the pages on the site?


texts: Price Filter not displaying in Magento 1.9.2.4 Community Edition

texts:
Hope all of you are doing good.

Guys I have followed 2 tutorials to do this task but in default magento without any customization simply it is not coming.

http://www.templatemonster.com/help/magento-how-to-configure-the-price-filter-for-layered-navigation.html

https://stackoverflow.com/questions/7713009/price-ranges-in-magento

I am sharing my setting of system -> configuration -> catalog -> layered navigation

Here is my price attribute settings :

This is my frontend display:

One more thing when I am setting Use In Search Results Layered Navigation as yes under price attribute setting price filter is visible on search result.
see the screen shot.


texts: Persitent shopping cart not showing 'remember me'. Magento 2

texts:
I've enable the peristent shopping cart in

  Shop > Config > Client > Persistent Shopping Cart

and enable the "Remember Me" part, but the checkbox is not showing on frontend, why ? I have a Magento_Sales folder in my app/design, maybe it's because of this ?

PS : Magento 2.2.5 and all caches cleared

Edit :

Here's what I have with path hint

I've remove my customer_account_login.xml file from my folder and the checkbox is appearing, but the login and password are not stored on front.


texts: Magento 2 customer can't log in but I can

texts:
My customer reported me, that he can't log in to shop because he's s getting almost blank page:

I tried to log in as customer using my account and had no problem with this. But my customer was saying the problem is still there. So I asked him about his login and password. When I tried to log in using his credentials I had the same error. I noticed when I press "Log in", cpu usage of MySQL goes to 100%.

What could be wrong? There must be some kind of problem with account, but I have no idea how to debug it.


texts: Magento 2 - How to create item wise shipment And add tracking number Separately For an Order

texts:
Suppose in an order there are 3 items(i1,i2,i3) and I want to create separate shipment with tracking number for all the items.

e.g:-

i1 have Carrier Title as "Title1" and Tracking Number as "123456"

i2 have Carrier Title as "Title2" and Tracking Number as "321234"

i2 have Carrier Title as "Title3" and Tracking Number as "654321"

PFA for more clarification:-

how can i achieve the same?also let me know when order status will be changed(either after creating shipment for all items or any one of the item)?

Please help me to achieve the same.

Waiting for the update!!!


texts: Magento 2: How to load data by Page using same collection object again?

texts:
I am using \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory and loading data by creating objects.

$collection = $this->collectionFactory->create()
                    ->addAttributeToSelect('*')
                    ->addAttributeToFilter('type_id',  array('simple', 'configurable'))
                    ->setPageSize($limit)
                    ->setCurPage(1);
$result = $collection->getData();

The $result contains the first-page result. Can I use the same object to render the second-page result?.


texts: Magento Customer duplicate row delete using query

texts:
I was imported the customer in Magento via pro-grammatically,actually i having nearly 320000 records,also in that having some duplicate records. the duplication is based on firstname,lastname and email.

So i like to remove the duplicate customer from customer table, i search in google to find the solution, but not yet get any positive result.

I found this query-

select d1.id FROM demo d1, demo d2 WHERE d1.firstname = d2.firstname AND d1.id > d2.id;

But i dont know how to write in magento

if you have any idea regarding my requirement means, your idea will help me much more,i am waiting for your positive response.


texts: How to specific pass fields in custom rest api for get product Information

texts:
I'm creating custom rest API for getting a list of products.
In my module, I have just use the getList function of ProductRepository.
I need to pass select specific fields in API.
so, how can I get that??

Note: In core API, we can get these response using below URL:

  rest/V1/products?fields=items[name,qty,sku],total_count

I want to pass these fields programmatically.


texts: I would like to create a menu in admin dashboard , just like sales , products and my menu structure will be parent->child .Any one can hep me to do this.


texts: Custom product limit value change if i change category

texts: If a user set custom value for "Product per page" (eg: ?product_list_limit=48) the value is restore to default (admin value) if user change category. Why? In magento 1 the user custom value was maintained for all categories


texts:
i m using...
getLogoSrc()->resize(100) ?>" alt="getLogoAlt() ?>" />


texts: How to add Custom Css class to a footer block in Magento 2.3

texts:
I want to attach one custom CSS class to a footer block using javascript. How can we do that?

About Us

Contact Us

Careers

Sell

Terms & Conditions


texts: How to add submenu into the main menu of the different module in admin panel


texts: What is use of custom option SKU in magento?

texts: Will the order display the SKU Number you input for the Custom Options? What if there is 4 different Custom Options to choose from, and each Custom Option has a individual SKU, how will that work?


texts: How do i get category ID in final_price.phtml and hide price accordingly in magento 2

texts:
this is my current final_price.phtml file. the line

  $category = $product->getCategoryIds();
  is causing error

I'm trying to get the category_id of the current product, and check if it's in $hiddenCategories array. If it is in the hiddenCategories, i would like to hide the price for that item.

<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

?>

<?php
/** @var \Magento\Catalog\Pricing\Render\FinalPriceBox $block */

/** ex: \Magento\Catalog\Pricing\Price\RegularPrice */
/** @var \Magento\Framework\Pricing\Price\PriceInterface $priceModel */
$priceModel = $block->getPriceType('regular_price');

/** ex: \Magento\Catalog\Pricing\Price\FinalPrice */
/** @var \Magento\Framework\Pricing\Price\PriceInterface $finalPriceModel */
$finalPriceModel = $block->getPriceType('final_price');
$idSuffix = $block->getIdSuffix() ? $block->getIdSuffix() : '';
$schema = ($block->getZone() == 'item_view') ? true : false;

?>

<?php
/*get category id*/
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $categoryCollection = $objectManager->get('\Magento\Catalog\Model\ResourceModel\Category\CollectionFactory');
    $productRepository = $objectManager->get('\Magento\Catalog\Model\ProductRepository');
    $product = $objectManager->get('Magento\Framework\Registry')->registry('current_product');//get current product
    //$productId = $product->getId();
    $category = $product->getCategoryIds(); /*will return category ids array*/   //this is the line causing problem
    $hiddenCategories = array('375','376','377','378','379','380','381','382','383','384','385','386','387','388','389');
    //$category = $block->getCategoryIds();
        //if ($categories AS $category) {
        //if (in_array($category, $hiddenCategories)) {
            /*dont' show price*/
        //  break;
        //   }
?>
<?php if (!in_array($category, $hiddenCategories)): /*only show price if category is not in array*/?>
<?php if ($block->hasSpecialPrice()): ?>

        <?php /* @escapeNotVerified */ echo $block->renderAmount($finalPriceModel->getAmount(), [
            'display_label'     => __('Special Price'),
            'price_id'          => $block->getPriceId('product-price-' . $idSuffix),
            'price_type'        => 'finalPrice',
            'include_container' => true,
            'schema' => $schema
        ]); ?>

        <?php /* @escapeNotVerified */ echo $block->renderAmount($priceModel->getAmount(), [
            'display_label'     => __('Regular Price'),
            'price_id'          => $block->getPriceId('old-price-' . $idSuffix),
            'price_type'        => 'oldPrice',
            'include_container' => true,
            'skip_adjustments'  => true
        ]); ?>

<?php else: ?>
    <?php /* @escapeNotVerified */ echo $block->renderAmount($finalPriceModel->getAmount(), [
        'price_id'          => $block->getPriceId('product-price-' . $idSuffix),
        'price_type'        => 'finalPrice',
        'include_container' => true,
        'schema' => $schema
    ]); ?>
<?php endif; ?>
<?php if ($block->showMinimalPrice()): ?>
    <?php if ($block->getUseLinkForAsLowAs()):?>
        <a href="<?= /* @escapeNotVerified */ $block->getSaleableItem()->getProductUrl() ?>" class="minimal-price-link">
            <?= /* @escapeNotVerified */ $block->renderAmountMinimal() ?>

    <?php else:?>

            <?= /* @escapeNotVerified */ $block->renderAmountMinimal() ?>

    <?php endif?>
<?php endif; ?>
<?php endif; /*end don't show price*/?>


texts: Is there a way to conditionally display a CMS block based on URL params?

texts:
I would like to display CMS blocks only if they match a specific param pattern.

So for example, if the param are something like:

example.com?p=1

I would like to display block A

if the param is something like:

example.com?p=2

I would like to display block B

Is it possible to do this using Magento's {magentocode}} syntax?


texts:
I am working on an application for which I want to create few sub-domains in system, which will be served by Magento application. One example scenario can be creating separate sub-domains for system user's profile. Where User A will have dedicated url user-a.example.com and user B will have a url user-b.example.com. Now, I want to able to map these sub-domains to a controller which will in turn fetch profile information and render it for a particular user.

My current approach involves use of Reverse Proxy on webserver level, where i am mapping subdomains <USER>.example.com to controller http://example.com/user/profile/index/name/<USER>/. Which works well untill i want to perfom some operation based on current url. Even though user sees url with subdomain on the page but in the background request is being made to http://example.com/user/profile/index/name/<USER>/ and Magento system returns full url as current page url.

So, I was wondering if there is any way to bind a subdomain to controller directly in Magento system. I went through few questions posted around this but those does not seems to much useful here.


texts: magento 2 : Multi selected category attribute backend show empty

texts:
I created module for adding new custom category attribute multi selected type i follow this  link

Magento2 : Create multi select category attribute with custom source

In admin it show empty.


texts: Layered navigation is working in magento 2.1.7 but not working in magento 2.2.2

texts:
Hear is my layout file same code is working fine in magento 2.1.7 but not working in magento 2.2.2. I don't know why it's not working :

    <referenceContainer name="sidebar.main">
        <block class="Magento\LayeredNavigation\Block\Navigation\Category" name="catalog.leftnav" before="-" template="Demo_Shopby::layer/view.phtml">
            <block class="Demo\Shopby\Block\Navigation\State" name="catalog.navigation.state" as="state" />
            <block class="Magento\LayeredNavigation\Block\Navigation\FilterRenderer" name="catalog.navigation.renderer" as="renderer" template="layer/filter.phtml"/>
        </block>
    </referenceContainer>


texts: Adding products causes "Maximum execution time of 30 seconds exceeded in Gd2.php on line 184"

texts:
I am attempting to add products to Magento 2.0 but every time I go and add one it gives me the following error:

  Fatal error: Maximum execution time of 30 seconds exceeded in /home/admin/public_html/vendor/magento/framework/Image/Adapter/Gd2.php on line 184

Can anyone help? Here is the code I am using:


texts: is Magento Mobile still officially supported?

texts:
Looks like all the Magento Mobile related documents are very old already, is it still officially supported by Magento now? do we have any newer support documentation?

http://www.magentocommerce.com/knowledge-base/categories/category/magento-mobile/

I tried in admin,  admin --> mobile - manage Apps --> Save and Submit App, it doesn't have any response, is there something I'm missing?


texts: Search by sku not working with solr in magento2

texts: solr search is integrated with magento-2. Itst working fine. But when product is searched by Valid SKU, results not found message is appearing.


texts:
I just installed Magento but when i try to open the admin panel i get a blank page. The only thing that is visible is the banner. It says

Fatal error: Class 'Mage_Compiler_Helper_Data' not found in /var/www/app/Mage.php on line 547

Debian 7.8 x64
Nginx
PHP fastcgi


texts: Magento 2.3.5 SOAP API extension attributes as array of item

texts:
I have added an extension_attributes to Magento\Sales\Api\Data\OrderInterface  this attribute is of return type mixed in interface E.G:

CustomFieldInterface:

/**
     * Get custom field
     *
     *
     * @return mixed
     */
    public function getCustomField();

    /**
     * Set custom field
     *
     * @param @param \Vendor\Module\Model\CustomField[] $customField
     * @return mixed
     */
    public function seCustomField($customField);

CustomField:

/**
 * Get custom field
 *
 * @return mixed
 */
public function setCustomField()
{
    return $this->getData(self::CUSTOM_FIELD);
}

/**
 * Set custom field
 *
 * @param $customField
 * @return mixed
 */
public function setCustomField($customField)
{
    $this->setData(self::CUSTOM_FIELD, $customField);
    return $this;
}

extension_attributes.xml:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Api/etc/extension_attributes.xsd">
    <extension_attributes for="Magento\Sales\Api\Data\OrderInterface">
        <attribute code="custom_field" type="string[]"/>
    </extension_attributes>
</config>

When I call the API I can see in the extension attribute like so:

<customField>
    <xsd:string>value1</xsd:string>
    <xsd:string>This is my value2</xsd:string>
    <xsd:string>Here is a message to you</xsd:string>
</customField>

The question is about the tag <xsd:string> I was expecting it to be an <item> tag.

How to convert to <item> tag? what I am missing anything here?


texts:
I need to hide a product from catalog and search.

So on my product page in visibility I set No visible individually, but I need to show it if it is related to another product and this other product is bought.

So I only need to display it in checkout/cart.

How do I do?

EDIT

If it's not possible, how can I ask the user if he wants to add another product (still for cross selling) after he has added a product on his cart (but the product doesn't have to appear on the catalog nor research result)


texts: Magento : Add Custom Attribute in Bundle Shipment Invoice

texts:
I want to add item number in shipment and order invoice for bundle products. I add item number attribue for configrable successfully.

Now I m unable to get sku of parent item, to get item number of bundle products. I try many methods but didnt get perfect solution.

I follow the path:
Mage_Bundle_Model_Sales_Order_Pdf_Items_Invoice

please any can help me... any suggestions

Thanks.


texts: magento free shipping and keep shipping price for report

texts:
I started working with magento for a few weeks and I'm having a problem with free shipping. There is a way of retrieve the shipping price of the orders sold with promotions of free shipping?
I need to know how much I have to pay for the shipping company.


texts: Magento 2 Dependency Injection: Lazy Load with Resolution of Concrete Class-Name

texts:
For my concrete class I'd like to have a dependency (via interface type-hint) that at the time of instantiation not only lazy-loads (e.g. Magento 2 Proxy) but also resolves to the  class-name, for example via a function call.

As far as I've understood the concept of the proxy the proxy is only able to lazy-load a concrete class instance.

In my case I need to lazy-resolve such an instance as well.

Example:

In context of my module, there is the current user. So that current user is the dependency. As it's the dependency the class has to ask for it (not to look for it).

<?php
# ...

class MyModule
{
    # ...

    public function __construct(CurrentCustomerInterface $customer)
    {
        $this->customer = $customer;
    }

    # ...
}

Right now a common pattern I do see in my code is to require the Session and obtain the current user from it. This violates a design principle, as you should not look for things.

I could extract that looking into a CurrentustomerResolver but still I need to look for things, it's just a bit more abstract (I would add a single layer of indirectness).

Question is: What does the Magento 2 dependency injection layer provide for true(tm) lazy-load of dependencies?


texts: How to create admin form and action for edit and delete in magento 2

texts: I am developing one module for post data to be displayed on front-end and all posts can be add,edit,delete by admin. I want to use UI Component for that, so can anyone can have idea about how to develop this module.


texts: Internal server error 500 in particular pages

texts: I have setup a store in magento and i am getting the HTTP internal server error 500 in createpost page that is after a customer clicks on submit button in the register page and in forgotpasswordpost that is after a customer enters email and click on submit button in the forgot password page. and once I hit back a normal message is being shown saying "Thank you for registering" All other pages are working fine. How can I sort this out kindly help me with this.


texts: Adding multiple items per single listing

texts:
I want to be able to add multiple items per listing (like eBay variation drop down menu). I'm going to being to start selling Mobile Handsets and Covers and want to have the one listing with multiple variations of colours.

I've had a look around the Magento Marketplace for something but cannot find anything I'm looking for. Do you guys know of any addons that have the ability to do this?

Thanks, Steve


texts: I have installed magento 2.3.0 with sample data successfully. backend screen is black and blank. Also not getting any thing on frontend just links are displaying and can view pages. forms, products not displaying.


texts: Magento 2 - How to disable customer account by code script or function?

texts: In magento2, how to disable customer account by code script for an action or what existing function do this(disable).


texts: magento 2 sort child products according swatches in product view page

texts:
I wanna sort the child products of configurable according to display swatches.
I wanna sort the child products in product page.
Product page swatches display like this Green,White,Black
When I use my below code its fetching child products but not sort according to swatches. How swatches sorted and display, and what should I change in my below code ?
$childItems = [];
        $_objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $_product = $_objectManager->get('Magento\Framework\Registry')->registry('current_product');
            if($_product->getTypeId() == "configurable"){
            $imageBuilder= $_objectManager->get('Magento\Catalog\Model\Product\Image\UrlBuilder');
                $allProducts = $_product->getTypeInstance()->getUsedProducts($_product, null);

                foreach ($allProducts as $product) {
                    $productStockObj =  $objectManager->get('Magento\CatalogInventory\Api\StockRegistryInterface')->getStockItem($product->getId());
                   if ($productStockObj->getIsInStock()){
                    $childItems[] = $product->getSku();
                    }
                }
            }

     print_r($childItems);

When I run above code it displays the child array like this sku-white,sku-black,sku-green
I want sort the child items according display swatches


texts: Get products which do not have any custom option

texts:
i have to get the products which do not contain any custom option, but not using has_options flag. The aim of doing this if the products do not contain any option, i have to set has_options to 0 progmatically(may be through magmi).

Is there any filter statement can select the products which do not have have custom options?


texts: Magento2 performance killer -factory pattern

texts:
Magento using factory pattern injecting non-injectable objects such as products,categories.so that it will create new object every time when you use create method on factory object.
Is there any other use case?
I don't think i will add my  customization in factory so that it will call whenever object creation.
Even magento2 core team also not used anywhere.

I think these type of patterns will decrease the magento performance.
Implementing design pattern is fine.but my question is 100% ,atleast 50% we are utilizing that?


texts: Can't select secondary attribute size until primary attribute color is selected

texts: I can't select secondary attribute  "size" until primary attribute "color" is selected. Is there a way to allow the customer to select either size or color first? I.e., I want the customer to be able to select blue and see all the available sizes or select a size and see the available colors.


texts: UPS Magento 2.3 when generate shipping label then getting error this "Failed to send items"

texts:
1 - Using Magento 2.3.3 UPS Shipping

2 - we are able to get the Shipping Rates at checkout.

3 - when we are trying to create shipping label from admin then it gives an error like this - "Failed to send items"

This is screenshot.

Please let us know if anyone has face this type of error.


texts: Magento Frontend Redirects to example.com/setup/index.php/session/unlogin

texts:
I have installed Magento 2.3 latest version with sample data and redirects to

example.com/setup/index.php/session/unlogin

when I open frontend.


texts: Warning: imagejpeg 'Failed to open stream' on product update Magento 2

texts:
When attempting to save a product (transferred originally from Mage 1 database) in Magento 2 I am receiving the following error.

Warning: imagejpeg(/var/www/html/pub/media/catalog/product/cache/1/swatch_image/30x20/beff4985b56e3afdbeabfc89641a4582/s/m/small-table_4_2.jpg): failed to open stream: Permission denied in /var/www/html/vendor/magento/framework/Image/Adapter/Gd2.php on line 181

If I visit this location in the file system the image does not exist.

If I look in the product page of admin panel or on the front end I can see no call to this specific image link.

Can anyone please assist?


texts: Problem adding custom email field to Review form in Product Page

texts:
I want to add custom field to review form in which you can input email .
I looked at the answer of this question : Add email field to Review Form - Magento 2
I did everything exactly as the answer said (only changed the vendor name).
To add the input field i used :
When I try to send review i get front-end error message - "We cannot post your review right now", if however i change data-validate to required:false and if i don't type anything in the input everything works good and the review is submitted.
Can anyone help ?
P.S: module is enabled , everything should be setup correctly.


texts: Translation of Magento (Frontend) v1.9.2.4 to Serbian

texts: I have to translate Magento frontend to Serbian. How can I do that and where can I find the translation files? I am guessing I have to just put them in locale/sr_SR.csv, but not really sure. Neko zna o ovome kako se radi? :)


texts:
I added column to sales_flat_quote_item. This column is a attribute of product. When I change in admin attribute value, values is sales_flat_quote_item not updated. Do you have any idea?

Edit :

This is my config.xml

    <sales>
        <quote>
            <item>
                <product_attributes>
                    <size_of_product />
                    <shipping_cost />
                    <shipping_cost_exp />
                    <shipping_cost_with_zip_code />
                    <shipping_cost_with_zip_code_exp />
                </product_attributes>
            </item>
        </quote>
    </sales>
    <fieldsets>
        <sales_convert_quote_item>
            <size_of_product>
                <to_order_item>*</to_order_item>
            </size_of_product>
            <shipping_cost>
                <to_order_item>*</to_order_item>
            </shipping_cost>
            <shipping_cost_exp>
                <to_order_item>*</to_order_item>
            </shipping_cost_exp>
            <shipping_cost_with_zip_code>
                <to_order_item>*</to_order_item>
            </shipping_cost_with_zip_code>
            <shipping_cost_with_zip_code_exp>
                <to_order_item>*</to_order_item>
            </shipping_cost_with_zip_code_exp>
        </sales_convert_quote_item>
        <sales_convert_order_item>
            <size_of_product>
                <to_quote_item>*</to_quote_item>
            </size_of_product>
            <shipping_cost>
                <to_quote_item>*</to_quote_item>
            </shipping_cost>
            <shipping_cost_exp>
                <to_quote_item>*</to_quote_item>
            </shipping_cost_exp>
            <shipping_cost_with_zip_code>
                <to_quote_item>*</to_quote_item>
            </shipping_cost_with_zip_code>
            <shipping_cost_with_zip_code_exp>
                <to_quote_item>*</to_quote_item>
            </shipping_cost_with_zip_code_exp>
        </sales_convert_order_item>
    </fieldsets>

and event in config...

        <checkout_cart_product_add_after>
            <observers>
                <my_module>
                    <class>My_module_Model_Observer</class>
                    <method>setShippingAttribute</method>
                </my_module>
            </observers>
        </checkout_cart_product_add_after>

And this my observer, where I add attributes to item:

   public function setShippingAttribute($observer){
       $quoteItem = $observer->getQuoteItem();
       $product = $observer->getProduct();

       $quoteItem->setSizeOfProduct($product->getData('tt'));
       $quoteItem->setShippingCost($product->getData('pt2'));
       $quoteItem->setShippingCostExp($product->getData('pt1'));
       $quoteItem->setShippingCostWithZipCode($product->getData('kt2'));
       $quoteItem->setShippingCostWithZipCodeExp($product->getData('kt1'));

    }

How to update, when I change value in admin? I don't write cron, who update all table, after one little change...


texts: Product Information: General: How to make measurements starred items (*)?

texts:
These items are starred in the general tab:

SKU *
Weight *

How do we make the following items "starred"/required?
Width
Length
Height


texts: is there any way to change the prices of a quote, after payment method was selected?

texts:
I need to make a rule for only one payment method, this rule will changes the price of the products. actually i have a method where i can do that, but i don't know how to save the new price.

   class Mipc_Payment_Block_Info_Monthlypayment extends Mage_Payment_Block_Info
{

protected function _prepareSpecificInformation($transport = null)
{
    if (null !== $this->_paymentSpecificInformation) {
        return $this->_paymentSpecificInformation;
    }
    $info = $this->getInfo();
    $transport = new Varien_Object();
    $transport = parent::_prepareSpecificInformation($transport);

        $transport->addData(array(
            $this->__('Plan de pago') => $info->getPaymentPlanTitle(),
            $this->__('Incremento por plan de pago') => round($info->getPaymentPlanIncrement(), 2).'%',
        ));

        $cart = Mage::getModel('checkout/session')->getQuote();
        foreach ($cart->getAllItems() as $item) {
            $this->log($item->getProduct()->getName());
            $oldPrice = $item->getProduct()->getPrice();
            $newPrice = $oldPrice * ((round($info->getPaymentPlanIncrement(),2) / 100) + 1); //display something like 1.1326
            $item->getProduct()->setPrice$newPrice();
            $item->save();
            $this->log($item->getProduct()->getPrice()); // this shows the new price, but on the step number 5 of OnePage Checkout is showig the oldPrice.
            $this->log("==  == ==");
       }

        return $transport;
    }


texts: Magento 2. What is the recommend way to disable a core cron job?

texts:
Magento comes with it's own cron jobs.
What is the recommended/cleanest way to disable on of such crons?
I could do a rewrite of the worker class but I'm guessing there is an easier way.

Any pointers are much appreciated. Thanks.


texts:
Hi is there magento extension that is free where customer can see how many items available to purchase a product?

Example on a product it will say

"In Stock"
"3 items left"


texts: How to include js on category pages Magento 1?

texts:
Hello i am using magento 1
i am not sure how can i include the below js in magento category pages frontend.
<link rel="stylesheet" href="https://unpkg.com/swiper/swiper-bundle.css">
<link rel="stylesheet" href="https://unpkg.com/swiper/swiper-bundle.min.css">

<script src="https://unpkg.com/swiper/swiper-bundle.js"></script>
<script src="https://unpkg.com/swiper/swiper-bundle.min.js"></script>

https://swiperjs.com/get-started/
How to ideally include the above js on category pages ?


texts:
I have writed in Model\ResourceModel\Order\Grid\Collection
I don't know if i write this way. It working
protected function _initSelect()
{
    parent::_initSelect();

    $tableDescription = $this->getConnection()->describeTable($this->getMainTable());
    foreach ($tableDescription as $columnInfo) {
        $this->addFilterToMap($columnInfo['COLUMN_NAME'], 'main_table.' .
$columnInfo['COLUMN_NAME']);
    }

    $this->getSelect()->where("main_table.status='pending'");

    return $this;
}

But it not working with this way
<?php

namespace Magento\Sales\Model\ResourceModel\Order\Grid;

use Magento\Framework\Data\Collection\Db\FetchStrategyInterface as FetchStrategy;
use Magento\Framework\Data\Collection\EntityFactoryInterface as EntityFactory;
use Magento\Framework\Event\ManagerInterface as EventManager;
use Psr\Log\LoggerInterface as Logger;

class Collection extends
\Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult
{

public function __construct(
    EntityFactory $entityFactory,
    Logger $logger,
    FetchStrategy $fetchStrategy,
    EventManager $eventManager,
    $mainTable = 'sales_order_grid',
    $resourceModel = \Magento\Sales\Model\ResourceModel\Order::class
) {
    parent::__construct($entityFactory, $logger, $fetchStrategy,
$eventManager, $mainTable, $resourceModel);
}

/**
 * @inheritdoc
 */
protected function _initSelect()
{
    if($this->request->getParam('status')){
        $paramStatus = $this->request->getParam('status');
    }
    parent::_initSelect();

    $tableDescription = $this->getConnection()->describeTable($this->getMainTable());
    foreach ($tableDescription as $columnInfo) {
        $this->addFilterToMap($columnInfo['COLUMN_NAME'], 'main_table.' .
$columnInfo['COLUMN_NAME']);
    }
    if(isset($paramStatus)){
        $this->getSelect()->where("main_table.status='$paramStatus'");
    }
    return $this;
}
}

Please help me!


texts: In Magento 2 how to print Product view page?

texts:
In magento 2.3.0 how to print product view page ?
i tried o using window.print() but its shown like below image url.
http://prntscr.com/n4i0si

but i need only the product data will be print like below image

http://prntscr.com/n4i2lb

any one help on this

My code in .phtml

    Print Product


texts: How to install plugin for single store in multi store setup?

texts:
I have a plugin, that I only need installed against a single store in a multistore Magento 2 setup.

Installing via composer appears to install the plugin globally across all storefronts, I can work out how to configure different credentials for the plugin on a per store basis, but not remove it from the other stores entirely.


texts: Best way to modify product collection on list page

texts:
I've a requirement that I've to modify product listing page and hide all configurable products for which if any of the associated product is out of stock.

Which is the best place to modify considering performance and my filter should be applicable for all attributes?

I know two possible options.

list.phtml from template or
Create my own observer using catalog_block_product_list_collection event


texts:
I want to select invoice month-vise and download it with a single click. Currently i have go in every invoice and click print.

But i want to export all invoice in pdf form.

Please tell me how can i acheieve it


texts: override product attribute values on product detail page

texts:
Hei

We have tabs on product detail page and in specification tab I have length , weight attributes

Those have some decimal values, I want to override them, how can I achieve this??

Looking for solution


texts: Customize and override default magento meta tags in  for better SEO

texts:
in my product pages, my meta description tag is taking the product description despite the configurations that I set in Store > Config > Catalog > Catalog, where I set the description to {{short_description}}, but I always get the long-description content on the

<meta name="description" content="...">

Beyond that, there is the <meta property="og:description" content="Short Description.">, which always get the short description, I've tried to reidex, clean cache, delete static files, recompile, etc, but magento seems to ignore my configs. So I've searched to other ways to do that, overriding or something, and I find this question, but this doesn't appear to be a magento 2 solution.

So, any ideas of how can I override the default magento 2 meta description tags?

Thanks in advance!


texts: Magento2 how to display (stay) messages on checkout page

texts:
In the magento2 how to handle When the credit card is declined in Magento there is a message that pops up only for a few seconds to alert sho the card has been declined. Can we make the message stay up until another payment method is tried?
Can anyone suggest me how to achieve (or) provide me some steps in Magento2.3.5? Example here i have attached screenshot


texts:
How to make disable JavaScript merge only for Admin panel?

Is it possible to make on coding level?


texts: is it possible to change price of product before add to cart through javascript in magento 2? I can't use observer because I am calculating price on product view page through users..


texts: Get category/product url (URL rewrite url) and re-direct after login

texts: I want to Get category/product url (URL rewrite url) and re-direct customer to that url after login. I tried getLastUrl from session / redirectReferrer. Both returns only the actual url and not the SEO ones. Is there any other possibility to achieve this on a common way. I will be using this redirect throughout the site on all pages, not only in PDP/PLP.


texts: Grand total is zero with items in the cart

texts:
When I add items to my cart the grand total updates correctly but when I visit /checkout/cart/ for the first time the grand total is zero although the items are listed correctly.

Refreshing the cart page corrects the total, so this only happens on the first view. Subsequent visits to the cart page are correct so I'm guessing it's something to do with the session but don't know where to start.

Any help appreciated.


texts: Magento 2 phpcs coding standard rules cheatsheet

texts:
Has anyone got a cheat sheet style list of the common Magento 2 code quality exclusions?

// phpcs:disable Magento2.Templates.ThisInTemplate.FoundThis
// phpcs:disable Magento2.Files.LineLength.MaxExceeded

etc

I've search online but I can't find anything


texts: Magento 2: get next and previous link product links on product page

texts:
I have attempted to get the below helper class to function properly when called, however it returns the current product link rather than the previous and next links as it's intended. Also what would the proper way to filter products marked not visible. Any help is appreciated.

Helper Class

<?php
namespace Name\Module\Helper;

class Data extends \Magento\Framework\App\Helper\AbstractHelper
{
    protected $_coreRegistry;
    protected $productRepository;
     public function __construct(
            \Magento\Framework\Registry $coreRegistry,
            \Magento\Catalog\Api\ProductRepositoryInterface $productRepository

         )
    {
        $this->_coreRegistry = $coreRegistry;
        $this->productRepository = $productRepository;
    }
  public function getNextProduct()
    {
        $prodId = $this->_coreRegistry->registry('current_product')->getId();

        $catArray = $this->_coreRegistry->registry('current_category');

        if($catArray){
            $catArray = $catArray->getProductsPosition();
            $keys = array_flip(array_keys($catArray));
            $values = array_keys($catArray);

            $productId = $values[$keys[$prodId]-1];

            $product = $this->productRepository->getById($productId);

            if($product->getId()){
               return $product->getProductUrl();
            }
            return false;
        }

        return false;
    }
    public function getPreviousProduct()
    {
        $prodId = $this->_coreRegistry->registry('current_product')->getId();

        $catArray = $this->_coreRegistry->registry('current_category');

        if($catArray){
            $catArray = $catArray->getProductsPosition();
            $keys = array_flip(array_keys($catArray));
            $values = array_keys($catArray);

            $productId = $values[$keys[$prodId]-1];

            $product = $this->productRepository->getById($productId);

            $product = $this->productRepository->getById($productId);

            if($product->getId()){
               return $product->getProductUrl();
            }
            return false;
        }

        return false;

    }
}

Call within breadcrumbs.phtml

<?php if ($this->getRequest()->getFullActionName() == 'catalog_product_view') : ?>
    <a href="<?php $this->helper('Name\Module\Helper\Data')->getPreviousProduct() ?>">Previous
    <a href="<?php $this->helper('Name\Module\Helper\Data')->getNextProduct() ?>">Next
<?php endif; ?>


texts: Magento 2 - Check if product have custom option required

texts: how I can check in list.phtml if a product have custom options and if Required field is selected?


texts: Custom checkout field doesn't save the value to quote

texts:
I created a custom attribute for quote and order like this:

    $quote = 'quote';
    $orderTable = 'sales_order';

    $setup->getConnection()
        ->addColumn(
            $setup->getTable($quote),
            'is_dropship',
            [
                'type' => \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
                'comment' =>'Dropship Order'
            ]
        );

    //Order table
    $setup->getConnection()
        ->addColumn(
            $setup->getTable($orderTable),
            'is_dropship',
            [
                'type' => \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
                'comment' =>'Dropship Order'
            ]
        );

    $setup->endSetup();

then i add the custom field with checkbox type like this

  Vendor/Module/Plugin/Checkout/Model/Checkout/LayoutProcessor.php

public function afterProcess(
        \Magento\Checkout\Block\Checkout\LayoutProcessor $subject,
        array  $jsLayout
    ) {
        $jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
        ['shippingAddress']['children']['shipping-address-fieldset']['children']['custom_test'] = [
           'component' => 'Magento_Ui/js/form/element/abstract',
            'config' => [
                'customScope' => 'shippingAddress',
                'template' => 'ui/form/field',
                'elementTmpl' => 'ui/form/element/checkbox',
                'options' => [],
                'id' => 'is_dropship',
            ],
            'dataScope' => 'shippingAddress.is_dropship',
            'label' => 'Send as dropship',
            'provider' => 'checkoutProvider',
            'visible' => true,
            'checked' => true,
            'value' => 1,
            'validation' => [],
            'sortOrder' => 999,
            'id' => 'is_dropship'
        ];
        return $jsLayout;
    }

  Vendor/Module/etc/frontend/di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Checkout\Block\Checkout\LayoutProcessor">
        <plugin name="vendor_add_custom_field" type="Vendor\Module\Plugin\Checkout\Model\Checkout\LayoutProcessor" sortOrder="100"/>
    </type>
</config>

  Vendor/Module/etc/extension_attributes.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Api/etc/extension_attributes.xsd">
    <extension_attributes for="Magento\Checkout\Api\Data\ShippingInformationInterface">
        <attribute code="is_dropship" type="string"/>
    </extension_attributes>
</config>

the checkbox is showing fine.

But, When I check and place the order, the value of is_order in sales_order and quote table remain NULL


texts: Custom Payment Method Redirect : Magento 2

texts: I need to make payment method redirect to outline payment gateway and depend on response, If success then continue place order. If fail then cancel payment.


texts: Magento 2: Moving development installation to Live or not

texts:
We made a development copy of the Magento 2 site and we upgraded all the extensions and Magento 2 itself. Then we ran tests in order to make sure everything is working in development installation.

Do we have to do the same upgrade steps in the live production installation too or could we just copy the database from the production version to the development version and Magento would then handle upgrading database? Then we would just move the development version to be the new production version. Would this be the easiest way of handling system upgrade and would it work?

What would you recommend?


texts: Reference Head from custom layout handle

texts:
I'm having an issue adding JS and CSS files to the head using a custom handle. Here is a simplified version of my controller action:

public function indexAction() {
    $this->loadLayout();
    $this->_initLayoutMessages('customer/session');
    $this->_initLayoutMessages('catalog/session');

    $this->getLayout()->getUpdate()->addHandle('customer_social_index_tour');

    $this->renderLayout();
}

This handle is being conditionally added on existing customer_social_index pages. The XML for customer_social_index looks like this:

<customer_social_index translate="label">
    <update handle="customer_account"/>

    <!-- Other stuff here that all works great -->
</customer_social_index>

While the custom handle's XML looks like this:

<customer_social_index_tour translate="label">
    <reference name="head">
        <action method="addItem"><type>skin_js</type><name>js/my-js-file.js</name><params/></action>
        <action method="addItem"><type>skin_css</type><name>css/my-css-file.css</name><params/></action>
    </reference>
</customer_social_index_tour>

The problem is that the JS and CSS don't get added. Here are the steps I've taken to debug this:

Move the new handle above $this->loadLayout(); - No effect.
Move <reference name="head"> into <customer_social_index> to make sure that my syntax is right and Magento can find those files. - The files show up correctly.
Dump the list of handles on the page to make sure the handle is being applied correctly using <?php Zend_Debug::dump($this->getLayout()->getUpdate()->getHandles()); ?> - Handle is there as it should be.
Make other layout changes like <remove name="content" /> in <customer_social_index_tour> to make sure that the handle is being effective. - The content was removed.

So from what I can see, the code to add the JS and CSS files is written correctly and works in other handles, and the handle works correctly and can modify the layout. But for some reason I can't add the JS and CSS files from that custom handle.

Thanks for your help!


texts: How can i use ajax load database without F5 page?

texts:
I have a template phtml file: latestnews.phtml

<?php $items = $this->getNewsPost();?>

                             <?php echo $this->__('Best News'); ?>

   <?php
     $i = 0;
         foreach ($items as $item):
        ?>

           <a href="<?php echo $item->getUrl(); ?>">>><?php echo $item->getTitle(); ?>

    <?php
        if (++$i == 5) break;
        endforeach;
    ?>

Now, i want when i add data in database latest news automatic load without F5 page. All help is welcome


texts: Date format in the customer account dashboard

texts:
The date in the customer account dashboard in my Magento store is in the format of mm/dd/yyyy now, that is the date in the recent orders list is in above format. I want it to be displayed in the format dd/mm/yyyy. I have changed the format of date in Date & time custom options under catalog in system -> configuration, but it still has not changed.

Kindly let me know How can I change the format of the date?


texts:
is there any way to check how old customer in terms of registration like one year old customer like that or we have to write code for the same

$d1 = new DateTime(date('Y-m-d',Mage::getModel('customer/customer')->load(4)->getCreatedAtTimestamp()));
$d2 = new DateTime();
echo $yeardifference = $d2->diff($d1);

but i give blank value


texts:
User login after Admin approval in Magento 1.9

Admin need to approve the account before the users can browse the products and view the pricing for the products.


texts: Install Amazon pay extension from admin panel in magento 2.2.3

texts:
Readiness check fails while installing Amazon pay module in Magento CE 2.2.3

for checking cron scripts i have changed the code in

  C:\xampp\htdocs\dev\setup\src\Magento\Setup\Controller\Environment.php

Uncomment this

    $setupCheck = $this->cronScriptReadinessCheck->checkSetup();
    $updaterCheck = $this->cronScriptReadinessCheck->checkUpdater();

and add this

    $setupCheck = ['success' => 1];
    $updaterCheck = ['success' => 1];

the above code is to avoid check cron.

PHP settings check and PHP extensions check are failed
XAMPP v3.2.2 php version 7.0.27

How do i fix this and install any extension from admin page ?


texts: Magento after upgrading order update email sending duplicate emails

texts: After upgrading to magento 1.9.0.1 from 1.6 order update email is ending 7 times, i had set "Send Order Comments Email Copy Method" to "Seperate Email" and added 7 email ids in "Send Order Comment Email Copy To" field.i dont have any idea to trouble shoot this problem.Can any one suggest how to trouble shoot the problem


texts: How can I set up attributes that if i pick this fabric, I get these color options, or if I select that fabric, I get a second list of colors?


texts:
I am relatively new to magento and would like to receive some advice concerning a Magento update from 1.9.2.1 to 1.9.3.0. I can't use the intrinsic update feature for several reasons. The main one is, that I develop with a vagrant setup. Changing files in the vagrant box will not be reflected in my IDE. I need to change files directly. I use git to store all my code changes (no changes are in the core). I use a git push deployment strategy for development, staging and production environments.

Possible complications:
- I use several own and 3rd party extensions

So what is the best way to achieve this? Is it enough to copy over all data in app/code/core and then test? Or do I need to consider other things as well?


texts: Expected to start loader but did not find one in the dom : loader.js:210 in magento 2 product page

texts:
i have see issue in my browser console :  Expected to start loader but did not find one in the dom : loader.js:210 in product page.
 if (window.console && !ctx.parents('[data-role="loader"]').length) {
                    console.warn('Expected to start loader but did not find one in the dom');
                }

When product page loading Or click on swatch option in configure product.
In product page loader perfectly show and hide but I cant debug why its showing me Expected to start loader but did not find one in the dom.


texts: I have created a new custom module and it is working fine from back end, but in front data is not displaying

texts:
<?php
    $model = Mage::getModel('custom_homebanner/request')->getCollection()
?>

<?php echo $banner->custom_homebanner_text ?>

<?php echo $banner->custom_homebanner_text1 ?>

<?php echo $banner->custom_homebanner_text2 ?>


texts: Magento 2 - Understanding text/x-magento-init

texts:
I try to better understand the concept of text/x-magento-init.

I understand that it allows us to define script components that do a certain task, which we then can use as often as we like in any template.

I found this example in vendor\magento\module-theme\view\frontend\templates\js\cookie.phtml

<script type="text/x-magento-init">
    {
        "*": {
            "mage/cookies": {
                "expires": null,
                "path": "<?= $block->escapeJs($block->getPath()) ?>",
                "domain": "<?= $block->escapeJs($block->getDomain()) ?>",
                "secure": false,
                "lifetime": "<?= $block->escapeJs($block->getLifetime()) ?>"
            }
        }
    }
</script>

By reading the documentation, I figured out that this means, a script is getting called once (because of the *). But where do I find the component mage/cookies to understand what it does exactly? And what if I use body instead of *, how does this change the logic?

Bonus Question: How to define our own component?


texts:
About the "off topic" flag : This is not offtopic. As you can see in the accepted answer, it was about Magento config (db + htaccess)

For corporate / political reasons, we are trying to add a fake subfolder to our base urls. I can't configure vhosts/base urls to make it work with this additional string (404 for any page but home page)

Before :
subdomain1.company.com -> store 1
subdomain2.company.com -> store 2

After (help ?) :
subdomain1.company.com/corporate/ -> store 1
subdomain2.company.com/corporate/ -> store 2

I've set each vhost like this :

<VirtualHost *:80>
    DocumentRoot "/path/to/root/directory"
    ServerName subdomain1.company.com
    Alias /corporate "/path/to/root/directory"
    <Directory /path/to/root/directory>
        Order allow,deny
        Allow from all
        AllowOverride All
        RewriteEngine On
        Options +FollowSymlinks
    </Directory>

    SetEnv MAGE_RUN_CODE store1
    SetEnv MAGE_RUN_TYPE store
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot "/path/to/root/directory"
    ServerName subdomain2.company.com
    Alias /corporate "/path/to/root/directory"
    <Directory /path/to/root/directory>
        Order allow,deny
        Allow from all
        AllowOverride All
        RewriteEngine On
        Options +FollowSymlinks
    </Directory>

    SetEnv MAGE_RUN_CODE store2
    SetEnv MAGE_RUN_TYPE store
</VirtualHost>

And my new base urls are subdomain1.company.com/corporate/ and subdomain2.company.com/corporate/
Obviously, I did something wrong. Any help would be highly appreciated....


texts: Magento2 : Composer Problem Could not find a matching version of package . Check the package spelling, your version

texts:
I have big problem and don't know how i made that mistake...

i wrote

composer require searchanise/search-autocomplete     and

Could not find a matching version of package searchanise/search-autocomplete. Check the package spelling, your version constraint and that the package is available in a stability which matches your minimum-stability (stable).

This is composer.json

{
    "name": "searchanise/search-autocomplete",
    "description": "Search Autocomplete + Search Suggest",
    "type": "magento2-module",
    "version": "1.0.4",
    "homepage": "http://www.searchanise.com",
    "authors": [
        {
            "name": "Simtech",
            "email": "sales@searchanise.com"
        }
    ],
    "autoload": {
        "files": [
            "registration.php"
        ],
        "psr-4": {
            "Searchanise\\SearchAutocomplete\\": ""
        }
    },
    "repositories": [
    {
      "type": "composer",
      "url": "https://repo.magento.com/"
    }
  ]

}

Anyone can help me? :)

Thanks


texts: How to display the custom attribute on product page in Magento 1.9.2

texts:
I am working rwd theme customization> I am trying to add a new custom tab under the product info parent tab-
My layout.xml block code is :

<block type="catalog/product_view_description" name="product.faq" as="faq" template="catalog/product/view/faq.phtml">

    <action method="addToParentGroup"><group>detailed_info</group></action>

    <action method="setTitle" translate="value"><value>FAQ</value></action>

</block>

I created a custom attribute and  visible on frontend - YES - uesd in product listing - Yes
my attribute code is 'faq'
my faq.phtml is as follow -

<?php

$_product = $this->getProduct();
if($_product->getFAQ()){ ?>

<?php echo $_product->getResource()->getAttribute('faq')->getFrontend()->getValue($_product);?>

<?php }
?>

after doing a long exercise i am unable to display the attribute value on frontend. As I checked the data tables my attribute value are properly inserting in the attribute table.
If anyone knows please help me.


texts: How to add categories in a static Block?

texts:
How can I add categories to a static block so that I can call that block in my footer section.

the above image is from footer and I want to insert all my categories there.


texts: Magento 1.9.2. - Get Admin value of attribute option in frontend

texts:
I'm trying to recall in my configurable product the value of the 'color' attribute of the products associated with the foreach method:

foreach($simple_collection as $simple_product){
echo "$simple_product->getAttributeText('color')";
}

But with this method it shows the value of the attribute in its current language and not of the admin. I attach a picture for this.

How can i do?
Thanks


texts: Enable Guest checkout in magento admin order create

texts:
I was wondering if it is possible and feasible to do.

I am in a need of Guest Checkout for admin order checkout.

Anyone have any idea, please suggest.


texts: How to override default shipment pdf styling file in magento2.2.7

texts: I want to change the shipment pdf font family how to do that in magento2


texts: Help: Several errors per day for SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded;

texts:
We're getting several errors per day.

This is received after it takes about 1 mins 10 seconds to 2 mins 25 seconds after clicking Confirm Order

I followed few suggestions but those RSS & observers changes did not help.

How can we resolve this error?


texts: Magento 2 - Cart Price Rule to Discount Subtotal While Keeping Tax

texts:
I am trying to create a Cart Price Rule which allows for a 100% discount of the order's subtotal, while still including the subtotal's taxes to the customer.
Ex:
Customer is ordering $100 of goods (subtotal). $12 in tax is included on this order. We would like to only charge them the tax.
Is there a means to do this?


texts: Redirect to another page after newsletter signup

texts:
I am attempting to get my clients website to redirect to a new page that I have created, which will happen automatically after they signup to the newsletter.  I have followed the instructions here but have the same issue mentioned at the bottom of the page - with the URL Redirect Method in place, the redirected page loads but it no longer records the subscriber in the admin: http://www.magentocommerce.com/boards/v/viewthread/273119/#t432370

Has anyone else experienced this issue or have advice on the solution?  I am pretty new to Magento, so my knowledge is limited.

Thanks
Michael


texts: Magento 1.9 : How to cache custom module or extension

texts:
I never worked to cache Magento modules before. Now going to do for the first time so i have three questions regarding cache.

What are the complete steps to cache a module?
Any caching types are there?
What are the pros & cons for this?

Can anyone help on this please.


texts: Magento does not save billing city programmatically

texts:
I have an external application and I have to update the billing and shipping details of an existing order. The problem is that the billing city doesn't get saved with the rest of the data. I'm using Magento 1.8.
The code was inspired by this thread: Change shipping and billing address from order programmatically

$order = Mage::getModel('sales/order')->load($orderId);
$shippingAddress = Mage::getModel('sales/order_address')->load($order->getShippingAddress()->getId());
$billingAddress = Mage::getModel('sales/order_address')->load($order->getBillingAddress()->getId());

$shippingAddress = Mage::getModel('sales/order_address')
->setFirstname("value")
->setLastname("value")
->setCompany("value")
->setStreet("value"))
->setCity("value")
->setRegion("value")
->setPostcode("value")
->setTelephone("value")->save();

$billingAddress = Mage::getModel('sales/order_address')
->setFirstname("value")
->setLastname("value")
->setCompany("value")
->setStreet("value"))
->setCity("value")
->setRegion("value")
->setPostcode("value")
->setTelephone("value")->save();