texts:
I have displayed a frontend form. The form has a checkbox field and it is a mandatory field. But the validation for the field is not working. Please help.

This is my phtml file:

                <?php /* @escapeNotVerified */ echo __('Interested in:') ?>

                        <input name="interested[]" id="option-1" value="1" class="input-checkbox" type="checkbox"  data-validate="{required:true}"/>
                        <?php /* @escapeNotVerified */ echo __('SAmple Text1') ?>

                            <input name="interested[]" id="option-2" value="2" class="input-checkbox" type="checkbox"  data-validate="{required:true}"/>
                            <?php /* @escapeNotVerified */ echo __('Sample Text2') ?>

                            <input name="interested[]" id="option-3" value="3" class="input-checkbox" type="checkbox"  data-validate="{required:true}"/>
                            <?php /* @escapeNotVerified */ echo __('Sample Text3') ?>

                           <input name="interested[]" id="option-4" value="4" class="input-checkbox" type="checkbox"  data-validate="{required:true}"/>
                           <?php /* @escapeNotVerified */ echo __('SAmple TExt4') ?>


texts: Setting store scope when running script via cron

texts:
I am sending emails with a script executed on cron and have attempted to set the current store with:

$stores = $this->_storeRepository->getList();
foreach ($stores as $store) {
    $this->storeManager->setCurrentStore($store["store_id"]);
    ...

This however is not setting the correct store email and name for below code:

$storeScope = \Magento\Store\Model\ScopeInterface::SCOPE_STORE;
$sender = [
                'name' => $this->scopeConfig->getValue('trans_email/ident_sales/name', $storeScope),
                'email' => $this->scopeConfig->getValue('trans_email/ident_sales/email', $storeScope)
            ];

If there a way to set the store correctly with script run via cron or another way to grab these values by store_id?


texts: How remove module name from url magento 2

texts:
Is it possible to remove module  name through htaccess or any other way around to hide module name from url of magento 2 .i.e  http://abcd.com/modulename/controller

Only need to display controller name instead of the module name.


texts: Registration gives error "required mobile" but there is no field mobile in the form

texts: I did not remember what change i have been made now when I want to create new Account it gives this error "mobile is required" and there is no mobile field appeared on registration form please help me someone where I remove mobile field


texts: Magento 2.3.2 - Product Page doesn't show category in breadcrumb

texts:
The site is setup to

Use Categories Path for Product URLs - No

Use Canonical Link Meta Tag For Categories - Yes

Use Canonical Link Meta Tag For Categories - Yes

The category page shows the category & sub-category structure in the breadcrumbs.

However the product page only shows the product name in the breadcrumbs even if the product page was open through a category page.

How can I get the product page breadcrumb to show the category structure the product page was visited from.

Example category page - cat1
which lists product xyz

When product xyz is visted from the cat1 page listing, the breadcrumb should show

Home > Cat1 > xyz

Note: the product is also part of other categories.


texts:
I need to set a new tab in my page product view in frontend for only my CUSTOM type of product, i have tried:
copy the catalog.xml from /theme/layout and paste in my theme/layout, and inserted my custom product:

<PRODUCT_TYPE_virtual translate="label" module="catalog">
    Catalog Product View (Virtual)
    <reference name="product.info">
        <block type="catalog/product_view_type_virtual" name="product.info.virtual" as="product_type_data" template="catalog/product/view/type/default.phtml">
            <block type="core/text_list" name="product.info.virtual.extra" as="product_type_data_extra" translate="label">
                Product Extra Info
            </block>
        </block>
    </reference>
</PRODUCT_TYPE_virtual>
    <PRODUCT_TYPE_incomm_virtual translate="label" module="catalog">
    Catalog Product View (Incomm Virtual)
    <reference name="product.info">
        <block type="catalog/product_view_type_virtual" name="product.info.virtual" as="product_type_data" template="catalog/product/view/type/default.phtml">
            <block type="core/text_list" name="product.info.virtual.extra" as="product_type_data_extra" translate="label">
                Product Extra Info
            </block>
        </block>
    </reference>
</PRODUCT_TYPE_incomm_virtual>

and calls in my another catalog.xml in subfolder from layout, with this:

<?xml version="1.0"?>
<layout version="0.1.0">
    <PRODUCT_TYPE_incomm_virtual translate="label" module="catalog">
        <block type="catalog/product_view_attributes" name="incomm_termos" as="termos" template="fourward/incomm/product/view/termos.phtml">
            <action method="addToParentGroup"><group>detailed_info</group></action>
            <action method="setTitle" translate="value"><value>Terms of Use</value></action>
        </block>
    </PRODUCT_TYPE_incomm_virtual>
</layout>

but nothing happens, i need to create a new tab after description product and i prefer to make in code and only for my custom type of product. how i have to do?
i have follows the http://twincreations.co.uk/add-custom-product-tab-in-magento-1-9-ce/ but i dont know how to use in multiples ways (filtered for type of product). thanks


texts:
How we can get the product id from an order history. Below is the code of which I am trying to fetch the product id but it keeps giving me this array error.

  Fatal error: Uncaught Error: Call to a member function getProductId() on array:

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$customerSession = $objectManager->create("Magento\Customer\Model\Session");
$field  = 'customer_id';
$collection = $this->_orderCollectionFactory->create()->addAttributeToSelect('*')->addFieldToFilter($field, $customerSession->getCustomerId());

foreach ($collection as $_order){
    foreach ($_order->getAllVisibleItems() as $_items) {
        foreach ($_items as $_item) {
            echo $_item->getProductId();
        }
    }
}

The above issue can be resolved by assigning an array. But still need to know the better way.

Or is there any way to get the items from a customer order history?


texts: Does sales_shipping_aggregated relate to the sale_flat_order table? How?

texts:
I see that there are not any relationships from sales_shipping_aggregated to the sales_flat_order table. I'm trying to determine if there is a relationship to anything other than sales_shipping_aggregated_order.

What is the purpose of these two tables (ssa and ssao) and do they relate to the individual orders at all?

Background: I'm trying to merge two different Magento stores into one instance. Needing to migrate data.


texts:
We used to refund for orders through "Invoice" then "Credit Memo" all the time on Magento. However, the option stopped working and whenever we try to refund, it shows that there has been an error and the refund cannot be processed.

We use Authorize.net as our payment and we haven't changed anything on Magento nor Authorize.net that could've caused this problem.

I'm currently refunding through Authorize.net manually but since it does not leave anything on Magento that the refund has taken place, it's causing all sorts of data problem.

Did anyone go through the same problem and was able to find out the solution?


texts: How to get the order id in success.phtml?

texts:
i created an own module for a new block in success.phtml and created a Plugin in my own module. Read my old post here: How to get an order id in success.phtml block?
In my success.phtml file i have the following code:
$order = $block->getCurrentOrder();
$orderId= $order->getId();

On the successpage i get the following error:
Call to a member function getId() on null in

app/code/Meta/Orderpage/view/frontend/templates/order/success.phtml

Why its not possible to access the function?? Any error on the Code?


texts: Magento 2 - How to disable wishlist and product review module

texts:
I want to disable the Wishlist and Product Reviews module including hiding all links in the menues (i.e. Dashboard, Top Navigation).

Is there an easy way to do this?


texts: I can't get getCurrentCategory() from inside my custom block. How can I get this?

texts:
I put some of my custom blocks on the category page. I can't get the getCurrentCategory() from the template (nor from the block). What is the cause of this?

I know that I can get the current category with:
 Mage::registry('current_category') , but I prefer the method that worked for me before, which is $this->getCurrentCategory();

Thanks.


texts: Magento 2 - Update product collection price and reset collection

texts:
I want to update product price from the collection and use that collection again. I have written a code for that as per below:

$price = 23;
foreach ($this->_collection as $key => $value) {
    $value->setPrice($price);
    $sin = $value;
    $this->_collection->removeItemByKey($value->getId());   //I have tried to remove a object
    $this->_collection->addItem($sin);  //set a value again with updated price in a object
}
print_r($this->_collection);exit;
if ($this->getCurrentOrder()) {
    $this->_collection->setOrder($this->getCurrentOrder(),
    $this->getCurrentDirection());
}

But In Results when I print collection then the price is not updating the collection.


texts:
what's the best replace for

  \Magento\Checkout\Model\Cart $cart

since this class Cart is deprecated ?


texts: How to pass data from PHP to a custom uiComponent js class

texts:
I have created a phtml template and I have hook it up with a custom uiComponent model. Then I use knockout to bind model data into the template.

This is working fine at the moment, the problem is I can't pass data from PHP into the JS module I have created.

This is what I have so far :

My layout.xml file to display the phtml template :

<block class="Vendor\Module\Block\Customer\Form" name="vendor_module_template" template="Vendor_Module::template.phtml">
<arguments>
    <argument name="jsLayout" xsi:type="array">
        <item name="types" xsi:type="array"/>
        <item name="components" xsi:type="array">
            <item name="custom_component" xsi:type="array">
                <item name="component" xsi:type="string">Vendor_Module/js/component</item>
                <item name="config" xsi:type="array">
                    <item name="template" xsi:type="string">path/to/template</item>
                    <item name="var1" xsi:type="string">some-value</item>
                    <item name="var2" xsi:type="string">some-other-value</item>
                </item>
            </item>
        </item>
    </argument>
</arguments>
</block>

Then I have my phtml template :

<form style="display: none;" data-bind="visible: true">

 0" class="hidden">

            Email
            <input type="text" name="email" data-bind="value: email, disable: isSent" />

<?= __('Sent'); ?>

            <button  data-bind="disable: isSent">

            </button>

</form>

And then finally my component.js file

define([
'uiComponent',
'jquery',
'ko',
'underscore'
 ], function (Component, $, ko, _) {
'use strict';

function Friend(data) {
    this.email = ko.observable(data.email);
    this.isSent  = ko.observable(data.isSent);
};

return Component.extend({

    friends: ko.observableArray(),

    /**
     * @override
     */
    initialize: function () {

        console.log(this.options) ;
        this.friends.push(new Friend({email : 'friend1@example.com', isSent : true}));
        this.friends.push(new Friend({email : 'friend2@example.com', isSent : false}));

    },
});
});

This is all working fine except the fact that I can't access the configuration options I set from the layout xml file.
How can this be done?

Also, I would like to use a knockout html template, which I have seen in the core that they also set from the layout xml but this is not working either when I try it.

Thanks in advance !


texts: Difference between Refresh All Cache , Flush Magento Cache and Flush Cache Storage

texts:
We are seeing this options from Magento1, but we are not clear what types of cache will be flushed from the system/magento. What needs needs to cleaned or run at what time.

In magento 2 we refresh the cache and also flushed Magento cache, is that mean we have to once again deploy the static content here again.

After Cache clean we are unable to login in Magento admin, after checking the logs file found that var/cache folder don't have the proper write permissions. But before removing cache it has the right permissions.

Can anybody provide insights of handling the Magento cache especially the Magento2 part? As we are seeing the issues after flushing the cache from admin side.


texts: php bin/magento app:config:dump gives me [Magento\Framework\Exception\ValidatorException] Path "app/etc" cannot be used with "app/etc"

texts:
I'm trying to change some settings, and this answer has already been very helpful.
But now php bin/magento app:config:dump gives me

  [Magento\Framework\Exception\ValidatorException]
   Path "/var/www/magento-site/application/releases/3/app/etc/" cannot be used with directory "/var/www/magento-site/application/releases/3/app/etc/"


texts: how to advanced search a products programatically

texts:
I need to search a products using advanced search with custom attributes  programmatically. My advanced search works fine, i need to search product programmatically with our custom attributes.

I follow this link But magento 2 doesn't have these files   vendor/magento/module-search/Model/ResourceModel/Query/Collection.php

Suggest me How to do this.


texts: Can I install Magento OMS on Magento 2.2.8 (community)

texts: We are a 42 branch + website Appliance store and are trying to make the move to Magento OMS. My question: Is it possible to do that with our current version of Magento or do we need Magento Enterprise to do that?


texts: How to remove pagination from Customizable Options (backend) in magento 2?

texts:
We have products in our magento 2 store with more than 50 options added to each of customizable option. It takes much time to go to next page.

Can we remove the pagination or a way to increase it to 50(currently its 20 per page)?


texts: Proper Mobile API Implementation for Magento?

texts:
My current project involves building an online store on top of Magento CE 1.9, and native mobile apps that can do pretty much everything the website can minus the HTML and minus the need to pay for an extension or library. I've been scouring the web for any way to do this in Magento, and I have come up with the following insights (please do correct me if I'm wrong):

