texts: How to add new custom options with custom values on cart update?

texts:
I have a custom HTML on cart page with some checkboxes.
I am getting All the selected checkboxes in my observer "checkout_cart_update_items_before" I am able to update cart item prices in this observer.

Now on cart update I want to create these selected checkboxes as Custom option to cart items and display them with all items in cart.

Following is the code that I have tried to create Custom options.

    $item->addOption(
                      array(
                            'code'  => 'logo_options',
                            'value' => serialize($logo_positions),
                           )
                    );
    if ($logoOptions = $item->getOptionByCode('logo_options')) {
          $options = $item->getProductOptions();
          $options['logo_options'] = unserialize($logoOptions->getValue());
          item->setProductOptions($options);
    }
    $item->save();

Below is a screenshot of Cart.


texts: How can I add my products to my home page?

texts: I've insert 5 products and I wanted them to appear on my home page. How can I do that ?


texts: how to solve the javascript files are blocked every 3 days in magento2?

texts: We are using Magento2 v2.0.0 with Ves Need Theme. Our Site was blocked by web guards 3 days once. Please give any solutions to solve.


texts:
Each time I try and paste something into a CMS Page i get an error. Could someone explain what I'm doing wrong?

The error reads:

  Currently not supported by your browser, use keyboard shortcuts
  instead.


texts: Category Product Page Not displaying pagination

texts:
Something weird happened and now my magento category page is not showing pagination. I tried searching every where but my store is still not showing page navigation(pagination).

(Magento 1.8 on nginx-php-fpm)


texts: Programatically get parent ids of products of array

texts:
I am working on module and want to fetch parent product ids of child product. If it exists. I am using following line of codes,

$parentIds = Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($product_id);

This line of code is work for single product and give me details array of parent id.

I want above line works for array of products:

$productArraya = array('12','15','18','40');

I put this array of products in to above line but not work.


texts:
As near as I can tell, when you view a Grid in Magento's backend, the following "loaded over XHR" KnockoutJS template is what starts rendering things

File: vendor/magento//module-ui/view/base/web/templates/collection.html
URL:  http://magento.example.xom/pub/static/adminhtml/Magento/backend/en_US/Magento_Ui/templates/collection.html
<each args="data: elems, as: 'element'">
    <render if="hasTemplate()"/>
</each>

However -- I'm at a bit of a loss as to what the <each/> tag and the <render/> tag are.  They aren't (or don't appear to be?) a part of stock KnockoutJS.

I know its possible to add custom tags to KnockoutJS via components, but I don't see any obvious places where a component named each or render is added to KnockoutJS.

So, I'm not sure if these are components registered somewhere I'm not aware of, or some other customization that Magento has made to KnockoutJS that enables custom tags, or something else entirely.

Note: I'm not completely in the dark here -- I get that <each/> is probably iterating over every child ui component rendered in the JSON, and rendering its template (if that template exists).

What I'm not clear on at all is how these tags are implemented.  I want to see where they're implemented so I can debug how data is bound, and also understand the mechanism that Magento's using to create these tags in case there are others.


texts:
I have a store in Magento 1.6 on a shared server. Now, I want to export all of the products and categories from this server, and import them into a new Magento 2.

The problem is, that the Magento 1.6 exports as XML, while the Magento 2 imports as CSV.

How can I import the XML to Magento 2?


texts:
I am using Magento 1.9.0.1. My store has 15K+ SKUs and everyday I am getting 500+ sessions. Some time the session reaches 25K+

The SKUs are expected to reach 250K and per day user sessions 10K by next month.
My current hosting cannot handle this traffic and the site is being too slow. So I was thinking to shift it to AWS.

I search a lot about this but couldn't understand which Linux instance will suit my needs.
Can I please get some suggestions.


texts:
I am making a product page that has a product with multiple options for height and width in a dropdown. When I more than about 40 options, the page wont save them anymore. The page will just say

  Invalid Form Key. Please refresh the page.

I tried refreshing the page, clearing the browser cookies and cache, clearing magento cache and clearing values in web/cookie/cookie_domain and web/cookie/cookie_path in the core_config_data table. I've tried different browsers in incongnito mode and they all seem to fail once I try to add to many values. Here is my webpage with some of the values. https://buyglass.woodstove-fireplaceglass.com/pyroceramic-glass.html
Has anyone had this happen to them before, or have any other ideas on how to fix this?


texts:
I have a view with two templates that use the same uiComponent with Knockout Js.
I spent hours trying to discover how to do not share the observables between two different templates.
example:


texts: 1.9 magento change admin panel from backend

texts:
I changed my website admin panel url address from backend than my admin panel is lost.

Than change back all phpmyadmin settings:

admin/url/custom
web/unsecure/base_url
web/secure/base_url

This is my phpmyadmin screenshots, just I don't know why I have 2 web/unsecure/base_url and  web/secure/base_url

and this is my app/etc/index.xml file

and I delete all my var/cache and var/session files from ftp.

I think look like I change back my all configuration, now when I try login my admin panel url 'admin', I have this error: There has been an error processing your request
Exception printing is disabled by default for security reasons.

Error log record number: 570805581814

and this is 570805581814 report file:

a:5:{i:0;s:67:"Illegal scheme supplied, only alphanumeric characters are permitted";i:1;s:2908:"#0 /home/bilginirmak/public_html/app/code/core/Mage/Core/Model/Store.php(777): Zend_Uri::factory('admin/')
#1 /home/bilginirmak/public_html/app/code/core/Mage/Core/Model/Store.php(611): Mage_Core_Model_Store->isCurrentlySecure()
#2 /home/bilginirmak/public_html/app/Mage.php(382): Mage_Core_Model_Store->getBaseUrl('skin', NULL)
#3 /home/bilginirmak/public_html/app/code/core/Mage/Core/Model/Design/Package.php(349): Mage::getBaseUrl('skin', NULL)
#4 /home/bilginirmak/public_html/app/code/core/Mage/Core/Model/Design/Package.php(503): Mage_Core_Model_Design_Package->getSkinBaseUrl(Array)
#5 /home/bilginirmak/public_html/app/code/core/Mage/Core/Block/Abstract.php(1035): Mage_Core_Model_Design_Package->getSkinUrl('reset.css', Array)
#6 /home/bilginirmak/public_html/app/design/adminhtml/default/default/template/login.phtml(32): Mage_Core_Block_Abstract->getSkinUrl('reset.css')
#7 /home/bilginirmak/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/bilginirm...')
#8 /home/bilginirmak/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('adminhtml/defau...')
#9 /home/bilginirmak/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#10 /home/bilginirmak/public_html/app/code/core/Mage/Adminhtml/Block/Template.php(81): Mage_Core_Block_Template->_toHtml()
#11 /home/bilginirmak/public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Adminhtml_Block_Template->_toHtml()
#12 /home/bilginirmak/public_html/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#13 /home/bilginirmak/public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Text_List->_toHtml()
#14 /home/bilginirmak/public_html/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#15 /home/bilginirmak/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#16 /home/bilginirmak/public_html/app/code/core/Mage/Adminhtml/controllers/IndexController.php(82): Mage_Core_Controller_Varien_Action->renderLayout()
#17 /home/bilginirmak/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_IndexController->loginAction()
#18 /home/bilginirmak/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('login')
#19 /home/bilginirmak/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#20 /home/bilginirmak/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#21 /home/bilginirmak/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#22 /home/bilginirmak/public_html/index.php(87): Mage::run('', 'store')
#23 {main}";s:3:"url";s:6:"/admin";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:5:"admin";}

So guys what I have to do for get back my admin panel?


texts: Magento 2.2 - Add link to product (front end) within a custom column in sales order view items list?

texts:
I would like to add a column after "Product" to have a link to the product on the front end so it is easy to identify the product.  Nearly all our products are one off items so I'm looking for an easy way to identify which product exactly the person has ordered, which the front end view of the product provides.

I followed the instructions here https://github.com/magento/magento2/pull/11076, which I found from here Magento2 How to custom column in sales order item renderer in admin order view and I'm getting an error stating my template is invalid

    1 exception(s):
Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file: 'Vendor_Module::test.phtml' in module: 'Magento_Sales' block's name: 'column_test_column'

Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file: 'Vendor_Module::test.phtml' in module: 'Magento_Sales' block's name: 'column_test_column'
#0 /var/www/html/magento/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\Element\Template->fetchView(false)
#1 /var/www/html/magento/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Sales\Block\Adminhtml\Items\Column\DefaultColumn\Interceptor->___callParent('fetchView', Array)
#2 /var/www/html/magento/vendor/salesigniter/releasedamagewaiver2/Plugin/Catalog/Template.php(84): Magento\Sales\Block\Adminhtml\Items\Column\DefaultColumn\Interceptor->Magento\Framework\Interception\{closure}(false)

That continues on for some time.

So for the sales_order_view.xml, what have I got wrong?

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="order_items">
            <arguments>
                <argument name="columns" xsi:type="array">
                    <item name="test_column" xsi:type="string" translate="true">Test Header</item>
                </argument>
            </arguments>
            <referenceBlock name="default_order_items_renderer">
                <arguments>
                    <argument name="columns" xsi:type="array">
                        <item name="test_column" xsi:type="string" translate="true">col-test</item>
                    </argument>
                </arguments>
            </referenceBlock>

            <block class="Magento\Sales\Block\Adminhtml\Items\Column\DefaultColumn"
                   name="column_test_column"
                   template="Vendor_Module::test.phtml" group="column" />
        </referenceBlock>
    </body>
</page>

My test.phtml, as the link above has, simply had "test column" within it, no more code/text.

Secondly, how can I pull the url of the product on the frontend to put in this column?  Is there a way I can grab the product id stored in the product_id column of the sales_order_item table to use this to get the front end url?  As I haven't been able to get past the custom column step I haven't been able to try getting the url but would love any advice.


texts: rewriteRule for rewrite magento cms page to custom url

texts:
I have cretaed a cms page https://example.com/page_url in magento admin.

I want to create a rewriteRule in .htaccess file to rewrite cms page by custom url like https://example.com/custom_url.

For this I have created a rule as :

RewriteRule ^custom_url /page_url [P]

It is working on http server but not on https server.

What is the correct rule for rewrite page_url to custom_url?


texts:
I tried to 'Use Web Server Rewrites', but it does not work.

Can you help me please?


texts: How to print a list of Magento 1 product urls in a table

texts:
I want to query the database for all products with urls starting "afr-" and print them on a cms page in a table. For example, the final printed table would look like:

  753954329
  https://example.com/afr-753954329

  498563241
  https://example.com/afr-498563241

  392736177
  https://example.com/afr-392736177


texts:
I need to edit the Pdf Invoice template in order to:

remove tax column
make products attributes (size and color) in same line

I want to make it:

Product name
Color: white , Size: 2

instead of

Product name
color:
white
size:
2

I am editing the files

  /vendor/magento/module-sales/Model/Order/Pdf/Invoice.php

and

  /vendor/magento/module-sales/Model/Order/Pdf/AbstractPdf.php

Also I want to make those changes permanent even if I update Magento version.

Thank You


texts: Magento 2: Show Custom fields in checkout form, information in Order email

texts:
We have added a plugin to add extra custom fields in checkout page of magento2 using this plugin.
https://github.com/sbodak/magento2-checkout-custom-form

It save this information in Order, and this infomation can be seen if we open order in backend.

You can also check the fields of this plugin in checkout page in front end here.

And here is the code of plugin which is used to show this order fields in Backend.

Now i want to show this information in Order email which is sent to customer automatically after each order. Here is the screen shot of that email template in Marketing->Email Templates.
Here you can see in template code there are variables to show different order information. Can i use some variable here which will show this new custome fields of Delivery Date and Delivery Time etc in email templetes?


texts: How to call email to friend on list page

texts:
I call Email to friend in list.phtml but I got error

code

<?php if ($this->canEmailToFriend()): ?>

<a href="<?php echo $this->helper('catalog/product')->getEmailToFriendUrl($_product) ?>"><?php echo $this->__('Email to a Friend') ?>

<?php endif; ?>

error

Invalid method Mage_Catalog_Block_Product_List::canEmailToFriend(Array
(
)
)


texts: Auto-changing the “Stock Availability” from “Out of Stock” to “In Stock” on quantity change

texts:
assume the product quantity is "0", once we edit the quantity to "1". again we have to change from

"out of stock" to " in stock" to buy in site

So I’ve been looking for a way to change the Stock Availability back to In Stock when the quantity field is greater than 0.

here someone posted solution : https://stackoverflow.com/questions/7168295/magento-auto-changing-the-stock-availability-from-out-of-stock-to-in-stock

we can use Magento event catalog_product_save_after. Create an observer method that does the following on event catalog_product_save_after.

can anyone please explain me in detail what and all needs to be done for this. means in which file which code we have to add ?

public function catalog_product_save_after($observer) {
    $product = $observer->getProduct();
    $stockData = $product->getStockData();

    if ( $product && $stockData['qty'] ) {
        $stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product->getEntityId()); // Load the stock for this product
        $stock->setData('is_in_stock', 1); // Set the Product to InStock
        $stock->save(); // Save
    }
}

as Qaisar Satti said i am trying this :

app/etc/modules/Froggyline_HappyHour.xml

<?xml version="1.0"?>
<config>
  <modules>
    <Froggyline_HappyHour>
      <active>true</active>
      <codePool>community</codePool>
      <version>0.0.0</version>
    </Froggyline_HappyHour>
  </modules>
</config>

app/code/community/Froggyline/HappyHour/etc/config.xml

    <?xml version="1.0"?>
<config>
  <modules>
    <Froggyline_HappyHour>
      <version>0.0.0</version>
    </Froggyline_HappyHour>
  </modules>
  <adminhtml>
        <events>

                <cataloginventory_stock_item_save_commit_after>
                    <observers>
                        <happyhour>
                            <type>model</type>
                            <class>happyhour/observer</class>
                            <method>product_save_after</method>
                        </happyhour>
                    </observers>
                </cataloginventory_stock_item_save_commit_after>
        </events>
    </adminhtml>

</config>

app/code/community/Froggyline/HappyHour/Model/Observer.php

 <?php
class Froggyline_HappyHour_Model_Observer {
public function product_save_after($observer) {
    $product = $observer->getProduct();
    $stockData = $product->getStockData();

    if ( $product && $stockData['qty'] ) {
        $stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product->getEntityId()); // Load the stock for this product
        $stock->setData('is_in_stock', 1); // Set the Product to InStock
        $stock->save(); // Save
    }
}}

