texts:
I'd like to override the address layout defined in Magento\Customer\etc\config.xml -> default | customer | address_templates | oneline | html

In Magento 1, we could re-define a config.xml file in the local pool or in a module, and everything got mashed together and our new values over-rode it.

However, this doesn't seem to work in Magento 2, assuming from the documentation that config.xml only affects the scope of the module?  So, I've tried adding:

Vendor/Namespace/etc/config.xml or Vendor/Namespace/etc/frontend/config.xml with the following content:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
<default>
    <customer>
        <address_templates>
            <![CDATA[{{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}}{{var lastname}}{{depend suffix}} {{var suffix}}{{/depend}}{{depend firstname}}
{{/depend}}
                    {{depend company}}{{var company}}
{{/depend}}
                    {{if street1}}{{var street1}}
{{/if}}
                    {{depend street2}}{{var street2}}
{{/depend}}
                    {{depend street3}}{{var street3}}
{{/depend}}
                    {{depend street4}}{{var street4}}
{{/depend}}
                    {{if city}}{{var city}},  {{/if}}{{if region}}{{var region}}, {{/if}}{{if postcode}}{{var postcode}}{{/if}}

                    {{var country}}

                    {{depend telephone}}Telephone: {{var telephone}}{{/depend}}
                    {{depend fax}}
F: {{var fax}}{{/depend}}
                    {{depend vat_id}}
VAT: {{var vat_id}}{{/depend}}]]>

        </address_templates>
    </customer>
</default>
</config>

However, I don't get the change (Telephone: instead of T: in this quick example).

EDIT: module.xml looks like this:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Vendor_Namespace" setup_version="0.1.0">
    <sequence>
        <module name="Magento_Customer"/>
    </sequence>
</module>

Do I need to create my own renderer for this and add a preference to use it, or am I missing something?


texts: How to change page title in Magento "Magento Commerce"?

texts:
When I click on a link send to a friend and want to send the link to some of my friend I have the title Magento Commerce displayed in my title tag.

The question is: how to change it to something else?

Thanks


texts: How can I clear SQLSTATE[23000]: Integrity constraint violation after migration?

texts:
I am trying to migrate data from Magento 1 to Magento 2.2.6 using Cart2Cart. Everything comes over but I get errors like the one below when I try to reindex.

Category Products indexer process unknown error:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
'1-510' for key 'PRIMARY', query was: INSERT  INTO
`temp_catalog_category_tree_index_22f595b8` (`parent_id`,`child_id`)
VALUES (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?),
(?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?,
?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?),
(?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?,
?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?)
Product Categories indexer process unknown error:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
'1-510' for key 'PRIMARY', query was: INSERT  INTO
`temp_catalog_category_tree_index_ae4a77f3` (`parent_id`,`child_id`)
VALUES (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?),
(?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?,
?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?),
(?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?), (?,
?), (?, ?), (?, ?), (?, ?), (?, ?), (?, ?)

In trying to do more research I try to find the temp_catalog_category_tree_index_22f595b8 and it doesn't exist. I then look for just catalog_category_tree and it doesn't exist either. Where and how can I clear this error?


texts: On my category pages I'm using 2 filters, Category and Price.  What I would like to do is limit the number of filterable items under Category to 10 items.  I'm looking in magento/module-layered-navigation/view/frontend/templates/layer/filter.phtml where all of the filter items are being looped through, but I'm not quite sure how to limit the items JUST for "Category".  This template handles all of the filter items so I don't want to limit filters other than "Category".


texts: Workflow: delivering items "to a table" (eg in a bar)

texts:
Having not deployed any Magento solutions before, I'm trying to figure out if Magento really is the sort of solution I'm looking for. I've installed the OS edition on a VM and have been trying to replicate certain workflows.
One that I'm struggling to put together is a "deliver to table" or "deliver to room" option. Not interested in shipping / signing users in / etc.
I like the fact that I can run one store with multiple store fronts. Also out of the box, the product looks very presentable, so I can focus on setting up the functionality and then go back and make it look pretty later. However the "deliver to table" type thing doesn't seem to come naturally to Magento. Am I trying to make a square peg fit a round hole?


texts:
I am getting this component dependency error

I have referred also referred other question regarding the same but could not find suitable problem solving answer.

Are there any general checkpoints(list of files which needs to be configured/ or required libraries) which should be kept in mind for solving this particular error?

Can we solve this error by modifying composer.json ? IF YES, then how?


texts:
I have one line of code in a core module (contact) in which I need to change.
What is the correct way to make the change to change/overwrite this file?


texts: How to add latest arrivals to my magento homepage

texts:
I have already searched everywhere for the answer but found loads of outdated/incomplete and non working answers so thought I would ask here myself.

I simply want to add my newest products onto my homepage so that when you click on a product it takes you to its page where you can buy it.

What would be the best and most simple way to go about this? thanks


texts: Invalid login at Login page with entered details on front end

texts:
Actually, I can login with social logins like Gmail, Facebook. Login working successfully.

But, when i entered the correct details of my login email , password it will be show invalid details.

please find the below figure to understand easily.


texts: Attribute filter Product Collection with other attribute value

texts:
I have two Product attributes prebook_date and release_date
I want products with prebook_date greater than today's date & prebook_date less than release_date value.

I tried this code to get products which are presale_date greater than today_date

$today_date = date('Y-m-d H:i:s');
$collection = Mage::getModel('catalog/product')->getCollection();
$collection->addAttributeToFilter('prebook_date', array(
        'from' => $today_date,
        'date' => true,
        ));

Any suggestions how to get products which have prebook_date > today_date AND prebook_date < release_date


texts: Order Mail Payment method Section is empty For BarclayCard Payment

texts:
I am using magento 1.9 version.

I have used this BarclayCard Payment Extension.

It works fine in Frontend OnePageCheckOut, Captures the Payment But in the Order Email, Payment method Section is empty. What willbe the issue. How to Fix it.


texts: Magento2 : Set Customer Custom Attribute Value Using Rest API

texts:
Property "Mobilenumber" does not have accessor method "getMobilenumber" in class "Magento\Customer\Api\Data\CustomerInterface".

Whenever i am trying to set customer custom attribute value i am getting above error.
does anyone know how to save customer custom attribute value using REST API ?


texts:
i have upgraded magento 1.5 to 1.9 database it's working fine but when i click on edit products in admin side it is showing below error.

