texts: Replace static value by value which is present in database

texts:
We are using below  code to display "Unpaid/Paid" as Paid status.

 if ($roworders['dproduct_id'] == '')
                    {
                    $dorderStatus = "Unpaid";
                    }
                  else
                    {
                    $dorderStatus = $roworders['dpaid_status'];
                    }

in database, for product ID - 15517 , it showing status as Paid, so in site, i want to replace "Unpaid" by "Paid".

 $i = 0;
    foreach($order as $orderData)
        {
        $orderitems = $orderData['dproduct_id'];
        $orderitemsarray = explode(",", $orderitems);
        $k = 0;
        $oDate = new DateTime($orderData['created_at']);
        $sDate = $oDate->format("Y-m-d");
        while ($k < count($orderitemsarray))
            {
            if ($orderitemsarray[$k] != '0')
                {
                $stmtorders = $user_home->runQuery("SELECT * FROM order_details WHERE designerorder_id=:designerorder_id");
                $stmtorders->execute(array(
                    ":designerorder_id" => $orderData['entity_id']
                ));
                $roworders = $stmtorders->fetch(PDO::FETCH_ASSOC);
                if ($roworders['dproduct_id'] == '')
                    {
                    $dorderStatus = "Unpaid";
                    }
                  else
                    {
                    $dorderStatus = $roworders['dpaid_status'];
                    }

                if ($roworders['designerorder_id'] == '')
                    {
                    $commission = "comm";
                    }
                  else
                    {
                    $dorderStatus = $roworders['commission'];
                    }

                $productdetail = Mage::getModel('catalog/product')->load($orderitemsarray[$k]);
                $designerName = getDesignerName($productdetail->getDesignerID()) . " -(" . $productdetail->getDesignerID() . ")";
                $responce[] = array(
                    $orderData->getIncrementId() ,
                    $orderData->getIncrementId() ,
                    $orderitemsarray[$k],
                    $productdetail->getName() ,
                    $designerName,
                    $orderData['status'],
                    $orderData['grand_total'],
                    $orderData['customer_email'],
                    $commission,
                    $dorderStatus,
                    $sDate
                );
                }

            $k++;
            $i++;
            }
        }

    echo json_encode($responce);
    }

script

{id: 'dpaid_status' , header: "Paid status" , width :"80"},

Edit

when i tried this code , its fetching results from database.....


texts: how to het customer pick date for electron product, example, amusement park ticket

texts: I'm trying to sell tickets electronically. Consider like an amusement park, or parking lot tickets. No worries about assigned seats or limited dates / times. I can handle checking if it is sold out, but this would be a rarity. I do need the customer to be able to pick the date for the tickets and store that. If I'm reading it right, the product attribute "date" is a specific date for a product and not selectable per order. If I'm right about this, is there a way to store the ticket date for a product on a per order basis? Or would this require writing a custom module that stores the date in a custom database table?


texts:
how can I get product manufacturer option id by label if it exists and if not create new manufacturer option? I tried something like this but I couldn’t manage to make it work
protected $_attributeRepository;
protected $_attributeOptionManagement;
protected $_optionFactory;
protected $_attributeOptionLabel;
  public function __construct(
        \Magento\Catalog\Api\ProductAttributeRepositoryInterface $attributeRepository,
        \Magento\Eav\Api\AttributeOptionManagementInterface $attributeOptionManagement,
        \Magento\Eav\Api\Data\AttributeOptionLabelInterface $attributeOptionLabel,
        \Magento\Eav\Model\Entity\Attribute\OptionFactory $optionFactory){
        $this->_attributeRepository = $attributeRepository;
        $this->_attributeOptionManagement = $attributeOptionManagement;
        $this->_attributeOptionLabel = $attributeOptionLabel;
        $this->_optionFactory = $optionFactory;}

 public function getManufacturer($manufacturerLabel)
    {
      $optionId = $this->getOptionId(self::ATTRIBUTE_CODE_MANUFACTURER, $manufacturerLabel);
      if ($optionId) {
          return $optionId;
      }
      $option = $this->_optionFactory->create()->setLabel($manufacturerLabel);
      $this->_attributeOptionManagement->add(self::ATTRIBUTE_CODE_MANUFACTURER, $option);
      $optionId = $this->getOptionId(self::ATTRIBUTE_CODE_MANUFACTURER, $manufacturerLabel);
      $option->setOptionId($optionId)->save();
      return $optionId;
    }
 public function getOptionId($attributeCode, $optionLabel)
    {
        $attribute = $this->_attributeRepository->get($attributeCode);
        return $attribute->getSource()->getOptionId($optionLabel);
    }


texts: Set Child product as same Parent Product Magento 2

texts:
How can I automatically assign child product as the same parent product
we have 1000 product and editing it manual take time


texts:
I want to get newly registered customer detail to send to third party.
Here is my code:

if($current_controller_action == 'customer_account_index'){

    Mage::getSingleton("core/session", array("name" => "frontend"));
    $session = Mage::getSingleton("customer/session");

    if($session->isLoggedIn())
    {
        echo $session->getCustomer()->getId();
        echo $session->getCustomer()->getEmail();
    }else{
        echo "Not logged in";
    }
}

I tried to get only newly registered customer not the login customer on myaccount page. on this page 'customer_account_index' action working not "customer_register_success".

Thanks


texts: Magento2 : Make custom link clickable in Catalog

texts:
I am working on admin product grid (Products  > catalog).
As you can see from the picture, I am able to display my custom attribute value which is a file input for products. Specs PDF column is basically a link to pdf file stored in media.
When I click on the PDF link, it doesnt open link but goes to product edit area. Even though link & html for the link is right, Magento 2.1 doesnt bind click event of the link with its href.
I am not sure how can I make it work. (Magento 2.1)

What I have done so far
My product_listing.xml in my custom module Tto/Custom/view/adminhtml/ui_component/product_listing.xml
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <columns name="product_columns">
        <column name="product_specs_pdf" class="Tto\Custom\Ui\Component\Listing\Column\ProductSpecsPDF">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="filter" xsi:type="string">text</item>
                    <item name="label" xsi:type="string" translate="true">Specs PDF</item>
                    <item name="bodyTmpl" xsi:type="string">ui/grid/cells/html</item>
                    <item name="sortable" xsi:type="boolean">false</item>
                    </item>
                </item>
            </argument>
        </column>
    </columns>
</listing>

In class Tto\Custom\Ui\Component\Listing\Column\ProductSpecsPDF method prepareDataSource help me to get the proper link.
 /**
 * Prepare Data Source
 *
 * @param array $dataSource
 * @return array
 */
public function prepareDataSource(array $dataSource)
{
    $this->logger->debug('------------ prepareDataSource --------------');
    $mediaDirectory = $this->_storeManager->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA);
    if (isset($dataSource['data']['items'])) {

        foreach ($dataSource['data']['items'] as & $item) {
            $this->logger->debug('item', array( 'arr' => $item ) );

            // get the product object from repository
            $product = $this->productRepository->getByID( $item['entity_id'] );
            // get all attributes
            $attributes = $product->getAttributes();
            // check if we have attributes
            if( $attributes ){
                //go through the loop
                foreach( $attributes as $key => $val ){
                    // check if we have product_specs_pdf
                    if( $key === 'product_specs_pdf' ){

                        // get the value
                        $file = $product->getData( $key );

                        $url = false;
                        if ( !empty( $file ) ) {
                            $url = $this->_storeManager->getStore( $product->getStore() )
                                    ->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA)
                                . 'catalog/product/productspecs' . $file;

                            $item[$this->getData('name')] = 'PDF';

                        }

                    }
                }

            }

        }

    }
    return $dataSource;
}

So the question is what else I need to do to make the link click-able?


texts: When i will export the products, this messagens show Class Magento\Catalog\Model\Product\Image\CacheFactory does not exist in MAGENTO 2.0.2


texts:
I want to add a new function in class Magento\CatalogWidget\Block\Product\ProductsList so, that I can use that function in template file of this block.

Can I add a new function without using preferences? If yes, how? And then how can I use the new function in phtml file?

Suppose, I have to add the function isNew() in class Magento\CatalogWidget\Block\Product\ProductsList and then I need to call this function in override template app/design/frontend/Mythem/newtheme/Magento_CatalogWidget/templates/product/widget/content/grid.phtml like $block->isNew()


texts: Insert Widget Button not having correct URL - Any idea why?

texts:
First as information, using Magento 2.3.5-p2 and an own developed theme and a few extension.
Following problem:-
When I do edit a CMS block and change the view to non editor the additional buttons for Insert Widget and Insert Image appears. So far so good.
But unfortunately when pressing the Insert Widget Button it is not opening the Page where I can select a Widget, but an 404 error page occurs.
I found, that in my setup, the function $this->getPluginConfigOptions('magentowidget', 'window_url') returns an empty string. Therefore the on-click call of the insert widget button is resulting in the 404 error page.
In a fresh 2.3.5-p2 installation, this call contains the url and therefore it is working.
The call of these functions does happen in magento/Framework/Data/Form/Element/Editor.php
For the Insert Image Button, there is another function $this->getConfig('files_browser_window_url')
This function returns correct URL, as well with the hash etc.
I do not see any extension overriding this Editor.php class and therefore, I have no idea why this happens.
Does somebody had a similar problem or maybe an idea why this function returns nothing?
Looking forward to hearing from you.
Best regards,
Chequille


texts:
I am facing issue with creating a block between header.container and main. so that I can put the banner over there. And I need the banner in home page only

please help me for the same.


texts: Dynamic show/hide of data fields in adminhtml form [magento 1.9]

texts:
I am implementing one module.
I have form fields like

 $fieldset->addField(
            'date_enabled', 'select', array(
                'label'     => Mage::helper('slider')->__('Use Date Range'),
                'name'      => 'date_enabled',
                'values'    => array(
                    0 => Mage::helper('slider')->__('No'),
                    1 => Mage::helper('slider')->__('Yes'),
                ),
            )
        );

  $fieldset->addField(
            'from_date', 'date', array(
                'name' => 'from_date',
                'label' => Mage::helper('slider')->__('From Date & Time'),
                'title' => Mage::helper('slider')->__('From Date & Time'),
                'image' => $this->getSkinUrl('images/grid-cal.gif'),
                'class' => 'validate-date',
                'time' => true,
                'input_format' => Varien_Date::DATETIME_INTERNAL_FORMAT,
                'format' => $dateFormatIso
            )
        );

        $fieldset->addField(
            'to_date', 'date', array(
                'name' => 'to_date',
                'label' => Mage::helper('slider')->__('To Date & Time'),
                'title' => Mage::helper('slider')->__('To Date & Time'),
                'image' => $this->getSkinUrl('images/grid-cal.gif'),
                'class' => 'validate-date',
                'time' => true,
                'input_format' => Varien_Date::DATETIME_INTERNAL_FORMAT,
                'format' => $dateFormatIso,
                'note'      =>$note,
            )
        );

