texts: Magento 2: how to change the color of dots below product image gallery?

texts:
In the mobile view of product page (Blank theme) there are dots below the image gallery to indicate the active image.

I tried to changed the color of those dots (orange by default) in the file I use for my custom theme's customizations. However the dots classes are defined in a gallery.css file, I guess that's why the new values I set in my custom theme haven't been applied.

How can I override / extend the values from the gallery.css file?


texts: Attributes showing as numbers on front end

texts:
I have added a new drop-down attribute called features to products.

It is basically a list of options that I want to show on the front end. I have used this code to my list.phtml file for get option values:

<?php echo $_product->getfeatures() ?>

But it will display as number instead of text on fronted.

How I can display drop down option value as text ?

The below picture shows 2 features but instead of text it shows as numbers. Can anyone help?


texts: Magento 2.4 Rest API need to show filters related search result

texts:
Following code fetch the products based on search keyword but the issue is filtering showing all instead of the search result page.
I want filters should be shown only related to the search result page only.
   //Code for fetch products based on search term.
    $this->_storeManager->setCurrentStore($storeid);
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $filterBuilder = $objectManager->get('Magento\Framework\Api\FilterBuilder');
    $searchCriteriaBuilder = $objectManager->get('Magento\Framework\Api\Search\SearchCriteriaBuilder');
    $searchInterface = $objectManager->get('Magento\Search\Api\SearchInterface');
    $filterGroupBuilder = $objectManager->get('Magento\Framework\Api\Search\FilterGroupBuilder');

    $search_criteria = $searchCriteriaBuilder->create();
    $search_criteria->setRequestName("quick_search_container");
    $filter = $filterBuilder->setField('search_term')
    ->setValue($q)
    ->setConditionType("like")
    ->create();
    $filterGroup = $filterGroupBuilder->addFilter($filter)->create();
    $search_criteria->setFilterGroups([$filterGroup]);
    $resultx = $searchInterface->search($search_criteria);
    //var_dump($resultx); exit;

    $totalSearchResults = $resultx->getTotalCount();

    $products = $resultx->getItems();

    if(count($products) == 0)
    {
      echo json_encode(array('status' => false,'message' => 'No data found'));exit;
    }

    $product_data = array();
    foreach ($products as $pro) {
        //echo $product->getId(); exit;
        $product = $this->_productRepositoryFactory->create()->getById($pro->getId(),false,$storeid);
        $product_data[] = array(
        'product_id' => $product->getData('entity_id'),
        'sku' => $product->getData('sku'),
        'currency' => $this->_storeManager->getStore()->getCurrentCurrencyCode(),
        'type' => $product->getData('type_id'),
        'visibility' => $product->getData('visibility'),
        'status' => $product->getData('status'),
        'url_key' => $product->getData('url_key'),
        'url_path' => $product->getData('url_path'),
        'image' => $this->imageHelper->init($product, 'product_page_image_medium')->getUrl(),
        'is_in_stock' => $this->getStockStatus($pro->getId()),
        'price' => $product->getData('price'),
        'special_price' => $product->getData('special_price')

        );

    }

    //Code for filter.
    $rootCategoryId = $this->_storeManager->getStore()->getRootCategoryId();
    $category = $this->_categoryFactory->create()->setStoreId($storeid)->load($rootCategoryId);
    $filterableAttributes = $objectManager->get(\Magento\Catalog\Model\Layer\Category\FilterableAttributeList::class);
    $layerResolver = $objectManager->get(\Magento\Catalog\Model\Layer\Resolver::class);
    $layer = $layerResolver->get();
    $layer->setCurrentCategory($category);
    $filterList = $objectManager->create(
        \Magento\Catalog\Model\Layer\FilterList::class,
        [
            'filterableAttributes' => $filterableAttributes
        ]
    );
    $collection = $layer->getProductCollection();
    $allFilters = $filterList->getFilters($layer);
    $activeFilters = $this->_appApiHelperData->getFilters($allFilters,$storeid);

    $returnArray['total_count'] = count(array_unique($product_data,SORT_REGULAR));
    $returnArray['product_data'] = $product_data;
    $returnArray['filters'] = $activeFilters;


texts: magento1.9 soap api to get invoice information

texts:
I wants to get the invoice information based on order id in magento 1.9

using soap api.

Thanks.


texts: Magento 1.14 : Maintenance page for different stores

texts:
If I have a magento install with several stores, how to configure the errors map, in order to have specific maintenance pages for each store.
The structures of the stores are app/design/frontend/theme/ and this theme has four different folders, corresponding to four different stores.
I really appreciate the help you can provide me on this.


texts: Google is not finding my product images - Magento 1.7 CE

texts:
Google images are not displaying any of our product images; whether we Google for the company name or not, perhaps I'm doing something wrong.

Our web site is www.bellydeluxe.de

If someone could take a look and give me some insights in to what I can do to ensure our image results show up on Google, that would be really appreciated!


texts: Magento 2 how to add products into cart without loading page

texts: Magento 2 how to add products into the cart without loading page and I need to check every time quantity in DB and after adding the product into cart the product quantity must be reduced and check it


texts: Can't proceed with installing Magento by executing bin/magento config:set command

texts:
I try to install Magento 2 and create/configure a new magento project.
Steps:

Executed command:
bin/magento setup:install \

--backend-frontname=backend \
--amqp-host=rabbitmq \
--amqp-port= \
--amqp-user= \
--amqp-password= \
--db-host=db \
--db-name= \
--db-user=magento \
--db-password= \
--http-cache-hosts=varnish:80 \
--session-save=redis \
--session-save-redis-host=redis \
--session-save-redis-port=6379 \
--session-save-redis-db=2 \
--session-save-redis-max-concurrency=20 \
--cache-backend=redis \
--cache-backend-redis-server=redis \
--cache-backend-redis-db=0 \
--cache-backend-redis-port=6379 \
--page-cache=redis \
--page-cache-redis-server=redis \
--page-cache-redis-db=1 \
--page-cache-redis-port=6379

Executed command >> bin/magento config:set --lock-env web/unsecure/base_url "https://${TRAEFIK_SUBDOMAIN}.${TRAEFIK_DOMAIN}/"

Step 2 failed with the following result:
There are no commands defined in the "config" namespace.
Did you mean one of these?
app:config
module:config
setup:config
setup:store-config
When executing command php bin/magento list I get a list of available commands in Magento CLI 2.4.1 but the config commands are missing.
I did some research on the internet but couldn't find a solution for this. Can someone please help me to solve this issue.


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

texts:
Am I wondering how to add percentage discount value on the product details page?
I have found a similar topic, but apparently, it does not work with 2.2.1

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

upd:


texts: Magento 2 CSV Import: Not possible to import disabled products?

texts:
In the Magento 2 import/export, the "status" column is missing.

How can I import products with status "disabled"?

Adding the columns manually in a CSV for import, does not help, it's ignored.


texts:
Vendor autoload is not found. Please run 'composer install' under
  application root directory.

How to solve it?

When installing magento 2 in cpanel and my company server


texts: Unable to Place Order with Authorize .net Payment from Admin backend

texts:
I have configured Authorized .net in Magento 2 site. For this, I am using Sandbox credentials. From Frontend I am able to place order with Authorize.net. But from backend admin, I observed below (scenarios):

Case 1: with Valid authorize (test) credentials : - we are able to place order.

Case 2: with inValid credentials (expiry date): - the popup alert comes on clicking on Submit Order button with message:- "Gateway Error: The credit card has expired.". Later if we provided valid credentials then its giving Duplicate Key error - "Order saving error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '000000045-1' for key 'SALES_ORDER_INCREMENT_ID_STORE_ID' ".

That means still there is issue with Authorize net/Magento 2.

Please let me know how we can overcome/fix this.

Note: I am using - Magento EE version 2.0.7.

Thanks,


texts: How to change the label (shown in picture) of configurable product?

texts:
As you can see, once you click on a product you can select the volume.
However, the volume attributes are filled in correctly in magento (250 ML, 100 ML, 500 ML)
Still, on the website it is not shown correctly. It's shown without the 'ml' on some options.
What could be wrong? I tried googling for answers but no luck. I hope someone has an idea!


texts:
I'm trying to create a new widget. The development to admin works fine but not to frontend. Magento keep searching for my widget in mage.
The widget.xml is aboce. Any clue/help?

Widget.xml

        Show FAQs
        Show FAQs

** ERROR (is not in Mage)**
Warning: include(Mage\FAQs\Helper\Data.php): failed to open stream: No such file or directory  in C:\Projectos\WGM\lib\Varien\Autoload.php on line 94
and the widget wont appear in admin

With Widget.xml like this

        Show FAQs
        Show FAQs

I got no error when add the widget to a page via admin but when I call the page got an "exception 'Mage_Core_Exception' with message 'Tipo de Bloco inválido: Mage_FAQs_Block_Show' in C:\Projectos\WGM\app\Mage.php:595"

How can I tell Magento to find the widget in my module?
Thanks


texts: Unable to unserialize value error when customer data is not display on editing the details?

texts:
Getting error:

  Unable to unserialize value

vendor/magento/framework/serialize/json.php


texts: Magento 2 : Where Does Sample-Data Contain CSS Modifications

texts:
On Magento 2, There are tiles and stuff on homepage in luma theme with sample data, and they seem to have css classes. Where are these classes? are they from sampledata?

Thanks alot.


texts:
I want to create a toggle input option in magento  2 like this:

but i don't know what type of field is that, right now i'm using select dropdown like this:

$fieldset->addField(
            'featured',
            'select',
            [
                'label' => __('Featured'),
                'title' => __('Featured'),
                'required' => true,
                'options' => ['1' => __('Yes'), '0' => __('No')],
                'value' => $partner['featured']
            ]
        );


texts:
I'm upgrading from magento2.2.5 to 2.3.5 I'm facing this issue
PHP Fatal error:  Uncaught Error: Class 'Magento\Framework\Component\ComponentRegistrar' not found in app/code/<Vendor>/<ModuleName>/registration.php file

<?php
 \Magento\Framework\Component\ComponentRegistrar::register(
     \Magento\Framework\Component\ComponentRegistrar::MODULE,
     'Vendor_Module',
     __DIR__
 );

can anyone please help me.


texts: I'm using Community 1.9 with the Magemonkey extension by eBizMarts for Mailchimp installed. How can I go about creating a rule so that any person who subscribes successfully gets a $10 coupon to spend on the online store?


texts: How can I setup the Email Notification for the Low Stock Products and Expired Products?


texts: Import Customers to Magento - Customer Name is Whole Name, Not First and Last

texts:
I'm taking an existing store's information and uploading to a new version (Magento).  The old site stored the customer name as the whole name John Smith, whereas Magento requires a first and last name field.