a:5:{i:0;s:75:"Source model "jaffiliate/source_eventid" not found for attribute "event_id"";i:1;s:3374:"#0 /home/halsorutan/public_html/v1.9/app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php(387): Mage::exception('Mage_Eav', 'Source model "j...')
    #1 /home/halsorutan/public_html/v1.9/app/code/core/Mage/Adminhtml/Block/Widget/Form.php(201): Mage_Eav_Model_Entity_Attribute_Abstract->getSource()
    #2 /home/halsorutan/public_html/v1.9/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes.php(70): Mage_Adminhtml_Block_Widget_Form->_setFieldset(Array, Object(Varien_Data_Form_Element_Fieldset), Array)
    #3 /home/halsorutan/public_html/v1.9/app/code/core/Mage/Adminhtml/Block/Widget/Form.php(144): Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Attributes->_prepareForm()
    #4 /home/halsorutan/public_html/v1.9/app/code/core/Mage/Core/Block/Abstract.php(918): Mage_Adminhtml_Block_Widget_Form->_beforeToHtml()
    #5 /home/halsorutan/public_html/v1.9/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php(79): Mage_Core_Block_Abstract->toHtml()
    #6 /home/halsorutan/public_html/v1.9/app/code/core/Mage/Core/Block/Abstract.php(293): Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs->_prepareLayout()
    #7 /home/halsorutan/public_html/v1.9/app/code/core/Mage/Core/Model/Layout.php(456): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
    #8 /home/halsorutan/public_html/v1.9/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('adminhtml/catal...', 'product_tabs')
    #9 /home/halsorutan/public_html/v1.9/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('adminhtml/catal...', 'product_tabs')
    #10 /home/halsorutan/public_html/v1.9/app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
    #11 /home/halsorutan/public_html/v1.9/app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
    #12 /home/halsorutan/public_html/v1.9/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
    #13 /home/halsorutan/public_html/v1.9/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
    #14 /home/halsorutan/public_html/v1.9/app/code/core/Mage/Adminhtml/Controller/Action.php(275): Mage_Core_Controller_Varien_Action->loadLayout(Array, true, true)
    #15 /home/halsorutan/public_html/v1.9/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php(207): Mage_Adminhtml_Controller_Action->loadLayout(Array)
    #16 /home/halsorutan/public_html/v1.9/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_Catalog_ProductController->newAction()
    #17 /home/halsorutan/public_html/v1.9/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('new')
    #18 /home/halsorutan/public_html/v1.9/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
    #19 /home/halsorutan/public_html/v1.9/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
    #20 /home/halsorutan/public_html/v1.9/app/Mage.php(684): Mage_Core_Model_App->run(Array)
    #21 /home/halsorutan/public_html/v1.9/index.php(87): Mage::run('', 'store')
    #22 {main}";s:3:"url";s:97:"/v1.9/index.php/admin/catalog_product/new/set/4/type/simple/key/f252ded01f1710f8b0e4828c9a3e3807/";s:11:"script_name";s:15:"/v1.9/index.php";s:4:"skin";s:5:"admin";}

how to rectify this issue.


texts: Magento 2 Upgrade from 2.1.6 to 2.2.4 - Warning: Error while sending QUERY packet. PID=40252

texts:
I was upgrading Magento 2.1.6 to Magento 2.2.4. Everything went ok but the final step is to run bin/magento setup:upgrade and when I run that I get the below error.

ERROR :  Warning: Error while sending QUERY packet. PID=40252 in /var/www/html/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php on line 228

Any Suggestion, please?


texts: Magento 2 product attributes hidden in product edit page?

texts:
I have a problem with magento 2. I created 2 attribute: show time countdown and show product on homepage. It work properly on localhost and other sites and magento versions. But I get an issue. All attribute hidden on edit page.

Update:

This is my 'Top' attribute set. It seems group product detail with my attribute is showing and group general is hidden.


texts:
Right now when I upload an image into a Magento product at 920 x 1380 and I go to the Product display page it displays  the image at 500 x 750 it scales down the image in proportion

The end Image size I want on the Product display page is 390 x 585 this is also in proportion to the 920 x 1380

How can I do this?

If found that i needed to edit the media.phtml file but when I do that the image size is to small to trigger the zoom feature. So now how do I get the image size on the product page to be 390 x 585 and have the zoom feature? The Image size I am loading into magento is big enought for the zoom feature. The image is 920 x 1380


texts: How to change default search placeholder text in Magento 2.3.5

texts:
I want to change the default search box placeholder text by using a translation file - it's the text that says "Search entire store here...". I want to change it to "Search website".
I have tried doing this with a translation file at app/design/frontend/<package>/<theme>/i18n/en_US.csv with the following content:
"Search entire store here...", "Search website"

And then I completely cleared the cache and static view files (we are running in developer mode). However, the original placeholder text remains and i've not found a way to change it.
I have also tried adding the translation to app/design/frontend/<package>/<theme>/Magento_Search/i18n/en_US.csv and this also had no effect.
We are running Magento version 2.3.5-p1.
Where do I need to add the translation file to change the search box placeholder text?


texts: Magento 2: Is there a way to lock indexer programmatically?

texts:
When I run my custom import script, and during it's execution starts reindex, it causes the error :

  SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when
  trying to get lock; try restarting transaction, query was:

  INSERT INTO catalog_product_entity_datetime ...
  and other
  catalog_product_entity_* tables

How can I avoid these errors?

I thinking about a few ways:

Lock indexer
Lock tables (bad idea)
Temporary disable cron (even more bad idea)
Extend and override core indexer and manually write the code that will check
some lock files.

I can't find any information about indexer locking in Magento 2.

And another question: It can be a problem with the deadlock not at all in reindex and import?

Thanks.


texts:
ERROR Patch can't be applied/reverted successfully - This is on Magento ver. 1.9.2.0

Any ideas on how to proceed?


texts: Products from outside store's root category showing up on frontend - Is this right?

texts: We have several stores setup under a single install of Magento Enterprise. We now share accounts globally so there is a single cart and login across all stores. We have a separate root category setup for each store. Recently I noticed that to hide products outside a store's root category all products outside that root category are set to "display=not visible individually" for store views under the given store. To my knowledge products outside the root category just shouldn't show up on the frontend to begin with and that setting should only be used to hide simple products when they are only to show up under a configurable or grouped product. Am I correct? And if I am why are products outside the root category of a given store being displayed to customers?


texts: show input box when select 5+ from dropdown

texts:
I have a drop-down on Cart page from 1 to 5+. When I select from 1 to 4, Qty is updated along with the price.

When I select 5+ from Dropdown, dropdown should hide and input text-box should be displayed.

Also, I do not want to reload Cart page onChange event of drop-down.


texts: Issue in magento upgrade to 2.3.2 from 2.2.6

texts:
I am trying to upgrade my magento 2.2.6 to 2.3.2 for this i had followed all the steps mentioned in https://devdocs.magento.com/guides/v2.3/comp-mgr/cli/cli-upgrade.html

when i run composer update command i am getting following command

Problem 1
    - Conclusion: don't install magento/framework 101.0.9
    - Conclusion: don't install magento/framework 101.0.8
    - Conclusion: don't install magento/framework 101.0.7
    - Conclusion: remove magento/framework 101.0.6
    - Conclusion: don't install magento/framework 101.0.6
    - Conclusion: don't install magento/framework 101.0.5
    - Conclusion: don't install magento/framework 101.0.4
    - Conclusion: don't install magento/framework 101.0.3
    - Conclusion: don't install magento/framework 101.0.2
    - Conclusion: don't install magento/framework 101.0.1
    - Conclusion: don't install magento/framework 101.0.0
    - Conclusion: don't install magento/framework 101.0.4
    - Conclusion: don't install magento/framework 101.0.3
    - Conclusion: don't install magento/framework 101.0.2
    - Conclusion: remove magento/data-migration-tool 2.2.5
    - Conclusion: don't install magento/framework 101.0.9
    - Conclusion: don't install magento/data-migration-tool 2.2.5
    - Conclusion: don't install magento/framework 101.0.8
    - Conclusion: don't install magento/framework 101.0.7
    - Conclusion: don't install magento/framework 101.0.6
    - Conclusion: don't install magento/product-community-edition 2.3.2
    - magento/framework 101.0.0 requires colinmollenhour/php-redis-session-abstract ~1.2.2 -> satisfiable by colinmollenhour/php-redis-session-abstract[v1.2.2].
    - colinmollenhour/php-redis-session-abstract v1.2.2 requires colinmollenhour/credis 1.6 -> satisfiable by colinmollenhour/credis[1.6].
    - Can only install one of: colinmollenhour/credis[1.6, 1.10.0].
    - magento/product-community-edition 2.3.2 requires colinmollenhour/credis 1.10.0 -> satisfiable by colinmollenhour/credis[1.10.0].
    - Installation request for magento/data-migration-tool 2.2.5 -> satisfiable by magento/data-migration-tool[2.2.5].
    - Installation request for magento/product-community-edition 2.3.2 -> satisfiable by magento/product-community-edition[2.3.2].
    - magento/product-community-edition 2.3.2 requires magento/framework 102.0.2 -> satisfiable by magento/framework[102.0.2].
    - Can only install one of: magento/framework[101.0.1, 102.0.2].
    - Can only install one of: magento/framework[102.0.2, 101.0.1].
    - magento/data-migration-tool 2.2.5 requires magento/framework ~101.0.0 -> satisfiable by magento/framework[101.0.6, 101.0.0, 101.0.1, 101.0.2, 101.0.3, 101.0.4, 101.0.5, 101.0.7, 101.0.8, 101.0.9].
    - Conclusion: don't install magento/framework 101.0.5


texts: Magento 2 Frontend form key is not correct

texts:
I just imported database from an external server into my local developing environment, then i changed the base_url to match with my local URL. I can log into backend using the credentials from that external server, but on frontend, i can't log in without any errors thrown, i was performing some debugging and the form keys on front end are not correct.

I tried saving sessions to db, files, clear all the cookie domains and path in core_config_data but still not working.

Any other suggestions i can take a look at?


texts: Magento 2 : Cannot set product stock status to "Out of stock" using csv

texts:
I tried to import a product using CSV with is_in_stock value to '0' and after the import, the stock status still shows "In stock"
CSV looks like this :

sku,is_in_stock
DC3508BR,0

What am I doing wrong?
thanks


texts: How do I change the code in a Magento 2 extension without editing. I need to import csv file, but it will reflect the two tables in database

texts: How do I change the code in a Magento 2 extension without editing it's files directly. I need to import csv file, it will reflect the two tables in database.


texts: Join customer_entity snd catalog_product_entity by custom attribute

texts:
I use Magento 2 I need to display some data from customer and product in admin grid panel and I wonder how to join catalog_product_entity table with customer_entity. I added custom attribute to product which stores customer entity_id. I want use it for grid filterSearch fulltext.

Thank you for advice.


texts: Translate Offline Payment text for Cashon delivery payment method

texts:
I would like to change text "Offline Payment" to "Paiement sur livraison" in admin order in Payment & Shipping Method section, the payment method for the order is cash on delivery

I tried to edit the title in module configuration like this

But it didn't work.
PS: I'm using multistore website.


texts: Invalid Form Key, Please Refresh Page at Checkout Magento 1.9.1

texts:
i havent changed any cookies settings that some people have mentioned to try. I did install memcache, im not sure if that is related.

local.xml

<config>
    <global>
        <install>
            <date><![CDATA[Fri, 17 May 2013 03:32:24 +0000]]></date>
        </install>
        <crypt>
            <key><![CDATA[RANDOMNUMBER]]></key>
        </crypt>
        <disable_local_modules>false</disable_local_modules>
        <resources>
            <db>
                <table_prefix><![CDATA[]]></table_prefix>
            </db>
            <default_setup>
                <connection>
                    <host><![CDATA[localhost]]></host>
                    <username><![CDATA[USERNAME]]></username>
                    <password><![CDATA[PASSWORD]]></password>
                    <dbname><![CDATA[DATABASE]]></dbname>
                    <initStatements><![CDATA[SET NAMES utf8]]></initStatements>
                    <model><![CDATA[mysql4]]></model>
                    <type><![CDATA[pdo_mysql]]></type>
                    <pdoType><![CDATA[]]></pdoType>
                    <active>1</active>
                </connection>
            </default_setup>
  <!-- START new connection to wordpress database !-->
            <wordpress_setup>
                <connection>
                    <host><![CDATA[localhost]]></host>
                    <username><![CDATA[USERNAME]]></username>
                    <password><![CDATA[PASSWORD]></password>
                    <dbname><![CDATA[DATABASE]]></dbname>
                    <initStatements><![CDATA[SET NAMES utf8]]></initStatements>
                    <model><![CDATA[mysql4]]></model>
                    <type><![CDATA[pdo_mysql]]></type>
                    <pdoType><![CDATA[]]></pdoType>
                    <active>1</active>
                    <use>0</use>
                </connection>
            </wordpress_setup>
            <!-- FINISH new connection to wordpress database !-->
        </resources>
        <session_save><![CDATA[db]]></session_save>
<cache>
               <backend>ewfile</backend>
           <slow_backend>ewfile</slow_backend>
          </cache>
    </global>
    <admin>
        <routers>
            <adminhtml>
                <args>
                    <frontName><![CDATA[ADMIN]]></frontName>
                </args>
            </adminhtml>
        </routers>
    </admin>
</config>


texts: What is the Best way to prevent from Spam?

texts:
I have one website and having alot of spam emails and signup. I have added plugin
https://www.mgt-commerce.com/magento-akismet-spam-protection-extension.html
and It use the akismet api for spam detection. Is any other way so i can add that on code level. Please let me know useful suggestion.


texts:
HI I am developing an API where I faced a challenge in my cart listing api, I need to apply cart rule and add it in quote and need to update quote accordingly.
The Problem here is my quote do get updated but on 2nd refresh. I mean when I try to hit the Api first time the rule doesnt get applies but after second time I refresh the Api, the quote gets updated and refreshes it.
I am not sure whether my cart rule was not being applied or not but I tried and debugged the code and found out rule was being applied but I think quote is not being updated.
Any reason why this happens.
Below is my code snippet which I tried but couldnt achieve the desired result.
if($firstOrder == 1)
        {
            $cartResult1 = $this->quoteRepository->getActiveForCustomer($customerId);
            $quote = $this->quoteRepository->get($cartResult1['quote']['id']);
            $this->customerCondition->setData('customer_first_order', $firstOrder);
            $quote->collectTotals();
            $quote->setCustomerId($customerId);
            $quote->save();
            //echo json_encode($quote->getData()); die;
            $cartResult = $this->quoteRepository->getActiveForCustomer($customerId);
            //print_r(json_encode($cartResult['quote'])); die;
        }


texts: How to Add sorter in my custom product collection page

texts:
my block is

public function getPagerHtml()
{
    return $this->getChildHtml('pager');
}

public function getToolbarHtml()
{

    return $this->getChildHtml('toolbar');

}

<?php echo $this->getPagerHtml(); ?> //using this for pager
<?php echo $this->getToolbarHtml(); ?>//ushing this for sorting

it's only display paging block i want to display both pager and sorter


texts: magento2 override admin js file function

texts:
I want to override function setShippingMethod() to my module js vendor\magento\module-sales\view\adminhtml\web\order\create\scripts.js

here is a function

define([
    "jquery",
    'Magento_Ui/js/modal/confirm',
    'Magento_Ui/js/modal/alert',
    "mage/translate",
    "prototype",
    "Magento_Catalog/catalog/product/composite/configure",
    'Magento_Ui/js/lib/view/utils/async'
], function(jQuery, confirm, alert){

    window.AdminOrder = new Class.create();

    AdminOrder.prototype = {
        ...
        ...
        ...
        setShippingMethod : function(method){
            var data = {};
            data['order[shipping_method]'] = method;
            console.log(method);
            this.loadArea(['shipping_method', 'totals', 'billing_method'], true, data);
            /*if(method=='dpd_relay_common'){
                jQuery( "#click-me" ).trigger( "click" );

            }*/
        },
        ...
        ...
        ...
    };

});


texts:
I am facing a problem with a new store. On the product page it shows above the options field (also in configurable product) the name: SIZE. I need to remove that. Does someone know where i do that?

Thank you


texts: How to disable images from payment module

texts:
I have installed "online payment module".
https://github.com/dotpay/magento2-payment

The entire store displays very large icons of this payment company which it does not need.

Any one know how can I delete this images ?


texts: What are the known issues for Magento versions?

texts:
Is there a public list (maintained by the community or by Magento) of all known issues for the different versions?
It seems like a no-brainer that such a list should exist, but at least I'm not aware of any.
Thanks for any pointers!


texts: What is the best solution to adopt for email marketing in magento?

texts:
I am in a requirement to develop something that will help me to send emails to subscribed customers for their abandoned carts, pending wishlist items, promotional email whenever required, etc.

What is the best way to adopt for this, any idea?

Any suggestions like Mailchimp, Mandrill,etc?


texts: Magento patch test returns "UNKNOWN: That URL doesn't seem to be accessible."

texts:
I have installed the patch for my magento site and checked it in Magento Patch test.

Previously it showed site is safe.
But when I check now, it returns

UNKNOWN: That URL doesn't seem to be accessible.

But both the frontend and backend URL is working fine.

I checked the patch test in Magereport

It returns, the installed patches.

I need to know why the Magento patch test returned error.


texts: Layered Navigation wrong filtering custom attributes

texts:
I have added a couple of custom attributes to my store.
The default ones, like category or price is listing and filtering correctly.

By filtering correctly I mean correct displaying all of another filters (along with quantities) and price slider for example.

The problems starts whenever I try to select a custom made attribute. For example "Płeć" which is a gender. After selecting, the filters are showing (1) everywhere in products, as well as price slider is stopping to work. What is wrong with filtering ?

Here is my website with direct link to one of categories.


texts: Hide configurable product with child product availability out of stock from product listing page

texts:
I want to hide all the configurable products from product listing page for which even a single associated simple product is out of stock. For it first of all I'm trying to filter all configurable products but I'm getting the below  error

  SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e.type_id' in
  'where clause'

I'm using catalog_block_product_list_collection event.

Here is events section code from config.xml.

<events>
            <catalog_block_product_list_collection>
                <observers>
                    <retailon_configurable_list>
                        <type>singleton</type>
                        <class>retailon_configurable/observer</class>
                        <method>addInStockOnlyFilter</method>
                    -</retailon_configurable_list>
                </observers>
            </catalog_block_product_list_collection>
        </events>

Here is observer code:

<?php

class Retailon_Configurable_Model_Observer {
    /**
   * Observes the catalog_block_product_list_collection event
   */
  public function addInStockOnlyFilter($observer){
  $productCollection = $observer->getEvent()->getCollection()->addAttributeToFilter('type_id', 'configurable');

    }
}

How can I filter products in my observer provided the given conditions?


texts: How magento 2.1 can show the image? Which file or code do that? I am using Magento-CE-2.1.8_sample_data.


texts:
I had imported a csv file to add bulk products in magento. i had mentioned Image , small image and thumbnail as a link "www.mylink.com/imagename.jpg" . .

after the importing has done the image is not appearing in my frontend. .

the image link is appear in the alt and not in SRC. .

For example

so kindly help me out to mention it in SRC. . .


texts: Magento Community Edition 1.7 Subtracting Tax Instead of Adding It

texts: I recently had an extension installed professionally through another company (already contacted them) that caused some back-end glitching on my Magento e-commerce store. I was able to remedy most of the issues but this one is perplexing to the point I thought I would ask the Stack Exchange community. I have scoured all the settings in Sales->Tax and even experimented by changing settings to see if something happens, but I've come up with nothing. For some odd reason my store is subtracting the state tax instead of adding it. I am sure the vendor who installed it (aheadWorks will remedy the issue) but just in case they are lost/confused, I wanted to ask some of the experts. For those who want to see my problem live: Innov8tiveDesigns.com. It's doing this for literally all my products and I am just lost at this point.


texts: Change 'SKU' as bulk using Magmi or other

texts:
I have those kind of SKU products

ABC-001-NM

ABC-002-NM

ABC-003-NM

And I want to change the SKU like that

ABC-001

ABC-002

ABC-003

I have a lot of products so I need to change as bulk way

I don't want to change database directly

and looking for using Magmi or other fast way


texts: Magento 2.3 Layered Navigation Returns all Products, unfiltered

texts:
I have set up a store with demo products, installed the Porto, which uses MagePlaza layered navigation.

However, when I use the layered navigation to filter the products down, it always returns all products in that category.

Assuming it was either Porto or the MagePlaza extensions, I disabled both, only to find that the actual core of the Magento system was ignoring the selected filters in the built-in layered navigation also.

I imported 20 products via an online migration tool, from Shopify and have also added products manually. Both seem to be affected by the problem.

The layered navigation module itself behaves as it should, in so much as it generates the correct numbers of products and loses filters that should disappear as other are selected (as attributes are set as filterable with results).

Has anyone seen this behaviour before or know of where to start when it comes to debugging the issue?

Thanks


texts: how to insert custom form post data into custom created table after on submit

texts: please I am new in magento and need help in detail how to connected it with db and fire sql on it


texts: How to divide the product view into 3 columns in magento 2?

texts: I want to divide the product view into 3 corresponding columns, could anyone please help me solve this problem. thanks


texts: Shipping fees not get updated when quantity get increased in magento 2

texts:
In the admin configuration, I set a minimum order amount of free
shipping is 1000 INR and flat rate shipping as 50 INR per order.
In my cart page when I order a product below 1000 INR, the shipping
fees get applied as 50 INR correctly and if order above 1000 INR the
shipping applied as 0 INR(It's working fine).
But the problem is when I update the quantity in the cart page from
the product range from  below 1000 to above 1000 INR the shipping
charge not getting applied correctly(in this scenario only when
refreshing the cart the shipping charge get applied correcctly).
But vice versa when I decrease the quantity from above 1000 INR to
below 1000 INR the shipping charge get applied correctly.

When update the quantity shipping charge not reflected correctly

But after reload the cart page only shipping charge get reflected correctly


texts: How to set input renderer on attribute for custom entity?

texts:
I'm trying to use an input renderer for a text attribute in my custom entity, however it doesn't seem to be working.

I'm creating my ambassador entity in my setup file like this:

<?php
/* @var $installer Mage_Eav_Model_Entity_Setup */
$installer = $this;

$installer->startSetup();

$installer->createEntityTables($installer->getTable('ambassadors/ambassador'));

$installer->installEntities(array(
    'ambassador' => array(
        'entity_model' => 'ambassadors/ambassador',
        'table' => 'ambassadors/ambassador',
        'attributes' => array(
            'type'           => 'varchar',
            'input'          => 'text',
            'label'          => 'Featured Color',
            'required'       => false,
            'input_renderer' => 'ambassadors/adminhtml_helper_color'
        )
    )
));

$installer->endSetup();

The attribute is created and assigned to my entity but it renders like a normal text input in my edit form in the backend, I was looking at the Mage_Eav_Model_Entity_Setup class and it looks like input_renderer doesn't get passed in the _prepareValues method so I think this is part of the problem:

protected function _prepareValues($attr)
{
    $data = array(
        'backend_model'   => $this->_getValue($attr, 'backend'),
        'backend_type'    => $this->_getValue($attr, 'type', 'varchar'),
        'backend_table'   => $this->_getValue($attr, 'table'),
        'frontend_model'  => $this->_getValue($attr, 'frontend'),
        'frontend_input'  => $this->_getValue($attr, 'input', 'text'),
        'frontend_label'  => $this->_getValue($attr, 'label'),
        'frontend_class'  => $this->_getValue($attr, 'frontend_class'),
        'source_model'    => $this->_getValue($attr, 'source'),
        'is_required'     => $this->_getValue($attr, 'required', 1),
        'is_user_defined' => $this->_getValue($attr, 'user_defined', 0),
        'default_value'   => $this->_getValue($attr, 'default'),
        'is_unique'       => $this->_getValue($attr, 'unique', 0),
        'note'            => $this->_getValue($attr, 'note'),
        'is_global'       => $this->_getValue($attr, 'global', 1),
    );

    return $data;
}

The Mage_Catalog_Model_Resource_Setup does pass this attribute but it still doesn't work if I use that class instead, however it works fine if I assign the attribute to the catalog or category entities so I assume that setup class is linked to those entities in some way? Do I have to do something else to enable custom input renderers in my entity? Do I have to initialise it differently?


texts: Update Color Swatches homepage and Related Product Section

texts:
Now i try Update Color Swatches Pro extension to add color swatches options on homepage and Related product section on product details page.
It's Possible or not Please suggestion.


texts: Adding Magento's required structure to a php file

texts:
This is a weird request but I've done it before and it worked wonders.

I have a need to make a custom PHP file in my sites root folder. I need to give this file access to all of the magento functions inside.

$setup = new Mage_Eav_Model_Entity_Setup(‘core_setup’);

I did this once before successfully when I wrote a script to parse a massive database of trading cards into useful data then has the php script automatically add the cards to the database.

My problem is I did this on a old version of XMAPP that I sadly lost the backup files of when my pc died.

What files do I need to include in a blank php file to have access to the required magento core functions?


texts:
I recently launched my new magento website altough I noticed long loading times when opening a page with multiple products.

The more products the page displays the longer the loading time is. For example: http://www.neflyx-webshop.com/dames/dream.html
Has a way longer load time than http://www.neflyx-webshop.com/dames/anna.html

I think it is because each product has many associated products but why does it slow down the loading that much? Is there anything I can do about this issue? Would caching help here?

Thanks!

EDIT: I figured out the slow load time is caused by the product swatches. I disabled them and the load time went to as little as 0.2 seconds. Does anyone know a fix for this? I believe swatches really add a lot of value to my website.


texts: Magento2: How to avoid fake registration?

texts:
How to avoid fake registration?

I have added google ReCaptcha. But getting the same issue.

Please help me


texts: magento 1.9 : how can i upgrade recaptcha to v2 or v3?

texts:
In blog post recaptcha shown this error in comment
recaptcha v1 is shutdown please upgrade
My website used recaptcha v1 in blog
how i can upgrade in magento 1.9?


texts: Product Gallery Image Upload Issue in Magento 2.1.4

texts:
While uploading an image to the product gallery in magento backend product edit, I am getting the below error.

  "We Dont Recognize or Support this File Extension type"

For all extension types i am getting the same error and I am getting product Upload call response as

  "File was not uploaded" error code: 666

I have checked the pub/media folder permission and also ensured the allowed file extensions.

How to resolve this?


texts: Selling Products By Weight: Multiple Options & Accurate Stock Management

texts:
I'm fairly new to Magento - I have no idea how to achieve what I am about to propose, nor what would be the best way to go about it.

(Note: This is not a question about the Weight attribute)

My store sells a number of products that I buy in bulk and weigh out into smaller amounts for sale to retail customers. I already sell these products in smaller and larger packs - eg 25g, 50g, 100g, 250g - these are currently set up as simple products and arranged into categories by type of product.

Eg Category: Herbs/Sage contains "Sage 25g", "Sage 50g", "Sage 100g", "Sage 250g".

This is obviously terrible. Apart from populating each category with near identical products with identical images and descriptions, it also makes stock management a nightmare: to ensure I don't sell more than what I have, I have to split up a wholesale order of, say, 5kg into 4x250g,10x100g,etc,etc. This brings up the issue that it's now possible to have 250g in stock, but not 25g if all the preallocated 25g bags have been sold.

I would like to have situation where buying any one of these products takes a total stock down by an amount representative of the size of the product.

Question 1) Is it possible to use "bundled products" for this?

I imagine something like this might work. The product with the lowest weight (25g) is a simple product - when I get, for example, 1kg more of that product from a supplier, I can then set the stock of the 25g simple product to 40 (40 * 25g = 1kg = all my stock). Then I would create bundled products containing multiples of the simple products. Eg my 100g product would be a bundle of four 25g simple products. Then, when someone purchases a larger quantity, the stock of the simple product is reduced by the correct amount. (100g product = 4 * 25g simple product, buying the 100g "bundle" reduces simple product's stock by 4)

Is this how bundled products work?

Question 2) Can I group these bundled products up into a single configurable product?

Now that accurate stock management has been taken care of above, I would like to get rid of the multiple nearly-identical products by combining all the available weights into one (I assume) configurable product. This way, only a single product appears on the site, with one image, one description, one url, etc. I could then get rid of the bottom layer of my category hierarchy, so then my single "Sage" product would sit in the top-level "Herbs" category.

Question 3) Of course, being new to Magento, I have no idea what I'm talking about. Is there a better way to achieve everything talked about above?

(I don't actually sell herbs, this is just an example)


texts: Checkout page: The requested qty is not available

texts:
Wired issue [Magento 2.3.2-p2] While placing a final payment I'm getting
"server 500 error The requested qty is not available" While product qty is available.
If qty is not available then it should give error while adding to the cart not on the checkout page.
1 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): The requested qty is not available

Exception #0 (Magento\Framework\Exception\LocalizedException): The requested qty is not available
<pre>#1 Magento\Quote\Model\Quote->updateItem(1049, &Magento\Framework\DataObject#00000000438f730900000000335e9cbe#) called at [vendor/magento/module-quote/Model/Quote/Item/CartItemPersister.php:73]
#2 Magento\Quote\Model\Quote\Item\CartItemPersister->save(&Magento\Quote\Model\Quote\Interceptor#00000000438f685400000000335e9cbe#, &Magento\Quote\Model\Quote\Item\Interceptor#00000000438f686800000000335e9cbe#) called at [vendor/magento/module-quote/Model/QuoteRepository/SaveHandler.php:82]


texts: Factory create model is not empty Magento 2

texts:
I use a custom model with it's own Factory.

In my helper in the construct

public function __construct(

\Company\Module\Model\ResourceModel\Communication\CollectionFactory $communicationFactory
){

$this->_communicationFactory = $communicationFactory;

return parent::__construct($context);

  }

I created the first registry and saved it with

$communication = $this->_communicationFactory->create();

And after adding some data

$communication->save();

By the time I created the first one, there was no problem, everything ok.
But when I try to create another one the instance of the model has already loaded the data from the first one, and I get this error:

PHP Fatal error:  Uncaught Error: Call to undefined method Company\ModuleName\Model\ResourceModel\Communication\Collection::setStatus() in /Users/Username/projects/htdocs/example.com/htdocs/extensions/company/module-modulename/Helper/Data.php:414

Anyone knows why?


texts: How to sort the subcategories of specific parent category in magento 2.3 programatically

texts:
I have the parent category "XXX" and having around 115 subcategories under the same.

I am trying to sort the subcategories listed under of specific parent category at the backend...


texts:
I have an order attribute set by a community extension that works fine in admin but I need to use it from frontend too but I don't get it, I think is because is set like this in mysql4-install-0.3.0.php

$this->startSetup();
$this->addAttribute('order', 'atribute_name', array(
    'type'          => 'varchar',
    'label'         => 'Atribute Label',
    'visible'       => false,
    'required'      => false,
    'visible_on_front' => false,
    'user_defined'  =>  false
));
$this->endSetup();

How do I update it? I tried adding a update mysql 0.4.0 script and update the version without luck, also is there any other reason I get it empty from frontend.


texts: Magento 2 How to override Magento\Customer\Block\Address\Book block in my custom module?

texts:
I want to override block Magento\Customer\Block\Address\Book in my custom module. And need to add a new function which returns module status enable/disable, which is defined in the model class. I need to call my custom function in book.phtml which is copied to my module.

Thanks.


texts: Magento 2 Can't add new tab in product page in admin

texts:
I am trying to add a new tab in the product page in admin but it's no appears in the product page.

The code is:

  Vendor\Demo\view\adminhtml\layout\catalog_product_edit.xml

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

    <referenceBlock name="product_form">
        <block class="Vendor\Demo\Block\Adminhtml\Catalog\Product\Edit\Tab\Demo" name="demo.tab">
            <arguments>
                <argument name="config" xsi:type="array">
                    <item name="label" xsi:type="string" translate="true">Demo Tab</item>
                    <item name="collapsible" xsi:type="boolean">true</item>
                    <item name="opened" xsi:type="boolean">true</item>
                    <item name="sortOrder" xsi:type="string">2</item>
                    <item name="canShow" xsi:type="boolean">true</item>
                    <item name="componentType" xsi:type="string">fieldset</item>
                </argument>
            </arguments>
        </block>
    </referenceBlock>

  Vendor\Demo\Block\Adminhtml\Catalog\Product\Edit\Tab\Demo

<?php
  namespace Vendor\Demo\Block\Adminhtml\Catalog\Product\Edit\Tab;

  use Magento\Backend\Block\Template\Context;
  use Magento\Framework\Registry;

  class Demo extends \Magento\Framework\View\Element\Template{

     protected $_template = 'product/edit/demo.phtml';

    protected $_coreRegistry = null;

    public function __construct(
                              Context $context,
                              Registry $registry,
                              array $data = []
                              )
    {
       //echo "heloooo"; exit;
        $this->_coreRegistry = $registry;
        parent::__construct($context, $data);
    }

   public function getProduct(){
      return $this->_coreRegistry->registry('current_product');
   }

}

  Vendor\Demo\view\adminhtml\templates\product\edit\demo.phtml

Demmooo

the tab not appearing in admin page.


texts: To customize styles for RWD theme regarding IE-7 browser compatibility view

texts: I need to style for front-end regarding Internet Explorer 7 Browser compatibility view. I've been implemented my custom theme for our site from RWD theme. Now i'm using magento version of  1.9.1.0. While i tried to design for ie-8, I chose ie-8.css stylesheet which was in the directory. In page.xml it simply itself assigned for IE browsers verison lte IE-8. While i checked styles in IE-8 browser, it worked as charm. But when switching to IE-7 by using IE developer's mode, Total design getting crashed. I don't know what i did mistake in it. Can any one give suggestions regarding this problem.


texts: Any best free Multi Seller Marketplace Extension in Magento store?

texts: I am searching a free Magento multi seller extension where seller can do shipment and generate packing slips.I want to implement extension in my website.Anybody knows about free Multi seller Marketplace extension in Magento Marketplace store?


texts: How to set selected option in select box magento 2

texts:
I have a select box in filter section of admin grid. I need to set default selected option. Here is my code

Model/Config/Source/Errortype.php

<?php
namespace Bridge\ErrorNotification\Model\Config\Source;

use Magento\Framework\Option\ArrayInterface;

class Errortype implements ArrayInterface
{
  public function toOptionArray()
  {
    $result = [];
    foreach ($this->getOptions() as $value => $label) {
        $result[] = [
             'value' => $value,
             'label' => $label,
         ];
    }

    return $result;
  }

  public function getOptions()
  {
    return [
        'select' => __('Select'),
        '404' => __('404'),
        'System Error' => __('System Error'),
        'Login Failed' => __('Login Failed'),
    ];
  }
 }

view/adminhtml/ui_componenet/listing.xml

    <column name="error_type" component="Magento_Ui/js/grid/columns/select">
        <settings>
            <label translate="true">Error Type</label>
            <options class="Bridge\ErrorNotification\Model\Config\Source\Errortype"/>
            <filter>select</filter>
            <dataType>select</dataType>
        </settings>

    </column>


texts: A Magento store runs better in a CPU or Memory optimized server?

texts:
I'm preparing my server, I have to choose a performance plan, independent of the hosting provider, which plan makes more sense to a Magento 2 store?

General Purpose

High-performance virtual machines with a good balance of memory and dedicated hyper-threads from best in class Intel processors. A great choice for a wide range of mainstream, production workloads, like web app hosting, e-commerce sites, medium-sized databases, and enterprise applications.

CPU-Optimized

Compute-optimized virtual machines with dedicated hyper-threads from best in class Intel processors. Best for CPU-intensive applications like CI/CD, video encoding and transcoding, machine learning, ad serving, batch processing, and active front-end web and application servers.

Memory-Optimized

Memory-rich virtual machines with 8GB of RAM per vCPU and dedicated hyper-threads from best-in-class Intel processors. Ideal for RAM-intensive applications like high-performance databases, web scale in-memory caches, and real-time big data processing.


texts: Magento 2 create a button in customer account page

texts:
I want to create a button in customer account page.

My aim is add a button to remove all active carts.

To do this what shall I do? do I need to override any files?

Please let me know if there is anything else could follow up for guide

I am using Magento 2.2.10


texts: Getting Cannot read property 'nodeName' of undefined in magento 2 console

texts: I am getting this error on all of the pages except the HOMEPAGE, i am using a custom theme whose parent theme is LUMA.


texts: Installing for new account getting error addin admin

texts:
./magento admin:user:create     ( used temp pass for purpose of post )

#0 /home/juneusa/magento2/vendor/magento/zendframework1/library/Zend/Validate.php(98): Zend_Validate_StringLength->isValid('$omeP##')
#1 /home/juneusa/magento2/vendor/magento/framework/Validator/DataObject.php(72): Zend_Validate->isValid('$omeP##')
#2 /home/juneusa/magento2/setup/src/Magento/Setup/Console/Command/AdminUserCreateCommand.php(91): Magento\Framework\Validator\DataObject->isValid(Object(Magento\Framework\DataObject))
#3 /home/juneusa/magento2/vendor/symfony/console/Helper/QuestionHelper.php(384): Magento\Setup\Console\Command\AdminUserCreateCommand->Magento\Setup\Console\Command\{closure}('$omeP##')
#4 /home/juneusa/magento2/vendor/symfony/console/Helper/QuestionHelper.php(81): Symfony\Component\Console\Helper\QuestionHelper->validateAttempts(Object(Closure), Object(Symfony\Component\Console\Output\StreamOutput), Object(Symfony\Co in /home/juneusa/magento2/vendor/magento/zendframework1/library/Zend/Validate/StringLength.php on line 248


texts: Want to Show random products in Particular category in Home page, I got a code but product price will be repeat to all products, What to do?

texts:
I want to show random products in particular category in my home page, i tried this code http://www.magikcommerce.com/…/random-products-magento-hom…/ It working, but product price have extra 4 digits like : 1900.0000 how to remove last 4 digits can you help me ?

I tried magento default price module it remove last 4 digits, But it repeat single price to all products.

My working website : http://m.machinetoolsemart.com/ Please reply me as soon as possible


texts:
Just update to 2.3.0, use setup:di:compile and get following error:

  Warning: Declaration of Iksanika\Productmanage\Model\ResourceModel\Search\Collection::_getSelectCountSql($select = NULL, $resetLeftJoins = true) should be compatible with Magento\Catalog\Model\ResourceModel\Product\Collection::_getSelectCountSql(?Magento\Framework\DB\Select $select = NULL, $resetLeftJoins = true) in /home/server/web/server.dev.vendor.com/public_html/app/c
    ode/Iksanika/Productmanage/Model/ResourceModel/Search/Collection.php on line 40

    public function _getSelectCountSql($select = null, $resetLeftJoins = true)
{
    $this->_renderFilters();
    $countSelect = is_null($select) ? $this->_getClearSelect() : $this->_buildClearSelect($select);
    if(count($this->getSelect()->getPart(\Zend_Db_Select::GROUP)) > 0)
    {
        $countSelect->reset(\Zend_Db_Select::GROUP);
        $countSelect->distinct(true);
        $group = $this->getSelect()->getPart(\Zend_Db_Select::GROUP);
        $countSelect->columns("COUNT(DISTINCT ".implode(", ", $group).")");
    } else {
        $countSelect->columns('COUNT(*)');
    }
    return $countSelect;
}

This error appears only on dev server, on local - all ok. How to resolve this error?


texts: How to set "Secure flag and HttpOnly Flag" on all magento cookies?

texts:
I am seeing many of the cookies that do not have the secure & http only flag set on it.

; http://php.net/session.cookie-secure
session.cookie_secure = true

; http://php.net/session.cookie-httponly
session.cookie_httponly = true

I have tried to set it using php.ini & .htaccess but it did not work on Magento ver. 1.14.2.4
Is their anyway we can set it on all cookies ?


texts: Delete Customer from Admin Panel in Magento-2.1.12

texts: When i delete customer from admin panel of Magento-2.1.12.Any problem is occur in Magento-2.1.12????


texts: Magento 2 recently ordered block add to cart button

texts:
I am experiencing an issue with the recently ordered block which is positioned on category pages in Magento 2.2.

After the customer orders products, they should show in this block as a list of recently ordered items.

They show normally, but without the add to cart button

All of the products are in stock and enabled.

By default the Magento_Sales/templates/reorder/sidebar.phtml template is used to show this block.

This piece of code makes the Add to cart button show or not:

    <button type="submit" title="<?= /* @escapeNotVerified */ __('Add to Cart') ?>" class="action tocart primary">
        <?= /* @escapeNotVerified */ __('Add to Cart') ?>
    </button>

Seems that !lastOrderedItems().isShowAddToCart returns true...I'm just not sure why.

There is no display: none property which is out of place. The no-display class gives it the display: none property. And this class depends on the result of !lastOrderedItems().isShowAddToCart.

As far as I can see, this is in Luma theme also in default Magento 2.2, but it is bypassed by Luma's additional css (display: block is added to this element with custom css).

Since this is basically default Magento 2.2 code, what am I missing? Is this a default bug or?


texts: get the deleted attribute back to the live site

texts:
we missly deleted the attribute : "age" from live site.

attribute code : "age" attribute label : Age group

we assigned this  attribute to thousands of products.

is there any option to get that attribute back in database?

we have a yesterday database backup.

is i have to export the eav_attribute table from yesterday database and import to the current database?....

for this to do, is i have to delete the eav_attribute table from current database?

or is there any option to export and import only particular attribute instead of "eav_attribute" table


texts:
We use different suppliers to deliver our orders.
But when I enter the correct tracking number when shipping the order, the order tracking pop up does not work.

Is it possible to redirect directly to the currect trackingpage of the supplier, instead of showing this popup?

See this:

How can I solve this issue?


texts: Magento 2, Can't Enable WYSIWYG on description attribute

texts:
I'm trying to enable the WYSIWYG editor, on the description product attribute. Magento ver. 2.1.7.

I've enabled the WYSIWYG in Store > Attributes > Product > description

Our Product description attribute type is Text Area

I've also enabled the wysiwyg for everywhere else, and it is working on CMS Pages & Blocks.

Store > Configuration > General > Content Management > Enable wysiwyg.

But still the Product description attribute does not have the wysiwyg enabled.  I've cleared the cache, re-indexed, compiled & deployed from the Magento CLI.  There are no JS errors in the browser console.

Am I missing something?


texts: Adding custom information to Magento 2's checkout "order summary"

texts:
I'm working on my first Magento 2 project, and I'm slowly getting to grips with how everything works.

Then, I reach the point where I need to customize the checkout page and it throws a massive curveball, replacing the phtml/XML template system I've gotten used to with a completely different Knockout one.

In a nutshell, I store some personalization data in the quote item's "additional_data" field, and I need to show it in the checkout order summary.

I have successfully overridden /frontend/web/template/summary/item/details.html with my own custom template, but I have no idea how to get the data from the product object and display it using Knockout.

Has anyone done anything similar they wish to share to get me started?


texts: Shipping Methods in backend returns blank page

texts:
whenever I try to customize my shipping methods it returns a blank page and I can't really do anything.
I tried flushing my cache of course but that didn't work. Do you have any idea to solve that?
EDIT: checked my system.log and found this:

2015-07-15T20:54:36+00:00 ERR (3): Warning: include(Mage/Usa/Model/Shipping/Carrier/Dhl.php): failed to open stream: No such file or directory  in /home2/dbname/public_html/lib/Varien/Autoload.php on line 94
2015-07-15T20:54:36+00:00 ERR (3): Warning: include(): Failed opening 'Mage/Usa/Model/Shipping/Carrier/Dhl.php' for inclusion (include_path='/home2/dbname/public_html/app/code/local:/home2/dbname/public_html/app/code/community:/home2/dbname/public_html/app/code/core:/home2/dbname/public_html/lib:.:/usr/lib/php:/usr/local/lib/php')  in /home2/dbname/public_html/lib/Varien/Autoload.php on line 94


texts: Magento 2 API for product add to compare and compare list

texts:
There is any way to get API for product add to compare and get compare list for customer.
Thanks


texts: Why does magento re-index pricing on each checkout?

texts:
If you look within Mage_CatalogInventory_Model_Observer::reindexQuoteInventory() it calls the following line: Mage::getResourceSingleton('catalog/product_indexer_price')->reindexProductIds($productIds);

The reindexQuoteInventory() is called on the following events:

sales_model_service_quote_submit_success
checkout_submit_all_after (via Mage_CatalogInventory_Model_Observer::checkoutAllSubmitAfter())

This is known as one of the issues for contributing to locking issues on busy sites with a high volume of purchases.

My questions are:

Why is the pricing for products re-indexed on each checkout?
What affect does it have from removing it?
If it's used for catalog rules surely it would only be very specific rules?


texts: Add shipping methods in Magento for multiple stores with single website

texts:
I have configured Magento for multiple stores with single website.

But how do i set shipping methods for different stores.

  If the customer selects  store1, Need to show different shipping
  options. (i.e Door delivery and store pickup)

  If the customer selects  store2, Need to show different shipping
  options. (i.e only store pickup)

Is it possible to set different shipping options for different stores?


texts: Magento2 admin logo showing 403 Forbidden error

texts:
I have installed magento2.1 and all works fine except admin logo, it is showing as broken and in console it is showing 403 error .

Forbidden
You don't have permission to access /pub/static/adminhtml/Magento/backend/en_US/images/magento-logo.svg on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

I tried below commands :

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

But logo not showing on admin login page. while pub directory and files have 0777 permission.

From error it is showing permission issue. Is it?

If so, How to change permission for specific user?

EDIT

When I am trying below command then only once the logo shows on server but after that again display 403 error.

rm -rf  pub/static/adminhtml/Magento/backend/en_US/images/magento-logo.svg


texts: Overriding\Extending Magento_Sales js files

texts:
i need to add my custom function call at the end of function loadArea() which located at Magento_Sales/order/create/scripts.js. I already do this with overriding by requirejs-config.js

var config = {
    "map": {
        "*": {
            "Magento_Sales/order/create/scripts": "Vendor_Module/js/order/create/scripts"
        }
    } };

All works fine, but in my opinion this way is bad.
I looked at mixins and think that maybe it is what i need, but i can't understand how to add mixins to this file. It seems like mixins can be used like around plugins.

Finally, question is "How to add my custom function call at the end of loadArea() without overriding order/create/scripts.js file?"

Will be glad for any advice


texts: Which table contains settings for countries available for shipping

texts:
I'm trying to figure out, which database table is storing settings for enabled countries for shipping.
I have to disable some countries with sql install script


texts: Magento 2: Change Product status OUT OF STOCK Programmatically

texts: I need to change product as out of stock without changing its Quantity. I mean if a product having quantity 5, It will be same but product would be changed to OUT OF STOCK. Is it possible in magento?


texts: Magento 2.4.2 - New media gallery - show svg

texts:
So i changed from the old media gallery to the new media gallery one. Everything works besides from the new media gallery doesn't show pdf and svg files. I can upload them, but can't see them.
Anyone who has an idea where to add them?
I have tried using
php bin/magento media-gallery:sync
php bin/magento media-content:sync


texts: iterate by using loops for template variables in magento

texts:
$quoteItems=array();
foreach($quotecollection as $value)
{
$quoteItems[] = $value['name'];
}.
$vars['articledescription'] = $value['name'];.

I have used the above code for email template.
I want the product name to be iterated through loops , when there are multiple products ordered by customers.
pls suggest with code


texts: Can't run magento 2.2.3 on localhost via WAMP

texts:
i try to install magento 2.2.3 in localhost wamp 3.1.3 /www directory but wizard wont start.

I try 127.0.0.1/magento but give me 500 Internal Server Error.

Any suggestion?


texts: what are steps to do for Security hardening Magento websites

texts:
I am doing the below steps to make website built with Magento is secured.

security patches update needs to be updated frequently
HTML escape in all Inputs
Create multiple user for different user (Dev, HTML, Testing, Live user) with different roles
HTTP cookies in .htaccess
X-Frame should be enabled in BO and apache configuration
BO admin path should be in a different domain or URL
Admin domain should be accessible only from specific IP's
If we add Load balancer then Session, cache, media storage should be added in centralized location, like s3 Bucket
If we add Load balancer then piece of code should be added in index.php for http termination Ref Link : Magento wrongly redirects https!

Do I need to do any more steps to make sure my Magento website is secured.

Thanks you your help in advance.


texts: in setting up a store with multiple currencies is it best to only offer option at checkout or based on entry IP address?


texts: Error while calling the phtml file in static block

texts:
I created a multiselect attribute with label featuredetails.
I created a static block and called the feature.phtml file(a newly created phtml file) in it like:

{{block type="core/template" template="catalog/product/view/feature.phtml"}}

The content of the phtml file is:

    <?php
   $_prodID = Mage::registry('current_product')->getId();
   $_product = Mage::getModel('catalog/product')->load($_prodID );
?>

    <?php
        $Feature = explode(",",$_product->getResource()
        ->getAttribute('featuredetails')->getFrontend()
        ->getValue($_product));
        foreach($Feature as $key => $value): ?>
        <a href="<?php echo $_product->getProductUrl() ?>" ?>
            <?php echo ""; ?>

       <?php endforeach; ?>

The content of the block will map the attributes with the media images.

But am getting error like: Fatal error: Call to a member function getFrontend() on boolean

Help me to resolve this error.


texts: review_save_after event observer is not running correctly

texts:
I am using Magento 1.8 version. I have written an observer that has to run when admin save a product review with status "Approved". And i have created a ratings attribute for every product with multiselect and it should automatically update every time when admin save the review for a product.

Note: Reviews are in Reports/Reviews/Product Reviews.

etc/Config.xml Code:

<review_save_after>
    <observers>
        <efkadminhtml>
            <class>efkadminhtml/observer</class>
            <method>ratingsUpdate</method>
        </efkadminhtml>
    </observers>
</review_save_after>

mode/Observer Code

public function ratingsUpdate(Varien_Event_Observer $observer)
{
    $object = $observer->getEvent()->getObject();
    $statusId = $object->getStatusId();

    if($statusId == 1) {
        $common = Mage::getSingleton('catalog/common');
        $attribute = $common->getAttribute('ratings');
        Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);

        $productId = $object->getEntityPkValue();
        $product = Mage::getModel('catalog/product')->load($productId);
        $avgRating = Mage::getBlockSingleton('efkreports/product_allReviews')->getAvgReview($product->getId());

        Mage::log($avgRating);
        Mage::log($attribute->getOptionId(round($avgRating)));
        $product->setRatings($attribute->getOptionId(round($avgRating)));
        //$product->setRatings(round($avgRating));
        $product->save();
    }
}