?>


texts: magento2.2.4 error while extracting winRAR file

texts:
!
  C:\Users\dell\Downloads\Magento-CE-2.2.4_sample_data-2018-05-01-09-51-36.tar.gz:
  Cannot create
  vendor\magento\magento2-base\dev\tests\integration\testsuite\Magento\Framework\View_files\fallback\design\frontend\Vendor\custom_theme\ViewTest_Module\templates\fixture_template_two.phtml
  !
  C:\Users\dell\Downloads\Magento-CE-2.2.4_sample_data-2018-05-01-09-51-36.tar.gz:
  Cannot create
  vendor\magento\zendframework1\library\Zend\Service\WindowsAzure\CommandLine\Scaffolders\DefaultScaffolder\resources\PhpOnAzure.Web\resources\WebPICmdLine\Microsoft.Web.PlatformInstaller.UI.dll
  !
  C:\Users\dell\Downloads\Magento-CE-2.2.4_sample_data-2018-05-01-09-51-36.tar.gz:
  Cannot create
  vendor\magento\zendframework1\library\Zend\Service\WindowsAzure\CommandLine\Scaffolders\DefaultScaffolder\resources\PhpOnAzure.Web\resources\WebPICmdLine\Microsoft.Web.PlatformInstaller.dll


texts: Hi Guys, I need a Wikihow functionality in my Magento site. Can anyone suggest an extension or a way to bring this up?

texts:
I need a Wikihow functionality in Magento where the user or admin can include Step-by-Step Guides.
There is also similar iFixit website iFixit


texts: Find quote creation code in magento (sales_flat_quote creation)

texts: Where can i find the code for creating a quote while adding product to cart?


texts: Magento 2.3.5: Href link visible when a non confirmed user tries to login

texts:
When Store confirmation is required after customer registers and tries to login with confirming their account, it shows error message with link in href.
Please refer below screenshot


texts: What is the location of home page in Magento 2 directory?

texts:
What is the location of homepage in Magento 2 directory?

How to edit the Homepage section using html code by accessing it from the directory?


texts: Equivalent class for /Mage/CatalogSearch/Model/Layer.php in Magento2

texts:
What is the equivalent class for
/Mage/CatalogSearch/Model/Layer.php in magento2


texts: How to minify Magento 1.x core JS/CSS files?

texts: Any ways how to minify core JS/CSS files in Magento 1.x? (Prototype.js, etc) Thanks


texts:
I have a problem with my Magento website.
The sending of transactional emails always delay and take about 5 minutes.
Any suggestions to solve this?


texts:
How to done a error message under shipping method in magento 2

like this..


texts: Is there a default block or widget instance that would give me a grid view listing of all my categories?

texts:
I would like to create a cms page that lists one item from each category and assembles it in a grid.

Right now Im using Images as anchors that route to specified category pages.


texts:
I am designing a store and finding it hard to customize a theme. I have worked on html only but not on xml so please ignore my mistakes.

Is it good to make your own-theme or should i stick with the pre-installed theme and change/modify it?

Second, If I design a theme i have to design all the backend also? or magento automatically linked it with the admin-panel?


texts: Programmatically differentiate between admin & customer-placed orders

texts:
I'm trying to establish whether it is possible to differentiate between orders placed in the frontend (by the customer) and the backend (by an administrator).

I read this post on SO:

Differentiating Backend vs. Frontend Purchases in Magento

Which mainly highlights the fact that you used to be able to check the store_id field, but this does not hold true for the latest versions of Magento.

The other thing which it mentions is that when looking at an order via the backend, if it was indeed placed by a customer, you will see a field titled Placed from IP, which is missing if it was placed by an administrator.

I can't seem to find anything related to IP addresses via the sales_flat_order table.

Any ideas?


texts:
In product view page page, images are serving from this path :

media/catalog/product/cache/1/image/350x350/9df78eab33525d08d6e5fb8d27136e95/c/h/image-name.jpg  :

but I want to serve from this path :

`media/cache/images/1/thumbnail/602f0fa2c1f0d1ba5e241f914e856ff9/catalog/product/c/image-name.jpg` :

media.phtml

<?php
    $_product = $this->getProduct();
    $_helper = $this->helper('catalog/output');
    $dexxtz = Mage::helper('productzoom');

    $dexxtz->getCss();
    $dexxtz->getJs();
?>

        <img class="etalage_thumb_image" src="<?php echo $dexxtz->getImageFeatured($this->helper('catalog/image')->init($_product, 'image')); ?>" />
        <img class="etalage_source_image" title="<?php echo $_product->getImageLabel(); ?>" src="<?php echo $dexxtz->getImageFeatured($this->helper('catalog/image')->init($_product, 'image'), true); ?>" />

    <?php
        foreach ($this->getGalleryImages() as $_image) {
            if(Mage::registry('current_product')->getImage() != $_image->getFile()) { ?>

                <img class="etalage_thumb_image" src="<?php echo $dexxtz->getImageFeatured($this->helper('catalog/image')->init($this->getProduct(), 'image', $_image->getFile())); ?>" />
                <img class="etalage_source_image" title="<?php echo $_image->getLabel(); ?>" src="<?php echo $dexxtz->getImageFeatured($this->helper('catalog/image')->init($this->getProduct(), 'image', $_image->getFile()), true); ?>" />

        <?php
            }
        }
    ?>

or i want to display big size images in product page.


texts: Get customer from save event observer Magento 2

texts:
I've just started with Magento 2, but I have few question why try to get customer data from event observer.

Here is what I'm using inside my observer. And the event is adminhtml_customer_save_after

$this->_xmlGenerator->saveCustomerToXml($observer->getEvent()->getCustomer());

It is return an object from Magento\Customer\Model\Data. And this make my concernation. I can't find anything related to something like getPhone() inside the codebase.

And how to get specified address from getAddresses()

Do you have any suggestions for me?


texts: How do I get search results from all stores in a multi store magento2 setup?

texts:
I have two stores setup in my magento 2.3.4 website.
I need the search results to show results from both stores.
Any ideas on how this can be achieved ?


texts: Magento 2 Notice: Undefined index: quantity