REST is extremely painful to implement for mobile. Callback URLs almost never work, and the one way I got it to work requires the user to manually login to the website, approve the issuing of a token from inside the browser, and is left to handle the oauth token and secret himself. I am of the thought that the only thing a user needs to do from the app is login, and the server responds with the token the app can use to access data. If someone can show me how this can be done, please let me know.
SOAP is both too slow and too powerful. Too slow since it takes several seconds just to query basic information, and too powerful since it can query almost anything, even information that shouldn't be exposed to a customer. I am also not sure where SOAP related code should be placed. Should the whole API be exposed to the app, or should such code only be handled server-side and passed back to the client?
Custom PHP file calling Mage seems to be the simplest way to do things. Right now my app talks to a custom PHP file residing in a user-made directory that uses Mage.php to do the things it needs. Through this PHP script I can authenticate the user, have fine control over the data being queried, and easily handle requests and responses using simple HTTP POST or GET. My concern though is that this isn't an API per say, and I am not experienced enough in web development to know if this method has bad security implications. Is it bad that no tokens are involved? Is the fact that the URL is static a problem? #3 is my preferred method of doing things, but if it's really insecure, please let me know.

Again, these are the things I have noticed from experience and research. If anyone has found a simple, secure way, please let me know about it, and please provide as much guidance and sample code as you can since Magento itself doesn't provide nearly enough. Thanks again!


texts: Magento 2.1.2 Content > Pages Loading Loop

texts:
I have a problem with my Magento 2 backend only with the pages section.
It just is stuck in a Loading loop (see screenshot)
I have been looking and asking all over the net and forums without anyone replying to my issue. Hopefully i have more success here. :)

I do not get any error logs only when I switch to Console in Chrome it gives me the following:

Im still pretty new to magento and not exactly sure what causes the problem or how to fix it. Any ideas guys.


texts:
Would it be possible to automatically empty Magento cart if someone abandoned the cart?
Basically we do not want customers to have the previous cart items stay in cart once they left the site or logout from the site.


texts: I want to save the customer_id and the product_id in a table after clicking a product and seeing its detail


texts: Magento2 Need to add 2 checkbox when deliver to me of flat rate shipping is selected

texts:
How can I add following 2 checkboxes in Magento2 when Deliver to me/Flat rate shipping is selected?

Any extensions suggestion or any other way to achieve this functionality will be appreciable.


texts: When I use magento API(salesOrderShipmentCreate), item qty must be filled?

texts:
I just want to change status of specific order to "shipped" by using ordernumber as key.

When I decided to use salesOrderShipmentCreate API, I found some logical problem.

$result = $proxy->salesOrderShipmentCreate($sessionId, '200000006', array('8', '1'), 'shipment comment');

In this code;  array('8', '1') should be the shippment qty of item. the item id('8') might be derived from earlier API-call-result (like salesOrderInfo).

Because of heavy loading in using API, I don't want to call extra API-call for just get id of items.
I don't ship products partially. Always I ship entire order.

Is there any good method to change status order to shipped with entire shipment qty without using item id?


texts: Problems with Fooman Speedster: 403 error + Verify Minification ERROR

texts:
I have a problem with Fooman Speedster
Self-test shows two errors:

1) Verify Permission ERROR (Step 2)
2) Verify Minification ERROR: there are no files starting with "minify_" in "/opt/bitnami/apps/magento/htdocs/var/minifycache" (Step 3)

With regard Verify Permission ERROR (Step 2) - site.com/lib/minify/m.php - 403 Forbidden

I do not find the answers to these errors in the Developer's Guide:

http://cdn.fooman.co.nz/media/custom/upload/UserManual-FoomanSpeedster.pdf
http://cdn.fooman.co.nz/media/custom/upload/TheUltimateGuidetoInstallingMagentoExtensions.pdf
http://store.fooman.co.nz/extensions/magento-extension-speedster.html

Please, any advice and suggestions!

Selftest failed with: Step 1 - OK
Verify Permission ERROR (Step 2)
Verify Minification ERROR: there are no files starting with "minify_" in "/opt/bitnami/apps/magento/htdocs/var/minifycache" (Step 3)
Step 4 - OK
Please read the manual for details.
Starting Fooman_Speedster_Model_Selftester
Default store loaded
Magento version: 1.9.0.1
Speedster DB version: Not installed
Speedster Config version: 3.0.14
Checking file locations
Checking rewrites
Checking database
Result: success


texts: catalog/seo_sitemap/category/ showing *disabled* categories

texts:
On Magento 1.9.0.1

catalog/seo_sitemap/category/ showing disabled categories

Hi we have a link to catalog/seo_sitemap/category/ in our store view

the problem is that is shows the DISABLED categories from our store domain (higher level in hierarchy) when the categories are disabled on store view level.

Working as expected

Category 1 works like expected
Default config = enabled yes
  store view A = inherit
  store view B = inherit

Not working as expected

Category 2 something strange going on
Default config = enabled yes
  store view A = inherit
  store view B = override, disable

But category 2 in store view B is still visible

Help appreciated: thanks!

Example

This is what we see in frontend
enter image description here

And this is what we see in backend

question: is this a Magento code error? or how can we solve this


texts: Exporting Segmented Subscribed Newsletter Customers

texts:
I'm trying to update segments in MailChimp and I'm not sure how to get this info out of Magento. Is there an easy way to export a list of customer email addresses that:

A) purchased a specific SKU or series of SKUs that begin with XYZ

AND

B) are subscribed to the store's newsletter?

I'm guessing there's probably a simple SQL statement that can do this-- but don't know enough about the Magento 1.9 database structure to do it. Any assistance would be greatly appreciated!

Thanks


texts: Install script version logic: When are which upgrade scripts executed?

texts:
I found an interesting behavior today: I accidently named a data upgrade script data-upgrade-0.1.20-0.1.20.php where it should have been data-upgrade-0.1.19-0.1.20.php, and it actually has been applied.