When admin is attempting to save review for a product, the above observer code is executing and review is updating correctrly but product is getting previous review value rather than latest updated review.

I wrote <review_save_after> but it getting previous value. What is the event called after "Save Review" Is that correct or not?

Please tell me where I am wrong.

Thanks in advance.


texts: Faster way to load media images in a product collection

texts:
TL;DR: How do I load the product images/gallery without loading the whole product?

I want to load the images on a product. What I do in the .phtml

$_popularCollection = $this->getPopularCollection();
foreach ($_popularCollection as $_product):
    // the rest
    $mediaGallery = $_product->getMediaGalleryImages();
endforeach;
//the rest

What I do in the Block class:

public function getPopularCollection() {
    // http://magento.stackexchange.com/q/5838/3089

    // no category
    if ( is_null( $this->getCategoryId() ) )
        return false;

    /** @var Mage_Catalog_Model_Category $category */
    $category = Mage::getModel('catalog/category')->load( (int)$this->getCategoryId() );

    /** @var Mage_Catalog_Model_Resource_Product_Collection $_popularCollection */
    $_popularCollection = Mage::getModel('catalog/product')->getResourceCollection();
    $_popularCollection->addAttributeToSelect('*');
    $_popularCollection->setStoreId(Mage::app()->getStore()->getId());
    $_popularCollection->addCategoryFilter($category);

    return $_popularCollection;
}