what I want to do is if I select yes from 'Use Date Range'

Then only we can see fields 'From Date & Time' and 'To Date & Time'
Otherwise, those fields are hidden.

How to do that in Magento 1.9.


texts: Translations not working, Magento_Checkout

texts:
I'm facing the problems with Finnish translations (Magento ver. 2.1.7). The main pages are translated but all the Magento_Checkout translations are in English.

It seems that this is bug in the Magento 2 implementation,
e.g. https://github.com/magento/magento2/issues/2951

Once I got it working with this:

find . -name js-translation.json -exec rm -rf {} ;
php bin/magento setup:static-content:deploy en_US
php bin/magento setup:static-content:deploy fi_FI
php bin/magento indexer:reindex
php bin/magento cache:clean
php bin/magento cache:flush

I though that this will be the permanent solution... but I was totally wrong.

When the set of commands were rerun, all the checkout related texts are back in English.

All solutions are welcome!


texts: Paypal advanced payment method error with Magento ver. 1.12.0.2

texts:
I have configured all the necessary info for Paypal advanced payment method in Magento properly. But when the customer try to checkout with Paypal advanced payment method. It returns following error

    Notice: Undefined property: Mage_Paypal_PayflowadvancedController::$_configType  in /home/storedev12/public_html/app/code/core/Mage/Paypal/Controller/Express/Abstract.php on line 53

#0 /home/storedev12/public_html/app/code/core/Mage/Paypal/Controller/Express/Abstract.php(53): mageCoreErrorHandler(8, 'Undefined prope...', '/home/storedev1...', 53, Array)
#1 /home/storedev12/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(145): Mage_Paypal_Controller_Express_Abstract->_construct()
#2 /home/storedev12/public_html/app/Mage.php(504): Mage_Core_Controller_Varien_Action->__construct(Object(Mage_Core_Controller_Request_Http), Object(Mage_Core_Controller_Response_Http), Array)
#3 /home/storedev12/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(202): Mage::getControllerInstance('Mage_Paypal_Pay...', Object(Mage_Core_Controller_Request_Http), Object(Mage_Core_Controller_Response_Http))
#4 /home/storedev12/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#5 /home/storedev12/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#6 /home/storedev12/public_html/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#7 /home/storedev12/public_html/index.php(91): Mage::run('retail', 'website')
#8 {main}

does anybody knows what could be wrong here?

note:
I have ticket open with Magento support for last 2 days :(


texts: Export from the database brand, quantity and size/color varchar: MySQL & EE

texts:
I'm looking to put together an amazon inventory report to help our product buyers with identifying products that we would like to send for FBA.

What I want to display:

  Brand, Product Name, Size, Color, MAP Price, Sales Price, SKU, Qty.

What I want to sort by:

  type_id, manufacturer_value, qty, type_id

Where I'm getting them:

Brand, Name SKU and MAP Price are coming from catalog_product_flat_1
Qty is coming from cataloginventory_stock_item
Sales Price is coming from catalog_product_index_price

My problem happens when I try and bring in size and color.
These attributes are stored as int in catalog_product_entity_int
The varchar of the value is stored in eav_attribute_option_value
So I have to join a table just to match the values, and bring the data from another additional table.

No big deal there. The problem is that I'm unable to bring both in at the same time. I think I need a subquery, but I'm not quite sure where I would use that, or how it would be acomplished. Here's the query that gets one value to show:

SELECT flat.manufacturer_value AS Brand, EAOV_size.Value AS Size, flat.type_id, flat.name, flat.price, price.final_price, flat.sku, cpev.value AS star_upc, stock.qty
FROM magento.catalog_product_flat_1 AS flat
LEFT JOIN magento.cataloginventory_stock_item AS stock ON ( stock.item_id = flat.entity_id )
LEFT JOIN magento.catalog_product_index_price AS price ON ( price.entity_id = flat.entity_id )
LEFT JOIN catalog_product_entity_varchar AS cpev ON ( cpev.entity_id = flat.entity_id ) AND (cpev.attribute_id = '291')
LEFT JOIN magento.catalog_product_entity_int AS CPEI ON (flat.entity_id = CPEI.entity_id)
INNER JOIN magento.eav_attribute_option_value AS EAOV_size ON ( EAOV_size.option_id = CPEI.Value ) AND ( CPEI.attribute_id = '141' )
WHERE flat.manufacturer_value = 'Montbell'
AND stock.qty > '0'
AND flat.type_id = 'simple'
GROUP BY flat.sku;

The last join is an inner, so it will display, if it's a LEFT it'll only show null. and for some reason full and full outer joins only return errors.

Any help is appreciated.


texts: Customer account url in different languages

texts:
I have two stores on my website English (test.com) and Spain (test.es). How do I specify the login url for customer accounts? On the English site it would be test.com/customer/account/login/ and on the Spanish site I want the login url to be test.es/clientes/cuenta/iniciarsesión/.
I have added a custom url rewrite with the following:

Type: Custom
Store: Spain
ID Path: Login
Request Path: clientes/cuenta/iniciarsesión/
Target Path: customer/account/login/
Redirect: No

But when I go to test.es/clientes/cuenta/iniciarsesión/ I see the page not found message (in Spanish). If I go to test.se/customer/account/login/ the login page will appear.

How can I get it to work so the customer login page (and other customer account pages) uses a Spanish url (that I would specify or generate automatically)?


texts: Magento 2 API Create Order As guest: {“message”:“\”%fieldName\“ is required. Enter and try again.”,“parameters”:{“fieldName”:“email”}}

texts:
0
I'm trying to place an order via Magento 2 API as a guest, following the guidance shown here:
https://devdocs.magento.com/guides/v2.4/rest/tutorials/orders/order-create-order.html
The end point I'm using is:
https://[domain]/rest/V1/guest-carts/'.$quote_id.'/payment-information
with quote_id being the ID of the quote created initially
Steps 1-6 complete successfully with relevant response being returned as expected.
But sending the following payload (literally a copy and paste from the docs) to the above endpoint:
    {
  "paymentMethod": {
    "method": "banktransfer"
  },
  "billing_address": {
    "email": "jdoe@example.com",
    "region": "New York",
    "region_id": 43,
    "region_code": "NY",
    "country_id": "US",
    "street": [
      "123 Oak Ave"
    ],
    "postcode": "10577",
    "city": "Purchase",
    "telephone": "512-555-1111",
    "firstname": "Jane",
    "lastname": "Doe"
  }
}

Results in this error message:
{"message":""%fieldName" is required. Enter and try again.","parameters":{"fieldName":"email"}}
The email address IS obviously being supplied, and am really at a loss as to what's going wrong.
For info, the API this is being sent to is a vanilla install of Magento set up with a test product for testing purposes
Does anyone have any ideas, or at least some suggestions as to how I can debug given the not very usefulness of the error message given?


texts: How to Change My admin URL From https:// to http://

texts:
While i install magento2.2.1 3rd Step
I enable use https for magento storefront and use https for magento admin

After Installation i cant view page bcoz https not support in my local machine (WAMP)
So I moved to phpmyadmin and select my database and selct "core_config_data" table... Here i change config path url from https to http.
Now i can view my website..

The problem is i cant access admin url
when i typed localhost/magento/admin it was changed to https://localhost/magento/admin/

How can i change this configuration via database or php code.


texts:
We are Displaying code as below format in view.phtml file. Instead of just entering "Product Description" , is there any magento standard way to write code to display "Product Description"

Product Description

Features

Reviews

Add Review</div

I am not sure,  this question make sense or not, but client said the code is not in standard way of magento.


texts: Creating a store for each country with multiple language

texts:
I am starting a Magento project for 7 countries, I want to add for each country two languages English and Arabic.

All stores have the same products. As first thought I think the best approach to have a store for each country, and each store has two store views.

The problem that each country should have different url.

For example

www.mystore.com/country1
www.mystore.com/country2
www.mystore.com/country3

And the user should be able to change the language without changing showing the language code in the url.

I found a website that is using that approach http://markavip.com/

So could you please suggest a way to do it ??

Edit one: What I did step by step

First Step : I created a new website with code 'qatar', then I created a new store with Default Category as Root Category ( because I want the same products for all stores ). Then I created a view for the store.

Second Step : After that I created a new sub folder called qatar and I copied the .htaccess file and add this code.

SetEnvIf Host / MAGE_RUN_CODE=qatar;
SetEnvIf Host / MAGE_RUN_TYPE=website;

No reason for it because I couldn't find the explanation with sub folder.

Third step: I changed Auto-redirect to Base URL in default config to No, and then I changed the Base Link URL in qatar website to {{secure_base_url}}qatar/

I tested it using this url magento:8888/qatar/ in my machine and it shows this :

Forbidden
You don't have permission to access /qatar/ on this server.

To solve the problem I copied the index.php and add this code

$mageRunCode='qatar';
$mageRunType='website';

Then I test it again it work but when I go this category page it shows

  There are no products matching the selection.

So when I access the main website

magento:8888/men/shirts.html

I can see all products. but at this url I can't see any product

magento:8888/qatar/men/shirts.html

Edit Two: I update the product to be in the second website also. And it work perfectly, but could you please see my steps because I am afraid that I may did a hidden mistake.


texts:
I want to run a custom PHP script in Magento 2 webshop using a custom module.

But I want it to run only when installing or during installation of my custom  module.

To be specific, during setup:upgrade command and will trigger only once except if there's a change in my custom module version.

Anyone tried that before?
Can you point me into right direction on how to do it?

Thanks!


texts: Magento CMS Page keep redirect to homepage

texts:
I don't know why my CMS page content keep automatically redirect to homepage.

Example: I click on link below:

http://magento.lifegood.com.my/customer-service

then my magento site will bring me to homepage.

I totally have no idea to fix this bug after I hard trying one day on it.

Update: Here is my .htaccess


texts: Magento 1: How to apply custom options price one time only

texts:
Please open below link and check "Interested in Embroidery" checkbox. Some options will show which are product custom options. Here, two options have price "Logo Creation Fee" and "Embroidery Logo Charge". When I select all options and add to cart. On cart page, If I increase product quantity, all option's price increase with quantity. But I want that when product quantity increase, only "Embroidery Logo Charge ($35)" custom option varies with quantity not "Logo Creation Fee($300)".

Example: If the product price is $50 and product have two custom options like- " Logo Creation Fee ($300)" and "Embroidery Logo Charge($35)". When we add the product(quantity 1) in a cart with both custom options (subtotal is $385).

Subtotal is: (product price ($50) + Logo Creation Fee ($300) + Embroidery Logo Charge($35)) * 1 = $385

Now, we increase product quantity (2) then subtotal is :

Subtotal is: (product price ($50) + Logo Creation Fee ($300) + Embroidery Logo Charge($35)) * 2 = $770

But I want to change in subtotal. I want subtotal like this :

Subtotal is: ((product price ($50) + Embroidery Logo Charge($35)) * 2) + Logo Creation Fee ($300) = $470 ($170 + $300)

"Logo Creation Fee ($300)" not vary with quantity, add only one quantity for one product.

Means Product's "Unit Price" display without custom option's price.

Demo URL : http://superbuniforms.com/magento/medical-lab-coat-unisex-sky-blue.html

Please suggest.

Thanks!


texts: Magento Product Review Error after Submitting

texts:
Anyone can help me? Can't figure this out. I'm having a problem about magento product review. It always asking me to "Please specify the quantity of products(s)" after submitting the form.

Thanks for the help


texts: Disable particular modules when using the API route

texts:
Is it possible to disable particular modules when using the API route?
For example, when ordering trough the regular website, people need to select a delivery date, we have a module for that.
We are planning to sell other products that do not require a delivery date. We are planning on selling these items using the Magento API, therefor, the module needs to be disabled when using the API routes.
Has anyone ever experimented with his?


texts: Set Customer Account Link Active (even on sub pages)

texts:
After creating a custom page (and navigation link) in the customer account section, there seems to be an issue with keeping the link active (in the customer_account_navigation block) when going to a sub page.

In other words: I have a custom customer page called 'dealers/orders', when clicked on the link called 'Dealer orders' is highlighted on the right hand side.

However when a dealer clicks on 'order details' which takes them to dealers/orders/orderdetails/id/x the link on the right hand side is not active.

Here is what I tried so far:

Setting the following in my xml for the page:

 <dealers_orders_orderdetails>
    <reference name="root">
        <action method="setTemplate"><template>page/1column.phtml</template></action>
        <block type="customer/account_navigation" name="navigation_dealer">
            <action method="setActive"><path>dealers/orders</path></action>
        </block>
    </reference>
</dealers_orders_orderdetails>

The setActive function is being called (can see it when logging) but it doesn't seem to highlight the desired link.

Any help would be appreciated


texts: how to reset filter on loading a collection in magento custom module

texts:
I have created a custom module in backend to display the search results of 'imei' in  admin grid.

1) below is the  home page to search imei.