And as I cannot find a question here that can be used as a reference for the setup script version logic (correct me if I'm wrong), let's use this one.

By which logic does Magento execute the install and upgrade scripts?

Especially interesting edge case: When and why are scripts like upgrade-1.0.0-1.0.0.php executed, where the "from" version number is equal to the "to" version number?


texts: Custom module select specific entries from database via resource model?

texts:
I have set my resource model up, my model for it and I have pulled Item 1 from the database...

How do I select rows from the database that have a 'quote_id' of say 9?

 public function getQuoteProducts()
 {
   $quoteDataModel = $this->_quoteDataModelFactory->create();
    $item = $quoteDataModel->load(1);
    var_dump($item->getData());
    ...And so on.
 }


texts: How to Get Order_id and Order_amount from Magento2?

texts: How to Get Order_id and Order_amount from Magento2 and pass these value to a outside of my magento store site?


texts:
Is it possible to call a function within the header.phtml file?

I have created essentially an on/off switch that will either enable or disable a button that I created on the front end. This button allows the user to open up a dialog box where they can search for stores closest to them and also log in.

The problem I am having is that when I make the call to check whether or not the back end module is enabled or disabled, magento will throw this error:

Invalid method Mage_Page_Block_Html_Header::enableFutureOrder(Array
(
)
)

enableFutureOrder is my custom function to check whether or not the module is enabled.

Here's the function itself:

class Namespace_Futureorder_Block_Container extends Mage_Core_Block_Template
{
    private $currentWorkloadLevel;
    private $currentTimeStamp;
    private $timeToOrder;
    private $timeSource;
    private $moduleEnabled;
    private $enableDisable;
    private $enableFutureOrder;
    private $storeAvailability;
    private $pickupTimes;
    private $deliveryTimes;
    private $numberOfPickupAndDeliveryDays;
    private $deliveryCollection;
    private $pickupCollection;

public function __construct()
    {
        $this->enableDisable = Mage::getStoreConfig('enable_store/options/active');
        $this->enableFutureOrder = Mage::getStoreConfig('place_future_order/options/active');
        $this->currentTimeStamp = Mage::app()->getLocale()->storeTimeStamp(Mage::app()->getStore()->getStoreId());
        $this->currentWorkloadLevel = Mage::getModel('futureorder/Workload',$this->getCurrentTimeStamp())->getWorkloadLevel();
        $this->timeToOrder = Mage::getModel('futureorder/OrderTime', $this->getCurrentWorkloadLevel());
        $this->timeSource = Mage::getModel('futureorder/Config_Source_Time');
        $this->storeAvailability = Mage::getModel('futureorder/StoreAvailability');
        $this->moduleEnabled = Mage::getStoreConfig('futureorder_general/options/active');
        $this->pickup = false;
        $this->delivery = false;
        $this->numberOfPickupAndDeliveryDays = 14;
        $this->deliveryCollection = Mage::getModel('futureorder/DeliveryTimeCollection');
        $this->pickupCollection = Mage::getModel('futureorder/ShippingTimeCollection');
        $this->setPickupAndDelivery();
        $this->setValidPickupAndDeliveryCollections(14);
    }

  public function enableFutureOrder()
    {
        return $this->enableFutureOrder;
    }

There is more to this class obviously with what is in the constructor, but not necessary to show the functionality.

So when I call this function within different places, it will work, but it will not work within the header.phtml file. Is there something I am forgetting to do to get this to work, or is it just not possible to call functions like this in the header file?


texts: How to get multiple shipping address subtotal?

texts:
How to get multiple shipping address subtotal cart item wise? I mean get subtotal of item with different address selected. I'm using Ship to multiple
address option and i want to use that subtotal in /Usa/Model/Shipping/Carrier/Ups.php file. Thanks.


texts: Create new quote item instead of updating existing quote item for same product

texts:
I have created a custom attribute for quote item,order item problematically.
I have added a drop down option with multiple values for all products.(I don't use custom option because my values are dynamic). I am able to save the selected value of drop down in that custom quote item attribute.
But the issue is, if I select the same product with different custom values (the dropdown value I have added), it's updating the quantity of existing quote item.

I want to create new entry of quote item instead of updating existing quote item entry. On which event quote item updated?
can anyone help me on which event should I add my logic.


texts: Magento order tracking error. "parameter $date must be set, null is not allowed"

texts:
Using Magento 1.9.1.0. When I open the order shipping tracking I get this error:

There has been an error processing your request
parameter $date must be set, null is not allowed

The full output is this:

    Trace:
    #0 /public_html/app/code/core/Zend/Date.php(1091): Zend_Date->_calculate('set', NULL, 'U', 'nb_NO')
    #1 /public_html/app/code/core/Zend/Date.php(210): Zend_Date->set(NULL, 'U', 'nb_NO')
    #2 /public_html/app/code/core/Mage/Core/Model/Locale.php(524): Zend_Date->__construct(NULL, 'U', Object(Zend_Locale))
    #3 /public_html/app/code/core/Mage/Shipping/Block/Tracking/Popup.php(245): Mage_Core_Model_Locale->date(false, 'U', NULL, false)
    #4 /public_html/app/design/frontend/gravdept/acumen/template/shipping/tracking/popup.phtml(142): Mage_Shipping_Block_Tracking_Popup->formatDeliveryTime('10:37:00', '14. okt. 2015')
    #5 /public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/...')
    #6 /public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/gravde...')
    #7 /public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
    #8 /public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Template->_toHtml()
    #9 /public_html/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
    #10 /public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Text_List->_toHtml()
    #11 /public_html/app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
    #12 /public_html/app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('content', true)
    #13 /public_html/app/design/frontend/gravdept/acumen/template/page/popup.phtml(29): Mage_Core_Block_Abstract->getChildHtml('content')
    #14 /public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/...')
    #15 /public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/gravde...')
    #16 /public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
    #17 /public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Template->_toHtml()
    #18 /public_html/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
    #19 /public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
    #20 /public_html/app/code/core/Mage/Shipping/controllers/TrackingController.php(76): Mage_Core_Controller_Varien_Action->renderLayout()
    #21 /public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Shipping_TrackingController->popupAction()
    #22 /public_html/var/cache/ew/files/69/b9/Mage/Core/Controller/Varien/Router/Standard.php(269): Mage_Core_Controller_Varien_Action->dispatch('popup')
    #23 /public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_StandardOverriddenClass->match(Object(Mage_Core_Controller_Request_Http))
    #24 /public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
    #25 /public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
    #26 /public_html/index.php(100): Mage::run('', 'store')
    #27 {main}

This happened from one order to the next, and has been the case with every order since. Tracking earlier orders still works. Any help fixing this would be appreciated.


texts: Search returning suggestions but nothing is displayed after search?

texts:
Magento 2.3.3
Typing some term in the search field gives me 2 rows in the suggestion box. Choosing one of them or just hitting the search button gives me no results on the result page though.
I reindexed already and also cleared the cache, nothing helped so far. Any idea why that might happen?
Thanks!


texts:
In my e-commerce when I try to estimate shipping in checkout page and then I click the button "proceed checkout" I get a white page in /checkout/onepage/, both if I estimate only and if I estimate and then select "free shipping" radio button. The white page is without Apache errors and without javascript console errors; there are no errors in var/log/system.log and there is no exception.log file in the same directory.
Instead, if I don't get estimation and proceed directly to the checkout, in /checkout/onepage/ I have no shipping method enabled so I can't proceed to checkout. On what it could depend on?

Configuration:

Magento CE 1.9.3.2 with SUPEE-9767Onestepcheckout from Em Magento Everything theme; if I disable it and set default Magento Onestepcheckout, I don't get white page but I can't proceed to the next step because it shows the message "Sorry, no quotes are available for this order at this time."The only shipping method enabled is "Free shipping" with minimum order zero for all permitted country, that actually is Italy


texts: Magento 2.4.1 gettig 403 Forbidden error js-translation.json in admin side

texts:
I have try all the magento2 commands
php bin/magento setup:upgrade
php bin/magento cache:clean
bin/magento setup:static-content:deploy --theme=Magento/backend en_US -f
Also try this
In vendor/magento/module-translation/Model/Json/PreProcessor.php
$area = $this->areaList->getArea($areaCode);
$area->load(\Magento\Framework\App\Area::PART_TRANSLATE);
needs to be:
In vendor/magento/module-translation/Model/Json/PreProcessor.php
$area = $this->areaList->getArea($areaCode);
$area->load(\Magento\Framework\App\Area::PART_TRANSLATE);
needs to be:
but still getting same error
can you please help me how I can solved this error
admin json file auto generate after deploy the command but still getting same error


texts: CSS Best Practices - single time use of CSS

texts:
I've made a module with a custom page. On this page I have a list of around 20 checkboxes, each followed by a single word for identification. I would like to display this with CSS in multiple columns.

All resources I could find says that to edit CSS, I should:
 - Create a new theme
 - Use that theme to override the CSS I need

However, this seems a bit excessive just to style a single element. The effect should look like:

<ul style="column-width:20em;">

Which does everything I need. Now, I've learned that inline CSS is not done, and I understand perfectly why. However, creating a new theme sounds a bit like using a howitzer to kill a bug.

Should I:
Just inline the CSS ?
Put some CSS files into my non-theme module, referring just to the ID of the element ?
Create an entire new theme to style this single element of my module ?

Or is there another solution for a case like that that I could not find ?


texts: How to set source quantity (MSI) from my own custom backend module in Magento 2.4?

texts:
I'm new to M2, and I am in a hurry to migrate my site from M1. In M1 I made my own MSI functionality, but now I would like to use the built in MSI functionality in M2.
For some of the backend logic (like moving item stock from one source to another when needed), I have created my own module. The logic works, but I need to be able to update the quantity on a specific source.
I would like to know how to set new qty to a specific source for a specific sku in a custom module.
I've been at it for a week with no success. I have found answers to similar questions, but the answers are quote code, but do not say specifically where to put the code.
Seems like I should be able to use SourceItemsProcessor, but I don't know the basics in M2 on how to set it up.


texts: Magento 2 Can i call two phtml file into one?

texts:
I have two phtml files, I want to use one for just the heading title and content.
then the second phtml file I want to use it to call a table with a simple form submission.
is this possible, if anyone could show me any example or guide will be helpful.
I have tried to use this but the content shows correctly but the root is showing after my footer
https://magento.stackexchange.com/a/206329/96152


texts: Override function that fetches the price from the database

texts:
I'd like to temporarily increase the prices on a Magento 1 site by 10% without actually changing their prices permanently, as I will remove price increase at some point in the near future.
I thought I would just be able to override something like the "getPrice" function to return the price as the current price * 1.1, but Magento has a bunch of different ways it accesses the price of a product and when using this function I saw that the price was not showing as the same in every section of the site.
I want to make sure I don't miss any place, so what function do I need to override to alter the price right as it is being returned from the database, at the lowest level in the function hierarchy?


texts:
There is about a 3 hour delay in the update of our dashboard graph. I have tried clearing cache and disabling cache but the dashboard stats graph doesn't seem to update as frequently as it use to.

Can I keep the graph current?


texts: I have a contact form that is set up so that the form information is emailed to an email address, like any form on the internet. However does anyone know if possible to save the contact forms in Magento?


texts:
So I know that the subject of getting a custom product attribute into the a quote item has been covered many times, and I've had that working fine previously.

What I'm trying to achieve here though is to get a custom value (something out of the session) stored against a quote item. I've created the extra column in the 'sales_flat_quote_item' table (which is vrm_data). What I've got in terms of code is below;

config.xml excerpt;

<global>
    ......
    <events>
        <sales_quote_add_item>
            <observers>
                <vrmdatasave>
                    <class>vrmlookup/observer</class>
                    <method>saveVrm</method>
                </vrmdatasave>
            </observers>
        </sales_quote_add_item>
    </events>
    <fieldsets>
        <sales_convert_quote_item>
            <vrm_data>
                <to_order_item>*</to_order_item>
            </vrm_data>
        </sales_convert_quote_item>
        <sales_convert_order_item>
            <vrm_data>
                <to_quote_item>*</to_quote_item>
            </vrm_data>
        </sales_convert_order_item>
    </fieldsets>
    <sales>
        <quote>
            <item>
                <product_attributes>
                    <vrm_data />
                </product_attributes>
            </item>
        </quote>
    </sales>
</global>

I'm not entirely sure that I need the sales>quote>item stuff as this isn't a product attribute I'm dealing with.

In my Observer.php;

public function saveVrm($observer)
{
    // Save the VRM data against the Quote
    $session = Mage::getSingleton('core/session');
    $quoteItem = $observer->getQuoteItem();
    $quoteItem->setVrmData($session->getVehicleData());
}

I can see using debugging that the session var has the correct value, and then the $quoteItem has the correct value, but I'm never actually seeing it appear in the 'sales_flat_quote_item' table.

As usual with stuff like this, it could be something simple I'm doing/not doing....annoyingly this was working fine with the 'sales_flat_quote' table (albeit with a slightly different observer code, obviously).


texts:
I recently updated my Magento from 1.4 to 1.9 and faced with the issue: it gives HTTP-header 500 Internal Server Error, but all the content is still loading (so just instead 200 OK I have 500 Internal Server Error).

It's interesting, that the CMS pages comes with 200 OK. The problem is exists only within the store pages (i. e. catalog, product, etc).

What have I tried:

temporarily removed .htaccess
double checked the config table's the proper paths
tried all the solutions suggested in this article as well as this one
disabled all the custom modules

Update:

I looked on the logfile and noticed that it shows the following PHP Fatal Error:
Cannot redeclare class Mage_Catalog_Model_Product in /var/www/app/code/core/Mage/Catalog/Model/Product.php on line 2073

To catch this error I've put on the beginning of this file before the class declaration the following code:

if ( class_exists( 'Mage_Catalog_Model_Product', FALSE ) ) {
    $reflector = new ReflectionClass( 'Mage_Catalog_Model_Product' );
    Mage::log($reflector->getFileName(),Zend_log::DEBUG );
}

which showed this line:
2014-09-07T08:42:47+00:00 DEBUG (7): /var/www/app/code/core/Mage/Catalog/Model/Product.php

So, as far as I understand, the class redeclares in the same php file! How to avoid that?


texts: Circular dependency: Magento\Customer\Model\Session depends on Company\Modulename\Plugin\Config\Share and vice versa

texts:
How to override or Use plugin for isWebsiteScope() function from
Magento\Customer\Model\Config\Share.php file,

I have used plugin for below function but I want to get current customer session in below function, Mainly check custoemr is logged in or not.

Just use plugin and set di.xml,

<!-- Override Share.php to set value of website scope -->
<type name="Magento\Customer\Model\Config\Share">
    <plugin name="Company_Modulename::Share" type="\Company\Modulename\Plugin\Config\Share\Proxy" sortOrder="1"/>
</type>

In Share.php file,

<?php
namespace Company\Modulename\Plugin\Config;

class Share
{
    public function __construct(
        \Magento\Customer\Model\Session $customerSession
    ) {
        $this->session = $customerSession;
    }
    /**
     * Check whether current customers sharing scope is website
     *
     * @return bool
     */
    public function afterIsWebsiteScope(\Magento\Customer\Model\Config\Share $subject)
    {
        if(!$this->session->isLoggedIn()){
            return 1;
        } else {
            return 0;
        }

    }
}

How to get current customer session in above function,

If I used current customer session using customer session model browser will throw Circular dependacy error.


texts:
I have installed a module in Magento 1.9 that rewrites a newsletter model from Magento Core. The config.xml file looks like this:

<models>
    <onestepcheckout>
        <class>MW_Onestepcheckout_Model</class>
        <resourceModel>onestepcheckout_mysql4</resourceModel>
    </onestepcheckout>

    <onestepcheckout_mysql4>
        <class>MW_Onestepcheckout_Model_Mysql4</class>
        <entities>
            <onestepcheckout>

mw_onestepcheckout

            </onestepcheckout>
        </entities>
    </onestepcheckout_mysql4>

    <newsletter>
      <rewrite>
          <subscriber>MW_Onestepcheckout_Model_Subscriber</subscriber>
      </rewrite>
    </newsletter>
</models>

Everything is working fine in this moment. The problem is when I want to rewrite this new class, because nothing happened. The config.xml is:

<models>
    <extendonestepcheckout>
        <class>Blugento_ExtendOneStepCheckout_Model</class>
    </extendonestepcheckout>

    <onestepcheckout>
        <rewrite>
            <subscriber>Blugento_ExtendOneStepCheckout_Model_Subscriber</subscriber>
        </rewrite>
    </onestepcheckout>
</models>

And the code from my new class is:

class Blugento_ExtendOneStepCheckout_Model_Subscriber extends MW_Onestepcheckout_Model_Subscriber
{
     public function  getCouponCode()
     {
         if(Mage::getConfig()->getNode('modules/JEGAN_EmailCoupon')) {
             $helperData = new JEGAN_EmailCoupon_Helper_Data();
             return $helperData->generateNewCouponCode('jeganemailtabmenu/jegannewsletteremailcoupon', $this->getCustomerId(), 1);
         }
     }
}

I've created a debugging file test.php and wrote this code inside:

include "app/Mage.php";
Mage::app();

$dModel = Mage::getModel('newsletter/subscriber');
var_dump(get_class($dModel));

This code displays on screen:

  string(35) "MW_Onestepcheckout_Model_Subscriber"

but it should display:

  string(47) "Blugento_ExtendOneStepCheckout_Model_Subscriber"

I don't know what it doesn't work, can you tell me if there is a problem with this code? Thank you!


texts: Can magento2 layered navigation support multiply value on same filter?

texts:
For example, i would like to filter products in both "Red" and "Blue"  color, (where color is a dropdown attribute)
can i tick both value within the same filter?


texts:
I am trying to speed up the Magento search and load results over ajax.

I have made a completely ajax search and it works however is slow in Magento 2. In Magento 1 i managed to make it near instant like below sites but this was on a site with few products.

I am seeing a few stores with 1000s of products starting to pop up recently with an incredibly fast search and its making me jealous:

https://gmsuppliesltd.co.uk

https://www.allianceonline.co.uk/

I know gm is Magento 1 and not sure on Alliance but was wondering if there are any modules that can allow for Magento 2 search to be as fast as this and how are they doing this?


texts: Magento 2 : Error opening customer page (admin)

texts:
Type Error occurred when creating object: Magento\Eav\Model\Entity\Attribute\Source\Config, Argument 1 passed to Magento\Eav\Model\Entity\Attribute\Source\Config::__construct() must be of the type array, null given, called in /Magento2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php
The above error appearing when opening customer from admin, any thoughts how can i resolve it ?


texts: I have a dynamic price and I need to disable the price cache. How I do it?


texts: Detailed description of getting values for product collection

texts:
I am interested in the exact process of getting the values for a product collection.

If I have a product collection

$products = Mage::getModel('catalog/product')->getCollection();

it will just provide basic product attributes like sku.

Example from a $product->debug()

Array
(
    [entity_id] => 3221
    [entity_type_id] => 4
    [attribute_set_id] => 9
    [type_id] => simple
    [sku] => 12345678
    [has_options] => 1
    [required_options] => 1
    [created_at] => 2015-01-01 15:20:27
    [updated_at] => 2015-02-27 11:24:49
    [cat_index_position] => 20009
    [is_salable] => 1
    [stock_item (Varien_Object)] => Array
        (
            [is_in_stock] => 1
        )

)

When I need more values I can use addAttributeToSelect() to extend the information I get from my collection. E.g. I mostly use

$products->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())

because it is not the "I don't care, just gimme everything" hammer like '*' and mostly fits my needs and it works very well. The $product->debug() contains much more values after adding this.

What I don't understand is the mechanism behind it. When I use $products->load(false,true) to dump the sql, there is no hint to the extra attributes.

SELECT `e`.*, `cat_index`.`position` AS `cat_index_position`
FROM `catalog_product_entity` AS `e`
INNER JOIN `catalog_category_product_index` AS `cat_index`
  ON cat_index.product_id=e.entity_id
    AND cat_index.store_id=1
    AND cat_index.visibility IN(2, 4)
    AND cat_index.category_id = '2'
ORDER BY `e`.`entity_id` ASC

I went down to \Mage_Eav_Model_Entity_Collection_Abstract::addAttributeToSelect but I am not sure where to go from there.

Somewhere between getCollection() and a foreach($products as $product) the values are added and I really would like to know where and how the magic happens :)

Can somebody explain this to me?

And to extend my question: Where are the borders of the addAttributeToSelect() function? It seems it can do some joining but where is the point you need to do it yourself with joinAttribute()?
Hope I could make myself clear with this.

Thanks in advance! :)