This works But I load everything: $_popularCollection->addAttributeToSelect(*);

I tried $_popularCollection->addAttributeToSelect('media_gallery');
But it doesn't seem to work.


texts: Magento 2 Cannot add or update a child row

texts:
I just updated to 2.3 and when i try to "setup:uprade" i'm getting next error:

  SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (project.catalog_product_entity_int, CONSTRAINT CAT_PRD_ENTT_INT_ENTT_ID_CAT_PRD_ENTT_ENTT_ID FOREIGN KEY (entity_id) REFERENCES catalog_product_entity (entity_id) ON DELET), query was: INSERT INTO
              catalog_product_entity_int(attribute_id, store_id, entity_id, value)
              VALUES
              (:attribute_id0,:store_id0,:entity_id0,:value0),(:attribute_id1,:store_id1,:entity_id1,:value1),(:attribute_id2,:store_id2,:entity_id2,:value2),(:attribute_id3,:store_id3,:entity_id3,:value3)
              ON duplicate KEY UPDATE value = VALUES(value)

But cant i cant find 'CAT_PRD_ENTT_INT_ENTT_ID_CAT_PRD_ENTT_ENTT_ID' entry in this table? How can i solve this?


texts: migrate products, categories, customers from 1.7.0.2 to 1.9.0.1