I understand that I could separate the name by space, however, some last names are 2-words, Van Smith, and some names are also 2-words, Mary Beth.  So the option of splitting the name by the space would not suffice for this solution.

Does anyone have any ideas to solve this?  Thanks in advance.


texts:
The problem is:

I have a custom extension that has a file PHP setting to cron.

When it's running other cron like m2epro cron doesn't start. Is there a way to fix this problem?

If it can help you, I have AOE_Scheduler extension.


texts: JS and Css are not loading after Installation

texts:
( I know there are many article on this.Even try all )
Install fresh Magento 2.2.6 with new DB, every thing smooth and but frontend is not loading css and js.

store

VPS Server : Bluehost.com

Magento version: 2.2.6

Already run following command

bin/magento setup:static-content:deploy -f

bin/magento cache:flush

bin/magento cache:clean

All necessary permission already assign to folders

Even Change

Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink

to

Magento\Framework\App\View\Asset\MaterializationStrategy\Copy

Now dont know what else to do to fix it.


texts: Order confirmation mail sent on order cancellation Magento 1

texts:
When a user adds a product in his cart and clicks to checkout and select the PayPal method.

He redirected to PayPal site for payment and for some reason if he cancels the order, he gets redirected to cart page with cancel order notification and in admin cancel order stored.

But the issue is that the user gets the order confirmation mail.

I am unable to debug anything in this.

I am using Magento 1.9.3.10


texts:
I'm is beginner in magento.
I try to connect the library jquery-ui, but fail!
.
Paths to the my custom topic:

/app/design/frontend/alokuteshop/default/

/skin/frontend/alokuteshop/default/

I edit the file local.xml

Path: /app/design/frontend/alokuteshop/default/layout/local.xml

Adding:

<! - JQuery UI Including ->
<default>
   <reference name = "head">
       <action method = "addItem"><type> skin_js </ type>
              <script> js/lib/jquery-ui.min.js</ script>
        </ action>
    < / reference>
</ default>
<! - / JQuery UI including ->

File jquery-ui.min.js is really exist where indicated: /skin/frontend/alokuteshop/default/js/lib/jquery-ui.min.js

But magento look for it in the base:

 /skin/frontend/**base**/default/js/lib/jquery-ui.min.js

And of course not found and display an error to the console.

What is the problem? Tell me please!

I tried to put the library in the root directory and load js through "addJs" (js/lib/jquery-ui.min.js)
It worked:

<action method = "addJs"><script>lib/jquery/jquery-ui.min.js</ script></ action>

But this is not an option!

I still need to connect another files at this theme. But it is impossible!

What to do?..


texts: how to get customer last visited date in magento2?

texts: I want to find inactive customer list that is customers who are inactive from a certain amount of time I have an account creation date of the customer if I get last visited date then I can put logic to get inactive customers.


texts: it is recommended to load add-ons in .zip by connect magento

texts:
It is advisable to create an extension and adapt it so that it can be installed compressed when connecting magento.
Or better yet, send the files to the clients so they can copy and paste them manually to your server, it has happened to me that in some extensions I could not install the compressed connection to Magento


texts:
When a customer adds a postcode / zip code I would like to complete some PHP formatting.

From what I can see there are 3 places were a customer can add an address with a postcode

Signup
My Account Address Book
OnePage Checkout

For Signup I can see I can override the Mage_Customer_AccountController

For the My Account Address Book I can see I can override the Mage_Customer_AddressController

However For the OnePage Checkout I can seem to find where the logic is for adding an address. Please could someone advise


texts: Redirect to Referrer URL after Login with Facebook/Google not working

texts:
Magento has a feature to redirect to the referrer page after a customer logs in.

I have done this using the following code:

$referer_url = $this->_redirect->getRefererUrl();

$CustomRedirectionUrl = $url->getUrl('customer/account/login',
    array('referer' => base64_encode($referer_url)));

But this referrer URL is not working with Facebook/Google signup; it is redirecting to the My Account page.


texts: Save Quote custom data and read it again

texts:
I store my custom data in my ajax CartController issuing:

foreach ( $quote->getAllItems() as $item ) {
    /* @var $item Mage_Sales_Model_Quote_Item */
    $item->setMyCustomData( 'OK' );
    $item->setOriginalCustomPrice( 777 );
    $item->save();
}

and I want to read these data again in my Order/Pdf/Invoice.php:

foreach ($invoice->getAllItems() as $item){
    Mage::log($item->getOrderItem()->getData()); // Here I wish to see my data set previously
}

The problem is I can only see the price update, but I can not see my MyCustomData field. So I suppose that my custom data stored just as protected _data array don't transfer from quoteItem to orderItem.

How to make it work? Should I rather use some another way to set my custom data?
I thought about product options way, but I don't want to affect all the products, only particular ones.

Thanks.


texts: Generate custom xml file programmatically

texts: In Magento 2 how can I Generate xml file programmatically.


texts: UPS shipping not working with base currency Euro

texts: Hello EveryoneI have set up UPS for my magento store. It works fine when base currency is USD but doesn't work when I change the base currency to Euro.Can anyone tell me where I have to make changes for UPS to work with Euro?Thanks in Advance.


texts: Magento 2: Use Categories Path for Product URLs is not working

texts:
I have two products having the same attributes as categories, attribute set, etc. And I have set Use Categories Path for Product URLs as NO but still, one product has the category in URL another don't

Why is this happening?
I run

php bin/magento indexer:reindex

php bin/magento cache:flush


texts: Magento 2 Order Cancel foreign key constraint error

texts:
I'm currently receiving this error when cancelling an authorize.net direct post order (authorized only, not captured yet, shipping method is ups).

[2018-09-13 13:14:49] report.CRITICAL: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`magento`.`salesrule_customer`, CONSTRAINT `SALESRULE_CUSTOMER_RULE_ID_SEQUENCE_SALESRULE_SEQUENCE_VALUE` FOREIGN KEY (`rule_id`) REFERENCES `sequence_salesrule` (`sequence_value`) ON DELETE C), query was: INSERT INTO `salesrule_customer` () VALUES () {"exception":"[object] (Zend_Db_Statement_Exception(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`magento`.`salesrule_customer`, CONSTRAINT `SALESRULE_CUSTOMER_RULE_ID_SEQUENCE_SALESRULE_SEQUENCE_VALUE` FOREIGN KEY (`rule_id`) REFERENCES `sequence_salesrule` (`sequence_value`) ON DELETE C), query was: INSERT INTO `salesrule_customer` () VALUES () at /var/www/html/magento2/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:235, PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`magento`.`salesrule_customer`, CONSTRAINT `SALESRULE_CUSTOMER_RULE_ID_SEQUENCE_SALESRULE_SEQUENCE_VALUE` FOREIGN KEY (`rule_id`) REFERENCES `sequence_salesrule` (`sequence_value`) ON DELETE C) at /var/www/html/magento2/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:228)"} []