texts: Error in loading Website due to database

texts: I recently change database username password from c-panel and now when i open website or admin panel it shows error.how to resolve this issue? how can i add new password in magento database? or what can i do?


texts: Magento 2 : Show loader till all ajax call not completed

texts:
I want to show loader till page not loaded or all Ajax call not completed in frontend and backend both side.

Is it possible in Magento 2.0.7 ?


texts: WYSIWYG media directory contents removed

texts:
Yesterday a client of mine on Magento Community had all of their media from the /media/wysiwyg/ directory deleted. We assumed human error. Then today, another client on Magento Enterprise had the same thing happen. These are hosted on different servers, on different accounts, with different Magento versions. It's quite the coincidence, so I'm concerned that something sinister might be happening here, such as an unpatched vulnerability.

If you look at the Insert Image... screen on CMS pages, there isn't a way to delete the entire contents of the "Storage Root" folder. So I'm not actually sure how an Admin could have even accidentally deleted the entire contents of this directory without going folder to folder and deleting each one.

Have any of you seen this happen before?


texts: Insert input fields value on button click in magento

texts:
I am new to magento. I am trying to insert textbox value into database on button click.
I used this code to insert value in database table...

$data = array('title'=>'hello there','content'=>'how are you? i am fine over here.','status'=>1);
$model = Mage::getModel('mynews/mynews')->setData($data);
try {
$insertId = $model->save()->getId();
echo "Data successfully inserted. Insert ID: ".$insertId;
} catch (Exception $e){
echo $e->getMessage();
}

but i want this on a button click. And it should take the values from textboxes.


texts: Magento OAuth - Automatically log customers in from external site

texts:
Basically I have a Magento installation that an external company is filling with customers as they sign up for their external customer portal using an API.

When a user is logged into this companies portal they want them to be able to click a link and be sent to this magento installation and automatically logged in.

I am not very experienced with API's etc and have read about OAuth but can't find instructions on what to do!

I just would like to know how I can get magento to automatically log them in when they click the link on the exernal site.


texts:
I have created a category which is in my main menu. I wanted to redirect it to a cms page when click on it.
Category is apps.html
cms page is apps
Current urls for those are as follows

And I added following url rewrite to actual category url as follows

But still it goes to category page. I did reindexing also.
May I know where I wrong in the process of url rewrite?
Thanks


texts:
For Color attribute. i have choosed visual swatch option. See https://nimb.ws/5uShaj
On frontend, it shows color for the one whoose color image is added. but it shows blank when no color image is added.