texts:
I'm not sure if anyone can help? I've been trying to solve this problem for some time and I've narrowed it down.
I am currently having a problem when disabling a product in Magento 2.
When I disable a product I get the following error
Notice: Undefined index: quantity in /home/customer/www/domain.co.uk/public_html/vendor/magento/module-inventory-sales/Model/GetProductSalableQty.php on line 83
This when brings up the following Screenshot in Catalog view
https://pasteboard.co/Jhs7D2g.png
Link 83
https://pasteboard.co/Jhs95Pm.png
For a temporary fix, I can log in to the database and change the SKU in catalog_product_entity table. Just by adding a random number on the end.
But if I then edit the SKU and remove the random digit and enable the product this fixes the problem until I disable it again.
Tldr: When a product is disabled this shows the above error


texts: magento:Fatal error: Call to a member function getMethodInstance() on boolean in /var/www/html/rmcstore/app/code/core/Mage/Sales/Model/Order.php

texts:
I installed magento patches(7405,8788,6788) to site,after that when clicking on admin sales > order >view getting error like

   Fatal error: Call to a member function getMethodInstance() on boolean in /var/www/html/rmcstore/app/code/core/Mage/Sales/Model/Order.php

how to solve this


texts:
In default /vendor/magento/module-theme/view/frontend/page_layout/2columns-left.xml file is next code

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

but on frontend i have next structure:

i can't understand why sidebar additional is not in div "columns".
I tried change config before, after, and move container, but nothing changed.
Have someone any ideas why ?


texts: Fedex error on cart page in magento 2.3.2

texts:
I am getting this error on my cart page Notice: Trying to get property 'Message' of non-object in /srv/public_html/vendor/magento/module-fedex/Model/Carrier.php on line 570
https://prnt.sc/ubgsto
Please help.


texts: API Error - Token is not the correct length

texts:
We have two Magento 2.1 stores, one store i can connect to the REST API fine the other i get "Token is not the correct length" which is being classed as a 400 error in Postman.

The API has been working fine and no work has been carried out on the site since it was last working.

Any help would be greatly appreciated into getting this working

Thanks


texts:
Magento 2.3

How would I translate this in a CSV file:

$message = __('You added getProductUrl() .'">%1 to your shopping cart.',
                    $product->getName()
                );

Tried several ways, but all failed. Ideas?

Thanks!


texts:
I have two Store Views defined: 'English' and 'Lithuanian'.

Suppose that a customer makes an order in 'English' (default) Store View. If I printed the Invoice, it would be in English language. However, the customer needs it in Lithuanian language (it would have been in Lithuanian if he had made an order in 'Lithuanian' Store View).

How can I (as an admin) change Order's Store View after it has been made? Is there an easy solution? If not, what database entries should be altered?

I have also tried searching for an extension but did not succeed. Any help would be very appreciated!


texts: Magento 2 Particular order assign to sub-admin

texts:
Right now I am working with Magento 2 package, there has one out-of-scope Magento task.

=> Requirement:

Customer Place order
Admin create sub-admins
The super-admin assign the order to sub-admin( Either from order
detailed page or order list page)
After the sub-admin login, in order page, they can do the all
necessary action (invoice, comments etc...)that particular order
which was assigned by super-admin
Super-admin can able do all the action for all the orders

I hope this scope is not covert in Magento2 default, is there have any third-party module or else anyone has some nearest scope of the above means

Kindly share the details, it will help us to accomplish the task

Thanks in advance for your help.


texts: Remove View All menu link only for specific categories RWD theme 1.9

texts:
How do I remove view all for one specific category only? These categories do not have children which I think is the problem.

I tried editing renderer.phtml at line 62 with this if statement but it still shows for my category id 3.

if ($_catid = $this->getCategoryid('3')) {}
                            else {
        if (!empty($_hasChildren)) {
            $html .= '
';
            $html .=     '
';
            $html .=         'getUrl() .'">';
            $html .=             $this->__('View All')/* . $this->escapeHtml($this->__($child->getName()))*/;
            $html .=         '';
            $html .=     '
';
            $html .=     $this->render($child, $childrenWrapClass);
            $html .= '
';
        }

    }


texts: Retrieve final query from AdapterInterface

texts:
This seems like it should be simple, but I was not able to find a way to do it: when using AdapterInterface, is it possible to get the final query that's built using the query builder?

For example,

$query = $this->connection
        ->select()
        ->from($this->resourceConnection->getTableName('table_name'))
        ->reset(\Zend_Db_Select::COLUMNS)
        ->columns('run_count')
        ->where($where);

where $this->connection is an instance of AdapterInterface.

How do I output (or even log) the actual query sent to MySQL?


texts: magento save checkout onepage custom step data without creating a new column in quote table

texts: I have created a new custom step on checkout onepage and want to save the data of custom step. Is there any other option than creating a new column in quote tables and saving data there.


texts: Magento2: How to display most view product collection in home page?

texts:
I need to display product collection in home page in magento2.

Thanks.


texts: Magento2: Move Order Total Excl. Tax after the Shipping amount in Order Summary in magento2

texts:
I want to move order total excl. tax after the shipping amount in order summary.

Any help would be appreciate. Thank you


texts: Magento 2 How can we get product url with product collection?

texts:
I am able to load product collection by using

[$objectManager->create('Magento\Catalog\Model\ResourceModel\Product\Collection')]

in my phtml file.But in that collection product url is not there how can we get Product url also with that collection.


texts:
I'm using the Docker DevBox (Beta) from Magento for development. Unfortunately, after developing a while, it seems that the container caches everything. Sometimes it helps when I restart Docker. In the worst case, I have to initiate the Docker container again (via m2devbox-init.sh).

  Developing environment details:

  macOS Sierra (10.12.3)
  Docker Community Edition (17.03.1-ce-mac5 (16048), channel stable)
  Current DevBox with Magento v. 2.1.5 (not modified)

I had the same problem with two different Magento 2 projects now, so I assume it does not depend on third party Magento modules.

In the Docker container, I can't restart php-fpm by typing "service php-fpm restart" because there seems to be no service with this name.

# sudo service --status-all
 [ + ]  apache2
 [ - ]  bootlogs
 [ - ]  bootmisc.sh
 [ - ]  checkfs.sh
 [ - ]  checkroot-bootclean.sh
 [ - ]  checkroot.sh
 [ + ]  cron
 [ - ]  exim4
 [ - ]  hostname.sh
 [ ? ]  hwclock.sh
 [ - ]  killprocs
 [ - ]  motd
 [ - ]  mountall-bootclean.sh
 [ - ]  mountall.sh
 [ - ]  mountdevsubfs.sh
 [ - ]  mountkernfs.sh
 [ - ]  mountnfs-bootclean.sh
 [ - ]  mountnfs.sh
 [ - ]  procps
 [ - ]  rc.local
 [ - ]  rmnologin
 [ - ]  rsync
 [ - ]  sendsigs
 [ + ]  ssh
 [ - ]  sudo
 [ - ]  supervisor
 [ + ]  udev
 [ ? ]  udev-finish
 [ - ]  umountfs
 [ - ]  umountnfs.sh
 [ - ]  umountroot
 [ - ]  urandom
 [ - ]  x11-common

But of course, there is php-fpm running (you can see it in the active processes).

I have tried the following steps to flush the cache:

run "bin/magento cache:flush"
deleted static content files and cache from file system
created a php file with "opcache_reset()" in it and run it
killed all php-fpm processes
flushed the cache in the Magento backend
completely disabled the cache with "bin/magento cache:disable"
developer mode is turned on, of course

Something in this container is caching my code. It's caching php, JavaScript and phtml-template files. The Docker container is a good tool to work with, but this caching problems take so much time that I have to temporary switch back to XAMPP until, hopefully, someone can help me.


texts: How do add related product groups for a specific product

texts:
I have some products in my shop that should be linked together in subgroups: "required", "conflicting", "recommended", "spareparts". For example:

product A requires "mounting kit (product B)"
product C can't be mounted with product D
when buying product E you should consider buying product F
product G has following spare parts products: H, I, J

I'd like to show this information on product page, something like:

I saw that M2 has built-in function for related, upsell and cross sell products, but this is not exactly what I'm looking for. Do you have any suggestions?


texts: Magento 2.2 - Load eav attribute data for every product on collection load

texts:
I've created a multiselect custom eav attribute based on a flat table, so I used a dataSource, for a product everything is working fine, API (SOAP & REST), display on the product page etc but I'd like to get the data inside a collection for the page_list.

Right now it's what i'm doing on the product page but if I have 500 products I have to do 500 requests to get the eav attributes data on the page_list.

    $product = $this->productRepository->getById($id);
        $attr = $product->getCustomAttribute("Flags");
        $flagContent = [];
        if ($attr && $attrValues = $attr->getValue()) {
            $flag = $this->flagsCollectionFactory->create();
            $flagContentObject = $flag->addFieldToFilter("flags_id", explode(",", $attrValues))->toArray();
            if ($flagContentObject["items"]) {
                $flagContent = $flagContentObject["items"];
            }
        }
        return $flagContent;

Is there any way to load this "Flags" EAV attribute when I load the product collection so I don't have to do a request for every loaded products on the page_list ?

Thanks


texts: Magento 2: How to get Post data in backend/adminhtml?

texts:
I have added a massaction to the sales order grid in Magento 2. I want to pass on the POST data (the checked orders) to my custom controller/page which is setup and working as expected.

How do I retrieve the POST data in my controller or on the page. I searched allot but cannot find tutorials or examples. I know i can do $this->getRequest()->getPost(). But that only applies when the action is extending Magento\Framework\App\Action\Action but as far as I know this is only for frontend actions. My class is extending \Magento\Backend\App\Action as it needs to be a backend action.

Any extensive documentation or other resources on this topic would also be great!

EDIT: This was follow up question in looking for an answer. It might help users with the same problem: Magento 2 how to pass order id's from sales order grid to my module controller


texts:
I'm deploying my Magento online store soon but I'm a bit paranoid in testing and I want to repeat my test scenarios in production.
I already found a safe way to delete my test orders but I'm having trouble finding a way to reset statistics such as "Last Search Terms", "Top Search Terms", "Best sellers" etc
Can anyone help?
PS I don't want to delete ir from database directly, I want to use Magento objects so I can have the guarentee that magento DB is not messed up and mantains it's integrity !


texts: How to display products in site that are out of stock

texts:
On my Magento site I have configurable products. They have size and color attributes. How can I display products with sizes and colors that are out of stock? Now you can select only the color from from the products in stock and size also. If product is out of stock, combination of color/size isn't available for choosing. How to display all colors and sizes even from simple products out of stock?

P.S. I already set the configuration Display Out of Stock Products to Yes, but this is probably for catalog display, not attributes.