2) search result page.

3) after searching i enter the value say for example 23 in imei text field search.

4)now i going back to home page and searching another value.

5)but now i get no records found, but there is records for that particular search.

since this happens, i have to reset filter on loading collection.


texts: Root Catalog has a negative children count, how it is possible?

texts:
I've been playing with the Catalog classes for a while, deleting and importing root categories, subcategories, stores and store groups, and I just discovered that every time I delete a root category the root catalog children count is decreasing.

I get this using $rootCatalog->getChildrenCount() and it has now reached -249.

I must have done something dirty somewhere in my process, but I cannot find the source of this strange behavior.

This is the way I create root categories :

public function createRootCategory($name)
    {
        $parentCategory = $this->_categoryFactory->create()->load(\Magento\Catalog\Model\Category::TREE_ROOT_ID);
        $category = $this->_categoryFactory->create();

        $category->setPath($parentCategory->getPath());
        $category->setStoreId(0);
        $category->setName($name);
        $category->setIsActive(1);
        $category->setDisplayMode('PRODUCTS');
        $category->setParentId(\Magento\Catalog\Model\Category::TREE_ROOT_ID);
        $category->save();

        return $category->getId();
    }

Do you have any clue about the source of this behavior?

Do you know if it may impact Magento in any way?

How do I solve this?


texts: How to flush Magento 1.9.x cache using SSH?

texts: If for some reason I couldn't access my Cache Management page from my Magento Admin, how can I clear cache using SSH?


texts:
I was going to upgrade Magento 1.7 site to Magento 2.0.

But Magento 2.0 has different structure.

Is there a way or tool to do this?


texts: Change "TAX/VAT number" title on account creation page?

texts: I want to remove the VAT portion of the title when creating a new account.


texts: Is the order notification email avaiable by default in Magento 1.9.1 version?

texts: but in magento 1.9.1 the order notification email are available by default ?, because It does not work


texts: Magento 2: How to move the tier price table under the quantity input box on product view page

texts:
I am working on the product catalog page using my customized theme. Is it possible to insert my customized tier_prices.phtml inside my customized addtocart.phtml file? I need to put my tier prices table under the qty input box.

This is what I want to accomplish

This is the  of html codes for each block ( tier_prices and addtocart). Thanks.

Please help. Thanks.


texts:
In my Magento 1.9 store, some of the Customer's Default Billing name and Address
has been amended. I first got to know this when one of my customer complained to me about their name that has been changed in their profile and I thought it was a mistake caused at her side. However, after looking carefully into the store for the past 2 weeks, I can see some of customer names are getting amended.

I can see those customer addressed has also changed to Web agency company that claims to do Magento development (They are not Certified partner).

I have thought long enough to figure out how they have done such a thing, and I am still clueless. The access to DB is limited to localhost only, thus no one can access to DB with public address.

I can see the "Formkey validation on checkout is disabled". can this be the gateway for this security breach?


texts: Customer registration month and day get swapped when day is between 1-12

texts:
I have looked for answers to this issue and found this one. Unfortunately it is incomplete as in the "Manage Customers" table the date is still swapped. The solution provided in that answer fixes only the datetime visible when looking at a single separate customer profile.

Here is an example of the problem:

As far as I see while debugging - Magento records correctly the timestamp before the customer clicks the confirmation link. But after he clicks it the date gets swapped.

Can someone please provide a solution which fixes also the date in the "Manage customers" table?


texts:
I have successfully added "reviews list" and "add review form" to the product page.

Now I just want to completely disable reviews page (http://example.com/review/...)? (so search engines won't accidentally find and crawl it, noindex and canonical aren't an option).

Thank you for help!


texts: Magento2: Custom attribute of category. Add default value in all existing category once we InstallData script

texts:
Here I need to Add defaul value of my custom category attribute in all existing category while I install the script.

here is my code:

<?php

namespace CommercePundit\HtmlSitemap\Setup;

use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\Setup\UpgradeDataInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Framework\Setup\ModuleContextInterface;

class UpgradeData implements UpgradeDataInterface {

private $eavSetupFactory;

public function __construct(EavSetupFactory $eavSetupFactory) {
    $this->eavSetupFactory = $eavSetupFactory;
}

public function upgrade( ModuleDataSetupInterface $setup, ModuleContextInterface $context)
{
    if ( version_compare( $context->getVersion(), '1.0.1', '<' ) ) {

        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);

        $eavSetup->addAttribute(\Magento\Catalog\Model\Category::ENTITY, 'category_sitemap' , [
            'type' => 'int',
            'label' => 'Include in HTML Sitemap',
            'input' => 'select',
            'source' => \Magento\Eav\Model\Entity\Attribute\Source\Boolean::class,
            'default' => '1',
            'sort_order' => 11,
            'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE,
            'used_in_product_listing' => true,
            'visible_on_front' => true,
            'is_used_in_grid' => true,
            'is_visible_in_grid' => true,
        ]);
    }
}
}

And if it is wrong way that what I am doing then please suggest me the way of achieving this.


texts: Programatically generated coupon code not displaying on shopping cart after applied

texts:
I'm creating a coupon code programatically and it works just fine. It makes the coupon code, and the coupon works. It shows up in the back end of magento and is ok. If I go the checkout page, it shows the discount is applied.

However, if I go to the shopping cart page, the coupon will work, but it does not display in the totals.

If I go to the back end of magento, find that coupon code and hit save, then the discount shows up on the shopping cart page. Any idea what's happening?

Here's the bulk of the code:

  public function generatecodeAction(){

  //generate coupon code
  $websitesId = Mage::getModel('core/website')->getCollection()->getAllIds();
  $couponCode = Mage::helper('core')->getRandomString(9);
  $customerGroupIds = Mage::getModel('customer/group')->getCollection()->getAllIds();

  $model = Mage::getModel('salesrule/rule');
  $model->setName('Discount for Hover');
  $model->setDescription('Discount for Hover');
  $model->setFromDate(date('Y-m-d H:i:s'));
  $model->setToDate(date('Y-m-d H:i:s', strtotime('+10 minutes')));
  $model->setCouponType(2);
  $model->setCouponCode($couponCode);
  $model->setUsesPerCoupon(1);
  $model->setUsesPerCustomer(1);
  $model->setCustomerGroupIds($customerGroupIds);
  $model->setIsActive(1);
  $model->setConditionsSerialized('');
  $model->setActionsSerialized('');
  $model->setStopRulesProcessing(1);
  $model->setIsAdvanced(1);
  $model->setProductIds('');
  $model->setSortOrder(1);
  $model->setSimpleAction('by_percentage');//$model->setSimpleAction('by_fixed');
  $model->setDiscountAmount(30);
  $model->setDiscountStep(0);
  $model->setSimpleFreeShipping(0);
  $model->setTimesUsed(0);
  $model->setIsRss(0);
  $model->setWebsiteIds($websitesId);

  $labels = array();
  $labels[0] = 'Default store label';//default store label
  $labels[1] = 'Website id store label';
  $model->setStoreLabels($labels);

  try {
      $model->save();
      //return $model->getData();
      echo json_encode( Array(
          "code" => $couponCode
        )
      );
  } catch (Exception $e) {
      print_r($e->getMessage());exit;
      Mage::log($e->getMessage());
  }

}


texts: Why was get.php and/or `core/file_storage_database` Created?