Check attached screenshot, and check the third product, where when i hover on color it displays name of it, but by default it is showing blank.
You can visit this link https://e92rduand89atx1x.mojostratus.io/fabrics/zorb.html?p=2
How can i display the label when color image is not present


texts:
I have quite a few products in my store which have images on their product pages, but on my home page the images don't show in the tiles?

Is there a file missing, or is there a refresh I need to do?

For example, on my current home page:
https://www.shelburnecountrystore.com/
The fourth tile is No Image, yet when you go to the page:
https://www.shelburnecountrystore.com/80mm-glass-fog-white-balls.html
The image shows.

Any ideas?


texts: Custom module - specific checkbox question

texts:
I have custom slider module.

Within that module you can add items (slides) one by one ( with title, caption, aso.. ).

Now I added a checkbox to the same form.

Only one item (slide) should have that checkbox checked at the same time!
I dont want to uncheck it on one item and check it on the next -> this should be automatic. So if I check that checkbox for an item it should remove the checked status in DB from the old one.


texts: Move cms static block before Breadcrumbs in Magento 2.2 category page

texts: I want to move cms static block before breadcrumbs. My static block name ves_element_top.


texts: Add custom block on listing page : Magento2

texts:
I want to add my custom block on listing page[Magento-2] but without any modification on list.phtml or any .phtml file. Is there any possibility by using xml file  ?

Any help will be appreciated.


texts: Magento2 Custom Media Image Attribute do not work in Frontend

texts:
i have a problem by getting a custom image in the frontend.

I have a custom media product attribute "image_productlist"
In my product import i fill the mediaGallery like this:

$oTargetProduct->addImageToMediaGallery($aMediaData['overview_image'], ['image_productlist', 'swatch_image'], false, true);
$oTargetProduct->save();

Where $aMediaData['overview_image'] has the MEDIA IMPORT PATH AND THE FILENAME!

After the import i see in my Admin Backend this image in the gallery and the flags 'image_productlist', 'swatch_image' marked at this image.
Now i want to get this image with flag: 'image_productlist' in my frontend block.

For this i do something like this:

// get the variant images

$existingMediaGalleryEntries = $_simpleProduct->getMediaGalleryEntries();
foreach ($existingMediaGalleryEntries as $key => $entry) {
var_dump($entry->getData());
}

I get this list of the images in the gallery but there is no FLAG 'image_productlist'.

What is wrong??

Thanks for help.


texts: Magento2: How to add a text between swatch configure and swatch attribute name?

texts:
I am having trouble while creating a module that add a text between swatch configure and swatch attribute name load by default, I want to add it only on a specific swatch if I have more than one. And what if it an input. How Can I do that?
For exmaple: we have
[attribute name] [attribute configure]
I want to add a text between them
[attribute name] [text] [attribute configure]
How can I do this, thanks


texts: Magento 2: -How to get product reviews, each review with a star

texts:
<?php
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$product = $objectManager->get('Magento\Framework\Registry')->registry('current_product');
$storeManager = $objectManager->get('Magento\Store\Model\StoreManagerInterface');
$currentStoreId = $storeManager->getStore()->getId();
$rating = $objectManager->get("Magento\Review\Model\ResourceModel\Review\CollectionFactory");
$reviewFactory = $objectManager->create('Magento\Review\Model\Review');

$collection = $rating->create()->addStoreFilter(
    $currentStoreId
    )->addStatusFilter(
    \Magento\Review\Model\Review::STATUS_APPROVED
    )->addEntityFilter(
    'product',
    $product->getId()
    )->setDateOrder();
    $reviewlist = $collection->getData();
    foreach ($reviewlist as $review)
    {
        echo "<pre/>";
        print_r($review);
    }

#######################################################

Output
    [review_id] =>
    [created_at] =>
    [entity_id] =>
    [entity_pk_value] =>
    [status_id] =>
    [detail_id] =>
    [title] =>
    [detail] =>
    [nickname] =>
    [customer_id] =>
    [entity_code] =>

In that I can not get the review star per review with the help of object manager.

I want highlighted box value


texts: How do I specify structure of all child elements of a node in XSD where the node names vary?

texts:
I am building Magento 1 XSDs (XML Schema Definitions). Magento very often uses node names as a unique identifier for a node in XML.

For example:

<config>
    <events>
        <log_log_clean_after>
            <observers>
                <catalog_product_compare_item>
                    <class>catalog/observer</class>
                    <method>catalogProductCompareClean</method>
                </catalog_product_compare_item>
            </observers>
        </log_log_clean_after>
        <page_block_html_topmenu_gethtml_before>
            <observers>
                <catalog_add_topmenu_items>
                    <class>catalog/observer</class>
                    <method>addCatalogToTopmenuItems</method>
                </catalog_add_topmenu_items>
            </observers>
        </page_block_html_topmenu_gethtml_before>
        <catalog_entity_attribute_save_before>
            <observers>
                <catalog_check_reserved_attribute_codes>
                    <class>catalog/observer</class>
                    <method>checkReservedAttributeCodes</method>
                </catalog_check_reserved_attribute_codes>
            </observers>
        </catalog_entity_attribute_save_before>
    </events>
</config>

I know the structure of each node within the "events" node should have an "observers" which should contain observer definitions. And I know that an observer definition should have the structure of always containing one "class" node and one "method" node.

How do I specify this in an XSD? I have not been able to figure out how to specify structure for varied named nodes.


texts: Magento 2 - how do i redirect "mydomain/pub" and "mydomain/pub/media" path to homepage?

texts:
I'm trying to redirect "mydomain.com/pub" and "www.mydomain.com/pub/media" to homepage (mydomain.com).
Currently, "mydomain.com/pub" path shows the homepage with no css and js loaded, and "www.mydomain.com/pub/media/" path shows the directory listing page for all the media files.

I am trying to direct both paths to the magento home page.