It threw this same error twice in a row (in the exception log), voided the transaction on authorize.net correctly, but then failed to move the order into the cancelled state (I'm assuming because of the exception).

Looking at the related tables, I have

mysql> select * from salesrule_customer;
+------------------+---------+-------------+------------+
| rule_customer_id | rule_id | customer_id | times_used |
+------------------+---------+-------------+------------+
|                1 |      18 |       12085 |          1 |
|                2 |      27 |       12099 |          1 |
|                3 |      27 |       12118 |          1 |
|                4 |      27 |       12143 |          1 |
|                5 |      27 |       12139 |          2 |
|                6 |      27 |       12135 |          1 |
|                7 |      27 |        5697 |          1 |
|                8 |      27 |        9223 |          1 |
|                9 |      27 |       12175 |          1 |
|               10 |      27 |       12198 |          1 |
|               11 |      28 |       12182 |          1 |
+------------------+---------+-------------+------------+

And

+----------------+
| sequence_value |
+----------------+
|              1 |
|              2 |
|              3 |
|              4 |
|              5 |
|              6 |
|              7 |
|              8 |
|              9 |
|             10 |
|             11 |
|             12 |
|             13 |
|             14 |
|             15 |
|             16 |
|             17 |
|             18 |
|             19 |
|             20 |
|             21 |
|             22 |
|             23 |
|             24 |
|             25 |
|             26 |
|             27 |
|             28 |
|             29 |
|             30 |
|             31 |
|             32 |
|             33 |
|             34 |
+----------------+

Can anyone help me figure out what's going wrong?


texts: Get product_id of associated product added in cart

texts:
I have a configurable product and I want to capture the data of the associated product which is added to cart.

http://manoolia.dmcs-online.com/zig-zag-configurable?___store=english&___from_store=english

On this example, when you chose green and add it to cart, a popup will display with the red image(configurable product image). I want to get the associated product image etc.

Any idea?


texts: How to get rating value for particular review?

texts:
I need to rating value for particular review which is given by add review.

Like if there are 5 customers given rating like 4,5,2,1.

I need that percentage value from Review Id.

Thanks in advance


texts: Bootstrap boilerplate template for Magento 1.x

texts:
We are looking for a recommended boilerplate template for Magento 1.x that based on Bootstrap 3\4.

I saw this project but it was updated for M 1.8.x only.

https://github.com/webcomm/magento-boilerplate


texts:
I have configured one site. But it is going like http://m2.com.test/static/frontend/conns/theme/en_US/applications/css/creditapp.css
why it is not taking from pub folder ?


texts:
When I do any search we can see a list of products with the field "Sort by", but I need get rid of the option "Relevance":

If I go to a category from menu I don't have this sorter.

Any idea?


texts: Show catalog based on the custom category attribute

texts:
I have a custom category attribute called passcode and it is unique for every category. (with the help of this tutorial

When a customer logins (there is an addition field in the login.phtml for the passcode which will be stored in a session variable), magento will only display that specific category which has the entered passcode.

I have already created a custom field in the login.phtml and hooks it to customer login action (here is the link) how can I redirect customer to that specific category only which has the same passcode with the customer entered one?

The customer will only see the entered passcode category and its products, and not be able to see any other category and products.


texts: Trouble installing Magento - "continue" doesn't work

texts:
I am installing magento for the first time on my localhost, and I'm having trouble at database configuration step. I am installing the CE 1.7 version.

These are my settings:

When I click on continue, it reloads the same page instead of going to the admin page. I took the sample data for this magento version and created mysql database with above mentioned name, and created a new user, gave the user permissions for that db, before this step. Also, I set permissions 777 to the magento directory, but still no use. Tried all the steps mentioned here, but still getting the same error. I have restarted mysql, php-fpm, but still getting the same error.

I'm running on bitnami nginx stack. I will provide the conf files if you want. Please help!


texts: Importing attributes and attribute sets to fresh install using MySQL data from old install

texts:
The old site is no longer active. I have all the data, but I am not a good enough programmer to write scripts to import it. I've been trying to copy over the eav* tables and was able to import all the attributes on eav_attribute, but they do not display on the admin despite being there in the database. Then tried to copy over the eav_attribute_group and I am hitting foreign key constraints.

I am moderately proficient at SQL, not enough at programming to write my own import script. After searching this site, I have found a few people who were able to import using a script but they had the old site still active.

Does anybody know a way I could import the custom attributes and attribute sets from the old database SQL file into a fresh install using SQL?


texts: Category page take too much time to load because of search_tmp_* table

texts:
my sites category page slows down because firing query for search_tmp_* table take more than 1 second and it runs saveral time on one page load here is the query :

7624 ## QUERY

SQL: INSERT INTO search_tmp_5ce2b13088d284_52718722 SELECT main_select.entity_id, SUM(score) AS relevance FROM (SELECT DISTINCT  eav_index.entity_id, (((0) + (0)) * 1 + SUM(CASE WHEN cea.search_weight > 1 THEN((CASE WHEN data_index LIKE ' bazookagoal ' THEN 5 ELSE 0 END+CASE WHEN data_index LIKE '% bazookagoal %' THEN 3 ELSE 0 END+CASE WHEN data_index LIKE '%bazookagoal%' THEN 2 ELSE 0 END+CASE WHEN 11 * ((11 / LENGTH(data_index)) + (1/(LENGTH(data_index) - ( LENGTH(data_index)
                    - LOCATE("bazookagoal",data_index))))) THEN 11 * ((11 / LENGTH(data_index)) + (1/(LENGTH(data_index) - ( LENGTH(data_index)
                    - LOCATE("bazookagoal",data_index))))) ELSE 0 END)) ELSE 0 END * POW(2, cea.search_weight))) AS score FROM catalog_product_index_eav AS eav_index
 INNER JOIN catalogsearch_fulltext_scope1 AS search_index ON eav_index.entity_id = search_index.entity_id
 LEFT JOIN catalog_eav_attribute AS cea ON search_index.attribute_id = cea.attribute_id
 INNER JOIN cataloginventory_stock_status AS stock_index ON stock_index.product_id = eav_index.entity_id AND stock_index.website_id = 0 AND stock_index.stock_status = 1 AND stock_index.stock_id = 1
 INNER JOIN catalog_category_product_index_store1 AS category_ids_index ON eav_index.entity_id = category_ids_index.product_id AND category_ids_index.store_id = '1' WHERE (eav_index.store_id = '1') AND (eav_index.attribute_id = 99 AND eav_index.value in ('3', '4') AND eav_index.store_id = '1') AND (category_ids_index.category_id = 2) GROUP BY entity_id HAVING ((((GROUP_CONCAT(data_index) LIKE '%bazookagoal%'))))) AS main_select GROUP BY entity_id ORDER BY relevance DESC, entity_id DESC
 LIMIT 100000
AFF: 1
TIME: 1.5136

Please Help


texts:
When we run

php bin/magento setup:di:compile

It will generate below files in \magento\var\di folder

adminhtml.ser
crontab.ser
frontend.ser
global.ser
setup.ser
webapi_rest.ser
webapi_soap.ser

I opened one of the files & it stores all serialize data.

What is meaning of .SER files. What actually it stores? Above mentioned files only we have or others as well?

As per my knowledge it compiles XML files within Theme & Modules & Check dependancy between them


texts: Vue + Magento :On customer Login the custom price of item changes to normal price

texts:
I have created a custom call that adds the product with a custom price it is working fine but issues arise when a customer logins.
i.e as a guest I add the product with a custom price of 0.00 and I log in the price changes to 2.3.
On debugging I find that when a customer logins the VUE fetches the customer cart and compares it with the cart before(guest) if it doesn't match, it updates it via update call but only sends the qty, SKU, and quotedID(customer).
it updates the customer cart with previous guest cart items but the custom price is updated to the product's original price.
when an update is executed it URL is

http://localhost:8080/api/cart/update?token=doyqg2wea2qdyzo93bqktvrrvt1e3qss&cartId=11028257

params are
{"cartItem":{"sku":"439610","qty":1,"product_option":{"extension_attributes":{"custom_options":[],"configurable_item_options":[],"bundle_options":[]}},"quoteId":11028257}}

response :
{"code":200,"result":{"item_id":6533,"sku":"439610","qty":1,"name":"Paros Marble","price":2.37,"product_type":"simple","quote_id":"11028257"}}

on update the Magento \Magento\Quote\Model\Quote\Item\Repository class save() function is executed
public function save(\Magento\Quote\Api\Data\CartItemInterface $cartItem)
{
    /** @var \Magento\Quote\Model\Quote $quote */
    $cartId = $cartItem->getQuoteId();
    if (!$cartId) {
        throw new InputException(
            __('"%fieldName" is required. Enter and try again.', ['fieldName' => 'quoteId'])
        );
    }

    $quote = $this->quoteRepository->getActive($cartId);
    $quoteItems = $quote->getItems();
    $quoteItems[] = $cartItem;
    $quote->setItems($quoteItems);
    $this->quoteRepository->save($quote);
    $quote->collectTotals();

    return $quote->getLastAddedItem();
}

Now I'm looking for a way that when the customer decides to log in, the item in the guest cart with the custom price remains the same and unchanged.


texts: Magento 2.3.2 Product Image Missing after version updating from 2.2.1

texts:
I have updated the Magento version to 2.3.2. After updating the Magento, the product images are not visible.

The product catalog images are coming from the old cache file directory.

I have done the following.

  Remove pub/media/catalog/product/cache . (Removing this folder frees
  up space.)
  Run bin/magento catalog:image:resize to generate a new image cache

Still, I'm facing the same issue.


texts:
I have problem upgrading from 2.3.4 to 2.4.0 I have elasticsearch and php version that is required..
composer require magento/product-community-edition=2.4.0 --no-update
This is the error Im getting

  Problem 1
    - Installation request for magento/magento2ce 2.3.3 -> satisfiable by magento/magento2ce[2.3.3].
    - magento/product-community-edition 2.4.0 requires magento/magento2-base 2.4.0 -> satisfiable by magento/magento2-base[2.4.0].
    - don't install magento/magento2-base 2.4.0|remove magento/magento2ce 2.3.3
    - Installation request for magento/product-community-edition 2.4.0 -> satisfiable by magento/product-community-edition[2.4.0].

Please help me out!


texts: How Do I add the distinct statement to my query?

texts:
This is my code:

$statusTable = $dbHelper->getTableName("mp_os_statuses");

        $this
            ->getSelect()
            ->joinInner(array('status'=>$statusTable), "status.value = main_table.status")
            ->order("status.position ASC")
            ;

I actived the sql logs I executed the latest query and I saw that I have 2 entity_ids with the same value. As a result I get the error message:

 with the same id "27" already exist

So I search over the internet that I should add a distinct statement to my query. How can I do that ? thx

UPDATE  This is the query from the log:

SELECT `main_table`.*, `status`.* FROM `mp_os_state_status` AS `main_table`
 INNER JOIN `mp_os_statuses` AS `status` ON status.value = main_table.status WHERE (main_table.state = 'payment_review') ORDER BY `status`.`position` ASC


texts: How to sort a category by its subcategories

texts:
i need to sort my products on the category page by thier subcategories can someone tell me what i am doing wrong with this?

   $this->_productCollection = $layer->getProductCollection()->clear()->setOrder('category_ids first_item', 'asc');


texts:
For some reason my checkout module save customer comment under ['additional_information']['checkoutmodule'][0]['value']

At invoice PDF I'm able to add this with below code:

    /* Add customer comment */
    $orderData = $order->getPayment()->getData();
    $orderComment = $orderData['additional_information']['checkoutmodule'][0]['value'];
    if($orderComment){
        $page->drawText('Customer comment:', 35, $this->y-45, 'UTF-8');
        $page->drawText($orderComment, 35, $this->y-55, 'UTF-8');
    }

However I need to access this information using SOAP as well. However, I can not find this value anywhere. Any idea how I could access it?

Also, is this place the actual place where customer_comment should be saved?


texts:
I have a code that runs on 'catalog_block_product_list_collection' event. I need add to product image watermark. How i can do it?

public function addLabel($collection)
{
    $event = $collection->getEvent()->getCollection();
    $label = Mage::getModel('productlabels/block')->load(13)->getData();
    $file = Mage::getBaseDir('media') . DS . $label['product_page_image'];

    foreach ($event as $product) {
        $product->getCollection();
        $product->setWatermark($file, 25, 0, 200, 200, 50);
    }

    return $collection->getEvent()->setCollection($event);
}


texts: Magento 2 email validation error with zendframework validator

texts:
I created an observer to send emails at a particular event. I used transport builder to send an email, but I get zendframework validator errors, but the email address is OK.

I was able to solve the issue editing the file: vendor\zendframework\zend-validator\src\EmailAddress.php in a local test environment but it is unuseful for a production env that relies on correct vendor based on composer files.

Then I tried a dependency injection in my module for the class related to this file but it won´t work.

Is this injection in di.xml valid for zend-framework validator ? I mean is Magento available to do that ?

Anyone knows another way to solve this issue ?

Thanks !


texts:
I am working on a site where the home page loads pretty quickly however the categories pages are too slow.

http://tools.pingdom.com/fpt/#!/cMPX60/http://estiloclothing.co.uk/mens.html

This report shows that the "Wait" time is the highest, we have tried many options available with us to debug this, but failed.  Can anyone give me pointers as to where this could be wrong.  I can add much more details, however at this stage even I am not sure what may be needed to get it in the right direction.  Kindly let me know and I shall provide more details.


texts:
I am trying to get the translation of a string for each store in my magento admin. I have five stores with different languages, the translations are given in .csv files for each store.

What I try to achieve is to get a collection of all stores and to print out the translation of a predefined string for each store from an observer class. I was able to get the store collection and I have the country codes but I was not able to get the translations. What is the best way to achieve this or is it possible at all?

Thanks in advance!


texts: Magento 2 order redirected to cart -> getLastSuccessQuoteId() returns false

texts:
I'm trying to place order in magento 2.1.7 but every-time I click the "place order" button, I get redirected to the cart page.

With debugging I found out, that in the class /vendor/magento/module-checkout/Model/Session/SuccessValidator.php, there is a method isValid. This method does the following:

public function isValid()
{
    if (!$this->checkoutSession->getLastSuccessQuoteId()) {
        return false;
    }

    if (!$this->checkoutSession->getLastQuoteId() || !$this->checkoutSession->getLastOrderId()) {
        return false;
    }
    return true;
}

The first of these checks, getLastSuccessQuoteId() returns false. Unfortunately, I somehow can't find that method, that's why I have no idea what it does or tries to do.

The quote is created in the database, I see it in the quote table.

Does anyone have an idea what's happening here?


texts: Showing Customer Details Instead of customer_id

texts:
I'm trying to getting the customer details in wishlist instead of showing the customer_id, I do in following way

/**
 * @var \Magento\Wishlist\Model\WishlistFactory
 */
protected $_wishlistFactory;

public function __construct(
    \Magento\Wishlist\Model\WishlistFactory $wishlistFactory){
    $this->_wishlistFactory = $wishlistFactory;
}

public function getWishlistByCustomerId($customerId)
{
    $wishlistCollections = $this->_wishlistFactory->create()->getCollection();
    return $wishlistCollections->getData();
}

form this I got whole list wishlists with customer_id

[
{
    "wishlist_id": "2",
    "customer_id": "8",
    "shared": "0",
    "sharing_code": "138258069f07f9e03395ac6c71a02eff",
    "updated_at": "2014-01-03 12:41:46"
},
{
    "wishlist_id": "3",
    "customer_id": "2",
    "shared": "0",
    "sharing_code": "0b29c50279346cba61010443e0410cb8",
    "updated_at": "2013-12-06 10:48:04"
}
]

but my acceptation is how to show it in like

[
{
    "wishlist_id": "2",
    "customer_id": {
                        //TODO Customer Details
                    },
    "shared": "0",
    "sharing_code": "138258069f07f9e03395ac6c71a02eff",
    "updated_at": "2014-01-03 12:41:46"
}
]

Is it possible to show this, I have try buy looping the wishlist and send the customer_id to \Magento\Customer\Api\CustomerRepositoryInterface $customerRepositoryInterface but it take more time. Is there any shortest and coolest way to show the stuffs of foriegn keys.

Thanks in advance


texts: How to Override Magento Add to WishList Widget

texts:
I want to Override Magento add-to-wishlist data-action in Magento 2

i Have Created and Override Core addtowishlist Widget

in my requirejs-config.js

var config = {
    "map": {
      "*": {
        "addToWishlist":  'Magento_Wishlist/js/add-to-wishlist',
        "addToCustomWishlist": "Vendor_Module/js/add-to-wishlist"
      }
    }
};

Now in My Custom  js/add-to-wishlist.js

define([
    'jquery',
    'jquery-ui-modules/widget', // use individual jQuery UI component if your widget is for frontend or base areas
     // 'jquery/ui', // use all 'jquery/ui' library if your widget is for adminhtml area
    'addToCustomWishlist' // usually widget can be found in /lib/web/mage dir
  ], function($){

    $.widget('vendor.addToCustomWishlist', $.mage.addToWishlist, {
        bindFormSubmit: function () {
            var self = this;
             alert("I am Here");

            $('[data-action="add-to-wishlist"]').on('click', function (event) {
                var element, params, form, action;

                event.stopPropagation();
                event.preventDefault();

                element = $('input[type=file]' + self.options.customOptionsInfo);
                params = $(event.currentTarget).data('post');
                form = $(element).closest('form');
                action = params.action;

                if (params.data.id) {
                    $('<input>', {
                        type: 'hidden',
                        name: 'id',
                        value: params.data.id
                    }).appendTo(form);
                }

                if (params.data.uenc) {
                    action += 'uenc/' + params.data.uenc;
                }

                $(form).attr('action', action).submit();
            });
        },
        _updateAddToWishlistButton: function (dataToAdd) {
            var self = this;
                        alert("I am Here");
            $('[data-action="add-to-wishlist"]').each(function (index, element) {
                var params = $(element).data('post');

                if (!params) {
                    params = {
                        'data': {}
                    };
                }

                params.data = $.extend({}, params.data, dataToAdd, {
                    'qty': $(self.options.qtyInfo).val()
                });
                $(element).data('post', params);
            });
        },
     });

    return $.vendor.addToCustomWishlist;
});

I did these Following Magento Documentation But not getting any Success


texts: After updating magento to 1.9.3.1 my site has error in export products

texts:
While exporting products i am getting blank section in entity attributes section as per in screenshot
and getting below error in error log file:

PHP Fatal error:  Class Mage_ImportExport_Model_Export_Entity_Product contains 1 abstract method and must therefore be declared abstract or implement the remaining methods
(Mage_ImportExport_Model_Export_Entity_Abstract::exportFile) in
/.../app/code/local/Mage/ImportExport/Model/Export/Entity/Product.php on line 35
class Mage_ImportExport_Model_Export_Entity_Product extends Mage_ImportExport_Model_Export_Entity_Abstract{


texts: Calculate and get Shipping rates from another website ( store ) programmatically

texts:
Here's what i want to accomplish. I'm making a lot of changes to the Multishipping functionality in magento and i want to be able to calculate the shipping rates - prices for each website.

Meaning, i have 2 websites.

Buying 2 items from website A and 1 item from website B.

I've made it so that the items are split into different addresses. Now we've made it into the screen where you have to select shipping methods. But the carriers that are being displayed are only from the website that i'm currently running on.

The carriers are being retrieved from

/**
 *
 * magento\module-quote\Model\Quote\Address.php
 *
 * Retrieve all grouped shipping rates
 *
 * @return array
 */
public function getGroupedAllShippingRates()
{
    $rates = [];
    foreach ($this->getShippingRatesCollection() as $rate) {
        if (!$rate->isDeleted() && $this->_carrierFactory->get($rate->getCarrier())) {
            if (!isset($rates[$rate->getCarrier()])) {
                $rates[$rate->getCarrier()] = [];
            }

            $rates[$rate->getCarrier()][] = $rate;
            $rates[$rate->getCarrier()][0]->carrier_sort_order = $this->_carrierFactory->get(
                $rate->getCarrier()
            )->getSortOrder();
        }
    }
    uasort($rates, [$this, '_sortRates']);

    return $rates;
}

I've tried adding changing the store in the quote and the address but when i pick a store outside from the website i'm on i get Store not found.

Is there any way to calculate the shipping rates and carriers based on a different website that i'm currently on ?

UPDATED ANSWER
Ended up using the Webmatrix Rates extension but made some modifications on it to match my needs.


texts:
I am creating extension to magento 1.9.2.1  and I wondering where can I find information about create product attributes.
I create attribute followeing this article

http://magentotutorialbeginners.blogspot.com/2014/03/create-product-attribute.html

And everything work. But how would I know what special parameter mean.

In magento Api documentation

http://www.magentocommerce.com/api/soap/catalog/catalogProductAttribute/product_attribute.info.html

is describe a few parameters,but where can I find allowed types?, or what does group mean.


texts: Magento 2.2.2 how to check if current page is a CMS page in .phtml file?

texts:
I am using the following code to check if the current page is Product detail page:

$objectManagerCms = \Magento\Framework\App\ObjectManager::getInstance();
$registry = $objectManagerCms->get('Magento\Framework\Registry');
$currentProduct = $registry->registry('current_product');
if ($currentProduct) {
    // Custom code
}

Now how to check if current page is a CMS page?


texts: Override product bundle select.phtml file in Magento 2

texts:
I'm trying to override the select.phtml used on the bundle product view page
I've put it here:
app/design/frontend/[vendor]/[theme]/Magento_Bundle/templates/catalog/product/view/type/bundle/option/select.phtml
which I think is the correct path based on where the official file is located:
vendor/magento/module-bundle/view/frontend/templates/catalog/product/view/type/bundle/option/select.phtml
But it doesn't work - anyone know where it SHOULD be placed?


texts: Magento 2.3 admin login not working-cleared cache and different browsers

texts:
I have an install of Magento 2.3 with the pearl theme installed. It's on a light sail instance (Ubuntu). I was changing some settings (the bug with not being able to upload logos) and then when I cleared my cache to look at my changes I could no longer log in on the admin panel. I re-cleared my cache, and tried a different browser but still wasn't able to get in. The session and cookies haven't been changed from the install, and I do have SSH/SFTP access if I need to change something there. What should I do next to get back in to my admin side?

Edit from comments:

Not able to login = login page redirects to login in page on correct login, or on wrong login will post "incorrect login"

No error is showing in any logs I have seen


texts: How to call root file directly in magento2- i don't want to create class?

texts:
I have upload.php file in magento2 root folder.

How can i access directly www.example.com/upload.php directly in magento2?


texts: Magento 2 products positioning in category

texts: I have converted my Magento 1.9 to Magento 2.3.1. In Magento 1.9, the products are listed by the position as the following orders 0,1,2,3...10.. and so on. But when I check in Magento 2.3.1 site, all products are listed opposite, they are now listed in the order 10,9,8,7...2,1. How can I get products to be display by position as 0,1,2,3,4 in category page?


texts: setup:staitic-content:deploy doesn't update JS in Magento 2

texts:
I'm running Magento 2 in production mode.

I made some changes in my module JS files.

I try to make the JS change reflecting on the live site, by using following command.

php bin/magento setup:static-content:deploy en_US en_GB ar_SA

I can't see the JS files are updated in pub/static folder.

I have flushed cache php bin/magento cache:flush before and after static-content deploy.

Thanks for your support in advance.


texts:
I have multiple questions for experienced magento developers:

Is it possible to improve the speed of the magento v1 soap api?
When requesting data it quickly costs 1.5 seconds for magento to compile simple information like customer adress etc...

To request multiple possible relevant data nodes can quickly costs about 5-7 seconds.

Now am I already doing those requests via AJAX requests so the page interface loads quickly, but a speed improvement would be nice.
Or would it be better to write my own application to give me the relevant information directly from the magento db? It's not that complicated of a db and if I do a direct query it loads within a 100th of a second with the results...

The only consideration I have with that option is:

What if magento updates and changes it's database scheme?
Or is the database setup of magento relatively upgrade safe/downwards compatible?

Does anyone have any experience with this and their success or faillure stories? I need to make an informed descision to be able to know how to proceed.


texts: Magento 2 Rest auth for different website ids

texts:
I'm getting customer auth token with following REST request

http://mage.local/rest/default/V1/integration/customer/token

It is working fine for customers with website_id = 1, but not works for other website_id.

How should I set website_id in my request?


texts: How can i change the names for parent and child theme in magento 2.

texts: I am currently using porto theme in my site. I want to customize names of the themes(ie. porto and porto_child). I am aware i may not receive any updates on the theme, but i need to do it anyway.


texts: Magento 2.3.5 - add image to product compare

texts:
I want to load a product image in the product compare sidebar.
Therefore I used the following code (https://gist.github.com/rubenRP/002d06c7b8d6c6eb44d43e102f86ec38)

But that does not seem to work on Magento 2.3.5 I get a frontend console error:

ReferenceError: Unable to process binding "foreach: function (){return compareProducts().items }"
Message: Unable to process binding "attr: function (){return {'src':image_src} }"
Message: Can't find variable: image_src

How can I load a product image inside the compare bar?


texts: Magento 2 installation display blank page

texts:
step 1-> magento2 download from https://github.com/magento/magento2
version 0.1.0-alpha101all
step 2-> install composer globally using
    composer windows installer.
step 3-> run composer install in
        magento2/setup directory using CMD and everything is installed
        perfect.

Then, I went to localhost/magento2/ .. the browser is redirected to a new url localhost/magento2/setup/ with title "Magento Setup Tool" but a blank page is displayed. No install steps are displayed in my browser. I tried that with firefox and chrome with same results.

Its a common situation?, anyone knows if we have to erase some file after we run composer install into setup directory?

server error.log: [Sat Oct 25 16:19:07 2014] [error] [client 127.0.0.1] File does not exist: C:/Zend/Apache2/htdocs/magento2/setup/controls, referer: localhost/magento2/setup/


texts: Is magento 2 open source version support Business to Business ( B2B) and Business to Customer(B2C) system?

texts: I have setup a magento 2(open source) store and i want a B2B and B2C ecommerce system for my store where suppliers can upload their products and view revenues and reports. And customers can also login with  their credentials and view the details of shopped products.


texts: Magento: A question about collection LIMIT by the way "Zend Db limit"

texts:
There are several ways to limit collection for magento you could find here Magento: Set LIMIT on collection.
I tried the best answer, both ways work well.

But when I am trying, I met a question is about the "Zend Db limit" way.
When I use the "Zend Db limit" way like below, it works well.

$collection = Mage::getModel('...')->getCollection();
$collection->getSelect()->limit(20);

But if I use the way like follows, it doesn't work.

$collection = Mage::getModel('...')->getCollection()->getSelect()->limit(20);

I do not understand the difference between the two wordings. Why one is valid and the other is invalid. Maybe this is a stupid question, but I've been stuck here for a long time, I want to know the reason.

Thanks for any help!


texts: Missing files in /media/ - help on how to write a script that will regenerate based on .htaccess call?

texts:
I performed a complete cache clean and discovered that this obliterates everything under /media/ (as noted by me below and later correctly observed by an answer, it is indeed just the cache that is being wiped under the /media/ folder).  Unfortunately there are some email distributions from the past that rely on these images and I am curious as to whether there is a way to regenerate all of the thumbnails / cache entries under the /media/ folder?

So, for example, in this situation I am seeing missing files such as:

[Mon Apr 15 11:46:01 2013] [error] [client xxx.xxx.xxx.xxx] File does not exist: /home/username/public_html/domain.tld/media/catalog/product/cache/0/image/265x/4df79eab33525d08d6e5fb8d27136e95/T/E/TE0213.jpg
[Mon Apr 15 11:46:01 2013] [error] [client xxx.xxx.xxx.xxx] File does not exist: /home/username/public_html/domain.tld/media/catalog/product/cache/0/image/265x/4df79eab33525d08d6e5fb8d27136e95/F/X/FX0413_1.jpg
[Mon Apr 15 11:46:01 2013] [error] [client xxx.xxx.xxx.xxx] File does not exist: /home/username/public_html/domain.tld/media/catalog/product/cache/0/image/265x/4df79eab33525d08d6e5fb8d27136e95/F/B/FB0413.jpg
[Mon Apr 15 11:46:01 2013] [error] [client xxx.xxx.xxx.xxx] File does not exist: /home/username/public_html/domain.tld/media/catalog/product/cache/0/image/265x/4df79eab33525d08d6e5fb8d27136e95/F/K/FK0413.jpg
[Mon Apr 15 11:46:02 2013] [error] [client xxx.xxx.xxx.xxx] File does not exist: /home/username/public_html/domain.tld/media/catalog/product/cache/0/image/265x/4df79eab33525d08d6e5fb8d27136e95/E/V/EV0413.jpg
[Mon Apr 15 11:46:02 2013] [error] [client xxx.xxx.xxx.xxx] File does not exist: /home/username/public_html/domain.tld/media/catalog/product/cache/0/image/265x/4df79eab33525d08d6e5fb8d27136e95/F/P/FP0413.jpg
[Mon Apr 15 11:46:02 2013] [error] [client xxx.xxx.xxx.xxx] File does not exist: /home/username/public_html/domain.tld/media/catalog/product/cache/0/image/265x/4df79eab33525d08d6e5fb8d27136e95/F/E/FEA0413.jpg
[Mon Apr 15 11:46:03 2013] [error] [client xxx.xxx.xxx.xxx] File does not exist: /home/username/public_html/domain.tld/media/catalog/product/cache/0/image/265x/4df79eab33525d08d6e5fb8d27136e95/F/Z/FZ0413.jpg
[Mon Apr 15 11:46:03 2013] [error] [client xxx.xxx.xxx.xxx] File does not exist: /home/username/public_html/domain.tld/media/catalog/product/cache/0/image/265x/4df79eab33525d08d6e5fb8d27136e95/G/B/GB0413.jpg
[Mon Apr 15 11:46:03 2013] [error] [client xxx.xxx.xxx.xxx] File does not exist: /home/username/public_html/domain.tld/media/catalog/product/cache/0/image/265x/4df79eab33525d08d6e5fb8d27136e95/F/S/FS0413.jpg
[Mon Apr 15 11:46:04 2013] [error] [client xxx.xxx.xxx.xxx] File does not exist: /home/username/public_html/domain.tld/media/catalog/product/cache/0/image/265x/4df79eab33525d08d6e5fb8d27136e95/F/U/FU0413.jpg

When I do look for the images, for example, I do see the originals present in:
media/catalog/product/F/U/

The goal, therefore, is to regenerate all of these appropriately.

Moving further along in this, I can see that I need to be able to execute a Magento script upon failure of finding an image (particularly since many of these images are not being found due to being called by external references such as emails or other sites). I expect to use something like this from Apache to call this script that I'm hoping to get help on here:

# Inside of .htaccess:
######################
# if the file exists, just send it
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^cache/.*$ - [L]

# if it doesn't exists, rewrite to PHP script
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^cache/.*$ /path/to/script.php?url=$0 [L]


texts: Internal links to end with a trailing slash

texts:
The links in the main navigation end without a trailing slash, which do not match the canonical tags which end without.

Is there an easy way to make all links throughout the site end with a trailing slash? Please note. I'm not looking for a redirect to force a trailing slash, I'm looking to get the internal inking to include a trailing slash.

Bit of a Magento beginner, looking for an easyish fix if there is one.


texts: add button to order view after tracking number is added to order

texts:
is it possible to add custom button to order view when tracking number is added?

i have event observer(<sales_order_shipment_save_before>) that adds tracking number to order when button submit shipment has been pressed by admin
like this: observer.php:

public function salesOrderShipmentSaveBefore($observer)

        {
    $trackNumber='111111111';
                        $track = Mage::getModel('sales/order_shipment_track')
                                    ->setNumber($trackNumber)
                                    ->setCarrierCode('mycompany_mycarrier')
                                    ->setTitle('My Carrier');
                        $shipment->addTrack($track);

but how can i add custom button to order view after tracking number is added?
i know that if use this event <core_block_abstract_to_html_before>
and this function in observer.php file:

public function labelButton($observer)
    {
    $block = $observer->getEvent()->getData( 'block' );

                if(get_class($block) =='Mage_Adminhtml_Block_Sales_Order_View'
                    && $block->getRequest()->getControllerName() == 'sales_order')
                {
                    $block->addButton('label', array(
                        'label'     => 'Label',
                        'class'     => 'go'
                    ));
                }

button is added excatly where i need, but i need this button to be visible only if the tracking number is added to order, is it doable? any help would be good.
or is there some way that i could make <core_block_abstract_to_html_before> event to happen only if <sales_order_shipment_save_before> event has already happened?

EDIT

ok finally now i am moveing somwhere!

with your suggestion smiggle i edit my code like this:

public function labelButton($observer)
{
    $block = $observer->getEvent()->getData( 'block' );

    if(get_class($block) =='Mage_Adminhtml_Block_Sales_Order_View'
        && $block->getRequest()->getControllerName() == 'sales_order')
    {
        $carrier = $block->getOrder()->getShippingCarrier();
        $order = $block->getOrder();
        $orderIncrementId=$order->getIncrementId();
        $oOrder = Mage::getModel('sales/order')->loadByIncrementId($orderIncrementId);
        $storeID = $oOrder->getData('store_id');
        $shipping = $oOrder->getShippingDescription();

//var_dump($shipping); die();

        if ($carrier instanceof Mage_Shippping_Model_Carrier_Abstract
            && $carrier->isTrackingAvailable()) {
                $block->addButton('label', array(
                   'label'     => 'Label',
                   'class'     => 'go'
                ));
        }
}

with var_dump function i am getting the right shiping description from "Shipping & Handling Information" field in order view, but still how can i get if there is tracking number set in that field? i did not used isTrackingAvailable function in my carrier which i made my self but my carrier extends Mage_Shipping_Model_Carrier_Abstract and also my carrier creates tracking numbers automatically like i mentioned before with <sales_order_shipment_save_before> event, so the problem is, if in that current order customer has chosed my cretaed carrier then isTrackingAvailable function returns false


texts: After updating the module, the payment method name has not been changed but error "The requested Payment Method is not available"

texts: After updating the payment module and making new order, I see in DB that payment method name is same as old module but old orders can not be opened. So updating sales_flat_order_payment did not help. What else I need to check? Thanks


texts: extension Fast/Quick Order view in each category

texts: I use module Fast/Quick Order and I want to do fast order in each category. I tried copy code from qickorder.phtml to list.phtml but I get message "There are no products matching the selection."


texts: New Starting number for sales_flat_order entity_id

texts:
How is the sales_flat_order.entity_id determined and is there a safe way for me to start it at a higher number?

We just changed versions of magento and have an external ERP. Becuase the orders are created using entity_id we are getting duplicate order issues. I would like to start entity_id where the last site left off?


texts:
I want to display image in my navigation menu.

I've tried changing it's structure by adding div/li after ul, but it's not working.

Best solution for me is to add new div around the subcategory's ul having "submenu" class, But it's affecting the display:block flow of it.

Also tried overriding menu.js, but no results..

so please suggest me how to do this..


texts: Magento 2 - What is the correct way to remove "Billing Agreements" tab from customer account?

texts:
What is the correct and the easiest way to remove the "Billing Agreements" tab from frontend ?

The idea is just to hide the link so later if I need I could easily return it back.

To do this in Magento 1 we had to comment out in billing_agreement.xml module

app/design/frontend/base/default/layout/sales/billing_agreement.xml

How about in Magento 2?

Thanks


texts: Problem filtering SOAP API product.list with store ID

texts:
We are trying to retreive product details for a specific SKU and for a specific store by using the Magento SOAP API with the product.list method.

We can retrieve product details but they are defaulting to the default store and not the store ID that we are trying to filter by.

Here is the code:

$filters = array (
  'sku' => array('eq' => 'ABC')
);

// Then we have tried both of the following which only show product information for the default store and not store ID 38

$products = $soap->call($session_id, 'product.list', $filters, '38');

$products = $soap->call($session_id, 'product.list', array($filters, '38');

Edit! - I've fixed it

$args = array(
    'productId' => '7745-XXL',
    'storeView' => 'pr_de_main_store'
);

$product = $soap->call( $session_id, 'catalog_product.info', $args);

Thanks!

Anthony


texts: Magento 2 : Error when opening backup in admin menu

texts:
On version 2.1.12 when I click on backups in the admin menu I get the below

  There has been an error processing your request Object DOMDocument
  should be created.

In the logs I see this.

  [2018-03-24 12:28:33] main.CRITICAL: Warning: Declaration of
  Magento\Backup\Model\Backup\Interceptor::getFile() should be
  compatible with & Magento\Backup\Model\Backup::getFile() in
  /home/staging/public_html/var/generation/Magento/Backup/Model/Backup/Interceptor.php
  on line 7 [] []

I have googled but cant find anything with this issue, has anyone ever seen this before? Seems to be the only admin menu doing this. have deleted var/cache, page_cache, generation and view_processed and deployed static files but no fix.


texts: Magento 2 many to many product attribute

texts:
I want to create a module which is a product attribute and can have many items from my custom table, is there any guides or tutorials for something like this as I'm struggling to find anything but fully expect I'm searching for the wrong terminology.

The module would have it's own admin grid for adding and updating fields items these would then be displayed and orderable on each product admin page. You would be able to select multiple records and change the position of them.


texts: How to Get product from cart and add it again

texts:
I want to get all the product from cart in a array. and i want to remove all the products from cart. after that i want to add the same products with same quantity and options which are selected by customer again in the cart based on some conditions. i did the following.

1) Save all the products in a array which are available in cart. Using following code.

$quote = $this->getQuote();

$i=0;

foreach ($quote->getAllItems() as $item) {
        $bufferItems[$i] = $item;
        $i++;
}

2) Remove all the products from cart using following code.

foreach ($quote->getAllItems() as $item) {
        $quote->getItemsCollection()->removeItemByKey($item->getId());
}

Up to this everything is working fine.

Now i don't know how to add the product back to the cart... can any one help me.

i did the following which is not working.

1) $quote->addProduct($bufferItems[1]);
2) $quote->addItem($bufferItems[1]);


texts: How to solve Js load error? Shipping Extension

texts:
I am using Sendle shipping extension, this extension work as, if you give zip code gives auto suggestion of city, after I migrate server, the auto suggestion not working.

The extension developer said, JS not loading in your server and give the exact js file.

How can I test with server and how can I solve this issue?

Note : Sendle EXtension Demo Site :
View Source file : view-source:http://sendlemag1demo.nerdster.com.au/index.php/checkout/onepage (Copy the link and paste your browser)
line 41 load the Js, compare to my checkout page the js file missing, but if i run the js file manually its showing. may i know whats is the possible reason not loading my Js.


texts:
I am using Magento 1.9.2.4

I have created 3 root categories with multiple sub categories in each root category.

First root category (Category) works fine, but their is some issue with sub-categories of other 2 root categories. For those sub-categories it gets some weird url.

1) Category - Root category

Portable power - http://domain-name/portable-power.html
Test - http://domainname/test.html

2) Lifestyle - Root category

Professional - http://domain-name/catalog/category/view/s/professional/id/10/

3) Solar Need - Root category

Heavy Use - http://domain-name/catalog/category/view/s/heavy-use/id/11/

And if I try http://domain-name/professional.html or http://domain-name/heavy-use.html URL's for professional and heavy use sub-categories, it shows 404 error.

I cleared the cache, tried re-indexing, ran compilation, disabled compilation, but nothing seems to work.

Below is the code I am using to get the root categories and sub categories.

$html = '';

$children = $menuTree->getChildren();
$parentLevel = $menuTree->getLevel();
$childLevel = is_null($parentLevel) ? 0 : $parentLevel + 1;

$counter = 1;
$childrenCount = $children->count();

$parentPositionClass = $menuTree->getPositionClass();
$itemPositionClassPrefix = $parentPositionClass ? $parentPositionClass . '-' : 'nav-';

$baseUrl = Mage::getBaseUrl();

$html .= '
Shop Solar';

$categories = Mage::getModel('catalog/category')->getCollection()
    ->addAttributeToSelect('*')//or you can just add some attributes
    ->addAttributeToFilter('level', 1)//2 is actually the first level
    ->addAttributeToFilter('is_active', 1)//if you want only active categories
;

if ($categories) {
    $html .= '

';
        foreach ($categories as $category) {
            $html .= '
';
                $html .= '
By '.$category->getName().'
';
                $html .= '
';
                //$children = Mage::getModel('catalog/category')->getCategories($category->getID());
                $children = Mage::getModel( 'catalog/category' )->getCollection()
                    ->addAttributeToSelect('*')
                    ->addFieldToFilter('parent_id',array('eq' => $category->getID()))
                    ->addFieldToFilter('is_active', array('eq' => '1'));

                if ($children) {
                    foreach ($children as $child) {
                        if ($child->getCustomIconAttribute()) {
                            $iconUrl = Mage::getBaseUrl('media').'catalog/category/'.$child->getCustomIconAttribute();
                        }
                        else
                        {
                            $iconUrl = '';
                        }

                        $html .= '
';
                            $html .= '

';
                            $html .= '
getUrl().'">'.$child->getName().'';
                            $html .= '
'.$child->getDescription().'

';
                        $html .= '
';
                    }
                }
            $html .= '
';
        $html .= '
';
    }
$html .= '
View All Products

';
}

$html .= '
';

return $html;

Settings under Catalog->Search engine optimization


texts:
I have one module called Test_A. We can override any layout of Module-theme in Test_A by giving the same name.

Ex. Module-theme/view/frontend/layouts/frontname_controller_action.xml

can be override by creating file

Test_A/view/frontend/layouts/frontname_controller_action.xml.

But how can we override Module-theme/view/frontend/layouts/default.xml in My Module.

Why we have to create custom theme for it?

We can't modify any module's default.xml layout?


texts: display product tags on product page above tag form?

texts: I want to display product tags above tags form for all users on product page and category page also.


texts:
We are new in Magento, version 2.2.6.

Today we noticed our product listing page have errors, there are some css code, also the entire layout is wrong, I have well attached a picture to this.

Please kindly check and return to us how to resolve this problem.

Many thanks!

Nicole


texts:
I am trying to setup Magento on a Apache MacOS local system. I have uploaded the Magento Community Edition 2.0.12 from the official download source, unzipped them in my ~/myusername/Sites/magento directory. But when I am visit the http://localhost/~myusername/magento/ url I get the following screen:

When I then check the magento/var/report/661788277795 file it returns me the following errors:

NOTE: You cannot install Magento using the Setup Wizard because the Magento setup directory cannot be accessed.
You can install Magento using either the command line or you must restore access to the following directory: /Users/myusername/Sites/magento/setup

The file permissions of the setup file are:

drwxr-xr-x@  9 _www  staff     306 14 feb 16:47 setup

I don't know why magento tells me to restore the access to the setup directory, while the _www user can read, write and execute.


texts: react-select-search - Uncaught TypeError: this.state.value.slice is not a function

texts:
I am working on a ReactJS web app and using "react-select-search" package for search & select feature for countries' ISD codes.

GitHub link to package used

I've cross checked the values from onChange function from my below code:

<SelectSearch
    options={this.state.optionsCountryCode}
    id="customer_isd_code"
    name="customer_isd_code"
    className="select-search-box"
    value=""
    placeholder="ISD"
    onChange={
        (value, state, props) => {
            console.log(value);
            console.log(state);
            console.log(props);
        }
    }
 />

And, the values are assigned properly when dropdown value is changed for the first time.

The next time, I click on any dropdown item, it generates the following error in console:

By digging further into the error location, I found the error in this line of code (inside the package):

  Note: Backend is in Magento 2 which does not have any relevance with the issue however.

Please check and guide me on locating a solution for this issue.


texts: How to get parent group Product ID from getParentIdsByChild() method of \Magento\GroupedProduct\Model\Product\Type\Grouped?

texts:
Currently, I am having an issue with retrieving group parent product_id using PHP external script wich file resides under /pub directory:

<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
ini_set('memory_limit', '5G');
error_reporting(E_ALL);
use Magento\Framework\App\Bootstrap;
require '../app/bootstrap.php';
$bootstrap = Bootstrap::create(BP, $_SERVER);
$objectManager = $bootstrap->getObjectManager();
$state = $objectManager->get('Magento\Framework\App\State');
$state->setAreaCode('frontend');

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

$productRepository =
$objectManager->get('\Magento\Catalog\Model\ProductRepository');

$typeGroup = $objectManager->get('\Magento\GroupedProduct\Model\Product\Type\Grouped');

//child product_id
$simple_child_associated_to_group_product_id = 13884;
$product = $productRepository->getById($simple_child_associated_to_group_product_id);

//this returns the
//row_id of the parent not the product_id
$groupParentIds = $typeGroup->getParentIdsByChild($product->getId());

//shortens the array by one element and store it to a variable
$groupParentId = array_shift($groupParentIds);

//display group parent id
echo $groupParentId;

  You can confirm the echoed value is the row_id value of
      getParentIdsByChild() using this query in your M2 Database:

SELECT * FROM `catalog_product_entity` WHERE `row_id` = 'put $groupParentId value here'

  Take note of the entity_id:23526

To confirm that the returned value of $groupParentId is truly the parent product of the child simple... you can confirm this by:

  log-in to your admin panel, go to catalog > products, then search the parent product via ID filter with value of 23526

  click the row to open the product info. and check the associated simple products in the Grouped Products section.


texts:
I have created configurable product.

When i add sub products in configurable product the product type is assigned as virtual product.

But i need to change it as simple product.


texts: Dynamically get the category name in breadcrumb link via xml

texts:
I need to get the category name and product name in the breadcrumb which i am using in my layout in the link tag:

My Breadcrumb should be:

Home / Recipes / Category Page / Category detail Page

First 2 links (Home and Recipes works fine)

<recipe_recipe_index>

    <reference name="root">
        <action method="setTemplate"><template>page/2columns-left.phtml</template></action>

        <action method="unsetChild"><alias>breadcrumbs</alias></action>
        <block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs">
            <action method="addCrumb" module="recipe" translate="crumbInfo.label crumbInfo.title">
                <crumbName>Home</crumbName>

                <crumbInfo>
                    Home
                    <title>Go to Home Page</title>
                    <link>index/../../</link>
                </crumbInfo>
            </action>
            <action method="addCrumb">
                <crumbName>Recipes</crumbName>
                <crumbInfo>
                    Recipes
                    <title>Go to Recipe Home Page</title>
                    <link>index/../</link>
                </crumbInfo>
            </action>
            <action method="addCrumb">
                <crumbName>Category Page</crumbName>
                <crumbInfo>
                    Category Page
                    <title>Category Page</title>
                    <link>  </link>
                </crumbInfo>
            </action>
            <action method="addCrumb">
                <crumbName>Category detail Page</crumbName>
                <crumbInfo>
                    Category detail Page
                    <title>Category detail Page</title>
                </crumbInfo>
            </action>
        </block>
    </reference>


texts: Tax not being applied to Simple Products

texts:
I have a strange problem where I have applied identical tax settings to a configurable product and a simple product - the configurable product is calculating the tax okay but the simple product is not.

How do I resolve this issue?


texts: How to create delete url to delete row from table

texts:
How  to create an URL for a link (on frontend),that ,when clicked, will call a function that deletes a row from the table.
Manually it works :)

