texts: Using Magento 2 Rest API to filter on product visibility

texts:
I want to retrieve only products that are listed as visible in both catalog and search, yet can't find any confirmed way to do this.   The obvious solution I was hoping would work (shown below) returns no results...

  /rest/V1/products?searchCriteria[filter_groups][0][filters][0][field]=visibility&
  searchCriteria[filter_groups][0][filters][0][value]=4


texts: Prevent review form and review summary rating cache with Varnish and Turpentine

texts:
How can I prevent this block from caching?
Product review form should just be visible by logged in users, is candidate:
INFO (6): TURPENTINE: Checking ESI block candidate: product.review.form
I have added this to my local.xml:

 <reference type="review/product_view_list" name="product.review.form">
    <action method="setEsiOptions">
            <params>
                    <access>private</access>
                    <registry_keys>
                    <current_category/>
                    <current_product/>
                    </registry_keys>
            </params>
            </action>
    </reference>

But it still get cached.

The review summary has not block candidate how should I do it?
Thanks!


texts: Magento email log is showing me the email was send- but it wasn't

texts:
I set up my cronjob in cPanel with following command:

wget -O /dev/null -q http://www.xxxxxx.com/cron.php > /dev/null

The cronjob is running all 5 minutes. I checked the schedule in the backend and I get the message "scheduler is working". I checked the email Log and it's show that emails were sent! But however, in the end I'm getting no emails. What can be the reason for this?


texts: M2 - Custom Font overwriting by bootstrap css in custom theme

texts:
I have laca adobe font,
and my _typography.less
& when (@media-common = true) {
    .lib-font-face(
    @family-name: @font-family__base,
    @font-path: '@{baseDir}fonts/Laca-Regular',
    @font-weight: 400,
    @font-style: normal,
    @font-display: swap
    );
    }
    @font-family__base: 'laca, sans-serif';

if i inspect bootstrap font applied,

How to solve this issue magento2.3.?
Note : if i remove bootstrap.min.css font in inspect element (see screen shot), my custom font applied, i need bootstrap for responsiveness.


texts:
Magento 2 customer address not save. When we try to save customer address it save but in customer_address_entity table all field save blank value.
Here is a screenshot:


texts:
Does anybody try to use built-in nginx.conf.sample file
in case of installing magento to sub uri, like as:

'http://example.com/shop'

What changes is needed for correctly using Magento2 code in subfolder?


texts: How can I hide extra sliding images from product detail page?

texts:
I have attached the screenshot below.

https://i.stack.imgur.com/Jf3tV.png

As you can see there is a black and white color image, but I want to when I select black the white images in small slider should not display.

Please help in this, thanks in advance.


texts: Property does not have corresponding setter in class Magento\Quote\Api\Data\AddressInterface while change checkout step

texts:
1 - I add a eav attribute to customer_address

$attributesInfo = [
    'reference' => [
         'label' => 'Reference',
         'type' => 'varchar',
         'input' => 'text',
         'position' => 100,
         'visible' => true,
         'required' => false,
    ],
];

foreach ($attributesInfo as $attributeCode => $attributeParams) {
    $customerSetup->addAttribute('customer_address', $attributeCode, $attributeParams);
}

2 - I added the extension attribute in my module

<extension_attributes for="Magento\Quote\Api\Data\AddressInterface">
    <attribute code="reference" type="string"/>
</extension_attributes>

In my requirejs-config.js I override some javascript file to add reference field

var config = {
"map": {
    "*": {
        "Magento_Checkout/js/model/shipping-save-processor/default" : "Agr_Checkout/js/shipping-save-processor-default-override",
        "Magento_Customer/js/model/customer/address" : "Agr_Checkout/js/model/customer/address",
        "Magento_Checkout/js/model/address-converter" : "Agr_Checkout/js/model/address-converter",
        "Magento_Checkout/js/model/new-customer-address" : "Agr_Checkout/js/model/new-customer-address"
    }
}

3 - I confirm that the reference field is sending in address

4 - When i send my shipping information (Click on Next) I'm getting this error: "Property "Reference" does not have corresponding setter in class "Magento\Quote\Api\Data\AddressInterface"."

I already do:
 - Clean and flush magento cache
 - Run setup:upgrade
 - Run setup:di:compile

What I'm doing wrong?


texts: Does magento 2 support invoicing based on amount?

texts:
I'd like the ability to create (and capture) an invoice based on a dollar amount rather than a quantity of items.

We are currently using the endpoint /V1/order/{orderId}/invoice to create invoices but there is no available parameter for the amount to be invoiced.  Is creating an invoice and specifying the amount possible via the rest API?


texts: cart price rule not applied for free shipping

texts:
I need to apply free shipping for specific products with specific attribute.

for example products with attribute condition is equal to true.

I add the following conditions

if one of those condition is true
   if an item is found in cart with all of those conditions are true
      `condition` is `true`
      subtotals in cart is equal to or greater than 3000
   if substotal is 3000 for a subselection of items in cart matching all of these conditions:
      `condition` is `true`

I've enabled free shipping with Minimum order quantity equal to 3000. and rule is enabled until 31/12/2020

the result of that is free shipping is applied whenever subtotals in cart are equal to 3000


texts: Magento2: issue with elasticsuite | no alive nodes found in your cluster

texts:
I use elasticsuite:
https://github.com/Smile-SA/elasticsuite
Everytime when I create new category or assign products to categories items in all categories in frontend will disappear after a while.
When I try run reindex:
elasticsuite_categories_fulltext | ElasticSuite Category Indexing

I get:
no alive nodes found in your cluster magento 2

I need:
systemctl restart elasticsearch.service

and
bin/magento indexer:reindex  elasticsuite_categories_fulltext

and then I see products in frontend. Its crazy and take a time.
I think I have some wrong setting.

In backend configuration module I see indices mapping:

Should I add any more indexes here for mapping?
Second thing: I see in base configuration mapping incides:

catalog_category
catalog_product

But my index have name:

catalog_category_product
catalog_product_category

should i change these settings? Should I map any additional indexes here?
Here is list all index:
catalogrule_product              | Catalog Product Rule            | Ready            | Schedule  | idle (0 in backlog)      | 2021-01-11 12:51:11 |
| catalogrule_rule                 | Catalog Rule Product            | Ready            | Schedule  | idle (0 in backlog)      | 2021-01-11 12:51:11 |
| catalogsearch_fulltext           | Catalog Search                  | Reindex required | Schedule  | suspended (0 in backlog) | 2021-01-11 12:39:35 |
| catalog_category_product         | Category Products               | Ready            | Schedule  | idle (0 in backlog)      | 2021-01-11 12:51:10 |
| customer_grid                    | Customer Grid                   | Ready            | Schedule  | idle (0 in backlog)      | 2021-01-11 12:51:10 |
| design_config_grid               | Design Config Grid              | Ready            | Schedule  | idle (0 in backlog)      | 2021-01-11 12:51:10 |
| elasticsuite_categories_fulltext | ElasticSuite Category Indexing  | Ready            | Schedule  | idle (0 in backlog)      | 2021-01-11 12:51:11 |
| elasticsuite_thesaurus           | ElasticSuite Thesaurus Indexing | Ready            | Schedule  | idle (0 in backlog)      | 2021-01-11 12:51:11 |
| inventory                        | Inventory                       | Ready            | Schedule  | idle (0 in backlog)      | 2021-01-11 12:51:11 |
| catalog_product_category         | Product Categories              | Ready            | Schedule  | idle (0 in backlog)      | 2021-01-11 12:51:10 |
| catalog_product_attribute        | Product EAV                     | Ready            | Schedule  | idle (0 in backlog)      | 2021-01-11 12:51:11 |
| catalog_product_price            | Product Price                   | Processing       | Schedule  | suspended (0 in backlog) | 2021-01-11 12:50:08 |
| cataloginventory_stock


texts:
How I can create a cart price rule which will provide 10% discount, but max amount of discount should be 100.
For example below are some conditions rule should satisfy:

If my cart item total is 500 I should get 50 Off.
If my cart item total is 1000 I should get 100 Off.
If my cart item total is 2000 still I should get 100 Off.

Please help. Thanks in advance.


texts: How to make the /checkout/cart page load with HTTPS?

texts:
My checkout and user pages are loading with HTTPS correctly. For some reason the cart page isn't (/checkout/cart).

Magento is configured to use secure URLs both in the frontend and the backend.

If I manually write the cart's URL with HTTPS it loads correctly, with the green padlock.  I'd like the cart page to always load https by default.

Is there any way to do this?

Running Magento 1.9.2

Note: I don't want all pages in the website to load securely


texts: Magento 2: Not able to delete second layout in widget

texts:
Magento 2.4

Admin > Content > widget

After creating a new widget I have added two layouts.
When I had tried to delete the second layout then the delete button is not worked.

https://drive.google.com/file/d/1EEhxFnAlPUu_-4srQGkQOP_iVtlLxIm6/view

Thank you.


texts: how to bulk delete products from magento 1.9

texts:
I have multiple products that I need to delete from magento.
Found this thread Delete multiple products in Magento and tried both scripts, however when I load mysite.com/script.php I get http error 500.

Both php and CSV files are in root directory.
in the script I have changed filenames to match csv file and also corrected the path to mage app accordingly.

Any suggestions?


texts: Printing Extra Attribute Values Onto Product Page

texts:
I'm just wondering how I can add extra information about a product onto the front end?

I want to add attribute information as well as the description to my product page.

Example here:

http://nickmaddren.com/used-cars.html/focus.html

Will the code that prints this to the front end be in the template file I am using or will it be in a Magento core file?

Thanks, Nick.


texts: Require custom checkout field from extension

texts:
I am using a zipcode(postcode) check extension that adds a custom zipcode and house number field. Now I want those to be required so they have to be filled in before going to the  next step.

Currently when going to the next step it does say 'This is a required field'. But it still goes to the next step. Any idea what i'm missing?

postcodenl.html

<form class="form form-postcodenl"
      data-bind="attr: {'id': element.addressType + '-postcodenl'}">
    <fieldset class="fieldset"
              data-bind="blockLoader: isLoading, visible: isVisible(), attr: {'id': element.addressType + '-postcodenl-fieldset'}">

Adresvalidatie

                <input class="input-text"
                       type="text"
                       data-bind="
                            textInput: postcodeNL,
                            attr: {'id': element.addressType + '-postcodenl-postcode'}"
                       name="postcodenl_postcode"
                       data-validate="{required:true}"/>

                <input class="input-text"
                       type="text"
                       data-bind="
                            textInput: houseNumber,
                            attr: {'id': element.addressType + '-postcodenl-house'}"
                       name="postcodenl_house_number"
                       data-validate="{required:true}"/>

 0">

                <select class="admin__control-select"
                        name="postcodenl_house_addition"
                        data-validate="{required:true}"
                        data-bind="
                        attr: {'id': element.addressType + '-postcodenl-addition'},
                        options: houseAdditionalOptions,
                        value: houseAddition,
                        optionsValue: 'value',
                        optionsText: 'label'"
                />

        <input class="input-text" type="hidden" name="street[0]"/>
        <input class="input-text" type="hidden" name="street[1]"/>
        <input class="input-text" type="hidden" name="postcode"/>

        <address class="autocomplete-result" data-bind="attr: {'id': element.addressType + '-nl-result'}"></address>

 0)" generated="true">

    </fieldset>