The solution from here does not work for my purpose ( changing the 404 redirection in admin panel https://stackoverflow.com/questions/5048263/how-can-i-redirect-404-pages-to-home-page-in-magento-community )


texts: New Customer address attribute not saving on Frontend

texts:
I have created a new customer address attribute, it shows the field correctly on the frontend BUT it doesn't allow you to save the data.

It does work correctly when saving through admin, and then does appear on the frontend after a cache flush.


texts: Category product positioning not working

texts: Category product positioning is not working in one of our webshops running magento 2. Product listing is set on position in admin and the category, and all products have their own position set in category settings, yet product listing in frontend is not changed. Any thoughts on how to solve this?


texts:
I am developing a module for Magento 2. I save some custom data to Magento 2 checkout session. When does magento 2 clear the checkout session, when does the checkout session start and end?
I want to save my data some where that the data should be cleaned out when user hits "Place order" button
How does Magento persist the billing, shipping info? When I enter my info in the checkout page, after I navigate to other pages then come page, the info is still there. When I purchase an order, that info on checkout page is cleaned
Thank you,


texts: Magento 2 Registration form in parallel language

texts:
I have a requirement to show Registration form in two languages parallel, English in the left and Arabic in the right and User can add information in either or both fields and the information is saved against the field,

So if user add information in English or Arabic the other field is not required anymore and the information is saved in both firstname field and firstname_ar fields,

I already have custom fields registration plugin that will allow add extra fields in registration form

Update: Please note that this requirement is for all fields in registration form and I have a plugin that allow user to add product from front end from their profile, I will need to add this feature there too


texts: Set multiple recurring billing cycle option for a product

texts:
Is there a way to set multiple billing cycle options for a product? For Instance, a product having  billing options for every 2 months, quarterly or yearly.

Thanks


texts: How to show image of the Product in custom email. Magento 2

texts:
I'm getting my custom data from email function and also I'm getting the Product image URL to show it in mail now I tried many ways to show my image in email but its not working for me my custom email code is

    {{template config_path="design/email/header_template"}}

Name: {{trans "%name" name=$name}}

Email: {{trans "%email" email=$email}}

Phone Number: {{trans "%pnumber" pnumber=$pnumber}}

Offer Amount: {{trans "%offeramount" offeramount=$offeramount}}

Message: {{trans "%message" message=$message}}

Product Name: {{trans "%product_name" product_name=$product_name}}

Product Price: {{trans "%product_price" product_price=$product_price}}

URL: {{trans '%imgUrl' imgUrl=$imgUrl}}

{{template config_path="design/email/footer_template"}}

In email it shows like

so the URL is comming perfectly but in case of img tag when I paste the URL in img src="here" then it is not working how can I set the URL in img src


texts: How can i disable till 1 week next future dates in Magento js Calendar?

texts:
I want to allow customer to choose dates after 1 week from current date.

Like as today date is 15 Feb 2019 so customer can select dates from 22 feb 2019.

I did change js for calendar by adding below code .

var calendarSetupObject = {
                inputField  : "' . $this->getId() . '",
                ifFormat    : "' . $displayFormat . '",
                showsTime   : "' . ($this->getTime() ? 'true' : 'false') . '",
                button      : "' . $this->getId() . '_trig",
                align       : "Bl",
                singleClick : true,
                 disableFunc: function(date) {
                     var now = new Date();

                if(date.getFullYear()   <   now.getFullYear())  { return true; }
                if(date.getFullYear()   ==  now.getFullYear())  { if(date.getMonth()    <   now.getMonth()) { return true; } }
                if(date.getMonth()      ==  now.getMonth())     { if(date.getDate()     <   now.getDate()+7)  { return true; } }
                 }

            }

so now its displaying same calendar what i want but its not allowing me select date 22 feb now .


texts: Magento2: How to display brand description on product page

texts:
I use free version MGS Brand:
https://www.magesolution.com/magento2-shop-by-brand.html
This extension allows display brand description in products brand page. http://m2.magesolution.com/demo/shop-by-brand/apple
How to display also this brand description on product page?


texts: Magento 2 admin top menus are not working?

texts:
Recently I did a fresh installation of Magento 2 via composer. It was installed properly. But when I log into admin panel and try click any top menu, those are not redirecting. They haven't given any link for those menus. See the image below.

And in my browser (firefox) javascripts are enabled. See below.

How to resolve this? Am I missing anything?

NOTE: My magento version is ver. 0.42.0-beta11

Any help would be appreciated.


texts: Magento 2.3 product Image getImage() very bad performance

texts:
I have a Magento 2.3.5 installation with more than 40,000 products and 5 store views. The page load of any category is more than 10 seconds. I've found that this function takes between 0,08 seconds and 0,1 seconds:

$productImage = $block->getImage($_product, $imageDisplayArea);

It's inside the file: vendor/magento/module-catalog/view/frontend/templates/product/list.phtml

So, if I have 81 products to show (like me), it takes more than 10 seconds to load (0,09s x 81 products=7,29seconds).

Why does it takes so long that function?


texts: Magento 2 : Is there Any Method to Add 3rd Step Before Final Place Order Button is Clicked?

texts: I want to add step before final checkout is done to show order summary (address, shipping details, and payment method etc. which are selected by customer). how to implement? Please help.


texts: Problem in creating new block in Admin order page?

texts:
I am trying to create a new block in my admin panel "Sales->Order->View" Information tab.

In my extension's block folder i have a folder named Adminhtml in this i have file named : Company.php

class Namespace_Modulename_Block_Adminhtml_Company extends Mage_Adminhtml_Block_Sales_Order_Abstract
{
}

In my extension module i have placed this code in config.xml under etc folder

 <adminhtml>
    <layout>
        <updates>
            <modulename>
                <file>module.xml</file>
            </modulename>
        </updates>
    </layout>
</adminhtml>

then i have my adminhtml layout file as :

<?xml version="1.0"?>
  <layout version="0.1.0">
   <modulename_adminhtml_company_index>
    <reference name="order_info">
        <block type="modulename/adminhtml_company" name="modulename" template="company.phtml" />
    </reference>
   </modulename_adminhtml_company_index>
  </layout>

But nothing happened yet,

Thanks in advance,


texts: Getting Failure issues in magento commerce cloud when merging code from staging to production

texts:
Hi I am working in  Magento cloud  when merging the code from staging to production i am getting merge conflict issue

Preparing to merge environment 'staging' into master
Checking out repository
Executing merge
  Auto-merging .magento/routes.yaml
  CONFLICT (content): Merge conflict in .magento/routes.yaml
  Automatic merge failed; fix conflicts and then commit the result.
E: Error: Unable to merge, resolve the conflict manually.

Please help me if anyone know how to solve.


texts: Magento 2: How to manage simple user (customer) login session for different device?

texts: Using Magento 2.2, I need to allow customer login only one device at a time. Ex. if the customer is already logged in the computer, but user tries to log in with a smartphone, the Magento will disconnect them from the computer?


texts: magento 1.9 THE UPLOAD ICON NOT SHOW IN CHROME

texts:
The upload icon and browse icon not showing in chrome
I have`nt this problem in firefox
thanks


texts: From which class category filter is added to the filter groups used for aggregation : magento 2 layered navigation. The aggregation and search classes are used for getting the count of products in each filter in layered navigation. But when the category filter is added to the group of filters which is later used by the search Class.


texts: Show error when pay with paypal sandbox express checkout with recurring product

texts:
I got the error when I was checkout a recurring product using PayPal sandbox express checkout.
error:

  PayPal gateway has rejected request. Timeout processing request (#10001: Internal Error).

I want to  sandbox Recurring Payments Profile with Express Checkout thus recurring  products charge  will  deducted automatically  periodically from PayPal sandbox.

Scenario1:
buy a recurring product from Magento and go to checkout step.

I am now at PayPal tab and select PayPal express payment  which set using sandbox details.

Click on continue button and go to sandbox PayPal account and I have done pay with sandbox  personal account and it is charge one billing cycle and pay done, and come to magento paypal express check page(paypal/express/review/)  and click on place order show this  error:

issue: why I can not checkout.

issue2: can I setup recurring payment on PayPal thus pay will automatically deducted from my account PayPal account


texts: addStoreFilter() is not working in Magento2.3

texts:
I need to filter the products by store. However, after many try for almost a day, I can't filter products by store.

        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();

        $productCollectionFactory = $objectManager->get('\Magento\Catalog\Model\ResourceModel\Product\CollectionFactory');
        $collection = $productCollectionFactory->create();

        // filter current store products
        $collection->addStoreFilter();
        $collection->addFieldToFilter('entity_id', ['in' => $best_selling_product_id]);

$best_selling_product_id is an array of product ID's. However, above code returns products from all stores.

Can someone help me here?


texts: How to get grand total in checkout cart in custom cms block?

texts:
I want to get grand total value in checkout cart page in cms block, I already get value of grand total but when value of grand total changed, grand total value in cms page does not change.

Anyone have any solution? Thanks.


texts: show full Credit Card Information in Sales Email In Magento

texts: I receive credit card details in email like 4574xxxxx in email, but I want all the digit of credit card no in email, I don`t know which template is using for sending email. Please help for displaying full credit card no in email template.


texts: Add Magento Existing project to Github repository

texts:
I want to link my staging and live site.My workflow is as follow
First i have done changes locally then upload it to staging and live site manually.Now i want to automate this process.I need to done changes locally then upload it to new branch.Then want to take pull at staging and live site.I have take backup of staging site and set it locally.I am confused in these steps can someone give me a direction in it?


texts: Magento 2: Product zoom magnifier is not working properly

texts:
I have used deafult Magento's product zoom magnifier on our website and want to show the zoom window within the image container but its not working properly. Its not zooming well and I'm not sure what am I missing here. Below is the code I'm using:

<var name="magnifier">
                <var name="fullscreenzoom">200</var>  <!-- Zoom for fullscreen (integer)-->
                <var name="top"></var> <!-- Top position of magnifier -->
                <var name="left"></var> <!-- Left position of magnifier -->
                <var name="width">1000</var> <!-- Width of magnifier block -->
                <var name="height">1000</var> <!-- Height of magnifier block -->
                <var name="eventType">hover</var>
                <var name="enabled">true</var>
                <var name="mode">inside</var>
        </var>

Can anyone please me on this issue?


texts: How to add a button adjacent to Update cart button in Magento2.1 cart page?

texts:
How can I add a custom button adjacent to Update Shopping car button in Magento2.1?

I created a file checkout_cart_index.xml with following content.

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="content">
            <block template="Namespace_Module::custom/mybutton.phtml" class="Magento\Framework\View\Element\Template" name="my.button" as="my.button"/>
        </referenceContainer>
    </body>
</page>

But it shows button below the Apply Discount Code  section.

Is it possible to achieve this without overriding cart/form.phtml

<block class="Magento\Checkout\Block\Cart" name="checkout.cart.form" as="cart-items" template="cart/form.phtml" after="cart.summary">
    <block class="Magento\Framework\View\Element\RendererList" name="checkout.cart.item.renderers" as="renderer.list"/>
    <block class="Magento\Framework\View\Element\Text\ListText" name="checkout.cart.order.actions"/>
</block>


texts: What is the role of Crypt Key in env.php Magento 2

texts: What is the role of crypt in env.php in magento 2. The file is located at app/etc/env.php


texts:
In final stage to install Magento2 version 2.4 by the following command i got an error.
this is my command:
./magento setup:install --base-url=http://localhost.com/magento2 --db-host=localhost --db-name=D --db-user=root --admin-firstname=admin --admin-lastname=admin --admin-email=admin@admin.com --admin-user=admin --admin-password=admin123 --language=en_US --currency=USD --timezone=America/Chicago --use-rewrites=1

and after starting installing i got this error:
[Progress: 1011 / 1282]
Module 'Magento_CmsUrlRewriteGraphQl':
[Progress: 1012 / 1282]
Module 'Magento_ComposerRootUpdatePlugin':
Running data recurring...Reading /var/www/html/magento2/bin/composer.json
Loading config file /var/www/html/magento2/var/composer_home/auth.json
Loading config file /var/www/html/magento2/bin/composer.json
Executing command (/var/www/html/magento2/bin): git branch --no-color --no-abbrev -v
Executing command (/var/www/html/magento2/bin): git describe --exact-match --tags
Executing command (/var/www/html/magento2/bin): git log --pretty="%H" -n1 HEAD
Executing command (/var/www/html/magento2/bin): hg branch
Executing command (/var/www/html/magento2/bin): fossil branch list
Executing command (/var/www/html/magento2/bin): fossil tag list
Executing command (/var/www/html/magento2/bin): svn info --xml
Failed to initialize global composer: Composer could not find the config file: /var/www/html/magento2/var/composer_home/composer.json
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
Reading /var/www/html/magento2/bin/vendor/composer/installed.json
Web Setup Wizard installation of "magento/composer-root-update-plugin" failed; unable to load /var/www/html/magento2/bin/composer.lock.

[Progress: 1013 / 1282]
Module 'Magento_User':
[Progress: 1014 / 1282]
Module 'Magento_Checkout':
[Progress: 1015 / 1282]
Module 'Magento_Downloadable':

and after the installation finished, i got this message:
Magento installation complete.

And after that should my address http://localhost.com/magento2  let me start working on magento2,
but when i go to my address, i got blank page.
I tried to resolved this error:
Web Setup Wizard installation of "magento/composer-root-update-plugin" failed; unable to load /var/www/html/magento2/bin/composer.lock.

by this command
composer require magento/composer-root-update-plugin=~1.0 --no-update

but nothing happened, after my research there's no solution match this error.
please if there's anyone can help me with this problem?
i'll be grateful, and another problem is my address does not  working correctly, i got blank page.
maybe that error is the problem, really i don't know.
thank you.


texts:
i want to change from developer to production, but i can't because i get an error that exec function is disabled and my host will not enable it.

What are the actions taking place when you type

bin/magento deploy:mode:set production

Can I do it step by step with these commands?

bin/magento setup:static-content:deploy
bin/magento setup:di:compile
Enable production mode through .htaccess

Is there anything else i have to do in order to have the same result?


texts: Active `current` CSS class not working on Custom Tab in customer account section in Magento2

texts: I have added custom tab menu in customer account dashboard but when I click on that custom tab not showing active.


texts: How to display product discount percent on product details page in Magento 2.1.8?

texts:
I don't know how to implement this task.This is my task screenshot.Please check my screenshot.

Any help will be appreciated.


texts: shopping cart is empty while magento cache is enabled

texts:
Magento 1.9 shows 'shopping cart is empty' when i add product to cart while default cache enabled. when i turn off the cache, cart is working fine.

my session and cookie settings seems to be fine

Cookie Lifetime: 86400
Cookie Path: /
Cookie Domain: .website.com
Use HTTP Only: No
Cookie Restriction Mode: No

Use SID on Frontend: Yes

maybe this issue from 'xcache' it's enabled in my server..?

xcache.admin.enable_auth="on"
xcache.admin.pass="*****"
xcache.admin.user="mOo"
xcache.cacher="On"
xcache.coredump_directory=""
xcache.count="1"
xcache.coveragedump_directory="/tmp/pcov/"
xcache.coverager="Off"
xcache.gc_interval="0"
xcache.mmap_path="/dev/zero"
xcache.optimizer="Off"
xcache.readonly_protection="Off"
xcache.size="0"
xcache.slots="8K"
xcache.test="Off"
xcache.ttl="0"
xcache.var_count="1"
xcache.var_gc_interval="300"
xcache.var_maxttl="0"
xcache.var_size="0"
xcache.var_slots="8K"
xcache.var_ttl="0"


texts:
I'm a little bit confused about cron job parameters. I'm using bitnami magento installation on amazon azure. I found that if I want to run cron tasks I have to configure cron job

and there is this line

* * * * *  su daemon -c "/bin/sh /opt/bitnami/apps/magento/htdocs/cron.sh"

and I do not understand how frequently I will run ? As I understant setting my own cron task I will also have to use asterisk to set frequency. Can anyone explain how to understand this asterisk convention ?

Thanks in advance.


texts: How can I show the amount saved in magento 2

texts:
I am trying to display amount saved on the catalogue page for a magento 2.0.2 website. However I'm not getting the calculation result displayed. I just get an empty space. I am editing the final_price.phtml in my theme file. Please can I get some advice on what I am doing wrong. I can't find any information from searches as most results are for magento 1 and the codes are throwing errors This is what my code looks like in the section which i am trying to do the calculations.

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

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

Saving:
<?php
$wasPrice = $block->renderAmount($priceModel->getAmount(), []);
$nowPrice = $block->renderAmount($finalPriceModel->getAmount(), []);
  if ($nowPrice < $wasPrice){
    $saving = $wasPrice - $nowPrice;
    echo $saving;
  }
?>


texts: Magento2: unable to call catalog_product_view_type_downloadable.xml in magento2?

texts:
I have override the catalog_product_view_type_downloadable.xml in my module as

MyVendor/Downloadable/view/frontend/layout/catalog_product_view_type_downloadable.xml

But unable to call the changes done in xml file it only calls the default catalog_product_view.xml.

Can anyone help me to find reason for error in xml file.

catalog_product_view_type_downloadable.xml

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

<body>
    <attribute name="class" value="custom-downloadable-product"/>

    <referenceContainer name="product.info.addtocart.additional" remove="true" />
    <referenceContainer name="product.price.final.copy" remove="true" />
    <referenceContainer name="product.info.price" remove="true" />
    <referenceBlock name="product.info.stock.sku" remove="true"/>
    <referenceBlock name="product.info.review" remove="true"/>
    <referenceBlock name="page.main.title" remove="true"/>
    <referenceBlock name="product.info.overview" remove="true" />
    <referenceBlock name="product.info.options.wrapper" remove="true" />
    <referenceBlock name="view.addto.compare" remove="true" />
    <referenceBlock name="product.info.mailto" remove="true" />
    <referenceBlock name="product.info.details" remove="true" />
    <referenceBlock name="product.info.options.wrapper.bottom" remove="true"/>
    <referenceBlock name="product.info.downloadable.samples" remove="true"/>

    <referenceBlock name="breadcrumbs" remove="true" />
    <referenceBlock name="product.info" remove="true" />
</body>

module.xml

<module name="MyVendor_Downloadable" setup_version="1.0.8">
    <sequence>
        <module name="Magento_Downloadable"/>
        <module name="Magento_Catalog"/>
    </sequence>
</module>


texts: Magento 2 site crashing after 2 weeks (Believed cron or mysql problem)

texts:
I have a magento 2 site working however it keeps crashing randomly after running smoothly for 2 weeks. I reboot my site after the crash and it seems to stay for about a day or so before crashing again.
I've checked my system.logs and I have found this

[2018-09-17 19:02:52] main.WARNING: Could not acquire lock for cron group:index, skipping run [] []
[2018-09-17 19:03:16] main.INFO: 0 cron jobs were cleaned [] []
[2018-09-17 19:03:19] main.INFO: 11 cron jobs were cleaned [] []
[2018-09-17 19:03:28] main.WARNING: Could not acquire lock for cron
group: default, skipping run [] []
[2018-09-17 19:03:41] main.WARNING: Could not acquire lock for cron
group: default, skipping run [] []
[2018-09-17 19:07:33] main.WARNING: Could not acquire lock for cron
group: default, skipping run [] []
[2018-09-17 19:07:35] main.WARNING: Could not acquire lock for cron
group: index, skipping run [] []
[2018-09-17 19:07:38] main.WARNING: Could not acquire lock for cron
group: default, skipping run [] []
[2018-09-17 19:07:45] main.WARNING: Could not acquire lock for cron
group: index, skipping run [] []
[2018-09-17 19:12:02] main.WARNING: Could not acquire lock for cron
group: index, skipping run [] []
[2018-09-17 19:12:15] main.WARNING: Could not acquire lock for cron
group: ddg_automation, skipping run [] []
[2018-09-17 19:12:16] main.WARNING: Could not acquire lock for cron
group: index, skipping run [] []
[2018-09-17 19:12:35] main.WARNING: Could not acquire lock for cron
group: default, skipping run [] []
[2018-09-17 19:13:01] main.WARNING: Could not acquire lock for cron
group: default, skipping run [] []
[2018-09-17 19:13:57] main.WARNING: Could not acquire lock for cron
group: default, skipping run [] []
[2018-09-17 20:59:52] main.ERROR: MySQL connection failed:
SQLSTATE[HY000] [2002] No such file or directory [] []
[2018-09-17 20:59:51] main.ERROR: MySQL connection failed:
SQLSTATE[HY000] [2002] No such file or directory [] []
[2018-09-17 20:59:51] main.ERROR: MySQL connection failed:
SQLSTATE[HY000] [2002] No such file or directory [] []

I believe the issue is to do with my mysql server according to the log but I have no clue as to how to resolve this.
Any help would be much appreciated :)