texts: How to display product image gallery in any phtml file?

texts:
I Need to display product image gallery to my custom .phtml file so I can display it anywhere.
I tried to get block using below code

$block = $objectManager->create('\Magento\Catalog\Block\Product\View\Gallery');

But then some jquery error comes. like "setoptions" not defined.

Please give me a perfect solution for this.


texts: How to add new Option to drop down attributes magento2?

texts:
How to add an new option to product dropdown attribute? If the option already exist it has to skip adding else add option with new value.

I followed the below link
How Magento2 add attribute option programmatically (not in setup) where it is creating the option but inserting duplicate if already the option is present.

And can we get the option id after insert is success?


texts: How to integrate live magento site to localhost without effecting live site

texts:
I downloaded live site to my local machine. And I also changed web/unsecure/base_url and web/secure/base_url with my local url.

After these all configurations site is not working in my local machine.

It is showing error as in below screenshot

http://awesomescreenshot.com/0c03t1je6b

Do you have any Idea what is missing..


texts: Add to wishlist button in cart page magento2

texts:
In magento2 ADD TO WISHLIST button functionality not provided by default on cart page so I want to implement ADD TO WISHLIST functionality on cart page how can I do that?

So user can directly add item to wishlist from cart page.

UPDATE

I have enabled templatepath hint for frontend and I see that on cart page move_to_wishlist.phtml file is called from app/design/frontend/Forever/theme/Magento_Wishlist/templates/cart/item/renderer/actions

move_to_wishlist.phtml file code is below.

<?php if ($block->isAllowInCart() && $block->isProductVisibleInSiteVisibility()): ?>
<a href="#"
   data-post='<?php /* @escapeNotVerified */ echo $block->getMoveFromCartParams(); ?>'
   class="use-ajax action action-towishlist">
    <?php /* @escapeNotVerified */ echo __('Move to Wishlist'); ?>

But move to wishlist button is not showing on cart page so I have remove if condition from above code so it's working perfect and showing move to wishlist on cart page and working.

So my question is when I remove  if ($block->isAllowInCart() && $block->isProductVisibleInSiteVisibility()) code from move_to_wishlist.phtml wishlist button is showing otherwise not so does there issue with block file or core code ?

Any help will be appreciated.


texts: Magento 2 Controller override not working

texts:
I have to override 2 controller 1 override is working and 1 override not working

<?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\Customer\Controller\Account\ForgotPassword" type="\Copper\Customer\Controller\Auth\ForgotPassword" />
    <preference for="\Magento\Customer\Controller\Account\ForgotPasswordPost" type="\Copper\Customer\Controller\Auth\ForgotPasswordPost" />
</config>

While \Magento\Customer\Controller\Account\ForgotPassword override is working just fine. \Magento\Customer\Controller\Account\ForgotPasswordPost is not overriding

Do anyone know Why ?

Controller ForgotPasswordPost.php

<?php
namespace Copper\Customer\Controller\Auth;

class ForgotPasswordPost extends \Magento\Customer\Controller\Account\ForgotPasswordPost
{
    public function execute()
    {
        echo "hello";die();
    }
}


texts:
I wanted design my admin from with following field type

Can any one tell me How can I implement this in Magento admin form.?
How Edit/new will work with this?
Thanks


texts: Remove Tax from showing up in Cart page and Checkout

texts:
Whenever I choose a Shipping method that isn't free in cart it shows the tax in the cart page: Cart

And it isn't even correct because it should be 22 % (Italian VAT).
How can I hide it?

This is what it looks like in Sales > Tax :
https://www.awesomescreenshot.com/image/2683080/b18d7effdd424a3025cb3d9a20f193c3


texts: How to check the category collection is empty or not in magento 2?

texts:
I am getting the subcategories of a main category like this(this file is in root folder)

use \Magento\Framework\App\Bootstrap;
include('app/bootstrap.php');
$bootstrap = Bootstrap::create(BP, $_SERVER);

$objectManager = $bootstrap->getObjectManager();

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$subcategory_1 = $objectManager->create('Magento\Catalog\Model\Category')->load(4);//My category Id
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();

From this collection how can i check is there any subcategory is available or not?


texts: Custom module admin panel section gives 404 error on save

texts:
In /magento1/app/code/local/Maddyboy/Instagramapi/etc/config.xml:

<adminhtml>
  <acl>
    <resources>
      <admin>
        <children>
          <system>
            <children>
              <config>
                <children>
                  <instagramapi translate="title" module="instagramapi">
                    <title>Instagram Slider</title>
                  </instagramapi>
                </children>
              </config>
            </children>
          </system>
        </children>
      </admin>
    </resources>
  </acl>
  <layout>
    <updates>
      <instagramapi>
        <file>instagramapi.xml</file>
      </instagramapi>
    </updates>
  </layout>
</adminhtml>

In /magento1/app/code/local/Maddyboy/Instagramapi/etc/system.xml:

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <tabs>
        <instagramapi translate="label" module="instagramapi">
            Instagram Slider
            <sort_order>1</sort_order>
        </instagramapi>
    </tabs>

    <sections>
        <instagramapi translate="label" module="instagramapi">
            Api Settings
            <tab>instagramapi</tab>
            <frontend_type>text</frontend_type>
            <sort_order>1</sort_order>
            <show_in_default>1</show_in_default>
            <show_in_website>1</show_in_website>
            <show_in_store>1</show_in_store>
            <groups>
                <section_one translate="label">
                    Section One
                    <frontend_type>text</frontend_type>
                    <sort_order>1</sort_order>
                    <show_in_default>1</show_in_default>
                    <show_in_website>1</show_in_website>
                    <show_in_store>1</show_in_store>
                    <fields>
                        <custom_field_one>
                            Custom Text Field
                            <frontend_type>text</frontend_type>
                            <sort_order>1</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                            <comment>Example of text field.</comment>
                        </custom_field_one>
                    </fields>
                </section_one>
            </groups>
        </instagramapi>
    </sections>
</config>

when I enter some dummy data and click on save I got a 404 error.

URL after save: http://127.0.0.1/magento1/index.php/admin/system_config/save/key/3537cf9ef9d3161eb483f8251284d9f9/section/instagramapi_options/


texts: How to add sample text, for example telephone nubmer under the logo in header?


texts: Setting cron job for files and folder permissions