texts:
How we can take backup from Magento 1.7.0.2 and restore in 1.9.0.1?

We need to take backup for

Customers
Products
Categories

I only found some expensive extensions. I know that we can do it easily using database backup but this is in case of same Magento version. My question is, how can I migrate from 1.7.0.2 to 1.9.0.1?


texts: Magento2 Max Depth Top Category Navigation

texts: Changing the Max Depth in the admin section does not apply to the frontend. Anyone has some qorkaround to display just the first level categories in the top menu?


texts: Magento 2 - Drop down select list for custom magento system configuration section

texts: I need to select one value from multiple option in custom system config file.


texts:
getSku works but getAttributeText doesn't? I have tried setting sku as the attribute in AttributeText as I know it returns a result. Also tried getManufacturer.
$xml .= $this->createNode("g:brand", $this->getAttributeText($product, 'manufacturer'));
        $xml .= $this->createNode("g:mpn", $product->getSku());


texts: Magento 2 Popup Modal give errors into the iphone(safari)

texts:
I am using the Magento 2.3.2 Version.

I have set the popup modal but it is not working into the iPhone safari browser. They give the following error:

  TypeError: undefined is not an object (evaluating 'elem.nodeName'

Please check below my popup modal code

require(
    [
        'jquery',
        'Magento_Ui/js/modal/modal',
        'owlslider'
    ],
    function(
        $,
        modal
    ) {
        var options = {
            type: 'popup',
            responsive: true,
            innerScroll: true,
            buttons: []
        };

        var popup = modal(options, $('#popup-mpdal')); //This line Gives error
        $(".country_switcher").on('click',function(){
            $("#popup-mpdal").modal("openModal");
        });
    });

Please give me the solution how to solve this. Thanks in Advance.


texts: Magento 2 - Add color picker to category attrbiute

texts:
We want to add color picker to category custom attribute, we followed some of guide but no luck.

Any help will be appreciated. Thank you.


texts: Adding custom global javascript validation

texts:
I have done some digging in internet but I haven't found any confirmed solution. What is the way to add custom js validation rule, that can be used globally as for example frontend_class for attributes or validation classes for form's inputs? It would be the best if I could store it in one of my modules.

By the way, for version 2.05 is there any class validating by min or max lenght of string/number of characters? The ones I have found in net don't work (seems to me they are outdated).


texts: Magento2 (pre-alpha) theme not showing in Admin

texts:
I created my own theme based on the blank theme but I can not get it to show in Admin

<design>
    <package code="default">
        <title>Default</title>
        <theme version="2.0.0.0" code="brent" parent="demo" featured="1">
            <title>Brent Super Theme</title>
            <requirements>
                <magento_version from="2.0.0.0-dev1" to="*"/>
            </requirements>
            <media>
                <preview_image>media/preview_image.jpg</preview_image>
            </media>
        </theme>
    </package>
</design>

I did also find the themes in the database

SELECT * FROM core_theme

and I did a test by removing the blank theme and now it doesn't show in admin!

Do I need to setup some sort of initialization?


texts: magento 2 How to make city drop down in checkout page

texts: I Want To city drop down like country and state option in checkout page.


texts: upgrade magento community edition to latest version

texts: Today we receive an email from Magento company pointing that customers with magento commerce 2.2.x must upgrade their product version from 2.2.x to 2.3 because there will not be supported no longer. Right now we are using the community edition for magento 2.2.6 and really don't if it's necessary, also some plugins may not work with the latest version and that means work to do.


texts: Magento 2: change price section in sales email template

texts:
i tried to remove a price section from orders emails.
For example for new order email e receive a FPT price which I want to be removed

For this, I found that this price came from  magento/module-sales/view/frontend/templates/email/items/order/default.phtml :

 <td class="item-price">
        <?= /* @escapeNotVerified */  $block->getItemPrice($_item) ?>
 </td>

getItemPrice function looks like this:

  public function getItemPrice($item)
    {
        $block = $this->getLayout()->getBlock('item_price');
        $block->setItem($item);
        return $block->toHtml();
    }

What i tried to do now is to find which block is 'item_price' to know the phtml related with this block, because i think there  is the place where my price is rendered, but i can't find.

The only thing I found was sales_email_tem_price.xml which have the name "item price' with email/items/price/row.phtml related tot this, but after i made some changes in this file nothinghappened,and i think  that this is not the file.

Does anyone how the price in email is renedered and how can i remove my FTP section from email?


texts: Product Page Image get hidden after to be loaded

texts:
I am developing a new magento 2 custom theme. I got a problem on product page. I don't know why the Image get hidden after few seconds to be loaded.

The image showing up and then hide itself.

any help?

Cheers


texts: How to change the font size in the packing slip PDF

texts:
I am running on version 1.3

The font on the Packing Slip PDF is very small and I would like to increase the size. I suspect when I do so the formatting will go wrong so can anyone tell me how change the font size and keep a nice looking layout?


texts:
This seems like a really basic question, but i want to change the page layout for 1-column pages created in the CMS, how do i do this without changing the layout of the homepage?

To change the homepage i've overriden cms_index_index.xml, and added additional blocks. I want to do the samething for all other 1 column pages, but they need a different wrapper class as follows:

<referenceContainer name="main.content" htmlClass="page-main wrapper">
            <container name="main.content.inner" htmlTag="div" htmlClass="wrapper-inner wrapper-inner--condensed" />
        </referenceContainer>

I'm overriding cms_page_view.xml. Am i overriding the correct file because the above change isn't being picked up?


texts: Magento2: set custom thumbnail size for products displayed in "New Products" widget on the homepage

texts:
I am working on a Magento 2.1.7 shop. To achieve this, I have created a child-theme of Magento Blank.

On the home page, I have inserted a "New Products" widget via the Magento admin.

I am overwriting the default template for this widget in my theme, with a app/design/frontend/VendorName/ThemeName/Magento_Catalog/templates/product/widget/new/column/new_default_list.phtml template file.

The problem is the product images are too small, I want to be able to set custom width and height.

The code for the product "squares":

  <a class="product-item-photo" href="<?php /* @escapeNotVerified */ echo $_product->getProductUrl() ?>"
    title="<?php /* @escapeNotVerified */ echo $block->stripTags($_product->getName(), null, true) ?>">
  <?php echo $block->getImage($_product, 'side_column_widget_product_thumbnail')->toHtml(); ?>

    <a href="<?php /* @escapeNotVerified */ echo $_product->getProductUrl() ?>"
      title="<?php /* @escapeNotVerified */ echo $block->stripTags($_product->getName(), null, true) ?>)" class="product-item-link">
    <?php /* @escapeNotVerified */ echo $this->helper('Magento\Catalog\Helper\Output')->productAttribute($_product, $_product->getName(), 'name') ?>

    <?php if ($_product->isSaleable()): ?>
    <?php if ($_product->getTypeInstance()->hasRequiredOptions($_product)): ?>
    <?php /* @escapeNotVerified */ echo $block->getProductPriceHtml($_product, '-widget-new-' . $suffix) ?>
    <button type="button" title="<?php /* @escapeNotVerified */ echo __('Add to Cart') ?>"
      class="action tocart btn"
      data-mage-init='{"redirectUrl":{"url":"<?php /* @escapeNotVerified */ echo $block->getAddToCartUrl($_product) ?>"}}'>
    <?php /* @escapeNotVerified */ echo __('Add to Cart') ?>

    </button>
    <?php else: ?>
    <?php
      $postDataHelper = $this->helper('Magento\Framework\Data\Helper\PostHelper');
      $postData = $postDataHelper->getPostData($block->getAddToCartUrl($_product), ['product' => $_product->getEntityId()]);
      ?>
    <?php /* @escapeNotVerified */ echo $block->getProductPriceHtml($_product, '-widget-new-' . $suffix) ?>
    <button type="button" title="<?php /* @escapeNotVerified */ echo __('Add to Cart') ?>"
      class="action tocart btn"
      data-post='<?php /* @escapeNotVerified */ echo $postData; ?>'>
    <?php /* @escapeNotVerified */ echo __('Add to Cart') ?>

    </button>
    <?php endif; ?>
    <?php else: ?>
    <?php if ($_product->getIsSalable()): ?>
    <div class="stock available" title="<?php /* @escapeNotVerified */ echo __('Availability') ?>">
      <?php /* @escapeNotVerified */ echo __('In stock') ?>

    <?php else: ?>
    <div class="stock unavailable" title="<?php /* @escapeNotVerified */ echo __('Availability') ?>">
      <?php /* @escapeNotVerified */ echo __('Out of stock') ?>

    <?php endif; ?>
    <?php endif; ?>

What shall I change here? Or is there an alternative to editing the new_default_list.phtml template file?

Thank you!


texts: I have problem with links in my magento store

texts:
I am having problem with my magento store. My links are not working properly...

My page links are like

for CMS pages

localhost/about-us

localhost/contact-us

and for category page

localhost/my-category

for product page

localhost/my-category/my-product

now problem is... when I try to redirect from localhost/my-category/my-product this link to Another cms page it suppose to redirect to localhost/about-us this, But it is actually redirecting to localhost/my-category/about-us

where will be the problem?It is only happening with CMS pages


texts: updated code not showing in magento frontend

texts:
We are developing magento site.

when I update the code in site files, it's not displaying in frontend.

even cleared cache, but still some  colors are not updating.


texts: Magento 2 : How to run bin/magento setup:static-content:deploy command programatically?

texts: Is there a way to run bin/magento setup:static-content:deploy in a M2 script? or programatically? I have a scenario where in the CSS file is replaced within the admin panel. So I was thinking to automate the running of bin/magento setup:static-content:deploy without going to the terminal and manually running this command. Is there a way to achieve this? It's not only the bin/magento setup:static-content:deploy but also the bin/magento cache:clean


texts: Magento2 Installation Problem on Windows 10

texts:
I tried to install Magento 2 on Windows10, XAMPP. It experiment got a successfully installed page. But it is not work correctly. This is a browser image

Anyone knows how to solve it ? Thanks in advance.


texts: How to use simple javascript not jQuery in Magento 2 footer?

texts:
I want to use javascript file in Magento 2.3 footer before the body and simple javascript, not jQuery.
How can I do that?
I have added requirejs-config.js file in module/view/frontend
code is

 var config = {
        map: {
            '*': {
                hello:'module_name/js/hello',
            }
        }
    };

and i have hello.js file in web/js folder but that javascript is not working at all . and most important is i want to add that file in the footer .


texts: Magento 2 : Why my module is on the vendor and app folder?

texts:
I use these commands to install my dependencies today:

composer config repositories.myvendor_cli vcs git@github.com:myvendor/my-cli.git
composer require myvendor/cli:dev-master

To work well I ever need to add the parameter "no-api": true,

The result in my composer it's like that:

...
    "magento/module-offline-shipping-sample-data": "100.1.*",
    "myvendor/cli": "dev-master"
},
...
"repositories": {
    "0": {
        "type": "composer",
        "url": "https://repo.magento.com/"
    },
    "myvendor_cli": {
        "type": "vcs",
        "url": "https://github.com/myvendor/extension-cli.git",
        "no-api": true
    }
},
...

