texts:
I am building a magento extension that will need a custom URL for the frontend that is set via the admin panel config setting for the extension.

Along the lines of the "set admin url" setting in the system settings (which  can also be set in the app/etc/local.xml file as well).

basically, I have in my config.xml file

<frontend>
     <routers>
        <extensionname>
            <use>standard</use>
            <args>
                <module>My_Extensionname</module>
                <frontName>extensionname</frontName>
            </args>
        </extensionname>
    </routers>
</frontend>

This creates the URL site.com/extensionname

But I want to be able to set the url in the system/settings tab in the admin panel

I have looked through the core code and seen glimpses of code that does (a predispatch models controllers etc  i think) this for the default admin URL key setting

How would I go about this? Would i set up an observer to catch the request to URL? or observer settings change and programmatically create a URL rewrite?

What about the content & root template as well in the layout/extensionname.xml?

<layout version="0.1.0">
<extensionname_index>
<reference name="root">
        <action method="setTemplate"><template>extensionname/page.phtml</template></action>
    </reference>
    <reference name="content">
        <block type="extensionname/extensionname" name="extensionname"  template="extensionname/extensionname.phtml" />
    </reference>
</extensionname_index>

Would this still be used even though I would be using a custom URL from the settings


texts:
I'm trying to get admin store configuration (core_config_data) in mincart.js file. Is there any method to get this ? like

define([
    'storeConfiguration'
    'uiComponent',
    'Magento_Customer/js/customer-data',
    'jquery',
    'ko',
    'underscore',
    'sidebar',
    'mage/translate',
    'mage/dropdown'
], function (config, Component, customerData, $, ko, _)

eg:

config.getBaseUrl or something.. I searched a lot but I couldn't find out anything...


texts: Require.js errors after database restore

texts:
On Magento 2.2.6 I restored from an earlier database. After doing that I flushed the cache, reindexed the site,and deployed static content. I now get require.js errors on every page. On my category page-

knockout.js:3012 Uncaught TypeError: Unable to process binding
"visible: function(){return isVisible() }"
Message: Cannot read property 'hasMessages' of undefined
at UiClass.isVisible (messages.js:51)
at visible (eval at createBindingsStringEvaluator (knockout.js:2624), <anonymous>:3:67)
at update (knockout.js:4558)
at ko.dependentObservable.disposeWhenNodeIsRemoved (knockout.js:3004)
at evaluateImmediate (knockout.js:1737)
at Object.ko.computed.ko.dependentObservable (knockout.js:1946)
at knockout.js:3002
at Object.arrayForEach (knockout.js:151)
at applyBindingsToNodeInternal (knockout.js:2974)
at applyBindingsToNodeAndDescendantsInternal (knockout.js:2854)

On a different category page-

Uncaught Error: Mismatched anonymous define() module: function(){return t(e)}
http://requirejs.org/docs/errors.html#mismatch
at makeError (require.js:166)
at intakeDefines (require.js:1221)
at require.js:1408

The Mismatched anonymous define is also on the item page. I didn't change any code so I am not sure what to here. How can I clear these errors?


texts:
We are doing some order testing on a development site with PayPal Sandbox but are getting the following error in Magento's var/log/payment_paypal_standard.log file when the IPN is received from PayPal:

PayPal IPN postback failure. See paypal_unknown_ipn.log for details.

Looking at the rest of the log in payment_paypal_standard.log we have the
 following:

[postback_to] => https://www.sandbox.paypal.com/webscr
[postback_result] =>
[exception] => PayPal IPN postback failure. See paypal_unknown_ipn.log for details.
[__pid] => 30534

We have PayPal enabled on our live site (on the same server) and it's working properly so not sure why the sandbox IPN's are failing.

The PayPal IPN history shows a code 200 for the IPN and the request is logged in the site's access_log file, so the IPN is being received successfully but the postback is failing.

The following error is logged in var/log/exception.log:

2016-03-08T16:07:41+00:00 ERR (3):
exception 'Exception' with message 'PayPal IPN postback failure. See paypal_unknown_ipn.log for details.' in /var/www/vhosts/dev-2.domain.co.uk/httpdocs/app/code/core/Mage/Paypal/Model/Ipn.php:155
Stack trace:
#0 /var/www/vhosts/dev-2.domain.co.uk/httpdocs/app/code/core/Mage/Paypal/Model/Ipn.php(114): Mage_Paypal_Model_Ipn->_postBack(Object(Varien_Http_Adapter_Curl))
#1 /var/www/vhosts/dev-2.domain.co.uk/httpdocs/app/code/core/Mage/Paypal/controllers/IpnController.php(43): Mage_Paypal_Model_Ipn->processIpnRequest(Array, Object(Varien_Http_Adapter_Curl))
#2 /var/www/vhosts/dev-2.domain.co.uk/httpdocs/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Paypal_IpnController->indexAction()
#3 /var/www/vhosts/dev-2.domain.co.uk/httpdocs/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')
#4 /var/www/vhosts/dev-2.domain.co.uk/httpdocs/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#5 /var/www/vhosts/dev-2.domain.co.uk/httpdocs/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#6 /var/www/vhosts/dev-2.domain.co.uk/httpdocs/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#7 /var/www/vhosts/dev-2.domain.co.uk/httpdocs/index.php(87): Mage::run('', 'store')
#8 {main}

Running Magento CE 1.7.0.2 and tested on PHP 5.3 and 5.4.

How can we troubleshoot this to get it working?


texts: How to Hide products with particular attribute value through out the site?

texts:
I want to hide products, which don't have value of a particular attribute, from every page of my website. for this  I have used observer on event catalog_product_collection_load_after and catalog_product_load_after and here is my observer function:

public function customFilter(Varien_Event_Observer $observer)
{
    $collection = $observer->getEvent()->getCollection();
    $collection->addAttributeToFilter('seller', array('neq' => 'NULL'));

    return $collection;
}

If I print the sql query and run it into my database it returns proper results. But the filter applied here does not reflect in frontend.

Is there any other way to do this?


texts: Payment wise Discount not showing on checkout cart page?

texts:
I try with this link
1) Magento 2.2.1 - how to give discount on payment methods?
2) Magento 2 - discount depend on Payment Method does not work

But I can not see Discount on checkout/cart page after create Rule. If any one have Suggestion please share it.


texts: Magento1 invoice email: ordered items not visible

texts:
The invoice-email doesn't show the ordered items table. My template contains this code:

{{layout area="frontend" handle="sales_email_order_invoice_items" invoice=$invoice order=$order}}

However, this part is missing in the email. I tried to find the code that should generate the HTML, I think sales.xml tells me to look at the "email/order/invoice/items.phtml"-template file. But changing its content doesn't seem to have any effect.

Where should I start to fix this problem?


texts: Does Magento slow down after 5,000 SKU's are added?

texts:
Thanks for reading my question. Our company is currently in negotiations with Magento to choose our licensing contract and a solutions partner. This past week our VP of IT was traveling and meet someone who uses Magento and he said it's a great platform for anything under 5,000 SKU's. Once you get over 5,000 SKU's the site slows down considerably and the search takes a long time to return results.

Is this true? Are there issues when you have over 5,000 SKU's? What issues do you have? Is there work-arounds? Are they costly?

Thank you,
Jerry


texts: Add "my account navigation"-link with extension on Magento 1.9

texts:
I am writing an extension for Magento 1.9. This extension should add a link to my account navigation. It is working so far, but I have no idea where I can put my vendor_module.xml file what includes the addLink action.

This extension should be work with every Magento system and if I put the file on app/design/frontend/*/*/layout I have to decide for a design. But I do not know the name of the current design of the users.

Is there a folder where the rewrite surely takes place?


texts: Magento 2: How to get Id and Created Date of an Order in Observer?

texts:
I am using sales_order_place_after event in Magento 2 inside Namespace/Module_name/etc/. In observer, I am getting order increment id by unable to get order id and created date of Order.

Example:

$order = $observer->getEvent()->getOrder();

$orderId = $order->getId();

$createdAt =  $order->getCreatedAt();

I am unable to get both order id and created date.

Please help me in this?


texts:
is there a way to cancel the normal function in a Plugin and show some message?

Something like:

public function beforeSet(\Magento\Quote\Model\CouponManagement $subject, $cartId, $couponCode){

$variable = false;
if($variable){
  //do something and normal set triggers
}else{
  //stop set complete and show some text
}

}

Thank you in advance!


texts: How the catalog:product:attributes:clean works?

texts:
I have used the below command in Magento CLI,

php bin/magento catalog:product:attributes:clean

I read the description for this command in forums and stack overflow, they only say Removes unused product attributes but I need an example for a real-time process. Because it did not affect any product attributes.


texts: M2: how does adminhtml UI component XML work?

texts:
I was reading into how the UI component works using XML because I was looking for an alternative way to add a new field to an existing fieldset instead of doing a rewrite/preference. It appears that in M2, the _prepareForm() method sets the fieldset and fields as in M1, but there is also a UI component XML file that can add additional configuration.

For example, Magento\Review\Block\Adminhtml\Edit\Form::_prepareForm() has (well, at least appears to be associated with) vendor/magento/module-review/view/adminhtml/ui_component/review_listing.xml for a bunch of additional things.

Questions:

However, this review_listing.xml does not seem to do anything to the review edit form. I tried removing it completely, changing labels in it, etc., but it affected neither the review edit nor new form in the admin. What is this file for?
I tried adding my own XML at app/code/vendor/module/view/adminhtml/ui_component/review_form.xml, but this file is not read at all, despite the original document saying it is read automatically by the UI reader. Doc says component_instance_name.xml; is this supposed to be a systematic name following some convention? There is no indication that it is supposed to be.


texts: How can I force my module to load after another?

texts:
I want my Magento extension to load after another extension has already loaded. Anyone know how to do that?

Normally I'd use the 'depends' tag in the etc/modules/ xml file but that causes errors if the depended on module is not installed, and that's not what I want.

I also don't want to rely on alphabetical loading and rename my module.

Any thoughts?


texts: My website seems pre-set on forcing viewers to register/login before viewing (of any product item) is possible. And I have not been able to find a way to disable it on the control panel.