texts:
Each time a new file is generated at var/cache/mage-tags/* it does not have the correct rights and the customers can't access the online store. The only way to make it back to normal is to log in by SSH > go to root of magento and perform chown -R user:psaserv .
I have tried to remove the prefix from the new generated files but still the error appears from time to time.
The olnly thing that has left me is to set up a cron job that performs each 5 or maybe 10 minutes executing the command chown -R user:psaserv .
So I will be shure that even a new file is generated it will have the right permissions so the store will be available for customers and it won't stop.
I am using plesk as administration is someone familiar how can I set such a cron job?
The main directory of my magento is /var/www/vhosts/website.com/httpdocs/


texts: Magento 2 I Want to add Dropdown Quantity Box In Minicart

texts:
I am trying to replace Dropdown instead of text box at Quantity at Minicart.

I tried following code  but didn't get success ( i am trying direct in Magento Vendor folder for testing purpose).

  Magento_Checkout\template\minicart\item\default.html

Remove input text box and put the select tag.

<select data-bind="options: qtyOptions,attr: {
                           id: 'cart-item-'+item_id+'-qty',
                           'data-cart-item': item_id,
                           'data-item-qty': qty,
                           'data-cart-item-id': product_sku
                           }, value: qty"
                            class="item-qty cart-item-qty">
                    </select>

I have added js code in minicart.js

  Magento_Checkout\js\view\minicart.js

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

  return Component.extend({

        qtyOptions: ko.observableArray([]),

        initialize: function () {

            for(var i =0; i<= 10; i++){
                this.qtyOptions().push(i);
            }

        }

    });
});

I have put the bold text code in js file.

Can any one Help to correct the code ?

I got following error.


texts: How to perform automated regression testing for Magento upgrade

texts:
I see several questions related to testing a Magento website including "How to test Magento upgrade", which discusses manual testing.

Are there any tools for automated regression testing of my upgrade?   An ideal tool would learn my products etc. from the database (or previous crawl) and make sure everything is functioning after the upgrade.

I'm sure nothing will replace manual testing for many of the extensions and for the theme/template.  But a general sanity check of an automated regression test would be valueable.

I might even use the automated regression after installing any new extensions.


texts: Programmatically update the quantity of an item ordered in magento

texts:
I have to edit the quantity of some items programmatically in Magento.

Say a customer ordered for 5 kg of Apples and 10 qantity of pens. But then he rejects 1 kg of apple and 5 pens because of say poor quality or whatsoever the reason. So i need to update them in my credit memo and the price should also automatically update accordingly along with taxes and everything so that customer has to pay for 4 kg of apples and 5 pens only. How to apply this functionality to magento programmatically?

I am using magento 1.9.2.3 version.

Please help me. I am a novice in magento and I am stuck at this point. Thankyou in advance!!


texts:
cannot place order using my account after upgrading the magento version 1.7 to 1.9.2
can anyone help me out.
am not getting any error but it just stay on the checkout page.


texts: Magento : currency overlaps to price in invoice pdf

texts:
I am using Nigerian currency for as a primary and it displays well in order view, invoice and shipment. But when I am trying to take print the currency overrides the amount.

Can anyone tell me how to resolve it.
My Magento version is 1.9.2.4


texts: saveOrder is triggered twice intermittently

texts:
I am facing an issue with intermittent duplicate orders.

The payment gateway is SecurePay (Australia) however by looking at the logs, the problem seems to be the codebase since I can see the following (addresses obscured):

./ssl_access_log.www10.1:8.8.8.8 - - [05/Nov/2013:01:18:32 +1100] "POST /checkout/onepage/saveOrder/ HTTP/1.1" 200 30 "https://foobar/checkout/onepage/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36" 2444 2204
./ssl_access_log.www10.1:8.8.8.8 - - [05/Nov/2013:01:18:42 +1100] "POST /checkout/onepage/saveOrder/ HTTP/1.1" 200 30 "https://foobar/checkout/onepage/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36" 2444 2204

So something is triggering saveOrder twice usually within a 10 second period so this is not a front-end issue where the user is clicking the button twice.

There is no one step checkout installed - it's a standard Magento one page checkout.

Edit: This is NOT a front-end issue where the user can click the button twice


texts: Magento 2 - How to customize packing slip pdf print-out

texts:
I want to change the design and layout of my packing-slip pdf print-outs to make a simple and clean print for the employes to work through.

Is there any extension / tutorial / anything else which shows how to make this possible ?


texts:
I have two stores. We need to have all registered users of store A be given a coupon code (either upon checkout or account creation) that is valid for Store B.

These stores are not on the same magento installation. Is there a good way to go about doing this?


texts: Magento2: How to get list of category's dropdown attributes?

texts:
I am using Magento 2.3 and I want to get list of category's dropdown attributes and their values?
For example I have a Furniture category and in this category I have Color and Manufacturer attributes in sidebar navigation, I want to get these two attributes(Color and manufacturer) and their values based on Furniture category. You can check my requirement with the help of below image:-

Please help me how to get this.
Thanks in advance.


texts: 500 errors after patching Magento 1.9.0 with SUPEE-6285

texts:
Patched Magento with SUPEE-5994 and was successful. After clearing cache and clearing and disabling compilation site worked fine.

I then patched with SUPEE-6285 and whilst indicating it was successful in the ssh console i now can not access either the store or admin. The HTTP error log shows the following...

  PHP Warning:  require_once(/var/www/html/app/Mage.php): failed to open stream: Permission denied in /var/www/html/index.php on line 69

  PHP Fatal error:  require_once(): Failed opening required '/var/www/html/app/Mage.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/index.php on line 69


texts:
I would like to apply a tax rule for any customer who is shipping to New Jersey. I would ideally like to update the cost and tax amount via an AJAX call from the onepage checkout. I have a customised OnepageController to manage this currently, so the shipping amount is updated via AJAX.

I have entered a tax zone & rate for every US state, set to 0% except for New Jersey. I have then created the associated Tax Rule, one for every state except NJ, then one for NJ only. Now it will apply NJ tax to every customer no matter what, even if I change the shipping state to one I know does not have an associated tax rule.

I have a customised checkout that starts with the shipping address (after guest checkout / login). I don't understand why Magento is not applying the tax rules I have defined. It seems simple enough in principle.

I've looked at using TaxJar, and it has added a bunch of NJ tax rules. Unfortunately it also always applies the NJ tax no matter where I put the shipping address.

I've checked a lot of tutorials and posts and none of them helped. I've gone over all the admin settings many times and they are fine and how they should be (I think).

Any help to get this working would be much appreciated.


texts: Magento 2: Add html instead of Ui from field?

texts:
I used this code to add custom html to form field

<field name="statistics">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="sortOrder" xsi:type="number">150</item>
            <item name="dataType" xsi:type="string">text</item>
            <item name="template" xsi:type="string">ui/form/field</item>
            <item name="elementTmpl" xsi:type="string">VendorName\ModuleName\Ui\Component\Listing\Column\Statistics</item>
            <item name="label" translate="true" xsi:type="string">Click</item>
            <item name="formElement" xsi:type="string">input</item>
            <item name="source" xsi:type="string">popup</item>
            <item name="dataScope" xsi:type="string">click</item>
        </item>
    </argument>
</field>

  VendorName\ModuleName\Ui\Component\Listing\Column\Statistics.php

<?php

namespace VendorName\ModuleName\Ui\Component\Listing\Column;

use Magento\Framework\DataObject;

class Statistics extends \Magento\Framework\Data\Form\Element\AbstractElement
{
    public function getElementHtml()
    {
        return "
Testing From Div
";
    }

}

But it's shows an error:


texts: Deleting an address and relationship with customer

texts:
When fetching a customer's addresses and deleting them in a foreach loop:

$addresses = $customer->getAddresses();

foreach ($addresses as $address) {
    $address->delete();
}

The addresses appear empty in the customer's address book on the frontend and also in the customer admin section. So the address has been deleted, but the relation to the customer still exists.

When taking a look at Mage_Customer_AddressController::deleteAction nothing more seems to happen than what I am doing, but the addresses don't seem to appear as empty addresses anymore.

What am I overlooking?


texts: Trouble ordering blocks in the left navigation

texts:
Trying to get the right order for a static block in the left hand side navigation of a category page

Everything is pretty standard , I have a left.phtml file with subcategories - and it looks fine.

I added a static block which I want to appear after it - but the static block always appears before it.  I tried the after="-" ,  but I think I am missing something?

<catalog_category_view>
        <reference name="root">
            <action method="setTemplate"><template>page/2columns-left.phtml</template></action>
        </reference>
        <reference name="left">
            <remove name="currency"/>
            <remove name="left.newsletter"/>
            <remove name="left.permanent.callout"/>
            <block type="cms/block" name="monthly_comp" after="-">
                <action method="setBlockId"><block_id>monthly_competition</block_id></action>
            </block>
        </reference>
</catalog_category_view>


texts: magento 2 - Terms and conditions checkbox on register page

texts:
I want to set terms and conditions checkbox on register  page which retrieve same as checkout.

On click of terms and conditions  link open content in popup.

Any suggestion would be appreciated.

Thanks.


texts: Do we need extensions for adding new functionality in Magento 2?

texts:
I can see in the Magento marketplace, there are so many third party extensions are available. My doubt is, if we want to implement the small functionalities like Scroll to top, banner slider, etc., 'do we need to use extensions because we can simply make them by adding some small scripts?' So what is the point of these extensions.

Also, I want to know do we really need modules to add functionality?

I want to add price slider in category page of my website. For achieving this, do i need to use module/extension?

Thanks for your time. Looking for your reply.


texts: Add active class to CMS page links in Top menu (static block links)

texts:
In this Topmenu i have a custom home-link and some other CMS-links i insert through a Static Block.

How can i give those CMS-page menu items an active class?

--- Update 1 ---

I found this answer, but i can't get it to work?

I adjust app\design\frontend\mypackage\mytheme\template\page\html\topmenu.phtml like this:

<?php $_menu = $this->getHtml('level-top') ?>

<?php if($_menu): ?>
    <nav id="nav">
        <ol class="nav-primary">
            <?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('home-link')->toHtml(); ?>
            <?php echo $_menu ?>
            <?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('main-cms-links')->toHtml(); ?>
        </ol>
    </nav>

    <script>
        var currentPageId = '';
        <?php if (Mage::getSingleton('cms/page')): ?>
        currentPageId = '<?php echo Mage::getSingleton('cms/page')->getIdentifier(); ?>'
        <?php endif; ?>
        if (jQuery('#'+currentPageId).is('li')) {
           jQuery('#'+currentPageId).addClass('active');
        }
    </script>

<?php endif ?>


texts: Magento 2 Region list not filter for default country on billing address for first time

texts:
There are many country region available in region list. The issue arises first-time page load on the billing address of checkout. Even default country has been set up the USA, All region list has been displayed in the select box. After that region filter working perfectly.
I need to apply the filter so region are displayed based on Default selected country.


texts:
I come across this code :

app/code/Aheadworks/OneStepCheckout/view/frontend/web/template/onestep.html

Questions :

What is the mageInit: {'awOscSidebar':{}} mean? where this data coming from ?
And where is the location of getRegion() and getTemplate() in the above code called in the backed side ?

Forgive me asking this basic question but I've been struggle understanding this code for hours, looking and searching this function in the code but no luck.

Any help would be really appreciated.


texts: icon is not clickable in product view page , but working in listing page

texts:
we are using below code in product listing page, once customer click on icon present on listing page [list.phtml] , than it saving that product in database & displaying under My Product likes. but same code is not working in product view page [view.phtml]

In view page icon is not clickabe as here

icon

code : list.phtml / view.phtml

<?php if($customerId){?>
   <?php if($customerlikeProduct=="No"){?>
         <img id="img-<?php echo $_product->getEntityId()?>"
         onclick="saveproductLike('<?php echo $_product->getEntityId()?>','<?php echo $customerId?>','<?php echo count($likeProduct)?>');"
         src="<?php echo $this->getSkinUrl($customerlikeProductimage) ?>"/>
         <?php }else{?>
              <img src="<?php echo $this->getSkinUrl($customerlikeProductimage) ?>"/>
   <?php } ?>
<?php } else{?>

list.phtml : http://pastebin.com/8dEUaXuP

View.phtml : http://pastebin.com/9RrCe3D2


texts: Show accepted terms and conditions on order confirmation

texts:
One thing has been really bugging me about the Terms and Conditions system in Magento.

A person accepts the terms and conditions at checkout, for example they agree that the store is currently on holiday and their orer will be sent in two weeks time. Great!

The problem is, the customer then writes to us a week later going: "where is my order"? At that point, you can argue all you like that he accepted the terms and conditions at checkout, while he insists he never did. The point is: you can't prove it.

What needs to happen is: the order confirmation email that gets sent out to customers should indicate that they ticked the terms and conditions box. It should show either the full terms and conditions text, or just the "Condition Name" used in the backend, which we could make descriptive enough to make it clear what they agreed to.

I know it's a rather specific requirement so it's unlikely that it would be added if I ask the Magento team for it. Basically I am looking for a bit of code to add to the order confirmation email's template which will print any terms and conditions that have been agreed to at checkout.

A possible workaround would be to temporarily change the email template when there's any terms and conditions enabled. It's just not very convenient.

I haven't found any extensions for this and I don't have the skills to write the code myself. If anyone can think of a simple solution, your help would be appreciated.

Thanks!


texts:
We used to have code that allowed us to add a custom price to a bundle.  As of an upgrade to 1.14.1.0 that code no longer works.

To get started we started tinkering with the core code to enable the custom option (app\code\core\Mage\Adminhtml\Block\Sales\Order\Create\Items\Grid.php )
I the "canApplyCustomPrice" function, I allowed bundles to return true.

That enables the "custom price" edit box on the admin order form, however any value you add to it, will apply to that row.

How can I get the custom price to apply to the bundle product?


texts: Magento search is not working for specific sku values

texts:
I am facing a weird issue in magento enterprise version 1.12.0.2. I have created a configurable product with SKU "CVR" but when I search in top search bar, I get no result for this SKU.
If I change the SKU value to something else like "5656" or "ABCD", it gives me the product in search.
I have reindexed every time and flushed all cache after I make any change to product even if all cache are disabled. Still I am not able to search using the SKU value "CVR". Please guide.


texts:
Have added two images to same line, they auto fill the width - but how can I remove the padding between the images?

And remove the "line break" so I can have e.g. 4 images (2x2) without any padding in between??

The code is like this:


texts:
im kinda new to magento and I struggle with one thing now. I have modified app\design\frontend\base\default\template\tax\checkout\subtotal.phtml
for a simple functionality. It's working ok, I basically only call one function in my custom helper of my module. However I need to keep magento updated, so I added this phtml to my template file in base theme where I have other files like JS and CSS for my custom blocks.

Problem is, this tax\checkout\subtotal.phtml
is displayed because \design\frontend\base\default\template\checkout\cart\totals.phtmlcalls $this->renderTotals(); so Mage_Checkout_Block_Cart_Totals handles this. I dont want to override core function to force my phtml file (I also think this wouldnt be good idead), I would like to keep it as simple as possible. I work in RWD theme, but I want to display this functionality throughout all themes so I have my templates and layout in base theme folder.
Also I dont want to solve this by changes in backend, I want to do it purely programmatically.

Thx in advance :)


texts: Newsletter subscription box positioning in footer

texts:
EDIT: SOLVED, see answer below (will accept when I can).

I wanted to move the newsletter block on the frontend of my site to the footer.

So I changed this in newsletter.xml: (
Previously the reference was <reference name="left">)

    <reference name="footer">
        <block type="newsletter/subscribe" name="footer.newsletter" template="newsletter/subscribe.phtml"/>
    </reference>

This has worked in that the newsletter has moved to the footer, but how can I control where the block is positioned within the footer.

I tried this in my templates ... page/html/footer.phtml:

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

                <?php echo $this->getChildHtml('footer.newsletter') ?>

...

But this duplicates the newsletter block. Now it appears once in the place I want it to be (in the three-column div) but then appears again in the nine-column div.

I assume this is because it is included in the '$this->getChildHtml()' call.

I would really appreciate any help, thanks. Definitely missing a trick somewhere.


texts: Magento2.3: How to send a file using SFTP connection?

texts:
I have successfully connected SFTP in magento 2 by referring the below URL:

How to connect SFTP in magento 2

Now, I want to send a file to that server. In order to send a file, how can I proceed?

Could anyone please help me with this?


texts: how to add custom block same as related product block in product page?

texts: I am using magento 2.3. We need custom block same as related products and also custom block under related products in product page. Please reply as soon as possible. Thank you


texts: Google recapcha wrong type with configuration

texts:
In my env.php I have setup the recapcha key for the v2 invisible type
        'recaptcha_backend' => [
            'type_recaptcha' => [
                'public_key' => null,
                'private_key' => null
            ],
            'type_invisible' => [
                'public_key' => 'myPlublicKey',
                'private_key' => 'myPrivateKey'
            ],
            'type_recaptcha_v3' => [
                'public_key' => null,
                'private_key' => null
            ]
        ],
        'recaptcha_frontend' => [
            'type_recaptcha' => [
                'public_key' => null,
                'private_key' => null
            ],
            'type_invisible' => [
                'public_key' => 'myPlublicKey',
                'private_key' => 'myPrivateKey'
            ],
            'type_recaptcha_v3' => [
                'public_key' => null,
                'private_key' => null
            ]
        ]

As a result in the admin recaptcha admin panel the fields remains empty except for v2 invisible as expected. This part seems to be fine.

Then, In my config.php I want to say to the recaptcha frontend to activate the capcha under the contact us page
        'recaptcha_frontend' => [
            'type_for' => [
                'contact' => true,
                'customer_login' => null,
                'customer_forgot_password' => null,
                'customer_create' => null,
                'customer_edit' => null,
                'newsletter' => null,
                'paypal_payflowpro' => null,
                'product_review' => null,
                'sendfriend' => null,
            ]

But after that...when I check what I have in my contact input field...it's the v3 invisible type instead of the v2 one. I'm a little bit confused about it.


texts: "Specified request cannot be processed." when making any async/bulk REST API call in Magento 2

texts:
I have Magento Open Source 2.4.0 with PHP 7.4 and RabbitMQ 3.8 set up in app/etc/env.php:
'queue' => [
    'consumers_wait_for_messages' => 0,
    'amqp' => [
        'host' => '127.0.0.1',
        'port' => '5672',
        'user' => 'magento',
        'password' => 'secret',
        'virtualhost' => '/'
    ]
],

I ran setup:upgrade multiple times since adding this configuration. I have all queues except async.operations.all:
$ php7.4 bin/magento queue:consumers:list
product_action_attribute.update
product_action_attribute.website.update
exportProcessor
inventory.source.items.cleanup
inventory.mass.update
inventory.reservations.cleanup
inventory.reservations.update
media.storage.catalog.image.resize
codegeneratorProcessor
inventory.reservations.updateSalabilityStatus
inventory.indexer.sourceItem
inventory.indexer.stock
media.content.synchronization
media.gallery.synchronization

In another Magento installation, that async.operations.all queue appeared the first time I created a bulk request, so I’m not worried here.
I’m making a PUT /rest/es/async/bulk/V1/products/bySku (es is my store code) with the following JSON payload:
[{"product": {"sku": "some_sku_here", "name": "new name"}}]

I get a 400 with "No se puede procesar la petición especificada.", which is Spanish for "Specified request cannot be processed.".
Whatever the JSON body I use, I always get this error. I have no issue on the non-async/bulk endpoints (for example /rest/es/V1/product/some_sku_here).
I’ve checked RabbitMQ credentials but they’re correct. I can connect using the credentials and host/port above. I’ve not found anything on the Internet that matches my issue.
Any idea?


texts:
I am new in Magento.
I want to upgrade my Magento version from 2.0.9 to 2.0.10. I have goggling a lot.

I followed http://devdocs.magento.com/guides/v2.0/install-gde/prereq/connect-auth.html but I get error Couldn't resolve host 'repo.magento.com'.

I have a site on magemojo so I want to upgrade in my localhost first and then in live server.

Please advise me.


texts: How to load custom.css after styles-l.css

texts:
I am working on custom theme and the parent theme is blank.I have added the below code in default_head_block.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
    <css src="css/styles-m.css" />
    <css src="css/styles-l.css" media="screen and (min-width: 768px)"/>
    <css src="css/print.css" media="print" />
</head>

But in view source of browser custom.css loads before styles-l.css how can i fix it ?


texts: I created new payment method module, bud I need to execute my logic (send data to our server, handle response etc.) when user clicks Place order button. Is there a way to execute my logic when placing order? I saw some people using events, but I have some issues using them and I still hope there must be easier way to do so, because it is quite obvious that I want to execute some action if I define new payment method module.


texts: Fetch product data by referenceContainer in product list page

texts:
I need to hide product price in product list page. By below code, I can hide price but I need some product data for condition.
I have read that $block variable is available in block but I am using container because I don't want to edit/change whole page.

Please help.

My layout xml file is : catalog_category_view.xml

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

    <css src="Prince_Callforprice::css/fancybox/jquery.fancybox.css"/>

    <referenceContainer name="content">
         <block class="Prince\Callforprice\Block\Show" name="remove_price_and_addtocart_search_list" template="Prince_Callforprice::product/list/remove_price.phtml" cacheable="false" after="-"/>
    </referenceContainer>

</page>

My phtml file is : remove_price.phtml

<?php

$_productCollection = $block->getLoadedProductCollection(); // error comes here

foreach ($_productCollection as $_product){ ?>

<?php } ?>

<?php  if($block->isCallforpriceEnable()){
      $btnLabel = 'Call For Price';
?>

<?php
}
?>

[EDIT]

My Show.php file is:

<?php

namespace Prince\Callforprice\Block;

use Magento\Catalog\Api\CategoryRepositoryInterface;
use Magento\Catalog\Model\Category;
use Magento\Catalog\Model\Product;
use Magento\Eav\Model\Entity\Collection\AbstractCollection;
use Magento\Framework\Exception\NoSuchEntityException;
use Magento\Framework\DataObject\IdentityInterface;

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

protected $_helper;

public function __construct(
    \Magento\Catalog\Block\Product\Context $context,
    \Magento\Framework\Data\Helper\PostHelper $postDataHelper,
    \Magento\Catalog\Model\Layer\Resolver $layerResolver,
    CategoryRepositoryInterface $categoryRepository,
    \Magento\Framework\Url\Helper\Data $urlHelper,
    \Prince\Callforprice\Helper\Data $helper,
    array $data = []
) {
    $this->_catalogLayer = $layerResolver->get();
    $this->_postDataHelper = $postDataHelper;
    $this->categoryRepository = $categoryRepository;
    $this->urlHelper = $urlHelper;
    $this->_helper = $helper;
    parent::__construct(
        $context,
        $postDataHelper,
        $layerResolver,
        $categoryRepository,
        $urlHelper,
        $data
    );
}

public function getLabel()
{
    return $this->_helper->getConfigValue('callforpricesection/callforpricegroup/callforpricebuttontext');
}

public function isCallforpriceEnable()
{
    return $this->_helper->getConfigValue('callforpricesection/callforpricegroup/active');
}
}

It gives fatat error:
"Object DOMDocument should be created.";i:1;s:13450:"#0 /214fresh/vendor/magento/framework/View/Element/UiComponent/Config/Reader.php(95): Magento\Framework\View\Element\UiComponent\Config\DomMerger->getDom()


texts:
I can't seem to find the API routes for this module, while the module is available by API.

How can I translate the code to API routes?

https://github.com/mirasvit/module-blog


texts: How can I find a category by its ID in the magento backend?


texts: How to migrate customer related data from magento 1.9.0.1 to 1.9.3.8

texts: I am new to magento. I want to update new customer related data from version 1.9.0.1 to 1.9.3.8. no idea what are table should be move.


texts: Magento2 - Do not want confirmation after delete an item in minicart

texts:
Do you know how to cancel the confirmation after deleted an item in mini cart? i still want to delete the item but with no confirmation pop up.

Thank you


texts: Extend admin/login.phtml: Invalid template file

texts:
I try to override admin login template, using Layout Block Argument. Here is the files I created to do that:

in Vendor/Module/view/adminhtml/layout/admin_login.xml
I tried:

<referenceBlock name="admin.login">
   <arguments>
     <argument name="template" xsi:type="string">vendor_module::admin/login.phtml</argument>
   </arguments>
</referenceBlock>

But nothing Happened, so I changed with:

<referenceBlock name="admin.login">
   <action method="setTemplate">
     <argument name="template" xsi:type="string">vendor_module::admin/login.phtml</argument>
   </action>
</referenceBlock>

And now in magento2/var/log/system.log I have:

main.CRITICAL: Invalid template file: 'vendor_module::admin/login.phtml' in module: 'Magento_Backend' block's name: 'admin.login'

I have created the template file login.phtml in Vendor/Module/view/adminhtml/templates/admin/

so I don't know what's I'm doing wrong. I'm very new to Magento 2, I took the time to read Dev Docs and many forums but I can't find the solution by myself, anyone could help me?

Thank you so much!


texts: Order totals for pending payment showing total paid instead of total due

texts: I'm facing an issue when an order payment is not completed. On magento backend order section, order total is showing Total Paid amount instead of Total Due(as the payment is not completed)


texts:
I'm really at a loss. I have a web developer who basically 'does things we ask' then leaves us to our own devices, if something breaks, he won't fix it pretty much.

We asked him to install an extension so we comply with EU cookie law and since then, our add to cart button is not working. Hes uninstalled the extension but still no luck.

If we use the 'quick view' add to cart button, it works fine as per our theme but not on the main product pages. Is anyone able to help please? I'm ok with editing code when copied/pasted but I have very little coding knowledge.

Website is motif8.co.uk


texts:
I've read several threads how to change the product image width and height in app/code/design/vendor/module/etc/view.xml:

<view xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/view.xsd">
<media>
 <images module="Magento_Catalog">
    <image id="category_page_list" type="small_image">
         <width>500</width>
         <height>500</height>
    </image>
  </images>
</media>
</view>

I'm wondering where to find out the image id, e.g. category_page_list, category_page_grid or homepage_page_grid.

I try to change the image width and height for the product detail view...


texts: Magento 2 include google maps js only on contact page

texts:
I have a custom theme based on Luma, I'm trying to include google maps script only on contact page but it's not working.

Here is my contact_index_index.xml file under my-theme/Magento_Contact/layout/contact_index_index.xml

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

    <!-- Google map -->
    <script src="https://maps.googleapis.com/maps/api/js?key=My-Key" src_type="url" />
    <link src="js/google_init.js"/>

</head>
<body>
    <referenceContainer name="content">
        <block class="Magento\Contact\Block\ContactForm" name="contactForm" template="Magento_Contact::form.phtml">
            <container name="form.additional.info" label="Form Additional Info"/>
        </block>
    </referenceContainer>
</body>
</page>

Google_init.js file is under my_theme/Magento_Contact/web/js/google_init.js

But when I view page source, the scripts included in contact_index_index.xml are not appearing. What am I doing wrong ?


texts:
I have a module that shows some product that I want to sort by ID.

I'm trying the following code with no success

<?php
    $_productCollection=$this->getLoadedProductCollection();
    $_helper = $this->helper('catalog/output');
$_productCollection->addAttributeToSort('entity_id', 'desc');
?>

Any ideas?


texts: Magento 2 make purchase order number optional

texts:
In Magento2 - Is there a way to make the purchase order number in the checkout optional? Currently it's a required field in 2.1.7 and I can't find a configuration setting to change it.

I'm aware that I could change it in the code somehow and just make it optional, but I'm afraid of a lot of problems and errors if the whole magento checkout expects a value of the number everywhere.


texts: Add a group of attributes to all products

texts: I created a new folder of attributes to a product category, and its working fine. There is a way to add this folder of attributes to all products categories automatically? Or should i add one by one?


texts: How to override class that implements interface in magento2

texts:
I want to add my custom function in Magento\Framework\Message\Manager file in core file its working perfectly, but when I'm trying to override its not working. So, I want to know how to override class that implements interface in magento2.

below file I need to override:

vendor/magento/framework/Message/Manager.php


texts: Custom Options Automatically Delete in Back End

texts:
We keep adding custom options manually to certain products in the back end of Magento.  However, whenever we add them, they disappear automatically in the back end and of course never show up in the front end.  They're just nowhere to be found, like they were never there.

We also noticed that these products used to have custom options that are now deleted.  Nobody recalls deleting them.

Please let me know if you need more info & thank you in advance!  Help is much appreciated.


texts: Load category, but only with limited data to build a Breadcrumb

texts:
Based on the helper catalog there is a function that returns a path for the breadcrumb to be displayed in Magento when viewing a Product.

I want to enhance this method to return the full path of the categories back to me.

Current implementation:

...
if ($this->getProduct()) {
    $path['product'] = array('label'=>$this->getProduct()->getName());
}
$this->_categoryPath = $path;

Here I want to append a process that load the categories of the product via getCategoryIds(), which is available trough the getProduct() method.

I'd like to load a conditional collection, that only loads the respective ID of the categories but only the following data:

url
name
title
my_custom_eav_param

I assume something like:

if ($product = $this->getProduct()) {
    $cats = $product->getCategoryIds();
    foreach ($cats as $category_id) {
        $attributesToSelect = [''];
        $_cat = Mage::getModel('catalog/category')
            ->getCollection()
            ->addAttributeToSelect('*')
            ->addAttributeToFilter(['name', 'id', 'url', 'description'])
            ->load()
            ->getSelect()->__toString();
        var_dump($_cat); die;
    }
    $path['product'] = array('label'=>$this->getProduct()->getName());
}
$this->_categoryPath = $path;

but this does not work. How can I specify what entities are loaded in order to keep load to DB as low as possible for this requests? To load the whole category all the time is a lot of traffic, or can it be ignored completely?


texts: Magento header module not showing properly

texts:
I created a new layout and assign it to my home page.The layout working fine,Here is my local.xml file.

  <page_home_layout translate="label">
        <label> Layout Home Page</label>
        <reference name="root">
            <action method="setTemplate"><template>page/home.phtml</template></action>
            <action method="setIsHandle"><applied>1</applied></action>
            <action method="setLayoutCode"><name>Home Page</name></action>
        </reference>
        <reference name="header">
           <block type="youama_slider/slider" name="youamaslider" template="youama/slider/slider.phtml" output="toHtml"/>
       </reference>

My problem is The module youamaslider is not showing in header,It is showing after the footer.Is there anything wrong i have done?


texts: How to get only enabled products id's in Magento 2?

texts:
I have created a some fields in Store->Configuration on saving the data connect an observer.
I want to get all enable product id's in that observer file how would i do that.
Any help is appreciated.


texts: Magento 1.9.x in maintenance mode while having access to admin

texts:
I have successfully put magento 1.9.x in maintenance mode while still having access to admin area however I need to access one more URL which is custom based module. The following code worked fine to access admin area only.

$url=(!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];

if (file_exists($maintenanceFile) && strpos($url,'/admin') === false) {
    $basePath = dirname($_SERVER['PHP_SELF']);
    include_once dirname(__FILE__) . '/maintenance.php';
    exit;
}

How do I add another custom module in above code which has URI eg. www.domain.com/ModuleName/ and can be access directly while keeping the site in maintenance mode?

Thanks


texts:
How can I assign currencies to store view for example:

The main currency of the page: euro

Store view Poland: I wanted to display only PLN
Store view Poland: I wanted to display only EUR and USD.

How I can do ?


texts:
I have confusion in URL REWRITE Management. Can you please anyone explain it?

If url = www.domain.com/all-category/boys-toys/action-toy-figures.html it redirects to www.domain.com/action-toy-figures.html

I used custom but I can't understand that field section. Can you please explain it to me?


texts: How to change that wish list name  to " wish list 1" .I want default name wish list name " wish list 1" not by edit option


texts:
I want to run the cron job on magento, but the cron events are not appeared.
This is my etc/config.xml file.

<crontab>
    <jobs>
         <imagerecycle_imagerecycle>
            <schedule>
                <cron_expr>*/1 * * * *</cron_expr>
            </schedule>
            <run>
                <model>imagerecycle/observer::cronexec</model>
            </run>
         </imagerecycle_imagerecycle>
    </jobs>