public function deleteMessage($id) {
    Mage::getModel('blah/blah')->setId($id)->delete();
}
Mage::getModel('blah/blah')->deleteMessage(84);


texts: How to recover env.php file in Magento 2?

texts:
is there any way to recover the env.php file. As my file deleted unexpectedly when editing using command line. Now file is empty and showing with 0 size in the ftp.  As i don't have the backup of the file or database credentials.

Any way to recover it ?


texts: How to create a product attribute and assigned it all attribute set in magento 2

texts: Magento 2 - How to create a product attribute and assigned it all attribute set using setup script?


texts: M1: Adding Configurable Products to Related Products not visible in frontend

texts:
I have a friend who has Magento 1 store based only on Configurable Products.

He came to me asking why Configurable Products added to other products in [Related Products], [Cross-sells] and [Up-sells] sections are not visible in frontend. I did a test and he is right. Magento is showing only simple products visible in frontend.

What shall I recommend in this case? Switching to Simple Products with Custom Options or there is something we don't know about using configurable products in those sections?

Please Note: cache is disabled and indexing was done after every changing so this is not the path to look into.


texts: Magento 1.9 Get table of products for pending orders

texts:
I want to get a list of products from only pending orders!
i have this is code but works only for register customers i need to show product for all orders  even for guests and multi store.