When I run the composer update I see the module installed in two folders:

app/code/MyVendor/CLI/
vendor/MyVendor/CLI/

The Magento doesn't permit the same installation on both folders, how can I set to install just to vendor folder?


texts: what is the difference between disable module output and module active = true

texts:
In magento I come to knew that we can disabel our module by two ways

By navigating in the Magento backend to System > Configuration > Advanced > Disable modules output we can easily disable certain modules.
In the directory app/etc/modules, by changing the active-tag from true to false.

May I know what is the exact difference in these two technic?
Its very help if anyone give more detailed Answer.


texts: Changing time / date format on order grid (or all grids)?

texts:
I found no way so far to change the date / time format on the order grid (or even better all grids where its relevant). I guess some XML magic is required here.

Please take a look at https://prnt.sc/pmyywc for details.

Can anyone help here?

Magento 2.2.3


texts:
Magento pagination on product list page is not working. When choosing different number of products to show from dropdown list,the pager (screenshot 1,2,3 ...) displying correct, but instead of showing the correct number of products on the page, it just display all products at once on the page.

What is wrong?


texts: Product wise shipping cost on same address

texts: I want to show different shipping price for different products acceding to their size and weight. I don't know how to implement this in Magento. It will create different order like multiple address system does at checkout. Please suggest me anyway to implement this feature.