</crontab>

And I define the cron event ovserver function.

class Imagerecycle_Imagerecycle_Model_Observer
{
    public function cronexec($observer)
    {
        // do something
    }
}

And to run the cron I use such a command line at the command prompt.

D:\work\magento>schtasks /create /sc minute /mo 1 /tn "my cron" /tr "php -f d:\work\magento\cron.php

So the cron.php is called every 1 minutes.
But my cronexec() function are not working.  So I installed the AOE-Scheduler extension and reviewed the information. There was my cron function correctly. By the way there is a message "there is no heartbeat work now".  I guess there is no error on my php program. Only the magento cron cannot run on the windows 7. Is is right? Please help me.


texts: I have enabled PayPal on my Magento 2 store and placed an order. Now I am getting too many order comments in order view section. How can I debug this and why there are too many comments showing?


texts: Admin grids are blank after installation of fresh Magento 2.1

texts:
I have recently installed Magento 2.1.

After and run php bin/magento setup:static-content:deploy.

I have cleared all cache rm -rf var/cache/*,rm -rf var/page_cache/*

And logged in to admin panel i have checked their is no data populating in Catalog,Sales,Pages,Blocks event each grids are blank.

I had checked console and found that their some JavaScript errors are displaying.

    Error parsing header X-XSS-Protection: 1; mode=block, 1; mode=block: expected semicolon at character position 14. The default protections will be applied.
    jquery-migrate.js:21 JQMIGRATE: Logging is active
    VM441:1 Uncaught TypeError: Cannot read property 'provider' of undefined(anonymous function) @ VM441:1template @ template.js:43render @ template.js:97iterate @ template.js:174_.each._.forEach @ underscore.js:150iterate @ template.js:176_.each._.forEach @ underscore.js:150template @ template.js:161initConfig @ class.js:88initialize @ class.js:69_super @ wrapper.js:106initialize @ element.js:89(anonymous function) @ wrapper.js:109constr @ class.js:48initComponent @ layout.js:64fire @ jquery.js:3099fireWith @ jquery.js:3211deferred.(anonymous function) @ jquery.js:3301fire @ jquery.js:3099fireWith @ jquery.js:3211deferred.(anonymous function) @ jquery.js:3301(anonymous function) @ layout.js:57execCb @ require.js:1650check @ require.js:866(anonymous function) @ require.js:1113(anonymous function) @ require.js:132(anonymous function) @ require.js:1156each @ require.js:57emit @ require.js:1155check @ require.js:917enable @ require.js:1143init @ require.js:774callGetModule @ require.js:1170completeLoad @ require.js:1544onScriptLoad @ require.js:1671
    require.js:1895 GET http://magento2.amanweb.in/pub/static/adminhtml/Magento/backend/en_US/rjsResolver.js req.load @ require.js:1895load @ require.js:1639load @ require.js:820fetch @ require.js:810check @ require.js:840enable @ require.js:1143enable @ require.js:1511(anonymous function) @ require.js:1128(anonymous function) @ require.js:132each @ require.js:57enable @ require.js:1090init @ require.js:774callGetModule @ require.js:1170completeLoad @ require.js:1544onScriptLoad @ require.js:1671
    require.js:166 Uncaught Error: Script error for: rjsResolver
    http://requirejs.org/docs/errors.html#scripterror

I am getting same issue after upgrade from Magento 2.0.7 to Magento 2.1.0

Any help is highly appreciated.


texts: Limit customer firstname and lastname in m2

texts:
How can we limit the character of first name and last name of customer. For example I want only 30 characters are valid to enter in first & last name. As of now there is no limit on character we can add as many character we want.

Looking for advices
Thanks


texts: How to make products-per-page setting reset to default on pageload

texts: I have tried modifying getLimit() in the file Mage_Catalog_Block_Product_List_Toolbar, but that didn't seem to change anything.  Is this even possible?


texts: How to access customer upload file using media url?

texts:
I have created a customer attribute called the customer logo and I want to get URL of that customer logo in the Email I am trying to access using but it gives 404
https://localhost/pub/media/customer/A/P/demo.png
So is there any way like we can get the proper URL of the customer upload file? and that's direct accessible everywhere like a display in email etc


texts: Magento 2.3 - Mass change attribute scope to global

texts:
I need to change all attributes to scope global in my Magento 2 store.
At the moment I have more then 200 attributes with scope Store View.

I found a script to change it for specific attributes, but how can I change this to make it work for all attributes?

Code:

<?php

use Magento\Framework\App\Bootstrap;
use Magento\Sales\Model\Order;

require __DIR__ . '/app/bootstrap.php';

$bootstrap = Bootstrap::create(BP, $_SERVER);

$objectManager = $bootstrap->getObjectManager();

$state = $objectManager->get('Magento\Framework\App\State');
$state->setAreaCode('frontend');

$resource = $objectManager->get('Magento\Framework\App\ResourceConnection');
$connection = $resource->getConnection();
$tableName = $resource->getTableName('catalog_eav_attribute');

// UPDATE DATA
$value = 1;
$attributeIds = 45,46,47;
$sql = "UPDATE " . $tableName . " SET is_global = ". $value ." WHERE attribute_id IN (". $attributeIds .");
$connection->query($sql);


texts: Should we create multi stores with multi store views Or one store with multi store views?

texts:
**
We are going to create B2B Ecommerce Magento 2
Our Requirements

different Customers With different Locations For Export
different languages , currencies , products and prices

**


texts: Magento 2 - two language version, where is global css?

texts:
I have two language version, where is global css?

I changed file

  \htdocs\mgnt2\app\design\frontend\TemplateMonster\framework\web\css\style.css

But my changes are visible only one language version.


texts: Magento 2: How do I rewrite JS from Third Party loaded through requirejs-config.js

texts:
Lets say we have an Third Party Module in Magento 2 that has in frontend from requirejs-config.js the following code:

var config = {
map: {
    '*': {
        amShopbyFilterAbstract: 'Amasty_Shopby/js/amShopby',
        amShopbyFilterItemDefault: 'Amasty_Shopby/js/amShopby',
        amShopbyFilterDropdown: 'Amasty_Shopby/js/amShopby',
        amShopbyFilterSlider: 'Amasty_Shopby/js/amShopby',
        amShopbyFilterFromTo: 'Amasty_Shopby/js/amShopby',
        amShopbyAjax: 'Amasty_Shopby/js/amShopbyAjax',
        amShopbyFilterSearch: 'Amasty_Shopby/js/amShopby',
        amShopbyFilterHideMoreOptions: 'Amasty_Shopby/js/amShopby',
        amShopbyFilterAddTooltip: 'Amasty_Shopby/js/amShopby',
        amShopbySwatchesChoose: 'Amasty_Shopby/js/amShopbySwatchesChoose',
        amShopbyFilterMultiselect: 'Amasty_Shopby/js/amShopby',
        amShopbyFilterSwatch: 'Amasty_Shopby/js/amShopby',
        amShopbyFiltersSync: 'Amasty_Shopby/js/amShopbyFiltersSync',
        amShopbyApplyFilters: 'Amasty_Shopby/js/amShopbyApplyFilters',
        amShopbyTopFilters: 'Amasty_Shopby/js/amShopbyTopFilters',
        amShopbyFilterCategoryDropdown: 'Amasty_Shopby/js/amShopby',
        amShopbyFilterCategoryLabelsFolding: 'Amasty_Shopby/js/amShopby',
        amShopbyFilterContainer: 'Amasty_Shopby/js/amShopby'
    }
},
deps: [
    'Amasty_Shopby/js/amShopbyResponsive'
]

};

And I want to use my own code in order to overwrite the js from 'Amasty_Shopby/js/amShopby' so it loads my own code instead of the extension code in order for me to make changes into it.


texts: Magento 2 : Get Data From Two Tables or Model

texts:
I have created ui component and it works fine, I added data provider file and customized my getData function:-

public function getData() {
        if (!$this->getCollection()->isLoaded()) {
            $this->getCollection()->load();
        }

        $this->getCollection()->getSelect()->joinLeft(array('qrcode' => $this->_resource->getTableName('w3solver_qrcode')),
                                               'e.entity_id = qrcode.product_id');

        // echo $this->getCollection()->getSelect()->__toString();
        // exit();

        $items = $this->getCollection()->toArray();

        echo "<pre>";
        print_r($items);
        exit();
        return [
            'totalRecords' => $this->getCollection()->getSize(),
            'items' => array_values($items),
        ];
    }

When I try to print collection query it gives me correct output but $items is not giving me fields from second table. Can anyone help mw and let me know why I am not getting field from second table.


texts:
Our store has a lot of Search Queries with "Number of Uses" listed as 0.  It seems illogical that Magento would track unused search terms.

What does this mean? / Why is Magento doing this?

EDIT:
"Number of uses" is listed in the admin: catalog > search terms -- open any search term. See image.

For anyone who might stumble on this later, I now suspect "number of uses 0" means that someone entered a search term but didn't click enter to initiate the search.


texts: how to remove decimal value for weight attribute in more information tab in magento 2.3

texts:
getAdditionalData()) :?>

<?= $block->escapeHtml(__('More Information')) ?>

              <?php foreach ($_additional as $_data) :?>
              <?php if ($_data['code'] == 'weight') {
                $_data['value'] = $_data['value'].'grams';?>

                  <?= $block->escapeHtml($_data['label']) ?>
                  <td class="col data" data-th="<?= $block->escapeHtmlAttr($_data['label']) ?>"><?= /* @noEscape */ $_helper->productAttribute($_product, $_data['value'], $_data['code']) ?>

              <?php } else { ?>

                  <?= $block->escapeHtml($_data['label']) ?>
                  <td class="col data" data-th="<?= $block->escapeHtmlAttr($_data['label']) ?>"><?= /* @noEscape */ $_helper->productAttribute($_product, $_data['value'], $_data['code']) ?>

              <?php } ?>
              <?php endforeach; ?>