texts: Using special_price_to_date in shopping cart price rule

texts:
I have a shopping cart price rule that gives 10% discount. This needs to only apply to products without already existing discount (special_price).

Sometimes a product has a 'special_price_to_date'. When this date is in the past, the shopping cart rule should apply. Unfortunatly this is where I run into problems with the rules.

In the image below are the rules currently applied. If someone knows the problem or a solution I'd like to hear it.


texts: why magento use xml for loading model,view,controller,layout

texts:
In typical mvc ...we are direct calling view from controller...
and also some other task without xml help....

In magento every thing is loaded by xml...

And magento is very slow...and reflection rate is to low...

After any changes you must have to delete cache....

And in other you can use caching where its is needed....

BAsically need to know why magento using xml....


texts: How to Add Condition Check to Determine which Template will be used in Transactional Emails?

texts:
I am  trying to modify my email template to generate different product information based on customer group. As in, if a customer belongs to Group A, load modified.phtml, else load default.phtml.

Specifically, I am working with the New Order email template where the base transactional email template calls {{layout handle="sales_email_order_items" order=$order}}, which loads the template file in /app/design/frontend/rwd/default/template/email/order/items.phtml.

This template eventually calls echo $this->getItemHtml($_item).

From what I can tell, this loads the template file /app/design/frontend/rwd/default/template/email/order/items/order/default.phtml, which outputs the template information to print each item's content (SKU, Name, Price, etc) in the table.

This is what I'm trying to accomplish:

$customerGroupId    = $this->getCustomerGroupId();
$customerGroupName  = Mage::getModel('customer/group')->load($customerGroupId)->getCustomerGroupCode();
if($customerGroupName = 'A') {
    // How to getItemHtml from different template?
} else {
    echo $this->getItemHtml($_item)
}

I assume that I will need to add reference to my modified.phtml in the /app/design/frontend/rwd/default/layout/sales.xml file like so:

<sales_email_order_items>
    <block type="sales/order_email_items" name="items" template="email/order/items.phtml">
        <action method="addItemRender"><type>default</type><block>sales/order_email_items_order_default</block><template>email/order/items/order/default.phtml</template></action>
        // modified.phtml reference here?

Can I make getItemHtml specify a different template?

Or is there a different way I need to be approaching this?

I could replace the {{layout handle...}} with a {{block...}} call and put all of the template information within my if... else... blocks, but this seems very hacky. Any thoughts or suggestions?


texts: Fatal error: Class 'Zend_Xml_Security' not found lib/Zend/Locale/Data.php

texts:
Fatal error: Class 'Zend_Xml_Security' not found in lib/Zend/Locale/Data.php on line 164

After upgrading magento from 1.9.0.1 to 1.9.1, I'm getting this error.

I simply extracted all files from zip. I deleted var/cache and var/session.

What might be the problem, please?


texts: Magento1.9 dispatch/shipping confirmation email issue

texts:
Magento is not sending shipping/dispatch confirmation email but is sending
other (create/update/complete) emails.
Not sure why. Checked "order.php" but I couldn't find any obvious reason there.

Where to look or what to change in settings to make it work and to force Magento to send emails on certain order status ?

No errors in logs (system.log and exceptions.log).

What is triggering email sending order state change or order status change ?


texts: Add to Cart button not working for me, but working for other users

texts:
I just upgraded Magento from 2.3.1 to 2.3.2.  Now I'm having a weird problem where when I click "Add to Cart" for a product, the "Add to Cart" button gets disabled for a second as it's processing, but then nothing gets added to my cart.  This problem appears to only be happening for Chrome; I tried Edge and Brave and both of them behaved correctly (possibly because I hadn't logged on to the site from Edge or Brave previously).  Additionally, other users don't seem to have the same problem.

I tried bin/magento cache:flush, as well as deleting Chrome's site cookies and doing a hard refresh in Chrome, but none of that fixed this behavior.

What could be causing this behavior?


texts: Magento 2.3.3 - Configurable Price Disappears

texts:
I've noticed that in Magento 2.3.3 that the Configurable Product price is gone (in grid view) when there are simple products added. Also, I cannot add this in - the price field allows me to enter a price but it never saves.
Is there a way to still keep the Configurable Product price even with Simple products?
The Configurable Product price is required for an api integration that uses that Configurable price field to determine the base RRP (and not the simple price).


texts: how to get value form joinAttribute from eav_attribute_option_value table?

texts:
i installed a plugin for add customer fields.
after that i have added a field name "status" to customer form.
and status field is dropdown.
now i want to display that in customer grid.
for that i have added

->joinAttribute('status', 'customer/status', 'default_billing', null, 'left')

in app/code/core/Mage/Adminhtml/Block/Customer/Grid.php

in _prepareCollection() so collection is now $collection =

Mage::getResourceModel('customer/customer_collection')
            ->addNameToSelect()
            ->addAttributeToSelect('email')
            ->addAttributeToSelect('created_at')
            ->addAttributeToSelect('group_id')
            ->joinAttribute('status', 'customer/status', 'default_billing', null, 'left')
            ->joinAttribute('billing_postcode', 'customer_address/postcode', 'default_billing', null, 'left')
            ->joinAttribute('billing_city', 'customer_address/city', 'default_billing', null, 'left')
            ->joinAttribute('billing_telephone', 'customer_address/telephone', 'default_billing', null, 'left')
            ->joinAttribute('billing_region', 'customer_address/region', 'default_billing', null, 'left')
            ->joinAttribute('billing_country_id', 'customer_address/country_id', 'default_billing', null, 'left');

and also added in _prepareColumns()

$this->addColumn('status', array(
    'header'    => Mage::helper('customer')->__('customer status'),
    'index'     => 'status',
));

it's display option_id. but i want to display option value.

Thanks in advance!


texts: Country dependent State/Province list in a custom module

texts: I am new to magento and stuck on this problem, I am working on module in which I required a state drop down dependent on country, like one page checkout page. I have the country drop down. Can any one help me to show country dependent state drop down in my custom module.


texts: Override same Model/Controller in 2 different modules

texts:
How to override same class which exist in 2 different custom modules
Eg:
1) I have a file Result.php.
from Vendor\Module1\Block\Result
and almost same Result.php
from Vendor\Module2\Block\Result which overrides
Magento\CatalogSearch\Block\Result
2) Do i have to give
in etc/di of module1
<preference for="Magento\CatalogSearch\Block\Result" type="Vendor\Module1\Block\Result" />

in etc/di of module2
<preference for="Magento\CatalogSearch\Block\Result" type="Vendor\Module2\Block\Result" />

in both the modules1 and 2's ?
3) I have (say) Index.php from controller suppose.
Do the same procedure applies in etc di for both modules?
4) Is there any better approach?


texts: Magento 2 get the latest wishlist collection

texts: How we can get the latest wishlist collection for a particular login customer without cache clean in Magento2?


texts: getProductUrl() taking url without giving any url in magento 1.9

texts:
I have a custom product page and have a button too on that page below the product. I added a link on the product and the link is

<a href="<?php echo $_product->getProductUrl() ?>">

so When I'm clicking on this link the page is redirecting to "product_name.html" . So my question is, where would i find this "product_name.html" or is there any way that I could add a custom page on that link and edit that page according my need?


texts: Why I am getting missing_delegation_consent error in the wordpress?

texts:
I have installed the sitekit plugin in the wodpress and everything was working fine buut started getting error missing_delegation_consent.
Could you please help me why I am getting this?


texts:
I am facing problem the total number of request send to server is 223 which is huge and due to which loading time is 13 seconds
How can I reduce number of elements
I have merged and minify JS and css


texts: Paypal - Magento redirects back to cart when more than one product is added upon checkout

texts:
The issue I'm having appears to be related to Magento<->Paypal communication.

I have configured Paypal Website Standard payment method and can successfully "Check out with paypal" upon adding a single product to my cart, I'm quite sure this is the paypal-express method. If I add a second product to the cart and select "Check out with paypal" I'm redirected back to the cart.

If i select the Magento "Proceed to checkout" function, after selecting paypal as the payment method I am also redirected back to the cart.

I've turned logging on, however I'm not getting any additional entries in the exception.log after I corrected an intial IPN issue that I had.

Any thoughts or places I could start to look to resolve the issue?


texts:
As I'm aware Magento advanced search does not offer a category search and therefore followed this tutorial to add it in http://www.magentocommerce.com/wiki/5_-_modules_and_development/search_and_advanced_search/how_to_add_search_by_category_to_advanced_search

However this only brings up the top level categories and I need to search by multiple sub categories with an AND clause. How can this be achieved?

Adding more category dropdowns manually just outputs this query string without filtering properly:
/catalogsearch/advanced/result/?category=15&category=20


texts: Storing values in custom temporary table in magento2

texts:
I am currently working on fetching data from two tables and i would like to store them in a temporary table somewhat similar to what search does, I am actually confused as to where should i start from specifically for magento2

Any help would be much appreciated!


texts: Waiting for cache cleaning before reading core_config_data in Magento 2 (Asyncronous)

texts:
I have a scenario where I save a variable to the core_config_data table using an \Magento\Config\Model\ResourceModel\Config object:

$this->_resourceConfig->saveConfig(
                'mycompany/configuration/token',
                $token,
                'default',
                0
            );

then I clean the cache using \Magento\Framework\App\Cache\Manager and Magento\Framework\App\Cache\Type\Config objects:

$this->_cacheManager->clean([CacheTypeConfig::TYPE_IDENTIFIER]);

Immediately, I redirect to another page that recalls the the same config variable, but it's null.

How do we make sure the cache cleaning finished before trying to read config data?


texts: How to filter the store views so that only information for mobile stores will be saved?