texts: Authenticate user based on telephone number

texts:
I'm trying to validate customers login based on their telephone number and password instead on email and password.

I've rewritten authenticate method of Mage_Customer_Model_Customer model and the method goes like

    /* Load customer collection and filter based on given telephone number.
Later I'll pass telephone number in parameter. Right now I'm checking for a static telephone number */

  public function authenticate($login, $password)
{
         $collection = Mage::getResourceModel('customer/customer_collection')
                      ->addNameToSelect()->addAttributeToSelect('email')
                       ->joinAttribute('billing_telephone', 'customer_address/telephone', 'default_billing', null, 'left')
                    ->addFieldToFilter('billing_telephone', '8880421789');

            $login = array();
            foreach($collection as $collection)
            {
                   $login[] = $collection->getData('email');

            }
  $this->loadByEmail($login[0]);
  //Default Magento code goes afterwards
 if ($this->getConfirmation() && $this->isConfirmationRequired()) {
 throw Mage::exception('Mage_Core', Mage::helper('customer')->__('This account is not confirmed.'), self::EXCEPTION_EMAIL_NOT_CONFIRMED
                        );
                    }
if (!$this->validatePassword($password)) {
throw Mage::exception('Mage_Core', Mage::helper('customer')->__('Invalid login or password.'), self::EXCEPTION_INVALID_EMAIL_OR_PASSWORD
                        );
                    }
Mage::dispatchEvent('customer_customer_authenticated', array(
                        'model' => $this,
                        'password' => $password,
                    ));
                    return true;
                } }