<?php
require_once 'app/Mage.php';
Mage::app();
//Get All Users/Customers
$users = mage::getModel('customer/customer')->getCollection()
   ->addAttributeToSelect('*');

foreach ($users as $user){
$customer_id = $user['entity_id'];

//Get the  all orders by customer id
$order_collection = Mage::getResourceModel('sales/order_collection')
    ->addFieldToSelect('*')
    ->addFieldToFilter('customer_id',$customer_id)
    ->addFieldToFilter('status', array('in' => array('pending')))
    ->setOrder('created_at', 'desc');

    foreach($order_collection as $orders) {
        echo $increment_id = $orders['increment_id']."
";
        $order_id = $orders['entity_id'];

        //Get all items for the order id
        $order = Mage::getModel('sales/order')->load($order_id);

        $items = $order->getAllItems();

        foreach($items as $i) {

              echo $i->getName()."
";
        }

        echo  "
";
    }

}
?>


texts:
can not add product in admin panel.

Hi to all,

I have a bad and big problem with my magento. I was using Magento 1.9.2.2. After adding about 4 thousand products and 576 attributes in add new product page, I don't see tabs of attributes.

I use Default or other custom attribute set for my product but I think my Main system attribute are broken in link to attribute set but there have all of default attributes in My attribute sets.
screen shot from my add new product page:

there was same problem that was asked in magento stackexchange, but that was no answer :
Can not add new product

After that i installed fresh magento 1.9.2.4 without anything and after that transferred my product, orders, customers, attributes and attribute sets to new shop. Every thing was good for 1 month but after that today again have this problem.

Any body can help me?

I have installed 9 extensions in 1 month and don't installed anything new.


texts:
I am using the event controller_action_predispatch and would like if the url contains ?doThis=this to keep that query in the next url that is load by magento (clicking on another product for example).

$url =  "http://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}";

Mage::app()->getResponse()->setRedirect($url. '?doThis=this')->sendResponse();

doesn't work as the url remains the same. the event fires.


texts: Magento Local (localhost) Installation Customer Login

texts:
I have a Magento local installation, but can't log in with customer user account on Chrome browser. Any fix?
Registration works well on my localhost though, because I can verify the account from the back-end.


texts: Paypal Express Checkout without shipping address

texts:
One of my customer purchased a physical product via Paypal Express Checkout. His shipping address is oversea.

However Paypal refuses the payment, because Paypal doubts the account/credit card is stolen (because of oversea shipping address).

Paypal suggests us NOT sending the shipping address to them.

How we could achieve this in Magento?

Customer required to fill-in the shipping address in order form
but not sending to Paypal.
Customer should be able to review the shipping address in My Order afterward.