</form>

It's about the postcode and huisnummer field.


texts:
I'm creating a Magento template from scratch using the Base package as, well... the base.

I've customized the dashboard.phtml file to display a collapsible accordion where each panel displays a user's given profile data.

One of these panels is supposed to display the client's order history instead of displaying it on a separate page. So I figure I need to customize the orders.phtml file and call it into the dashboard.phtml file.

The problems i'm having are the following :

I can't figure out which layout file handles this kind of change.
I'm unsure if there is anything that needs to be done to avoid the order history page from being accessed directly.

Any help would be greatly appreciated.


texts: Over 10 second Time to First Byte on homepage?

texts:
Ok so I'm running CE 1.9.1.0 with maybe 3-4 extensions and around 25k products & 25 categories.

As the title suggests my TTFB on the home page is EXTREMELY slow, around 10-12 seconds on average. It's so bad that I installed a Full Page Cache plugin to hide how slow it really is, but I'm still very curious as to why this is the case ..

I'm using a dedicated server with Nexcess (who I presume is very good with Magento stores) and every asset is optimized (gzip, minified assets, flat category/products enabled, etc.) yet the TTFB time is so long, without the caching plugin.

Why can this happen? I feel like something is very wrong I just can't debug it properly. Any ideas?


texts: How to dynamically enable/disable  in di.xml?

texts:
I currently have the following <preference/> in one of my di.xml file:

<preference for="Magento\Contact\Controller\Index\Post" type="RadTest\TestModule\Controller\Contact\Post" />

I have an enable/disable configuration option for my module in the admin panel. I only want the <preference> to be enabled when my custom configuration option is set to enabled.

How can I dynamically enable and disable the <preference/> overriding according to the configuration of my module is set?


texts:
Am working on Magento 2.3, I have issue with login popup is not showing. What i have done is "Disable Guest Checkout", I have noticed that element below is not rendered in the review basket page.

<div class="modals-wrapper">

I tried this solution to fix it: https://www.siphor.com/add-a-login-popup-in-magento-2/

Thanks for help


texts: Magento 2 Preserving query strings on 301 redirect

texts:
Has anyone come across a method of preserving query strings on redirecting product urls?

I have my google shopping products set up with a ?gshopping=1 at the end of the url. A few products have had their url changed so redirect, in the process they lose the query string.

My SEO company are asking if we can preserve the query string for Analytics needs. Anyone have any ideas?


texts: Use function in magento without creating an entire module / helper

texts:
Is it possible to use a small function without creating an entire module to use a helper? I don't have a lot of experience with that, and I would prefer if I could just use the function without having to do all that.

For example this answer:

Do I have to create a module to use that function in a phtml file?

public function getCustomMenuCategory($categoryId) {

    try {
            $categoryChild = Mage::getModel('catalog/category')->load($categoryId)->getChildrenCategories();
            if (count($categoryChild) > 0) {
                return $categoryChild;
            } else {
                $parentcategories = Mage::getModel('catalog/category')->load($categoryId)->getParentCategory()->getChildrenCategories();
                return $parentcategories;
            }
        }
    } catch (Exception $ex) {
        Mage::log($ex, null, 'subcategory.log');
    }
}

^ that is what I want to use in a phtml file.


texts: How to translate a standart module in Magento 2

texts:
Tried to translate the "newsletter"-module by creating the "uk_UA.csv" in the directory "app/code/Magento/Newsletter/i18n/uk_UA.csv", but this not working.

Do the same in the core of Magento, and it's working. What am I doing wrong?


texts: Filter layered navigations options/items through ajax

texts:
I want to get the available options/items of a layered navigation, but I cannot find out how to achieve this.

Basically, I want to know what filters with items are available, when I set some filters, without having a product collection. For example:
I send an request saying size L categories Tshirts
and get returned the colors red and blue are availble, but not the color black.

I just cannot find, where the options of my attributes are being filtered.

I hope I could make myself clear.

Thanks


texts:
I am trying to set up a Magento Shop for a German restaurant that also has some events.
We would like to sell Tickets that contain entry & food. Problem is, we have two different VAT situations here. for entry we have 19% and for food it's 7%.

So if we sell an entry&food combo for lets say 100€, we need to apply 19% on 50€ and 7% on the other 50€.

I tried that by creating 2 virtual products (entry & food) and combining them via a bundle product. That works well but Magento does not allow other product types then simple and virtual to be combined in a bundle.

I would like to use a gift-card plugin that creates it's own product type. Something like this one: http://www.magetrend.com/magento-2-gift-card

Is there

a) A different/better approach to fix this VAT problem or
b) A way to    bundle other product types that simple & virtual


texts:
I want to remove parent category in listing page

i tried this Programmatically But it won't work:

Open the class Mage_Catalog_Model_Url and comment the below line

//if (null === $parentPath) {
//    $parentPath = $this->getResource()->getCategoryParentPath($category);
//}
//elseif ($parentPath == '/') {
    $parentPath = '';
//}

this is my url http://domain.com/baby-care/baby-body-care-products-online/baby-cream-perfumes-oils-lotions-for-skin.html

but i want http://totaltoys.com/baby-cream-perfumes-oils-lotions-for-skin.html

How I achieve this?


texts:
On product listing page I have $_productCollection = $block->getLoadedProductCollection(); if I call getData on $_productCollection I get different array than I get in foreach loop. Does anyone have any idea about this.

Before foreach loop data looks like

Array
(
    [0] => Array
        (
            [row_id] => 1026
            [entity_id] => 1026
            [created_in] => 1
            [updated_in] => 2147483647
            [attribute_set_id] => 4
            [type_id] => simple
            [sku] => 47-62-532-11
            [has_options] => 0
            [required_options] => 0
            [created_at] => 2015-08-08 21:43:58
            [updated_at] => 2020-05-11 17:37:25
            [pim_updated_at] => 2019-11-02 22:29:43
            [status] => 1
            [price] => 3.5700
            [tax_class_id] => 5
            [final_price] => 3.5700
            [minimal_price] => 3.5700
            [min_price] => 3.5700
            [max_price] => 3.5700
            [tier_price] =>
            [most_view] => 9
            [is_salable] => 1
        )

    [1] => Array
        (
            [row_id] => 1028
            [entity_id] => 1028
            [created_in] => 1
            [updated_in] => 2147483647
            [attribute_set_id] => 4
            [type_id] => simple
            [sku] => 47-62-534-10
            [has_options] => 0
            [required_options] => 0
            [created_at] => 2015-08-08 21:44:08
            [updated_at] => 2020-05-11 05:18:23
            [pim_updated_at] => 2019-11-02 22:29:43
            [status] => 1
            [price] => 3.5700
            [tax_class_id] => 5
            [final_price] => 3.5700
            [minimal_price] => 3.5700
            [min_price] => 3.5700
            [max_price] => 3.5700
            [tier_price] =>
            [most_view] => 1
            [is_salable] => 1
        )

    [2] => Array
        (
            [row_id] => 1027
            [entity_id] => 1027
            [created_in] => 1
            [updated_in] => 2147483647
            [attribute_set_id] => 4
            [type_id] => simple
            [sku] => 47-62-532-14
            [has_options] => 0
            [required_options] => 0
            [created_at] => 2015-08-08 09:44:03
            [updated_at] => 2020-05-11 06:42:05
            [pim_updated_at] => 2019-11-02 22:29:43
            [status] => 1
            [price] => 3.4400
            [tax_class_id] => 5
            [final_price] => 3.4400
            [minimal_price] => 3.4400
            [min_price] => 3.4400
            [max_price] => 3.4400
            [tier_price] =>
            [most_view] => 1
            [is_salable] => 1
        )

    [3] => Array
        (
            [row_id] => 1025
            [entity_id] => 1025
            [created_in] => 1
            [updated_in] => 2147483647
            [attribute_set_id] => 4
            [type_id] => simple
            [sku] => 47-62-532-10
            [has_options] => 0
            [required_options] => 0
            [created_at] => 2015-08-08 13:43:53
            [updated_at] => 2020-05-11 06:11:17
            [pim_updated_at] => 2019-11-02 22:29:43
            [status] => 1
            [price] => 3.5700
            [tax_class_id] => 5
            [final_price] => 3.5700
            [minimal_price] => 3.5700
            [min_price] => 3.5700
            [max_price] => 3.5700
            [tier_price] =>
            [most_view] => 1
            [is_salable] => 1
        )

)

So, inside for each first product should be '47-62-532-11' but I am getting '47-62-534-10' SKU as the first element.


texts: Manually remove a product from the database

texts:
I have a product in the database that was created using an extension installed on a previous magento (1.6.2) installation (to the one I am running currently - 1.9.2). The extension is no longer in use, and has not been added to the new system. All relevant data (products, sales, accounts, etc etc etc) was ported over from magento 1.6.2 to my shiny new 1.9.2 installation. Unfortunately, I forgot about the product created with this extension (a booking product). And as that extension is no longer part of my system, any time it crops up, it causes a site error.
This error happens in the admin and on the front end.
The error is to do with a missing product type in the database

(Invalid backend model specified: booking/entity_attribute_backend_rangetype).

Which I take to mean there is no reference in the database for a "booking" product type, because the extension isn't installed to add that info to the system.
Looking at the catalog_... tables, I can find the EAV entity ID of the product in question, but wondered if there was an easier way to remove all references to that entity ID from all database tables other than trawling through them all one by one and manually removing the rows?
I created a script to loop through the products in order to try and delete them that way, the following is the meat of that script:
Once I have the collection created, I loop through it (there are 2 products of this type in total), but the system fails to delete the products. Here is the code for the loop through...
foreach ($collection as $product) {
    $thisProductID = $product->getId();

    try {
        $product = Mage::getModel("catalog/product")->load($thisProductID);
        if ($product) {
            $product->delete();
            echo '
'.$thisProductID.' - Deleted successfully'.'
';
        }
    }
    catch (Exception $e) {
        echo '
'.$thisProductID.' - Delete failed: ', $e->getMessage(), '
';
    }

}