texts:
Since around version 1.5 or 1.6, Magento's had a file in the root folder named get.php.  This file, using the core/file_storage_data model, allows Magento system owners to serve their product media files directly from blob columns in the the database without having an image file on the file system.  PHP handles sending the file

#File: get.php
function sendFile($file)
{
    if (file_exists($file) || is_readable($file)) {
        $transfer = new Varien_File_Transfer_Adapter_Http();
        $transfer->send($file);
        exit;
    }
}

This is veering into Magento history territory, but why was this feature developed?  It seems — slightly insane.  PHP isn't the most efficient way to serve a file, MySQL's blob storage has a history of being unstable, and even a stable database blob implementation is a pain in the behind to work with, and from what I can see Varien_File_Transfer_Adapter_Http doesn't add any caching headers to these files.

Does anyone know why Magento developed this feature?  Does it actually accomplish whatever goal/problem it set out to solve? Is anyone using it?


texts: adding custom css file priority in magento2

texts:
I have added custom CSS file in custom theme with below code in

  [vendor] / [theme] / Magento_Theme / layout /
  default_head_blocks.xml

 <head>
   <css src="css/custom.css" />
 </head>

I want the custom.css file to load fist before the style-m.css

I tried with order="100" but that doesn't load the CSS file first.

How to make the CSS file to load first? Can anyone help me, Thank in Advance!!


texts: Change color and border width of input fields Magento 2

texts:
I would like to change the color and the border thickness of input fields, but I can't find the way to do this. I've tried to use _extend.less but that doesn't work. It looks like styles-m.css is overriding it. So I think I have to change styles-m.css? I've tried to add a styles-m.less but I can't get it to override. Can anyone help me?

This is what a need:

.block-search input {
    left: -300%;
    margin: 15px 0;
    position: absolute;
    border: 2px solid #296db6;
}


texts: Magento 2 : Custom Layout for Static Page Empty Into Frontend

texts:
I've create a custom layout for static page into Magento 2.
app/design/frontend/VENDOR/THEME/Magento_Cms/layouts.xml

<page_layouts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/PageLayout/etc/layouts.xsd">
    <layout id="customer-service">
        <label translate="true">customer-service</label>
    </layout>
</page_layouts>

app/design/frontend/VENDOR/THEME/Magento_Cms/page_layout/customer-service-layout.xml

<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
<update handle="1column"/>
<referenceContainer name="content">
</referenceContainer></layout>

Now I can select my layout into Design ->Layout of my Static Page but into my frontend, I have a blank white page.

Information:

It doesn't even work if I put my layout code in the Magento_Theme module
If I select another layout of my page everything works properly.
The frontend page doesn't go to 404 page but an empty page with class cms-page-view page-layout-customer-service in the body tag

Can you help me, please?


texts: Filter Shipping Methods Based on Items in Cart

texts:
Is it possible to filter the shipping method(s) available based on the item (or the attribute of an item) in the shopping cart.  To date we have had one type of product that always requires LTL shipping.  Of course this has been simple to accommodate, we just offer the LTL method.

Now we are adding product that can be shipped via a ground carrier (e.g, FedEx or UPS) and would like to offer that method but only when the LTL items are not in the cart.

Is it possible to implement this without custom code?

Running Community 1.6.1.0


texts: Dependent Groups on System Configuration

texts:
I know that to create a dependency for fields it's possible to use the node

<depends />

That said, I've been trying several ways to create a group dependency but I can't seem to find a way to make Magento use it, on the actual Form.php code it mentions

$dependent->fieldset

So it might be there but I haven't been able to leverage it.

Edit: On further investigation it seems it only loops through fields to read dependencies since on Mage_Adminhtml_Block_System_Config_Form::initFields()

foreach ($group->fields as $elements) {

It would still be a good thing to know how to achieve this


texts:
I am trying to add a new container for configurable options in my layout and call the child theme from a custom view.

Here is the part of the code from my view.phtml :

 <?php if ($_product->isSaleable() && $this->hasOptions()):?>
 <?php echo $this->getChildChildHtml('container1', '', true, true) ?>
 <?php endif;?>

Nothing special as it is a default part of magento.

Now looking at the layout we see the following default as well :

<block type="core/template_facade" name="product.info.container1" as="container1">
    <action method="setDataByKey"><key>alias_in_layout</key><value>container1</value></action>
    <action method="setDataByKeyFromRegistry"><key>options_container</key><key_in_registry>product</key_in_registry></action>
    <action method="append"><block>product.info.options.wrapper</block></action>
    <action method="append"><block>product.info.options.wrapper.bottom</block></action>
</block>
<block type="core/template_facade" name="product.info.container2" as="container2">
    <action method="setDataByKey"><key>alias_in_layout</key><value>container2</value></action>
    <action method="setDataByKeyFromRegistry"><key>options_container</key><key_in_registry>product</key_in_registry></action>
    <action method="append"><block>product.info.options.wrapper</block></action>
    <action method="append"><block>product.info.options.wrapper.bottom</block></action>
</block>

and a bit lower for the configurable product :

<PRODUCT_TYPE_configurable translate="label" module="catalog">
Catalog Product View (Configurable)
<reference name="product.info">
    <block type="catalog/product_view_type_configurable" name="product.info.configurable" as="product_type_data" template="catalog/product/view/type/default.phtml">
        <block type="core/text_list" name="product.info.configurable.extra" as="product_type_data_extra" translate="label">
            Product Extra Info
        </block>
    </block>
    <block type="catalog/product_view_type_configurable" name="product.info.availability" as="product_type_availability" template="catalog/product/view/type/availability/default.phtml" />
</reference>
<reference name="product.info.options.wrapper">
    <block type="catalog/product_view_type_configurable" name="product.info.options.configurable" as="options_configurable" before="-" template="catalog/product/view/type/options/configurable.phtml">
        <block type="core/text_list" name="product.info.options.configurable.renderers" as="attr_renderers" />
        <block type="core/text_list" name="product.info.options.configurable.after" as="after" />
    </block>
</reference>

So, what I am trying to do is to create another container product.info.options.wrapper with a different template. So that I could call from my view page $this->getChildChildHtml('container3', '', true, true) or $this->getChildChildHtml('container1', '', true, true) when needed.

Can somebody tell me how to do that?

Thanks a lot (I think my approach is wrong, what I want is to have different option template for different view template)


texts: How do I switch product pages using Ajax?

texts:
I need to implement a button on the product page to switch products (NEXT and PREV) without reloading the page (AJAX or KnockoutJS).

Now I have ID NEXT and PREV product. Please tell me how it can be implemented?


texts: Magento generate Barcode using Zend Barcode

texts:
I'm struggling with barcode generation of Zend framework.
My goal is generating a barcode image then save to product image while saving products.

I'm not sure my code is correct and I have no idea how to save rendered barcode into product image attribute product_barcode_unit

Please can any help me figure out it ?. I really appreciate your helps.

UPDATE:
I currently can generate barcode image while saving product, I used event catalog_product_save_before. But I cannot save barcode image to product gallery images because of this error:

  Warning: Invalid argument supplied for foreach() in
  /srv/magento/foodexporta/production/www/devnew/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Media.php
  on line 329

Here is my code trigger in event:

public function generateBarcode($observer)
    {
        $_product = $observer->getEvent()->getProduct();
        $_params = Mage::app()->getRequest()->getParams();
        $data = $_params['product'];
        if(isset($data['product_barcode_unit'])){
            $barcodeString = (strlen($data['product_barcode_unit']) > 12) ? substr($data['product_barcode_unit'], 0, 12) : $data['product_barcode_unit'] ;
            // Only the text to draw is required
            $barcodeOptions = array('text' => $barcodeString);

            // No required options
            $rendererOptions = array();

            // Draw the barcode in a new image,
            // send the headers and the image
            $barcodeImage = Zend_Barcode::draw(
                'ean13', 'image', $barcodeOptions, $rendererOptions
            );

            $path = Mage::getBaseDir('media').DS."Barcode".DS.$_product->getId()."-barcode-unit-".$barcodeString.".png";

            $store_image = imagepng($barcodeImage,$path);

            if($store_image)
            {
                try {
                    $_product->addImageToMediaGallery($path, 'product_barcode_unit', true, false);
                    $_product->save();
                } catch (Mage_Core_Exception $e){
                    Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
                }
            }
        }
        return $this;
    }

I'm really grateful for your help.
.


texts:
i have a problem with a client of mine using magento shop.
he have on google a catalog search result url, the system isnt using canonical in the settings, and i dont want to apply it as some of the url having high rank on google...

but their description is the default one... is there away to make a dynamic descriptions to those search result, for example, to have a static sentence and a dynamic word add.

like: "XXX have the best [dynamic word] in the world, come and buy it now", the [dynamic word] will come from the title tag...

what file should i edit to do it and where can i find it? :)

thanks.


texts:
Please provide me the suggestion regarding magento 2 store speed up?
I already set the minified js and css from the admin panel.

Also find too many request in the browser, how can we reduce server request in magento 2.

Please explain how magento 2 caching work?


texts: How do I add canonical or any meta head in Magento 2 via CMS Layout XMLs?

texts:
I have a custom CMS page with the url of /test

I tried pasting this in the Layout Update XML under Page Layout AND also tried under the Custom Theme Layout Update XML.. both options do not work

<referenceContainer name="before.body.end">
    <block class="Magento\Cms\Block\Block">
        <arguments>
            <argument name="block_id" xsi:type="string">sale_campaign_canonical</argument>
        </arguments>
    </block>
</referenceContainer>

This sale_campaign_canonical is a static block available on all storefronts and has

<link rel="canonical" href="/test" />

Inside of it

Thanks


texts: Difference between Factory vs ObjectManager while instance object

texts:
I have some confusion while use Factory pattern vs new instance object.

What difference between them?

$object = objectManager->create() vs objectManager->create('ObjectFactory')

what benefits in cases when create object by Factory.

This thread may be large but I need core team members to help me clearly minds


texts: setRenderer() on a grid column broke backend page

texts:
Scenario
I'm overriding a grid and in the _prepareColumns() I would like to replace a column renderer with custom one.

Because the column already exist I'm using getColumn() and the setRenderer() method, the issue is that this action is breaking the backend page.

I cannot find any exception/report/log ... so I'm a bit lost.