texts:
How to add a filter to the following piece of code

    foreach($this->getStores() as $_store {
         $storeName = $this->__($this->htmlEscape($_store->getName()));
         $storeId = $_store->getId();
         $storeCode = $_store->getCode();
    }

in a way that magento will only get that info for mobile store views? The code for all mobile store views is $mageRunCode .= '_mobile'


texts: cronjob: How to reindex only what is needed

texts:
We got a server which has 5 separately shops on it. Some are practically inactive. Some are daily active.
To decrease the server load. We changed the index from automatic to manual. Then we set a cronjob every 6 hours.
I found enough examples of reindexing all.

We run something like this now:
Shop1: 0 0,6,12,18 * * * php -f /shell/indexer.php reindexall
Shop2: 0 1,7,13,19 * * * php -f /shell/indexer.php reindexall
and so on, to avoid overlap.

Right now the inactive shops also reindex every 6 hours where none is needed. Is there a way to only reindex what is needed with a cronjob?

Or are we doing is wrong altogether?


texts: Disable ordering for specified amount of time?

texts: Is there a way to disable ordering in Magento for specified amount of time (e.g. 24 hours between two orders)?


texts: How to Append Comment When "Send Tracking Information" is Clicked

texts:
After an order is shipped with the tracking number another button appears "Send Tracking Information". If clicked it resends the tracking email to customer.  But one doesn't get the checkbox to append a comment to the email.

How can one append comment to these tracking emails?


texts: Which event will be evoked when pressing categories save button in magento 2

texts: I'm trying to add a new attribute to categories and i wonder which event will be occurred when i press save button?


texts: Magento2 error Property TriggerReload does not have accessor method getTriggerReload

texts:
I am using below link code but getting following error, the link code is use to update shipping method after coupon code is applied

https://alanstorm.com/refresh-shipping-rates-for-the-magento-2-checkout/

I am getting following error

According, to me it is due to

//address.trigger_reload = new Date().getTime();


texts:
We are into the fine tuning process of our webshop. So I was scrolling down the customer profile page with my test account and I saw recurring profiles

I looked it up and we have decided we don't need it.Now the question:

How do I turn this off?

I found a thread of magento-1.4 saying you have to manually disable this function. But I'd rather not manually destroy a function unless I really have to. So:

Could anyone tell me if I still need to disable this function manually, or if magento-1.9 has a built in option to do that?


texts: How to fetch complete customer data in magento with address and whole data related to entity_id

texts:
I need to fetch whole customer data from mysql by query.
I need to get data by entity_id.
I used query

SELECT `e`.* FROM `customer_entity` AS `e` WHERE (`e`.`entity_type_id` = '1');

but this is not giving me whole data of customer with his related attribute.


texts: I'm trying to add an image attribute to peer on the product page above the product name.  Any idea what file I can look into to get this to show up? I've already created the attribute it shows up in the backend but I cannot make it show up on the product page .


texts: Link CDN url to my product saved in magento 2

texts:
I want to Link CDN URL to my Product in magento. So basically all  the Images for the product will be fetched using the Image URL Rather than saving it on Magento Website (Project)

Is it possible to do so.?


texts: Paypal Pro - how to debug issue with paypal API

texts:
I noted than the invoice generated by Paypal Pro doesn't contain the details about the payment: the entire 'Description' column is empty.

How to debug the issue ? Where the these info are passed to the Paypal API ?


texts: Magento2 - How to fill a dropdown from backend configuration [Solved]

texts:
I'm making a custom form with some dropdown data a user can select.

The content which get's inserted needs to come from the backend configuration.

This is the form I have made, this form will be shown on the frontend, not the backend.

I have no idea how to insert data in the dropdown above from the admin backend, this is the adminhtml I've already created:

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

            Module settings
            <tab>tab</tab>
            <resource>AdminTabs::config</resource>
            <group id="trendsquare_module"
                   translate="label"
                   type="text"
                   sortOrder="2"
                   showInDefault="1"
                   showInWebsite="1"
                   showInStore="1">
                Dropdown Data
                <field id="dropdown" translate="label" type="editablemultiselect" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
                    Dropdown Data
                </field>
            </group>

    </system>
</config>

Which gives me this as a result:


texts:
I setup one Magento on Mypeer1.com server.
My magento is having multistore with all the design layout same and just the category and theme color is different and i am going to have separate domain for each of my store.

everything is working fine on my staging server , so i moved on Mypeer1.com
For now the site is in testing mode and not mapped to the domain so its working temporary in IP address.

The main site is working fine e.g
122.122.232.12 and the inner store is setup like
122.122.232.12/store2 and same as other store 122.122.232.12/store3 and 122.122.232.12/store4

now  the issue is all other store is working for only home page and when i open the inner pages for all other store , it load the main store theme with 404 page.

I have placed the correct htaccess in the substore folder and setup the correct store code and other settings correctly. I am not sure why its loading home page for all sotre and not loading the inner page as well as any category and product pages.

Any help will be very much appreciated.
Thanks


texts: Magento 2 - How to display recent order on Homepage?

texts:
I know that the "recent orders" section is displayed on customer's dashboard. I am wondering if I can display this "recent orders" on the homepage as well?
My website requires users to always be logged in, so this shouldn't be an issue.
I have tried adding {{block class="Magento\Sales\Block\Order\Recent" template="Magento_Sales::order/recent.phtml"}} in custom CMS page to be displayed on Homepage but it is not showing anything.
Any help will be appreciated.


texts: Magento2, how to get Cart_ID from Quote_ID?

texts: Using Magento 2.2, API. I want to get cart_id from qoute_id for get selected option of configurable product to create order again or reorder.


texts: I would like to customize the shopping cart by adding pictures right between the headline "Shopping Cart" and below the Item table but haven't figured out yet where the xml files are to overwrite this behaviour. Does anyone know where i can change that behaviour?


texts: How to edit text of Please specify the product's required option(s)

texts:
I need to translate Please specify the product's required option(s).
I issued a new 'locale' folder with a 'translate.csv' file, does not work. I tried en_US files but no luck sofar.
Hope you can help.


texts:
i having problem with order state. When customer order a product, no matter what payment option is select, order stuck on state "payment_review" instead to be state "new".

If I manually change state in "new", and after creating inovice state change in "payment_review" again.

I think it's a problem in database, because I was delete all magento files and insert new (fresh) magento with same database and problem was the same.


texts: Automatically add extra products for free

texts:
In current webshop (Opencart) we have built a custom feature in the system cart-handler that automatically add x products for every 10 y ordered. It looks like buy 20 and get 2 extra for free.

If we were to add the same to Magento. Where should we look. Which file needs to be modified?


texts: UI component save button controller magento 2

texts:
I have UI admin form xml file.

I've got SaveButton.php block file, but I need to save form in db.
As far as I know I need controller.

How this controller would look like and in which directory it should be stored?


texts: Is there a way to find out what's left to render?

texts:
just wondering if there was a function that displays what blocks are left to render in a page.

Doing $this->getChildHtml(); renders all child html blocks that haven't yet been rendered but how do I find out what's left to render and call those blocks individually?

I tried a var_dump on this->getChildHtml(); but it just outputted a string of the html of the blocks.

Is there a way to maybe do something like:

<?php
    foreach ($this->getChildHtml() as $_child) {
        var_dump($_child);
        print_r($_child->getData());
    }
?>

it doesn't return any data but my point is more is there a way to call information per child?

Thanks


texts: Override module-fedex Carrier.php constructor

texts:
I'm going to override module-fedex constructor, here is origin at \vendor\magento\module-fedex\Model\Carrier.php

public function __construct(
    \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
    \Magento\Quote\Model\Quote\Address\RateResult\ErrorFactory $rateErrorFactory,
    \Psr\Log\LoggerInterface $logger,
    Security $xmlSecurity,
    \Magento\Shipping\Model\Simplexml\ElementFactory $xmlElFactory,
    \Magento\Shipping\Model\Rate\ResultFactory $rateFactory,
    \Magento\Quote\Model\Quote\Address\RateResult\MethodFactory $rateMethodFactory,
    \Magento\Shipping\Model\Tracking\ResultFactory $trackFactory,
    \Magento\Shipping\Model\Tracking\Result\ErrorFactory $trackErrorFactory,
    \Magento\Shipping\Model\Tracking\Result\StatusFactory $trackStatusFactory,
    \Magento\Directory\Model\RegionFactory $regionFactory,
    \Magento\Directory\Model\CountryFactory $countryFactory,
    \Magento\Directory\Model\CurrencyFactory $currencyFactory,
    \Magento\Directory\Helper\Data $directoryData,
    \Magento\CatalogInventory\Api\StockRegistryInterface $stockRegistry,
    \Magento\Store\Model\StoreManagerInterface $storeManager,
    \Magento\Framework\Module\Dir\Reader $configReader,
    \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory,
    array $data = [],
    Json $serializer = null
) {
    $this->_storeManager = $storeManager;
    $this->_productCollectionFactory = $productCollectionFactory;
    parent::__construct(
        $scopeConfig,
        $rateErrorFactory,
        $logger,
        $xmlSecurity,
        $xmlElFactory,
        $rateFactory,
        $rateMethodFactory,
        $trackFactory,
        $trackErrorFactory,
        $trackStatusFactory,
        $regionFactory,
        $countryFactory,
        $currencyFactory,
        $directoryData,
        $stockRegistry,
        $data
    );
    $wsdlBasePath = $configReader->getModuleDir(Dir::MODULE_ETC_DIR, 'Magento_Fedex') . '/wsdl/';
    $this->_shipServiceWsdl = $wsdlBasePath . 'ShipService_v10.wsdl';
    $this->_rateServiceWsdl = $wsdlBasePath . 'RateService_v10.wsdl';
    $this->_trackServiceWsdl = $wsdlBasePath . 'TrackService_v' . self::$trackServiceVersion . '.wsdl';
    $this->serializer = $serializer ?: ObjectManager::getInstance()->get(Json::class);
}

Here is my custom carrier.php

namespace Custom\Fedex\Model;

use Magento\Framework\Module\Dir;
use Magento\Framework\Serialize\Serializer\Json;

class Carrier extends \Magento\Fedex\Model\Carrier
{
    public function __construct(
        \Magento\Framework\Module\Dir\Reader $configReader,
        Json $serializer = null
    ) {
        parent::__construct();
        $wsdlBasePath = $configReader->getModuleDir(Dir::MODULE_ETC_DIR, 'Magento_Fedex') . '/wsdl/';
        $this->_shipServiceWsdl = $wsdlBasePath . 'ShipService_v10.wsdl';
        $this->_rateServiceWsdl = $wsdlBasePath . 'RateService_v10.wsdl';
        $this->_trackServiceWsdl = $wsdlBasePath . 'TrackService_v' . parent::$trackServiceVersion . '.wsdl';
        $this->serializer = $serializer ?: ObjectManager::getInstance()->get(Json::class);
    }

}

PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function Magento\\Fedex\\Model\\Carrier::__construct(), 0 passed in /home/m22/public_html/app/code/Custom/Fedex/Model/Carrier.php on line 14 and at least 18 expected in /home/m22/public_html/vendor/magento/module-fedex/Model/Carrier.php:172, referer: http://example.com/checkout/

What is the best practice to override a constructor?


texts: Redis HGET is consuming too much of time

texts:
One of my client M2 store is using Redis for session and cache storage.
On inspecting the New Relic, have noticed that HGET is consuming hell lot of time

Redis Configuration:

Local Redis connected with TCP
Setting: maxmemory-policy allkeys-lru

How do you guys optimize the Redis (single instance) for your M2 store?


texts: How to delete a module created from "Ultimate Module Creator"

texts:
I am using the Ultimate Module Creator for creating some custom module.
When I save the module in an archive pack, it displayed in the admin grid inside it.

Now I want to delete the module I created and I didn't find the delete link. There is only a download link there.
How can I delete modules from the grid section in the admin panel.


texts: How can I show random products in Magento homepage?

texts: How can I show 12 random products in my Magento 1.9.0.1 homepage every time it is reloaded?


texts:
I have a Reorder class in my extension, it was extends abstract Reorder at Magento\Sales\Controller\AbstractController\Reorder

In abstract it have execute method, but when I call it on Reorder class by

class Reorder extends \Magento\Sales\Controller\AbstractController\Reorder
{
    public function execute()
    {
        parent::execute();
    }
}

It return 404 page without any error. I tried

var_dump(123);die();

at beginning of execute method of abstract but it doesn't return anything and still return 404 page.

Anyone can help me. Thanks.


texts:
1) I'm using github.com/splendidinternet/Magento2_German_LocalePack_de_DE language pack. However  the de_DE.csv was missing the translation for See Our Shipping Policy. I added it manually, but that didn't translate anything.