And here is my output when I run this:

25712 - Delete failed: Invalid backend model specified: booking/entity_attribute_backend_rangetype
25713 - Delete failed: Invalid backend model specified: booking/entity_attribute_backend_rangetype

I'm really not sure how to get around this, as I do not want to install a module for the sake of these two products being in the database (and crashing the website if they get browsed frontend or admin).
Any suggestions more than welcome :-)


texts: Magento 2: Why do we need to ignore /app/etc/di.xml?

texts: I look at magento2 default .gitignore and found out that it is ignored.


texts: The next arrow hidden on the product images in fotorama zoom pages at magento 2.2.6

texts: I need to show the next arrow in all the pages of the product when the product page shown in full screen. Is there any option to enable next arrow in fotoram.js file? I have used magento 2.2.6 version.


texts: PHP Fatal error: Uncaught Error: Class 'DOMDocument' not found in /vendor/magento/framework/Config/Dom.php:390

texts:
DOM package already install.

also follows:
sudo apt-get update
then install php7.2-dom


texts:
How to get amount value from the below code.

Magento\Framework\Pricing\Amount\Base Object
(
    [amount:protected] => 2520
    [baseAmount:protected] =>
    [totalAdjustmentAmount:protected] =>
    [adjustmentAmounts:protected] => Array
        (
        )

    [adjustments:protected] => Array
        (
        )

)

I have try below but no luck

//print_r($amount->amount); exit;


texts: Adding Line Only X Left in Cart Table Summary Page

texts: I am trying to add a simple line with "Only X Left" on the cart table summary on Magento 1.9.1 only if qty of the products is less then the threshold specified in setting just like it happen in product page. Any tip?


texts:
i am trying to  retrieving wishlist data and this error appears
[2020-06-22 08:41:10] report.CRITICAL: Report ID: webapi-5ef06ea694149; Message: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`magento`.`wishlist`, CONSTRAINT `WISHLIST_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE CASCADE), query was: INSERT INTO `wishlist` (`customer_id`, `sharing_code`, `updated_at`) VALUES (?, ?, '2020-06-22 08:41:10') {"exception":"[object] (Exception(code: 23000): Report ID: webapi-5ef06ea694149; Message: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`magento`.`wishlist`, CONSTRAINT `WISHLIST_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE CASCADE), query was: INSERT INTO `wishlist` (`customer_id`, `sharing_code`, `updated_at`) VALUES (?, ?, '2020-06-22 08:41:10') at /var/www/magento/vendor/magento/framework/Webapi/ErrorProcessor.php:208, Zend_Db_Statement_Exception(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`magento`.`wishlist`, CONSTRAINT `WISHLIST_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE CASCADE), query was: INSERT INTO `wishlist` (`customer_id`, `sharing_code`, `updated_at`) VALUES (?, ?, '2020-06-22 08:41:10') at /var/www/magento/vendor/magento/framework/DB/Statement/Pdo/Mysql.php:110, PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`magento`.`wishlist`, CONSTRAINT `WISHLIST_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE CASCADE) at /var/www/magento/vendor/magento/framework/DB/Statement/Pdo/Mysql.php:91)"} []

Please help me solve it.
Thanks


texts: How to get country name using currency code in Magento 2

texts:
I want to get country name using currency code. For ex. if currency code is INR then, It should be return country name : India.

How to do that?

Any help would be appreciated.

Thanks.


texts:
I'm using Authorize.net payment method which is by default provided by Magento.

Recently Authorize.net going to upgrade transaction hash. So, do I need to change anything in my Magento ?

https://developer.authorize.net/support/hash_upgrade/


texts: addjs to custom admin module not working

texts:
I am trying to add a js file in my admin custom module. Here is my config.xml -

<config>
       ....
<adminhtml>
        <layout>
            <updates>
                <inventory_uploads>
                    <file>uploads.xml</file>
                </inventory_uploads>
            </updates>
        </layout>
</adminhtml>
       ....
</config>

app/design/adminhtml/default/default/layout/uploads.xml -

<layout>
    <adminhtml_uploads_index>
            <reference name="head">
                <action method="addJs"><script>uploads/jscolor/jscolor.js</script></action>
            </reference>
    </adminhtml_uploads_index>
</layout>

doesn't understand, what went wrong in this code.

Any help is appreciated.


texts: Integrity constraint violation 1062 duplicate entry - Magento 2.3.0

texts:
I'm facing this error in during when i run this setup:upgrade command. Can you help me regarding this issue, how to i'll fix this error ?

Thanks


texts:
I am trying to move the search bar next to the logo on our website but not having any luck.

My theme is based on magento luma.

I have the below code

<move element="block.search" destination="header.wrapper" after="logo" />

inside of

mytheme/theme/layout/default.xml

but the changes aren't being reflected.

I have also tried the below code.

<move element="top.search" destination="header.wrapper" after="logo" />


texts: Execution of non php files vulnerability

texts:
The magento team detail a remote code execution bug here:
http://www.magentocommerce.com/knowledge-base/entry/security-add-handler

The test is to create a file eg test.php.csv and see if it can be executed by browsing to it. Here is the content quoted on the site

<?php
 phpinfo()

When I browse to this file, it does nothing. However, to me it does not appear to be correct PHP, and if I change the code to the following:

<?php
phpinfo();
?>

then the file CAN be executed. So firstly, is article wrong, or was I wrong to "correct" the test?

Secondly, the following directive is simply not present in my config

AddHandler application/x-httpd-php .php

And adding the other bits of code quoted in that article seems to make no difference at all.

I feel I'm missing the jist of something here. Additionally, magento is full of files that contain php but don't have a php extension (eg .phtml) so I feel the suggested change would break that - although I could specify .phtml files to be executed by the same handler - not too sure how that sits with URL rewrites though.

I'm using Centos 6. We use PHP from the remi repsitory as per the magento setup guide


texts: Customization of different shipping cost on each product in cart?

texts:
I am looking for extension which can deliver same functionality as of

https://www.inwerk-bueromoebel.de

add some products and see each product has different shipping cost . i have researched google a lot but did not find something similar any help on this will be appreciated


texts: How to add different prefix on invoice number based on payment method?

texts:
I am trying to find a solution to add different prefix on invoice number based on payment method.
Example:

Invoice for order with credit card payment => CC as prefix
Invoice for order with checkout money => CM as prefix

How can I manage this?


texts: Swatch Option Not showing in ASC order in Magento2

texts:
If size swatch not found with color swatch then it showing in last position, But I want to show in ascending order.
Any way for this?


texts: How I can translate the Magento2 admin theme in Arabic

texts:
I want translate a Magento 2 theme for a Magento 2 admin view.

How do I translate Magento 2 admin in Arabic language in RTL?


texts:
I am using Magento ver. 1.7.0.2 ,In that the product have description attribute and the type is text area. so i can't change 'Used for Sorting in Product Listing' to 'yes'. I want to sort products by description attribute. how can i list the products by using description attribute

I want to add the description attribute in "sort by ->drop down list" and will list the products by description attribute when selecting description from the drop down


texts:
I installed this template http://magento2.flytheme.net/themes/sm_shop4u/default/ and i am facing this error when triyng to add in cart

please help


texts: Disabling product alerts - effect on existing alerts

texts: We have had product stock alerts in place and some customers have set up alerts. If we disable alerts what happens to existing alerts?


texts: How to fix the related product issue in admin after migrated to magento 1 to magento 2.3

texts:
I am using Magento 2.3.0

I have migrated products from Magento 1 to Magento 2. I can see related products in product detail page in the front end and it is proper and also I can find related products entry in the database as well but when I checked related products in admin I found that there are some related products missing in some of the products

For Ex. When I checked one product in the front end. I saw three related products there as well as in the database but I can find only 2 products in admin there is one product missing in admin.

I checked two tables in database for related products: "catalog_product_link" and "catalog_product_link_attribute_int".

I have found some values in the "value" column in "catalog_product_link_attribute_int" table which represents the position of the related products in admin and in front end but I found value 0 in "value" column of this table for some of the products and when I checked these products I found that only those products which do have only 0 in "value" column in "catalog_product_link_attribute_int" table are missing related products in admin.

So, How can I solve this issue?

Check my below question as well:

How to override product model files in Magento 2?

I have created a new module to solve the related product issue which I mentioned in this question but I got an error.


texts: get list or collection of all translations in magento

texts:
I want to know what are the places to look for the translations in Magento.

What would be the best way to get a list or collection of all translations in Magento?

Where would one start in the creation of a translation module?


texts:
For some reason, occasional orders are missing the "Ship-to Name" and other information related to the Shipping Address. Can you think of any reason why this would be happening, and how to prevent this?

To my knowledge, there'd be no way for the user to checkout on the website without the Shipping Address filled out, so I can't pinpoint what might be different about these specific orders.

Any help would be appreciated, thank you!

Edit: Shipping and Handling information is also absent from these orders.

Also, these orders are marked as completed automatically (vs. "processing")


texts: Get configurable product attributes in custom module?

texts:
I'm writing a custom module and Block, struggling to get at the configurable product all attribute data that used.

How would I set up my block class to handle this from scratch?

Attempting to use:

$this->_productview->getProduct()->getTypeInstance()->getConfigurableAttributes($this->_productview->getProduct());

However the page doesn't appear to ever load (will continue to try to load for ten minutes)


texts: Secure Configurable Product Page, But Returns, non-secure ajax response and is blocked