here the code

 protected function _prepareColumns()
    {
        parent::_prepareColumns();
        $this->getColumn('in_products')
            ->setRenderer('MYMODULE/catalog_product_edit_tab_super_config_grid_renderer_checkbox');

        return $this;
    }


texts: Magento2: How to get product collection by attribute or category id?

texts:
How to get product collection by multiple attributes?

Magento 2.0


texts: Sql query to return list of confirmed customer email, customer name

texts: Please help me with the mysql query to display list of all confirmed customer from my magento db


texts:
I have the below code, figuring out how knockout works... It seems I can't use any php inside . So how do I access the base URL or specific URLs? Sorry couldn't find anything in the documentation about working with this.

                 <a class="customer-name" href="<?php echo $block->getUrl(''); ?>customer/account/logout">
                    Sign Out

                <a class="customer-name" href="<?php echo $block->getUrl(''); ?>customer/account/login/">
                    Sign In


texts: How to make the "General" menu option selected by default in Magento admin?

texts:
When I install a new extension, that extension options are set to be selected by default on the side menu, and I would like to set the "General" menu option as selected regardless of any extension, just for convenience.

How to?


texts: Filter customers by custom attribute in admin grid

texts:
I added custom attribute to customer and now I want to filter customers by that attribute in admin grid (admin->customers). I want to user see only customers which custom attribute has specific value.

Filtering should be done before loading all customers, not with Filters button.

To be more specific, I just need a way to dump some rows from customers list based on some condition.


texts: Call to undefined method Mock_AbstractDb_87c49d8f::setStoreId() on getCollection() in Test

texts:
I am trying to create a test to see if

What is the equivalent of the config node category/collection/attributes in Magento 2 to add an attribute to the category collection

works.

I use a integration test (unfinished code)

class CatalogAttributesTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @var \Magento\Catalog\Model\Category
     */
    protected $category;

    protected function setUp()
    {
        $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this);
        $this->category = $objectManager->getObject('Magento\Catalog\Model\Category');
    }

    protected function tearDown()
    {
        $this->block = null;
    }

    public function testRedirectUrlAttributeIsThere()
    {
        $this->category->getCollection();
    }
}

On test execution I get

PHP Fatal error:  Call to undefined method Mock_AbstractDb_87c49d8f::setStoreId() in ..../vendor/magento/module-catalog/Model/AbstractModel.php on line 227

Trace

PHP  10. ReflectionMethod->invokeArgs() /home/self/mestrona/workspace/proofgigant.de/vendor/phpunit/phpunit/src/Framework/TestCase.php:951
PHP  11. Mestrona\CategoryRedirect\Test\Unit\CatalogAttributesTest->testRedirectUrlAttributeIsThere() /home/self/mestrona/workspace/proofgigant.de/vendor/phpunit/phpunit/src/Framework/TestCase.php:951
PHP  12. Magento\Framework\Model\AbstractModel->getCollection() /home/self/mestrona/workspace/proofgigant.de/vendor/mestrona/magento-module-categoryredirect/Test/Integration/CatalogAttributesTest.php:24
PHP  13. Magento\Catalog\Model\AbstractModel->getResourceCollection() /home/self/mestrona/workspace/proofgigant.de/vendor/magento/framework/Model/AbstractModel.php:517

I use the phpunit.xml from dev/tests/integration/phpunit.xml.dist and the database seems to be set up (2 minutes delay when starting up)

It does not seem to use the real integration test database?
What am I doing wrong?

Using the unit/phpunit.xml.dist produced the same result.


texts: Re-import images for multi-store with maintained image roles

texts:
I have an existing web site with thousands of products. I have several storefronts and all products are available on all stores using the same product images with the same image role settings (i.e. base, small, thumbnail).

I have produced new product images for a subset of the products and want to replace the existing product images in Magento with these new images.

I created an import file with SKU and references to the new images. After running the import, all product images changed to the new versions as expected. The problem though, is that the image roles were not maintained for the storefronts, only for the default view. So, for instance, the image intended as a thumbnail is no longer set as a thumbnail for the storefronts.

To resolve this I tried creating individual import files for each storefront (by including store_view_code and not only SKU as above) where I re-import the product images. This was successful and the image role is now set for the storefront. BUT, the import also resets the product URL back to the default URL and thus makes the product unavailable on the old storefront URL. The product URL was not included in the import. If I do include it, it does set it to what is in the import file and not the default but I don't want to have to include the URL in my image import. Changing the URL on storefront imports even though this column is not included must be some core Magento bug.

So, my question is if anyone knows of a way to import images for a multi-store setup which maintains the image roles for all storefronts. Either by making the default import role settings apply to all storefronts or by making a storefront import not change the URL or through some other way.


texts: Magento 2 | Add custom attribute for orders

texts:
I want every order to have a custom attribute called "Fremdnummer".

How can I do that using InstallData? I just know how to add custom customer attributes.


texts: How to create custom event and observer?

texts:
I know about how to use Magento 2 core events. But I want to know how to create custom events and how to override the controller.

advance thanks


texts: Magento 2 - Get order custom attribute data using rest api

texts:
While i am trying to get order custom attribute data using rest api it's coming as string. But magento returning all other data as JSON. Does anyone have any idea how to make this look like json?

Actual result:

extra_fee": [
        "{\"code\":\"mp_extra_fee_rule_2_auto\",\"title\":\"Credit Card Surcharge\",\"label\":\"Credit Card Surcharge\",\"value\":17.22,\"value_excl_tax\":17.22,\"value_incl_tax\":17.22,\"base_value\":17.22,\"base_value_incl_tax\":17.22,\"rf\":\"0\",\"display_area\":\"3\",\"apply_type\":\"1\",\"rule_label\":\"Credit Card Surcharge\"}",
        "{\"code\":\"mp_extra_fee_rule_3_option_0\",\"title\":\"110\",\"label\":\"110\",\"value\":1148,\"base_value\":1148,\"value_incl_tax\":1148,\"value_excl_tax\":1148,\"base_value_incl_tax\":1148,\"rf\":\"0\",\"display_area\":\"3\",\"apply_type\":\"2\",\"rule_label\":\"Manage Titles Discount\"}"
    ]

Expected Result:

extra_fee": [
    {
    "code":"mp_extra_fee_rule_2_auto",
    "title":"Credit Card Surcharge",
    "label":"Credit Card Surcharge",
    "value":17.22,
    "value_excl_tax":17.22,
    "value_incl_tax":17.22,
    "base_value":17.22,
    "base_value_incl_tax":17.22,
    "rf":"0",
    "display_area":"3",
    "apply_type":"1",
    "rule_label":"Credit Card Surcharge"
    },
    {
    "code":"mp_extra_fee_rule_3_option_0",
    "title":"110",
    "label":"110",
    "value":1148,
    "base_value":1148,
    "value_incl_tax":1148,
    "value_excl_tax":1148,
    "base_value_incl_tax":1148,
    "rf":"0",
    "display_area":"3",
    "apply_type":"2",
    "rule_label":"Manage Titles Discount"
    }
]


texts: Category Name and URL Key issue / Admin / Migration from 1.9.1.0 to 2.4.2

texts:
I'm facing an issue further to data migration from magento 1.9.1.0 to 2.4.2 in Admin > Store / Configuration / Category
Categories name and url_path are in the database, Category name also.
Category names are well displayed in navigation tree on the left but Category Name field and Search Engine Optimization > URL key remain empty...(see pic)
All categories url are broken (404) on front store

When I try update data manually in empty fields, I've Error on save : "URL key for specified store already exists." cannot save category" with empty url '.html'

Of course all reindex, cache flushing etc have been ran.
If you have an idea to fix it, that would be great !


texts: Magento Security Report TLSv1.0 Vulnerability

texts:
I scanned my site from the New Magento Security Tool available from magento partner portal.

The report showed me two Vulnerability issues

1) SSL TLS - Your server supports TLSv1.0. Please update your configuration to discontinue TLSv1.0 support.

What is TLSv1.0?
Should I disable this? Will this effect my site any how.
If Yes how can I disable it?

2) Magento Brute Force - One or more Brute Force checks failed. This exposes you to Brute Force attacks. Your Magento installation's admin panel was discovered at a common URL.

My site is not using any common url such as admin or backend still this gives me such error why? what is the best practise for keeping an admin url. Magento suggest admin_SOMERANDOMSTRING. is it so? Should we keep same?


texts: 'Ground' not appearing in FedEx shipping method magento

texts:
I am using magento community version 1.8.1. I am using FedEx for shipping method.

I enabled several method like 'First Overnight','2 Day','Priority Overnight','Standard Overnight','Ground' and 'International Ground' from admin.

But only four are appearing in front end. 'Ground' and 'International Ground' is not appearing.

Can anyone help me on this ?


texts: if a particular filter is applied in the category page then I have to exclude that filter and send another filter with its item count is that possible?


texts:
I need to call the controller function from block . in magento 2 i use the registry.
In my block i wrote

public function __construct(
        Template\Context $context,

        \Magento\Catalog\Model\CategoryFactory $categoryFactory,
        \Magento\Backend\Model\Session $session,
        \Magento\Framework\Registry $registry
    )
    {
        $this->_categoryFactory = $categoryFactory;
        parent::__construct($context, $data);
        $this->_cardsManageFactory = $cardsManageFactory;
        $this->session = $session;
        $this->_registry = $registry;
    }
public function getMydata()
{
 return  $this->registry->registry('controller_data');}

in my admin controller i wrote

 public function __construct(
        \Magento\Backend\App\Action\Context $context,
        \Magento\Framework\Controller\Result\JsonFactory $resultPageFactory,
        \Magento\Framework\Registry $registry
    ) {
        parent::__construct($context);
        $this->resultPageFactory = $resultPageFactory;
        $this->_registry = $registry;
    }
public function execute()
{
     .....
     ......
     .....  some calculation did here
     $response = $calculation;
     $this->registry->register('controller_data', $response);
}

while i call block from phtml

$data = $block->getMydata();

i got error Notice: Undefined property:


texts:
I have below cron on server.

* * * * * php /var/www/html/magento/update/cron.php >> /var/www/html/magento/var/log/update.cron.log

In log file it only says

  Cron readiness check failed


texts:
I am in the admin and my structure of the scopes is the following:

-> Default
----> Website A
--------> Store DE
--------> Store FR
----> Website B
--------> Store DE
--------> Store FR

So, now I am simply reloading the page and in the _afterLoad() method, in my custom Model, which extends the core backend model where, which redirects to my _afterLoad method, I want to get the ID of the current website, that I am loading (when I change the Scope from the upper left drop-down menu).