2) I edited pub/static/frontend/.../de_DE/Magento_Shipping/template/checkout/shipping/shipping-policy.html (to see if anything changes)-> I changed See Our Shipping Policy to Our Shipping Policy -> my german Store View displayed Our Shipping Policy.

3) Now again I added the translation for Our Shipping Policy into app\i18n\splendid\de_DE\de_DE.csv  -> nothing gets translated

info: everything else in de_DE.csv gets translated !

How can I translate Our Shipping Policy?


texts: Magento2: Unable to save Category from admin

texts:
I am unable to save Category from magento admin.

When i click on save button below error displaying:

  Notice: Undefined index: category_id in vendor/magento/module-catalog-url-rewrite/Model/Category/Plugin/Storage.php on line 49

Please help me to fix this issue.


texts: Warning: call_user_func_array() expects parameter 1 to be a valid callback Magento 2.3

texts:
I have installed Smile_Elasticsearch extension.It is working fine with the default mode but when I enabled developer mode it is showing an error.

  Warning: call_user_func_array() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in
  app/code/Smile/ElasticsuiteVirtualCategory/Model/Layer/Filter/Category.php
  on line 150

Please see attached screenshot.

Technology Detail's:

Magento version: 2.3
Smile Elasticsearch version: 2.7.0 (which is compatible with Magento 2.3)
Installed Elasticsearch version: 5.6.15 (which is compatible with magento 2.3)
PHP version: 7.1

So, Please let me know how can I fix this error?
Your help would be appreciated.
Thanks in advance.!!!


texts: Where is the source of the following text inside the documentation?

texts:
On the DevDocs https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/css-topics/using-fonts.html  Link, there is the following text bellow the mixin example:

@font-display: swap is declared by default for Magento Blank theme in app/design/frontend/Magento/blank/web/css/source/_typography.less.
Fallback web fonts that are used by default in Magento are located in lib/web/css/source/lib/variables/_typography.less.

In the DevDeocs  .md file of that URL, that text is missing…?!
See attached screenshots.

1)Where is that text’s source?

2)How does it getting displayed there, when there is nothing in the md file.


texts: How can i upload multiple images for a single category in category listing page in magento 2?

texts: Let me know the possible way to render multiple images in category listing page,we need to upload a image in admin panel and it should reflect in the storefront category page


texts: orders creation with future dates from admin not working correctly magento2

texts:
im creating orders from admin with future dates like i created an order and select 28 of july in delivery date dropdown for both shipping and billing information.

but after submitting its showing  shippiing date 26 of july.

thanks in advance!


texts: How to debug a Fatal error: Call to a member function setTitle() on a non-object

texts:
I'm getting a

"Fatal error: Call to a member function setTitle() on a non-object in /home/www/public_html/app/code/core/Mage/Customer/Block/Form/Login.php on line 40"

The particular line contains:

 $this->getLayout()->getBlock('head')->setTitle(Mage::helper('customer')->__('Customer Login'));

If I comment out the line the issue is gone - but that is very dissatisfying of course. Since this is a core file it seems something else is causing the issue.

What is the best approach to debug this - or in general a "Call to a member function foo() on a non-object"?

Thank you!


texts: How to remove the attribute element in the layout in magento 2

texts:
I wish to remove the attribute element in the catalog_product_view.xml file

I have tried below

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

<body>
<attribute name="itemtype" remove="true"/>
<attribute name="itemscope" remove="true"/>
</body>
</page>

But throws error.

When I added remove='true' to these attributes - I got the following error:

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


texts: what php magento setup:static-content:deploy do?

texts: i just installed magento 2 on localhost, the logo do not appeared, after i use the command in console php magento setup:static-content:deploy , all the static files are generated, why magento 2 need this command to make the static file be generated?


texts: How to override JS with my custom theme?

texts:
I am trying to overwrite the module-catalog/view/frontend/web/js/catalog-add-to-cart.js file,

I have added the file to app/design/frontend/Magento/theme_fresh/Magento_Catalog/web/js/catalog-add-to-cart.js,

I flushed the cache, static files etc but it isn't loading the file I copied, if I make changes to the core file (I only did it to make sure it is working) and the override file then only the change to the core file will show.


texts: Magento 2 Custom Admin module giving 404

texts:
I have followed many tutorials but im still getting a 404 error when trying to access with a custom menu item in my module.

This is what i have, :
 registration.php

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

etc/adminhtml/menu.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
    <menu>
        <add id="Digital_Custom::regenerate"
             title="Digital Custom"
             module="Digital_Custom"
             sortOrder="9999"
             action="importer/packadgeable/regenerate"
             resource="Magento_Backend::content" />

    </menu>
</config>

Here the new menu item is visible, but when click im getting 404

My controller Structure:

Digital
  - Custom
    - Controller
      - Adminhtml
        - Packadgeable
          - Regenerate.php
This is my controller code Regenerate.php

<?php
namespace Digital\Custom\Controller\Adminhtml\Custom;

class Regenerate extends \Magento\Backend\App\Action
{
    /**
     * @var \Magento\Framework\View\Result\PageFactory
     */
    protected $_resultPageFactory;

    /**
     * @param \Magento\Backend\App\Action\Context        $context
     * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
     */
    public function __construct(
        \Magento\Backend\App\Action\Context $context,
        \Magento\Framework\View\Result\PageFactory $resultPageFactory
    )
    {
        parent::__construct($context);
        $this->_resultPageFactory = $resultPageFactory;
    }

    /**
     * Grid List page.
     *
     * @return \Magento\Backend\Model\View\Result\Page
     */
    public function execute()
    {
        /** @var \Magento\Backend\Model\View\Result\Page $resultPage */
        $resultPage = $this->_resultPageFactory->create();
        $resultPage->getConfig()->getTitle()->prepend(__('Grid List'));

        return $resultPage;
    }

    protected function _isAllowed() {
        return true;
        }
}

My route
 etc/adminhtml/routes.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/framework/App/etc/routes.xsd">
<router id="admin">
    <route id="regenerate" frontName="regenerate">
        <module name="Digital_Custom" before="Magento_Backend" />
    </route>
</router>
</config>


texts: Magento2 - Filter order grid by multiple order id's

texts: I need to filter the order grid by multiple order id's. So the when i enter comma separated order ids in the id filter it should filter by these ids and give result.


texts: Refused to load the image 'http://s3-us-west-2.amazonaws.com/s.cdpn.io/1376484/stacy.jpg' because it violates the following Content Security Policy directive:


texts: Translate success message for newsletter signup

texts:
I want to translate the success message for my newsletter signup. So in the Mage_Newsletter.csv I have added

"Thank you for your subscription.","Tak for din tilmelding"

But it's not getting translated, what am I missing?


texts: Customize Checkout Page And Remove Postal Code And Extra Fields

texts:
Hello Friends I Want to Customize My Checkout Page In Magento 2 and remove extra fields Zip/Postal Country Etc. I Using Magento 2.2.6 Version And My Theme Is Fastest.

I alsoedited checkout_index_index.xml File

Here's the codes

    <?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">
    <body>
        <referenceBlock name="checkout.root">
            <arguments>
                <argument name="jsLayout" xsi:type="array">
                    <item name="components" xsi:type="array">
                        <item name="checkout" xsi:type="array">
                            <item name="children" xsi:type="array">
                                <item name="steps" xsi:type="array">
                                    <item name="children" xsi:type="array">
                                        <item name="shipping-step" xsi:type="array">
                                            <item name="children" xsi:type="array">
                                                <item name="shippingAddress" xsi:type="array">
                                                    <item name="component" xsi:type="string">MilkJarCookies_OrderDeliveryDate/js/view/shipping</item>
                                                    <item name="children" xsi:type="array">
                                                        <item name="shipping-address-fieldset" xsi:type="array">
                                                            <item name="children" xsi:type="array">
                                                                <item name="country_id" xsi:type="array">
                                                                    <item name="sortOrder" xsi:type="string">1001</item>
                                                                </item>
                                                                <item name="region_id" xsi:type="array">
                                                                    <item name="sortOrder" xsi:type="string">1002</item>
                                                                </item>
                                                                <item name="region" xsi:type="array">
                                                                    <item name="sortOrder" xsi:type="string">1002</item>
                                                                </item>
                                                                <item name="postcode" xsi:type="array">
                                                                    <item name="visible" xsi:type="boolean">false</item>
                                                                </item>
                                                            </item>
                                                        </item>
                                                    </item>
                                                </item>