Thanks a lot !


texts: Remove selectionsColumn from Columns dropdown in admin grid

texts:
In my custom admin grid I have checkboxes , I added them like this:

<selectionsColumn name="ids">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="indexField" xsi:type="string">transaction_id</item>
            </item>
        </argument>
</selectionsColumn>

And now there is an item for this column in "Columns dropdown" with empty label:

How can I remove it from this dropdown?


texts:
<route url="/V1/api/orders/:id" method="GET">
        <service class="Lovat\Api\Api\OrdersRepositoryInterface"
                 method="get"/>
        <resources>
            <resource ref="anonymous"/>
        </resources>
    </route>

i create an API, and everything works well, but i i would like to change url API
now URL looks like that http://localhost/rest/all/V1/api/orders/2
how can i edit url to http://localhost/api/V1/orders/2


texts: Magento 2 : How to Load Image Collection in Category Listing Page

texts:
Need to Image gallery collection load to following path in magento 2.1.6 category listing page ,

\vendor\magento\module-catalog\view\frontend\templates\product\image_with_borders.phtml

( Or )

app\design\frontend\Magento\{custom-theme}\Magento_Catalog\templates\product\image_with_borders.phtml

Anyone please review the question and let me know your suggestions.

Thank you ,


texts: Magento 2 : How to get static block as html content on frontpage?

texts:
As we know that we're able to render html content up in front as using below  code

echo $this->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('identifier')->toHtml();

but as I require to display as html content.

For eg: <div>This is static Block </div>

Like this up in front.


texts: how to override tax amount with total collect when i click on one check box in magento 2?

texts:
I am trying to override tax in order review in magento 2 when click on one checkbox. How to do that?

I have one form with checkbox in magento 2 onepage checkout page.

My requirement is when I checked the checkbox the existing tax in the order Summary should be set to zero.


texts: How to update sales_order_item in Magento 2.3 using order_id(entity_id)?

texts:
In Magento 2, we can update an order data (a data in sales_order) using Magento Sales OrderRepository .