Mage::app()->getWebsite()->getId() does not help, because it always returns 0. I can get the store code, when I am loading one of the store scopes, and from this get their IDs, but the websites don't have codes, so this cannot help me either.
Mage::getModel('core/website')->getWebsite->getId() does not work either.

I know that the IDs of website A and website B are respectively 1 and 2, but I don't know how to acquire them, when I am in the admin.


texts:
We are using Community Edition 1.9.2.4

We are looking for a plug in or add on, to create image maps that have multiple links attached.

Something similar to www.decori.co.uk/designs/


texts: Magento 2: Update Billing Address info fields

texts:
Sometimes, when the checkout loads, the Region input field is out of position and is placed before all of the other inputs (before firstname input field) in both the Shipping Step (Shipping address) and Payment Step (Billing address).

  To fix this for the Shipping address fieldset, I specified the Region field sort order in the checkout_index_index.xml thus:

...
<item name="steps" xsi:type="array">
    <item name="children" xsi:type="array">
        <item name="shipping-step" xsi:type="array">
            <item name="children" xsi:type="array">
                <item name="shippingAddress" xsi:type="array">
                    <item name="children" xsi:type="array">
                        <item name="shipping-address-fieldset" xsi:type="array">
                            <item name="children" xsi:type="array">
                                <item name="region_id" xsi:type="array">
                                    <!-- Place the Region input above City and Post Code -->
                                    <item name="sortOrder" xsi:type="string">70</item>
                                </item>
                            </item>
                        </item>
                    </item>
                </item>
            </item>
        </item>
    </item>
</item>
...

I'd also like to specify the sort order for the Region of the Billing Address, but I can't seem to find where to update the sort order for region.

Anyone know where it'd be, or the xml structure I'd need to add to the checkout_index_index.xml?


texts:
I am unable to 301 redirect URL like

  baseurl/blog/international%20enviroguard%20re-branding%20-%20faqs/ to baseurl/blog/international-enviroguard-re-branding-faqs through htaccess.

The page is going to 404 redirect.

I am using the below line to redirect in htaccess -

  Redirect 301 /blog/international%20enviroguard%20re-branding%20-%20faqs/ /blog/international-enviroguard-re-branding-faqs

Please provide a solution.


texts: The management licensing in Magento 2 is only a white page

texts:
Recently I've installed two extension:
Ves Megamenu
Mirasvit ElasticSearch

The installation and upgrading was successful, but...
Entering on my admin panel to enter the key license for my both extensions,
I noted the page only shows a white space as the pic:

I followed this page to install them.
After search many ways to solve it, I have no clear how to solve it.
Someone also happened same?
thank you!


texts:
We currently have the problem that Magento2 renders wrong in IE11 and IE10.

This Screenshot has been made with IE11 settings in Safari. On our Windows Machine it renders the same (as well IE11).

The free space has the following structure and styling:

...

With this CSS:

.ie11 .page-wrapper #maincontent {
    display: block;
    background-color: white;
    height: 100px;
    max-height: 100px;
    min-height: 100px;
    overflow: hidden;
    z-index: 0;
}

The elements in between main are set to display:none;

What can I do to hide this element completly? The slider should be on the edge of the end of the menu.

Second problem:
On the product pages the footer comes to the viewport bottom: 0px.

Example:

The CSS for this element is:

.ie11 .page-footer, .ie10 .page-footer  {display: inline-block; bottom: 0px; width: 100%; clear:both;}

Please advise how to solve this problems.


texts: Magento 2. First line of php (related to action) that exectutes after Place Order is clicked

texts:
I wish to know more about the place order process.

Now I know that everything goes through index.php etc.

I'm looking for the first line of php or at least Entity:method that is handling  place order

For example if a controller would handle this action it would be Controller:execute

Thank you.
FWI: One Page Checkout is set.


texts: Magento2 : Use another email template for order confirmation on non working days

texts:
I wonder if there is a build in magento module which manages emails for non working days. The email sent on non working day will be different than the email sent on working day.

If no module exist, please guide me to the recommended way to do it.


texts: Magento 2 - How to add a custom store config in an existing tab?

texts: I follow this link to add a new tab in config. Is there a way to add a custom config section in an existing tab for Magento 2?


texts: How to get customer group id into magento2 graphql

texts:
How to get customer group id into graphql magento2

Note: Only in GraphQL


texts: Magento 2 Get product options id for sql query

texts:
I have this query:

SELECT * FROM `sales_order_item` WHERE `product_options` LIKE '%2010%'

With the last bit being the decoded option id, I need to find two specific option ids to use inside this query.

My problem is that I can't load the options to be decoded.

json_decode($product->getOptions());

I've tried the above and got an error stating I'm using a object when it needs to be a string.

I need to be able to get the option ids from the decode json to filter the products ordered in the database with those option values.


texts: How to sent custom email to admin in Magento 2

texts:
I want to send custom email to admin from remainder for products update using mobile app.
Please help how to send custom email to admin using rest api.


texts: How to check "Set Product as New" in magento2(EE)?

texts:
I want to check "Set Product as New" from list.phtml in magento2(EE)?

I have tring to below methods:

$_product->getData('is_new') //not working
$_product->getIsNew() //not working

Anybody have any solution for this issue.


texts: Magento 2.2 How to show out of stock in configurable product

texts:
this may be a simple question for some - but we havent used stock extensions before.

Question: how can we easily, simply, add the ability to - instead of hiding out of stock simple products (as part of a configurable product) - show out of stock simple products with the addition of "- out of stock" & maybe greyed out in the drop down.

For example:

We sell T-shirts in sizes S, M, L. And for instance L is sold out.

Instead of only showing S, M (in config product)

Showing S, M, L - out of stock (in config product, and out of stock in grey)

this link magento 1.9 version

Now i check magento latest version 2.2.3 not working


texts: Problem with tables rate - he does not show in frontend

texts:
I have today written and uploaded a tables rate guess.
Unfortunately, everything works but i cannot choose Austria?
Maybe something must be separately enabled?

I want to do is:
Shipping Germany - 0- 49.99€ - 4,90€ shipping cost
Shipping Germany - From 50€ - Free shpping
Austria - at the beginning 16€ shpping costs

The code is:

Land,Region/Bundesland,PLZ,"Zwischensumme (und mehr)",Versandpreis
DEU,,,0.0000,4.9000
DEU,,,49.9900,0.0000
AT,,,0.0000,16.0000

( there is a star between the commas but it will not Show here in the Forum)

I have item with 7% and 19% tax - maybe is this a Problem?
I have uploaded the csv. file - after the upload i tried to buy something but they don´t Show me other Shipping costs and i cannot choose Austria.

Thanks for help.

Daniel


texts: How to migrate Magento CE database to Magento EE?

texts: I'm upgrading from Magento CE (1.9.x.x) to Magento EE. How can I migrate the database? My major concern is with moving Customers, Orders, Products & Categories. I do not wish to use any additional "paid" extensions for migration of data.


texts: How to add pagination in wishlist index page in Magento 2?

texts:
I currently have issue that i have to add pagination in wishlist page.
Is there a way to that since it isn't using a direct collection.

Thanks!


texts: how to add coupons Limit to a single customer do not use multiple coupon on same cart

texts:
how to set rule for customer so he do not use multiple coupon on same cart.

Customer can apply only one coupon code at a time. I dont want to give access to use another coupon code. (You can use only one coupon code).


texts: Adding a custom area for blocks in a custom layout

texts:
Ok, So I've made a module and use it to manage all the custom layouts on my store. Now I need to just add some blocks to certain pages using the template. I added the following line to my custom layout:

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

And inside the Update Layout XML I added the following:

<reference name="cms_left">
    <block type="cms/block" name="cms_left_test" before="-">
        <action method="setBlockId"><block_id>cms_left_test</block_id></action>
    </block>
</reference>

And encase its relevent here is part the relevant part of my moudles config.xml that handles this custom layout:

<cms_pages module="page" translate="label">
    <label>cms pages</label>
    <template>page/cms_pages.phtml</template>
    <layout_handle>cms pages</layout_handle>
</cms_pages>

From what I know this should now display the cms_left_test block on this page, however it;s not working. Have I missed out a step somewhere? I tried looking up some examples, but because I'm drawing bits and pieces from all over I'm not sure if my approach is totally correct.


texts: Magento2.3 - Can't Import product CSV file

texts:
I can't import CSV file. Got error https://prnt.sc/u0e9tr
Data validation failed. Please fix the following errors and upload the file again.
Number of columns does not correspond to the number of rows in the header in row(s): 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52

Checked rows: 52, checked entities: 52, invalid rows: 52, total errors: 52

CSV file: https://drive.google.com/file/d/1nvkVjHkydxOA3Y128Hyw1MxOFTzxDGfl/view?usp=sharing


texts: Preference for ConvertToCsv not working in custom module

texts:
I have below code in my di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
   <preference for="Magento/Ui/Model/Export/ConvertToCsv" type="Abc/CustomChanges/Model/ConvertToCsv" />
</config>

In my ConvertToCsv class

    <?php

    namespace Abc\CustomChanges\Model;

    /**
     * Class ConvertToCsv
     */

    class ConvertToCsv extends \Magento\Ui\Model\Export\ConvertToCsv
    {

      public function getCsvFile()
      {
         echo 'qqq'; exit;
      }
    }

I have enabled the module and try to export order csv. it should echo and exit but it is not.


texts: 2 modules extending the same classe / phtml : Do I have to merge them?

texts:
I need to install two modules that extend the same magento classes / phtml files. Is it possible to install them both without generating conflicts, or do I need to merge them in a single module?

First module :

   class Aijko_CustomOptionDescription_Block_Adminhtml_Catalog_Product_Edit_Tab_Options_Option