texts: How can I Auto Populate Magento Products ( 50K )

texts:
I need to do some test and for my purpose I need a store with more that 50K products so samples data are not enough.

I wonder if there is any way to auto populate a magento store with fake products, even only simple products, what I really need is that the products are working in the front end and so:

assigned to a category ( any one )
enabled
are visible in catalog/search
have an url and a sku
have a random name/sku

because I need many product any direct SQL approach is welcome


texts: Event for bulk updating product status : M2

texts:
I am trying to find event when admin mass update product status from productgrid.

This event catalog_controller_product_mass_statusis not available in magento2, so can any one help me which event i can use.

I want to execute my custom function which check product status when we update product status using mass action.


texts: Override configurable prices (or load via AJAX)

texts:
So I have an AJAX price loader, which works fine for simple products. However for configurable products and the simple options, I do not get the override working.
I have a javascript that can set the new/correct price in the spConfig after the page is loaded.
Example
$('#product_addtocart_form').data('mageConfigurable').options.spConfig.optionPrices[699].basePrice = {amount: 23};

The price is correctly show, but the select box is still an incorrect price. How can I re-render the select boxes?


texts: Scraping data from Magento without privileged access or trust

texts:
There appear to be a number of ways of scraping product data from a Magento site, but all seem to have their upsides and downsides.

We deal with sites who have little to no technical resource, but who have given us permission to scrape their product catalog. There appear to be 3 different ways of doing this, none of which really work:

Manual web scraping - developer intensive, requires updating when the theme changes.
Magento Web API - requires setting up an API user, too technical for many users.
Magento Plugin - too technical for many users, exposes sensitive business data so many companies won't do this.

Are we missing something? Is there a better alternative, or are there ways of changing any of the above 3 to be better for scraping?

For example, is it possible to provide a link to a 'one-click-setup' like process for API access? Shopify do this in a nice way using OAuth and permission scopes, so we can give our partners a link that will give us read only access to just their product catalog, in a way that non-technical users can use.


texts:
I am unable to change the font-family

Can any one help me to change the font-family for total site in magento 2.


texts: Magento API to create same categoy on another magento

texts:
how to add category automatically in another magento {A} while adding category manually in magento {B}.

Suppose i am adding category manually in magento {B} than it will automatically insert/create category in another magento {A} automatically.can it possible if yes please let me know how to do that.


texts: How do I call a stored procedure from Magento 2 code?

texts:
Can anybody share good resource where I can see ways to call Stored Procedure from Magento 2 Code.

Thanks


texts: Font awesome error - "blocked by CORS policy"

texts:
While loading my website, at some times icons are not displaying.

"blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource."


texts: How to allow themes to call my extension blocks through widgets

texts:
I have an extension that is structured like this:

Myextension
└── Mymodule
    └── etc
    │   └── config.xml
    └── Helper
        └── Data.php

The data extends Mage_Core_Helper_Abstract and has this method which returns some HTML:

public function sayHi()
{
    return 'Hello world!';
}

My question

Is it possible to provide a way so that sayHi can be called from what ever theme or template (like product page) using the widget in the admin?

Should I create a block/filter/widget?

Does Magento have some hook system?

I read lot of documentation/tutorial/book but I couldn't grasp the Magento workflow for such things.


texts: How to override country drop-down in checkout page magento 2?

texts: I want to override country drop-down in custom checkout page. In further i want to add my custom function on change of country drop-down.


texts: Using REST API with admin username and password is good or safe in Magento 2

texts:
I am using REST API in Magento 2.
For using in Guest user i want to create admin token so i have used CURL Request like this.
$ch = curl_init();
$userData = array("username" => "admin", "password" => "password");
$ch = curl_init("http://127.0.0.1/mag/rest/V1/integration/admin/token");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($userData));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type:   application/json", "Content-
Lenght: " . strlen(json_encode($userData))));
$token = curl_exec($ch);

and $token is generated.
But I have a question regarding this that it it safe to use this in my Controller file if yes then it is good or not please suggest any other solution.
Token Generated from ADMIN

Any help is appriciated.


texts:
We are 2 developers using Linux,1 designer using Windows.

We have 3 environments
(develop-virtual,test-virtual in one server).

And live-its in different server.

We are using git with 3 branches: master, develop, test in gitlab.

we will pull develop branch in developing virtual server, test branch in the test server.
and master branch in live server.

Now I'm trying to use docker with git.
https://github.com/mageinferno/magento2-docker-compose

I have cloned above repo in my local Linux system and installed Docker.
also, i have setup Magento 2.
so now I can browse magento2 site also I can edit files from my system.
up to this point, everything is OK.

Now my query is:
How to commit my code, and how to use Docker in another developer, designer,3 environments?

I don't find proper use cases here.
one advantage I can find I can configure almost live system config in my local system.


texts: How to get current customer group id in magento2

texts: I want to get current customer group id in phtml file. When I am not logged in still it is return general type customer group. How can get proper output?


texts: Magento 2 custom indexer - How to execute related indexers

texts:
i have a custom módule with his own indexer. I need that when i execute it (indexer:reindex custom_index), some indexes runs after.

There is an example with the "catalogrule_rule" indexer.

bin/magento indexer:reindex catalogrule_rule
Catalog Rule Product index has been rebuilt successfully in 00:00:02
Product Price index has been rebuilt successfully in 00:00:01
Catalog Search index has been rebuilt successfully in 00:00:45

Here is my mview.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Mview/etc/mview.xsd">
<view id="custom_index" class="My\Module\Model\Indexer\CustomIndexer" group="indexer">
    <subscriptions>
        <table name="custom_table" entity_column="entity_id" />
    </subscriptions>
</view>

Here is my indexer.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Indexer/etc/indexer.xsd">
<indexer id="custom_index" view_id="custom_index" class="My\Module\Model\Indexer\CustomIndexer" shared_index="custom_index">
    <title translate="true">Custom indexer</title>
    <description translate="true">Custom description</description>
</indexer>
<indexer id="catalogrule_rule">
    <dependencies>
        <indexer id="custom_index" />
    </dependencies>
</indexer>

But, when i run setup:upgrade, i find this error...

Module 'Magento_Eav':
Module 'Magento_Directory':
Module 'Magento_Customer':
Module 'Magento_Theme':
Module 'Magento_Indexer':
Running schema recurring...Invalid Document
Element 'title': This element is not expected.
Line: 10


texts: Warning in system.log related to failed to open stream in Magento 1.9.4

texts:
Recently I have started seeing issues in Magento logs. I have not been able to debug why this started happening. Please help !

Following are the logs:

  Warning: include(Crypt/Hash.php): failed to open stream: No such file
  or directory  in /lib/Varien/Autoload.php on line 94 Warning:
  include(): Failed opening 'Crypt/Hash.php' for inclusion
  (include_path='/app/code/local:/app/code/community:/app/code/core:/lib:.:/usr/share/pear:/usr/share/php:/mob/lib/phpseclibgoogleshopping')
  in /lib/Varien/Autoload.php on line 94


texts: How to add Block Specific JS (and CSS) - The _right_ way?

texts:
So I've spent literally hours on hours googling, reading, studying ect, but no one (not even Alan Storm!) has spelt this out to me. It seems the entire internet is interested in adding JS or CSS to a particular page of Magento 2, but what I'm looking for is adding JS/CSS to a particular block.

So, here's my question in a nutshell :

What is the best way to add JS (and additionally CSS) to a particular block, so that if the block is present on the page (*) the JS/CSS is loaded, if the block is not there, no CSS/JS??

* This means anywhete a block can be set up, on a page/template via layout.xml, on a custom page from my module, via the toHtml method of a block/page or most importantly a block embedded in a WYSIWYG of a category/product description/CMS Block/CMS Page.

I have read ALOT of Alan's great articles (Kudos again to this guy!!), not to mention the reams of other articles around this, however I get the feeling everyone wants to add to a page, a specific page, not where ever the block is used.

I feel I am familiar with the various techniques however I might be missing something here so I'd like a concensus from the community, as well as perhaps a bit of a sign post for all the front enders throught to full stack devs out there seeking similar questions and pondering the options as I am.

Previously, in Magento 1, I would look to the blocks constructor, get the layout, get the head reference and call addJs/addCss there, or if possible use the methods in the layout.xml. This would meanthe JS was "added" to the resourse list on the blocks constructor (before the theme level would output the head block). But this doesn't seem possible now.

I have read up on how to go about adding JS/CSS (this is not a simple "how do I???" this is a more consise "what is the correct/mag2 way???") and am familiar with these techniques :