My questions is:

  How we can update the sales_order_item data (the qty_invoiced and qty_shipped using order_id?

Can anyone give me at least a way on how to do it or where to start?


texts: Create meta title of product programatically in certain format in magento 1.9.*

texts:
I wanted to create the meta title of product in the format of

Product Name - Category (Brand) - Company Name

I need this to be created programatically and not by updating from backend or csv.

Can anybody suggest me ?


texts:
I'd like to put font awsome icon before al my level2 menu

Exemple :

Menu 1 (on mouse)

Submenu 1

(icon) Submenu 2
(icon) Submenu 3
(icon) Submenu 4

But I can't figure out where the file is, I've found topmenu, headder.phtml but I'm not good enough to do this on my own.


texts: Product Filter By Date Attributes Magento 1.9

texts:
So i have created a attributes is future_date

Now i want to filter product based on this attribute. I want to filter product whatever match with this date. For an example we setup a date 5th June and today is 28th May. But when i filter at 5th June this product will be in filtered list.
How can i achive this?


texts: Why the product button aren't adding into the cart?

texts:
In product detail page, I have two buttons. One is Buy now and another one is Add to Cart. When I click on Add to cart button, products are adding into the cart.

But when I'm clicking on Buy now button, the page is redirecting to checkout page but products aren't adding in the cart. Previously this functionality was working. After I switched to SSL configuration, buy button isn't working.

Please help me.


texts: Want to create new Cms page which have a contats forms.How will i do

texts:
please visit this links : http://www.gasandplumbingsupplies.co.nz/contactus

http://www.gasandplumbingsupplies.co.nz/gallery/Mixers/aquatica-sink-mixer/question/314445

I wanted to do both pages in magento.

first link is "contact us", that's no problem.

How to create second link "Ask a question".?....

I am plannig to create CMS page - > "Ask a question"

how to create second links page in magento?

please help me to find solution.

thanks in advance.


texts: How to re-calculate the shipping estimation on changing payment method in checkout page?

texts:
Our store has a shipping method which takes the sum of order's items values to estimate the shipping methods values.

The problem is, when I've a cart rule by payment method, the discount is applied only when the customer selects that method, but the shipping estimation isn't called in this process, resulting in different value on Order Summary.

So, How can I force the shipping estimation on select a different payment method ?

Thanks in advance.


texts: Magento2 - Custom Payment Method - standard approach to show dynamic data on payment method

texts:
What is the best way to show dynamic data (i-e pending balance or something) on payment method at checkout page ?

Here is the screenshot for further reference.

USD 1000 is the dynamic value which i can retrieve from any block or any controller through ajax call, but i am not really sure if i have to use ajax call on checkout page or use knockout js or magento2 UI functionlity to do that.


texts: Column ordering not available in declarative schema?

texts: Assigning column position in declarative schema doesn't seem possible. Is there a way to do it?


texts: Check Component Dependency Magento 2.3.4

texts: I am getting Check Component Dependency in magento 2.3.4 while installing Extension. Please help me to resolve it.


texts: How to store website url in session or cookies ?

texts:
I Have Multi website site.
when site open first time in browser that time show a popup.
popup have Website stores url.

so want if any customer click (website store 1) then he will see only website store 1 not store 2.

if customer type store 2 url manually then also redirect at store 1.

Please Suggest Me.


texts:
In Magento 2 product view page I want to do following things...

Check if product has 0 or more rating.
Get an average rating of product rating wise

For e.g.

Price : 2.5/5.0

Quality : 4.5/ 5.0

Rating : 4.9/5.0

So far I got following

echo $block->getReviewsSummaryHtml($_product,"sort",true);

From above I'm getting average rating but I want to extract more information from it like ratingValue and want more details...so how can I achieve that?


texts:
Magento 2.1.1

I added a product attribute media-image and I added it in the attribute set. I then can add images in my product and select one to play this role.

But how do I call this image in my phtml?


texts: Magento2 : How to change the footer background color in luma-theme?

texts:
I am working on magento-2 version with Luma theme.

I would like to change the footer background color from #f4f4f4 to my desired color.

I found the path is

app\design\frontend\Magento\luma\Magento_Theme\web\css\source\_module.less
line 616

I found the property here that
.page-footer default background is #f4f4f4.

at line 616:

.page-footer { i added the new background color }

But this did not work. am I in the right area?

How do I change the color?


texts: customer_eav_attribute, fist name validate rules, what does "s:15" mean?

texts:
Is is following on from this question:
Spam customer registrations, CAPTCHA not stopping it, Max field rule being bypassed

That answer worked, but in the last few days its been happening again, and the bots are getting 60+ characters in the first name field even though it limited to 65 (as suggested in the answer) in database.  I then changed it to 42 (as it a limit of 40 in the actual website), but they are still get though.

So the rule was:

{s:15:"max_text_length";i:255;s:15:"min_text_length";i:1;}

and now its

a:2:{s:15:"max_text_length";i:42;s:15:"min_text_length";i:1;}

What does "s:15" mean, is that adding to the 42?

ThankS


texts: Can't upload gift wrapping image in Magento 2

texts:
I am having trouble when I do step 8 and 9 of Gift Wrap.
8. To upload a thumbnail Image of the gift wrapping, click Choose File. Then, select the file to upload from your directory. A thumbnail of the image appears in the Gift Wrapping Information after the record is saved.

Click Save.

When I 'Click Save' I get an error message showing up in a red rectangle near the top of the screen:
'You have not uploaded the image.'

I am using a .png file that has dimensions of 230x230 so it seems I am meeting all the requirements to upload the image.


texts:
So all pages are working fine but except this page https://softncozy.com/customer/account/login is not loading the contents properly, after spending some time i found out that all the urls are missing "pub/static" from the base url while all other pages on the website works fine.
I'm very new to magento, so I'm not sure what's happening here.

Edit 1: Everything works fine if i set Use Web Server Rewrites to NO ... but it adds index.php on every single page


texts: How to add new field to Admin User Info in Magento 2?

texts:
How can I add a new field which has an integer value into admin user info?

I want to add a dropdown on admin user edit form, to select any one admin user which has 'ABC' role, and that will be saved with that admin user, for that, I found a way that we can add a new column into the "admin/user" table and save that selected value when admin user edited, not on admin user create.

How can achieve this functionality with the custom module?

  I used below code and its saved manager id in table but in edit form it will not showing selected value. code as below :

protected $manageData;

public function __construct(
    \Name\Module\Model\Entity\Attribute\Source\ManageData $manageData
) {
    $this->manageData = $manageData;
}

/**
 * Get form HTML
 *
 * @return string
 */
public function aroundGetFormHtml(
    \Magento\User\Block\User\Edit\Tab\Main $subject,
    \Closure $proceed
)
{
    $form = $subject->getForm();
    if (is_object($form)) {
        $baseFieldset = $form->addFieldset('admin_manageData', ['legend' => __('Manager Information')]);
        $baseFieldset->addField(
            'manageData',
            'select',
            [
                'name' => 'manageData',
                'label' => __('Select Manager'),
                'title' => __('Select Manager'),
                'values' => $this->manageData->getAllOptions(), // it has array of all the admin users with role 'Manager'
                'class' => 'select'
            ]
        );

        $subject->setForm($form);
    }

    return $proceed();
}

Thanks.


texts: Pop up minicart when I add a product to the cart magento 2

texts: I'm using magento 2.0.7, and what I'm trying to do is to popup the cart(the top right cart ajax minicart) when I add a product to it, Basically trigger it. I have tried to add the "showcart" class to my add to cart button classes, but if I do so, the button just opens the cart, and doesn't add the product anymore..


texts: Which is the best option and less time consuming job for doing testing through MTF or with Selenium tool? and how?


texts: Add Email Field in gift-message Magento 2

texts: I want to add new field emai in gift-message?


texts: How to understand KnowkOutJs in Magento 2?

texts:
How to understand KnockOut Js in Magento 2 ?
I am working in Checkout and cart page, I debugged a lot but i am not
able to understand any single line code of KnockOut Js
But without Magento 2, I am able to understand KnockOut Js.

Can anyone please guide me about How to understand or debug KnockOut Js in Magento 2.


texts:
I'm still very new to Magento so some things may seem very obvious to you, but to me I haven't pieced it all together yet.

I have a task to show product categories in the left section of the screen, which I have managed successfully. But the product structure is very complex and there are sub-categories within sub-categories within sub-categories within sub-categories.

By default, when clicking a category/subcategory within the left menu, it seems to display all products underneath the clicked category/subcategory. I need the catalogue to show the subcategories on the clicked category/subcategory.

What are some pointers in learning how to do this? I'm not asking for a step-by-step on doing this, although feel free to provide that if you feel it necessary.

Many thanks, Ste


texts: Magento2 Need to build Grid with multiple table collection using UI Components

texts:
Started on building custom module, it has feature to display the GRID view for which need to join multiple tables in collection and render them on GRID and filters.

I have used UI Component from magento2 but I m not able to complete the tasks of joining the multiple tables in collection and prepare the grid view.

Anyone can help me on this.


texts:
OK, I have some bundled product to create and I want to do it programatically.

Problem is, I want to add (to MediaGallery) some videos, as it can be done in case of images. It can be done via adminhtml product edit form and works like a charm. So far I have found module-product-video in vendor. I'm not sure if that's it.

I  think maybe I should use then VideoEntryFactory and bind it with product instance but I am not sure. In Model of Product i haven't found method similar to addImageToMediaGallery.

If anyone have faced it, please give me some advices.


texts: Error While Searching in catalog serach with less than query min length - Magento2

texts:
Searching in catalog serach with less than query min length, I am getting error in Magento 2:

  #1 Magento\Framework\Data\Collection\AbstractDb->_renderFilters() called at [app/code/Mageplaza/LayeredNavigation/Model/ResourceModel/Fulltext/Collection.php:408]

  #2 Mageplaza\LayeredNavigation\Model\ResourceModel\Fulltext\Collection->_renderFilters() called at [vendor/magento/module-eav/Model/Entity/Collection/AbstractCollection.php:923]

  #3 Magento\Eav\Model\Entity\Collection\AbstractCollection->load(false, false) called at [vendor/magento/module-catalog/Model/ResourceModel/Product/Collection.php:803]

  #4 Magento\Catalog\Model\ResourceModel\Product\Collection->load(false, false) called at [vendor/magento/framework/Interception/Interceptor.php:58]

  #5  Mageplaza\LayeredNavigation\Model\ResourceModel\Fulltext\Collection\Interceptor->___callParent('load', array(false, false)) called at [vendor/magento/framework/Interception/Interceptor.php:138]

  #6 Mageplaza\LayeredNavigation\Model\ResourceModel\Fulltext\Collection\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]

Any help is appreciated


texts: Language prefix in email template path Magento 2

texts:
I am currently building a Magento 2 module. I defined adminhtml/system.xml file:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>

            <group id="finance" translate="label" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1">
                <field id="template_status_notification" translate="label" type="select" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
                    Status notification email template
                    <source_model>Magento\Config\Model\Config\Source\Email\Template</source_model>
                    <depends>
                        <field id="status_email_enabled">1</field>
                    </depends>
                </field>
            </group>

    </system>
</config>

Then in email_templates.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Email:etc/email_templates.xsd">
      <template id="payment_finance_template_status_notification" label="Finance Contract Status Notification" file="finance_status_notification.html" type="html" module="Company_Finance" area="frontend"/>
</config>

But when I try to run this module, it always try to take the language prefix between section id and group id "payment_us_finance_template_status_notification". And I got this exception "payment_us_finance_template_status_notification" is not defined. I dont want to define email templates path with all languages prefix for my module

Did anyone get the same problem like me? Could you please give me some advices? How can this happens?


texts: Products uploaded into Magento via Magmi not updating frontend after updated from admin area

texts:
In a bit of a pickle with recent Magento project. Uploaded a few hundred products via Magmi, uploaded into the admin area fine. I updated 1 of the products manually from the admin area. It updates fine in the admin area, but the changes for certain attributes/values don't show in the frontend! So for example the name, url and images won't update. They change and show fine in the admin area. I can update any other attribute fine. E.g. size or colour. They update into the frontend fine. Prices are updating fine too. It's just the name, url and images that are not changing in the frontend. So the fact some attributes are updating rules our cache? Although I checked that anyway. And the fact that some attributes are updating rules out permissions issue on server or the like?

If I upload a product from scratch via the Magento admin panel, and change the name, images or url, it updates fine!! It's just products uploaded via Magmi that aren't updating.......

Uploaded in Magmi and checked the Magmi Optimizer and Image attributes processor options only. Never experienced this issue before using Magento or Magmi in the last 3 years or so. Very confused on here..... any help would be greatly appreciated.


texts: Magento 2 Add js code only for checkout step 2

texts:
I want to add a piece of javascript code only for checkout step 2 (payment page).
What I have tried so far?

Loaded stepNavigator and checked if this returns true.

stepNavigator.isProcessed('payment')
Loaded stepNavigator and checked if index is set to 1.

stepNavigator.getActiveItemIndex()
Loaded custom js in checkout_index_index.xml in before-place-order(as this is called on payment page)

<item name="payments-list" xsi:type="array">
<item name="children" xsi:type="array">
    <item name="before-place-order" xsi:type="array">
        <item name="children" xsi:type="array">
            <item name="agreements" xsi:type="array">
                <item name="component" xsi:type="string">Vendor_FacebookPixel/js/view/initiate-checkout</item>
                <item name="sortOrder" xsi:type="string">150</item>
                <item name="displayArea" xsi:type="string">before-place-order</item>
                <item name="dataScope" xsi:type="string">before-place-order</item>
                <item name="provider" xsi:type="string">checkoutProvider</item>
            </item>
        </item>
    </item>
</item>

However, I am still not getting it on checkout step 2. Please help.