extends Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Options_Option
    {
        public function __construct()
        {
            parent::__construct();
            $this->setTemplate('aijko_customoptiondescription/catalog/product/edit/options/option.phtml');
        }

Second one :

<?php
class Mine_Custoptiontypev5_Block_Adminhtml_Catalog_Product_Edit_Tab_Options_Option
        extends Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Options_Option
    {
        /**
         * Class constructor
         */
        public function __construct()
        {
            parent::__construct();
            $this->setTemplate('custoptiontypev5/catalog/product/edit/options/option.phtml');
        }


texts: How to keep the form fields filled in case of validation error Magento 2

texts:
I have created a custom module for Distributor registration its having a custom form with some extra fields for registration. Distributor registration is working fine but i am not able to retain the form filed value in case there if there is server side validation error.

I have tried to followed customer registration module and form and found that Magento keeps the value in session like this.

in CreatePost.php controller

$this->session->setCustomerFormData($this->getRequest()->getPostValue());

and retaining the form value by bellow line of code in form.

<?php echo $block->escapeHtml($block->getFormData()->getCity()) ?>

Is there any other way i can use to keep the form filled in case of validation error ?


texts:
How can I call model in a custom module? I have a module and I want to create new model in that and use function from model to controller.
my model structure is

local>Mypackage>Myenquiry>Model>Mysql4>Myenquiry>Collection.php

There is function colletion in Collection.php. I want to call that function in my controller.But i don't know how to declare this model in config file and how to call it in controller


texts: Magento 2 - Is it possible update payment method of order programmatically?

texts: Is there a way to update payment method of order in magento 2 via dependency Injector or Object factory without using raw sql query?


texts:
I was able to get my custom font to my custom theme.

I made a style (CSS file) to use it, but the text-transform and letter-spacing attributes are being inherited from another style sheet?

What do I need to do to make sure that my ss_logo style always wins?

Please forgive my ignorance. I haven't done any web-type development for over 10 years.


texts: Invalid Form Key. Please refresh the page?

texts:
I am unable to save the product in Magento 2.

It shows "Invalid Form Key. Please refresh the page. in local

how to resolve this?


texts: Magento makes 307 redirect to HTTPS instead of 301

texts:
I have set my whole frontend to use HTTPS. But in the headers I see that if I go to http://example.com Magento redirects me to the HTTPS version using 307 redirect. I tried to change this by setting in .htaccess:

RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

but it didn't help.

What should I do to make Magento use 301 redirect instead of 307?

(I am using CE 1.9.1.0)


texts: Error Class Magento\Customer\Model\Resource\Attribute\Collection does not exist after composer update from Magento2 beta4 to RC

texts:
I upgraded (via composer.phar update) from beta6 to RC. When running php bin/magento setup:upgrade I am getting the following error now:

[...]
Data install/update:
Module 'Magento_Store':
Module 'Magento_AdvancedPricingImportExport':
Module 'Magento_Directory':
Module 'Magento_Theme':
Module 'Magento_Backend':
Module 'Magento_Backup':
Module 'Magento_Eav':
Module 'Magento_Customer':
Upgrading data..

    [ReflectionException]
    Class Magento\Customer\Model\Resource\Attribute\Collection does not exist

After the DB Update (see partial solution) I get:

Upgrading data..

[ErrorException]
Undefined offset: 1

With the -vvvv option:

Exception trace:
 () at /home/self/example/workspace/example.de/vendor/magento/module-customer/Setup/UpgradeData.php:335
 Composer\Util\ErrorHandler::handle() at /home/self/example/workspace/example.de/vendor/magento/module-customer/Setup/UpgradeData.php:335
 Magento\Customer\Setup\UpgradeData->upgradeHash() at /home/self/example/workspace/example.de/vendor/magento/module-customer/Setup/UpgradeData.php:232
 Magento\Customer\Setup\UpgradeData->upgrade() at /home/self/example/workspace/example.de/setup/src/Magento/Setup/Model/Installer.php:786
 Magento\Setup\Model\Installer->handleDBSchemaData() at /home/self/example/workspace/example.de/setup/src/Magento/Setup/Model/Installer.php:746
 Magento\Setup\Model\Installer->installDataFixtures() at /home/self/example/workspace/example.de/setup/src/Magento/Setup/Console/Command/UpgradeCommand.php:72
 Magento\Setup\Console\Command\UpgradeCommand->execute() at /home/self/example/workspace/example.de/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:257
 Symfony\Component\Console\Command\Command->run() at /home/self/example/workspace/example.de/vendor/symfony/console/Symfony/Component/Console/Application.php:874
 Symfony\Component\Console\Application->doRunCommand() at /home/self/example/workspace/example.de/vendor/symfony/console/Symfony/Component/Console/Application.php:195
 Symfony\Component\Console\Application->doRun() at /home/self/example/workspace/example.de/vendor/magento/framework/Console/Cli.php:49
 Magento\Framework\Console\Cli->doRun() at /home/self/example/workspace/example.de/vendor/symfony/console/Symfony/Component/Console/Application.php:126
 Symfony\Component\Console\Application->run() at /home/self/example/workspace/example.de/bin/magento:25


texts: Magento 2 create new page header section

texts:
I am new to Magento2 and I am confused how to proceed when I want to rewrite default part of the Luma theme page completely. For example the header - I want to rebuild it from scratch, adding whatever I want in it. Can someone share a brief list of what is the best way to approach this. I already did all of this -

http://magento.stackexchange.com/a/102359/36102

After that I created a new module in

app/code/MyVendor/MyTheme

registered it and everything. I put the dependency that MyTheme depends on Magento_Theme. After that I am a bit lost as how should I proceed re-writing the

vendor/magento/magento-theme/Block/Html/Header.php

What is the best approach for that. Can someone give detailed list of steps like:

1)Create Custom module MyVendor_MyTheme
2)extend or re-declare Magento_Theme..
3)Create app/code/MyVendor/MyTheme/Block/Html/Header.php

And so on and so on, so I can re-write

vendor/magento/magento-theme/Block/Html/Header->getWelcome();

functionality and link it to

app/design/frontend/{Vendor}/{theme}/MyVendor_MyTheme/templates/html

so it can use the functionality from MyTheme module block and the template for the header.phtml file I've set in

app/design/frontend/{Vendor}/{theme}/MyVendor_MyTheme/templates/html/header.phtml.

Thank you.


texts: Invalid form key while making an ajax request in Admin panel in Magento 2.3

texts:
I have Magento 2.3 installed, and I'm trying to create a small form in sales_order_view.xml and saving the form using ajax.

Following is the code

  XYZ/Sales/view/adminhtml/layout/sales_order_view.xml

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

        <referenceContainer name="order_additional_info">
            <block class="XYZ\Sales\Block\Adminhtml\Order\View\XYZBlock" name="sales_order_view_xyz" template="order/view/xyz.phtml" after="-"/>
        </referenceContainer>

</page>

  XYZ/Sales/Block/Adminhtml/Order/View/XYZBlock.php

<?php
namespace XYZ\Sales\Block\Adminhtml\Order\View;

use \Magento\Backend\Block\Template;
class XYZBlock extends \Magento\Backend\Block\Template
{

    public function getAjaxUrl()
    {
        $this->getUrl('itdsaleslocation/storelocation/index');
    }

}

  XYZ/Sales/view/adminhtml/templates/order/view/xyz.phtml

                    <?= /* @noEscape */ __('Some Field') ?>

                    <input  name="somefield"
                            type="text"
                            id="somefield"
                            class="input-text admin__control-text"/>

                        Save

  XYZ/Sales/etc/adminhtml/routes.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="admin">
        <route id="itdsaleslocation" frontName="itdsaleslocation">
            <module name="XYZ_Sales"/>
        </route>
    </router>
</config>

  XYZ/Sales/Controller/Adminhtml/StoreLocation/Index.php

<?php

namespace XYZ\Sales\Controller\Adminhtml\StoreLocation;

use Magento\Backend\App\Action;

class Index extends Action
{
    public function __construct(Action\Context $context)
    {
        parent::__construct($context);
    }

    public function execute()
    {
        $arr = array();
        $arr[0] = 'hello';

        echo json_encode($arr);
    }
}

When I click the save button I get the response as

How to submit ajax successfully?


texts: How can i subscribe newsletter in Magento2 using REST API

texts: I am developing react-native application. Is there any REST API for subscribe newsletter in Magento2.


texts:
I have shown root category on frontend and all the products are coming fine. But the filters are not showing in the sidebar. I have used layout 2 column left.

<reference name="content">

<block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">
<action method="setCategoryId"><category_id>2</category_id></action>
<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
<block type="page/html_pager" name="product_list_toolbar_pager"/>
</block>
<action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
</block>

</reference>
<reference name="left">
    <block type="catalog/navigation" name="catalog.leftnav.categories" template="catalog/navigation/sidebar.phtml"/>
    <block type="catalog/layer_view" name="catalog.leftnav" template="catalog/layer/view.phtml">
        <action method="unsetChild"><alias>category_filter</alias></action>
    </block>

Can anyone help and share how to call filters. It is actually calling just the heading. The category is is anchor yes.


texts: Magento - $product->loadByAttribute('sku', $sku) not working

texts:
I'm running into an interesting problem....

When trying to load products using Mage::getModel('catalog/product')->loadByAttribute('sku', $sku); it returns false.

Using Mage::getModel('catalog/product')->load($id); works.

I've checked and confirmed the following:

Sku exists (var_dumped it and used it in admin search grid and product comes up)
Tried getSkuById from both the model and resource model and it returns false

What can be next steps

EDIT

Using the resource model does not work - this was the solution to the 'possible duplicate' question.

This seems to be a APC caching issue since on my local environment the code works just fine.

What steps can I take to 'hole punch' apc for this script? (or does that not make sense)


texts:
I wish to create a a grid inside a tab that is located on customer edit.

I found something similar on product edit (see screenshot)