/view/[area]/layout/[default/page_id].xml technique, using the <head></head> root elements
Adding a Head block to my module, appened into head.additional, with some sort of logic regarding if my block is loaded
using the \Asset\GroupedCollection and \Asset\Repository Objects to inject from custructor of a page/Template (this doesn't seem to ork with blocks though), potentually the order of loading??
Using RequireJS and appliying a requireJS config to my module

Have I missed anything??

One believes the correct way would be to use the RequireJS library, and either x-magento-init attributes or just a script with a require("my_module", function(){ ... }) syntax in an inline script. But this seems klunky to me? I would have to set up scripts to load scripts, am forced to inline at least some of my JS, however it seems the most susinct way of saying "here's my block, now require me some JS", by popping this into my phtml.

I would however really like to be able to do this via PHP, as a backend/stack programmer I'd ideally like to encapsulate the JS away and (ideally) allow my front end team to write this as they want it. In short take care of the loading (Back End Dev to Frond End Dev "heres the phtml, override in the theme if you like, likewise heres the js file, its dependant libs and heres the css for the block").

This suggests the __construct method with Injected Dependancies on the Assets system. I can not however get this to work, this seems to be confirmed in Alan Storms quick article here : Magento Quickies: Magento 2: Adding Frontend Asset Files Programmatically

Note the sign off "So any thoughts of creating blocks that carry their frontend assets with them is out the window." ... bummer :(

Thank you guys for taking the time to read and consider. I look forward to hearing your responses!

PS> Obviously this is StackExchange so I'll mark the answer as the best course for what I'm trying to achieve (block specific resource loading) however I will endevour to also list as refences at the bottom of my post any and all answers that either add to the discussion or suggest a solid solution!


texts: Assign Attribute to Product programmatically

texts:
I created a few custom attributes and I want to assign them directly when I import a product programmatically.

The first one I created is called ProductEmbroideryV2 Enable Embroidery.

To turn this one on via my crons script I use embroidery I use this line

  $mpProductInfo['embroidery_enabled'] = 1;

Now I created another attribute called Sale/Clearance/New, which has a drop-down of sale, clearance and new.

I want to set any new product I have to get the new tag but I can't figure out how to call that specific attribute.  When you check the attributes details it should be sale_clearance but setting any position whether 0,1,2,3 it doesn't get assigned to anything.

Does anyone know what table I can use to find the attributes call tag or a line of code to use to call that attribute and set it to position 3 or the new tag?

Here is some of the code

$mpProductInfo['qty'] = $mp['physical_qty'] + $mp['dropship_qty'];
$mpProductInfo['in_stock'] = 1;
$mpProductInfo['status'] = 1;
$mpProductInfo['visibility'] = Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH;
$mpProductInfo['price'] = $mp['price'];
$mpProductInfo['categories'] = array(2072);
$mpProductInfo['categories'] = array(2107);

$mpProductInfo['sale_clearance'] = 3;

$mpProductInfo['embroidery_enabled'] = 1;

$mpProductInfo['image'] = $mediaDir.'/catalog/product/wysiwyg/FullSizeImages/'.$mp['sku'].'.jpg';
$mpProductInfo['imagePath'] = '/wysiwyg/FullSizeImages/'.$mp['sku'].'.jpg';
$mpProductInfo['image_exists'] = 0;
$mpProductInfo['embroidery_enabled'] = 0;
$mpProductInfo['embroidery_position_enabled'] = 0;
$mpProductInfo['new_size_chart'] = trim($mp['size_chart']);
$mpProductInfo['sizeId'] = 0;

it's the line that is   $mpProductInfo['sale_clearance'] = 3;

sale_clearance isn't the right call tag and i dont know what it should be or where to find the correct tag for it.

enter image description here


texts: Overriding core phtml template using theme based inheritence Magento2

texts:
Could any one please tell how to override Magento2's core phtml templates from custom theme.

I have done as follows":

Copied

app/code/Magento/Catalog/view/frontend/templates/product/list.phtml

To

app/design/frontend/MyModule/mytheme/Magento_Catalog/templates/product/list.phtml

Please help me further

How should the xml layout file be?

UPDATED:

I added as:

<referenceBlock name="product_list_toolbar">
        <action method="setTemplate">
            <argument name="template" xsi:type="string">Vendor_Module::product/list.phtml</argument>
        </action>
    </referenceBlock>

which is calling my phtml file..IS there no need of layout file?


texts:
I tried to create downloadable product following the documentation I failed in step 3.

My tab with "Downloadable Information" is empty:

I spend a few hours trying to debug this. There is no error in JS console or magento log. I also disabled modules. Cleared cache of course.

Mage_Downloadable_Block_Adminhtml_Catalog_Product_Edit_Tab_Downloadable::__construct() is called but _toHtml() is not (as far as I can tell). I read though related classes, templates and layouts but I could not figure out from where it should be called or what the problem is.

I am totally lost. Any advice where to dig deeper?


texts: Magento 2 not able to override Block file

texts:
I tried to override block file but I unable to see the output.

my script

di.xml file:

<?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\Theme\Block\Html\Topmenu" type="Company\Cms\Block\Html\Topmenu" />
</config>

Block file:

<?php

namespace Company\Cms\Block\Html;

class Topmenu extends \Magento\Theme\Block\Html\Topmenu{

    protected function _getHtml(
        \Magento\Framework\Data\Tree\Node $menuTree,
        $childrenWrapClass,
        $limit,
        $colBrakes = []
    ) {
        echo "exxit"; exit;
    }
}

and I followed the below link for this

How to override blocks in v2.1


texts: Magento 2.1 - cron job runnoing every 2 minutes instead of 1 minute

texts:
I created a cron job and set it up to run every 1 minute, but it just runs every 2 minutes instead. I have NO idea what is going on?

Any hint on why the cron task is executed every 2 minutes rather than every minute ?


texts: 404 page not found issue on all pages after upgrading Magento ver. 1.7.0.2 to 1.9.2

texts:
I updated Magento version  1.7.0.2 to 1.9.2 (CE) using following steps:

===== Steps to upgrade ======

After taking backup of all files and databases(.sql file).

Disable cache.
rm -rf lib/Mage/
rm -rf lib/Magento/
rm -rf lib/Zend/
rm -rf lib/Cm/
rm -rf lib/3Dsecure/
rm -rf lib/PEAR/
rm -rf app/code/community/Cm
rm -rf app/code/community/Phoenix
rm -rf app/code/core
Extract/install latest magento 1.9.2
Flush cache (rm -rf var/cache/*)

After updating magento, using above steps, I stuck into an issue of "404 page not found" on all pages


texts: Get compare product collection on CMS, Catalog Pages

texts:
I have used the below code but that is not working on catalog, cms & product page for me. but for compare page, cart page, and checkout page it's working.
$objectManager     = \Magento\Framework\App\ObjectManager::getInstance();
$compare           = $objectManager->get('\Magento\Catalog\CustomerData\CompareProducts');
$compareCollection = $compare->getSectionData();
foreach($compareCollection['items'] as $items){
   echo $items['id']."</br>";
}

Note: I am checking for guest users.
I am in wonder the same code is working for cart & checkout page but I am getting empty collection for cms, catalog and product page.
Please help me out.
Thanks in advance.!!


texts: Product special_price only changes with reindex

texts:
I'm trying to set a product special_price using rest api, But the special_price only changes in store front with reindex command.
PS: When i use a numeric value, like: 15, 100, etc... it changes perfectly. But when i try to set null it only changes with reindex command.

rest/default/V1/products/

{"product": {
  "sku": "86300-UNICO-UN",
  "custom_attributes": [
      {
        "attribute_code": "special_price",
        "value": null
      }
  ]}}


texts:
Following is the Unit Test error that I get

  Expectation failed for method name is equal to  when invoked zero or more times
  Parameter 0 for invocation Magento\Framework\App\Config\ScopeConfigInterface::getValue('module/general/base_url', 'store', null) does not match expected value.
  'custom/general/base_url' does not match expected type "array".

My test code is as below

<?php
namespace Custom\Module\Test\Unit\Helper;

class ConfigTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @var \Custom\Module\Helper\Config
     */
    protected $configHelper;

    /**
     * @var \Magento\Store\Model\StoreManagerInterface
     */
    protected $storeManager;

    /**
     * @var \Magento\Framework\App\Config\ScopeConfigInterface
     */
    protected $scopeConfig;

    /**
     * Sets up the fixture, for example, open a network connection.
     * This method is called before a test is executed.
     *
     */
    protected function setUp()
    {
        $methods = array_merge(
            get_class_methods(\Magento\Framework\App\Config\ScopeConfigInterface::class)
        );
        $this->storeManager = $this->getMockBuilder(\Magento\Store\Model\StoreManagerInterface::class)
            ->disableOriginalConstructor()
            ->getMock();
        $this->scopeConfig = $this->getMockBuilder(\Magento\Framework\App\Config\ScopeConfigInterface::class)
            ->setMethods($methods)
            ->disableOriginalConstructor()
            ->getMock();

        $this->scopeConfig->method('getValue')
            ->with([
                'module/general/base_url',
                'module/general/user',
                'module/general/api_user',
                'module/general/api_password'
            ])
            ->willReturnMap([
                ['base_url', 'http://domain.com/'],
                ['user', 'User'],
                ['api_user', 'customapi@domain.com'],
                ['api_password', 'ynY6rdZ3EDd3']
            ]);

        $context = $this->getMockBuilder(\Magento\Framework\App\Helper\Context::class)
            ->disableOriginalConstructor()
            ->getMock();
        $this->configHelper = new \Custom\Module\Helper\Config($context, $this->storeManager, $this->scopeConfig);
    }

    public function testBaseUrl()
    {
        $defaultValue = 'http://domain.com/';
        $this->assertEquals($defaultValue, $this->configHelper->getUser());
    }

    public function testConfiguratorScriptUrl()
    {
        $defaultValue = 'http://domain.com/Theme/User/Content/Scripts/Configurator/configurator.js';
        $this->assertEquals($defaultValue, $this->configHelper->getConfiguratorScriptUrl());
    }
}

I have gone through many other examples on the website with single stud method and willReturn value and that works. But I wanted to test multiple scope config values and based on my code my can't get the it working. I am not using any many methods here, both getBaseUrl() and getConfiguratorScriptUrl() are actual functions that I use to retrieve the values using helper.

Please guys let me know if you need any more details or any other part of the code that you think may be linked with it.


texts: Persistent Shoping Cart not available on Magento 1.7

texts:
How can I use persistent shopping cart on Magento 1.7?

I can't find it under System->Configuration (Customers).

Current Configuration Scope is set to Default Config, but still can't see it.

Thank you!


texts:
how to add class into div using on scroll in magento.

i have javascript like this

var $j = jQuery.noConflict();
$j(window).scroll(function() {
    var scroll = $j(window).scrollTop();

    if (scroll >= 100) {
        $j(".page-header").addClass("header-bar");
    } else {
        $j(".page-header").removeClass("header-bar");
    }
});

that javascript will add or remove header-bar class from div with page-header class in it.
it look like this
<header id="header" class="page-header">
will become <header id="header" class="page-header header-bar">if i scroll down the page.

I tried using single html file, it is working perfectly, but then when i apply it in magento, it is not working, but no error message displayed.

The way i apply it into magento is like this:

First, i put that javascript into one file named header-effect.js and i store the file in skin\frontend\rwd\default\jsfolder.
After that, i add header-effect.js in page.xml <action method="addItem"><type>skin_js</type><name>js/header_effect.js</name></action>

I clear magento cache, refresh the page, scroll down the page but nothing is happen, i check page source and header-effect.js is loaded.

Am i doing it correctly?


texts: Translate text on One Page Checkout | Magento 2.2.4

texts:
I am trying to translate on phrase on my Magento 2 One Page Checkout.

I am using a third party extension by Amasty (It should make a difference when trying to translate phrase, should it?)

What I am trying to translate:

I tried this: Magento 2: Change Text On Checkout Page

But it don't seem to work.

I found a translation file under /app/code/Amasty/Checkout/i18n, however, it translates only backend phrases.

Any suggestions?

UPDATE:

This is the <item></item> form checkout_index_index file:

<item name="telephone" xsi:type="array">
  <item name="config" xsi:type="array">
     <item name="tooltip" xsi:type="array">
          <item name="description" xsi:type="string" translate="true">For delivery questions.</item>
     </item>
  </item>
</item>

UPDATE 2:

Changing the string for anything different gives me this error in the checkout:

quote.js:32 Uncaught TypeError: Cannot read property 'quoteData' of undefined
    at quote.js:32
    at Object.execCb (require.js:1650)
    at Module.check (require.js:866)
    at Module.<anonymous> (require.js:1113)
    at require.js:132
    at require.js:1156
    at each (require.js:57)
    at Module.emit (require.js:1155)
    at Module.check (require.js:917)
    at Module.enable (require.js:1143)

Do I have to change anything else too?


texts:
If I select "Group Product" to create a group product the Name Field is missing under Product Information --> General. However, if I select "Simple Product" the name field appears. Based on information I could find, the Name field should also appear for Group Product. How do I fix this?

Screen shot below shows the name field missing.


texts: Magento 2.3.4: Facebook error: the parameter app_id is required

texts: clicking on the facebook symbol right below the ADD TO CART button returns the error the parameter app_id is required as seen in the screenshot below. Is there anything that should have been done before users can be allowed to use the facebook to promote the product from our Magento site?


texts: With singleton table CRUD I successfully created a form I want to spread it to multi tabs.


texts: Magento 2.1 Default Install Menu Issue (Google Chrome)

texts:
I have a default install on Magento 2.1 using DevBox.

However when loading up the frontpage the menu looks broken (has jquery ui styles applied )

Now I have not applied any stylesheets as it is a default install and as I read jQuery UI styles are not applied to magento due to this issue.

does anyone know how to address this issue?


texts: Change page title and meta description in .phtml file

texts:
Is there a way to change the page title and meta description from a .pthml file ?

I know this is stuff regarding the header files but is there any way in magento to force to change the page title and add a meta description in the .pthml files?
Or is this simply not possible?


texts: PHP Script in Magento 2 Custom Module Works in Browser but Not Working through Cron

texts:
We have a custom module that executes a php script. When running the script through an observer event, the script runs without a problem. When running the script through Cron, the script runs but does not work correctly.

In the script, there is reference to a file in the magento root directly that we need to run the script properly. I think it might be that cron is running the script in a different directory.

Any help would be greatly appreciated.


texts: Return 404 if pagination is out of range

texts:
Currently, when I navigate to a page in a category that is beyond the range of the products (say page 6 on a category containing 200 products with 50 products per page), the page returns a 200 http code and shows the products from the last page (in this example page 4).

Anybody know how to fix this? I'm currently on 1.7.0.2


texts: Why intercepter files are generator generation\Magento\Framework\View\Result\Layout\interceptor.php?

texts:
I have Magento 2 with sample data and I came across this file

  generation\Magento\Framework\View\Result\Layout\interceptor.php.

The Interceptor file is generated only if any module wants to plugin (before/after/around) any method in given class . for example, this method renderResult() does not have any plugin like beforeRenderResult/aroundRenderResult . then Why interceptor file was generated ? Are there any other scenarios where interception file can be generated ?

public function renderResult(\Magento\Framework\App\ResponseInterface $response)
{
    $pluginInfo = $this->pluginList->getNext($this->subjectType, 'renderResult');
    if (!$pluginInfo) {
        return parent::renderResult($response);
    } else {
        return $this->___callPlugins('renderResult', func_get_args(), $pluginInfo);
    }
}


texts:
Right now I am trying to override the default class of Magento 2 due to some my custom requirement but couldn't succeed, don't know why what I have done wrong here. May be someone can help me to the right direction.

For this I have written this code in my system,

<preference for="Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection" type="COMPANY_NAME\MODULE_NAME\Model\ResourceModel\Fulltext\CatalogSearch\Collection"/>

and I want to override this class,

Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection

EDIT

di.xml [app\code\COMPANY_NAME\MODULE_NAME\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\CatalogSearch\Model\ResourceModel\Fulltext\Collection" type="COMPANY_NAME\MODULE_NAME\Model\ResourceModel\Fulltext\CatalogSearch\Collection"/>
</config>

Thanks,


texts:
As part of product data migration from one store to another i need to change url keys on some of the products. Entire process is being done in shell script.

So imagine i used to have product with following url key: nice-prod1 . It used to be in some category and whatnot. Now, after migration, it has become: nice-prod2. It's accessible by it's new key so everything is fine. But the first one is not working anymore. So what I need, is to create url rewrites that redirect nice-prod1 to nice-prod2.

I tried to achieve this using setData('save_rewrites_history', true); before saving changes in product (which is part of collection), but no url rewrites are generated.


texts:
I am trying to change my Invoice increment ID through MYSQL table
Current Invoice ID is 000000002, I want to start next invoice Id from 200000001 So want to add "2" at the start of invoice ID,

When I am trying to change in the MySQL table  sequence_invoice_1 it's showing me an error: "can't copy the table to the same one"

So can anyone Suggest me, what is the correct way to change increment id of Invoice!


texts: Script update attribute for all products

texts:
I need to update the attribute value of all products (80.000+). How can I fix this using a script?

The attribute that should be updated is the following:

Attributecode: eboekhouden_grootboekrekening
Attributetype: dropdown
The value that should be selected: 8000 - Omzet Shop

Is the following code right?

<?php

ini_set('display_errors', 'On');
error_reporting(E_ALL);

require('app/Mage.php'); // this is assuming your script is located in the Magento root dir
Mage::app(); // initiate the Magento engine

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

foreach($products as $product)
{
    $product->setEboekhoudenGrootboekrekening('8000 - Omzet Shop');
    // this line might not be required - compare results with & without it
    $product->setEboekhoudenGrootboekrekeningIsFormated(true);
    $product->getResource()->saveAttribute($product, 'eboekhouden_grootboekrekening');
}
?>


texts: Entity Type : Categories is missing from dropdown (Export - Data Flow Profile) Magento 1.9

texts:
i just want to export all categories , the issue is when i use export DataFlow Profiles, i Just See  in Entity type Customers & Products, there is no Categories option in Dropdown, anyone please help me.
See the below image


texts: When I post the data ,the data will save repeatedly into database

texts:
How to check weather the value is in database when i insert the data

$amount_model = Mage::getModel('donations/amount');
if(isset($post_data['amount']) && $post_data['amount'] != '')
{
    $amountdata = $post_data['amount'];
    foreach(array_unique($amountdata) as $amount) {
        $amount['donation_id'] = $dataid;
        $amount_model->setData($amount);
        $amount_model->save();
    }
}


texts: Layout Updates in Magento 2.3.4 has changed and needs further clarification

texts:
The link referred to in this exerpt of Magento 2.3.4 release note does not clearly state how to define the physical file.

You can no longer specify an entity-specific layout update with text but instead must create a physical file that contains the layout updates and select it for use. The name of the file containing an update must follow the conventions described here.


texts: Magento 2 Custom table collection Conditions

texts:
I'm facing an issue with the dynamic parameters for the filter

$collection = $this->_collectionFactory->create()->addFieldToSelect('field_name');

If I have below code it works fine if the parameter is 2008, but if parameter is passed like 2008', I get an mysql error.

$collection->getSelect()->where($carYear.' >= substr(tyreld,7,4)');

  with paramter 2008 The query is like: WHERE (2008 >= substr(tyreld,7,4)) with no error

  with paramter 2008' The query is like: WHERE (2008' >= substr(tyreld,7,4)) This throughs
  an mysql syntax error

But if I tried the below code with no conditions it gives me no error.

->addFieldToFilter('tyreld', array('gteq' => $carYear));

How can we handle this type of issues.


texts: Change the Date Format in Email template. Without Editing Phtml File

texts:
How can edit the date format, in email template without editing phtml. ?
i was used "Date : {{var order.getCreatedAt()}}", Output like
"2016-08-19 09:15:44", I need remove the time in email template only. i used.
{{var order.getCreatedAt()|formatDateTime:F j, Y}} is not working. please tell me how can show "2016-08-19" on email template please help me?


texts: Theme not applying for new products page

texts: I have added new custom theme to my project. Everything working fine. But, when I click the any one of product in  product list my new theme not applying in that product page. How to solve this issue?


texts: How can I delete custom attribute in magento 2.1

texts: I have created an attribute which was showing error while adding product, now I have uninstalled and deleted the module still error is there , How to erase that attribute from table.


texts:
I'm currently working in the Magento 2.3.1 MSI.
When I viewed in the product view page in the admin panel there is a quantity per source column with displaying quantities per source. Can I add this same feature into the sales order view page as well? If anyone knows please help me. Thanks in advance.
You can take as reference to below image to view the product view page.


texts: i want to add custom text in product section below product name, please explain in detail im new to magento 2

texts: The product page should have an italic text below product name that should display the text i add from admin panel, so how should i do it please explain in detail because i'm new to magento 2.


texts:
I have been developing an existing Magento (1.9) site.

My current approach is to make a clone of the Magento files and DB, configure the clone to use the new DB and change the base URLS of the site to dev.example.com. I then develop on the clone with the reassurance that I will not bring the live site down during plugin installs, new store creation or other development activities (see below).

During the development period all kinds has happened including the following:

Updates to mage core 1.9.1 to 1.9.2 for example.
Updates to existing plugins.
New plugins.
Changes to template files.
New Stores created (Multi-Store).
New Themes installed.
Updates to CMS.
Test purchases.
New test dummy user account.
New customer accounts and orders are migrated over from a non-magento store

Meanwhile, on the other side of the server, current live site has been:

Taking orders
Taking payment transaction infomation.
New customers have made accounts and signed up for newsletters.
The clients have made new blog posts and updated/added cms pages.

And this works all fine n dandy until its time (normally a few weeks down the road) to make the shiny development site live with all the changes brought together in one harmonious Magento.

My last experience of merging the data was unbelievably painful with the following issues experienced:-

my staging instance complaining of foreign key errors and other DB related issues.
incorrect records assigned to customers
replication of data
store views becoming muddled
transaction data missing

Magento's built in import/export tools were handy but also became a double edged sword as customers order history isn't a consideration with these built-in tools leading to all sorts of DB errors and mismatched data.

3rd party plugins to bring over order history made a bad situation worse as they would not bring across data I would expect to come across. Transaction information or Shipments for example.

My experience was pretty stressful and I'm not looking for a resolution for any particular issue (they're all solved now) but rather asking .... is there anyway to make the process less prone to error?

Are there any holistic tools / environment / methodology  out there that can help in this situation without needing a Magento tool box of plugins or scripts that require updating / maintenance ?

Is my approach wrong?

Resources on the subject are pretty sparse given the popularity of Magento, which surprises me.


texts: Show image of associated product selected, rather than configurable product on wishlist page

texts:
I am trying to get the image of child (associated product) of a configurable product on wishlist page. Currently, parent image is shown which is not desired.

What I already have done:

In this file, I have been trying to get it:

 /template/wishlist/item/column/image.phtml

//my code
if ($product->getHasOptions()) { // mean it is configurable product
$my_options = new Mage_Wishlist_Block_Customer_Wishlist_Item_Options();
$my_config_options = $my_options->getConfiguredOptions();
if ($my_config_options) {
//try to find some link to the image
}

But it is not helping out. My above code may not be good enough, but I am just trying to reflect that I did try it myself.


texts: How can i disable 100's of product in my site

texts: I need to disable some products from my website, is there any bulk edit options in admin panel?


texts:
Magento Version: 2.3

Webserver: nginx

I have a site which has multiple websites/store set up. I am not able to access the store that is not the default, and any time I go there is redirects me to the default store.
I have set the store variables within nginx as fastcgi_params and confirmed that it came through to Magento.

I have tried going as far as hard coding the store within the index.php file by setting the server parameters -

$_SERVER['MAGE_RUN_CODE'] = 'mystore' and $_SERVER['MAGE_RUN_TYPE'] = 'store', and it still redirected back to the primary store.

Also tried this with the full Magento Class, i.e. -

$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = 'mystore';
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = 'store';

The one way that I was able to get multi-store to work was by enabling 'Add Store Code to URLs'.

Is there something that is missing?

Thank you.


texts:
I am having an issue with the cart summary on the checkout page, when you mouse over the info with item name and price are disappear.

Has anyone else encountered this, I have been over as much of the code as I can find and cant seem to figure out why its happening or how to stop it. I haven't been able to look into the JavaScript because I don't really know JS well enough to find the code that runs this.


texts: Magento 2: Product Collection based on news_from_date

texts:
I want to get the product collection of those that have news_from_date field.

This is my block file

<?php
namespace Company\Mod\Block\Theme;
class Productnew extends \Magento\Framework\View\Element\Template
{
public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Catalog\Model\ResourceModel\Product\Attribute\CollectionFactory $productCollectionFactory,
        array $data = []
        ) {

        $this->_productCollectionFactory = $productCollectionFactory;
        parent::__construct($context, $data);
    }

    public function getProductCollection()
    {
        //echo
        $collection = $this->_productCollectionFactory->create();
        $todayDate  = date('Y-m-d', time());
        $collection->addAttributeToFilter('news_from_date', array('date' => true, 'to' => $todayDate));

        return $collection;
    }

}

In my phtml

<?php

 $test = $block->getProductCollection();
 print_r($test);exit;

But it returns a blank page. How do I get product collection correctly?


texts:
I have a requirement to create a scheduled task that will send orders (since the last time the task ran) to an external web service. The data needs to be sent in cXML format and one xml per order. It needs to be the cXML formatted data rather than actual file.

I'm looking for some advice really on how best to accomplish this. I have created a base module with a cronjob that will run every 5 minutes.

I have a Model/Export.php as follows that is pretty basic at the moment to just get orders with specific statuses;

class OrderSync_Model_Export
{

    public function ExportSales()
    {
        //A collection of orders
        $order = Mage::getModel('sales/order')->getCollection();
        $order->addAttributeToFilter('status', array('in' => array('pending','complete')));
        $orders = $order->getItems();
    }
}

I obviously then need to get the specific data from each order but the part i'm not sure is how to get/send each individual order as cXML ( http://cxml.org/) to the web service. I assume I would probably need to cURL this to the web service but it's the part about sending each individual order when the cronjob runs that i'm not so sure of and wondered if someone might be able to help?

Also, the web service returns a response for each order cXML that it receives like so and I'd like to be able to update an order attribute with the status detail (code and text) if anyone has any pointers for this too?

The example response is as follows;

<?xml version="1.0" encoding="utf-16"?>
<cXML payloadID="int.coupahost.com" xml:lang="en" timestamp="2017-04-06T11:43:25.2681984+01:00">
  <Response>
    <Status code="500" text="Price does not match current pricelist- 653244    Possibly out of date Pricelist, Please contact supplier for updated pricelist " />
  </Response>
</cXML>


texts: "Failed to load resource: the server responded with a status of 404 (Not Found)" After adding js to layout file

texts:
I am building a admin form which uses wysiwyg editor. So, I add the following xml statement to the corresponding layout file. However, I got this error: "http://127.0.0.1/magento/js/prototype/windows/themes/magento.css Failed to load resource: the server responded with a status of 404 (Not Found)"

I learnt from other posts on the Internet that I can get this file from the installation file downloaded from official website and put it the the js folder. However, I found that many extensions also use this file, but they don't have this problem. So, I want to ask if there is any way to solve this problem without copying "magento.css" file. Thank you in advance.

<handle>
    <reference name="head">
        <action method="setCanLoadTinyMce">
            <flag>1</flag>
        </action>
        <action method="addJs">
            <script>mage/adminhtml/variables.js</script>
        </action>
        <action method="addJs">
            <script>mage/adminhtml/wysiwyg/widget.js</script>
        </action>
        <action method="addJs">
            <script>lib/flex.js</script>
        </action>
        <action method="addJs">
            <script>lib/FABridge.js</script>
        </action>
        <action method="addJs">
            <script>mage/adminhtml/flexuploader.js</script>
        </action>
        <action method="addJs">
            <script>mage/adminhtml/browser.js</script>
        </action>
        <action method="addJs">
            <script>prototype/window.js</script>
        </action>
        <action method="addItem">
            <type>js_css</type>
            <name>prototype/windows/themes/default.css</name>
        </action>
        <action method="addItem">
            <type>js_css</type>
            <name>prototype/windows/themes/magento.css</name>
        </action>
        <action method="addItem">
            <type>js</type>
            <name>mage/adminhtml/wysiwyg/tiny_mce/setup.js</name>
            <params/>
        </action>
        <action method="addItem">
            <type>js</type>
            <name>tiny_mce/tiny_mce.js</name>
            <params/>
        </action>
        <action method="addJs">
            <script>magestore/bannerslider/tooltip.js</script>
        </action>
        <action method="addJs">
            <script>magestore/bannerslider/prototip.js</script>
        </action>
    </reference>
</handle>


texts: Orders Section is missing when no order placed

texts:
Order section in customer dashboard is missing when customer have placed no order. In this case i want to show message like wishlist "You have placed no order."

Kindly guid me how i can achieve this.
I am using magento version 2.1.8.
Thanks


texts: Cannot initialize the indexer process on Category Products

texts: i am finding issue but still same (flat_products) resolve issue. i try to solve this issue befor 3 days please help me how can i resolve this issue


texts: magento2 checkout: how to update billing address programmatically

texts:
I would like to force update of the billing address as user is typing his firstname and lastname in the checkout. For example when it changes or on keyup.

I'm using a custom checkout module that only triggers this update when the postcode is changed or the country is changed.

I was thinking of creating a mixin for set-shipping-information and monitor the elements so I can trigger this action but I honestly can't find any guide on how to approach this.

I tried writing my mixin like this

define([
'jquery',
'mage/utils/wrapper',
'Magento_Checkout/js/model/quote',
'Magento_Checkout/js/action/select-billing-address',
], function ($, wrapper, quote, selectBillingAddress, ) {
'use strict';

return function (setShippingInformationAction) {

    $(document).on('change',"[name='firstname']",function(){
        console.log('firstname changed');
        //code to update billing address
    });

    return wrapper.wrap(setShippingInformationAction, function (originalAction) {
        return originalAction(); // it is returning the flow to original action
    });
};
});


texts: Magento2 : What is the use of schema.graphqls file in GraphQL

texts:
What is the use of schema.graphqls file?

  vendor/magento/module-catalog-graph-ql/etc/schema.graphqls


texts:
I followed this tutorial to create a main menu link to a CMS page and everything worked great - this is the Download link.
http://www.magentocommerce.com/knowledge-base/entry/adding-page-links-in-the-navigation-bar

I tried to do that same but link to a product page but I get a 404.

Here's what the URL redirects look like:

The first 2 URL redirects are for the download CMS page and work correctly. In this case the ID Path is the URL Key of the download page.

The 2nd two URL redirects are for the product link. Given that we don't have a CMS page to link to I tried setting the ID Path the following, but all resulted in a 404 - (The product id is 19)

product/19
catalog/product/view/id/19

Is it the ID Path that's causing the problem? What should it be set to?