texts:
I need to override a template file \Magento\Customer\view\frontend\templates\form\register.phtml in my custom module.

According to Magento's document. I know that creating a custom theme module can fit my need, but I want to know other than creating a custom theme module, are there some other methods for overriding a template file?

Thanks in advance.


texts: How to mock a class property in Magento 2 Unit Test

texts: How can I mock a class attribute such as a particular object (Ex: \Magento\Catalog\Model\Product)


texts:
So I have been working hard to learn Magento but made a change sometime back and I'm not sure how to fix it. When I display all products of a particular category it is showing all products instead of a single configurable product. Example: Master product is "box" configurable option are "size" and "color" of the box. My product page shows all the different sizes and colors instead of 1 box with the price range of available options.
I don't make changes to the contents of files, just in the admin console, so I am assuming the fix is in there somewhere. Any help is appreciated.


texts: Load products into custom theme home in magento 2.0.1?

texts:
I have created a custom theme which extends to a blank theme. After setting custom theme I have lost my product on home page only. What I want to do load product into the content area of the custom theme. I am trying to override templates but no effect. At the same time, I feel difficult to finding appropriate layouts to override like (cms_page_view.xml for home page), developer tool display only templates and Blocks not layouts.

Theme Path:/app/design/frontend/ChennaiBox/Style/theme.xml

I want to load product into below green box like luma theme home page

Please post any code snippet to regarding this or just provide hints to what are the steps to achieve this.

Appreciate for any help. Thanks


texts: Product Subtotal Price is more than the Product Unit Price

texts:
Hi!

We have setup magento with 3 Currency options - USD, IDR & INR and the checkout payment goes to paypal, however the price of the products get increased for IDR & INR while with USD the product price remains the same. Below are 3 screenshots to help us understand the difference in product price in Units and in SubTotal in the View Cart page and on checkout.

http://postimg.org/gallery/q8rxvqqa/

Base Currency & Default Display Currency is USD.

No Tax has been setup yet.

No Shipping settings/method has been setup yet.

Webservicex is used to manage the currency rates.

As you can see the Price is in subtotal gets increased from that of the price in units.

Would you help us with the reason why this is happening and how can we resolve it.

Thanks,

Nitesh.


texts: Magento Method ReflectionParameter::getClass() is deprecated

texts: Deprecated: Method ReflectionParameter::getClass() is deprecated in C:\xampp\htdocs\DemoWebsite\vendor\magento\framework\Code\Reader\ClassReader.php on line 34


texts: Magento 2 rest api - How to post a product attribute?

texts:
I'm new in Magento 2, I want to add an attribute using REST api. Is it possible? I use the follow code for products:

<?php
    ini_set('display_errors', 1);
    ini_set('display_startup_errors', 1);
    error_reporting(E_ALL);

$url = "http://mywebsite/";
$token_url = $url."rest/V1/integration/admin/token";
$product_url = $url. "rest/V1/products";
$username = "myUserName";
$password = "myPassword";

$ch = curl_init();
$data = array("username" => $username, "password" => $password);
$data_string = json_encode($data);
$ch = curl_init($token_url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Content-Type: application/json',
    'Content-Length: ' . strlen($data_string))
    );
$token = curl_exec($ch);
$adminToken=  json_decode($token);

$sampleProductData = array(
        'sku'               => 'config_product-small-red',
        'name'              => 'Simple Product ' . uniqid(),
        'visibility'        => 4, /*'catalog',*/
        'type_id'           => 'simple',
        'price'             => 99.95,
        'status'            => 1,
        'attribute_set_id'  => 4,
        'weight'            => 1,
        'custom_attributes' => array(
            array( 'attribute_code' => 'category_ids', 'value' => ["42","41","32"] ),
            array( 'attribute_code' => 'description', 'value' => 'Simple Description' ),
            array( 'attribute_code' => 'short_description', 'value' => 'Simple Short Description' ),
          array( 'attribute_code' => 'size', 'value' => '5' ), //5=small
          array( 'attribute_code' => 'color', 'value' => '8' ), //8-red
            ),
    'extension_attributes' => array(
        "stock_item"=>array(
            "qty"=>10,
            "is_in_stock"=>true,
        ),

    )
    );
$productData = json_encode(array('product' => $sampleProductData));
$setHaders = array('Content-Type:application/json','Authorization:Bearer '.$adminToken);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $product_url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $productData);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, $setHaders);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
var_dump($response);

?>

How can I do the same for product attributes?


texts: When remove Breadcrumb from site it remove Page Title on catalog pages

texts:
I have tried to remove breadcrumb from the whole site using below code.

<reference name="root">
    <remove name="breadcrumbs"/>
</reference>

Or just