texts:
Okay guys, I am a bit baffled.
I am loading a configurable product’s page using a secure connection (https://) and I select all the variables, which sends the ajax call, but its returning with an http:// connection and is blocking it due to mixed content.

The prototype.js file, that is calling the ajax function is loaded as securely… so why is it returning a non-secure url for the ajax call?
Any help would be awesome.
For reference:

  this.transport.open(this.method.toUpperCase(), this.url,

line 1521: in the prototype.js file. Magento 1.9.1


texts: Creating Integration Tests for Magento 2 Modules

texts:
So far for my Magento 2 testing needs, I've been using PHP Unit as (more or less) an acceptance tester -- testing results of server and HTML requests made into a system with my module(s) installed.  I'd like to be able to create my own integration tests. Do the testing tools that ship with Magento 2 allow third party developers to create their own integration tests that leverage Magento's test framework code?  Or will we all be rolling our own bootstrap?

That is

I am a Magento developer
I'd like to create an integration test
I'd my integration test to have a fully bootstrap Magento environment to play in (i.e object manager and/or dependency injection to use)
I'd like my integration test to extend the  Magento\TestFramework\TestCase\AbstractController test so I have the same helpers as Magento tests
I'd like to be able to run my tests in isolation from the rest of the test suite (i.e. not have to wait 2 hours to run my 15 seconds of tests)
I'd like my tests stored separately from Magento's tests

The dev docs site has some starter articles on testing, but they seem oriented at running the tests that ship with Magento and not creating and running your own tests.  There's the old sample modules, but they all extend the PHPUnit_Framework_TestCase class and seem to be unit tests (i.e. testing code that doesn't rely on the Magento framework)

Is there a Magento provided way of doing this?

If not, has anyone rolled their own setup in such a way that the test of the Magento developer community could adopt it as a standard?


texts:
I have Magento website, and its working fine

But some conflagration happened in the server so when I tried to access Magento admin but it gives me the page not found, the system admin said the some admin table does not exist it seems have been deleted such as core_  tables, but the website still working fine. any help??


texts: How Does magento sales rule validate date and apply rule only if it is within range date

texts:
I was looking in to core module for sales rule but was unable to find the logic where it actually apply the filtration of current date and date added in rule that is From and To.
If i have created 3 rule and all are applicable on fronted also set different from and to date for each rule which date will be in priority.
I am curious to someone can please guide me where this logic is applied.


texts: Magento 2: Update More Information panel attributes on click over a configuration

texts:
Good evening,

I just installed Magento 2 with the Luma theme.
I created a configurable product and 4 configurations (4 simple products) and I updated some simple products' atributes.

On the frontend - in the configurable product page - I was expecting the More Information panel to reload the attributes when I clicked on the configuration swatch, but nothing changed except the product image.

Is that normal?
What can I do to reload all the attributes data?
I'm just doing some tests now so I would not touch the code if possible..

Thanks a lot,
Davide


texts: Which template is responsible to display the products list in list page in magento 2

texts: Which template is responsible to display each product in List page


texts:
I'd like to display pages in window.js popup. I created custom block that is template/page/popup.phtml (for parent template) and popup/view.phtml to display content. I'm passing specific url for JavaScript Window library and it's visible in my block as "url" request param. Then I'd like to render just specific fragment (content) of layout.

In custom block I have method:

public function getContentHtml()
{
    $layout = Mage::app()->getLayout();
    $layout->getUpdate()->addHandle('default');
    $layout->getUpdate()->load();
    $layout->generateXml()->generateBlocks();
    return $layout->getBlock('content')->toHtml();
}

which return current page layout - not requested url layout.
How to getLayout for url passed in request?

This is my approach bacause I'm not sure how to differ/change layout XML when page is loaded within template/page/popup.phtml and template/page/2columns-right.phtml.


texts: How do I hide the rating stars in the product list when there's no rating yet?

texts:
Currently my Magento store shows 'hollow' 5 star ratings for all products without ratings (which is 99.9% of products as it's a new store).

I would like to only have the star rating appear if a product has received one or more ratings.

I would like this to happen on the search results view, category product list view (same I believe) and also carousel display (such as recommended products at bottom of product details page).

The code which I believe is currently calling the stars into play on the list view is in list.phtml and is as follows:

<?php if($_product->getRatingSummary()):?>
<?php echo $this->getReviewsSummaryHtml($_product) ?>
<?php else:?>

<?php endif;?>

BUT perhaps there's a deeper level which needs editing so they don't show on a carousel (eg recommended products) also?

I can't find any advice on this specific need anywhere and would really appreciate some help. Thanks.


texts: Magento DevBox: run CLI commands from host vs. run bash session in container?

texts:
I'm noticing some strange behaviour using Magento DevBox.

Running CLI commands from within the Docker container gives strange results (after entering docker-compose exec --user=magento2 <service> /bin/bash to get to a bash session, then cd /var/www/magento2).

It seems to have generated contents for the pub/static directory, which don't sync back into the host filesystem (outside Docker).

So 'adminhtml' and 'frontend' folders are currently visible in Docker via command line, but not anywhere in OSX (my host machine). I'm looking at them side by side.

How can that happen, and where are you meant to run commands from when using DevBox?


texts: Is it possible to get Magento 1.9x running bug free with HHVM?

texts:
I'd like to get my shop running faster, and have been playing with HHVM but I've run into all sorts of bugs when using it.

Is it possible to get it to work cleanly, or is Magento 1.9x just not ready for HHVM (or visa-versa)?


texts: Magento 1.9: Google Tag Manager code add in header But active Only on Product Detail Page

texts: I want to add the script in the head.phtml but i need the product's id, SKU. So i only want it to work when is on the product Detail page.


texts: Magento 2 Forgot Password page incorrect captcha

texts:
In my magento site I have enabled Captcha for Forgot Password form of custom theme, but when I try to reset password with providing correct captcha code in the field, even then it shows "Incorrect Captcha" after refreshing & redirecting to same page.

I'm using magento-2-social-login

No warnings/errors either in the client or server.

Any suggestions please?


texts:
Thanks Marius for Reply.
I am new to Magento and I don't know how EAV works. I want to know, how to pass store_id and attribute_id to

protected function genericView($attribute, $code) {
   $storeId = Mage::app()->getStore()->getId();
   $attr = Mage::getModel('eav/entity_attribute')->getCollection()->addFieldToFilter('frontend_label', $code);
   $attribute = $attr->getData('attribute_code');
   $attribute_id=$attribute[0]['attribute_id'];
   $attributecode=$attribute[0]['attribute_code'];
   $collection=Mage::getModel('catalog/product')->getCollection()
                ->addAttributeToSelect('name')
                ->addAttributeToFilter(array(array('attribute' => $attributecode,'null' => '')));
   $collection->printLogQuery(true);
        ........
        ........
}

output for above $collection is

SELECT `e`.*, `at_bluesta00032`.`value` AS `bluesta00032` FROM `catalog_product_entity` AS `e` INNER JOIN `catalog_product_entity_varchar` AS `at_bluesta00032` ON (`at_bluesta00032`.`entity_id` = `e`.`entity_id`) AND (`at_bluesta00032`.`attribute_id` = '1023') AND (`at_bluesta00032`.`store_id` = 0) WHERE ((at_bluesta00032.value IS NULL))

In above $collection(query) store_id is always "0", for different stores.So, I want to pass respective store_id for different Stores. Can You, please provide solution. Thanks in advance.


texts: Magento 1: Showing templateControl is not defined message in console

texts:
In transactional emails, I am trying to call custom value and attributes but my changes are not reflecting on a email.

I tried to look a using email template but my email template also is not working properly.

It shows an error in console:

  Uncaught ReferenceError: templateControl is not defined at
  HTMLButtonElement.onclick ((index):560)".

I am struggling for this issue since one month, don't know why my changes are not reflected on transactional emails and why admin showing this error in console.

What can be the problem? How can I fix it?


texts: Magento 2 - It is posible to plug-in into a _construct method?

texts:
It is possible?
di.xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\SalesRule\Block\Adminhtml\Promo\Quote">
        <plugin name="Vendor_Module::plugin_new" type="Vendor\Module\Plugin\New" sortOrder="1" disabled="true"/>
    </type>
</config>

New.php
namespace Vendor\Module\Plugin;

class New{
    public function before_construct(ChildBefore $subject, $interceptedInput)
    {
        echo '<pre>';
        var_dump($subject);
        var_dump($interceptedInput);
        echo '</pre>';

        return ["(before) $interceptedInput (/before)"];
    }
}


texts: Tooltip for Payment methods in Magento 2

texts:
I am trying to show the tooltip for Custom payment method, But it's not working. For this I tried the below code.
html file path (app/code/NStripe/PaymentTerms/view/frontend/web/template/payment/paymentterms.html)

            <input type="radio"
                   name="payment[method]"
                   class="radio"
                   data-bind="attr: {'id': getCode()}, value: getCode(), checked: isChecked, click: selectPaymentMethod, visible: isRadioButtonVisible()"/>

                <button class="action primary checkout"
                        type="submit"
                        data-bind="
                        click: placeOrder,
                        attr: {title: $t('Place Order')},
                        css: {disabled: !isPlaceOrderActionAllowed()},
                        enable: (getCode() == isChecked())
                        "
                        disabled>

                </button>

        This is the custom text how looks like in the Payment Terms Payment Method.

But it's not showing.

Can you please suggest me to show like Email, Phone Number ? mark style.


texts: Magento 2 Open Source custom module or third party extension would be work in Magento 2 Enterprise Cloud Edition?

texts: I am having a custom payment module developed in Magento 2 Open Source. It will works in Magento Enterprise Cloud? The source code for both the editions will differ?


texts: Check if block has already been rendered

texts:
During an observer is there a way to determine if a block has been rendered or not?

I can grab the block like so:

Mage::app()->getLayout()->getBlock('the_block_layout_name');

But i want to check if it has already been rendered - i..e its toHtml has been called.

Is this possible?  if so how and if not are there any other ideas on how to achieve this or something similar?


texts: How to display list page collection by alphabetical order in list page in magento 2?I have check that list collection comes from layer.php in magento.How to display collection in alphabetical order in list page.


texts:
I installed a module, and then I uninstalled it.

Since then I do not have CSS. I did not find the frontend nor the CSS but after running this:

php bin/magento setup:static-content:deploy

php bin/magento indexer:reindex

Make sure apache rewrite_module is enable and then restart the server

Delete cache folder under var/cache

The backend CSS is back but the frontend is still unloaded.

For theme luma it's works but this is the error with my theme:

How can I load it?

Thank you


texts: How to detect if user is using a mobile device from video content-type?

texts:
I have created an extension module for video content-type, where I extend ui_component form and the config file video content-type. In the form I give the opportunity to the user in admin to give a second url if they need a video exclusively for mobile devices.
Also added the master template and preview template where both videos will be rendered.
Everything works and I both videos are successfully shown. But now I want to implement functionality in the video content-type where depending if (mobileDevice) is true, then only render the video exclusively for mobile. I tried adding the check in the master_component js file but it does not make the check in the storefront, only in the admin part. Do you have any suggestions?


texts: Magento 2 - \Magento\Sales\Model\Order trying to fetch items in an order is not working

texts:
I am trying to get items of an order and display it in phtml file. But not getting the result.

Below provided is the code which I have provided in block

protected $_order;

public function __construct(
    \Magento\Framework\View\Element\Template\Context $context,
    \Magento\Customer\Model\Session $session,
    \Cubet\RMA\Model\ListReturnsFactory $db,
    \Magento\Sales\Model\ResourceModel\Order\CollectionFactory $orderCollectionFactory,
    \Magento\Sales\Model\Order $order
) {
    parent::__construct($context);
    $this->_session = $session;
    $this->_logger = $context->getLogger();
    $this->_db = $db;
    $this->_orderCollectionFactory = $orderCollectionFactory;
    $this->_order = $order;
}
 public function getOrderItems()
  {
    $orderItems = $this->_order->create()->loadByIncrementId(000000003);
    $orderItems->getAllItems();
    return $orderItems;
 }

and the code provided in phtml is

$items = $block->getOrderItems();
print_r($items);

but it doesn't print any result. Please help on the same.


texts: Magento 2 Duplicate product does not work

texts:
I use Magento 2.3 and for the same of product when I use save and duplicate the server does not respond.
I think this is a server problem and my question is,
What is the best config for Magento 2 and best config on php.ini or apache.conf or nginx.conf?


texts:
Help! I can't figure out what's wrong with this one. Every time I type a correct search term in quick search, this one shows http://www.umdistributors.com/sc/catalogsearch/result/?q=product
Does anyone know how to solve this? thanks!

type "product" for the correct search term.


texts: How to create a test store to work with the API?

texts:
I want to work with the API to make a proof of concept.  The older version so Magento used to have a test store that could be made for free and run for 30 days. Is there something similar for Magento 2?  I want to work out all the major pieces prior to going back to the client and I would like to be able to do it for cheap or free.

Ideally it would have few products that I could fake orders and fake order updates.   I could try the different ways of authentication to see which works best for my system.  Basically go through the big pieces so I can get a real estimate on what needs to get done.


texts: How to set using magic setter child array of Observer object

texts:
My observer $observer has the basic format:

$observer->_data['result']->_data['booked'][productid][date]

I can access this value like:

$observer->getResult()->getBooked($productid)['2014-10-30 08:00']

But I cannot set it. Is there someway in Magento set set children arrays (multi-dimensional)? I have searched but can't find how to do this. I need something like:

$observer->getResult()->setBooked(($productid)['2014-10-30 08:00'], $value)


texts: Magento 2 : jQuery Tokenizer Ui Component Edit Form

texts:
The new style of M2 Ui forms using knockout Js has changed many things we do with M1 .
My Jquery Tokenizer does not dispaly tokens in edit form, tokens are added successful when we create new token. Below is the code files if someone could figure out.My console displays the error : ReferenceError: tag_names is not defined

Tags Js

define([
'ko',
'jquery',
'Magento_Ui/js/form/element/abstract',
'jquerytokenize'
], function (ko, $, Abstract) {
'use strict';

function updateValue(viewModel, value) {

    viewModel.value(value);
}

ko.bindingHandlers.myTags = {

    init: function (element, valueAccessor, allBindings, viewModel) {
        // document.write(JSON.stringify(element.value));

        if (valueAccessor()) {
            $('#' + element.id).tokenize({

                onAddToken: function (value, text, tokenize) {
                    updateValue(viewModel, tokenize.select.val());
                },

                onRemoveToken: function (value, tokenize) {
                    updateValue(viewModel, tokenize.select.val());
                }
            });
        }
    }
};
return Abstract.extend({
    defaults: {
        template: 'Namespace_Module::/form/element/tags.html'
     }
    });
});

Tags Html

<select multiple class="admin__control-multiselect" data-bind="
attr: {
    name: inputName,
    id: uid,
    disabled: disabled,
    'aria-describedby': noticeId,
    placeholder: placeholder
},

hasFocus: focused,
selectedOptions: value,
optionsValue: 'label',
optionsText: 'label',
myTags: true"
 />

Ui Form Field

<field name="tag_names">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="component" xsi:type="string">Namespace_Module/js/tags</item>
                <item name="componentType" xsi:type="string">field</item>
                <item name="multiple" xsi:type="boolean">true</item>

                <!-- <item name="template" xsi:type="string">ui/form/field</item> -->

                <item name="elementTmpl" xsi:type="string">Namespace_Module/form/element/tags</item>
                <item name="label" xsi:type="string">Article Tags</item>
                <item name="visible" xsi:type="boolean">true</item>
                <item name="dataType" xsi:type="string">text</item>
                <item name="formElement" xsi:type="string">input</item>
                <item name="source" xsi:type="string">article</item>
            </item>
        </argument>

Note: The format of the token's field data is same as it was during the save .


texts:
If I change multiple attributes of many products via mass action, the updated_at date of the products is not changed.

Why does it not change and how would you implement it? Observer?


texts: free shipping based on subtotal excluding tax

texts:
how can i tell to calculate free shipping off the subtotal without tax?
getBaseSubtotal does not seem to work?

   if (($request->getFreeShipping())
        || ($request->getBaseSubtotalInclTax() >= $this->getConfigData('free_shipping_subtotal') || $_SERVER['REMOTE_ADDR'] == '188.94.20.43')
    )


texts: Magento 1: Configurable products unable to find simple products in Associated

texts:
So here is the Issue, Im trying to associate simple products to the configurable, now all products have been inputted, and are fine, for now in b2b store.
When I go to the configurable product only 24 show up after resetting filters, changing the filter to any and so on, nearly 1000 products are available but 976 do not show. any ideas from the group please? Cache and indexing are refreshed and so on. I look forward to your assistance on this.


texts: Magento 2.2.6 how we can add custom prefix in product URL?

texts: Can anyone help me I want to add custom prefix in product url?


texts: Magento Categories Drag & Drop Reorder Extremely Slow / Fails

texts:
Hello Magento Wizards of t'Internet,

I hope someone out there can help.  I have a structure of categories that I am about to shuffle about.  Essentially it involves moving third-tier categories into a newly-created top-level category.

There are up to 100 products in each category.

Whenever I try to drag & drop the categories I get the 'Please wait...' notice but it takes so long - I'm talking several minutes - for something to happen.

Sometimes the 'Please wait' notice stays on the screen permanently
Sometimes the category does move
Sometimes I get the error message; "Category move error exception 'PDOException' with message 'SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction' in /home/myuser/public_html/mydomain/lib/Zend/Db/Statement/Pdo.php:228..."

There's no difference whether I'm moving a category with 300 products or 3 products.

I've just turned the Index mode to Manual Update to see if it was the saving action eating up the time but it seemingly hasn't made any difference.

This is rather irritating because I currently have categories scattered around - not good for potential customers.

Are there any tips or know-how on how to speed this process up?  I am using a Simple Servers (UK) as I am in the UK, and it's supposed to be a Magento-optimized server.

Update: I've noticed that the Catalog URL Rewrites index is almost always stuck on Processing. Could this be a cause/effect of my issues?

Update #2: Okay, delving deeper I can see that in my URL Rewrite Management I have a LOT of entries.  Considering we have about 400 products, we have over 1.7 million entries.  Wowsers.  I'm assuming this is a result of changing category structures over the years. So, maybe it's time to clean this mess up!  Does the Truncate core_url_rewrite table method actually work safely?

Update #3: Okay, I feel I should keep this updated in case anyone experiences the same issue.  This should be the last update because I've figured out why the core_url_rewrite table had so many entries.  Essentially we had duplicate URL Keys in our products.  Not many, but enough to create problems.  Add onto that the fact that a cron job refreshed the Indexes every 5 minutes and you're talking 50,000 new entries in the URL Rewrite table every day!
Short-term solution: I truncated the core_url_rewrite table.
Long-term solution: I will be locating every duplicate URL Key and making them unique. This should stop new rewrites being created every time I index the site.  My site is instantly faster front and backend. In terms of SEO issues, well time will tell. But this is a learning curve for the future.


texts: How to set dynamic price to products in catalog listing (category) page?

texts:
I am currently working on a site, where all the product price are in terms of Reward points, i.e customers can redeem their credit card reward points in this website.

So the product price should be dynamic according to the card type selected by the customer in the home page. For example, a customer visit the site

There is a popup asking him/her to select the type of card they are going to use for this transaction.
They select their credit card type viz. platinum, gold or diamond.
This is stored in my module's session.
The price of the product is displayed as 5000 points for platinum card, 6500 points for diamond card and 8000 points for gold card.

Now I use catalog_product_get_final_price event, so when the customer goes to the product view page, the price is set to the calculated price (points).

Here's my code

config.xml:

<events>
    <catalog_product_get_final_price>
            <observers>
                <price_change_for_card>
                    <type>singleton</type>
                    <class>price/observer</class>
                    <method>getCardAndModifyViewPrice</method>
                </price_change_for_card>
            </observers>
        </catalog_product_get_final_price>

Observer.php:

class Royal_Price_Model_Observer{

public function getCardAndModifyViewPrice($observer){
        /*
          calculations for my dynamic price based on selected card type
        */
    $product = $observer->getProduct();
    $product->setFinalPrice($dynamic_price);
}
...

This works perfectly fine right from product view page until checkout. But category page (listing page) still displays the price given in the admin panel.

How can I display the dynamic price right from the category page?

  note:

  the price given in the admin panel is vital as it is the base price
  for calculating dynamic price according to the card type.


texts: Which version of php support both magento 2.2.6 and magento 2.3

texts: I want to upgrade Magento 2.2.6. During the upgrade,it shows php version error. If i upgrade it then it does not support to 2.2.6. kindly suggest the version which will support both.


texts: How can I use $_FILES in a Magento 2 way?

texts:
I used $_FILES when uploading files, but magento-connect do not allow to use global variables, and it generates an error in the validation report:

  Direct use of $_FILES Superglobal detected

How can I fix this error?


texts: Magento 2 : Google Analytics Cookies & Magento Standard Cookies Programattically

texts:
How to give customer choice of  which cookies he want to allow Google Analytics Cookies & Magento Standard Cookies ?

where to save customer preference programattically in Magento 2 ?


texts: Element 'referenceContainer', attribute 'after': The attribute 'after' is not allowed. - How to find the offending element?

texts:
After upgrading to Magento 2.2.5 I got the error

Exception #0 (Magento\Framework\Config\Dom\ValidationException): Element 'referenceContainer', attribute 'after': The attribute 'after' is not allowed.

I understand that this is caused by an 'after' attribute in referenceContainer in an xml file.

But how can I find out, which xml file and which element is causing the error?


texts: Magento 2 creating product attributes through CSV import

texts:
I need to create a module that can create custom product attributes as per the csv provided. I need it to import CSV via Magento 2 default csv import and validator.

I know that we need two table eav_attribute and catalog_eav_attribute table for this.

now the problem is how to validate the csv for both the table simultaneously.Anyone who has done it or have done it already please suggest me the correct way.


texts: Image placeholder being used when image is uploaded

texts:
I have a few products that have images uploaded but it only shows the placeholder image in the product page. You can see this at http://www.dananncrafts.com/valentines-offers/jewellery/necklace/handmade-silver-pendant-and-chain-reticulated-texture-925-sterling-silver.html

When you look at the admin for this product you can see that the images are set up correctly as seen in the image below:

What is going on here? I am very confused as most other products display images as expected.

EDIT: I have tried flushing the caches and have not touched the media.phtml file.


texts: Cron job template block not being translated, but testObserver is

texts:
I am configuring a product out of stock notification / alert, and I'm having an issue with localization / translation (pt_BR) in Magento CE 1.9.0.1.

The email/productalert/stock.phtml block isn't being translated when called by cron job. Nevertheless, when I call /productalert/add/testObserver it gets translated!

I am certain that when called by cron:

Module name is Mage_ProductAlert;
Mage::getStoreConfig('general/locale/code', Mage::app()->getStore()->getId()); equals pt_BR;
$locale = Mage::app()->getLocale()->getLocaleCode(); equals the same, pt_BR;

Any hints ? This is happening in core code, without any out of stock extensions.

Thanks!


texts: After Changing primary key of custom modules' model , does not saves data in db

texts:
I have made custom module for that I have to change tables primary key due to some reasons.I have updated it in Model\Resource\Modelclass.php file , flush cache including "Flush Cache Storage" of cache management.

But enable to save data in db.

It shows properly the saved module and its id by
1.)

$saved_obj = $model->save();
echo'<pre>';print_r($saved_obj->getData()); exit;

2.)

$insertid = $model->save()->getId();
echo'<pre>';print_r($insertid); //exit();


texts: Magento + Varnish + Nginx var/page_cache not removed

texts:
On CentOS7 and Cpanel with Mangeto 2.0.9 running on Apache I have installed and configured Varnish by moving Apache to 8080 port and SSL to 8888 (to disable).
Then installed Nginx to listen on port 443 and redirect all to Varnish.

And it all works perfectly and Magento keeps everything https and the certificate is valid.

PROBLEM: var/cache and var/page_cache are always re-generated.
Homepage always gives cache MISS and load time of 1.5 seconds.

Of course I have imported the Varnish 4 configuration from Magento Full page cache settings and changed it to work for Varnish, but var/ directory is still in use.

I have checked maybe every single article and guide and the most you can hear about var/page_cache is that if its not re-created then you're done, but what if it still is? Where to look?

I checked all Magento's var/log/(system|debug|exception).log's and nothing about there.

Any suggestion is welcomed!
Thanks!

EDIT:
This is env.php bottom part:

  'x-frame-options' => 'SAMEORIGIN',
  'MAGE_MODE' => 'developer',
  'cache_types' =>
  array (
    'config' => 1,
    'layout' => 1,
    'block_html' => 1,
    'collections' => 1,
    'reflection' => 1,
    'db_ddl' => 1,
    'eav' => 1,
    'config_integration' => 1,
    'config_integration_api' => 1,
    'full_page' => 1,
    'translate' => 1,
    'config_webservice' => 1,
    'compiled_config' => 1,
  ),

EDIT: After changed to production mode via editing env.php and made

  rm -rf var/*cache

the only thing changed is that response header

  X-Magento-Cache-Debug: MISS

disappeared from the homepage request.


texts: How can I add a date range and show by day/week/month to admin grid header?

texts:
How can I add some filters to the header of an admin grid? In particular
date range (from - to) and show by day/week/month?

I already looked into a simple extension (Advanced Report extension) which is providing this functionality, but for some reason I can't track it down. Any hint is much appreciated.


texts: magento redirectReferer redirecting with urlencode

texts:
Am using $this->_redirectReferer(); to redirect back to category page.
when i use some params, my url is like
electronics.html?color=24&manufacturer=117&price=-1000
then the redirected url is like
electronics.html?color=24&am;manufacturer=117&am;price=-1000
my url is encoded. all the & is changed to {&amp};
how can i avoid this.


texts:
I've created my Admin Page Grid but there is a strange issue when I try to prepare the collection.
This is the code:

  protected function _prepareCollection()
  {
      $collection = Mage::getModel('catalog/product')->getCollection()
        ->addAttributeToSelect('*')
        ->addFieldToFilter('visibility', Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH)
        ->addAttributeToSort('entity_id', 'desc');
      $collection->getSelect()->limit(5,1);
      $this->setCollection($collection);
      return parent::_prepareCollection();
  }

and this the result:

I've try to limit the result to 5 items but it is ignored. The system gets 740 items.
The query generated seems to be right:

SELECT `e`.*, `at_visibility`.`value` AS `visibility` FROM `catalog_product_entity` AS `e` INNER JOIN `catalog_product_entity_int` AS `at_visibility` ON (`at_visibility`.`entity_id` = `e`.`entity_id`) AND (`at_visibility`.`attribute_id` = '102') AND (`at_visibility`.`store_id` = 0) WHERE (at_visibility.value = '4') ORDER BY `e`.`entity_id` desc LIMIT 5 OFFSET 1

I've covered the if the method return $this instead of parent::_prepareCollection(), I obtain the right items but in the Pager area I continue to see "Total 740 records found".

Where am I wrong?


texts: How to get custom product attributes values using graphQl queries in magento 2.3?

texts:
I want to get the values for custom product attribute in product details page.
I am using below GrapgQl query to get the values.
i am passing the name as the argument. How can i get the products attributes.

{
products(filter:{name: {eq: "Joust Duffle Bag"}}
                    ){
items{
  id
  sku
  special_price
  description{ html}
  short_description{ html}
  meta_title
  meta_keyword
  meta_description
  options_container
  type_id
  image{ url label }
  small_image{ url label }
  thumbnail{ url label }
  price{
    regularPrice{
      amount{
        value
        currency
      }
    }
  }
}
}
}


texts: Disabled Allow Guest Checkout does not allow order in magento

texts:
I am using Magento ver. 1.9.2.1. For Allow Guest Checkout enabled magento store allow to order to guest or registered user.

But when I set to No for Allow Guest Checkout option then registered user also unable to order. When user submit order then onepage/checkout page redirect registered user to cart page.

Is there any other setting for disable guest checkout?


texts: How to add text next to the Hamburger Menu for small screens in MAGENTO 2

texts: Some Customers do not know that the hamburger icon is the menu for small screen on magento 2. I want to add some text next to the icon. What is the best way to do that? What files contain the code of the menu?


texts: Can I place a product in multiple categories?

texts: Like a same product in new arrivals and featured products etc...will this cause duplication?


texts:
i am trying to display a custom grid on an extra tab added on the product page.
I managed to add the custom tab successfully using this tutorial:

http://mydons.com/how-to-add-custom-tabs-to-magento-customer-edit-page/

Then i used this documentation to make a custom table in database and set up models etc.
http://www.magentocommerce.com/wiki/5_-_modules_and_development/0_-_module_development_in_magento/custom_module_with_custom_database_table#template_design

However, i'm not able to figure out how to add a grid to the new created tab.

I did not paste all of my code here, but if you need any additional information, please ask.

Thanks for your help


texts: Magento 2 - Get simple products from grouped product

texts: How can I get all simple products which are assigned to a certain grouped product?


texts:
What is the correct way to update stock_status_changed_auto

I am adding items into Magento 1.9 programmatically and all the fields are correct except for stock_status_changed_auto is 1 when it should be 0

I've tried both stock_status_changed_automatically and stock_status_changed_auto. The field in cataloginventory_stock_item is stock_status_changed_auto, but looking at the Magento response it sends stock_status_changed_automatically

My Code,

->setStockData(array(
        'use_config_manage_stock' => 1, //'Use config settings' checkbox
        'manage_stock' => 0, //manage stock
        'use_config_min_sale_qty' => 1, //Minimum Qty Allowed in Shopping Cart
        'use_config_max_sale_qty' => 1, //Maximum Qty Allowed in Shopping Cart
        'is_in_stock' => $final['is_in_stock'], //Stock Availability
        'qty' => $final['qty'], //qty
        'stock_status_changed_auto' => 0,
        'stock_status_changed_automatically' => 0


texts: Is it valid if magento 2 theme created with CSS3?

texts:
My question is related to this general Topic like if i have not much knowledge about of less css and i have created a custom theme by using CSS3 so is it valid or not valid in term of validation ?

Can i use CSS3 for creating of theme rather than less style ?


texts: Magento 1.9 Customer Account Edited By Admin Hook

texts:
I am currently running magento 1.9 on my site.
I am using Nerzarbeiter Customer Group Catalog.

I have added an attributes to my customers with the name is_activated and has_trained_in.

What I am wanting to do is when the admin updated the account to be activated and has assigned trained in is send an email containing a coupon code. I know how to make the coupon code I am just unsure how I would hook into the edit to be able to send the email.


texts: Product setDescription not working with HTML

texts:
If I run $product->setDescription($text) with plain text and then save the object, it works as expected.

However, if $text contains HTML, it does not update the record.

Is there something I'm missing?


texts:
I know there is a lot of topics about this question but I'm not sure to clearly understand..

When did we need to use service contract ?

Are they replacing the CRUD done by  Model / ResourceModel ?
Did we need to create everytime a service contract for each entity which will use a data table on custom module ?
Are they really interesting for future development ?
Why Magento sometimes uses save / load from the Model in Controller / Block, and sometimes not ?

Thank you


texts:
Magento DevDocs recommends to use APCu. I have enabled it and it works somehow, but I don't why and, and when to do what. I use already apc.php. Can anyone share some knowledge regarding APCu and Magento usage? I just would like to get a basic grasp, althoug I know not all is directly related to Magento...
Some questions:

Is it only used by composer and its class loading? Does Magento use it directly?

When does the cache get populated? It seems that composer dumb-autoload -o --apcu generates (just) 3 entries, loading a frontend page generates hundreds more (unfortunately not always - don't know what I'm doing wrong).

What happens after I've cleared the cache? E.g. with the button in apc.php. Do have I to re-populate the cache?

What clears the cache indirectly? E.g. a php-fpm restart? Is it a problem if the cache gets cleared?

If I'd like to update the autoloader, DevDocs tells to do
composer install --no-dev
bin/magento setup:di:compile
composer dump-autoload -o
bin/magento setup:static-content:deploy

Why composer install if Magento is already installed? And what is with the parameters of composer: --optimize-autoloader and --apcu-autoloader? Why don't they get used?

When do I have to what regarding APCu? When do I have to pay attention? E.g. "always do ... when you do ...".

I observed that stored keys are prefixed with a random string. What does create that string or when does it get altered or renewed?

Do I have to keep anything in mind if I also use OpCache, Redis or anything else?

Can you recommend APCu as well? Can it be that is offers just a minimal improvement?

I appreciate any enlightment! I hope using APCu with Magento is more easy then I think.


texts: How to create a better tailored, better-converting shopping experience?

texts:
Ever felt this way?

You think you escape the queues and wasted time of high street shopping, only to find that online shopping can be just as tedious.

Say I wish to buy online some product that can be emailed to me. Like software. Or concert tickets. Or an ebook.

What I want the (Magento) store to allow me to do:

1) I click-select my product from the home/landing page
  2) I am taken to the payment form (better: it's already on the page)
  3) I fill out my email address
  4) I enter card or PayPal details and press "Pay"
  5) I receive goods instantly by email
  6) I feel happy

What a lot of Magento sites still do most of the time is this:

a) I find myself having to succumb to the outdated paradigm of a shopping cart that I have to put stuff into and drag through the online store from page to page.

b) When I finally arrive at one of the many so-called one-page/one-step checkout extensions, I am unnecessarily prompted for billing address, phone number etc. ... Dear online store manager: you don’t need that information from me! [And you cannot call it one-step when I have to fill out that much!]

c) I am made to register with the store — why?

d) I spend time waiting for spinning AJAX throbbers to finish calculations for shipping costs and what have you — when there aren’t any!

Only some of the above steps are necessary some of the time.

If you want to stand out as a merchant, the common one-size-fits-all approach isn't cutting it anymore.

We need to better tailor a store's checkout process to the products that are being sold and the minimum information required from the shopper.

How would you improve the old-fashioned Magento shopping UX for emailed/FTP'ed products and make online businesses convert better?


texts: How to implement row reorder by a position field on listing in Magento2?

texts:
I found this page on magento2 documentation and I am trying to do a row sorting by a field named position like this image in the link:

Thanks you in advance for your help.


texts:
I'm trying to show review summary on cart page.

I've tried adding these lines in template/checkout/cart/item/default.phtml page

  $_item = $this->getItem();

 <?php echo $this->getReviewsSummaryHtml($_item, "short", true)?>

But it didn't work. Searched the internet but didn't find any solution.

I know it is a simple task, but i'm stuck on it. Please help.


texts:
I have the plugin in a directory

app/code/Amasty/Checkout/view/frontend/web/template/onepage/shipping/methods.html

that I would like to style (unfortunately, it can't be done only with CSS).

Is it possible to overwrite a plugin's template?

As it is not a good idea to fiddle with the files in plugin's folder.


texts: Magento 2 After Migration Process Sucessfull From Magento1.9.1.0 To Magento 2.3.3 Customer Grid Throw Error

texts:
Magento 2 after migration process sucessfull from magento1.9.1.0 to agento 2.3.3 then go to admin customers -> All Customer then throw error when i check in report following error throw

{"0":"Missing required argument $options of Magento\\Eav\\Model\\Entity\\Attribute\\Source\\Config.","1":


texts:
Magento 2
After installing payment-module. running these command lines caused the error of files not found from the pub/static/version******/adminhtml/

php bin/magento setup:upgrade;
php bin/magento setup:static-content:deploy;
php bin/magento cache:clean;


texts: PayPal Express redirects to main site before payment is completed

texts:
Been having some problems with PayPal checkout on my site.

Customers are able to confirm the order in Magento, proceed to PayPal, check order details, but when they click continue - at that point they are redirected back to the main page of the site before actually being able to send payment.

I'm not sure where the problem is at or where to go from here.

Any advice would be appreciated.

Thanks


texts: Im currently on magento 1.7 and when I try to checkout after filling out all the information i get stuck at step 3 for shipping method, it just shows up blank. I've been to system/config and made sure i have a shipping method on but it just doesn't show up?


texts: How to compare a product attributes with product Notify stock Qty in Magento Collection

texts:
I want to get product collection which has notify_stock_qty greater than total_available_qty (custom product attribute). So I used below code-

$collection = Mage::getModel('catalog/product')->getCollection()
                                                       ->addFieldToFilter('status',1)
                                                       ->addAttributeToSelect('*')
                                                       ->joinField('notify_stock_qty',
                                                         'cataloginventory/stock_item',
                                                         'notify_stock_qty',
                                                         'product_id=entity_id',
                                                         '{{table}}.stock_id=1',
                                                         'left')
                                                        ->addAttributeToFilter('notify_stock_qty', array ('gt' => new Zend_Db_Expr('total_available_qty') ) );

This showing below error-

a:5:{i:0;s:870:"SELECT `e`.*, IF(at_status.value_id > 0, at_status.value, at_status_default.value) AS `status`, `at_notify_stock_qty`.`notify_stock_qty` FROM `catalog_product_entity` AS `e`
 INNER JOIN `catalog_product_entity_int` AS `at_status_default` ON (`at_status_default`.`entity_id` = `e`.`entity_id`) AND (`at_status_default`.`attribute_id` = '273') AND `at_status_default`.`store_id` = 0
 LEFT JOIN `catalog_product_entity_int` AS `at_status` ON (`at_status`.`entity_id` = `e`.`entity_id`) AND (`at_status`.`attribute_id` = '273') AND (`at_status`.`store_id` = 1)
 LEFT JOIN `cataloginventory_stock_item` AS `at_notify_stock_qty` ON (at_notify_stock_qty.`product_id`=e.entity_id) AND (at_notify_stock_qty.stock_id=1) WHERE (IF(at_status.value_id > 0, at_status.value, at_status_default.value) = '1') AND (at_notify_stock_qty.notify_stock_qty > total_available_qty)

I tried below links but did not worked-

https://stackoverflow.com/questions/12148180/how-do-i-compare-2-different-fields-in-magento-in-a-collection

Filter Product Collection By Another Attribute In Product Collection eg 'attribX', array('gt' => 'attrib-Y')

I am not sure what is wrong there ?

Solution---
This worked for me---

$collection = Mage::getModel('catalog/product')->getCollection()
                                                       ->addFieldToFilter('status',1)
                                                        ->addAttributeToSelect('total_available_qty')
                                                       ->addFieldToFilter('total_available_qty',array('gteq'=>0))
                                                       ->addAttributeToSelect('*')
                                                       ->joinField('notify_stock_qty',
                                                         'cataloginventory/stock_item',
                                                         'notify_stock_qty',
                                                         'product_id=entity_id',
                                                         '{{table}}.stock_id=1',
                                                         'left');
        $collection ->getSelect()->where('`at_notify_stock_qty`.`notify_stock_qty` > `at_total_available_qty`.`value`');


texts: How to create a module Email Delivery to Customer if the stock of existing and empty stock

texts:
I want to tell my customers On Stock products they purchase by sending an email to them. There are two conditions and options and select the submit button.

if the stock does not exist then Select Stock and Order Cancelled There, then send an email to the customer based on the selected email template?
If the Stock Avaiable then send an email details of your order by email the selected template?

Here is the html that I made, please help me to complete this module !


texts: Put a bloc between top.search and minicart

texts:
I want to put a bloc between top.search and minicart but it's don't work :
    <?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd" layout="2columns-right">
    <referenceContainer name="header-wrapper">
        <block class="Magento\Helloworld\Block\MonBlock" name="mon.block" template="mon-block.phtml" after="top.search" before="minicart"/>
    </referenceContainer>
</page>


texts: Magento 2 - set order of associated products by ID

texts:
I am trying to order my associated products of the configurable product by ID
This is my code but set order not work:
$simple_collection = $_product->getTypeInstance()->getUsedProducts($_product);
foreach($simple_collection as $simple_product){
echo $simple_product->getId().'<br/>';
}

Thanks!


texts: Magento2 : How to get all thge fields of a system.xml section / group

texts:
I have created a module with custom system config entries :

Vendor/Module/etc/adminhtml/system.xml

<?xml version="1.0"?>
 <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
     <system>
         <tab id="mainconfig" translate="label" sortOrder="1">
             Mine Special
         </tab>

             <class>separator-top</class>
             FOO Configuration
             <tab>mainconfig</tab>
             <resource>Vendor_Module::fooconfig_configuration</resource>

            <group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
                Emails Configuration
                <field id="foo_mail" translate="label" type="text" sortOrder="11" showInDefault="1" showInWebsite="0" showInStore="0">
                    FOO Email
                    <validate>required-entry validate-email</validate>
                </field>
                <field id="bar_mail" translate="label" type="text" sortOrder="12" showInDefault="1" showInWebsite="0" showInStore="0">
                    BAR Email
                    <validate>required-entry validate-email</validate>
                </field>
            </group>

     </system>
 </config>

I now would like to be able to get all the fields of a section group, something like :

$Fields = $this->_scopeConfig->getFields('fooconfig/general',...);
foreach ($Fields as $Field) {
    $Entries = $this->_scopeConfig->getValue('fooconfig/general/'.$Field->getId(), \Magento\Store\Model\ScopeInterface::SCOPE_STORE);

//do what needed here
}

Is there a possibility to do somehting like that?

Thank you for your help


texts: Error while using croppie.js library in magento 2

texts:
Trying to use the croppie library on product detail page and sometime  it works perfectly but most of the time it throws one of these errors.

  TypeError: priceBoxes.priceBox is not a function

  Uncaught TypeError: $(...).croppie is not a function

Every time i open the product page first time in incognito or hard refreshes the page, it always works but when i refreshes the page, it throws these errors.

croppie js path in my theme:

  app/design/frontend/Theme_Vendor/Theme/web/js/croppie.js

var config = {
 paths: {
     croppie: 'js/croppie'
 }
};

  app/design/frontend/Theme_Vendor/Theme/Magento_Catalog/templates/product/view/gallery.phtml:

require([
    'jquery',
    'domReady!',
    'croppie'
], function($){
    $('.demo').croppie({
        url: 'demo/demo-1.jpg',
    });
});


texts: Magento 2 How to remove a block from specific product

texts:
I want to remove Price block from specific product. I tried to updated Layout Update XML but it is not working

I have tried this <referenceBlock name="product.info.price" remove="true"/> but it do not work.

I read some where it will only accept the <referenceContainer>... not <referenceBlock name="block.name" remove="true"/>

So I tried

<container name="trash.bin" htmlTag="div" />
<move element="product.info.price" destination="trash.bin" />
<referenceContainer name="trash.bin" remove="true" />

this did not work either.Any solution?


texts: Redis Session DB Shows Zero 0 Keys for sessions?

texts:
When looking at the Redis Manager in the Back End, it always shows zero (o) keys for the sessions?

The .var/session is also empty.
Any idea on this?

We are running CE1.9.2.2.

<!--
<session_save><![CDATA[files]]></session_save>
-->

    <session_save><![CDATA[db]]></session_save>
    <redis_session>
        <host>127.0.0.1</host>
        <port>6379</port>
        <password></password>
        <timeout>2.5</timeout>
        <persistent></persistent>
        <db>1</db>
        <compression_threshold>2048</compression_threshold>
        <compression_lib>gzip</compression_lib>
        <log_level>1</log_level>
        <max_concurrency>6</max_concurrency>
        <break_after_frontend>5</break_after_frontend>
        <break_after_adminhtml>30</break_after_adminhtml>
        <first_lifetime>600</first_lifetime>
        <bot_first_lifetime>60</bot_first_lifetime>
        <bot_lifetime>7200</bot_lifetime>
        <disable_locking>0</disable_locking>
        <min_lifetime>60</min_lifetime>
        <max_lifetime>2592000</max_lifetime>
    </redis_session>

   <cache>
      <backend>Cm_Cache_Backend_Redis</backend>
      <backend_options>
        <server>127.0.0.1</server>
        <port>6379</port>
        <persistent></persistent>
        <database>2</database>
        <password></password>
        <force_standalone>0</force_standalone>
        <connect_retries>1</connect_retries>
        <read_timeout>10</read_timeout>
        <automatic_cleaning_factor>0</automatic_cleaning_factor>
        <compress_data>1</compress_data>
        <compress_tags>1</compress_tags>
        <compress_threshold>20480</compress_threshold>
        <compression_lib>gzip</compression_lib>
        <use_lua>0</use_lua>
      </backend_options>
    </cache>


texts: Magento 2.4.1 switches back to default language

texts:
We have the problem that in Magento 2.4.1 by clicking the Homepage link it switches back to de default language. All other links are keeping the language.
Example:

Default Language DE
Switch Languae to US -> OK
Click on Homepage Link -> Switches Back to DE
Click another Link -> Switches Back to US

Is that normally or an issue?


texts: Magento 2: I want to add option in frontend to choose the Inc.vat or Excl.vat price

texts:
I want to provide the option to the customer for choose to show the price Inc. vat or Excl. Vat.
any idea about how can I do that?


texts: Magento problem on anchor categories with title SEO

texts:
I have a problem on my website

Magento doesn't take the right title. Instead of taking the title given in backoffice, it takes the default title. Only anchor categories are concerned.

Can you help me ?

Its 'okay

Category.xml called another block for non anchor categories

<block type="catalog/navigation" name="catalog.content" template="catalog/navigation/content.phtml"/>

This block allows to display all children categories and not products in content.
But as it called navigation.php, metas title and description aren't managed.


texts: Magento 2 not able to save or load a custom cache

texts:
Here is the script (in a shipping module->carrier method, is the cache function can be used in checkout page?), in my custom module

$cacheKey = $code;  //e.g ABC

/*saving*/
$cacheData = $request->getPackageWeight().'_'.$request->getDestCountryId().'_'.$code.'='.$totalPostage;

$this->_cacheType->save($cacheData, $cacheKey, [\Testcache\Test\Model\Cache\Type::CACHE_TAG], 86400);
$writer = new \Zend\Log\Writer\Stream(BP . '/var/log/testcache.log');
$logger = new \Zend\Log\Logger();
$logger->addWriter($writer);
$logger->info('cacheSave:' . $this->_cacheType->load($cacheKey));

cache.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Cache/etc/cache.xsd">
    <type name="test_cache" translate="label,description" instance="Testcache\Test\Model\Cache\Type">
        <label>Test Cache type</label>
        <description>Test cache description.</description>
    </type>
</config>

Type.php

<?php
namespace Testcache\Test\Model\Cache;

/**
 * System / Cache Management / Cache type "Custom Cache Tag"
 */
class Type extends \Magento\Framework\Cache\Frontend\Decorator\TagScope
{
    /**
     * Cache type code unique among all cache types
     */
    const TYPE_IDENTIFIER = 'test_cache_tag';

    /**
     * Cache tag used to distinguish the cache type from all other cache
     */
    const CACHE_TAG = 'test_cache';

    /**
     * @param \Magento\Framework\App\Cache\Type\FrontendPool $cacheFrontendPool
     */
    public function __construct(\Magento\Framework\App\Cache\Type\FrontendPool $cacheFrontendPool)
    {
        parent::__construct($cacheFrontendPool->get(self::TYPE_IDENTIFIER), self::CACHE_TAG);
    }
}

Anyone know what is the problem?

-------------update--------------
new testing script

    public function collectRates(RateRequest $request)
    {

        $cacheKey = '123123123123123';
        /*saving*/
        //$cacheData = $request->getPackageWeight().'_'.$request->getDestCountryId().'_'.$code.'='.$totalPostage;
        $cacheData = '123123123132123123123123123';
        $this->_cacheType->save($this->serializer->serialize($cacheData), $cacheKey, [\Testcache\Test\Model\Cache\Type::CACHE_TAG], 86400);
        $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/testcache.log');
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);
        $logger->info('cacheSave:' . print_r($this->_cacheType->load($cacheKey), true));

.........


texts: Magento 2 - Add meta detail on frontend page using Block

texts:
I have custom block in my custom module, which call my frontend custom phtml file.

let's say file path: app\code\Vendor\Module\Block\Index\Index.php

I need to figure out the way to set meta title, meta keywords and meta description using Block

I already set the page title by using following code in Block

protected function _prepareLayout()
{

        $this->pageConfig->getTitle()->set(__('My page title'));
        return parent::_prepareLayout();
}

Any help, experience and knowledge sharing would be appreciated


texts: What are some good written and simple modules I should look at to learn Magento?

texts: I've created a few very simple Magento modules. Now I want to look at very good written code for Magento modules. It shouldn't be a huge module, maybe some news or blog module, I don't know. Any suggestions? Thanks.


texts: how to add Sign in and Create account on footer in magento2?

texts:
How to add sign in and create account on footer in magento2?
Please help me ?


texts: No Payment method available after upgrade to magento 2.1.13

texts:
I have magento 2.1 store first installation from theme bought.

The folder structure like below:

app/code/Magento

I upgraded to 2.1.13 using composer and moved magento core files to vendor.

I did all regular command lines like

setup:upgrade

setup:di:compile

setup:static-content:deploy

cache:flush/clean

The store works fine but accidentally in checkout page

  Payment Information

  No Payment method available.

No errors in debug log and I changed the them to luma


texts:
My company has a slow magento site that we want to start over on, without re-entering a lot of the information, eg:

All types of products (over 3000 in 4 stores)
All attributes
Customer Records
Orders, Invoices, Shipments, etc
Promotions
Newsletter Subscribers, etc..

Is there a way I can do a new install of Magento (currently running 1.8.1), install our new theme files, then pull in all of the above mentioned information?

We have extensions on the current site that will not be used on the new site. I am worried about remnants of theme files/settings and those extensions being in the database tables.

Any help or ideas are greatly appreciated!


texts:
My company uses Magento 1.4

There is a folder path

/app/design/frontend/default/mycompanyname/.. etc

In this case, mycompanyname also has "brother" folders (on the same level) which represent some custom extensions we have built that I recognize. [1]  This mycompanyname folder only has two subfolders, layout and template

There is ALSO a folder path:

/app/design/frontend/mycompanyname/default

Notice that they are reversed.  THIS default folder has the standard etc, layout, locale and template folders in it.  Brother folders ALSO include the names of custom extensions I recognize.

The first thing that would come to my Jewish grandfather is probably oy!

My question is: is this really just bad coding, or is there a legit reason why there are both ../mycompany/default/.. and ../default/mycompany/.. in the design folder?  If it is bad coding, which of these paths should have been used?

I know that previous programmers really didn't understand the Magento model path concept, or certainly didn't implement it consistently.

[1] NOTE: One of the "brother" folders in the first path is named default - so you've got ../default/default/.. (containing etc, layout, locale, and template), which is also confusing!


texts: No results on layered navigation when filter applied

texts:
In Magento2 - We have a Multi-Store site with product category pages, with some attributes enabled in layered navigation.

The fact is that in certain stores, filters counts shows the items per filter correctly but when the filter is applied no product is displayed.

How can we debug this?

Edited:
Debugging it with Magento Profiler, I have found the only query that contains the filter field name on it and it seems that the problem is that the store_id is concatenated in the query with a wrong unexciting store id. How can I find where this store_id is appended to the query?

Edited2:
It seems that is due to something wrong in the database, since creating the whole Web Site with its Store and Store View again makes it work correctly.


texts: Magento 2 REST API V1/products list all inactive Tier Prices

texts:
I am using /V1/products API Call to get the product list. It contains the inactive tier prices (means expired tier prices). Either I need to get the tier price from and tier price to or I need to get the active tier prices.
When I try to call the /V1/products/{sku}/group-prices/{customerGroupId}/tiers API, it returns only the active filters.
How can I do it in product listing ?


texts: Magento2.3:CSS inlining error: DOMXPath::query(): Invalid expression in selector >> body <<

texts:
CSS inlining error: DOMXPath::query(): Invalid expression in selector >> body << in /home/rcg40548/public_html/vendor/pelago/emogrifier/Classes/Emogrifier.php on line 374

I also have used this solution but it is not working.

Solution:

create the files
/web/css/email.less
/web/css/email-inline.less
in your custom theme and add the content from
/vendor/magento/theme-frontend-blank/web/css/email.less and
/vendor/magento/theme-frontend-blank/web/css/email-inline.css
respectively
but each with the line "@import 'source/_theme.less';" commented out (or removed)