The problem is that product edit is build via ui components when customer edit is built with php blocks (does not support ui components, I've tried)

Any pointers are highly appreciated.
I don't need the full solution just tell where to look or what to search exactly. Cheers.


texts:
How to add cookiebot Cookie Declaration in Magento 2.4.0
<script id="CookieDeclaration" src="https://consent.cookiebot.com/00000000-0000-0000-0000-000000000000/cd.js" type="text/javascript" async></script>


texts:
I have had this problem for some time now, I import new products using MAGMI and after re-indexing and cache clearing the products do not display on the front end in the respective category pages.  They products are enabled, in stock have multiple sizes and colors but they do not display.

Everything used to work fine and they would show up accordingly, I feel like I'm missing something simple but has anybody seen this problem before or know how to fix it?

Mike


texts: Magento 2 How to cancel invoiced order forcefully

texts: I need to forcefully cancel the order even though invoiced is done. How to do that?


texts: Magento 2: Get total no. of colors available of Configurable Product

texts:
I have configurable product which is combination of color and size. I have to get total no. of colors for the configurable product on the listing page.

I am able to get all the child products but not getting exact total of available colors.

There are 15 colors and 3 sizes so total child products is 45. I have to get total no. of colors.

Please give me some solution.


texts: magento 1.9 while sending invoice email i wanted to send the track shipment how can i do that

texts:
I have a problem with Magento 1.9. I came across functionality where I have to send the shipping status when I am sending the invoice email to the customer.
How can I add the track shipping functionality in the invoice email?
Thanks in advance.


texts:
I want to apply the 10% discount option for two of my products for which it has to show that on online purchase it show the discounted price in the invoice that will be generated for the product.

how can this be resolved ?


texts: Magento 2 - Transactions associated with old order numbers

texts: I have had a few transactions show up in both Paypal and Stripe that look great on the merchant side, but the order number associated with them is from an older order that the customer placed. For example, I had a customer place an order today and the transaction came through just, but has an order number assigned to it from 3 months ago. This makes magento not create a new order because the order number already exists. I am not sure where to start looking to find the issue. Any help would be greatly appreciated.


texts: Magento 2 : How To Add Search By Category In Advanced Search?

texts:
On advanced search page, “search by category” is not an option by default.

I know links for magento-1

1)add-search-by-category-in-advanced-search-in-magento-1

2)add-search-by-category-in-advanced-search-in-magento-1

How to do it in magento 2?


texts: How to disable Order cancel button in order view page in Magento admin?

texts:
I want to disable the cancel order button from Magento admin order view page as well as from order grid page.

Though I know using the Roles we can disable this but I want to do this for some specific condition for a role.

So I am trying the code mentioned on the following link https://stackoverflow.com/questions/32788869/how-to-prevent-an-order-from-getting-cancelled-using-event-observer on stackoverflow.com
Though the code does not hide the cancel button it try to prevent the order being cancel. But the code is not working for me and order is still canceled.

1) Do we have any approach using event observer to disable the particular button on order view page as well as order grid.

2) Do I need to override the core/Mage/Adminhtml/Block/Sales/Order/View.php file?

Please suggest some solution for same.


texts: Magento 2: Add child div containing all items in columns

texts:
Below is my html struture of 2-column layout,

        ------

        ------

i want to add add child div to colum that contains all items in it , my new struture to be like

            ------

            ------

I tried below code but it does not work

<referenceContainer name="columns">
    <container name="newcontinaer" htmlTag="div" htmlClass="newcolumns" before="-" />
</referenceContainer>

Based on one answer in stackexchange i tried below, but is is not as expected

<referenceContainer name="columns">
    <container name="columns.main" htmlTag="div" htmlClass="column main" before="-" />
</referenceContainer>
<referenceContainer name="main" htmlClass="newcolumns" />
<move element="main" destination="columns" />

how to fix it

AFter suggestion from Sukumar Gorai i created 2columns-left.xml and it works fine , but instead i want to create new layout teamplate and assign same to my category i tried as below but it does not works

my html structure after this was like

            Blank sidebar filter moved to column main

Layout.xml

<?xml version="1.0" encoding="UTF-8"?>
<page_layouts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:noNamespaceSchemaLocation="urn:magento:framework:View/PageLayout/etc/layouts.xsd">

    <layout id="2columns-left-product">
        MY Product
    </layout>

</page_layouts>

2columns-left-product.xml

<?xml version="1.0"?>
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
    <update handle="1column"/>
    <referenceContainer name="columns">
        <container name="newcontainer" htmlTag="div" htmlClass="newcolumns">
            <container name="div.sidebar.main" htmlTag="div" htmlClass="sidebar sidebar-main" after="main">
                <container name="sidebar.main" as="sidebar_main" label="Sidebar Main"/>
            </container>
            <container name="div.sidebar.additional" htmlTag="div" htmlClass="sidebar sidebar-additional" after="div.sidebar.main">
                <container name="sidebar.additional" as="sidebar_additional" label="Sidebar Additional"/>
            </container>
        </container>
    </referenceContainer>
    <move element="main" destination="newcontainer" before="-" />
</layout>


texts: Magento 2: How to dump database from Magento cloud

texts:
How to dump the database to local system from Magento Cloud server with Magento 2 Commerce.
I have only access to the ssh but that ssh user doesn't have write permission into the server. So by any how I need to download the database to the local system.

I have also tried to run the below command in my local system:

  mysqldump -h hostname -u username -p dbname > dbname.sql

Hostname I used same as ssh host because I found 127.0.0.1 as db host on app/etc/env.php. But unfortunately it doesn't help.

I have checked this Magento 2 Commerce cloud database export but I dont know how to use this?

Is ece-tools db-dump already available in Magento cloud? Or we need to install it? If I need to install it then I cannot do this as there is no write permission is there in the server. I can only use git.

Is there any other way to do this Or How can I achieve this?


texts: Magento 2 - Product edit screen, missing category selection field entirely | How to debug?

texts:
At some point during development unknown; the category select field has gone missing from the product edit screen (on all product types).

It's possible it happened during a partial update of content from M1 to M2 as we brought a new development site up to date with it's original M1 data.

Is it possible that the category field is not being output due to an error pulling in categories? The category tree and site catalog as a whole work fine so this wasn't picked up till much later on.

The main thing I'm struggling with here is how to debug the product edit screen.

I'm reviewing the edit screen with template hints on. I can see that the fields look like they are output by js in the templates/form/collapsible.xhtml file.

What I don't know how to do is find and debug the php that's building the data for the fields.

What would be the best way to debug this problem (not php debugging in general but specific to the Magento admin)?

To Note

There are no errors in the console. And the exception, system and debug logs of Magento only show the usual cache and cron notifications.


texts: Magento 2 : How to represent multiple option attribute while importing product with csv

texts:
I am working on magento 2.1.3

I was trying to import product with multiple option attribute.

Eg :  Attribute name : tv_features

values are :  TV Monitor,Smart TV,UHD TV,3D TV

How can i represent multiple option attribute in additional_attributes column..??

Eg : has_options=0,quantity_and_stock_status=In Stock,required_options=0,brand_name=LG,tv_screen_type=LED,tv_screen_size=65",tv_features=Smart TV,UHD TV,3D TV, tv_hdmi_ports=3, tv_usb_ports=3


texts: Can anyone guide me regarding Magento B2B store?

texts:
For setting up B2B Magento store. Do I need to buy some extension? or do Magento has built in B2B?

I don't have much knowledge so kindly guide me. Is any free or lower price extension available?


texts: How to Git-Ignore Symlinks on a Magento Module installed by composer

texts:
I install modules using composer.phar.

This creates symlinks files in publichtml/app/code/community (for example) with a target to vendor/themodule....

In my .gitignore I excluded the vendor directory - but the links would of course still end up in the git.

Is there an easy way to automically exclude those links? (other than adding everything manually to the .gitignore)

I have to say that I have some require-dev modules which should not end up on the final server - so having those links there would be at least not so nice.


texts:
I want to override magento catalog module product template in my custom theme.

Catalog module template path:

<magento_path>/vendor/magento/module-catalog/view/frontend/templates/product/view/type/default.phtml

My custom theme template path:

<magento_path>/app/design/frontend/<theme_vendor>/<theme_name>/Magento_Catalog/templates/product/view/type/default.phtml

I've disabled all cache types and tried to clear with command:

php bin/magento cache:flush

If I modify magento catalog module template directly my customization goes well.

I did other modules templates (.phtml) and layouts (.xml) overrides (Magento_Contact, Magento_LayeredNavigation, Magento_Search, Magento_Theme) in my custom theme and have gone well.

What am I doing wrong?

I'm using Magento 2.0.4


texts: How to set some custom variables in Shipment email

texts:
As I want to set some custom variables in Shipment email, For this I tried "email_shipment_set_template_vars_before" with Observer but I cannot access Order or Shipment related data in Observers variables PHP file, where I want to pass variables in transport object.
Thank you in advance!


texts: Using Customer Session Factory to avoid depersonalization

texts:
We have a plugin that adjusts the customer price on the frontend based on its customer ID. When you use the the Customer Session class it is depersonzalized for a very good reason. But when you use the factory of the same class sudenly you have all the customer data you need. My questions for using this method :

Does this create multiple caching instances for the same page when FPC enabled
Does this have certain security risks?
When using this is there any chance of caching the customer data resulting in mixed results?

https://github.com/magento/magento2/issues/22751


texts: How can I hide related products when a user is not logged in?

texts:
We need to hide related products when a user is not logged in. I can make this work by overriding the /Magento_Catalog/templates/product/list/items.phtml template and putting the conditional code in there. However, this seems like it isn't the best solution because I would need to integrate changes from future Magento upgrades into that overridden template.
I'm trying to use a plugin to override the template in the case that the user is not logged in. I have a custom module working correctly.
In MyCompany\MyModule\etc.di.xml
<?xml version="1.0" encoding="UTF-8" ?>
<config
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Catalog\Block\Product\ProductList\Related">
        <plugin name="rb-hidepricing-relatedproducts-plugin" type="MyCompany\MyModule\Plugin\Product\ProductList\Related" />
    </type>
</config>

In MyCompany\MyModule\Block\Plugin\Product\ProductList\Related.php
<?php
namespace MyCompany\MyModule\Block\Plugin\Product\ProductList;

/**
 * Class Related
 *
 * @package MyCompany\MyModule\Block\Plugin\Product\ProductList
 */
class Related
{
    public function beforeToHtml(\Magento\Catalog\Block\Product\ProductList\Related $subject)
    {
        $isLoggedin = $subject->getLayout()->createBlock('Magento\Customer\Block\Account\AuthorizationLink')->isLoggedIn();
        if (!$isLoggedIn) {
            $subject->setTemplate('MyCompany_MyModule::product/hide_related.phtml');
        }
    }

}

And in MyCompany\MyModule\view\frontend\templates\product\hide_related.phtml
Login to see related products.

When I load the product page now I see the related products regardless if the user is logged in. I use this check for $isLoggedIn in other places successfully. I have cleared cache. I took out the conditional and just set the template, it still shows related products.
I suspect I am missing something basic - this is my first time using a plugin.
UPDATE: Looking in generated directory I find an Interceptor for the class I am trying to add a plugin for, with a method for toHtml that calls plugins. Apparently the di.xml is having an effect, even though the plugin itself doesn't seem to be running. I am in developer mode, and I see some other questions here about plugins not being generated in developer mode.