<remove name="breadcrumbs"/>

When put this code to local.xml it remove Page Title on catalog Pages

Is there any other safe way to remove breadcrumb from the whole site.


texts: Currency drop down not showing when default currency set to GBP

texts: I set my default currency to GBP, after that my currency dropdown does not shows at all.  When I change it to CND it works. What could be the issue, please help.


texts: What is the purpose of the method getTable()?

texts:
I have a question about the SetupInterface method getTable($tableName).

What is its role? Why should I use this method instead of using directly the name of the table I want to work on?

Is it in case I need to work on differents databases?


texts: I am developing an e-commerce application in android using Ksaop2 library. I want to sort products, is there any magento Ksoap API to sort products according to price, name etc.


texts: Magento 2 : Error when try to set image for product and save

texts:
When i'm trying to set image for the product

$configurable->setMediaGallery(array('images'=>array (), 'values'=>array ()));
$path = $this->helper->uploadImage($data->main_image);
if ($path && file_exists($path)) {
    $configurable->addImageToMediaGallery($path, array('image', 'small_image', 'thumbnail'), true, false);
}

and then when save it i'm getting an error

  Exception #0 (Magento\Framework\Exception\FileSystemException): The file "... pub/media/tmp/catalog/product/8/1/81cz5-izU0L.jpg" doesn't exist or not a file

Looks like some permission issue but i've checked all directories have all needed access.
Any suggestions?
Thanks.


texts: Getting error in downloading repository Magento 2 via composer

texts:
I am using windows 10 and node js command prompt with latest composer version. The xampp already install with supporting magento2 PHP directives.
When i am trying to install a new magento 2 version 2.4.x and type the command this
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition <mydirectory>
I got the following error:
Problem 1
- Root composer.json requires magento/composer-root-update-plugin ~1.0 -> satisfiable by magento/composer-root-update-plugin[1.0.0].
- magento/composer-root-update-plugin 1.0.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.

Problem 2
- Root composer.json requires dealerdirect/phpcodesniffer-composer-installer ^0.5.0 -> satisfiable by dealerdirect/phpcodesniffer-composer-installer[v0.5.0].
- dealerdirect/phpcodesniffer-composer-installer v0.5.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.

Problem 3
- laminas/laminas-dependency-plugin[1.0.0, ..., 1.0.4] require composer-plugin-api ^1.1 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
- magento/product-community-edition 2.4.1 requires laminas/laminas-dependency-plugin ^1.0 -> satisfiable by laminas/laminas-dependency-plugin[1.0.0, ..., 1.0.4].

- Root composer.json requires magento/product-community-edition 2.4.1 -> satisfiable by magento/product-community-edition[2.4.1].

Any ideas how to get solution around this?


texts: Magento2: How to add product with price etc but with hidden button add to cart

texts:
We have created an additional category in our store with "buy multi-item".
We want to add there "banners" what products customers should add to the cart to reduce the price.
sample:

What product should I create (virtual, downloadable or other?) to show product in this category, show price and special price, show countdown timer  but without button add to the basket?
Can anyone have any sulution?


texts: Error is : Exception #0 (Exception): Warning: Invalid argument supplied for foreach() in

texts:
I am keep getting this error with my code although I only followed their instructions.

<?php

namespace Training\Test\App;

class FrontController extends \Magento\Framework\App\FrontController

{

protected $routerList;

protected $response;

protected $logger;

public function __construct(

    \Magento\Framework\App\RouterList $routerList,
    \Magento\Framework\App\Response\Http $response,
    \Psr\Log\LoggerInterface $logger)

{

    $this->routerList = $routerList;
    $this->response = $response;
    $this->logger = $logger;
}

public function dispatch(\Magento\Framework\App\RequestInterface $request)
{
    foreach($this->routerList as $router)
    {
        $this->logger->addDebug(get_class($router));
    }
    return parent::dispatch($request);
}

}


texts: How can i enable debug at front end side without admin access?

texts: I want to see template path hint at front side using file changes. I don’t want change in admin area for template hint. Any suggestion?


texts:
how to set custom field in order and use that field in all the appropriate linked pages like order admin grid, customer my account page, order details page in admin.
I want to create one field in checkout page and save that field in order details. so that i can show that field in all related order pages.
I have seen the below link but no luck.
https://stackoverflow.com/questions/17599566/magento-add-custom-attribute-to-order


texts: How to fetch meta descripion of product in magento

texts: I want to fetch product's meta description.how can I do that?


texts: I have a cron setup to run every hour. The magento cron setting "Schedule Ahead for" parameter has a setting of 15. Right now when the cron executes, it runs my custom script for 15 times. What I want is to execute the script only once. My question is this. If I change the schedule to make it 1, will it affect the rest of the operations? How to handle this issue from my custom module? Thanks.


texts: Get Shipping Methods by postCode and countryId

texts:
I want to get all the available shipping methods along with their prices by postCode and countryId in a page which is not Checkout page.

Example: I have CountryId as 'IN' and postCode as '560029' in a phtml file of backend orders page. Now i want to get all the available shipping methods with their prices which will be displayed for the customer in frontend in checkout page as follows.

Please let me know how can i get all the shipping methods with their prices using countryId and postCode.


texts:
I have a couple of Magento sites (only selling a couple of products from the sites) that have been upgraded a few times since 2010 (now on v1.9) and they have gradually become slower.

The page load time between the product page and checkout is now 30 seconds! I've cleared out the SQL database. I guess I need someone to perform test the whole site and cure the problems but don't really know where to get sensible advice. can anyone point me in the right direction?

Apologies if I have posted this in the wrong place or on the wrong forum


texts: Magento 2: insert products images alt tag programmatically

texts: I need to insert ATL tag for catalog products images programmatically. Is there any way to do it?


texts: SUPEE-10570 and Foreign Key Constraint Error

texts:
Last night I installed SUPEE 10570 and today we're seeing numerous errors in our Celigo connector that syncs item updates from NetSuite over to Magento via Web Services.  In particular, it's failing when trying to update Upsell Skus.  The error is:

  Integrity constraint violation: 1452 Cannot add or update a child row:
  a foreign key constraint fails
  (`mydatabase`.`catalog_product_link`, CONSTRAINT
  `FK_CAT_PRD_LNK_LNKED_PRD_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY
  (`linked_product_id`) REFERENCES `catalog_product_entity`
  (`entity_id`) O)

Since this is a new issue and it's now so prolific I'm concerned it's related to the security patch.  I know the patch did touch on a number of core files but I couldn't identify any change that may cause this.  Has anyone else had similar issues and/or can point me in the right direction?

== EDIT ==

Adding FK info from DB

mysql> SELECT TABLE_NAME,COLUMN_NAME,CONSTRAINT_NAME, REFERENCED_TABLE_NAME,REFERENCED_COLUMN_NAME FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE REFERENCED_TABLE_SCHEMA = 'value_pet_supplies' AND REFERENCED_TABLE_NAME = 'catalog_product_entity' AND COLUMN_NAME = 'linked_product_id';
+----------------------+-------------------+--------------------------------------------------+------------------------+------------------------+
| TABLE_NAME           | COLUMN_NAME       | CONSTRAINT_NAME                                  | REFERENCED_TABLE_NAME  | REFERENCED_COLUMN_NAME |
+----------------------+-------------------+--------------------------------------------------+------------------------+------------------------+
| catalog_product_link | linked_product_id | FK_CAT_PRD_LNK_LNKED_PRD_ID_CAT_PRD_ENTT_ENTT_ID | catalog_product_entity | entity_id              |
+----------------------+-------------------+--------------------------------------------------+------------------------+------------------------+


texts: How to Display and change values of 2nd multi-select dropdown by selecting 1st drop-down?

texts: I want to show multi-select drop-down with check-boxes(like categories on product edit page in admin panel) which values are depends on 1st drop-down(which is single select) in my custom Ui component form in admin panel.


texts: Why does RMQ Topic handler is never triggered?

texts:
I'm getting stuck with my Topic Handler in Magento.
I have a working RMQ consumer, I can read message on the Queue, no problem.
Here is the communication.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <topic name="shipmentQueue" request="string" response="string">
        <handler name="shipmentQueueShippingRequestHandler" type="Acme\MessageQueue\RequestHandler\ShippingRequestHandler" method="process"/>
    </topic>
</config>

Here is the ShippingRequestHandler class:
<?php

namespace Acme\MessageQueue\RequestHandler;

class ShippingRequestHandler
{
    /**
     * @param string $simpleDataItem
     * @return string
     */
    public function process($simpleDataItem)
    {
        echo __LINE__." $simpleDataItem ";
    }
}

And here is my queue_consumer.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <consumer
        name="shipmentQueue.consumer"
        queue="shipmentQueue"
        connection="amqp"
        handler="Acme\MessageQueue\Consumer\OrderExport::shippingProcess"/>
</config>

The OrderExport::shippingProcess() is correctly triggered, but the topic handler is never ever triggered, why ?
The main problem is that our rmq is sending JSON object and Magento want a String, so I want to process the queue message from JSON To string.
If my RMQ is sending JSON, none of the handler is triggered and I get those in logs :
Message has been rejected: Error occurred during message decoding.
Message has been rejected: Message with topic "shipmentQueue" must be an instance of "string"

Isn't Magento 2 allowing JSON message ?


texts: What are the default folders in the root of a new Magento 2.2.6 install?

texts:
May sound odd, and maybe I'm searching for the wrong thing, but I cannot find a list of the folders that should be created in a default install of 2.2.6 that is set to production, with sample data. And has static content deployed.

Looking for the root folders only. I'm fairly certain it has changed since Magento 2.0, but my search has been fruitless.


texts: Data/profile export categories name instead of Ids (Magento 1.9)

texts:
I have done this script to runs data/profile using ssh terminal to export csv data of all products inside of magento 1.9.
I need to have the category name (structure tree) instead of category Ids but i do not know how to do that.
Attached my code.
<?php
#$profileId = 1; #All Products
$profileId = 49; #OnSale
require_once 'app/Mage.php';
umask(0);
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
$profile = Mage::getModel('dataflow/profile');
$userModel = Mage::getModel('admin/user');
$userModel->setUserId(0);
Mage::getSingleton('admin/session')->setUser($userModel);
$profile->load($profileId);
if (!$profile->getId()) {
 Mage::getSingleton('adminhtml/session')->addError('[ERROR] Invalid ID');
}
Mage::register('current_convert_profile', $profile);
$profile->run();
$recordCount = 0;
?>