texts: Removed payment method, old orders not loading

texts:
Synopsis: I've deleted an ancient payment method extension from my magento install, and now orders made using this payment method cannot be viewed and result in an exception.

Specifically, our store has been using an ancient payment method extension which I am now in the process of upgrading to a brand spanking new version, from a different vendor.

The old extension is badly written and a complete mess, so I just wanted to get rid of it. The new extension is for the same payment provider, but uses a different $_code and is incompatible with the old extension.

Trying to view any order where this payment method is used, in either the back end or the customer account page, results in an exception: "The requested Payment Method is not available."

How do I get around this? I don't care about the payment method for these old orders, I just want to be able to view further details about the order without it crashing.

I cannot change the payment method code on the orders themselves to the new payment method code as they are incompatible and generate further errors. Is it possible to create a "skeleton" payment method that uses the $_code from the old payment method for the sole purpose of satisfying magento needs, and how difficult would this be? Or is there another way round this problem which doesn't involve me keeping the old legacy extension kicking around?


texts: Insert a custom block into another custom block, in Magento 2

texts:
I have a block in my homepage site which has a div with a pair of banners.
I've created a new block only dedicated to my 2 images that I want to insert into my homepage block.
Is that possible? How can I do through my admin console, in block section?


texts: The title says it all. How to update data if already exist, otherwise Input new data?