It doesn't validate properly and always throws error "Invalid login or password." .
Also is there a proper way to load customer email id using the given telephone number without using collection?.


texts: How to override product model files in Magento 2?

texts:
I am using Magento 2.3

I have override below core file.

  vendor/magento/module-catalog/Model/ProductLink/CollectionProvider.php

To override this file I have created a new custom module in app/code directory.

I have created below files in my custom module:

  app/code/Custom/ProductModule/registration.php

\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Custom_ProductModule',
__DIR__
);

  app/code/Custom/ProductModule/etc/di.xml

    <?xml version="1.0"?>
    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
        <preference for="Magento\Catalog\Model\ProductLink\CollectionProvider" type="Custom\ProductModule\Model\ProductLink\CollectionProvider" />
    </config>

  app/code/Custom/ProductModule/etc/module.xml

    <?xml version="1.0"?>
        <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
            <module name="Custom_ProductModule" setup_version="1.0.1" />
    </config>

  app/code/Custom/ProductModule/Model/ProductLink/CollectionProvider.php

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

namespace Custom\ProductModule\Model\ProductLink;

use Magento\Catalog\Model\ProductLink\Converter\ConverterPool;
use Magento\Framework\Exception\NoSuchEntityException;

class CollectionProvider
{
    /**
     * @var CollectionProviderInterface[]
     */
    protected $providers;

    /**
     * @var ConverterPool
     */
    protected $converterPool;

    /**
     * @param ConverterPool $converterPool
     * @param CollectionProviderInterface[] $providers
     */
    public function __construct(ConverterPool $converterPool, array $providers = [])
    {
        $this->converterPool = $converterPool;
        $this->providers = $providers;
    }

    /**
     * Get product collection by link type
     *
     * @param \Magento\Catalog\Model\Product $product
     * @param string $type
     * @return array
     * @throws NoSuchEntityException
     */
    public function getCollection(\Magento\Catalog\Model\Product $product, $type)
    {
        if (!isset($this->providers[$type])) {
            throw new NoSuchEntityException(__("The collection provider isn't registered."));
        }

        $products = $this->providers[$type]->getLinkedProducts($product);
        $converter = $this->converterPool->getConverter($type);
        $output = [];
        $sorterItems = [];
        foreach ($products as $item) {
            $output[$item->getId()] = $converter->convert($item);
        }

        foreach ($output as $item) {
            $itemPosition = (int)$item['position'];
            while(true) {
                if (!isset($sorterItems[$itemPosition])) {
                    break;
                }
                $itemPosition += 1;
            }
            $sorterItems[$itemPosition] = $item;
        }
        ksort($sorterItems);
        return $sorterItems;
    }
}

After creating this module I have run all commands in SSH but it seems the file is not overridden properly. I am getting below error in the front end:

Error filtering template: Type Error occurred when creating object: Magento\Catalog\Model\Product\Interceptor

Front end:

So What is the issue in my module?


texts: How can I add products that will be part of assortment pack?

texts:
Struggling with how to set up products for the following scenario.  Would appreciate any insight or assistance.

Products

We sell beverage products that are similar size but different flavors.

12 SKUs in total
Each SKU is sold as a 6-pack
Each SKU should display on the page as a separate product (ex. Vanilla, Cherry, etc.)

Buying Process

The customer must buy in multiples of two '6-packs' to complete the order.  This means the minimum order must contain either of the following:

two '6-packs' of one SKU (ex. two '6-packs' of Vanilla) OR
one '6-pack' each of 2 specific SKUs (ex. one '6-pack' Orange plus one '6-pack' Grape)


texts:
I'm overriding a core JS file in my module. When I run

php bin/magento static-content:deploy

and refresh the page the JavaScript does not seem to change.

I started tracking the issue. I found that the file loaded in my pub/static/path_to_my_file is not updated. According to Magento 2 documentation it should have been updated, which is not happening.

Then after removing the pub/static folder design of frontend got ugly even after deploying static-content.

What is the cause and what is happening?


texts:
I've installed the magento setup and created an ssl certificate for https requests(i am working in localhost on Ubuntu), but when I create an account in my websites it shows firstly "the connection cannot be trusted" and after changing https to http it says "not found"
My other routes are working properly excepts for the ones which goes through https. I know its a certificate issue, so I want to remove the ssl certificate and reinstall it, but I can't figure which files to remove in order to remove the ssl certificate. Can any one help me out


texts: How to add a product to a specific website in Magento 2 codebase via api

texts:
My Magento 2.2.4 codebase runs multiple websites, and I am trying to add a product via API to a website with id of "4".

here's the payload of my POST request I tried:

{
  "product": {
    "sku": "000012553333",
    "name": "B21232",
    "price": 30.03,
    "status": 1,
    "type_id": "simple",
    "attribute_set_id":4,
    "weight": 1,
    "extension_attributes": {
        "website_ids": [4]
    }
  }
}

here's the endpoint:

https://example.com/rest/V1/products

So it adds the product to the website I want AND TO THE DEFAULT website.

So how do I get Magento 2 to add product to a specific website ONLY?

Thank you.


texts:
I have made a shipping Model in Magento 2 . Inside the collectRates function. I am getting all items in the cart and looping through them.
I can set the price based on the product title. But I can't get the value of the attribute this product has for example "shipping_code".
$products = $request->getAllItems();

foreach($products as $product){
   $productName = $product->getName();
}

I have tried everything.
$attributeValue = $product->getData('shipping_code');
$attributeValue = $product->getResource()->getAttribute('shipping_code');
$attributeValue = $product->getAttribute('shipping_code');

What am I doing wrong?
Magento/App/Code/module_folder/custom_shipping/Model/Carrier/custom_shipping.php
public function collectRates(RateRequest $request){

    $products = $request->getAllItems();
    foreach($products as $product)
    {
       $productName = $product->getName();
       $attributeValue = $product->getData('shipping_code');
    }

     $shippingPrice = "100";

    if ($productName == "test") {
        $shippingPrice = "200";
    }

    if ($attributeValue == "A") {
        $shippingPrice = "300";
    }

    $method->setPrice($shippingPrice);
    $result->append($method);

    return $result;
}


texts: Magento 2: how to add route rewrite URL with install/update of module?

texts:
Need to add URL rewrite to Admin -> Marketing -> Url Rewrites not via Admin but using install/update scripts of my module that it could be done automatically.
How it could be realized?


texts: Hoe to understand adding class with radio buttons

texts:
I've never really had an issue with JS in the past, but for some reason I can't seem to get some quite simple working!

In a nutshell, I have some radio buttons, and they're contained in DD tags a few levels back. I'm trying to style the DD tags depending on whether the radio button is selected or not.

Here is my HTML:

    <input name="shipping_method" type="radio" value="freeshipping_freeshipping" id="s_method_freeshipping_freeshipping" checked="checked" class="radio">

Walk-In

    £0.00

The JS i'm trying to use is:

$('input').change(function () {
 if ($('dd ul li').find(':checked')) {
  $(this).parent().parent().addClass('selected');
 }
});

But when looking at the Inspector, the class doesn't seem to be adding at all. There are no errors regarding this bit of JS so i'm assumig it's being called okay.

It can be viewed at www.asg.co.uk/gadgetclinic (it's in the Checkout area with the two buttons saying Walk-in and Post area)


texts: Magento 2 : Display Loader While Ajax call on Column row action?

texts:
Grid xml column:

   <column name="actions" class="My\Test\Ui\Component\Listing\Columns\Feeds\AdvancedActions>
                    <argument name="data" xsi:type="array>
                        <item name="config" xsi:type="array>
                            <item name="component" xsi:type="string>My_Test/js/grid/columns/actions</item>
                            <item name="dataType" xsi:type="string>text</item>
                            <item name="label" xsi:type="string" translate="true>Actions</item>
                            <item name="sortOrder" xsi:type="number>90</item>
                        </item>
                    </argument>
                </column>

Actions.js

define(
    [
    'jquery',
    'underscore',
    'mageUtils',
    'uiRegistry',
    'Magento_Ui/js/grid/columns/actions',
    'Magento_Ui/js/modal/confirm'
    ], function ($, _, utils, registry, Column, confirm) {
        'use strict';
    return Column.extend(
        {

            /**
             * Applies specified action.
             *
             * @param   {String} actionIndex - Actions' identifier.
             * @param   {Number} rowIndex - Index of a row.
             * @returns {ActionsColumn} Chainable.
             */
            applyAction: function (actionIndex, rowIndex) {
                var action = this.getAction(rowIndex, actionIndex),
                callback = this._getCallback(action);

                if (action.confirm) {
                    this._confirm(action, callback);
                } else if (action.popup) {
                    this._popup(action, callback);
                } else {
                    callback();
                }

                return this;
            },

           _popup: function (action, callback) {
                var popupData = action.popup;
                var dataType = popupData.type;

                //Start loader
                var body = $('body').loader();
                body.loader('show');

                if (popupData.file !== undefined && popupData.file !== '') {
                    $.ajax(
                        {
                            url: popupData.file,
                            async: false,
                            dataType: "text",
                            type: 'GET',
                            showLoader: true, //use for display loader
                            success: function (data) {
                                popupData.message = data;
                            }
                        }
                    );
                }
                //Stop loader
                body.loader('hide');
            },
});

Used "  showLoader: true, " and "var body = $('body').loader();
                    body.loader('show');" but unable to start loader while ajax request.

Need an  alternative to start loader during ajax call.