texts: I have a Magento store (version 1.8.1) and I installed an extension to export the Google product feed. I noticed that the URLs in the generated feed are redirecting so I did some checks and found that in the Magento admin all the simple product URL keys are the same as the configurable products. How is that possible? Where does Magento pull the actual URL used on the front end from?


texts: Difference between \Magento\Framework\App\Shell vs \Magento\Framework\Shell

texts:
I was trying to execute shell commands from the Magento application and came across the following class class in the framework

\Magento\Framework\App\Shell and \Magento\Framework\Shell

Not sure between the difference between the two.

Wanted to know if the classes serve the same purpose or have there own set of use cases


texts: Magento2 : Grand total changes to zero after placing the order

texts: I am facing the issue of grand total becoming zero after placing the order in magento2. Some 3rd party module changes that. I want to know how to recollect the grand total again and set it as while placing the order. So it can avoid the conflict.


texts:
I have magento theme with a two store views english and arabic
the default theme is working great for the english view but for arabic view i want to change all the layout to be RTL

What is the best way to achieve that?


texts: Use a different paypal account for each store in a magento 2 multi-site configuration

texts:
I have a client who has operations in the UK and in ROI. He has a single magento store that is setup as a multi-site so that the ROI customers are directed to the ROI store and the UK customers are directed to the UK store. He wants to use his ROI paypal account for the ROI store and his UK paypal account for his UK store.
I cannot seem to find the ability to set this up and cannot find any extensions that would help provide this configuration.
Have you done anything like this?
What advice do you have related to it?
thanks


texts: How to export products using command line

texts: How to export products along with all attributes & images/video using command line?


texts: Magento 2 error Recently viewed products

texts:
So this error displays on my home page : {"store":"1","currency":"EUR","productCurrentScope":"website","displayTaxes":"2","displayWeee":"0","allowWishlist":false}
The weird thing about this error is that sometimes it does show up and sometimes it will work fine and the recently viewed products will be shown.
Has anyone ever seen this error? Or knows how to fix this?
Thanks